Skip to content

Commit 31b2188

Browse files
authored
Updates types (#189)
* Updates types * Updates types * Updates types * fixes linting * fixes error
1 parent 6954bce commit 31b2188

File tree

13 files changed

+213
-75
lines changed

13 files changed

+213
-75
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@withabound/node-sdk",
3-
"version": "5.0.2",
3+
"version": "5.1.0",
44
"description": "The Abound Node library provides convenient access to the Abound API from applications written in server-side JavaScript.",
55
"author": "Abound <[email protected]>",
66
"license": "MIT",

src/resources/1099-int.test.ts

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ const mailingRequest = {
9595
},
9696
};
9797

98-
const propertyMatchers = {
99-
createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string,
100-
};
101-
10298
describe(`abound.${resource}.create()`, () => {
10399
test("throws an error when the sdk config is invalid", async () => {
104100
// Arrange
@@ -186,7 +182,9 @@ describe(`abound.${resource}.create()`, () => {
186182

187183
// Assert
188184
expect(response).toMatchInlineSnapshot(
189-
propertyMatchers,
185+
{
186+
createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string,
187+
},
190188
`
191189
{
192190
"createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/,
@@ -231,6 +229,8 @@ describe(`abound.${resource}.create()`, () => {
231229
"tin": "*******00",
232230
"tinFingerprint": "tinFingerprint_samplehy2BWO6JJG",
233231
"tinType": "INDIVIDUAL",
232+
"tinVerificationId": "tinVerificationId_sample41SD71AV8f",
233+
"tinVerificationStatus": "MATCH",
234234
},
235235
"payeeUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-COPY-B.pdf",
236236
"payer": {
@@ -246,6 +246,8 @@ describe(`abound.${resource}.create()`, () => {
246246
"tin": "*******11",
247247
"tinFingerprint": "tinFingerprint_sample847jI1LwxF",
248248
"tinType": "BUSINESS",
249+
"tinVerificationId": "tinVerificationId_sample1b0E6efa89",
250+
"tinVerificationStatus": "MATCH",
249251
},
250252
"payerUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-COPY-C.pdf",
251253
"status": "CREATED",
@@ -288,7 +290,9 @@ describe(`abound.${resource}.list()`, () => {
288290

289291
// Assert
290292
expect(response.at(0)).toMatchInlineSnapshot(
291-
propertyMatchers,
293+
{
294+
createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string,
295+
},
292296
`
293297
{
294298
"createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/,
@@ -332,6 +336,8 @@ describe(`abound.${resource}.list()`, () => {
332336
"tin": "*******00",
333337
"tinFingerprint": "tinFingerprint_samplehy2BWO6JJG",
334338
"tinType": "INDIVIDUAL",
339+
"tinVerificationId": "tinVerificationId_sample41SD71AV8f",
340+
"tinVerificationStatus": "MATCH",
335341
},
336342
"payeeUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-COPY-B.pdf",
337343
"payer": {
@@ -346,6 +352,8 @@ describe(`abound.${resource}.list()`, () => {
346352
"tin": "*******11",
347353
"tinFingerprint": "tinFingerprint_sample847jI1LwxF",
348354
"tinType": "BUSINESS",
355+
"tinVerificationId": "tinVerificationId_sample1b0E6efa89",
356+
"tinVerificationStatus": "MATCH",
349357
},
350358
"payerUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-COPY-C.pdf",
351359
"status": "CREATED",
@@ -365,7 +373,9 @@ describe(`abound.${resource}.mail()`, () => {
365373

366374
// Assert
367375
expect(response).toMatchInlineSnapshot(
368-
propertyMatchers,
376+
{
377+
createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string,
378+
},
369379
`
370380
{
371381
"createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/,
@@ -409,7 +419,9 @@ describe(`abound.${resource}.file()`, () => {
409419

410420
// Assert
411421
expect(response).toMatchInlineSnapshot(
412-
propertyMatchers,
422+
{
423+
createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string,
424+
},
413425
`
414426
{
415427
"createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/,
@@ -453,6 +465,8 @@ describe(`abound.${resource}.file()`, () => {
453465
"tin": "*******00",
454466
"tinFingerprint": "tinFingerprint_samplehy2BWO6JJG",
455467
"tinType": "INDIVIDUAL",
468+
"tinVerificationId": "tinVerificationId_sample41SD71AV8f",
469+
"tinVerificationStatus": "MATCH",
456470
},
457471
"payeeUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-COPY-B.pdf",
458472
"payer": {
@@ -467,6 +481,8 @@ describe(`abound.${resource}.file()`, () => {
467481
"tin": "*******11",
468482
"tinFingerprint": "tinFingerprint_sample847jI1LwxF",
469483
"tinType": "BUSINESS",
484+
"tinVerificationId": "tinVerificationId_sample1b0E6efa89",
485+
"tinVerificationStatus": "MATCH",
470486
},
471487
"payerUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-COPY-C.pdf",
472488
"status": "FILED",
@@ -489,7 +505,9 @@ describe(`abound.${resource}.correct()`, () => {
489505

490506
// Assert
491507
expect(response).toMatchInlineSnapshot(
492-
propertyMatchers,
508+
{
509+
createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string,
510+
},
493511
`
494512
{
495513
"correctedFromId": "documentId_samplepWpJ9Snlzb",
@@ -535,6 +553,8 @@ describe(`abound.${resource}.correct()`, () => {
535553
"tin": "*******00",
536554
"tinFingerprint": "tinFingerprint_samplehy2BWO6JJG",
537555
"tinType": "INDIVIDUAL",
556+
"tinVerificationId": "tinVerificationId_sample41SD71AV8f",
557+
"tinVerificationStatus": "MATCH",
538558
},
539559
"payeeUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-CORRECTED-COPY-B.pdf",
540560
"payer": {
@@ -549,6 +569,8 @@ describe(`abound.${resource}.correct()`, () => {
549569
"tin": "*******11",
550570
"tinFingerprint": "tinFingerprint_sample847jI1LwxF",
551571
"tinType": "BUSINESS",
572+
"tinVerificationId": "tinVerificationId_sample1b0E6efa89",
573+
"tinVerificationStatus": "MATCH",
552574
},
553575
"payerUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-CORRECTED-COPY-C.pdf",
554576
"status": "FILED",
@@ -568,7 +590,9 @@ describe(`abound.${resource}.void()`, () => {
568590

569591
// Assert
570592
expect(response).toMatchInlineSnapshot(
571-
propertyMatchers,
593+
{
594+
createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string,
595+
},
572596
`
573597
{
574598
"createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/,
@@ -612,6 +636,8 @@ describe(`abound.${resource}.void()`, () => {
612636
"tin": "*******00",
613637
"tinFingerprint": "tinFingerprint_samplehy2BWO6JJG",
614638
"tinType": "INDIVIDUAL",
639+
"tinVerificationId": "tinVerificationId_sample41SD71AV8f",
640+
"tinVerificationStatus": "MATCH",
615641
},
616642
"payeeUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-VOID-COPY-B.pdf",
617643
"payer": {
@@ -626,6 +652,8 @@ describe(`abound.${resource}.void()`, () => {
626652
"tin": "*******11",
627653
"tinFingerprint": "tinFingerprint_sample847jI1LwxF",
628654
"tinType": "BUSINESS",
655+
"tinVerificationId": "tinVerificationId_sample1b0E6efa89",
656+
"tinVerificationStatus": "MATCH",
629657
},
630658
"payerUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-VOID-COPY-C.pdf",
631659
"status": "FILED",
@@ -646,7 +674,9 @@ describe(`abound.${resource}.retrieve()`, () => {
646674

647675
// Assert
648676
expect(response).toMatchInlineSnapshot(
649-
propertyMatchers,
677+
{
678+
createdAt: expect.stringMatching(matchers.isoDatetimeRegex) as string,
679+
},
650680
`
651681
{
652682
"createdAt": StringMatching /\\^\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.\\\\d\\{3\\}Z\\$/,
@@ -690,6 +720,8 @@ describe(`abound.${resource}.retrieve()`, () => {
690720
"tin": "*******00",
691721
"tinFingerprint": "tinFingerprint_samplehy2BWO6JJG",
692722
"tinType": "INDIVIDUAL",
723+
"tinVerificationId": "tinVerificationId_sample41SD71AV8f",
724+
"tinVerificationStatus": "MATCH",
693725
},
694726
"payeeUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-COPY-B.pdf",
695727
"payer": {
@@ -704,6 +736,8 @@ describe(`abound.${resource}.retrieve()`, () => {
704736
"tin": "*******11",
705737
"tinFingerprint": "tinFingerprint_sample847jI1LwxF",
706738
"tinType": "BUSINESS",
739+
"tinVerificationId": "tinVerificationId_sample1b0E6efa89",
740+
"tinVerificationStatus": "MATCH",
707741
},
708742
"payerUrl": "https://tax-documents-sandbox.s3.us-west-2.amazonaws.com/2022-FORM-1099-INT-COPY-C.pdf",
709743
"status": "CREATED",

0 commit comments

Comments
 (0)