@apideck/unify 0.28.3 → 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 (31) hide show
  1. package/examples/package-lock.json +1 -1
  2. package/jsr.json +1 -1
  3. package/lib/config.d.ts +4 -4
  4. package/lib/config.js +4 -4
  5. package/models/components/billlineitem.d.ts +25 -0
  6. package/models/components/billlineitem.d.ts.map +1 -1
  7. package/models/components/billlineitem.js +25 -0
  8. package/models/components/billlineitem.js.map +1 -1
  9. package/models/components/index.d.ts +1 -0
  10. package/models/components/index.d.ts.map +1 -1
  11. package/models/components/index.js +1 -0
  12. package/models/components/index.js.map +1 -1
  13. package/models/components/invoicelineitem.d.ts +20 -0
  14. package/models/components/invoicelineitem.d.ts.map +1 -1
  15. package/models/components/invoicelineitem.js +12 -0
  16. package/models/components/invoicelineitem.js.map +1 -1
  17. package/models/components/linkedpurchaseorder.d.ts +42 -0
  18. package/models/components/linkedpurchaseorder.d.ts.map +1 -0
  19. package/models/components/linkedpurchaseorder.js +74 -0
  20. package/models/components/linkedpurchaseorder.js.map +1 -0
  21. package/models/components/purchaseorder.d.ts +57 -0
  22. package/models/components/purchaseorder.d.ts.map +1 -1
  23. package/models/components/purchaseorder.js +37 -1
  24. package/models/components/purchaseorder.js.map +1 -1
  25. package/package.json +1 -1
  26. package/src/lib/config.ts +4 -4
  27. package/src/models/components/billlineitem.ts +54 -0
  28. package/src/models/components/index.ts +1 -0
  29. package/src/models/components/invoicelineitem.ts +32 -0
  30. package/src/models/components/linkedpurchaseorder.ts +94 -0
  31. package/src/models/components/purchaseorder.ts +67 -0
@@ -38,6 +38,12 @@ import {
38
38
  LinkedLedgerAccountInput$Outbound,
39
39
  LinkedLedgerAccountInput$outboundSchema,
40
40
  } from "./linkedledgeraccountinput.js";
41
+ import {
42
+ LinkedPurchaseOrder,
43
+ LinkedPurchaseOrder$inboundSchema,
44
+ LinkedPurchaseOrder$Outbound,
45
+ LinkedPurchaseOrder$outboundSchema,
46
+ } from "./linkedpurchaseorder.js";
41
47
  import {
42
48
  LinkedTaxRate,
43
49
  LinkedTaxRate$inboundSchema,
@@ -131,9 +137,18 @@ export type BillLineItem = {
131
137
  * The ID of the department
132
138
  */
133
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;
134
148
  item?: LinkedInvoiceItem | undefined;
135
149
  taxRate?: LinkedTaxRate | undefined;
136
150
  ledgerAccount?: LinkedLedgerAccount | null | undefined;
151
+ purchaseOrder?: LinkedPurchaseOrder | null | undefined;
137
152
  /**
138
153
  * A list of linked tracking categories.
139
154
  */
@@ -219,9 +234,18 @@ export type BillLineItemInput = {
219
234
  * The ID of the department
220
235
  */
221
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;
222
245
  item?: LinkedInvoiceItem | undefined;
223
246
  taxRate?: LinkedTaxRateInput | undefined;
224
247
  ledgerAccount?: LinkedLedgerAccountInput | null | undefined;
248
+ purchaseOrder?: LinkedPurchaseOrder | null | undefined;
225
249
  /**
226
250
  * A list of linked tracking categories.
227
251
  */
@@ -282,9 +306,12 @@ export const BillLineItem$inboundSchema: z.ZodType<
282
306
  discount_amount: z.nullable(z.number()).optional(),
283
307
  location_id: z.nullable(z.string()).optional(),
284
308
  department_id: z.nullable(z.string()).optional(),
309
+ subsidiary_id: z.nullable(z.string()).optional(),
310
+ category_id: z.nullable(z.string()).optional(),
285
311
  item: LinkedInvoiceItem$inboundSchema.optional(),
286
312
  tax_rate: LinkedTaxRate$inboundSchema.optional(),
287
313
  ledger_account: z.nullable(LinkedLedgerAccount$inboundSchema).optional(),
314
+ purchase_order: z.nullable(LinkedPurchaseOrder$inboundSchema).optional(),
288
315
  tracking_categories: z.nullable(
289
316
  z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
290
317
  ).optional(),
@@ -311,8 +338,11 @@ export const BillLineItem$inboundSchema: z.ZodType<
311
338
  "discount_amount": "discountAmount",
312
339
  "location_id": "locationId",
313
340
  "department_id": "departmentId",
341
+ "subsidiary_id": "subsidiaryId",
342
+ "category_id": "categoryId",
314
343
  "tax_rate": "taxRate",
315
344
  "ledger_account": "ledgerAccount",
345
+ "purchase_order": "purchaseOrder",
316
346
  "tracking_categories": "trackingCategories",
317
347
  "row_version": "rowVersion",
318
348
  "updated_by": "updatedBy",
@@ -339,9 +369,12 @@ export type BillLineItem$Outbound = {
339
369
  discount_amount?: number | null | undefined;
340
370
  location_id?: string | null | undefined;
341
371
  department_id?: string | null | undefined;
372
+ subsidiary_id?: string | null | undefined;
373
+ category_id?: string | null | undefined;
342
374
  item?: LinkedInvoiceItem$Outbound | undefined;
343
375
  tax_rate?: LinkedTaxRate$Outbound | undefined;
344
376
  ledger_account?: LinkedLedgerAccount$Outbound | null | undefined;
377
+ purchase_order?: LinkedPurchaseOrder$Outbound | null | undefined;
345
378
  tracking_categories?:
346
379
  | Array<LinkedTrackingCategory$Outbound | null>
347
380
  | null
@@ -376,9 +409,12 @@ export const BillLineItem$outboundSchema: z.ZodType<
376
409
  discountAmount: z.nullable(z.number()).optional(),
377
410
  locationId: z.nullable(z.string()).optional(),
378
411
  departmentId: z.nullable(z.string()).optional(),
412
+ subsidiaryId: z.nullable(z.string()).optional(),
413
+ categoryId: z.nullable(z.string()).optional(),
379
414
  item: LinkedInvoiceItem$outboundSchema.optional(),
380
415
  taxRate: LinkedTaxRate$outboundSchema.optional(),
381
416
  ledgerAccount: z.nullable(LinkedLedgerAccount$outboundSchema).optional(),
417
+ purchaseOrder: z.nullable(LinkedPurchaseOrder$outboundSchema).optional(),
382
418
  trackingCategories: z.nullable(
383
419
  z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
384
420
  ).optional(),
@@ -401,8 +437,11 @@ export const BillLineItem$outboundSchema: z.ZodType<
401
437
  discountAmount: "discount_amount",
402
438
  locationId: "location_id",
403
439
  departmentId: "department_id",
440
+ subsidiaryId: "subsidiary_id",
441
+ categoryId: "category_id",
404
442
  taxRate: "tax_rate",
405
443
  ledgerAccount: "ledger_account",
444
+ purchaseOrder: "purchase_order",
406
445
  trackingCategories: "tracking_categories",
407
446
  rowVersion: "row_version",
408
447
  updatedBy: "updated_by",
@@ -459,9 +498,12 @@ export const BillLineItemInput$inboundSchema: z.ZodType<
459
498
  discount_amount: z.nullable(z.number()).optional(),
460
499
  location_id: z.nullable(z.string()).optional(),
461
500
  department_id: z.nullable(z.string()).optional(),
501
+ subsidiary_id: z.nullable(z.string()).optional(),
502
+ category_id: z.nullable(z.string()).optional(),
462
503
  item: LinkedInvoiceItem$inboundSchema.optional(),
463
504
  tax_rate: LinkedTaxRateInput$inboundSchema.optional(),
464
505
  ledger_account: z.nullable(LinkedLedgerAccountInput$inboundSchema).optional(),
506
+ purchase_order: z.nullable(LinkedPurchaseOrder$inboundSchema).optional(),
465
507
  tracking_categories: z.nullable(
466
508
  z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
467
509
  ).optional(),
@@ -480,8 +522,11 @@ export const BillLineItemInput$inboundSchema: z.ZodType<
480
522
  "discount_amount": "discountAmount",
481
523
  "location_id": "locationId",
482
524
  "department_id": "departmentId",
525
+ "subsidiary_id": "subsidiaryId",
526
+ "category_id": "categoryId",
483
527
  "tax_rate": "taxRate",
484
528
  "ledger_account": "ledgerAccount",
529
+ "purchase_order": "purchaseOrder",
485
530
  "tracking_categories": "trackingCategories",
486
531
  "row_version": "rowVersion",
487
532
  });
@@ -503,9 +548,12 @@ export type BillLineItemInput$Outbound = {
503
548
  discount_amount?: number | null | undefined;
504
549
  location_id?: string | null | undefined;
505
550
  department_id?: string | null | undefined;
551
+ subsidiary_id?: string | null | undefined;
552
+ category_id?: string | null | undefined;
506
553
  item?: LinkedInvoiceItem$Outbound | undefined;
507
554
  tax_rate?: LinkedTaxRateInput$Outbound | undefined;
508
555
  ledger_account?: LinkedLedgerAccountInput$Outbound | null | undefined;
556
+ purchase_order?: LinkedPurchaseOrder$Outbound | null | undefined;
509
557
  tracking_categories?:
510
558
  | Array<LinkedTrackingCategory$Outbound | null>
511
559
  | null
@@ -535,9 +583,12 @@ export const BillLineItemInput$outboundSchema: z.ZodType<
535
583
  discountAmount: z.nullable(z.number()).optional(),
536
584
  locationId: z.nullable(z.string()).optional(),
537
585
  departmentId: z.nullable(z.string()).optional(),
586
+ subsidiaryId: z.nullable(z.string()).optional(),
587
+ categoryId: z.nullable(z.string()).optional(),
538
588
  item: LinkedInvoiceItem$outboundSchema.optional(),
539
589
  taxRate: LinkedTaxRateInput$outboundSchema.optional(),
540
590
  ledgerAccount: z.nullable(LinkedLedgerAccountInput$outboundSchema).optional(),
591
+ purchaseOrder: z.nullable(LinkedPurchaseOrder$outboundSchema).optional(),
541
592
  trackingCategories: z.nullable(
542
593
  z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
543
594
  ).optional(),
@@ -556,8 +607,11 @@ export const BillLineItemInput$outboundSchema: z.ZodType<
556
607
  discountAmount: "discount_amount",
557
608
  locationId: "location_id",
558
609
  departmentId: "department_id",
610
+ subsidiaryId: "subsidiary_id",
611
+ categoryId: "category_id",
559
612
  taxRate: "tax_rate",
560
613
  ledgerAccount: "ledger_account",
614
+ purchaseOrder: "purchase_order",
561
615
  trackingCategories: "tracking_categories",
562
616
  rowVersion: "row_version",
563
617
  });
@@ -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";
@@ -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
+ }
@@ -89,6 +89,20 @@ export const PurchaseOrderStatus = {
89
89
  } as const;
90
90
  export type PurchaseOrderStatus = ClosedEnum<typeof PurchaseOrderStatus>;
91
91
 
92
+ /**
93
+ * Type of amortization
94
+ */
95
+ export const AmortizationType = {
96
+ Manual: "manual",
97
+ Receipt: "receipt",
98
+ Schedule: "schedule",
99
+ Other: "other",
100
+ } as const;
101
+ /**
102
+ * Type of amortization
103
+ */
104
+ export type AmortizationType = ClosedEnum<typeof AmortizationType>;
105
+
92
106
  export type PurchaseOrder = {
93
107
  /**
94
108
  * A unique identifier for an object.
@@ -179,6 +193,10 @@ export type PurchaseOrder = {
179
193
  * Payment method used for the transaction, such as cash, credit card, bank transfer, or check
180
194
  */
181
195
  paymentMethod?: string | null | undefined;
196
+ /**
197
+ * Type of amortization
198
+ */
199
+ amortizationType?: AmortizationType | null | undefined;
182
200
  /**
183
201
  * Applicable tax id/code override if tax is not supplied on a line item basis.
184
202
  */
@@ -191,6 +209,10 @@ export type PurchaseOrder = {
191
209
  * Message for the supplier. This text appears on the Purchase Order.
192
210
  */
193
211
  memo?: string | null | undefined;
212
+ /**
213
+ * Internal notes for the purchase order.
214
+ */
215
+ notes?: string | null | undefined;
194
216
  /**
195
217
  * A list of linked tracking categories.
196
218
  */
@@ -308,6 +330,10 @@ export type PurchaseOrderInput = {
308
330
  * Payment method used for the transaction, such as cash, credit card, bank transfer, or check
309
331
  */
310
332
  paymentMethod?: string | null | undefined;
333
+ /**
334
+ * Type of amortization
335
+ */
336
+ amortizationType?: AmortizationType | null | undefined;
311
337
  /**
312
338
  * Applicable tax id/code override if tax is not supplied on a line item basis.
313
339
  */
@@ -320,6 +346,10 @@ export type PurchaseOrderInput = {
320
346
  * Message for the supplier. This text appears on the Purchase Order.
321
347
  */
322
348
  memo?: string | null | undefined;
349
+ /**
350
+ * Internal notes for the purchase order.
351
+ */
352
+ notes?: string | null | undefined;
323
353
  /**
324
354
  * A list of linked tracking categories.
325
355
  */
@@ -356,6 +386,27 @@ export namespace PurchaseOrderStatus$ {
356
386
  export const outboundSchema = PurchaseOrderStatus$outboundSchema;
357
387
  }
358
388
 
389
+ /** @internal */
390
+ export const AmortizationType$inboundSchema: z.ZodNativeEnum<
391
+ typeof AmortizationType
392
+ > = z.nativeEnum(AmortizationType);
393
+
394
+ /** @internal */
395
+ export const AmortizationType$outboundSchema: z.ZodNativeEnum<
396
+ typeof AmortizationType
397
+ > = AmortizationType$inboundSchema;
398
+
399
+ /**
400
+ * @internal
401
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
402
+ */
403
+ export namespace AmortizationType$ {
404
+ /** @deprecated use `AmortizationType$inboundSchema` instead. */
405
+ export const inboundSchema = AmortizationType$inboundSchema;
406
+ /** @deprecated use `AmortizationType$outboundSchema` instead. */
407
+ export const outboundSchema = AmortizationType$outboundSchema;
408
+ }
409
+
359
410
  /** @internal */
360
411
  export const PurchaseOrder$inboundSchema: z.ZodType<
361
412
  PurchaseOrder,
@@ -390,9 +441,11 @@ export const PurchaseOrder$inboundSchema: z.ZodType<
390
441
  accounting_by_row: z.nullable(z.boolean()).optional(),
391
442
  due_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
392
443
  payment_method: z.nullable(z.string()).optional(),
444
+ amortization_type: z.nullable(AmortizationType$inboundSchema).optional(),
393
445
  tax_code: z.nullable(z.string()).optional(),
394
446
  channel: z.nullable(z.string()).optional(),
395
447
  memo: z.nullable(z.string()).optional(),
448
+ notes: z.nullable(z.string()).optional(),
396
449
  tracking_categories: z.nullable(
397
450
  z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
398
451
  ).optional(),
@@ -430,6 +483,7 @@ export const PurchaseOrder$inboundSchema: z.ZodType<
430
483
  "accounting_by_row": "accountingByRow",
431
484
  "due_date": "dueDate",
432
485
  "payment_method": "paymentMethod",
486
+ "amortization_type": "amortizationType",
433
487
  "tax_code": "taxCode",
434
488
  "tracking_categories": "trackingCategories",
435
489
  "custom_mappings": "customMappings",
@@ -471,9 +525,11 @@ export type PurchaseOrder$Outbound = {
471
525
  accounting_by_row?: boolean | null | undefined;
472
526
  due_date?: string | null | undefined;
473
527
  payment_method?: string | null | undefined;
528
+ amortization_type?: string | null | undefined;
474
529
  tax_code?: string | null | undefined;
475
530
  channel?: string | null | undefined;
476
531
  memo?: string | null | undefined;
532
+ notes?: string | null | undefined;
477
533
  tracking_categories?:
478
534
  | Array<LinkedTrackingCategory$Outbound | null>
479
535
  | null
@@ -525,9 +581,11 @@ export const PurchaseOrder$outboundSchema: z.ZodType<
525
581
  dueDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
526
582
  .optional(),
527
583
  paymentMethod: z.nullable(z.string()).optional(),
584
+ amortizationType: z.nullable(AmortizationType$outboundSchema).optional(),
528
585
  taxCode: z.nullable(z.string()).optional(),
529
586
  channel: z.nullable(z.string()).optional(),
530
587
  memo: z.nullable(z.string()).optional(),
588
+ notes: z.nullable(z.string()).optional(),
531
589
  trackingCategories: z.nullable(
532
590
  z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
533
591
  ).optional(),
@@ -561,6 +619,7 @@ export const PurchaseOrder$outboundSchema: z.ZodType<
561
619
  accountingByRow: "accounting_by_row",
562
620
  dueDate: "due_date",
563
621
  paymentMethod: "payment_method",
622
+ amortizationType: "amortization_type",
564
623
  taxCode: "tax_code",
565
624
  trackingCategories: "tracking_categories",
566
625
  customMappings: "custom_mappings",
@@ -633,9 +692,11 @@ export const PurchaseOrderInput$inboundSchema: z.ZodType<
633
692
  accounting_by_row: z.nullable(z.boolean()).optional(),
634
693
  due_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
635
694
  payment_method: z.nullable(z.string()).optional(),
695
+ amortization_type: z.nullable(AmortizationType$inboundSchema).optional(),
636
696
  tax_code: z.nullable(z.string()).optional(),
637
697
  channel: z.nullable(z.string()).optional(),
638
698
  memo: z.nullable(z.string()).optional(),
699
+ notes: z.nullable(z.string()).optional(),
639
700
  tracking_categories: z.nullable(
640
701
  z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
641
702
  ).optional(),
@@ -663,6 +724,7 @@ export const PurchaseOrderInput$inboundSchema: z.ZodType<
663
724
  "accounting_by_row": "accountingByRow",
664
725
  "due_date": "dueDate",
665
726
  "payment_method": "paymentMethod",
727
+ "amortization_type": "amortizationType",
666
728
  "tax_code": "taxCode",
667
729
  "tracking_categories": "trackingCategories",
668
730
  "custom_fields": "customFields",
@@ -697,9 +759,11 @@ export type PurchaseOrderInput$Outbound = {
697
759
  accounting_by_row?: boolean | null | undefined;
698
760
  due_date?: string | null | undefined;
699
761
  payment_method?: string | null | undefined;
762
+ amortization_type?: string | null | undefined;
700
763
  tax_code?: string | null | undefined;
701
764
  channel?: string | null | undefined;
702
765
  memo?: string | null | undefined;
766
+ notes?: string | null | undefined;
703
767
  tracking_categories?:
704
768
  | Array<LinkedTrackingCategory$Outbound | null>
705
769
  | null
@@ -744,9 +808,11 @@ export const PurchaseOrderInput$outboundSchema: z.ZodType<
744
808
  dueDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
745
809
  .optional(),
746
810
  paymentMethod: z.nullable(z.string()).optional(),
811
+ amortizationType: z.nullable(AmortizationType$outboundSchema).optional(),
747
812
  taxCode: z.nullable(z.string()).optional(),
748
813
  channel: z.nullable(z.string()).optional(),
749
814
  memo: z.nullable(z.string()).optional(),
815
+ notes: z.nullable(z.string()).optional(),
750
816
  trackingCategories: z.nullable(
751
817
  z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
752
818
  ).optional(),
@@ -774,6 +840,7 @@ export const PurchaseOrderInput$outboundSchema: z.ZodType<
774
840
  accountingByRow: "accounting_by_row",
775
841
  dueDate: "due_date",
776
842
  paymentMethod: "payment_method",
843
+ amortizationType: "amortization_type",
777
844
  taxCode: "tax_code",
778
845
  trackingCategories: "tracking_categories",
779
846
  customFields: "custom_fields",