@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
package/src/lib/config.ts
CHANGED
|
@@ -67,8 +67,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
67
67
|
|
|
68
68
|
export const SDK_METADATA = {
|
|
69
69
|
language: "typescript",
|
|
70
|
-
openapiDocVersion: "10.23.
|
|
71
|
-
sdkVersion: "0.36.
|
|
72
|
-
genVersion: "2.
|
|
73
|
-
userAgent: "speakeasy-sdk/typescript 0.36.
|
|
70
|
+
openapiDocVersion: "10.23.10",
|
|
71
|
+
sdkVersion: "0.36.2",
|
|
72
|
+
genVersion: "2.797.1",
|
|
73
|
+
userAgent: "speakeasy-sdk/typescript 0.36.2 2.797.1 10.23.10 @apideck/unify",
|
|
74
74
|
} as const;
|
package/src/lib/sdks.ts
CHANGED
|
@@ -308,9 +308,9 @@ export class ClientSDK {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
const jsonLikeContentTypeRE =
|
|
311
|
+
const jsonLikeContentTypeRE = /^(application|text)\/([^+]+\+)*json.*/;
|
|
312
312
|
const jsonlLikeContentTypeRE =
|
|
313
|
-
|
|
313
|
+
/^(application|text)\/([^+]+\+)*(jsonl|x-ndjson)\b.*/;
|
|
314
314
|
async function logRequest(logger: Logger | undefined, req: Request) {
|
|
315
315
|
if (!logger) {
|
|
316
316
|
return;
|
|
@@ -45,6 +45,10 @@ export type AccountingDepartment = {
|
|
|
45
45
|
* A unique identifier for an object.
|
|
46
46
|
*/
|
|
47
47
|
parentId?: string | null | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Id to be displayed.
|
|
50
|
+
*/
|
|
51
|
+
displayId?: string | null | undefined;
|
|
48
52
|
/**
|
|
49
53
|
* The name of the department.
|
|
50
54
|
*/
|
|
@@ -58,6 +62,10 @@ export type AccountingDepartment = {
|
|
|
58
62
|
* The code of the department.
|
|
59
63
|
*/
|
|
60
64
|
code?: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* The third-party API ID of original entity
|
|
67
|
+
*/
|
|
68
|
+
downstreamId?: string | null | undefined;
|
|
61
69
|
/**
|
|
62
70
|
* When custom mappings are configured on the resource, the result is included here.
|
|
63
71
|
*/
|
|
@@ -93,6 +101,10 @@ export type AccountingDepartmentInput = {
|
|
|
93
101
|
* A unique identifier for an object.
|
|
94
102
|
*/
|
|
95
103
|
parentId?: string | null | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Id to be displayed.
|
|
106
|
+
*/
|
|
107
|
+
displayId?: string | null | undefined;
|
|
96
108
|
/**
|
|
97
109
|
* The name of the department.
|
|
98
110
|
*/
|
|
@@ -133,10 +145,12 @@ export const AccountingDepartment$inboundSchema: z.ZodType<
|
|
|
133
145
|
> = z.object({
|
|
134
146
|
id: z.string().optional(),
|
|
135
147
|
parent_id: z.nullable(z.string()).optional(),
|
|
148
|
+
display_id: z.nullable(z.string()).optional(),
|
|
136
149
|
name: z.nullable(z.string()).optional(),
|
|
137
150
|
status: DepartmentStatus$inboundSchema.optional(),
|
|
138
151
|
subsidiaries: z.array(SubsidiaryReference$inboundSchema).optional(),
|
|
139
152
|
code: z.string().optional(),
|
|
153
|
+
downstream_id: z.nullable(z.string()).optional(),
|
|
140
154
|
custom_mappings: z.nullable(z.record(z.any())).optional(),
|
|
141
155
|
row_version: z.nullable(z.string()).optional(),
|
|
142
156
|
updated_by: z.nullable(z.string()).optional(),
|
|
@@ -151,6 +165,8 @@ export const AccountingDepartment$inboundSchema: z.ZodType<
|
|
|
151
165
|
}).transform((v) => {
|
|
152
166
|
return remap$(v, {
|
|
153
167
|
"parent_id": "parentId",
|
|
168
|
+
"display_id": "displayId",
|
|
169
|
+
"downstream_id": "downstreamId",
|
|
154
170
|
"custom_mappings": "customMappings",
|
|
155
171
|
"row_version": "rowVersion",
|
|
156
172
|
"updated_by": "updatedBy",
|
|
@@ -174,6 +190,7 @@ export function accountingDepartmentFromJSON(
|
|
|
174
190
|
/** @internal */
|
|
175
191
|
export type AccountingDepartmentInput$Outbound = {
|
|
176
192
|
parent_id?: string | null | undefined;
|
|
193
|
+
display_id?: string | null | undefined;
|
|
177
194
|
name?: string | null | undefined;
|
|
178
195
|
status?: string | undefined;
|
|
179
196
|
subsidiaries?: Array<SubsidiaryReferenceInput$Outbound> | undefined;
|
|
@@ -189,6 +206,7 @@ export const AccountingDepartmentInput$outboundSchema: z.ZodType<
|
|
|
189
206
|
AccountingDepartmentInput
|
|
190
207
|
> = z.object({
|
|
191
208
|
parentId: z.nullable(z.string()).optional(),
|
|
209
|
+
displayId: z.nullable(z.string()).optional(),
|
|
192
210
|
name: z.nullable(z.string()).optional(),
|
|
193
211
|
status: DepartmentStatus$outboundSchema.optional(),
|
|
194
212
|
subsidiaries: z.array(SubsidiaryReferenceInput$outboundSchema).optional(),
|
|
@@ -198,6 +216,7 @@ export const AccountingDepartmentInput$outboundSchema: z.ZodType<
|
|
|
198
216
|
}).transform((v) => {
|
|
199
217
|
return remap$(v, {
|
|
200
218
|
parentId: "parent_id",
|
|
219
|
+
displayId: "display_id",
|
|
201
220
|
rowVersion: "row_version",
|
|
202
221
|
passThrough: "pass_through",
|
|
203
222
|
});
|
|
@@ -51,6 +51,14 @@ export type AccountingLocation = {
|
|
|
51
51
|
* A unique identifier for an object.
|
|
52
52
|
*/
|
|
53
53
|
parentId?: string | null | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Id to be displayed.
|
|
56
|
+
*/
|
|
57
|
+
displayId?: string | null | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* The third-party API ID of original entity
|
|
60
|
+
*/
|
|
61
|
+
downstreamId?: string | null | undefined;
|
|
54
62
|
/**
|
|
55
63
|
* The name of the company.
|
|
56
64
|
*/
|
|
@@ -100,6 +108,10 @@ export type AccountingLocationInput = {
|
|
|
100
108
|
* A unique identifier for an object.
|
|
101
109
|
*/
|
|
102
110
|
parentId?: string | null | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Id to be displayed.
|
|
113
|
+
*/
|
|
114
|
+
displayId?: string | null | undefined;
|
|
103
115
|
/**
|
|
104
116
|
* The name of the company.
|
|
105
117
|
*/
|
|
@@ -141,6 +153,8 @@ export const AccountingLocation$inboundSchema: z.ZodType<
|
|
|
141
153
|
> = z.object({
|
|
142
154
|
id: z.string().optional(),
|
|
143
155
|
parent_id: z.nullable(z.string()).optional(),
|
|
156
|
+
display_id: z.nullable(z.string()).optional(),
|
|
157
|
+
downstream_id: z.nullable(z.string()).optional(),
|
|
144
158
|
company_name: z.nullable(z.string()).optional(),
|
|
145
159
|
display_name: z.nullable(z.string()).optional(),
|
|
146
160
|
status: LocationStatus$inboundSchema.optional(),
|
|
@@ -160,6 +174,8 @@ export const AccountingLocation$inboundSchema: z.ZodType<
|
|
|
160
174
|
}).transform((v) => {
|
|
161
175
|
return remap$(v, {
|
|
162
176
|
"parent_id": "parentId",
|
|
177
|
+
"display_id": "displayId",
|
|
178
|
+
"downstream_id": "downstreamId",
|
|
163
179
|
"company_name": "companyName",
|
|
164
180
|
"display_name": "displayName",
|
|
165
181
|
"custom_mappings": "customMappings",
|
|
@@ -185,6 +201,7 @@ export function accountingLocationFromJSON(
|
|
|
185
201
|
/** @internal */
|
|
186
202
|
export type AccountingLocationInput$Outbound = {
|
|
187
203
|
parent_id?: string | null | undefined;
|
|
204
|
+
display_id?: string | null | undefined;
|
|
188
205
|
company_name?: string | null | undefined;
|
|
189
206
|
display_name?: string | null | undefined;
|
|
190
207
|
status?: string | undefined;
|
|
@@ -201,6 +218,7 @@ export const AccountingLocationInput$outboundSchema: z.ZodType<
|
|
|
201
218
|
AccountingLocationInput
|
|
202
219
|
> = z.object({
|
|
203
220
|
parentId: z.nullable(z.string()).optional(),
|
|
221
|
+
displayId: z.nullable(z.string()).optional(),
|
|
204
222
|
companyName: z.nullable(z.string()).optional(),
|
|
205
223
|
displayName: z.nullable(z.string()).optional(),
|
|
206
224
|
status: LocationStatus$outboundSchema.optional(),
|
|
@@ -211,6 +229,7 @@ export const AccountingLocationInput$outboundSchema: z.ZodType<
|
|
|
211
229
|
}).transform((v) => {
|
|
212
230
|
return remap$(v, {
|
|
213
231
|
parentId: "parent_id",
|
|
232
|
+
displayId: "display_id",
|
|
214
233
|
companyName: "company_name",
|
|
215
234
|
displayName: "display_name",
|
|
216
235
|
rowVersion: "row_version",
|
|
@@ -25,11 +25,11 @@ export type AgedCreditors = {
|
|
|
25
25
|
/**
|
|
26
26
|
* Number of aging periods shown in the report.
|
|
27
27
|
*/
|
|
28
|
-
periodCount
|
|
28
|
+
periodCount: number;
|
|
29
29
|
/**
|
|
30
30
|
* Length of each aging period in days.
|
|
31
31
|
*/
|
|
32
|
-
periodLength
|
|
32
|
+
periodLength: number;
|
|
33
33
|
outstandingBalances?: Array<OutstandingBalanceBySupplier> | undefined;
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -25,11 +25,11 @@ export type AgedDebtors = {
|
|
|
25
25
|
/**
|
|
26
26
|
* Number of aging periods shown in the report.
|
|
27
27
|
*/
|
|
28
|
-
periodCount
|
|
28
|
+
periodCount: number;
|
|
29
29
|
/**
|
|
30
30
|
* Length of each aging period in days.
|
|
31
31
|
*/
|
|
32
|
-
periodLength
|
|
32
|
+
periodLength: number;
|
|
33
33
|
outstandingBalances?: Array<OutstandingBalanceByCustomer> | undefined;
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -124,6 +124,10 @@ export type Bill = {
|
|
|
124
124
|
* The company ID the transaction belongs to
|
|
125
125
|
*/
|
|
126
126
|
companyId?: string | null | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* The ID of the location
|
|
129
|
+
*/
|
|
130
|
+
locationId?: string | null | undefined;
|
|
127
131
|
/**
|
|
128
132
|
* The ID of the department
|
|
129
133
|
*/
|
|
@@ -297,6 +301,10 @@ export type BillInput = {
|
|
|
297
301
|
* The company ID the transaction belongs to
|
|
298
302
|
*/
|
|
299
303
|
companyId?: string | null | undefined;
|
|
304
|
+
/**
|
|
305
|
+
* The ID of the location
|
|
306
|
+
*/
|
|
307
|
+
locationId?: string | null | undefined;
|
|
300
308
|
/**
|
|
301
309
|
* The ID of the department
|
|
302
310
|
*/
|
|
@@ -458,6 +466,7 @@ export const Bill$inboundSchema: z.ZodType<Bill, z.ZodTypeDef, unknown> = z
|
|
|
458
466
|
bill_number: z.nullable(z.string()).optional(),
|
|
459
467
|
supplier: z.nullable(LinkedSupplier$inboundSchema).optional(),
|
|
460
468
|
company_id: z.nullable(z.string()).optional(),
|
|
469
|
+
location_id: z.nullable(z.string()).optional(),
|
|
461
470
|
department_id: z.nullable(z.string()).optional(),
|
|
462
471
|
currency: z.nullable(Currency$inboundSchema).optional(),
|
|
463
472
|
currency_rate: z.nullable(z.number()).optional(),
|
|
@@ -513,6 +522,7 @@ export const Bill$inboundSchema: z.ZodType<Bill, z.ZodTypeDef, unknown> = z
|
|
|
513
522
|
"display_id": "displayId",
|
|
514
523
|
"bill_number": "billNumber",
|
|
515
524
|
"company_id": "companyId",
|
|
525
|
+
"location_id": "locationId",
|
|
516
526
|
"department_id": "departmentId",
|
|
517
527
|
"currency_rate": "currencyRate",
|
|
518
528
|
"tax_inclusive": "taxInclusive",
|
|
@@ -564,6 +574,7 @@ export type BillInput$Outbound = {
|
|
|
564
574
|
bill_number?: string | null | undefined;
|
|
565
575
|
supplier?: LinkedSupplierInput$Outbound | null | undefined;
|
|
566
576
|
company_id?: string | null | undefined;
|
|
577
|
+
location_id?: string | null | undefined;
|
|
567
578
|
department_id?: string | null | undefined;
|
|
568
579
|
currency?: string | null | undefined;
|
|
569
580
|
currency_rate?: number | null | undefined;
|
|
@@ -617,6 +628,7 @@ export const BillInput$outboundSchema: z.ZodType<
|
|
|
617
628
|
billNumber: z.nullable(z.string()).optional(),
|
|
618
629
|
supplier: z.nullable(LinkedSupplierInput$outboundSchema).optional(),
|
|
619
630
|
companyId: z.nullable(z.string()).optional(),
|
|
631
|
+
locationId: z.nullable(z.string()).optional(),
|
|
620
632
|
departmentId: z.nullable(z.string()).optional(),
|
|
621
633
|
currency: z.nullable(Currency$outboundSchema).optional(),
|
|
622
634
|
currencyRate: z.nullable(z.number()).optional(),
|
|
@@ -665,6 +677,7 @@ export const BillInput$outboundSchema: z.ZodType<
|
|
|
665
677
|
displayId: "display_id",
|
|
666
678
|
billNumber: "bill_number",
|
|
667
679
|
companyId: "company_id",
|
|
680
|
+
locationId: "location_id",
|
|
668
681
|
departmentId: "department_id",
|
|
669
682
|
currencyRate: "currency_rate",
|
|
670
683
|
taxInclusive: "tax_inclusive",
|
|
@@ -73,6 +73,7 @@ import {
|
|
|
73
73
|
export const CreditNoteStatus = {
|
|
74
74
|
Draft: "draft",
|
|
75
75
|
Authorised: "authorised",
|
|
76
|
+
Posted: "posted",
|
|
76
77
|
PartiallyPaid: "partially_paid",
|
|
77
78
|
Paid: "paid",
|
|
78
79
|
Voided: "voided",
|
|
@@ -112,6 +113,10 @@ export type CreditNote = {
|
|
|
112
113
|
* The company ID the transaction belongs to
|
|
113
114
|
*/
|
|
114
115
|
companyId?: string | null | undefined;
|
|
116
|
+
/**
|
|
117
|
+
* The ID of the location
|
|
118
|
+
*/
|
|
119
|
+
locationId?: string | null | undefined;
|
|
115
120
|
/**
|
|
116
121
|
* The ID of the department
|
|
117
122
|
*/
|
|
@@ -233,6 +238,10 @@ export type CreditNoteInput = {
|
|
|
233
238
|
* The company ID the transaction belongs to
|
|
234
239
|
*/
|
|
235
240
|
companyId?: string | null | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* The ID of the location
|
|
243
|
+
*/
|
|
244
|
+
locationId?: string | null | undefined;
|
|
236
245
|
/**
|
|
237
246
|
* The ID of the department
|
|
238
247
|
*/
|
|
@@ -349,6 +358,7 @@ export const CreditNote$inboundSchema: z.ZodType<
|
|
|
349
358
|
number: z.nullable(z.string()).optional(),
|
|
350
359
|
customer: z.nullable(LinkedCustomer$inboundSchema).optional(),
|
|
351
360
|
company_id: z.nullable(z.string()).optional(),
|
|
361
|
+
location_id: z.nullable(z.string()).optional(),
|
|
352
362
|
department_id: z.nullable(z.string()).optional(),
|
|
353
363
|
currency: z.nullable(Currency$inboundSchema).optional(),
|
|
354
364
|
currency_rate: z.nullable(z.number()).optional(),
|
|
@@ -392,6 +402,7 @@ export const CreditNote$inboundSchema: z.ZodType<
|
|
|
392
402
|
}).transform((v) => {
|
|
393
403
|
return remap$(v, {
|
|
394
404
|
"company_id": "companyId",
|
|
405
|
+
"location_id": "locationId",
|
|
395
406
|
"department_id": "departmentId",
|
|
396
407
|
"currency_rate": "currencyRate",
|
|
397
408
|
"tax_inclusive": "taxInclusive",
|
|
@@ -432,6 +443,7 @@ export type CreditNoteInput$Outbound = {
|
|
|
432
443
|
number?: string | null | undefined;
|
|
433
444
|
customer?: LinkedCustomerInput$Outbound | null | undefined;
|
|
434
445
|
company_id?: string | null | undefined;
|
|
446
|
+
location_id?: string | null | undefined;
|
|
435
447
|
department_id?: string | null | undefined;
|
|
436
448
|
currency?: string | null | undefined;
|
|
437
449
|
currency_rate?: number | null | undefined;
|
|
@@ -472,6 +484,7 @@ export const CreditNoteInput$outboundSchema: z.ZodType<
|
|
|
472
484
|
number: z.nullable(z.string()).optional(),
|
|
473
485
|
customer: z.nullable(LinkedCustomerInput$outboundSchema).optional(),
|
|
474
486
|
companyId: z.nullable(z.string()).optional(),
|
|
487
|
+
locationId: z.nullable(z.string()).optional(),
|
|
475
488
|
departmentId: z.nullable(z.string()).optional(),
|
|
476
489
|
currency: z.nullable(Currency$outboundSchema).optional(),
|
|
477
490
|
currencyRate: z.nullable(z.number()).optional(),
|
|
@@ -503,6 +516,7 @@ export const CreditNoteInput$outboundSchema: z.ZodType<
|
|
|
503
516
|
}).transform((v) => {
|
|
504
517
|
return remap$(v, {
|
|
505
518
|
companyId: "company_id",
|
|
519
|
+
locationId: "location_id",
|
|
506
520
|
departmentId: "department_id",
|
|
507
521
|
currencyRate: "currency_rate",
|
|
508
522
|
taxInclusive: "tax_inclusive",
|
|
@@ -29,17 +29,30 @@ import {
|
|
|
29
29
|
ExpenseLineItemInput$outboundSchema,
|
|
30
30
|
} from "./expenselineiteminput.js";
|
|
31
31
|
import {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
LinkedBankAccount$outboundSchema,
|
|
36
|
-
} from "./linkedbankaccount.js";
|
|
32
|
+
LinkedDepartment,
|
|
33
|
+
LinkedDepartment$inboundSchema,
|
|
34
|
+
} from "./linkeddepartment.js";
|
|
37
35
|
import {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
36
|
+
LinkedDepartmentInput,
|
|
37
|
+
LinkedDepartmentInput$Outbound,
|
|
38
|
+
LinkedDepartmentInput$outboundSchema,
|
|
39
|
+
} from "./linkeddepartmentinput.js";
|
|
40
|
+
import {
|
|
41
|
+
LinkedFinancialAccount,
|
|
42
|
+
LinkedFinancialAccount$inboundSchema,
|
|
43
|
+
LinkedFinancialAccountInput,
|
|
44
|
+
LinkedFinancialAccountInput$Outbound,
|
|
45
|
+
LinkedFinancialAccountInput$outboundSchema,
|
|
46
|
+
} from "./linkedfinancialaccount.js";
|
|
47
|
+
import {
|
|
48
|
+
LinkedLocation,
|
|
49
|
+
LinkedLocation$inboundSchema,
|
|
50
|
+
} from "./linkedlocation.js";
|
|
51
|
+
import {
|
|
52
|
+
LinkedLocationInput,
|
|
53
|
+
LinkedLocationInput$Outbound,
|
|
54
|
+
LinkedLocationInput$outboundSchema,
|
|
55
|
+
} from "./linkedlocationinput.js";
|
|
43
56
|
import {
|
|
44
57
|
LinkedSupplier,
|
|
45
58
|
LinkedSupplier$inboundSchema,
|
|
@@ -55,6 +68,12 @@ import {
|
|
|
55
68
|
LinkedTaxRateInput$Outbound,
|
|
56
69
|
LinkedTaxRateInput$outboundSchema,
|
|
57
70
|
} from "./linkedtaxrateinput.js";
|
|
71
|
+
import {
|
|
72
|
+
LinkedTrackingCategory,
|
|
73
|
+
LinkedTrackingCategory$inboundSchema,
|
|
74
|
+
LinkedTrackingCategory$Outbound,
|
|
75
|
+
LinkedTrackingCategory$outboundSchema,
|
|
76
|
+
} from "./linkedtrackingcategory.js";
|
|
58
77
|
import {
|
|
59
78
|
PassThroughBody,
|
|
60
79
|
PassThroughBody$inboundSchema,
|
|
@@ -105,6 +124,10 @@ export type Expense = {
|
|
|
105
124
|
* A unique identifier for an object.
|
|
106
125
|
*/
|
|
107
126
|
id?: string | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Id to be displayed.
|
|
129
|
+
*/
|
|
130
|
+
displayId?: string | null | undefined;
|
|
108
131
|
/**
|
|
109
132
|
* Number.
|
|
110
133
|
*/
|
|
@@ -119,12 +142,10 @@ export type Expense = {
|
|
|
119
142
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
120
143
|
*/
|
|
121
144
|
accountId?: string | undefined;
|
|
122
|
-
account?: LinkedLedgerAccount | null | undefined;
|
|
123
|
-
bankAccount?: LinkedBankAccount | null | undefined;
|
|
124
145
|
/**
|
|
125
|
-
*
|
|
146
|
+
* A flexible account reference that can represent either a ledger account (GL account) or a bank account, depending on the connector's requirements.
|
|
126
147
|
*/
|
|
127
|
-
|
|
148
|
+
account?: LinkedFinancialAccount | null | undefined;
|
|
128
149
|
/**
|
|
129
150
|
* The ID of the supplier this entity is linked to. Deprecated, use supplier instead.
|
|
130
151
|
*
|
|
@@ -139,10 +160,12 @@ export type Expense = {
|
|
|
139
160
|
* The company ID the transaction belongs to
|
|
140
161
|
*/
|
|
141
162
|
companyId?: string | null | undefined;
|
|
163
|
+
location?: LinkedLocation | null | undefined;
|
|
142
164
|
/**
|
|
143
165
|
* The ID of the department
|
|
144
166
|
*/
|
|
145
167
|
departmentId?: string | null | undefined;
|
|
168
|
+
department?: LinkedDepartment | null | undefined;
|
|
146
169
|
/**
|
|
147
170
|
* The type of payment for the expense.
|
|
148
171
|
*/
|
|
@@ -180,6 +203,10 @@ export type Expense = {
|
|
|
180
203
|
* The total amount of the expense line item.
|
|
181
204
|
*/
|
|
182
205
|
totalAmount?: number | null | undefined;
|
|
206
|
+
/**
|
|
207
|
+
* A list of linked tracking categories.
|
|
208
|
+
*/
|
|
209
|
+
trackingCategories?: Array<LinkedTrackingCategory | null> | null | undefined;
|
|
183
210
|
/**
|
|
184
211
|
* Expense line items linked to this expense.
|
|
185
212
|
*/
|
|
@@ -228,6 +255,10 @@ export type Expense = {
|
|
|
228
255
|
};
|
|
229
256
|
|
|
230
257
|
export type ExpenseInput = {
|
|
258
|
+
/**
|
|
259
|
+
* Id to be displayed.
|
|
260
|
+
*/
|
|
261
|
+
displayId?: string | null | undefined;
|
|
231
262
|
/**
|
|
232
263
|
* Number.
|
|
233
264
|
*/
|
|
@@ -242,12 +273,10 @@ export type ExpenseInput = {
|
|
|
242
273
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
243
274
|
*/
|
|
244
275
|
accountId?: string | undefined;
|
|
245
|
-
account?: LinkedLedgerAccount | null | undefined;
|
|
246
|
-
bankAccount?: LinkedBankAccount | null | undefined;
|
|
247
276
|
/**
|
|
248
|
-
*
|
|
277
|
+
* A flexible account reference that can represent either a ledger account (GL account) or a bank account, depending on the connector's requirements.
|
|
249
278
|
*/
|
|
250
|
-
|
|
279
|
+
account?: LinkedFinancialAccountInput | null | undefined;
|
|
251
280
|
/**
|
|
252
281
|
* The ID of the supplier this entity is linked to. Deprecated, use supplier instead.
|
|
253
282
|
*
|
|
@@ -262,10 +291,12 @@ export type ExpenseInput = {
|
|
|
262
291
|
* The company ID the transaction belongs to
|
|
263
292
|
*/
|
|
264
293
|
companyId?: string | null | undefined;
|
|
294
|
+
location?: LinkedLocationInput | null | undefined;
|
|
265
295
|
/**
|
|
266
296
|
* The ID of the department
|
|
267
297
|
*/
|
|
268
298
|
departmentId?: string | null | undefined;
|
|
299
|
+
department?: LinkedDepartmentInput | null | undefined;
|
|
269
300
|
/**
|
|
270
301
|
* The type of payment for the expense.
|
|
271
302
|
*/
|
|
@@ -303,6 +334,10 @@ export type ExpenseInput = {
|
|
|
303
334
|
* The total amount of the expense line item.
|
|
304
335
|
*/
|
|
305
336
|
totalAmount?: number | null | undefined;
|
|
337
|
+
/**
|
|
338
|
+
* A list of linked tracking categories.
|
|
339
|
+
*/
|
|
340
|
+
trackingCategories?: Array<LinkedTrackingCategory | null> | null | undefined;
|
|
306
341
|
/**
|
|
307
342
|
* Expense line items linked to this expense.
|
|
308
343
|
*/
|
|
@@ -359,18 +394,19 @@ export const ExpenseStatus$outboundSchema: z.ZodNativeEnum<
|
|
|
359
394
|
export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
|
|
360
395
|
z.object({
|
|
361
396
|
id: z.string().optional(),
|
|
397
|
+
display_id: z.nullable(z.string()).optional(),
|
|
362
398
|
number: z.nullable(z.string()).optional(),
|
|
363
399
|
transaction_date: z.nullable(
|
|
364
400
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
365
401
|
),
|
|
366
402
|
account_id: z.string().optional(),
|
|
367
|
-
account: z.nullable(
|
|
368
|
-
bank_account: z.nullable(LinkedBankAccount$inboundSchema).optional(),
|
|
369
|
-
customer_id: z.string().optional(),
|
|
403
|
+
account: z.nullable(LinkedFinancialAccount$inboundSchema).optional(),
|
|
370
404
|
supplier_id: z.string().optional(),
|
|
371
405
|
supplier: z.nullable(LinkedSupplier$inboundSchema).optional(),
|
|
372
406
|
company_id: z.nullable(z.string()).optional(),
|
|
407
|
+
location: z.nullable(LinkedLocation$inboundSchema).optional(),
|
|
373
408
|
department_id: z.nullable(z.string()).optional(),
|
|
409
|
+
department: z.nullable(LinkedDepartment$inboundSchema).optional(),
|
|
374
410
|
payment_type: z.nullable(ExpensePaymentType$inboundSchema).optional(),
|
|
375
411
|
currency: z.nullable(Currency$inboundSchema).optional(),
|
|
376
412
|
currency_rate: z.nullable(z.number()).optional(),
|
|
@@ -381,6 +417,9 @@ export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
|
|
|
381
417
|
sub_total: z.nullable(z.number()).optional(),
|
|
382
418
|
total_tax: z.nullable(z.number()).optional(),
|
|
383
419
|
total_amount: z.nullable(z.number()).optional(),
|
|
420
|
+
tracking_categories: z.nullable(
|
|
421
|
+
z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
|
|
422
|
+
).optional(),
|
|
384
423
|
line_items: z.array(ExpenseLineItem$inboundSchema),
|
|
385
424
|
reference: z.nullable(z.string()).optional(),
|
|
386
425
|
source_document_url: z.nullable(z.string()).optional(),
|
|
@@ -399,10 +438,9 @@ export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
|
|
|
399
438
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
400
439
|
}).transform((v) => {
|
|
401
440
|
return remap$(v, {
|
|
441
|
+
"display_id": "displayId",
|
|
402
442
|
"transaction_date": "transactionDate",
|
|
403
443
|
"account_id": "accountId",
|
|
404
|
-
"bank_account": "bankAccount",
|
|
405
|
-
"customer_id": "customerId",
|
|
406
444
|
"supplier_id": "supplierId",
|
|
407
445
|
"company_id": "companyId",
|
|
408
446
|
"department_id": "departmentId",
|
|
@@ -413,6 +451,7 @@ export const Expense$inboundSchema: z.ZodType<Expense, z.ZodTypeDef, unknown> =
|
|
|
413
451
|
"sub_total": "subTotal",
|
|
414
452
|
"total_tax": "totalTax",
|
|
415
453
|
"total_amount": "totalAmount",
|
|
454
|
+
"tracking_categories": "trackingCategories",
|
|
416
455
|
"line_items": "lineItems",
|
|
417
456
|
"source_document_url": "sourceDocumentUrl",
|
|
418
457
|
"custom_fields": "customFields",
|
|
@@ -438,16 +477,17 @@ export function expenseFromJSON(
|
|
|
438
477
|
|
|
439
478
|
/** @internal */
|
|
440
479
|
export type ExpenseInput$Outbound = {
|
|
480
|
+
display_id?: string | null | undefined;
|
|
441
481
|
number?: string | null | undefined;
|
|
442
482
|
transaction_date: string | null;
|
|
443
483
|
account_id?: string | undefined;
|
|
444
|
-
account?:
|
|
445
|
-
bank_account?: LinkedBankAccount$Outbound | null | undefined;
|
|
446
|
-
customer_id?: string | undefined;
|
|
484
|
+
account?: LinkedFinancialAccountInput$Outbound | null | undefined;
|
|
447
485
|
supplier_id?: string | undefined;
|
|
448
486
|
supplier?: LinkedSupplierInput$Outbound | null | undefined;
|
|
449
487
|
company_id?: string | null | undefined;
|
|
488
|
+
location?: LinkedLocationInput$Outbound | null | undefined;
|
|
450
489
|
department_id?: string | null | undefined;
|
|
490
|
+
department?: LinkedDepartmentInput$Outbound | null | undefined;
|
|
451
491
|
payment_type?: string | null | undefined;
|
|
452
492
|
currency?: string | null | undefined;
|
|
453
493
|
currency_rate?: number | null | undefined;
|
|
@@ -458,6 +498,10 @@ export type ExpenseInput$Outbound = {
|
|
|
458
498
|
sub_total?: number | null | undefined;
|
|
459
499
|
total_tax?: number | null | undefined;
|
|
460
500
|
total_amount?: number | null | undefined;
|
|
501
|
+
tracking_categories?:
|
|
502
|
+
| Array<LinkedTrackingCategory$Outbound | null>
|
|
503
|
+
| null
|
|
504
|
+
| undefined;
|
|
461
505
|
line_items: Array<ExpenseLineItemInput$Outbound>;
|
|
462
506
|
reference?: string | null | undefined;
|
|
463
507
|
source_document_url?: string | null | undefined;
|
|
@@ -473,16 +517,17 @@ export const ExpenseInput$outboundSchema: z.ZodType<
|
|
|
473
517
|
z.ZodTypeDef,
|
|
474
518
|
ExpenseInput
|
|
475
519
|
> = z.object({
|
|
520
|
+
displayId: z.nullable(z.string()).optional(),
|
|
476
521
|
number: z.nullable(z.string()).optional(),
|
|
477
522
|
transactionDate: z.nullable(z.date().transform(v => v.toISOString())),
|
|
478
523
|
accountId: z.string().optional(),
|
|
479
|
-
account: z.nullable(
|
|
480
|
-
bankAccount: z.nullable(LinkedBankAccount$outboundSchema).optional(),
|
|
481
|
-
customerId: z.string().optional(),
|
|
524
|
+
account: z.nullable(LinkedFinancialAccountInput$outboundSchema).optional(),
|
|
482
525
|
supplierId: z.string().optional(),
|
|
483
526
|
supplier: z.nullable(LinkedSupplierInput$outboundSchema).optional(),
|
|
484
527
|
companyId: z.nullable(z.string()).optional(),
|
|
528
|
+
location: z.nullable(LinkedLocationInput$outboundSchema).optional(),
|
|
485
529
|
departmentId: z.nullable(z.string()).optional(),
|
|
530
|
+
department: z.nullable(LinkedDepartmentInput$outboundSchema).optional(),
|
|
486
531
|
paymentType: z.nullable(ExpensePaymentType$outboundSchema).optional(),
|
|
487
532
|
currency: z.nullable(Currency$outboundSchema).optional(),
|
|
488
533
|
currencyRate: z.nullable(z.number()).optional(),
|
|
@@ -493,6 +538,9 @@ export const ExpenseInput$outboundSchema: z.ZodType<
|
|
|
493
538
|
subTotal: z.nullable(z.number()).optional(),
|
|
494
539
|
totalTax: z.nullable(z.number()).optional(),
|
|
495
540
|
totalAmount: z.nullable(z.number()).optional(),
|
|
541
|
+
trackingCategories: z.nullable(
|
|
542
|
+
z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
|
|
543
|
+
).optional(),
|
|
496
544
|
lineItems: z.array(ExpenseLineItemInput$outboundSchema),
|
|
497
545
|
reference: z.nullable(z.string()).optional(),
|
|
498
546
|
sourceDocumentUrl: z.nullable(z.string()).optional(),
|
|
@@ -502,10 +550,9 @@ export const ExpenseInput$outboundSchema: z.ZodType<
|
|
|
502
550
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
503
551
|
}).transform((v) => {
|
|
504
552
|
return remap$(v, {
|
|
553
|
+
displayId: "display_id",
|
|
505
554
|
transactionDate: "transaction_date",
|
|
506
555
|
accountId: "account_id",
|
|
507
|
-
bankAccount: "bank_account",
|
|
508
|
-
customerId: "customer_id",
|
|
509
556
|
supplierId: "supplier_id",
|
|
510
557
|
companyId: "company_id",
|
|
511
558
|
departmentId: "department_id",
|
|
@@ -516,6 +563,7 @@ export const ExpenseInput$outboundSchema: z.ZodType<
|
|
|
516
563
|
subTotal: "sub_total",
|
|
517
564
|
totalTax: "total_tax",
|
|
518
565
|
totalAmount: "total_amount",
|
|
566
|
+
trackingCategories: "tracking_categories",
|
|
519
567
|
lineItems: "line_items",
|
|
520
568
|
sourceDocumentUrl: "source_document_url",
|
|
521
569
|
customFields: "custom_fields",
|