Skip to content

Commit fee51a6

Browse files
authored
Fix 1099 and w9 response types (#243)
* Fix 1099 and w9 response types * Bump version
1 parent 791d662 commit fee51a6

File tree

8 files changed

+36
-13
lines changed

8 files changed

+36
-13
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.1.4",
3+
"version": "5.1.5",
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.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ import type {
1212
StateTaxInfo,
1313
Form1099,
1414
Form1099Request,
15+
Form1099Response,
1516
Form1099Status,
1617
} from "./types/1099.js";
1718
import type { Pagination } from "./types/pagination.js";
1819
import type { PayeeRequest } from "./types/payee.js";
1920

2021
// Response body
21-
export type Form1099Int = Form1099 & Form1099IntRequest;
22+
export type Form1099Int = Form1099 &
23+
Form1099Response & {
24+
formFields: Form1099IntFormFields;
25+
};
2226

2327
// Request body
2428
export type Form1099IntRequest = Form1099Request & {

src/resources/1099-k.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ import type {
1212
StateTaxInfo,
1313
Form1099,
1414
Form1099Request,
15+
Form1099Response,
1516
Form1099Status,
1617
} from "./types/1099.js";
1718
import type { Pagination } from "./types/pagination.js";
1819
import type { PayeeRequest } from "./types/payee.js";
1920

2021
// Response body
21-
export type Form1099K = Form1099 & Form1099KRequest;
22+
export type Form1099K = Form1099 &
23+
Form1099Response & {
24+
formFields: Form1099KFormFields;
25+
};
2226

2327
// Request body
2428
// eslint-disable-next-line @typescript-eslint/naming-convention

src/resources/1099-nec.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,19 @@ import type {
1212
StateTaxInfoWithStateIncome,
1313
Form1099,
1414
Form1099Request,
15+
Form1099Response,
1516
Form1099Status,
1617
} from "./types/1099.js";
1718
import type { Pagination } from "./types/pagination.js";
1819
import type { PayeeRequest } from "./types/payee.js";
1920

2021
// Response body
21-
export type Form1099Nec = Form1099 & Form1099NecRequest;
22+
export type Form1099Nec = Form1099 &
23+
Form1099Response & {
24+
formFields: Form1099NecFormFields;
25+
};
2226

23-
// Response body
27+
// Request body
2428
export type Form1099NecRequest = Form1099Request & {
2529
formFields: Form1099NecFormFields;
2630
};

src/resources/types/1099.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { PayeeRequest } from "./payee.js";
2-
import type { PayerRequest } from "./payer.js";
1+
import type { Payee, PayeeRequest } from "./payee.js";
2+
import type { Payer, PayerRequest } from "./payer.js";
33

44
export type StateTaxInfo = {
55
filingState: string;
@@ -29,6 +29,13 @@ export type Form1099 = {
2929
voidedFromId?: string;
3030
};
3131

32+
export type Form1099Response = {
33+
filingYear: number;
34+
payer: Payer;
35+
payee: Payee;
36+
userId?: string;
37+
};
38+
3239
// Request body
3340
export type Form1099Request = {
3441
filingYear: number;

src/resources/w-9.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
import type { AboundContext } from "../abound.js";
22
import { get, list, post } from "./base/base-resource.js";
33
import type { Pagination } from "./types/pagination.js";
4-
import type { PayeeRequest } from "./types/payee.js";
5-
import type { PayerRequest } from "./types/payer.js";
4+
import type { Payee, PayeeRequest } from "./types/payee.js";
5+
import type { Payer, PayerRequest } from "./types/payer.js";
66

77
// Response body
88
export type FormW9 = {
99
id: string;
1010
createdAt: string;
1111
url: string;
12-
} & FormW9Request;
12+
payee: Payee;
13+
payer?: Payer;
14+
formFields: FormW9FormFields;
15+
userId?: string;
16+
};
1317

1418
// Request body
1519
export type FormW9Request = {

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// Generated by genversion.
2-
export const version = "5.1.4";
2+
export const version = "5.1.5";

0 commit comments

Comments
 (0)