@apideck/unify 0.29.2 → 0.29.3
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/docs/sdks/quotes/README.md +4 -0
- package/examples/accountingTaxRatesList.example.ts +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/models/components/applicant.d.ts +74 -0
- package/models/components/applicant.d.ts.map +1 -1
- package/models/components/applicant.js +46 -1
- package/models/components/applicant.js.map +1 -1
- package/models/components/bill.d.ts +114 -2
- package/models/components/bill.d.ts.map +1 -1
- package/models/components/bill.js +87 -1
- package/models/components/bill.js.map +1 -1
- package/models/components/billlineitem.d.ts +91 -0
- package/models/components/billlineitem.d.ts.map +1 -1
- package/models/components/billlineitem.js +61 -0
- package/models/components/billlineitem.js.map +1 -1
- package/models/components/billpayment.d.ts +2 -2
- package/models/components/creditnote.d.ts +12 -2
- package/models/components/creditnote.d.ts.map +1 -1
- package/models/components/creditnote.js +8 -0
- package/models/components/creditnote.js.map +1 -1
- package/models/components/customer.d.ts +2 -2
- package/models/components/expense.d.ts +2 -2
- package/models/components/index.d.ts +2 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +22 -2
- package/models/components/invoice.d.ts.map +1 -1
- package/models/components/invoice.js +16 -0
- package/models/components/invoice.js.map +1 -1
- package/models/components/invoicelineitem.d.ts +7 -50
- package/models/components/invoicelineitem.d.ts.map +1 -1
- package/models/components/invoicelineitem.js +6 -37
- package/models/components/invoicelineitem.js.map +1 -1
- package/models/components/journalentry.d.ts +2 -2
- package/models/components/linkedattachment.d.ts +57 -0
- package/models/components/linkedattachment.d.ts.map +1 -0
- package/models/components/linkedattachment.js +90 -0
- package/models/components/linkedattachment.js.map +1 -0
- package/models/components/linkedworktag.d.ts +37 -0
- package/models/components/linkedworktag.d.ts.map +1 -0
- package/models/components/linkedworktag.js +71 -0
- package/models/components/linkedworktag.js.map +1 -0
- package/models/components/payment.d.ts +1 -1
- package/models/components/paymentinput.d.ts +1 -1
- package/models/components/purchaseorder.d.ts +21 -11
- package/models/components/purchaseorder.d.ts.map +1 -1
- package/models/components/purchaseorder.js +27 -15
- package/models/components/purchaseorder.js.map +1 -1
- package/models/components/quote.d.ts +12 -2
- package/models/components/quote.d.ts.map +1 -1
- package/models/components/quote.js +8 -0
- package/models/components/quote.js.map +1 -1
- package/models/components/supplier.d.ts +2 -2
- package/package.json +1 -1
- package/src/__tests__/quotes.test.ts +3 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/applicant.ts +90 -0
- package/src/models/components/bill.ts +178 -2
- package/src/models/components/billlineitem.ts +156 -0
- package/src/models/components/billpayment.ts +2 -2
- package/src/models/components/creditnote.ts +20 -2
- package/src/models/components/customer.ts +2 -2
- package/src/models/components/expense.ts +2 -2
- package/src/models/components/index.ts +2 -0
- package/src/models/components/invoice.ts +38 -2
- package/src/models/components/invoicelineitem.ts +16 -60
- package/src/models/components/journalentry.ts +2 -2
- package/src/models/components/linkedattachment.ts +115 -0
- package/src/models/components/linkedworktag.ts +72 -0
- package/src/models/components/payment.ts +1 -1
- package/src/models/components/paymentinput.ts +1 -1
- package/src/models/components/purchaseorder.ts +45 -21
- package/src/models/components/quote.ts +20 -2
- package/src/models/components/supplier.ts +2 -2
|
@@ -50,6 +50,12 @@ import {
|
|
|
50
50
|
LinkedTrackingCategory$Outbound,
|
|
51
51
|
LinkedTrackingCategory$outboundSchema,
|
|
52
52
|
} from "./linkedtrackingcategory.js";
|
|
53
|
+
import {
|
|
54
|
+
LinkedWorktag,
|
|
55
|
+
LinkedWorktag$inboundSchema,
|
|
56
|
+
LinkedWorktag$Outbound,
|
|
57
|
+
LinkedWorktag$outboundSchema,
|
|
58
|
+
} from "./linkedworktag.js";
|
|
53
59
|
|
|
54
60
|
/**
|
|
55
61
|
* Item type
|
|
@@ -67,19 +73,6 @@ export const InvoiceLineItemType = {
|
|
|
67
73
|
*/
|
|
68
74
|
export type InvoiceLineItemType = ClosedEnum<typeof InvoiceLineItemType>;
|
|
69
75
|
|
|
70
|
-
/**
|
|
71
|
-
* Budget of the line item
|
|
72
|
-
*/
|
|
73
|
-
export const Budget = {
|
|
74
|
-
OutOfBudget: "out_of_budget",
|
|
75
|
-
InBudget: "in_budget",
|
|
76
|
-
Other: "other",
|
|
77
|
-
} as const;
|
|
78
|
-
/**
|
|
79
|
-
* Budget of the line item
|
|
80
|
-
*/
|
|
81
|
-
export type Budget = ClosedEnum<typeof Budget>;
|
|
82
|
-
|
|
83
76
|
export type InvoiceLineItem = {
|
|
84
77
|
/**
|
|
85
78
|
* A unique identifier for an object.
|
|
@@ -169,13 +162,9 @@ export type InvoiceLineItem = {
|
|
|
169
162
|
*/
|
|
170
163
|
taxMethod?: string | null | undefined;
|
|
171
164
|
/**
|
|
172
|
-
*
|
|
165
|
+
* Worktags of the line item. This is currently only supported in Workday.
|
|
173
166
|
*/
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* ID of the project of the line item
|
|
177
|
-
*/
|
|
178
|
-
projectId?: string | null | undefined;
|
|
167
|
+
worktags?: Array<LinkedWorktag | null> | undefined;
|
|
179
168
|
taxRate?: LinkedTaxRate | undefined;
|
|
180
169
|
/**
|
|
181
170
|
* A list of linked tracking categories.
|
|
@@ -294,13 +283,9 @@ export type InvoiceLineItemInput = {
|
|
|
294
283
|
*/
|
|
295
284
|
taxMethod?: string | null | undefined;
|
|
296
285
|
/**
|
|
297
|
-
*
|
|
298
|
-
*/
|
|
299
|
-
budget?: Budget | null | undefined;
|
|
300
|
-
/**
|
|
301
|
-
* ID of the project of the line item
|
|
286
|
+
* Worktags of the line item. This is currently only supported in Workday.
|
|
302
287
|
*/
|
|
303
|
-
|
|
288
|
+
worktags?: Array<LinkedWorktag | null> | undefined;
|
|
304
289
|
taxRate?: LinkedTaxRateInput | undefined;
|
|
305
290
|
/**
|
|
306
291
|
* A list of linked tracking categories.
|
|
@@ -335,25 +320,6 @@ export namespace InvoiceLineItemType$ {
|
|
|
335
320
|
export const outboundSchema = InvoiceLineItemType$outboundSchema;
|
|
336
321
|
}
|
|
337
322
|
|
|
338
|
-
/** @internal */
|
|
339
|
-
export const Budget$inboundSchema: z.ZodNativeEnum<typeof Budget> = z
|
|
340
|
-
.nativeEnum(Budget);
|
|
341
|
-
|
|
342
|
-
/** @internal */
|
|
343
|
-
export const Budget$outboundSchema: z.ZodNativeEnum<typeof Budget> =
|
|
344
|
-
Budget$inboundSchema;
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* @internal
|
|
348
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
349
|
-
*/
|
|
350
|
-
export namespace Budget$ {
|
|
351
|
-
/** @deprecated use `Budget$inboundSchema` instead. */
|
|
352
|
-
export const inboundSchema = Budget$inboundSchema;
|
|
353
|
-
/** @deprecated use `Budget$outboundSchema` instead. */
|
|
354
|
-
export const outboundSchema = Budget$outboundSchema;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
323
|
/** @internal */
|
|
358
324
|
export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
359
325
|
InvoiceLineItem,
|
|
@@ -384,8 +350,7 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
|
384
350
|
tax_applicable_on: z.nullable(z.string()).optional(),
|
|
385
351
|
tax_recoverability: z.nullable(z.string()).optional(),
|
|
386
352
|
tax_method: z.nullable(z.string()).optional(),
|
|
387
|
-
|
|
388
|
-
project_id: z.nullable(z.string()).optional(),
|
|
353
|
+
worktags: z.array(z.nullable(LinkedWorktag$inboundSchema)).optional(),
|
|
389
354
|
tax_rate: LinkedTaxRate$inboundSchema.optional(),
|
|
390
355
|
tracking_categories: z.nullable(
|
|
391
356
|
z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
|
|
@@ -419,7 +384,6 @@ export const InvoiceLineItem$inboundSchema: z.ZodType<
|
|
|
419
384
|
"tax_applicable_on": "taxApplicableOn",
|
|
420
385
|
"tax_recoverability": "taxRecoverability",
|
|
421
386
|
"tax_method": "taxMethod",
|
|
422
|
-
"project_id": "projectId",
|
|
423
387
|
"tax_rate": "taxRate",
|
|
424
388
|
"tracking_categories": "trackingCategories",
|
|
425
389
|
"ledger_account": "ledgerAccount",
|
|
@@ -458,8 +422,7 @@ export type InvoiceLineItem$Outbound = {
|
|
|
458
422
|
tax_applicable_on?: string | null | undefined;
|
|
459
423
|
tax_recoverability?: string | null | undefined;
|
|
460
424
|
tax_method?: string | null | undefined;
|
|
461
|
-
|
|
462
|
-
project_id?: string | null | undefined;
|
|
425
|
+
worktags?: Array<LinkedWorktag$Outbound | null> | undefined;
|
|
463
426
|
tax_rate?: LinkedTaxRate$Outbound | undefined;
|
|
464
427
|
tracking_categories?:
|
|
465
428
|
| Array<LinkedTrackingCategory$Outbound | null>
|
|
@@ -504,8 +467,7 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
|
|
|
504
467
|
taxApplicableOn: z.nullable(z.string()).optional(),
|
|
505
468
|
taxRecoverability: z.nullable(z.string()).optional(),
|
|
506
469
|
taxMethod: z.nullable(z.string()).optional(),
|
|
507
|
-
|
|
508
|
-
projectId: z.nullable(z.string()).optional(),
|
|
470
|
+
worktags: z.array(z.nullable(LinkedWorktag$outboundSchema)).optional(),
|
|
509
471
|
taxRate: LinkedTaxRate$outboundSchema.optional(),
|
|
510
472
|
trackingCategories: z.nullable(
|
|
511
473
|
z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
|
|
@@ -535,7 +497,6 @@ export const InvoiceLineItem$outboundSchema: z.ZodType<
|
|
|
535
497
|
taxApplicableOn: "tax_applicable_on",
|
|
536
498
|
taxRecoverability: "tax_recoverability",
|
|
537
499
|
taxMethod: "tax_method",
|
|
538
|
-
projectId: "project_id",
|
|
539
500
|
taxRate: "tax_rate",
|
|
540
501
|
trackingCategories: "tracking_categories",
|
|
541
502
|
ledgerAccount: "ledger_account",
|
|
@@ -607,8 +568,7 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
|
|
|
607
568
|
tax_applicable_on: z.nullable(z.string()).optional(),
|
|
608
569
|
tax_recoverability: z.nullable(z.string()).optional(),
|
|
609
570
|
tax_method: z.nullable(z.string()).optional(),
|
|
610
|
-
|
|
611
|
-
project_id: z.nullable(z.string()).optional(),
|
|
571
|
+
worktags: z.array(z.nullable(LinkedWorktag$inboundSchema)).optional(),
|
|
612
572
|
tax_rate: LinkedTaxRateInput$inboundSchema.optional(),
|
|
613
573
|
tracking_categories: z.nullable(
|
|
614
574
|
z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
|
|
@@ -634,7 +594,6 @@ export const InvoiceLineItemInput$inboundSchema: z.ZodType<
|
|
|
634
594
|
"tax_applicable_on": "taxApplicableOn",
|
|
635
595
|
"tax_recoverability": "taxRecoverability",
|
|
636
596
|
"tax_method": "taxMethod",
|
|
637
|
-
"project_id": "projectId",
|
|
638
597
|
"tax_rate": "taxRate",
|
|
639
598
|
"tracking_categories": "trackingCategories",
|
|
640
599
|
"ledger_account": "ledgerAccount",
|
|
@@ -669,8 +628,7 @@ export type InvoiceLineItemInput$Outbound = {
|
|
|
669
628
|
tax_applicable_on?: string | null | undefined;
|
|
670
629
|
tax_recoverability?: string | null | undefined;
|
|
671
630
|
tax_method?: string | null | undefined;
|
|
672
|
-
|
|
673
|
-
project_id?: string | null | undefined;
|
|
631
|
+
worktags?: Array<LinkedWorktag$Outbound | null> | undefined;
|
|
674
632
|
tax_rate?: LinkedTaxRateInput$Outbound | undefined;
|
|
675
633
|
tracking_categories?:
|
|
676
634
|
| Array<LinkedTrackingCategory$Outbound | null>
|
|
@@ -711,8 +669,7 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
|
|
|
711
669
|
taxApplicableOn: z.nullable(z.string()).optional(),
|
|
712
670
|
taxRecoverability: z.nullable(z.string()).optional(),
|
|
713
671
|
taxMethod: z.nullable(z.string()).optional(),
|
|
714
|
-
|
|
715
|
-
projectId: z.nullable(z.string()).optional(),
|
|
672
|
+
worktags: z.array(z.nullable(LinkedWorktag$outboundSchema)).optional(),
|
|
716
673
|
taxRate: LinkedTaxRateInput$outboundSchema.optional(),
|
|
717
674
|
trackingCategories: z.nullable(
|
|
718
675
|
z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
|
|
@@ -738,7 +695,6 @@ export const InvoiceLineItemInput$outboundSchema: z.ZodType<
|
|
|
738
695
|
taxApplicableOn: "tax_applicable_on",
|
|
739
696
|
taxRecoverability: "tax_recoverability",
|
|
740
697
|
taxMethod: "tax_method",
|
|
741
|
-
projectId: "project_id",
|
|
742
698
|
taxRate: "tax_rate",
|
|
743
699
|
trackingCategories: "tracking_categories",
|
|
744
700
|
ledgerAccount: "ledger_account",
|
|
@@ -78,7 +78,7 @@ export type JournalEntry = {
|
|
|
78
78
|
*/
|
|
79
79
|
currency?: Currency | null | undefined;
|
|
80
80
|
/**
|
|
81
|
-
* The company
|
|
81
|
+
* The company ID the transaction belongs to
|
|
82
82
|
*/
|
|
83
83
|
companyId?: string | null | undefined;
|
|
84
84
|
/**
|
|
@@ -166,7 +166,7 @@ export type JournalEntryInput = {
|
|
|
166
166
|
*/
|
|
167
167
|
currency?: Currency | null | undefined;
|
|
168
168
|
/**
|
|
169
|
-
* The company
|
|
169
|
+
* The company ID the transaction belongs to
|
|
170
170
|
*/
|
|
171
171
|
companyId?: string | null | undefined;
|
|
172
172
|
/**
|
|
@@ -0,0 +1,115 @@
|
|
|
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 LinkedAttachment = {
|
|
12
|
+
/**
|
|
13
|
+
* The name of the file
|
|
14
|
+
*/
|
|
15
|
+
name?: string | null | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The MIME type of the file.
|
|
18
|
+
*/
|
|
19
|
+
mimeType?: string | null | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Whether the file is c ompressed.
|
|
22
|
+
*/
|
|
23
|
+
isCompressed?: boolean | null | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The encoding of the file.
|
|
26
|
+
*/
|
|
27
|
+
encoding?: string | null | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The content of the file.
|
|
30
|
+
*/
|
|
31
|
+
content?: string | null | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* The notes of the file.
|
|
34
|
+
*/
|
|
35
|
+
notes?: string | null | undefined;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const LinkedAttachment$inboundSchema: z.ZodType<
|
|
40
|
+
LinkedAttachment,
|
|
41
|
+
z.ZodTypeDef,
|
|
42
|
+
unknown
|
|
43
|
+
> = z.object({
|
|
44
|
+
name: z.nullable(z.string()).optional(),
|
|
45
|
+
mime_type: z.nullable(z.string()).optional(),
|
|
46
|
+
is_compressed: z.nullable(z.boolean()).optional(),
|
|
47
|
+
encoding: z.nullable(z.string()).optional(),
|
|
48
|
+
content: z.nullable(z.string()).optional(),
|
|
49
|
+
notes: z.nullable(z.string()).optional(),
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
"mime_type": "mimeType",
|
|
53
|
+
"is_compressed": "isCompressed",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export type LinkedAttachment$Outbound = {
|
|
59
|
+
name?: string | null | undefined;
|
|
60
|
+
mime_type?: string | null | undefined;
|
|
61
|
+
is_compressed?: boolean | null | undefined;
|
|
62
|
+
encoding?: string | null | undefined;
|
|
63
|
+
content?: string | null | undefined;
|
|
64
|
+
notes?: string | null | undefined;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const LinkedAttachment$outboundSchema: z.ZodType<
|
|
69
|
+
LinkedAttachment$Outbound,
|
|
70
|
+
z.ZodTypeDef,
|
|
71
|
+
LinkedAttachment
|
|
72
|
+
> = z.object({
|
|
73
|
+
name: z.nullable(z.string()).optional(),
|
|
74
|
+
mimeType: z.nullable(z.string()).optional(),
|
|
75
|
+
isCompressed: z.nullable(z.boolean()).optional(),
|
|
76
|
+
encoding: z.nullable(z.string()).optional(),
|
|
77
|
+
content: z.nullable(z.string()).optional(),
|
|
78
|
+
notes: z.nullable(z.string()).optional(),
|
|
79
|
+
}).transform((v) => {
|
|
80
|
+
return remap$(v, {
|
|
81
|
+
mimeType: "mime_type",
|
|
82
|
+
isCompressed: "is_compressed",
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @internal
|
|
88
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
89
|
+
*/
|
|
90
|
+
export namespace LinkedAttachment$ {
|
|
91
|
+
/** @deprecated use `LinkedAttachment$inboundSchema` instead. */
|
|
92
|
+
export const inboundSchema = LinkedAttachment$inboundSchema;
|
|
93
|
+
/** @deprecated use `LinkedAttachment$outboundSchema` instead. */
|
|
94
|
+
export const outboundSchema = LinkedAttachment$outboundSchema;
|
|
95
|
+
/** @deprecated use `LinkedAttachment$Outbound` instead. */
|
|
96
|
+
export type Outbound = LinkedAttachment$Outbound;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function linkedAttachmentToJSON(
|
|
100
|
+
linkedAttachment: LinkedAttachment,
|
|
101
|
+
): string {
|
|
102
|
+
return JSON.stringify(
|
|
103
|
+
LinkedAttachment$outboundSchema.parse(linkedAttachment),
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function linkedAttachmentFromJSON(
|
|
108
|
+
jsonString: string,
|
|
109
|
+
): SafeParseResult<LinkedAttachment, SDKValidationError> {
|
|
110
|
+
return safeParse(
|
|
111
|
+
jsonString,
|
|
112
|
+
(x) => LinkedAttachment$inboundSchema.parse(JSON.parse(x)),
|
|
113
|
+
`Failed to parse 'LinkedAttachment' from JSON`,
|
|
114
|
+
);
|
|
115
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type LinkedWorktag = {
|
|
11
|
+
/**
|
|
12
|
+
* The unique identifier for the worktag.
|
|
13
|
+
*/
|
|
14
|
+
id?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The value of the worktag.
|
|
17
|
+
*/
|
|
18
|
+
value?: string | null | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const LinkedWorktag$inboundSchema: z.ZodType<
|
|
23
|
+
LinkedWorktag,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
id: z.string().optional(),
|
|
28
|
+
value: z.nullable(z.string()).optional(),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type LinkedWorktag$Outbound = {
|
|
33
|
+
id?: string | undefined;
|
|
34
|
+
value?: string | null | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const LinkedWorktag$outboundSchema: z.ZodType<
|
|
39
|
+
LinkedWorktag$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
LinkedWorktag
|
|
42
|
+
> = z.object({
|
|
43
|
+
id: z.string().optional(),
|
|
44
|
+
value: z.nullable(z.string()).optional(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace LinkedWorktag$ {
|
|
52
|
+
/** @deprecated use `LinkedWorktag$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = LinkedWorktag$inboundSchema;
|
|
54
|
+
/** @deprecated use `LinkedWorktag$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = LinkedWorktag$outboundSchema;
|
|
56
|
+
/** @deprecated use `LinkedWorktag$Outbound` instead. */
|
|
57
|
+
export type Outbound = LinkedWorktag$Outbound;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function linkedWorktagToJSON(linkedWorktag: LinkedWorktag): string {
|
|
61
|
+
return JSON.stringify(LinkedWorktag$outboundSchema.parse(linkedWorktag));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function linkedWorktagFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<LinkedWorktag, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => LinkedWorktag$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'LinkedWorktag' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -130,7 +130,7 @@ export type Payment = {
|
|
|
130
130
|
*/
|
|
131
131
|
supplier?: DeprecatedLinkedSupplier | null | undefined;
|
|
132
132
|
/**
|
|
133
|
-
* The company
|
|
133
|
+
* The company ID the transaction belongs to
|
|
134
134
|
*/
|
|
135
135
|
companyId?: string | null | undefined;
|
|
136
136
|
/**
|
|
@@ -122,7 +122,7 @@ export type PaymentInput = {
|
|
|
122
122
|
*/
|
|
123
123
|
supplier?: DeprecatedLinkedSupplierInput | null | undefined;
|
|
124
124
|
/**
|
|
125
|
-
* The company
|
|
125
|
+
* The company ID the transaction belongs to
|
|
126
126
|
*/
|
|
127
127
|
companyId?: string | null | undefined;
|
|
128
128
|
/**
|
|
@@ -92,7 +92,7 @@ export type PurchaseOrderStatus = ClosedEnum<typeof PurchaseOrderStatus>;
|
|
|
92
92
|
/**
|
|
93
93
|
* Type of amortization
|
|
94
94
|
*/
|
|
95
|
-
export const
|
|
95
|
+
export const PurchaseOrderAmortizationType = {
|
|
96
96
|
Manual: "manual",
|
|
97
97
|
Receipt: "receipt",
|
|
98
98
|
Schedule: "schedule",
|
|
@@ -101,7 +101,9 @@ export const AmortizationType = {
|
|
|
101
101
|
/**
|
|
102
102
|
* Type of amortization
|
|
103
103
|
*/
|
|
104
|
-
export type
|
|
104
|
+
export type PurchaseOrderAmortizationType = ClosedEnum<
|
|
105
|
+
typeof PurchaseOrderAmortizationType
|
|
106
|
+
>;
|
|
105
107
|
|
|
106
108
|
export type PurchaseOrder = {
|
|
107
109
|
/**
|
|
@@ -129,9 +131,13 @@ export type PurchaseOrder = {
|
|
|
129
131
|
*/
|
|
130
132
|
subsidiaryId?: string | null | undefined;
|
|
131
133
|
/**
|
|
132
|
-
* The company
|
|
134
|
+
* The company ID the transaction belongs to
|
|
133
135
|
*/
|
|
134
136
|
companyId?: string | null | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* The ID of the department
|
|
139
|
+
*/
|
|
140
|
+
departmentId?: string | null | undefined;
|
|
135
141
|
status?: PurchaseOrderStatus | null | undefined;
|
|
136
142
|
/**
|
|
137
143
|
* Date purchase order was issued - YYYY-MM-DD.
|
|
@@ -201,7 +207,7 @@ export type PurchaseOrder = {
|
|
|
201
207
|
/**
|
|
202
208
|
* Type of amortization
|
|
203
209
|
*/
|
|
204
|
-
amortizationType?:
|
|
210
|
+
amortizationType?: PurchaseOrderAmortizationType | null | undefined;
|
|
205
211
|
/**
|
|
206
212
|
* Applicable tax id/code override if tax is not supplied on a line item basis.
|
|
207
213
|
*/
|
|
@@ -283,9 +289,13 @@ export type PurchaseOrderInput = {
|
|
|
283
289
|
*/
|
|
284
290
|
subsidiaryId?: string | null | undefined;
|
|
285
291
|
/**
|
|
286
|
-
* The company
|
|
292
|
+
* The company ID the transaction belongs to
|
|
287
293
|
*/
|
|
288
294
|
companyId?: string | null | undefined;
|
|
295
|
+
/**
|
|
296
|
+
* The ID of the department
|
|
297
|
+
*/
|
|
298
|
+
departmentId?: string | null | undefined;
|
|
289
299
|
status?: PurchaseOrderStatus | null | undefined;
|
|
290
300
|
/**
|
|
291
301
|
* Date purchase order was issued - YYYY-MM-DD.
|
|
@@ -355,7 +365,7 @@ export type PurchaseOrderInput = {
|
|
|
355
365
|
/**
|
|
356
366
|
* Type of amortization
|
|
357
367
|
*/
|
|
358
|
-
amortizationType?:
|
|
368
|
+
amortizationType?: PurchaseOrderAmortizationType | null | undefined;
|
|
359
369
|
/**
|
|
360
370
|
* Applicable tax id/code override if tax is not supplied on a line item basis.
|
|
361
371
|
*/
|
|
@@ -421,24 +431,24 @@ export namespace PurchaseOrderStatus$ {
|
|
|
421
431
|
}
|
|
422
432
|
|
|
423
433
|
/** @internal */
|
|
424
|
-
export const
|
|
425
|
-
typeof
|
|
426
|
-
> = z.nativeEnum(
|
|
434
|
+
export const PurchaseOrderAmortizationType$inboundSchema: z.ZodNativeEnum<
|
|
435
|
+
typeof PurchaseOrderAmortizationType
|
|
436
|
+
> = z.nativeEnum(PurchaseOrderAmortizationType);
|
|
427
437
|
|
|
428
438
|
/** @internal */
|
|
429
|
-
export const
|
|
430
|
-
typeof
|
|
431
|
-
> =
|
|
439
|
+
export const PurchaseOrderAmortizationType$outboundSchema: z.ZodNativeEnum<
|
|
440
|
+
typeof PurchaseOrderAmortizationType
|
|
441
|
+
> = PurchaseOrderAmortizationType$inboundSchema;
|
|
432
442
|
|
|
433
443
|
/**
|
|
434
444
|
* @internal
|
|
435
445
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
436
446
|
*/
|
|
437
|
-
export namespace
|
|
438
|
-
/** @deprecated use `
|
|
439
|
-
export const inboundSchema =
|
|
440
|
-
/** @deprecated use `
|
|
441
|
-
export const outboundSchema =
|
|
447
|
+
export namespace PurchaseOrderAmortizationType$ {
|
|
448
|
+
/** @deprecated use `PurchaseOrderAmortizationType$inboundSchema` instead. */
|
|
449
|
+
export const inboundSchema = PurchaseOrderAmortizationType$inboundSchema;
|
|
450
|
+
/** @deprecated use `PurchaseOrderAmortizationType$outboundSchema` instead. */
|
|
451
|
+
export const outboundSchema = PurchaseOrderAmortizationType$outboundSchema;
|
|
442
452
|
}
|
|
443
453
|
|
|
444
454
|
/** @internal */
|
|
@@ -454,6 +464,7 @@ export const PurchaseOrder$inboundSchema: z.ZodType<
|
|
|
454
464
|
supplier: z.nullable(LinkedSupplier$inboundSchema).optional(),
|
|
455
465
|
subsidiary_id: z.nullable(z.string()).optional(),
|
|
456
466
|
company_id: z.nullable(z.string()).optional(),
|
|
467
|
+
department_id: z.nullable(z.string()).optional(),
|
|
457
468
|
status: z.nullable(PurchaseOrderStatus$inboundSchema).optional(),
|
|
458
469
|
issued_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
|
|
459
470
|
delivery_date: z.nullable(z.string().transform(v => new RFCDate(v)))
|
|
@@ -477,7 +488,8 @@ export const PurchaseOrder$inboundSchema: z.ZodType<
|
|
|
477
488
|
due_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
|
|
478
489
|
payment_method: z.nullable(z.string()).optional(),
|
|
479
490
|
terms: z.nullable(z.string()).optional(),
|
|
480
|
-
amortization_type: z.nullable(
|
|
491
|
+
amortization_type: z.nullable(PurchaseOrderAmortizationType$inboundSchema)
|
|
492
|
+
.optional(),
|
|
481
493
|
tax_code: z.nullable(z.string()).optional(),
|
|
482
494
|
tax_method: z.nullable(z.string()).optional(),
|
|
483
495
|
issued_method: z.nullable(z.string()).optional(),
|
|
@@ -506,6 +518,7 @@ export const PurchaseOrder$inboundSchema: z.ZodType<
|
|
|
506
518
|
"po_number": "poNumber",
|
|
507
519
|
"subsidiary_id": "subsidiaryId",
|
|
508
520
|
"company_id": "companyId",
|
|
521
|
+
"department_id": "departmentId",
|
|
509
522
|
"issued_date": "issuedDate",
|
|
510
523
|
"delivery_date": "deliveryDate",
|
|
511
524
|
"expected_arrival_date": "expectedArrivalDate",
|
|
@@ -549,6 +562,7 @@ export type PurchaseOrder$Outbound = {
|
|
|
549
562
|
supplier?: LinkedSupplier$Outbound | null | undefined;
|
|
550
563
|
subsidiary_id?: string | null | undefined;
|
|
551
564
|
company_id?: string | null | undefined;
|
|
565
|
+
department_id?: string | null | undefined;
|
|
552
566
|
status?: string | null | undefined;
|
|
553
567
|
issued_date?: string | null | undefined;
|
|
554
568
|
delivery_date?: string | null | undefined;
|
|
@@ -605,6 +619,7 @@ export const PurchaseOrder$outboundSchema: z.ZodType<
|
|
|
605
619
|
supplier: z.nullable(LinkedSupplier$outboundSchema).optional(),
|
|
606
620
|
subsidiaryId: z.nullable(z.string()).optional(),
|
|
607
621
|
companyId: z.nullable(z.string()).optional(),
|
|
622
|
+
departmentId: z.nullable(z.string()).optional(),
|
|
608
623
|
status: z.nullable(PurchaseOrderStatus$outboundSchema).optional(),
|
|
609
624
|
issuedDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
|
|
610
625
|
.optional(),
|
|
@@ -631,7 +646,8 @@ export const PurchaseOrder$outboundSchema: z.ZodType<
|
|
|
631
646
|
.optional(),
|
|
632
647
|
paymentMethod: z.nullable(z.string()).optional(),
|
|
633
648
|
terms: z.nullable(z.string()).optional(),
|
|
634
|
-
amortizationType: z.nullable(
|
|
649
|
+
amortizationType: z.nullable(PurchaseOrderAmortizationType$outboundSchema)
|
|
650
|
+
.optional(),
|
|
635
651
|
taxCode: z.nullable(z.string()).optional(),
|
|
636
652
|
taxMethod: z.nullable(z.string()).optional(),
|
|
637
653
|
issuedMethod: z.nullable(z.string()).optional(),
|
|
@@ -656,6 +672,7 @@ export const PurchaseOrder$outboundSchema: z.ZodType<
|
|
|
656
672
|
poNumber: "po_number",
|
|
657
673
|
subsidiaryId: "subsidiary_id",
|
|
658
674
|
companyId: "company_id",
|
|
675
|
+
departmentId: "department_id",
|
|
659
676
|
issuedDate: "issued_date",
|
|
660
677
|
deliveryDate: "delivery_date",
|
|
661
678
|
expectedArrivalDate: "expected_arrival_date",
|
|
@@ -728,6 +745,7 @@ export const PurchaseOrderInput$inboundSchema: z.ZodType<
|
|
|
728
745
|
supplier: z.nullable(LinkedSupplierInput$inboundSchema).optional(),
|
|
729
746
|
subsidiary_id: z.nullable(z.string()).optional(),
|
|
730
747
|
company_id: z.nullable(z.string()).optional(),
|
|
748
|
+
department_id: z.nullable(z.string()).optional(),
|
|
731
749
|
status: z.nullable(PurchaseOrderStatus$inboundSchema).optional(),
|
|
732
750
|
issued_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
|
|
733
751
|
delivery_date: z.nullable(z.string().transform(v => new RFCDate(v)))
|
|
@@ -751,7 +769,8 @@ export const PurchaseOrderInput$inboundSchema: z.ZodType<
|
|
|
751
769
|
due_date: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
|
|
752
770
|
payment_method: z.nullable(z.string()).optional(),
|
|
753
771
|
terms: z.nullable(z.string()).optional(),
|
|
754
|
-
amortization_type: z.nullable(
|
|
772
|
+
amortization_type: z.nullable(PurchaseOrderAmortizationType$inboundSchema)
|
|
773
|
+
.optional(),
|
|
755
774
|
tax_code: z.nullable(z.string()).optional(),
|
|
756
775
|
tax_method: z.nullable(z.string()).optional(),
|
|
757
776
|
issued_method: z.nullable(z.string()).optional(),
|
|
@@ -770,6 +789,7 @@ export const PurchaseOrderInput$inboundSchema: z.ZodType<
|
|
|
770
789
|
"po_number": "poNumber",
|
|
771
790
|
"subsidiary_id": "subsidiaryId",
|
|
772
791
|
"company_id": "companyId",
|
|
792
|
+
"department_id": "departmentId",
|
|
773
793
|
"issued_date": "issuedDate",
|
|
774
794
|
"delivery_date": "deliveryDate",
|
|
775
795
|
"expected_arrival_date": "expectedArrivalDate",
|
|
@@ -806,6 +826,7 @@ export type PurchaseOrderInput$Outbound = {
|
|
|
806
826
|
supplier?: LinkedSupplierInput$Outbound | null | undefined;
|
|
807
827
|
subsidiary_id?: string | null | undefined;
|
|
808
828
|
company_id?: string | null | undefined;
|
|
829
|
+
department_id?: string | null | undefined;
|
|
809
830
|
status?: string | null | undefined;
|
|
810
831
|
issued_date?: string | null | undefined;
|
|
811
832
|
delivery_date?: string | null | undefined;
|
|
@@ -855,6 +876,7 @@ export const PurchaseOrderInput$outboundSchema: z.ZodType<
|
|
|
855
876
|
supplier: z.nullable(LinkedSupplierInput$outboundSchema).optional(),
|
|
856
877
|
subsidiaryId: z.nullable(z.string()).optional(),
|
|
857
878
|
companyId: z.nullable(z.string()).optional(),
|
|
879
|
+
departmentId: z.nullable(z.string()).optional(),
|
|
858
880
|
status: z.nullable(PurchaseOrderStatus$outboundSchema).optional(),
|
|
859
881
|
issuedDate: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
|
|
860
882
|
.optional(),
|
|
@@ -881,7 +903,8 @@ export const PurchaseOrderInput$outboundSchema: z.ZodType<
|
|
|
881
903
|
.optional(),
|
|
882
904
|
paymentMethod: z.nullable(z.string()).optional(),
|
|
883
905
|
terms: z.nullable(z.string()).optional(),
|
|
884
|
-
amortizationType: z.nullable(
|
|
906
|
+
amortizationType: z.nullable(PurchaseOrderAmortizationType$outboundSchema)
|
|
907
|
+
.optional(),
|
|
885
908
|
taxCode: z.nullable(z.string()).optional(),
|
|
886
909
|
taxMethod: z.nullable(z.string()).optional(),
|
|
887
910
|
issuedMethod: z.nullable(z.string()).optional(),
|
|
@@ -900,6 +923,7 @@ export const PurchaseOrderInput$outboundSchema: z.ZodType<
|
|
|
900
923
|
poNumber: "po_number",
|
|
901
924
|
subsidiaryId: "subsidiary_id",
|
|
902
925
|
companyId: "company_id",
|
|
926
|
+
departmentId: "department_id",
|
|
903
927
|
issuedDate: "issued_date",
|
|
904
928
|
deliveryDate: "delivery_date",
|
|
905
929
|
expectedArrivalDate: "expected_arrival_date",
|