@apideck/unify 0.36.1 → 0.36.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/_speakeasy/.github/action-inputs-config.json +53 -0
- package/_speakeasy/.github/action-security-config.json +88 -0
- package/examples/package-lock.json +2 -2
- package/funcs/fileStorageSharedLinksList.d.ts +2 -2
- package/funcs/fileStorageSharedLinksList.js +2 -2
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/lib/sdks.js +2 -2
- package/lib/sdks.js.map +1 -1
- package/models/components/accountingdepartment.d.ts +13 -0
- package/models/components/accountingdepartment.d.ts.map +1 -1
- package/models/components/accountingdepartment.js +6 -0
- package/models/components/accountingdepartment.js.map +1 -1
- package/models/components/accountinglocation.d.ts +13 -0
- package/models/components/accountinglocation.d.ts.map +1 -1
- package/models/components/accountinglocation.js +6 -0
- package/models/components/accountinglocation.js.map +1 -1
- package/models/components/agedcreditors.d.ts +2 -2
- package/models/components/agedcreditors.d.ts.map +1 -1
- package/models/components/ageddebtors.d.ts +2 -2
- package/models/components/ageddebtors.d.ts.map +1 -1
- package/models/components/bill.d.ts +9 -0
- package/models/components/bill.d.ts.map +1 -1
- package/models/components/bill.js +4 -0
- package/models/components/bill.js.map +1 -1
- package/models/components/creditnote.d.ts +10 -0
- package/models/components/creditnote.d.ts.map +1 -1
- package/models/components/creditnote.js +5 -0
- package/models/components/creditnote.js.map +1 -1
- package/models/components/expense.d.ts +35 -13
- package/models/components/expense.d.ts.map +1 -1
- package/models/components/expense.js +20 -12
- package/models/components/expense.js.map +1 -1
- package/models/components/expenselineitem.d.ts +12 -11
- package/models/components/expenselineitem.d.ts.map +1 -1
- package/models/components/expenselineitem.js +6 -3
- package/models/components/expenselineitem.js.map +1 -1
- package/models/components/expenselineiteminput.d.ts +15 -13
- package/models/components/expenselineiteminput.d.ts.map +1 -1
- package/models/components/expenselineiteminput.js +6 -3
- package/models/components/expenselineiteminput.js.map +1 -1
- package/models/components/formfield.d.ts +1 -1
- package/models/components/formfield.d.ts.map +1 -1
- package/models/components/index.d.ts +5 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -1
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +9 -0
- package/models/components/invoice.d.ts.map +1 -1
- package/models/components/invoice.js +4 -0
- package/models/components/invoice.js.map +1 -1
- package/models/components/ledgeraccountsfilter.d.ts +5 -0
- package/models/components/ledgeraccountsfilter.d.ts.map +1 -1
- package/models/components/ledgeraccountsfilter.js +1 -0
- package/models/components/ledgeraccountsfilter.js.map +1 -1
- package/models/components/linkeddepartment.d.ts +25 -0
- package/models/components/linkeddepartment.d.ts.map +1 -0
- package/models/components/{linkedbankaccount.js → linkeddepartment.js} +10 -26
- package/models/components/linkeddepartment.js.map +1 -0
- package/models/components/linkeddepartmentinput.d.ts +20 -0
- package/models/components/linkeddepartmentinput.d.ts.map +1 -0
- package/models/components/linkeddepartmentinput.js +55 -0
- package/models/components/linkeddepartmentinput.js.map +1 -0
- package/models/components/linkedfinancialaccount.d.ts +92 -0
- package/models/components/linkedfinancialaccount.d.ts.map +1 -0
- package/models/components/linkedfinancialaccount.js +91 -0
- package/models/components/linkedfinancialaccount.js.map +1 -0
- package/models/components/linkedlocation.d.ts +25 -0
- package/models/components/linkedlocation.d.ts.map +1 -0
- package/models/components/linkedlocation.js +59 -0
- package/models/components/linkedlocation.js.map +1 -0
- package/models/components/linkedlocationinput.d.ts +25 -0
- package/models/components/linkedlocationinput.d.ts.map +1 -0
- package/models/components/linkedlocationinput.js +56 -0
- package/models/components/linkedlocationinput.js.map +1 -0
- package/models/components/linkedtrackingcategory.d.ts +5 -0
- package/models/components/linkedtrackingcategory.d.ts.map +1 -1
- package/models/components/linkedtrackingcategory.js +2 -0
- package/models/components/linkedtrackingcategory.js.map +1 -1
- package/models/components/paymentsfilter.d.ts +5 -0
- package/models/components/paymentsfilter.d.ts.map +1 -1
- package/models/components/paymentsfilter.js +2 -0
- package/models/components/paymentsfilter.js.map +1 -1
- package/models/components/project.d.ts +1 -1
- package/models/components/project.d.ts.map +1 -1
- package/models/components/purchaseorder.d.ts +9 -0
- package/models/components/purchaseorder.d.ts.map +1 -1
- package/models/components/purchaseorder.js +4 -0
- package/models/components/purchaseorder.js.map +1 -1
- package/models/components/subsidiary.d.ts +4 -0
- package/models/components/subsidiary.d.ts.map +1 -1
- package/models/components/subsidiary.js +2 -0
- package/models/components/subsidiary.js.map +1 -1
- package/package.json +2 -2
- package/sdk/sharedlinks.d.ts +2 -2
- package/sdk/sharedlinks.js +2 -2
- package/src/__tests__/expenses.test.ts +0 -28
- package/src/funcs/fileStorageSharedLinksList.ts +2 -2
- package/src/lib/config.ts +4 -4
- package/src/lib/sdks.ts +2 -2
- package/src/models/components/accountingdepartment.ts +19 -0
- package/src/models/components/accountinglocation.ts +19 -0
- package/src/models/components/agedcreditors.ts +2 -2
- package/src/models/components/ageddebtors.ts +2 -2
- package/src/models/components/bill.ts +13 -0
- package/src/models/components/creditnote.ts +14 -0
- package/src/models/components/expense.ts +79 -31
- package/src/models/components/expenselineitem.ts +24 -14
- package/src/models/components/expenselineiteminput.ts +30 -16
- package/src/models/components/formfield.ts +1 -1
- package/src/models/components/index.ts +5 -1
- package/src/models/components/invoice.ts +13 -0
- package/src/models/components/ledgeraccountsfilter.ts +6 -0
- package/src/models/components/linkeddepartment.ts +55 -0
- package/src/models/components/linkeddepartmentinput.ts +45 -0
- package/src/models/components/linkedfinancialaccount.ts +161 -0
- package/src/models/components/linkedlocation.ts +55 -0
- package/src/models/components/linkedlocationinput.ts +51 -0
- package/src/models/components/linkedtrackingcategory.ts +7 -0
- package/src/models/components/paymentsfilter.ts +7 -0
- package/src/models/components/project.ts +1 -1
- package/src/models/components/purchaseorder.ts +13 -0
- package/src/models/components/subsidiary.ts +6 -0
- package/src/sdk/sharedlinks.ts +2 -2
- package/models/components/linkedbankaccount.d.ts +0 -35
- package/models/components/linkedbankaccount.d.ts.map +0 -1
- package/models/components/linkedbankaccount.js.map +0 -1
- package/src/models/components/linkedbankaccount.ts +0 -86
|
@@ -8,6 +8,14 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
import { LineItemType, LineItemType$inboundSchema } from "./lineitemtype.js";
|
|
11
|
+
import {
|
|
12
|
+
LinkedCustomer,
|
|
13
|
+
LinkedCustomer$inboundSchema,
|
|
14
|
+
} from "./linkedcustomer.js";
|
|
15
|
+
import {
|
|
16
|
+
LinkedDepartment,
|
|
17
|
+
LinkedDepartment$inboundSchema,
|
|
18
|
+
} from "./linkeddepartment.js";
|
|
11
19
|
import {
|
|
12
20
|
LinkedInvoiceItem,
|
|
13
21
|
LinkedInvoiceItem$inboundSchema,
|
|
@@ -16,6 +24,10 @@ import {
|
|
|
16
24
|
LinkedLedgerAccount,
|
|
17
25
|
LinkedLedgerAccount$inboundSchema,
|
|
18
26
|
} from "./linkedledgeraccount.js";
|
|
27
|
+
import {
|
|
28
|
+
LinkedLocation,
|
|
29
|
+
LinkedLocation$inboundSchema,
|
|
30
|
+
} from "./linkedlocation.js";
|
|
19
31
|
import { LinkedTaxRate, LinkedTaxRate$inboundSchema } from "./linkedtaxrate.js";
|
|
20
32
|
import {
|
|
21
33
|
LinkedTrackingCategory,
|
|
@@ -40,21 +52,25 @@ export type ExpenseLineItem = {
|
|
|
40
52
|
accountId?: string | undefined;
|
|
41
53
|
account?: LinkedLedgerAccount | null | undefined;
|
|
42
54
|
/**
|
|
43
|
-
* The ID of the customer this expense item is linked to.
|
|
55
|
+
* The ID of the customer this expense item is linked to. Deprecated in favor of `customer`.
|
|
56
|
+
*
|
|
57
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
44
58
|
*/
|
|
45
59
|
customerId?: string | undefined;
|
|
60
|
+
/**
|
|
61
|
+
* The customer this entity is linked to.
|
|
62
|
+
*/
|
|
63
|
+
customer?: LinkedCustomer | null | undefined;
|
|
46
64
|
/**
|
|
47
65
|
* The ID of the department
|
|
48
66
|
*/
|
|
49
67
|
departmentId?: string | null | undefined;
|
|
68
|
+
department?: LinkedDepartment | null | undefined;
|
|
50
69
|
/**
|
|
51
70
|
* The ID of the location
|
|
52
71
|
*/
|
|
53
72
|
locationId?: string | null | undefined;
|
|
54
|
-
|
|
55
|
-
* The ID of the subsidiary
|
|
56
|
-
*/
|
|
57
|
-
subsidiaryId?: string | null | undefined;
|
|
73
|
+
location?: LinkedLocation | null | undefined;
|
|
58
74
|
taxRate?: LinkedTaxRate | undefined;
|
|
59
75
|
/**
|
|
60
76
|
* The expense line item description
|
|
@@ -75,12 +91,6 @@ export type ExpenseLineItem = {
|
|
|
75
91
|
quantity?: number | null | undefined;
|
|
76
92
|
unitPrice?: number | null | undefined;
|
|
77
93
|
item?: LinkedInvoiceItem | undefined;
|
|
78
|
-
/**
|
|
79
|
-
* Boolean that indicates if the line item is billable or not.
|
|
80
|
-
*
|
|
81
|
-
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
82
|
-
*/
|
|
83
|
-
billable?: boolean | undefined;
|
|
84
94
|
/**
|
|
85
95
|
* Line number of the resource
|
|
86
96
|
*/
|
|
@@ -104,9 +114,11 @@ export const ExpenseLineItem$inboundSchema: z.ZodType<
|
|
|
104
114
|
account_id: z.string().optional(),
|
|
105
115
|
account: z.nullable(LinkedLedgerAccount$inboundSchema).optional(),
|
|
106
116
|
customer_id: z.string().optional(),
|
|
117
|
+
customer: z.nullable(LinkedCustomer$inboundSchema).optional(),
|
|
107
118
|
department_id: z.nullable(z.string()).optional(),
|
|
119
|
+
department: z.nullable(LinkedDepartment$inboundSchema).optional(),
|
|
108
120
|
location_id: z.nullable(z.string()).optional(),
|
|
109
|
-
|
|
121
|
+
location: z.nullable(LinkedLocation$inboundSchema).optional(),
|
|
110
122
|
tax_rate: LinkedTaxRate$inboundSchema.optional(),
|
|
111
123
|
description: z.nullable(z.string()).optional(),
|
|
112
124
|
type: z.nullable(LineItemType$inboundSchema).optional(),
|
|
@@ -115,7 +127,6 @@ export const ExpenseLineItem$inboundSchema: z.ZodType<
|
|
|
115
127
|
quantity: z.nullable(z.number()).optional(),
|
|
116
128
|
unit_price: z.nullable(z.number()).optional(),
|
|
117
129
|
item: LinkedInvoiceItem$inboundSchema.optional(),
|
|
118
|
-
billable: z.boolean().optional(),
|
|
119
130
|
line_number: z.nullable(z.number().int()).optional(),
|
|
120
131
|
rebilling: z.nullable(Rebilling$inboundSchema).optional(),
|
|
121
132
|
}).transform((v) => {
|
|
@@ -125,7 +136,6 @@ export const ExpenseLineItem$inboundSchema: z.ZodType<
|
|
|
125
136
|
"customer_id": "customerId",
|
|
126
137
|
"department_id": "departmentId",
|
|
127
138
|
"location_id": "locationId",
|
|
128
|
-
"subsidiary_id": "subsidiaryId",
|
|
129
139
|
"tax_rate": "taxRate",
|
|
130
140
|
"total_amount": "totalAmount",
|
|
131
141
|
"tax_amount": "taxAmount",
|
|
@@ -5,6 +5,16 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { LineItemType, LineItemType$outboundSchema } from "./lineitemtype.js";
|
|
8
|
+
import {
|
|
9
|
+
LinkedCustomerInput,
|
|
10
|
+
LinkedCustomerInput$Outbound,
|
|
11
|
+
LinkedCustomerInput$outboundSchema,
|
|
12
|
+
} from "./linkedcustomerinput.js";
|
|
13
|
+
import {
|
|
14
|
+
LinkedDepartmentInput,
|
|
15
|
+
LinkedDepartmentInput$Outbound,
|
|
16
|
+
LinkedDepartmentInput$outboundSchema,
|
|
17
|
+
} from "./linkeddepartmentinput.js";
|
|
8
18
|
import {
|
|
9
19
|
LinkedInvoiceItem,
|
|
10
20
|
LinkedInvoiceItem$Outbound,
|
|
@@ -15,6 +25,11 @@ import {
|
|
|
15
25
|
LinkedLedgerAccount$Outbound,
|
|
16
26
|
LinkedLedgerAccount$outboundSchema,
|
|
17
27
|
} from "./linkedledgeraccount.js";
|
|
28
|
+
import {
|
|
29
|
+
LinkedLocationInput,
|
|
30
|
+
LinkedLocationInput$Outbound,
|
|
31
|
+
LinkedLocationInput$outboundSchema,
|
|
32
|
+
} from "./linkedlocationinput.js";
|
|
18
33
|
import {
|
|
19
34
|
LinkedTaxRateInput,
|
|
20
35
|
LinkedTaxRateInput$Outbound,
|
|
@@ -44,21 +59,25 @@ export type ExpenseLineItemInput = {
|
|
|
44
59
|
accountId?: string | undefined;
|
|
45
60
|
account?: LinkedLedgerAccount | null | undefined;
|
|
46
61
|
/**
|
|
47
|
-
* The ID of the customer this expense item is linked to.
|
|
62
|
+
* The ID of the customer this expense item is linked to. Deprecated in favor of `customer`.
|
|
63
|
+
*
|
|
64
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
48
65
|
*/
|
|
49
66
|
customerId?: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* The customer this entity is linked to.
|
|
69
|
+
*/
|
|
70
|
+
customer?: LinkedCustomerInput | null | undefined;
|
|
50
71
|
/**
|
|
51
72
|
* The ID of the department
|
|
52
73
|
*/
|
|
53
74
|
departmentId?: string | null | undefined;
|
|
75
|
+
department?: LinkedDepartmentInput | null | undefined;
|
|
54
76
|
/**
|
|
55
77
|
* The ID of the location
|
|
56
78
|
*/
|
|
57
79
|
locationId?: string | null | undefined;
|
|
58
|
-
|
|
59
|
-
* The ID of the subsidiary
|
|
60
|
-
*/
|
|
61
|
-
subsidiaryId?: string | null | undefined;
|
|
80
|
+
location?: LinkedLocationInput | null | undefined;
|
|
62
81
|
taxRate?: LinkedTaxRateInput | undefined;
|
|
63
82
|
/**
|
|
64
83
|
* The expense line item description
|
|
@@ -79,12 +98,6 @@ export type ExpenseLineItemInput = {
|
|
|
79
98
|
quantity?: number | null | undefined;
|
|
80
99
|
unitPrice?: number | null | undefined;
|
|
81
100
|
item?: LinkedInvoiceItem | undefined;
|
|
82
|
-
/**
|
|
83
|
-
* Boolean that indicates if the line item is billable or not.
|
|
84
|
-
*
|
|
85
|
-
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
86
|
-
*/
|
|
87
|
-
billable?: boolean | undefined;
|
|
88
101
|
/**
|
|
89
102
|
* Line number of the resource
|
|
90
103
|
*/
|
|
@@ -104,9 +117,11 @@ export type ExpenseLineItemInput$Outbound = {
|
|
|
104
117
|
account_id?: string | undefined;
|
|
105
118
|
account?: LinkedLedgerAccount$Outbound | null | undefined;
|
|
106
119
|
customer_id?: string | undefined;
|
|
120
|
+
customer?: LinkedCustomerInput$Outbound | null | undefined;
|
|
107
121
|
department_id?: string | null | undefined;
|
|
122
|
+
department?: LinkedDepartmentInput$Outbound | null | undefined;
|
|
108
123
|
location_id?: string | null | undefined;
|
|
109
|
-
|
|
124
|
+
location?: LinkedLocationInput$Outbound | null | undefined;
|
|
110
125
|
tax_rate?: LinkedTaxRateInput$Outbound | undefined;
|
|
111
126
|
description?: string | null | undefined;
|
|
112
127
|
type?: string | null | undefined;
|
|
@@ -115,7 +130,6 @@ export type ExpenseLineItemInput$Outbound = {
|
|
|
115
130
|
quantity?: number | null | undefined;
|
|
116
131
|
unit_price?: number | null | undefined;
|
|
117
132
|
item?: LinkedInvoiceItem$Outbound | undefined;
|
|
118
|
-
billable?: boolean | undefined;
|
|
119
133
|
line_number?: number | null | undefined;
|
|
120
134
|
rebilling?: Rebilling$Outbound | null | undefined;
|
|
121
135
|
};
|
|
@@ -132,9 +146,11 @@ export const ExpenseLineItemInput$outboundSchema: z.ZodType<
|
|
|
132
146
|
accountId: z.string().optional(),
|
|
133
147
|
account: z.nullable(LinkedLedgerAccount$outboundSchema).optional(),
|
|
134
148
|
customerId: z.string().optional(),
|
|
149
|
+
customer: z.nullable(LinkedCustomerInput$outboundSchema).optional(),
|
|
135
150
|
departmentId: z.nullable(z.string()).optional(),
|
|
151
|
+
department: z.nullable(LinkedDepartmentInput$outboundSchema).optional(),
|
|
136
152
|
locationId: z.nullable(z.string()).optional(),
|
|
137
|
-
|
|
153
|
+
location: z.nullable(LinkedLocationInput$outboundSchema).optional(),
|
|
138
154
|
taxRate: LinkedTaxRateInput$outboundSchema.optional(),
|
|
139
155
|
description: z.nullable(z.string()).optional(),
|
|
140
156
|
type: z.nullable(LineItemType$outboundSchema).optional(),
|
|
@@ -143,7 +159,6 @@ export const ExpenseLineItemInput$outboundSchema: z.ZodType<
|
|
|
143
159
|
quantity: z.nullable(z.number()).optional(),
|
|
144
160
|
unitPrice: z.nullable(z.number()).optional(),
|
|
145
161
|
item: LinkedInvoiceItem$outboundSchema.optional(),
|
|
146
|
-
billable: z.boolean().optional(),
|
|
147
162
|
lineNumber: z.nullable(z.number().int()).optional(),
|
|
148
163
|
rebilling: z.nullable(Rebilling$outboundSchema).optional(),
|
|
149
164
|
}).transform((v) => {
|
|
@@ -153,7 +168,6 @@ export const ExpenseLineItemInput$outboundSchema: z.ZodType<
|
|
|
153
168
|
customerId: "customer_id",
|
|
154
169
|
departmentId: "department_id",
|
|
155
170
|
locationId: "location_id",
|
|
156
|
-
subsidiaryId: "subsidiary_id",
|
|
157
171
|
taxRate: "tax_rate",
|
|
158
172
|
totalAmount: "total_amount",
|
|
159
173
|
taxAmount: "tax_amount",
|
|
@@ -57,7 +57,7 @@ export type FormField = {
|
|
|
57
57
|
/**
|
|
58
58
|
* Only applicable to select fields. Allow the user to add a custom value though the option select if the desired value is not in the option select list.
|
|
59
59
|
*/
|
|
60
|
-
allowCustomValues
|
|
60
|
+
allowCustomValues: boolean;
|
|
61
61
|
/**
|
|
62
62
|
* Indicates if the form field is displayed in a “read-only” mode.
|
|
63
63
|
*/
|
|
@@ -421,15 +421,19 @@ export * from "./ledgeraccountsfilter.js";
|
|
|
421
421
|
export * from "./ledgeraccountssort.js";
|
|
422
422
|
export * from "./lineitemtype.js";
|
|
423
423
|
export * from "./linkedattachment.js";
|
|
424
|
-
export * from "./linkedbankaccount.js";
|
|
425
424
|
export * from "./linkedconnectorresource.js";
|
|
426
425
|
export * from "./linkedcustomer.js";
|
|
427
426
|
export * from "./linkedcustomerinput.js";
|
|
427
|
+
export * from "./linkeddepartment.js";
|
|
428
|
+
export * from "./linkeddepartmentinput.js";
|
|
428
429
|
export * from "./linkedecommercecustomer.js";
|
|
429
430
|
export * from "./linkedecommerceorder.js";
|
|
431
|
+
export * from "./linkedfinancialaccount.js";
|
|
430
432
|
export * from "./linkedfolder.js";
|
|
431
433
|
export * from "./linkedinvoiceitem.js";
|
|
432
434
|
export * from "./linkedledgeraccount.js";
|
|
435
|
+
export * from "./linkedlocation.js";
|
|
436
|
+
export * from "./linkedlocationinput.js";
|
|
433
437
|
export * from "./linkedparentcustomer.js";
|
|
434
438
|
export * from "./linkedpurchaseorder.js";
|
|
435
439
|
export * from "./linkedsupplier.js";
|
|
@@ -153,6 +153,10 @@ export type Invoice = {
|
|
|
153
153
|
* The company ID the transaction belongs to
|
|
154
154
|
*/
|
|
155
155
|
companyId?: string | null | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* The ID of the location
|
|
158
|
+
*/
|
|
159
|
+
locationId?: string | null | undefined;
|
|
156
160
|
/**
|
|
157
161
|
* The ID of the department
|
|
158
162
|
*/
|
|
@@ -326,6 +330,10 @@ export type InvoiceInput = {
|
|
|
326
330
|
* The company ID the transaction belongs to
|
|
327
331
|
*/
|
|
328
332
|
companyId?: string | null | undefined;
|
|
333
|
+
/**
|
|
334
|
+
* The ID of the location
|
|
335
|
+
*/
|
|
336
|
+
locationId?: string | null | undefined;
|
|
329
337
|
/**
|
|
330
338
|
* The ID of the department
|
|
331
339
|
*/
|
|
@@ -539,6 +547,7 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
539
547
|
number: z.nullable(z.string()).optional(),
|
|
540
548
|
customer: z.nullable(LinkedCustomer$inboundSchema).optional(),
|
|
541
549
|
company_id: z.nullable(z.string()).optional(),
|
|
550
|
+
location_id: z.nullable(z.string()).optional(),
|
|
542
551
|
department_id: z.nullable(z.string()).optional(),
|
|
543
552
|
invoice_date: z.nullable(z.string().transform(v => new RFCDate(v)))
|
|
544
553
|
.optional(),
|
|
@@ -597,6 +606,7 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
597
606
|
"downstream_id": "downstreamId",
|
|
598
607
|
"display_id": "displayId",
|
|
599
608
|
"company_id": "companyId",
|
|
609
|
+
"location_id": "locationId",
|
|
600
610
|
"department_id": "departmentId",
|
|
601
611
|
"invoice_date": "invoiceDate",
|
|
602
612
|
"due_date": "dueDate",
|
|
@@ -650,6 +660,7 @@ export type InvoiceInput$Outbound = {
|
|
|
650
660
|
number?: string | null | undefined;
|
|
651
661
|
customer?: LinkedCustomerInput$Outbound | null | undefined;
|
|
652
662
|
company_id?: string | null | undefined;
|
|
663
|
+
location_id?: string | null | undefined;
|
|
653
664
|
department_id?: string | null | undefined;
|
|
654
665
|
invoice_date?: string | null | undefined;
|
|
655
666
|
due_date?: string | null | undefined;
|
|
@@ -706,6 +717,7 @@ export const InvoiceInput$outboundSchema: z.ZodType<
|
|
|
706
717
|
number: z.nullable(z.string()).optional(),
|
|
707
718
|
customer: z.nullable(LinkedCustomerInput$outboundSchema).optional(),
|
|
708
719
|
companyId: z.nullable(z.string()).optional(),
|
|
720
|
+
locationId: z.nullable(z.string()).optional(),
|
|
709
721
|
departmentId: z.nullable(z.string()).optional(),
|
|
710
722
|
invoiceDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
|
|
711
723
|
.optional(),
|
|
@@ -754,6 +766,7 @@ export const InvoiceInput$outboundSchema: z.ZodType<
|
|
|
754
766
|
return remap$(v, {
|
|
755
767
|
displayId: "display_id",
|
|
756
768
|
companyId: "company_id",
|
|
769
|
+
locationId: "location_id",
|
|
757
770
|
departmentId: "department_id",
|
|
758
771
|
invoiceDate: "invoice_date",
|
|
759
772
|
dueDate: "due_date",
|
|
@@ -27,6 +27,10 @@ export const Classification = {
|
|
|
27
27
|
export type Classification = ClosedEnum<typeof Classification>;
|
|
28
28
|
|
|
29
29
|
export type LedgerAccountsFilter = {
|
|
30
|
+
/**
|
|
31
|
+
* Filter by ledger account name
|
|
32
|
+
*/
|
|
33
|
+
name?: string | undefined;
|
|
30
34
|
updatedSince?: Date | undefined;
|
|
31
35
|
/**
|
|
32
36
|
* Filter by account classification.
|
|
@@ -41,6 +45,7 @@ export const Classification$outboundSchema: z.ZodNativeEnum<
|
|
|
41
45
|
|
|
42
46
|
/** @internal */
|
|
43
47
|
export type LedgerAccountsFilter$Outbound = {
|
|
48
|
+
name?: string | undefined;
|
|
44
49
|
updated_since?: string | undefined;
|
|
45
50
|
classification?: string | undefined;
|
|
46
51
|
};
|
|
@@ -51,6 +56,7 @@ export const LedgerAccountsFilter$outboundSchema: z.ZodType<
|
|
|
51
56
|
z.ZodTypeDef,
|
|
52
57
|
LedgerAccountsFilter
|
|
53
58
|
> = z.object({
|
|
59
|
+
name: z.string().optional(),
|
|
54
60
|
updatedSince: z.date().transform(v => v.toISOString()).optional(),
|
|
55
61
|
classification: Classification$outboundSchema.optional(),
|
|
56
62
|
}).transform((v) => {
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type LinkedDepartment = {
|
|
12
|
+
/**
|
|
13
|
+
* A unique identifier for an object.
|
|
14
|
+
*/
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Id to be displayed.
|
|
18
|
+
*/
|
|
19
|
+
displayId?: string | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The name of the resource.
|
|
22
|
+
*/
|
|
23
|
+
name?: string | null | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The third-party API ID of original entity
|
|
26
|
+
*/
|
|
27
|
+
downstreamId?: string | null | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const LinkedDepartment$inboundSchema: z.ZodType<
|
|
32
|
+
LinkedDepartment,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
id: z.string().optional(),
|
|
37
|
+
display_id: z.nullable(z.string()).optional(),
|
|
38
|
+
name: z.nullable(z.string()).optional(),
|
|
39
|
+
downstream_id: z.nullable(z.string()).optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"display_id": "displayId",
|
|
43
|
+
"downstream_id": "downstreamId",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function linkedDepartmentFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<LinkedDepartment, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => LinkedDepartment$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'LinkedDepartment' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type LinkedDepartmentInput = {
|
|
9
|
+
/**
|
|
10
|
+
* Id to be displayed.
|
|
11
|
+
*/
|
|
12
|
+
displayId?: string | null | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The name of the resource.
|
|
15
|
+
*/
|
|
16
|
+
name?: string | null | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type LinkedDepartmentInput$Outbound = {
|
|
21
|
+
display_id?: string | null | undefined;
|
|
22
|
+
name?: string | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const LinkedDepartmentInput$outboundSchema: z.ZodType<
|
|
27
|
+
LinkedDepartmentInput$Outbound,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
LinkedDepartmentInput
|
|
30
|
+
> = z.object({
|
|
31
|
+
displayId: z.nullable(z.string()).optional(),
|
|
32
|
+
name: z.nullable(z.string()).optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
displayId: "display_id",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function linkedDepartmentInputToJSON(
|
|
40
|
+
linkedDepartmentInput: LinkedDepartmentInput,
|
|
41
|
+
): string {
|
|
42
|
+
return JSON.stringify(
|
|
43
|
+
LinkedDepartmentInput$outboundSchema.parse(linkedDepartmentInput),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The type of account being referenced. Use `ledger_account` for GL accounts from the chart of accounts, or `bank_account` for bank account entities. When not specified, the connector will use its default behavior.
|
|
14
|
+
*/
|
|
15
|
+
export const LinkedFinancialAccountAccountType = {
|
|
16
|
+
LedgerAccount: "ledger_account",
|
|
17
|
+
BankAccount: "bank_account",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* The type of account being referenced. Use `ledger_account` for GL accounts from the chart of accounts, or `bank_account` for bank account entities. When not specified, the connector will use its default behavior.
|
|
21
|
+
*/
|
|
22
|
+
export type LinkedFinancialAccountAccountType = ClosedEnum<
|
|
23
|
+
typeof LinkedFinancialAccountAccountType
|
|
24
|
+
>;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* A flexible account reference that can represent either a ledger account (GL account) or a bank account, depending on the connector's requirements.
|
|
28
|
+
*/
|
|
29
|
+
export type LinkedFinancialAccount = {
|
|
30
|
+
/**
|
|
31
|
+
* The unique identifier for the account. This can be a ledger account ID or bank account ID depending on the `type` field.
|
|
32
|
+
*/
|
|
33
|
+
id?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* The type of account being referenced. Use `ledger_account` for GL accounts from the chart of accounts, or `bank_account` for bank account entities. When not specified, the connector will use its default behavior.
|
|
36
|
+
*/
|
|
37
|
+
type?: LinkedFinancialAccountAccountType | null | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* The account code of the account
|
|
40
|
+
*/
|
|
41
|
+
code?: string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Id to be displayed.
|
|
44
|
+
*/
|
|
45
|
+
displayId?: string | null | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* The bank account number
|
|
48
|
+
*/
|
|
49
|
+
accountNumber?: string | null | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* The name of the account.
|
|
52
|
+
*/
|
|
53
|
+
name?: string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* The third-party API ID of original entity
|
|
56
|
+
*/
|
|
57
|
+
downstreamId?: string | null | undefined;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* A flexible account reference that can represent either a ledger account (GL account) or a bank account, depending on the connector's requirements.
|
|
62
|
+
*/
|
|
63
|
+
export type LinkedFinancialAccountInput = {
|
|
64
|
+
/**
|
|
65
|
+
* The unique identifier for the account. This can be a ledger account ID or bank account ID depending on the `type` field.
|
|
66
|
+
*/
|
|
67
|
+
id?: string | undefined;
|
|
68
|
+
/**
|
|
69
|
+
* The type of account being referenced. Use `ledger_account` for GL accounts from the chart of accounts, or `bank_account` for bank account entities. When not specified, the connector will use its default behavior.
|
|
70
|
+
*/
|
|
71
|
+
type?: LinkedFinancialAccountAccountType | null | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The account code of the account
|
|
74
|
+
*/
|
|
75
|
+
code?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Id to be displayed.
|
|
78
|
+
*/
|
|
79
|
+
displayId?: string | null | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* The bank account number
|
|
82
|
+
*/
|
|
83
|
+
accountNumber?: string | null | undefined;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const LinkedFinancialAccountAccountType$inboundSchema: z.ZodNativeEnum<
|
|
88
|
+
typeof LinkedFinancialAccountAccountType
|
|
89
|
+
> = z.nativeEnum(LinkedFinancialAccountAccountType);
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const LinkedFinancialAccountAccountType$outboundSchema: z.ZodNativeEnum<
|
|
92
|
+
typeof LinkedFinancialAccountAccountType
|
|
93
|
+
> = LinkedFinancialAccountAccountType$inboundSchema;
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const LinkedFinancialAccount$inboundSchema: z.ZodType<
|
|
97
|
+
LinkedFinancialAccount,
|
|
98
|
+
z.ZodTypeDef,
|
|
99
|
+
unknown
|
|
100
|
+
> = z.object({
|
|
101
|
+
id: z.string().optional(),
|
|
102
|
+
type: z.nullable(LinkedFinancialAccountAccountType$inboundSchema).optional(),
|
|
103
|
+
code: z.string().optional(),
|
|
104
|
+
display_id: z.nullable(z.string()).optional(),
|
|
105
|
+
account_number: z.nullable(z.string()).optional(),
|
|
106
|
+
name: z.string().optional(),
|
|
107
|
+
downstream_id: z.nullable(z.string()).optional(),
|
|
108
|
+
}).transform((v) => {
|
|
109
|
+
return remap$(v, {
|
|
110
|
+
"display_id": "displayId",
|
|
111
|
+
"account_number": "accountNumber",
|
|
112
|
+
"downstream_id": "downstreamId",
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
export function linkedFinancialAccountFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<LinkedFinancialAccount, SDKValidationError> {
|
|
119
|
+
return safeParse(
|
|
120
|
+
jsonString,
|
|
121
|
+
(x) => LinkedFinancialAccount$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
+
`Failed to parse 'LinkedFinancialAccount' from JSON`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export type LinkedFinancialAccountInput$Outbound = {
|
|
128
|
+
id?: string | undefined;
|
|
129
|
+
type?: string | null | undefined;
|
|
130
|
+
code?: string | undefined;
|
|
131
|
+
display_id?: string | null | undefined;
|
|
132
|
+
account_number?: string | null | undefined;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
/** @internal */
|
|
136
|
+
export const LinkedFinancialAccountInput$outboundSchema: z.ZodType<
|
|
137
|
+
LinkedFinancialAccountInput$Outbound,
|
|
138
|
+
z.ZodTypeDef,
|
|
139
|
+
LinkedFinancialAccountInput
|
|
140
|
+
> = z.object({
|
|
141
|
+
id: z.string().optional(),
|
|
142
|
+
type: z.nullable(LinkedFinancialAccountAccountType$outboundSchema).optional(),
|
|
143
|
+
code: z.string().optional(),
|
|
144
|
+
displayId: z.nullable(z.string()).optional(),
|
|
145
|
+
accountNumber: z.nullable(z.string()).optional(),
|
|
146
|
+
}).transform((v) => {
|
|
147
|
+
return remap$(v, {
|
|
148
|
+
displayId: "display_id",
|
|
149
|
+
accountNumber: "account_number",
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
export function linkedFinancialAccountInputToJSON(
|
|
154
|
+
linkedFinancialAccountInput: LinkedFinancialAccountInput,
|
|
155
|
+
): string {
|
|
156
|
+
return JSON.stringify(
|
|
157
|
+
LinkedFinancialAccountInput$outboundSchema.parse(
|
|
158
|
+
linkedFinancialAccountInput,
|
|
159
|
+
),
|
|
160
|
+
);
|
|
161
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type LinkedLocation = {
|
|
12
|
+
/**
|
|
13
|
+
* The unique identifier for the location.
|
|
14
|
+
*/
|
|
15
|
+
id?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Id to be displayed.
|
|
18
|
+
*/
|
|
19
|
+
displayId?: string | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The name of the location.
|
|
22
|
+
*/
|
|
23
|
+
name?: string | null | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The third-party API ID of original entity
|
|
26
|
+
*/
|
|
27
|
+
downstreamId?: string | null | undefined;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const LinkedLocation$inboundSchema: z.ZodType<
|
|
32
|
+
LinkedLocation,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
id: z.string().optional(),
|
|
37
|
+
display_id: z.nullable(z.string()).optional(),
|
|
38
|
+
name: z.nullable(z.string()).optional(),
|
|
39
|
+
downstream_id: z.nullable(z.string()).optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"display_id": "displayId",
|
|
43
|
+
"downstream_id": "downstreamId",
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export function linkedLocationFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<LinkedLocation, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => LinkedLocation$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'LinkedLocation' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|