@apideck/unify 0.28.2 → 0.28.4

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.
Files changed (48) hide show
  1. package/examples/README.md +5 -0
  2. package/examples/accountingTaxRatesList.example.ts +2 -0
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +4 -4
  6. package/lib/config.js +4 -4
  7. package/models/components/billlineitem.d.ts +48 -0
  8. package/models/components/billlineitem.d.ts.map +1 -1
  9. package/models/components/billlineitem.js +36 -0
  10. package/models/components/billlineitem.js.map +1 -1
  11. package/models/components/expenselineitem.d.ts +6 -0
  12. package/models/components/expenselineitem.d.ts.map +1 -1
  13. package/models/components/expenselineitem.js +3 -0
  14. package/models/components/expenselineitem.js.map +1 -1
  15. package/models/components/expenselineiteminput.d.ts +6 -0
  16. package/models/components/expenselineiteminput.d.ts.map +1 -1
  17. package/models/components/expenselineiteminput.js +3 -0
  18. package/models/components/expenselineiteminput.js.map +1 -1
  19. package/models/components/index.d.ts +2 -0
  20. package/models/components/index.d.ts.map +1 -1
  21. package/models/components/index.js +2 -0
  22. package/models/components/index.js.map +1 -1
  23. package/models/components/invoicelineitem.d.ts +20 -0
  24. package/models/components/invoicelineitem.d.ts.map +1 -1
  25. package/models/components/invoicelineitem.js +12 -0
  26. package/models/components/invoicelineitem.js.map +1 -1
  27. package/models/components/linkedpurchaseorder.d.ts +42 -0
  28. package/models/components/linkedpurchaseorder.d.ts.map +1 -0
  29. package/models/components/linkedpurchaseorder.js +74 -0
  30. package/models/components/linkedpurchaseorder.js.map +1 -0
  31. package/models/components/purchaseorder.d.ts +57 -0
  32. package/models/components/purchaseorder.d.ts.map +1 -1
  33. package/models/components/purchaseorder.js +37 -1
  34. package/models/components/purchaseorder.js.map +1 -1
  35. package/models/components/rebilling.d.ts +85 -0
  36. package/models/components/rebilling.d.ts.map +1 -0
  37. package/models/components/rebilling.js +101 -0
  38. package/models/components/rebilling.js.map +1 -0
  39. package/package.json +1 -1
  40. package/src/lib/config.ts +4 -4
  41. package/src/models/components/billlineitem.ts +100 -0
  42. package/src/models/components/expenselineitem.ts +13 -0
  43. package/src/models/components/expenselineiteminput.ts +13 -0
  44. package/src/models/components/index.ts +2 -0
  45. package/src/models/components/invoicelineitem.ts +32 -0
  46. package/src/models/components/linkedpurchaseorder.ts +94 -0
  47. package/src/models/components/purchaseorder.ts +67 -0
  48. package/src/models/components/rebilling.ts +135 -0
@@ -8,6 +8,18 @@ import { safeParse } from "../../lib/schemas.js";
8
8
  import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ LinkedCustomer,
13
+ LinkedCustomer$inboundSchema,
14
+ LinkedCustomer$Outbound,
15
+ LinkedCustomer$outboundSchema,
16
+ } from "./linkedcustomer.js";
17
+ import {
18
+ LinkedCustomerInput,
19
+ LinkedCustomerInput$inboundSchema,
20
+ LinkedCustomerInput$Outbound,
21
+ LinkedCustomerInput$outboundSchema,
22
+ } from "./linkedcustomerinput.js";
11
23
  import {
12
24
  LinkedInvoiceItem,
13
25
  LinkedInvoiceItem$inboundSchema,
@@ -26,6 +38,12 @@ import {
26
38
  LinkedLedgerAccountInput$Outbound,
27
39
  LinkedLedgerAccountInput$outboundSchema,
28
40
  } from "./linkedledgeraccountinput.js";
41
+ import {
42
+ LinkedPurchaseOrder,
43
+ LinkedPurchaseOrder$inboundSchema,
44
+ LinkedPurchaseOrder$Outbound,
45
+ LinkedPurchaseOrder$outboundSchema,
46
+ } from "./linkedpurchaseorder.js";
29
47
  import {
30
48
  LinkedTaxRate,
31
49
  LinkedTaxRate$inboundSchema,
@@ -44,6 +62,12 @@ import {
44
62
  LinkedTrackingCategory$Outbound,
45
63
  LinkedTrackingCategory$outboundSchema,
46
64
  } from "./linkedtrackingcategory.js";
65
+ import {
66
+ Rebilling,
67
+ Rebilling$inboundSchema,
68
+ Rebilling$Outbound,
69
+ Rebilling$outboundSchema,
70
+ } from "./rebilling.js";
47
71
 
48
72
  /**
49
73
  * Bill Line Item type
@@ -113,13 +137,30 @@ export type BillLineItem = {
113
137
  * The ID of the department
114
138
  */
115
139
  departmentId?: string | null | undefined;
140
+ /**
141
+ * The ID of the subsidiary
142
+ */
143
+ subsidiaryId?: string | null | undefined;
144
+ /**
145
+ * ID of the category of the line item
146
+ */
147
+ categoryId?: string | null | undefined;
116
148
  item?: LinkedInvoiceItem | undefined;
117
149
  taxRate?: LinkedTaxRate | undefined;
118
150
  ledgerAccount?: LinkedLedgerAccount | null | undefined;
151
+ purchaseOrder?: LinkedPurchaseOrder | null | undefined;
119
152
  /**
120
153
  * A list of linked tracking categories.
121
154
  */
122
155
  trackingCategories?: Array<LinkedTrackingCategory | null> | null | undefined;
156
+ /**
157
+ * The customer this entity is linked to.
158
+ */
159
+ customer?: LinkedCustomer | null | undefined;
160
+ /**
161
+ * Rebilling metadata for this line item.
162
+ */
163
+ rebilling?: Rebilling | null | undefined;
123
164
  /**
124
165
  * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
125
166
  */
@@ -193,13 +234,30 @@ export type BillLineItemInput = {
193
234
  * The ID of the department
194
235
  */
195
236
  departmentId?: string | null | undefined;
237
+ /**
238
+ * The ID of the subsidiary
239
+ */
240
+ subsidiaryId?: string | null | undefined;
241
+ /**
242
+ * ID of the category of the line item
243
+ */
244
+ categoryId?: string | null | undefined;
196
245
  item?: LinkedInvoiceItem | undefined;
197
246
  taxRate?: LinkedTaxRateInput | undefined;
198
247
  ledgerAccount?: LinkedLedgerAccountInput | null | undefined;
248
+ purchaseOrder?: LinkedPurchaseOrder | null | undefined;
199
249
  /**
200
250
  * A list of linked tracking categories.
201
251
  */
202
252
  trackingCategories?: Array<LinkedTrackingCategory | null> | null | undefined;
253
+ /**
254
+ * The customer this entity is linked to.
255
+ */
256
+ customer?: LinkedCustomerInput | null | undefined;
257
+ /**
258
+ * Rebilling metadata for this line item.
259
+ */
260
+ rebilling?: Rebilling | null | undefined;
203
261
  /**
204
262
  * A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
205
263
  */
@@ -248,12 +306,17 @@ export const BillLineItem$inboundSchema: z.ZodType<
248
306
  discount_amount: z.nullable(z.number()).optional(),
249
307
  location_id: z.nullable(z.string()).optional(),
250
308
  department_id: z.nullable(z.string()).optional(),
309
+ subsidiary_id: z.nullable(z.string()).optional(),
310
+ category_id: z.nullable(z.string()).optional(),
251
311
  item: LinkedInvoiceItem$inboundSchema.optional(),
252
312
  tax_rate: LinkedTaxRate$inboundSchema.optional(),
253
313
  ledger_account: z.nullable(LinkedLedgerAccount$inboundSchema).optional(),
314
+ purchase_order: z.nullable(LinkedPurchaseOrder$inboundSchema).optional(),
254
315
  tracking_categories: z.nullable(
255
316
  z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
256
317
  ).optional(),
318
+ customer: z.nullable(LinkedCustomer$inboundSchema).optional(),
319
+ rebilling: z.nullable(Rebilling$inboundSchema).optional(),
257
320
  row_version: z.nullable(z.string()).optional(),
258
321
  updated_by: z.nullable(z.string()).optional(),
259
322
  created_by: z.nullable(z.string()).optional(),
@@ -275,8 +338,11 @@ export const BillLineItem$inboundSchema: z.ZodType<
275
338
  "discount_amount": "discountAmount",
276
339
  "location_id": "locationId",
277
340
  "department_id": "departmentId",
341
+ "subsidiary_id": "subsidiaryId",
342
+ "category_id": "categoryId",
278
343
  "tax_rate": "taxRate",
279
344
  "ledger_account": "ledgerAccount",
345
+ "purchase_order": "purchaseOrder",
280
346
  "tracking_categories": "trackingCategories",
281
347
  "row_version": "rowVersion",
282
348
  "updated_by": "updatedBy",
@@ -303,13 +369,18 @@ export type BillLineItem$Outbound = {
303
369
  discount_amount?: number | null | undefined;
304
370
  location_id?: string | null | undefined;
305
371
  department_id?: string | null | undefined;
372
+ subsidiary_id?: string | null | undefined;
373
+ category_id?: string | null | undefined;
306
374
  item?: LinkedInvoiceItem$Outbound | undefined;
307
375
  tax_rate?: LinkedTaxRate$Outbound | undefined;
308
376
  ledger_account?: LinkedLedgerAccount$Outbound | null | undefined;
377
+ purchase_order?: LinkedPurchaseOrder$Outbound | null | undefined;
309
378
  tracking_categories?:
310
379
  | Array<LinkedTrackingCategory$Outbound | null>
311
380
  | null
312
381
  | undefined;
382
+ customer?: LinkedCustomer$Outbound | null | undefined;
383
+ rebilling?: Rebilling$Outbound | null | undefined;
313
384
  row_version?: string | null | undefined;
314
385
  updated_by?: string | null | undefined;
315
386
  created_by?: string | null | undefined;
@@ -338,12 +409,17 @@ export const BillLineItem$outboundSchema: z.ZodType<
338
409
  discountAmount: z.nullable(z.number()).optional(),
339
410
  locationId: z.nullable(z.string()).optional(),
340
411
  departmentId: z.nullable(z.string()).optional(),
412
+ subsidiaryId: z.nullable(z.string()).optional(),
413
+ categoryId: z.nullable(z.string()).optional(),
341
414
  item: LinkedInvoiceItem$outboundSchema.optional(),
342
415
  taxRate: LinkedTaxRate$outboundSchema.optional(),
343
416
  ledgerAccount: z.nullable(LinkedLedgerAccount$outboundSchema).optional(),
417
+ purchaseOrder: z.nullable(LinkedPurchaseOrder$outboundSchema).optional(),
344
418
  trackingCategories: z.nullable(
345
419
  z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
346
420
  ).optional(),
421
+ customer: z.nullable(LinkedCustomer$outboundSchema).optional(),
422
+ rebilling: z.nullable(Rebilling$outboundSchema).optional(),
347
423
  rowVersion: z.nullable(z.string()).optional(),
348
424
  updatedBy: z.nullable(z.string()).optional(),
349
425
  createdBy: z.nullable(z.string()).optional(),
@@ -361,8 +437,11 @@ export const BillLineItem$outboundSchema: z.ZodType<
361
437
  discountAmount: "discount_amount",
362
438
  locationId: "location_id",
363
439
  departmentId: "department_id",
440
+ subsidiaryId: "subsidiary_id",
441
+ categoryId: "category_id",
364
442
  taxRate: "tax_rate",
365
443
  ledgerAccount: "ledger_account",
444
+ purchaseOrder: "purchase_order",
366
445
  trackingCategories: "tracking_categories",
367
446
  rowVersion: "row_version",
368
447
  updatedBy: "updated_by",
@@ -419,12 +498,17 @@ export const BillLineItemInput$inboundSchema: z.ZodType<
419
498
  discount_amount: z.nullable(z.number()).optional(),
420
499
  location_id: z.nullable(z.string()).optional(),
421
500
  department_id: z.nullable(z.string()).optional(),
501
+ subsidiary_id: z.nullable(z.string()).optional(),
502
+ category_id: z.nullable(z.string()).optional(),
422
503
  item: LinkedInvoiceItem$inboundSchema.optional(),
423
504
  tax_rate: LinkedTaxRateInput$inboundSchema.optional(),
424
505
  ledger_account: z.nullable(LinkedLedgerAccountInput$inboundSchema).optional(),
506
+ purchase_order: z.nullable(LinkedPurchaseOrder$inboundSchema).optional(),
425
507
  tracking_categories: z.nullable(
426
508
  z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
427
509
  ).optional(),
510
+ customer: z.nullable(LinkedCustomerInput$inboundSchema).optional(),
511
+ rebilling: z.nullable(Rebilling$inboundSchema).optional(),
428
512
  row_version: z.nullable(z.string()).optional(),
429
513
  }).transform((v) => {
430
514
  return remap$(v, {
@@ -438,8 +522,11 @@ export const BillLineItemInput$inboundSchema: z.ZodType<
438
522
  "discount_amount": "discountAmount",
439
523
  "location_id": "locationId",
440
524
  "department_id": "departmentId",
525
+ "subsidiary_id": "subsidiaryId",
526
+ "category_id": "categoryId",
441
527
  "tax_rate": "taxRate",
442
528
  "ledger_account": "ledgerAccount",
529
+ "purchase_order": "purchaseOrder",
443
530
  "tracking_categories": "trackingCategories",
444
531
  "row_version": "rowVersion",
445
532
  });
@@ -461,13 +548,18 @@ export type BillLineItemInput$Outbound = {
461
548
  discount_amount?: number | null | undefined;
462
549
  location_id?: string | null | undefined;
463
550
  department_id?: string | null | undefined;
551
+ subsidiary_id?: string | null | undefined;
552
+ category_id?: string | null | undefined;
464
553
  item?: LinkedInvoiceItem$Outbound | undefined;
465
554
  tax_rate?: LinkedTaxRateInput$Outbound | undefined;
466
555
  ledger_account?: LinkedLedgerAccountInput$Outbound | null | undefined;
556
+ purchase_order?: LinkedPurchaseOrder$Outbound | null | undefined;
467
557
  tracking_categories?:
468
558
  | Array<LinkedTrackingCategory$Outbound | null>
469
559
  | null
470
560
  | undefined;
561
+ customer?: LinkedCustomerInput$Outbound | null | undefined;
562
+ rebilling?: Rebilling$Outbound | null | undefined;
471
563
  row_version?: string | null | undefined;
472
564
  };
473
565
 
@@ -491,12 +583,17 @@ export const BillLineItemInput$outboundSchema: z.ZodType<
491
583
  discountAmount: z.nullable(z.number()).optional(),
492
584
  locationId: z.nullable(z.string()).optional(),
493
585
  departmentId: z.nullable(z.string()).optional(),
586
+ subsidiaryId: z.nullable(z.string()).optional(),
587
+ categoryId: z.nullable(z.string()).optional(),
494
588
  item: LinkedInvoiceItem$outboundSchema.optional(),
495
589
  taxRate: LinkedTaxRateInput$outboundSchema.optional(),
496
590
  ledgerAccount: z.nullable(LinkedLedgerAccountInput$outboundSchema).optional(),
591
+ purchaseOrder: z.nullable(LinkedPurchaseOrder$outboundSchema).optional(),
497
592
  trackingCategories: z.nullable(
498
593
  z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
499
594
  ).optional(),
595
+ customer: z.nullable(LinkedCustomerInput$outboundSchema).optional(),
596
+ rebilling: z.nullable(Rebilling$outboundSchema).optional(),
500
597
  rowVersion: z.nullable(z.string()).optional(),
501
598
  }).transform((v) => {
502
599
  return remap$(v, {
@@ -510,8 +607,11 @@ export const BillLineItemInput$outboundSchema: z.ZodType<
510
607
  discountAmount: "discount_amount",
511
608
  locationId: "location_id",
512
609
  departmentId: "department_id",
610
+ subsidiaryId: "subsidiary_id",
611
+ categoryId: "category_id",
513
612
  taxRate: "tax_rate",
514
613
  ledgerAccount: "ledger_account",
614
+ purchaseOrder: "purchase_order",
515
615
  trackingCategories: "tracking_categories",
516
616
  rowVersion: "row_version",
517
617
  });
@@ -19,6 +19,12 @@ import {
19
19
  LinkedTrackingCategory$Outbound,
20
20
  LinkedTrackingCategory$outboundSchema,
21
21
  } from "./linkedtrackingcategory.js";
22
+ import {
23
+ Rebilling,
24
+ Rebilling$inboundSchema,
25
+ Rebilling$Outbound,
26
+ Rebilling$outboundSchema,
27
+ } from "./rebilling.js";
22
28
 
23
29
  export type ExpenseLineItem = {
24
30
  /**
@@ -66,6 +72,10 @@ export type ExpenseLineItem = {
66
72
  * Line number of the resource
67
73
  */
68
74
  lineNumber?: number | null | undefined;
75
+ /**
76
+ * Rebilling metadata for this line item.
77
+ */
78
+ rebilling?: Rebilling | null | undefined;
69
79
  };
70
80
 
71
81
  /** @internal */
@@ -88,6 +98,7 @@ export const ExpenseLineItem$inboundSchema: z.ZodType<
88
98
  total_amount: z.nullable(z.number()),
89
99
  billable: z.boolean().optional(),
90
100
  line_number: z.nullable(z.number().int()).optional(),
101
+ rebilling: z.nullable(Rebilling$inboundSchema).optional(),
91
102
  }).transform((v) => {
92
103
  return remap$(v, {
93
104
  "tracking_categories": "trackingCategories",
@@ -119,6 +130,7 @@ export type ExpenseLineItem$Outbound = {
119
130
  total_amount: number | null;
120
131
  billable?: boolean | undefined;
121
132
  line_number?: number | null | undefined;
133
+ rebilling?: Rebilling$Outbound | null | undefined;
122
134
  };
123
135
 
124
136
  /** @internal */
@@ -141,6 +153,7 @@ export const ExpenseLineItem$outboundSchema: z.ZodType<
141
153
  totalAmount: z.nullable(z.number()),
142
154
  billable: z.boolean().optional(),
143
155
  lineNumber: z.nullable(z.number().int()).optional(),
156
+ rebilling: z.nullable(Rebilling$outboundSchema).optional(),
144
157
  }).transform((v) => {
145
158
  return remap$(v, {
146
159
  trackingCategories: "tracking_categories",
@@ -19,6 +19,12 @@ import {
19
19
  LinkedTrackingCategory$Outbound,
20
20
  LinkedTrackingCategory$outboundSchema,
21
21
  } from "./linkedtrackingcategory.js";
22
+ import {
23
+ Rebilling,
24
+ Rebilling$inboundSchema,
25
+ Rebilling$Outbound,
26
+ Rebilling$outboundSchema,
27
+ } from "./rebilling.js";
22
28
 
23
29
  export type ExpenseLineItemInput = {
24
30
  /**
@@ -62,6 +68,10 @@ export type ExpenseLineItemInput = {
62
68
  * Line number of the resource
63
69
  */
64
70
  lineNumber?: number | null | undefined;
71
+ /**
72
+ * Rebilling metadata for this line item.
73
+ */
74
+ rebilling?: Rebilling | null | undefined;
65
75
  };
66
76
 
67
77
  /** @internal */
@@ -83,6 +93,7 @@ export const ExpenseLineItemInput$inboundSchema: z.ZodType<
83
93
  total_amount: z.nullable(z.number()),
84
94
  billable: z.boolean().optional(),
85
95
  line_number: z.nullable(z.number().int()).optional(),
96
+ rebilling: z.nullable(Rebilling$inboundSchema).optional(),
86
97
  }).transform((v) => {
87
98
  return remap$(v, {
88
99
  "tracking_categories": "trackingCategories",
@@ -113,6 +124,7 @@ export type ExpenseLineItemInput$Outbound = {
113
124
  total_amount: number | null;
114
125
  billable?: boolean | undefined;
115
126
  line_number?: number | null | undefined;
127
+ rebilling?: Rebilling$Outbound | null | undefined;
116
128
  };
117
129
 
118
130
  /** @internal */
@@ -134,6 +146,7 @@ export const ExpenseLineItemInput$outboundSchema: z.ZodType<
134
146
  totalAmount: z.nullable(z.number()),
135
147
  billable: z.boolean().optional(),
136
148
  lineNumber: z.nullable(z.number().int()).optional(),
149
+ rebilling: z.nullable(Rebilling$outboundSchema).optional(),
137
150
  }).transform((v) => {
138
151
  return remap$(v, {
139
152
  trackingCategories: "tracking_categories",
@@ -402,6 +402,7 @@ export * from "./linkedinvoiceitem.js";
402
402
  export * from "./linkedledgeraccount.js";
403
403
  export * from "./linkedledgeraccountinput.js";
404
404
  export * from "./linkedparentcustomer.js";
405
+ export * from "./linkedpurchaseorder.js";
405
406
  export * from "./linkedsupplier.js";
406
407
  export * from "./linkedsupplierinput.js";
407
408
  export * from "./linkedtaxrate.js";
@@ -449,6 +450,7 @@ export * from "./profitandlosstype.js";
449
450
  export * from "./purchaseorder.js";
450
451
  export * from "./purchaseordersfilter.js";
451
452
  export * from "./purchaseorderssort.js";
453
+ export * from "./rebilling.js";
452
454
  export * from "./requestcountallocation.js";
453
455
  export * from "./resourcestatus.js";
454
456
  export * from "./schedule.js";
@@ -126,6 +126,14 @@ export type InvoiceLineItem = {
126
126
  * The ID of the department
127
127
  */
128
128
  departmentId?: string | null | undefined;
129
+ /**
130
+ * The ID of the subsidiary
131
+ */
132
+ subsidiaryId?: string | null | undefined;
133
+ /**
134
+ * Whether the line item is prepaid
135
+ */
136
+ prepaid?: boolean | null | undefined;
129
137
  item?: LinkedInvoiceItem | undefined;
130
138
  taxRate?: LinkedTaxRate | undefined;
131
139
  /**
@@ -215,6 +223,14 @@ export type InvoiceLineItemInput = {
215
223
  * The ID of the department
216
224
  */
217
225
  departmentId?: string | null | undefined;
226
+ /**
227
+ * The ID of the subsidiary
228
+ */
229
+ subsidiaryId?: string | null | undefined;
230
+ /**
231
+ * Whether the line item is prepaid
232
+ */
233
+ prepaid?: boolean | null | undefined;
218
234
  item?: LinkedInvoiceItem | undefined;
219
235
  taxRate?: LinkedTaxRateInput | undefined;
220
236
  /**
@@ -272,6 +288,8 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
272
288
  category_id: z.nullable(z.string()).optional(),
273
289
  location_id: z.nullable(z.string()).optional(),
274
290
  department_id: z.nullable(z.string()).optional(),
291
+ subsidiary_id: z.nullable(z.string()).optional(),
292
+ prepaid: z.nullable(z.boolean()).optional(),
275
293
  item: LinkedInvoiceItem$inboundSchema.optional(),
276
294
  tax_rate: LinkedTaxRate$inboundSchema.optional(),
277
295
  tracking_categories: z.nullable(
@@ -301,6 +319,7 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
301
319
  "category_id": "categoryId",
302
320
  "location_id": "locationId",
303
321
  "department_id": "departmentId",
322
+ "subsidiary_id": "subsidiaryId",
304
323
  "tax_rate": "taxRate",
305
324
  "tracking_categories": "trackingCategories",
306
325
  "ledger_account": "ledgerAccount",
@@ -331,6 +350,8 @@ export type InvoiceLineItem$Outbound = {
331
350
  category_id?: string | null | undefined;
332
351
  location_id?: string | null | undefined;
333
352
  department_id?: string | null | undefined;
353
+ subsidiary_id?: string | null | undefined;
354
+ prepaid?: boolean | null | undefined;
334
355
  item?: LinkedInvoiceItem$Outbound | undefined;
335
356
  tax_rate?: LinkedTaxRate$Outbound | undefined;
336
357
  tracking_categories?:
@@ -368,6 +389,8 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
368
389
  categoryId: z.nullable(z.string()).optional(),
369
390
  locationId: z.nullable(z.string()).optional(),
370
391
  departmentId: z.nullable(z.string()).optional(),
392
+ subsidiaryId: z.nullable(z.string()).optional(),
393
+ prepaid: z.nullable(z.boolean()).optional(),
371
394
  item: LinkedInvoiceItem$outboundSchema.optional(),
372
395
  taxRate: LinkedTaxRate$outboundSchema.optional(),
373
396
  trackingCategories: z.nullable(
@@ -393,6 +416,7 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
393
416
  categoryId: "category_id",
394
417
  locationId: "location_id",
395
418
  departmentId: "department_id",
419
+ subsidiaryId: "subsidiary_id",
396
420
  taxRate: "tax_rate",
397
421
  trackingCategories: "tracking_categories",
398
422
  ledgerAccount: "ledger_account",
@@ -456,6 +480,8 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
456
480
  category_id: z.nullable(z.string()).optional(),
457
481
  location_id: z.nullable(z.string()).optional(),
458
482
  department_id: z.nullable(z.string()).optional(),
483
+ subsidiary_id: z.nullable(z.string()).optional(),
484
+ prepaid: z.nullable(z.boolean()).optional(),
459
485
  item: LinkedInvoiceItem$inboundSchema.optional(),
460
486
  tax_rate: LinkedTaxRateInput$inboundSchema.optional(),
461
487
  tracking_categories: z.nullable(
@@ -477,6 +503,7 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
477
503
  "category_id": "categoryId",
478
504
  "location_id": "locationId",
479
505
  "department_id": "departmentId",
506
+ "subsidiary_id": "subsidiaryId",
480
507
  "tax_rate": "taxRate",
481
508
  "tracking_categories": "trackingCategories",
482
509
  "ledger_account": "ledgerAccount",
@@ -503,6 +530,8 @@ export type InvoiceLineItemInput$Outbound = {
503
530
  category_id?: string | null | undefined;
504
531
  location_id?: string | null | undefined;
505
532
  department_id?: string | null | undefined;
533
+ subsidiary_id?: string | null | undefined;
534
+ prepaid?: boolean | null | undefined;
506
535
  item?: LinkedInvoiceItem$Outbound | undefined;
507
536
  tax_rate?: LinkedTaxRateInput$Outbound | undefined;
508
537
  tracking_categories?:
@@ -536,6 +565,8 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
536
565
  categoryId: z.nullable(z.string()).optional(),
537
566
  locationId: z.nullable(z.string()).optional(),
538
567
  departmentId: z.nullable(z.string()).optional(),
568
+ subsidiaryId: z.nullable(z.string()).optional(),
569
+ prepaid: z.nullable(z.boolean()).optional(),
539
570
  item: LinkedInvoiceItem$outboundSchema.optional(),
540
571
  taxRate: LinkedTaxRateInput$outboundSchema.optional(),
541
572
  trackingCategories: z.nullable(
@@ -557,6 +588,7 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
557
588
  categoryId: "category_id",
558
589
  locationId: "location_id",
559
590
  departmentId: "department_id",
591
+ subsidiaryId: "subsidiary_id",
560
592
  taxRate: "tax_rate",
561
593
  trackingCategories: "tracking_categories",
562
594
  ledgerAccount: "ledger_account",
@@ -0,0 +1,94 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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 LinkedPurchaseOrder = {
12
+ /**
13
+ * The unique identifier for the purchase order.
14
+ */
15
+ id?: string | undefined;
16
+ /**
17
+ * The unique identifier for the purchase order line.
18
+ */
19
+ lineId?: string | null | undefined;
20
+ /**
21
+ * The line number of the purchase order line.
22
+ */
23
+ lineNumber?: string | null | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const LinkedPurchaseOrder$inboundSchema: z.ZodType<
28
+ LinkedPurchaseOrder,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ id: z.string().optional(),
33
+ line_id: z.nullable(z.string()).optional(),
34
+ line_number: z.nullable(z.string()).optional(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "line_id": "lineId",
38
+ "line_number": "lineNumber",
39
+ });
40
+ });
41
+
42
+ /** @internal */
43
+ export type LinkedPurchaseOrder$Outbound = {
44
+ id?: string | undefined;
45
+ line_id?: string | null | undefined;
46
+ line_number?: string | null | undefined;
47
+ };
48
+
49
+ /** @internal */
50
+ export const LinkedPurchaseOrder$outboundSchema: z.ZodType<
51
+ LinkedPurchaseOrder$Outbound,
52
+ z.ZodTypeDef,
53
+ LinkedPurchaseOrder
54
+ > = z.object({
55
+ id: z.string().optional(),
56
+ lineId: z.nullable(z.string()).optional(),
57
+ lineNumber: z.nullable(z.string()).optional(),
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ lineId: "line_id",
61
+ lineNumber: "line_number",
62
+ });
63
+ });
64
+
65
+ /**
66
+ * @internal
67
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
68
+ */
69
+ export namespace LinkedPurchaseOrder$ {
70
+ /** @deprecated use `LinkedPurchaseOrder$inboundSchema` instead. */
71
+ export const inboundSchema = LinkedPurchaseOrder$inboundSchema;
72
+ /** @deprecated use `LinkedPurchaseOrder$outboundSchema` instead. */
73
+ export const outboundSchema = LinkedPurchaseOrder$outboundSchema;
74
+ /** @deprecated use `LinkedPurchaseOrder$Outbound` instead. */
75
+ export type Outbound = LinkedPurchaseOrder$Outbound;
76
+ }
77
+
78
+ export function linkedPurchaseOrderToJSON(
79
+ linkedPurchaseOrder: LinkedPurchaseOrder,
80
+ ): string {
81
+ return JSON.stringify(
82
+ LinkedPurchaseOrder$outboundSchema.parse(linkedPurchaseOrder),
83
+ );
84
+ }
85
+
86
+ export function linkedPurchaseOrderFromJSON(
87
+ jsonString: string,
88
+ ): SafeParseResult<LinkedPurchaseOrder, SDKValidationError> {
89
+ return safeParse(
90
+ jsonString,
91
+ (x) => LinkedPurchaseOrder$inboundSchema.parse(JSON.parse(x)),
92
+ `Failed to parse 'LinkedPurchaseOrder' from JSON`,
93
+ );
94
+ }