@apideck/unify 0.29.2 → 0.29.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.
- 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/lib/security.d.ts.map +1 -1
- package/lib/security.js.map +1 -1
- 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/jobstatus.d.ts +3 -0
- package/models/components/jobstatus.d.ts.map +1 -1
- package/models/components/jobstatus.js +1 -0
- package/models/components/jobstatus.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/phonenumber.d.ts +3 -0
- package/models/components/phonenumber.d.ts.map +1 -1
- package/models/components/phonenumber.js +1 -0
- package/models/components/phonenumber.js.map +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/subsidiary.d.ts +11 -0
- package/models/components/subsidiary.d.ts.map +1 -1
- package/models/components/subsidiary.js +9 -0
- package/models/components/subsidiary.js.map +1 -1
- package/models/components/supplier.d.ts +2 -2
- package/models/components/webhookeventtype.d.ts +3 -0
- package/models/components/webhookeventtype.d.ts.map +1 -1
- package/models/components/webhookeventtype.js +1 -0
- package/models/components/webhookeventtype.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/quotes.test.ts +3 -0
- package/src/lib/config.ts +4 -4
- package/src/lib/security.ts +4 -1
- 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/jobstatus.ts +1 -0
- 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/phonenumber.ts +1 -0
- package/src/models/components/purchaseorder.ts +45 -21
- package/src/models/components/quote.ts +20 -2
- package/src/models/components/subsidiary.ts +23 -0
- package/src/models/components/supplier.ts +2 -2
- package/src/models/components/webhookeventtype.ts +1 -0
|
@@ -40,6 +40,21 @@ import {
|
|
|
40
40
|
PhoneNumber$outboundSchema,
|
|
41
41
|
} from "./phonenumber.js";
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* The gender represents the gender identity of a person.
|
|
45
|
+
*/
|
|
46
|
+
export const ApplicantGender = {
|
|
47
|
+
Male: "male",
|
|
48
|
+
Female: "female",
|
|
49
|
+
Unisex: "unisex",
|
|
50
|
+
Other: "other",
|
|
51
|
+
NotSpecified: "not_specified",
|
|
52
|
+
} as const;
|
|
53
|
+
/**
|
|
54
|
+
* The gender represents the gender identity of a person.
|
|
55
|
+
*/
|
|
56
|
+
export type ApplicantGender = ClosedEnum<typeof ApplicantGender>;
|
|
57
|
+
|
|
43
58
|
/**
|
|
44
59
|
* The type of website
|
|
45
60
|
*/
|
|
@@ -94,6 +109,10 @@ export type Applicant = {
|
|
|
94
109
|
* The name of an applicant.
|
|
95
110
|
*/
|
|
96
111
|
name?: string | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* A formal salutation for the person. For example, 'Mr', 'Mrs'
|
|
114
|
+
*/
|
|
115
|
+
salutation?: string | null | undefined;
|
|
97
116
|
/**
|
|
98
117
|
* The first name of the person.
|
|
99
118
|
*/
|
|
@@ -114,6 +133,15 @@ export type Applicant = {
|
|
|
114
133
|
* The date of birth of the person.
|
|
115
134
|
*/
|
|
116
135
|
birthday?: RFCDate | null | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* The gender represents the gender identity of a person.
|
|
138
|
+
*/
|
|
139
|
+
gender?: ApplicantGender | null | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions.
|
|
142
|
+
*/
|
|
143
|
+
socialSecurityNumber?: string | null | undefined;
|
|
144
|
+
type?: string | undefined;
|
|
117
145
|
coverLetter?: string | undefined;
|
|
118
146
|
jobUrl?: string | null | undefined;
|
|
119
147
|
/**
|
|
@@ -200,6 +228,10 @@ export type ApplicantInput = {
|
|
|
200
228
|
* The name of an applicant.
|
|
201
229
|
*/
|
|
202
230
|
name?: string | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* A formal salutation for the person. For example, 'Mr', 'Mrs'
|
|
233
|
+
*/
|
|
234
|
+
salutation?: string | null | undefined;
|
|
203
235
|
/**
|
|
204
236
|
* The first name of the person.
|
|
205
237
|
*/
|
|
@@ -220,6 +252,15 @@ export type ApplicantInput = {
|
|
|
220
252
|
* The date of birth of the person.
|
|
221
253
|
*/
|
|
222
254
|
birthday?: RFCDate | null | undefined;
|
|
255
|
+
/**
|
|
256
|
+
* The gender represents the gender identity of a person.
|
|
257
|
+
*/
|
|
258
|
+
gender?: ApplicantGender | null | undefined;
|
|
259
|
+
/**
|
|
260
|
+
* A unique identifier assigned by the government. This field is considered sensitive information and may be subject to special security and privacy restrictions.
|
|
261
|
+
*/
|
|
262
|
+
socialSecurityNumber?: string | null | undefined;
|
|
263
|
+
type?: string | undefined;
|
|
223
264
|
coverLetter?: string | undefined;
|
|
224
265
|
/**
|
|
225
266
|
* The URL of the photo of a person.
|
|
@@ -267,6 +308,27 @@ export type ApplicantInput = {
|
|
|
267
308
|
passThrough?: Array<PassThroughBody> | undefined;
|
|
268
309
|
};
|
|
269
310
|
|
|
311
|
+
/** @internal */
|
|
312
|
+
export const ApplicantGender$inboundSchema: z.ZodNativeEnum<
|
|
313
|
+
typeof ApplicantGender
|
|
314
|
+
> = z.nativeEnum(ApplicantGender);
|
|
315
|
+
|
|
316
|
+
/** @internal */
|
|
317
|
+
export const ApplicantGender$outboundSchema: z.ZodNativeEnum<
|
|
318
|
+
typeof ApplicantGender
|
|
319
|
+
> = ApplicantGender$inboundSchema;
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @internal
|
|
323
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
324
|
+
*/
|
|
325
|
+
export namespace ApplicantGender$ {
|
|
326
|
+
/** @deprecated use `ApplicantGender$inboundSchema` instead. */
|
|
327
|
+
export const inboundSchema = ApplicantGender$inboundSchema;
|
|
328
|
+
/** @deprecated use `ApplicantGender$outboundSchema` instead. */
|
|
329
|
+
export const outboundSchema = ApplicantGender$outboundSchema;
|
|
330
|
+
}
|
|
331
|
+
|
|
270
332
|
/** @internal */
|
|
271
333
|
export const ApplicantType$inboundSchema: z.ZodNativeEnum<
|
|
272
334
|
typeof ApplicantType
|
|
@@ -408,11 +470,15 @@ export const Applicant$inboundSchema: z.ZodType<
|
|
|
408
470
|
> = z.object({
|
|
409
471
|
id: z.string().optional(),
|
|
410
472
|
name: z.string().optional(),
|
|
473
|
+
salutation: z.nullable(z.string()).optional(),
|
|
411
474
|
first_name: z.nullable(z.string()).optional(),
|
|
412
475
|
last_name: z.nullable(z.string()).optional(),
|
|
413
476
|
middle_name: z.nullable(z.string()).optional(),
|
|
414
477
|
initials: z.nullable(z.string()).optional(),
|
|
415
478
|
birthday: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
|
|
479
|
+
gender: z.nullable(ApplicantGender$inboundSchema).optional(),
|
|
480
|
+
social_security_number: z.nullable(z.string()).optional(),
|
|
481
|
+
type: z.string().optional(),
|
|
416
482
|
cover_letter: z.string().optional(),
|
|
417
483
|
job_url: z.nullable(z.string()).optional(),
|
|
418
484
|
photo_url: z.nullable(z.string()).optional(),
|
|
@@ -466,6 +532,7 @@ export const Applicant$inboundSchema: z.ZodType<
|
|
|
466
532
|
"first_name": "firstName",
|
|
467
533
|
"last_name": "lastName",
|
|
468
534
|
"middle_name": "middleName",
|
|
535
|
+
"social_security_number": "socialSecurityNumber",
|
|
469
536
|
"cover_letter": "coverLetter",
|
|
470
537
|
"job_url": "jobUrl",
|
|
471
538
|
"photo_url": "photoUrl",
|
|
@@ -498,11 +565,15 @@ export const Applicant$inboundSchema: z.ZodType<
|
|
|
498
565
|
export type Applicant$Outbound = {
|
|
499
566
|
id?: string | undefined;
|
|
500
567
|
name?: string | undefined;
|
|
568
|
+
salutation?: string | null | undefined;
|
|
501
569
|
first_name?: string | null | undefined;
|
|
502
570
|
last_name?: string | null | undefined;
|
|
503
571
|
middle_name?: string | null | undefined;
|
|
504
572
|
initials?: string | null | undefined;
|
|
505
573
|
birthday?: string | null | undefined;
|
|
574
|
+
gender?: string | null | undefined;
|
|
575
|
+
social_security_number?: string | null | undefined;
|
|
576
|
+
type?: string | undefined;
|
|
506
577
|
cover_letter?: string | undefined;
|
|
507
578
|
job_url?: string | null | undefined;
|
|
508
579
|
photo_url?: string | null | undefined;
|
|
@@ -551,12 +622,16 @@ export const Applicant$outboundSchema: z.ZodType<
|
|
|
551
622
|
> = z.object({
|
|
552
623
|
id: z.string().optional(),
|
|
553
624
|
name: z.string().optional(),
|
|
625
|
+
salutation: z.nullable(z.string()).optional(),
|
|
554
626
|
firstName: z.nullable(z.string()).optional(),
|
|
555
627
|
lastName: z.nullable(z.string()).optional(),
|
|
556
628
|
middleName: z.nullable(z.string()).optional(),
|
|
557
629
|
initials: z.nullable(z.string()).optional(),
|
|
558
630
|
birthday: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
|
|
559
631
|
.optional(),
|
|
632
|
+
gender: z.nullable(ApplicantGender$outboundSchema).optional(),
|
|
633
|
+
socialSecurityNumber: z.nullable(z.string()).optional(),
|
|
634
|
+
type: z.string().optional(),
|
|
560
635
|
coverLetter: z.string().optional(),
|
|
561
636
|
jobUrl: z.nullable(z.string()).optional(),
|
|
562
637
|
photoUrl: z.nullable(z.string()).optional(),
|
|
@@ -601,6 +676,7 @@ export const Applicant$outboundSchema: z.ZodType<
|
|
|
601
676
|
firstName: "first_name",
|
|
602
677
|
lastName: "last_name",
|
|
603
678
|
middleName: "middle_name",
|
|
679
|
+
socialSecurityNumber: "social_security_number",
|
|
604
680
|
coverLetter: "cover_letter",
|
|
605
681
|
jobUrl: "job_url",
|
|
606
682
|
photoUrl: "photo_url",
|
|
@@ -663,11 +739,15 @@ export const ApplicantInput$inboundSchema: z.ZodType<
|
|
|
663
739
|
unknown
|
|
664
740
|
> = z.object({
|
|
665
741
|
name: z.string().optional(),
|
|
742
|
+
salutation: z.nullable(z.string()).optional(),
|
|
666
743
|
first_name: z.nullable(z.string()).optional(),
|
|
667
744
|
last_name: z.nullable(z.string()).optional(),
|
|
668
745
|
middle_name: z.nullable(z.string()).optional(),
|
|
669
746
|
initials: z.nullable(z.string()).optional(),
|
|
670
747
|
birthday: z.nullable(z.string().transform(v => new RFCDate(v))).optional(),
|
|
748
|
+
gender: z.nullable(ApplicantGender$inboundSchema).optional(),
|
|
749
|
+
social_security_number: z.nullable(z.string()).optional(),
|
|
750
|
+
type: z.string().optional(),
|
|
671
751
|
cover_letter: z.string().optional(),
|
|
672
752
|
photo_url: z.nullable(z.string()).optional(),
|
|
673
753
|
headline: z.string().optional(),
|
|
@@ -698,6 +778,7 @@ export const ApplicantInput$inboundSchema: z.ZodType<
|
|
|
698
778
|
"first_name": "firstName",
|
|
699
779
|
"last_name": "lastName",
|
|
700
780
|
"middle_name": "middleName",
|
|
781
|
+
"social_security_number": "socialSecurityNumber",
|
|
701
782
|
"cover_letter": "coverLetter",
|
|
702
783
|
"photo_url": "photoUrl",
|
|
703
784
|
"custom_fields": "customFields",
|
|
@@ -716,11 +797,15 @@ export const ApplicantInput$inboundSchema: z.ZodType<
|
|
|
716
797
|
/** @internal */
|
|
717
798
|
export type ApplicantInput$Outbound = {
|
|
718
799
|
name?: string | undefined;
|
|
800
|
+
salutation?: string | null | undefined;
|
|
719
801
|
first_name?: string | null | undefined;
|
|
720
802
|
last_name?: string | null | undefined;
|
|
721
803
|
middle_name?: string | null | undefined;
|
|
722
804
|
initials?: string | null | undefined;
|
|
723
805
|
birthday?: string | null | undefined;
|
|
806
|
+
gender?: string | null | undefined;
|
|
807
|
+
social_security_number?: string | null | undefined;
|
|
808
|
+
type?: string | undefined;
|
|
724
809
|
cover_letter?: string | undefined;
|
|
725
810
|
photo_url?: string | null | undefined;
|
|
726
811
|
headline?: string | undefined;
|
|
@@ -755,12 +840,16 @@ export const ApplicantInput$outboundSchema: z.ZodType<
|
|
|
755
840
|
ApplicantInput
|
|
756
841
|
> = z.object({
|
|
757
842
|
name: z.string().optional(),
|
|
843
|
+
salutation: z.nullable(z.string()).optional(),
|
|
758
844
|
firstName: z.nullable(z.string()).optional(),
|
|
759
845
|
lastName: z.nullable(z.string()).optional(),
|
|
760
846
|
middleName: z.nullable(z.string()).optional(),
|
|
761
847
|
initials: z.nullable(z.string()).optional(),
|
|
762
848
|
birthday: z.nullable(z.instanceof(RFCDate).transform(v => v.toString()))
|
|
763
849
|
.optional(),
|
|
850
|
+
gender: z.nullable(ApplicantGender$outboundSchema).optional(),
|
|
851
|
+
socialSecurityNumber: z.nullable(z.string()).optional(),
|
|
852
|
+
type: z.string().optional(),
|
|
764
853
|
coverLetter: z.string().optional(),
|
|
765
854
|
photoUrl: z.nullable(z.string()).optional(),
|
|
766
855
|
headline: z.string().optional(),
|
|
@@ -791,6 +880,7 @@ export const ApplicantInput$outboundSchema: z.ZodType<
|
|
|
791
880
|
firstName: "first_name",
|
|
792
881
|
lastName: "last_name",
|
|
793
882
|
middleName: "middle_name",
|
|
883
|
+
socialSecurityNumber: "social_security_number",
|
|
794
884
|
coverLetter: "cover_letter",
|
|
795
885
|
photoUrl: "photo_url",
|
|
796
886
|
customFields: "custom_fields",
|
|
@@ -36,6 +36,12 @@ import {
|
|
|
36
36
|
CustomField$Outbound,
|
|
37
37
|
CustomField$outboundSchema,
|
|
38
38
|
} from "./customfield.js";
|
|
39
|
+
import {
|
|
40
|
+
LinkedAttachment,
|
|
41
|
+
LinkedAttachment$inboundSchema,
|
|
42
|
+
LinkedAttachment$Outbound,
|
|
43
|
+
LinkedAttachment$outboundSchema,
|
|
44
|
+
} from "./linkedattachment.js";
|
|
39
45
|
import {
|
|
40
46
|
LinkedLedgerAccount,
|
|
41
47
|
LinkedLedgerAccount$inboundSchema,
|
|
@@ -91,6 +97,20 @@ export const BillStatus = {
|
|
|
91
97
|
*/
|
|
92
98
|
export type BillStatus = ClosedEnum<typeof BillStatus>;
|
|
93
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Type of amortization
|
|
102
|
+
*/
|
|
103
|
+
export const AmortizationType = {
|
|
104
|
+
Manual: "manual",
|
|
105
|
+
Receipt: "receipt",
|
|
106
|
+
Schedule: "schedule",
|
|
107
|
+
Other: "other",
|
|
108
|
+
} as const;
|
|
109
|
+
/**
|
|
110
|
+
* Type of amortization
|
|
111
|
+
*/
|
|
112
|
+
export type AmortizationType = ClosedEnum<typeof AmortizationType>;
|
|
113
|
+
|
|
94
114
|
export type Bill = {
|
|
95
115
|
/**
|
|
96
116
|
* A unique identifier for an object.
|
|
@@ -100,6 +120,10 @@ export type Bill = {
|
|
|
100
120
|
* The third-party API ID of original entity
|
|
101
121
|
*/
|
|
102
122
|
downstreamId?: string | null | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* Id to be displayed.
|
|
125
|
+
*/
|
|
126
|
+
displayId?: string | null | undefined;
|
|
103
127
|
/**
|
|
104
128
|
* Reference to supplier bill number
|
|
105
129
|
*/
|
|
@@ -109,9 +133,13 @@ export type Bill = {
|
|
|
109
133
|
*/
|
|
110
134
|
supplier?: LinkedSupplier | null | undefined;
|
|
111
135
|
/**
|
|
112
|
-
* The company
|
|
136
|
+
* The company ID the transaction belongs to
|
|
113
137
|
*/
|
|
114
138
|
companyId?: string | null | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* The ID of the department
|
|
141
|
+
*/
|
|
142
|
+
departmentId?: string | null | undefined;
|
|
115
143
|
/**
|
|
116
144
|
* Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
|
|
117
145
|
*/
|
|
@@ -200,6 +228,26 @@ export type Bill = {
|
|
|
200
228
|
* Discount percentage applied to this transaction.
|
|
201
229
|
*/
|
|
202
230
|
discountPercentage?: number | null | undefined;
|
|
231
|
+
/**
|
|
232
|
+
* Optional bill template
|
|
233
|
+
*/
|
|
234
|
+
templateId?: string | null | undefined;
|
|
235
|
+
/**
|
|
236
|
+
* The user who approved the bill
|
|
237
|
+
*/
|
|
238
|
+
approvedBy?: string | null | undefined;
|
|
239
|
+
/**
|
|
240
|
+
* Type of amortization
|
|
241
|
+
*/
|
|
242
|
+
amortizationType?: AmortizationType | null | undefined;
|
|
243
|
+
/**
|
|
244
|
+
* Method of tax calculation
|
|
245
|
+
*/
|
|
246
|
+
taxMethod?: string | null | undefined;
|
|
247
|
+
/**
|
|
248
|
+
* Whether the document has been received
|
|
249
|
+
*/
|
|
250
|
+
documentReceived?: boolean | null | undefined;
|
|
203
251
|
/**
|
|
204
252
|
* URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
|
|
205
253
|
*/
|
|
@@ -241,9 +289,14 @@ export type Bill = {
|
|
|
241
289
|
* Accounting period
|
|
242
290
|
*/
|
|
243
291
|
accountingPeriod?: string | null | undefined;
|
|
292
|
+
attachments?: Array<LinkedAttachment | null> | undefined;
|
|
244
293
|
};
|
|
245
294
|
|
|
246
295
|
export type BillInput = {
|
|
296
|
+
/**
|
|
297
|
+
* Id to be displayed.
|
|
298
|
+
*/
|
|
299
|
+
displayId?: string | null | undefined;
|
|
247
300
|
/**
|
|
248
301
|
* Reference to supplier bill number
|
|
249
302
|
*/
|
|
@@ -253,9 +306,13 @@ export type BillInput = {
|
|
|
253
306
|
*/
|
|
254
307
|
supplier?: LinkedSupplierInput | null | undefined;
|
|
255
308
|
/**
|
|
256
|
-
* The company
|
|
309
|
+
* The company ID the transaction belongs to
|
|
257
310
|
*/
|
|
258
311
|
companyId?: string | null | undefined;
|
|
312
|
+
/**
|
|
313
|
+
* The ID of the department
|
|
314
|
+
*/
|
|
315
|
+
departmentId?: string | null | undefined;
|
|
259
316
|
/**
|
|
260
317
|
* Indicates the associated currency for an amount of money. Values correspond to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217).
|
|
261
318
|
*/
|
|
@@ -344,6 +401,26 @@ export type BillInput = {
|
|
|
344
401
|
* Discount percentage applied to this transaction.
|
|
345
402
|
*/
|
|
346
403
|
discountPercentage?: number | null | undefined;
|
|
404
|
+
/**
|
|
405
|
+
* Optional bill template
|
|
406
|
+
*/
|
|
407
|
+
templateId?: string | null | undefined;
|
|
408
|
+
/**
|
|
409
|
+
* The user who approved the bill
|
|
410
|
+
*/
|
|
411
|
+
approvedBy?: string | null | undefined;
|
|
412
|
+
/**
|
|
413
|
+
* Type of amortization
|
|
414
|
+
*/
|
|
415
|
+
amortizationType?: AmortizationType | null | undefined;
|
|
416
|
+
/**
|
|
417
|
+
* Method of tax calculation
|
|
418
|
+
*/
|
|
419
|
+
taxMethod?: string | null | undefined;
|
|
420
|
+
/**
|
|
421
|
+
* Whether the document has been received
|
|
422
|
+
*/
|
|
423
|
+
documentReceived?: boolean | null | undefined;
|
|
347
424
|
/**
|
|
348
425
|
* URL link to a source document - shown as 'Go to [appName]' in the downstream app. Currently only supported for Xero.
|
|
349
426
|
*/
|
|
@@ -365,6 +442,7 @@ export type BillInput = {
|
|
|
365
442
|
* Accounting period
|
|
366
443
|
*/
|
|
367
444
|
accountingPeriod?: string | null | undefined;
|
|
445
|
+
attachments?: Array<LinkedAttachment | null> | undefined;
|
|
368
446
|
};
|
|
369
447
|
|
|
370
448
|
/** @internal */
|
|
@@ -386,14 +464,37 @@ export namespace BillStatus$ {
|
|
|
386
464
|
export const outboundSchema = BillStatus$outboundSchema;
|
|
387
465
|
}
|
|
388
466
|
|
|
467
|
+
/** @internal */
|
|
468
|
+
export const AmortizationType$inboundSchema: z.ZodNativeEnum<
|
|
469
|
+
typeof AmortizationType
|
|
470
|
+
> = z.nativeEnum(AmortizationType);
|
|
471
|
+
|
|
472
|
+
/** @internal */
|
|
473
|
+
export const AmortizationType$outboundSchema: z.ZodNativeEnum<
|
|
474
|
+
typeof AmortizationType
|
|
475
|
+
> = AmortizationType$inboundSchema;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* @internal
|
|
479
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
480
|
+
*/
|
|
481
|
+
export namespace AmortizationType$ {
|
|
482
|
+
/** @deprecated use `AmortizationType$inboundSchema` instead. */
|
|
483
|
+
export const inboundSchema = AmortizationType$inboundSchema;
|
|
484
|
+
/** @deprecated use `AmortizationType$outboundSchema` instead. */
|
|
485
|
+
export const outboundSchema = AmortizationType$outboundSchema;
|
|
486
|
+
}
|
|
487
|
+
|
|
389
488
|
/** @internal */
|
|
390
489
|
export const Bill$inboundSchema: z.ZodType<Bill, z.ZodTypeDef, unknown> = z
|
|
391
490
|
.object({
|
|
392
491
|
id: z.string().optional(),
|
|
393
492
|
downstream_id: z.nullable(z.string()).optional(),
|
|
493
|
+
display_id: z.nullable(z.string()).optional(),
|
|
394
494
|
bill_number: z.nullable(z.string()).optional(),
|
|
395
495
|
supplier: z.nullable(LinkedSupplier$inboundSchema).optional(),
|
|
396
496
|
company_id: z.nullable(z.string()).optional(),
|
|
497
|
+
department_id: z.nullable(z.string()).optional(),
|
|
397
498
|
currency: z.nullable(Currency$inboundSchema).optional(),
|
|
398
499
|
currency_rate: z.nullable(z.number()).optional(),
|
|
399
500
|
tax_inclusive: z.nullable(z.boolean()).optional(),
|
|
@@ -419,6 +520,11 @@ export const Bill$inboundSchema: z.ZodType<Bill, z.ZodTypeDef, unknown> = z
|
|
|
419
520
|
accounting_by_row: z.nullable(z.boolean()).optional(),
|
|
420
521
|
bank_account: BankAccount$inboundSchema.optional(),
|
|
421
522
|
discount_percentage: z.nullable(z.number()).optional(),
|
|
523
|
+
template_id: z.nullable(z.string()).optional(),
|
|
524
|
+
approved_by: z.nullable(z.string()).optional(),
|
|
525
|
+
amortization_type: z.nullable(AmortizationType$inboundSchema).optional(),
|
|
526
|
+
tax_method: z.nullable(z.string()).optional(),
|
|
527
|
+
document_received: z.nullable(z.boolean()).optional(),
|
|
422
528
|
source_document_url: z.nullable(z.string()).optional(),
|
|
423
529
|
tracking_categories: z.nullable(
|
|
424
530
|
z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
|
|
@@ -436,11 +542,14 @@ export const Bill$inboundSchema: z.ZodType<Bill, z.ZodTypeDef, unknown> = z
|
|
|
436
542
|
custom_mappings: z.nullable(z.record(z.any())).optional(),
|
|
437
543
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
438
544
|
accounting_period: z.nullable(z.string()).optional(),
|
|
545
|
+
attachments: z.array(z.nullable(LinkedAttachment$inboundSchema)).optional(),
|
|
439
546
|
}).transform((v) => {
|
|
440
547
|
return remap$(v, {
|
|
441
548
|
"downstream_id": "downstreamId",
|
|
549
|
+
"display_id": "displayId",
|
|
442
550
|
"bill_number": "billNumber",
|
|
443
551
|
"company_id": "companyId",
|
|
552
|
+
"department_id": "departmentId",
|
|
444
553
|
"currency_rate": "currencyRate",
|
|
445
554
|
"tax_inclusive": "taxInclusive",
|
|
446
555
|
"bill_date": "billDate",
|
|
@@ -456,6 +565,11 @@ export const Bill$inboundSchema: z.ZodType<Bill, z.ZodTypeDef, unknown> = z
|
|
|
456
565
|
"accounting_by_row": "accountingByRow",
|
|
457
566
|
"bank_account": "bankAccount",
|
|
458
567
|
"discount_percentage": "discountPercentage",
|
|
568
|
+
"template_id": "templateId",
|
|
569
|
+
"approved_by": "approvedBy",
|
|
570
|
+
"amortization_type": "amortizationType",
|
|
571
|
+
"tax_method": "taxMethod",
|
|
572
|
+
"document_received": "documentReceived",
|
|
459
573
|
"source_document_url": "sourceDocumentUrl",
|
|
460
574
|
"tracking_categories": "trackingCategories",
|
|
461
575
|
"updated_by": "updatedBy",
|
|
@@ -474,9 +588,11 @@ export const Bill$inboundSchema: z.ZodType<Bill, z.ZodTypeDef, unknown> = z
|
|
|
474
588
|
export type Bill$Outbound = {
|
|
475
589
|
id?: string | undefined;
|
|
476
590
|
downstream_id?: string | null | undefined;
|
|
591
|
+
display_id?: string | null | undefined;
|
|
477
592
|
bill_number?: string | null | undefined;
|
|
478
593
|
supplier?: LinkedSupplier$Outbound | null | undefined;
|
|
479
594
|
company_id?: string | null | undefined;
|
|
595
|
+
department_id?: string | null | undefined;
|
|
480
596
|
currency?: string | null | undefined;
|
|
481
597
|
currency_rate?: number | null | undefined;
|
|
482
598
|
tax_inclusive?: boolean | null | undefined;
|
|
@@ -502,6 +618,11 @@ export type Bill$Outbound = {
|
|
|
502
618
|
accounting_by_row?: boolean | null | undefined;
|
|
503
619
|
bank_account?: BankAccount$Outbound | undefined;
|
|
504
620
|
discount_percentage?: number | null | undefined;
|
|
621
|
+
template_id?: string | null | undefined;
|
|
622
|
+
approved_by?: string | null | undefined;
|
|
623
|
+
amortization_type?: string | null | undefined;
|
|
624
|
+
tax_method?: string | null | undefined;
|
|
625
|
+
document_received?: boolean | null | undefined;
|
|
505
626
|
source_document_url?: string | null | undefined;
|
|
506
627
|
tracking_categories?:
|
|
507
628
|
| Array<LinkedTrackingCategory$Outbound | null>
|
|
@@ -516,6 +637,7 @@ export type Bill$Outbound = {
|
|
|
516
637
|
custom_mappings?: { [k: string]: any } | null | undefined;
|
|
517
638
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
518
639
|
accounting_period?: string | null | undefined;
|
|
640
|
+
attachments?: Array<LinkedAttachment$Outbound | null> | undefined;
|
|
519
641
|
};
|
|
520
642
|
|
|
521
643
|
/** @internal */
|
|
@@ -523,9 +645,11 @@ export const Bill$outboundSchema: z.ZodType<Bill$Outbound, z.ZodTypeDef, Bill> =
|
|
|
523
645
|
z.object({
|
|
524
646
|
id: z.string().optional(),
|
|
525
647
|
downstreamId: z.nullable(z.string()).optional(),
|
|
648
|
+
displayId: z.nullable(z.string()).optional(),
|
|
526
649
|
billNumber: z.nullable(z.string()).optional(),
|
|
527
650
|
supplier: z.nullable(LinkedSupplier$outboundSchema).optional(),
|
|
528
651
|
companyId: z.nullable(z.string()).optional(),
|
|
652
|
+
departmentId: z.nullable(z.string()).optional(),
|
|
529
653
|
currency: z.nullable(Currency$outboundSchema).optional(),
|
|
530
654
|
currencyRate: z.nullable(z.number()).optional(),
|
|
531
655
|
taxInclusive: z.nullable(z.boolean()).optional(),
|
|
@@ -554,6 +678,11 @@ export const Bill$outboundSchema: z.ZodType<Bill$Outbound, z.ZodTypeDef, Bill> =
|
|
|
554
678
|
accountingByRow: z.nullable(z.boolean()).optional(),
|
|
555
679
|
bankAccount: BankAccount$outboundSchema.optional(),
|
|
556
680
|
discountPercentage: z.nullable(z.number()).optional(),
|
|
681
|
+
templateId: z.nullable(z.string()).optional(),
|
|
682
|
+
approvedBy: z.nullable(z.string()).optional(),
|
|
683
|
+
amortizationType: z.nullable(AmortizationType$outboundSchema).optional(),
|
|
684
|
+
taxMethod: z.nullable(z.string()).optional(),
|
|
685
|
+
documentReceived: z.nullable(z.boolean()).optional(),
|
|
557
686
|
sourceDocumentUrl: z.nullable(z.string()).optional(),
|
|
558
687
|
trackingCategories: z.nullable(
|
|
559
688
|
z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
|
|
@@ -567,11 +696,15 @@ export const Bill$outboundSchema: z.ZodType<Bill$Outbound, z.ZodTypeDef, Bill> =
|
|
|
567
696
|
customMappings: z.nullable(z.record(z.any())).optional(),
|
|
568
697
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
569
698
|
accountingPeriod: z.nullable(z.string()).optional(),
|
|
699
|
+
attachments: z.array(z.nullable(LinkedAttachment$outboundSchema))
|
|
700
|
+
.optional(),
|
|
570
701
|
}).transform((v) => {
|
|
571
702
|
return remap$(v, {
|
|
572
703
|
downstreamId: "downstream_id",
|
|
704
|
+
displayId: "display_id",
|
|
573
705
|
billNumber: "bill_number",
|
|
574
706
|
companyId: "company_id",
|
|
707
|
+
departmentId: "department_id",
|
|
575
708
|
currencyRate: "currency_rate",
|
|
576
709
|
taxInclusive: "tax_inclusive",
|
|
577
710
|
billDate: "bill_date",
|
|
@@ -587,6 +720,11 @@ export const Bill$outboundSchema: z.ZodType<Bill$Outbound, z.ZodTypeDef, Bill> =
|
|
|
587
720
|
accountingByRow: "accounting_by_row",
|
|
588
721
|
bankAccount: "bank_account",
|
|
589
722
|
discountPercentage: "discount_percentage",
|
|
723
|
+
templateId: "template_id",
|
|
724
|
+
approvedBy: "approved_by",
|
|
725
|
+
amortizationType: "amortization_type",
|
|
726
|
+
taxMethod: "tax_method",
|
|
727
|
+
documentReceived: "document_received",
|
|
590
728
|
sourceDocumentUrl: "source_document_url",
|
|
591
729
|
trackingCategories: "tracking_categories",
|
|
592
730
|
updatedBy: "updated_by",
|
|
@@ -634,9 +772,11 @@ export const BillInput$inboundSchema: z.ZodType<
|
|
|
634
772
|
z.ZodTypeDef,
|
|
635
773
|
unknown
|
|
636
774
|
> = z.object({
|
|
775
|
+
display_id: z.nullable(z.string()).optional(),
|
|
637
776
|
bill_number: z.nullable(z.string()).optional(),
|
|
638
777
|
supplier: z.nullable(LinkedSupplierInput$inboundSchema).optional(),
|
|
639
778
|
company_id: z.nullable(z.string()).optional(),
|
|
779
|
+
department_id: z.nullable(z.string()).optional(),
|
|
640
780
|
currency: z.nullable(Currency$inboundSchema).optional(),
|
|
641
781
|
currency_rate: z.nullable(z.number()).optional(),
|
|
642
782
|
tax_inclusive: z.nullable(z.boolean()).optional(),
|
|
@@ -662,6 +802,11 @@ export const BillInput$inboundSchema: z.ZodType<
|
|
|
662
802
|
accounting_by_row: z.nullable(z.boolean()).optional(),
|
|
663
803
|
bank_account: BankAccount$inboundSchema.optional(),
|
|
664
804
|
discount_percentage: z.nullable(z.number()).optional(),
|
|
805
|
+
template_id: z.nullable(z.string()).optional(),
|
|
806
|
+
approved_by: z.nullable(z.string()).optional(),
|
|
807
|
+
amortization_type: z.nullable(AmortizationType$inboundSchema).optional(),
|
|
808
|
+
tax_method: z.nullable(z.string()).optional(),
|
|
809
|
+
document_received: z.nullable(z.boolean()).optional(),
|
|
665
810
|
source_document_url: z.nullable(z.string()).optional(),
|
|
666
811
|
tracking_categories: z.nullable(
|
|
667
812
|
z.array(z.nullable(LinkedTrackingCategory$inboundSchema)),
|
|
@@ -670,10 +815,13 @@ export const BillInput$inboundSchema: z.ZodType<
|
|
|
670
815
|
custom_fields: z.array(CustomField$inboundSchema).optional(),
|
|
671
816
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
672
817
|
accounting_period: z.nullable(z.string()).optional(),
|
|
818
|
+
attachments: z.array(z.nullable(LinkedAttachment$inboundSchema)).optional(),
|
|
673
819
|
}).transform((v) => {
|
|
674
820
|
return remap$(v, {
|
|
821
|
+
"display_id": "displayId",
|
|
675
822
|
"bill_number": "billNumber",
|
|
676
823
|
"company_id": "companyId",
|
|
824
|
+
"department_id": "departmentId",
|
|
677
825
|
"currency_rate": "currencyRate",
|
|
678
826
|
"tax_inclusive": "taxInclusive",
|
|
679
827
|
"bill_date": "billDate",
|
|
@@ -689,6 +837,11 @@ export const BillInput$inboundSchema: z.ZodType<
|
|
|
689
837
|
"accounting_by_row": "accountingByRow",
|
|
690
838
|
"bank_account": "bankAccount",
|
|
691
839
|
"discount_percentage": "discountPercentage",
|
|
840
|
+
"template_id": "templateId",
|
|
841
|
+
"approved_by": "approvedBy",
|
|
842
|
+
"amortization_type": "amortizationType",
|
|
843
|
+
"tax_method": "taxMethod",
|
|
844
|
+
"document_received": "documentReceived",
|
|
692
845
|
"source_document_url": "sourceDocumentUrl",
|
|
693
846
|
"tracking_categories": "trackingCategories",
|
|
694
847
|
"row_version": "rowVersion",
|
|
@@ -700,9 +853,11 @@ export const BillInput$inboundSchema: z.ZodType<
|
|
|
700
853
|
|
|
701
854
|
/** @internal */
|
|
702
855
|
export type BillInput$Outbound = {
|
|
856
|
+
display_id?: string | null | undefined;
|
|
703
857
|
bill_number?: string | null | undefined;
|
|
704
858
|
supplier?: LinkedSupplierInput$Outbound | null | undefined;
|
|
705
859
|
company_id?: string | null | undefined;
|
|
860
|
+
department_id?: string | null | undefined;
|
|
706
861
|
currency?: string | null | undefined;
|
|
707
862
|
currency_rate?: number | null | undefined;
|
|
708
863
|
tax_inclusive?: boolean | null | undefined;
|
|
@@ -728,6 +883,11 @@ export type BillInput$Outbound = {
|
|
|
728
883
|
accounting_by_row?: boolean | null | undefined;
|
|
729
884
|
bank_account?: BankAccount$Outbound | undefined;
|
|
730
885
|
discount_percentage?: number | null | undefined;
|
|
886
|
+
template_id?: string | null | undefined;
|
|
887
|
+
approved_by?: string | null | undefined;
|
|
888
|
+
amortization_type?: string | null | undefined;
|
|
889
|
+
tax_method?: string | null | undefined;
|
|
890
|
+
document_received?: boolean | null | undefined;
|
|
731
891
|
source_document_url?: string | null | undefined;
|
|
732
892
|
tracking_categories?:
|
|
733
893
|
| Array<LinkedTrackingCategory$Outbound | null>
|
|
@@ -737,6 +897,7 @@ export type BillInput$Outbound = {
|
|
|
737
897
|
custom_fields?: Array<CustomField$Outbound> | undefined;
|
|
738
898
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
739
899
|
accounting_period?: string | null | undefined;
|
|
900
|
+
attachments?: Array<LinkedAttachment$Outbound | null> | undefined;
|
|
740
901
|
};
|
|
741
902
|
|
|
742
903
|
/** @internal */
|
|
@@ -745,9 +906,11 @@ export const BillInput$outboundSchema: z.ZodType<
|
|
|
745
906
|
z.ZodTypeDef,
|
|
746
907
|
BillInput
|
|
747
908
|
> = z.object({
|
|
909
|
+
displayId: z.nullable(z.string()).optional(),
|
|
748
910
|
billNumber: z.nullable(z.string()).optional(),
|
|
749
911
|
supplier: z.nullable(LinkedSupplierInput$outboundSchema).optional(),
|
|
750
912
|
companyId: z.nullable(z.string()).optional(),
|
|
913
|
+
departmentId: z.nullable(z.string()).optional(),
|
|
751
914
|
currency: z.nullable(Currency$outboundSchema).optional(),
|
|
752
915
|
currencyRate: z.nullable(z.number()).optional(),
|
|
753
916
|
taxInclusive: z.nullable(z.boolean()).optional(),
|
|
@@ -776,6 +939,11 @@ export const BillInput$outboundSchema: z.ZodType<
|
|
|
776
939
|
accountingByRow: z.nullable(z.boolean()).optional(),
|
|
777
940
|
bankAccount: BankAccount$outboundSchema.optional(),
|
|
778
941
|
discountPercentage: z.nullable(z.number()).optional(),
|
|
942
|
+
templateId: z.nullable(z.string()).optional(),
|
|
943
|
+
approvedBy: z.nullable(z.string()).optional(),
|
|
944
|
+
amortizationType: z.nullable(AmortizationType$outboundSchema).optional(),
|
|
945
|
+
taxMethod: z.nullable(z.string()).optional(),
|
|
946
|
+
documentReceived: z.nullable(z.boolean()).optional(),
|
|
779
947
|
sourceDocumentUrl: z.nullable(z.string()).optional(),
|
|
780
948
|
trackingCategories: z.nullable(
|
|
781
949
|
z.array(z.nullable(LinkedTrackingCategory$outboundSchema)),
|
|
@@ -784,10 +952,13 @@ export const BillInput$outboundSchema: z.ZodType<
|
|
|
784
952
|
customFields: z.array(CustomField$outboundSchema).optional(),
|
|
785
953
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
786
954
|
accountingPeriod: z.nullable(z.string()).optional(),
|
|
955
|
+
attachments: z.array(z.nullable(LinkedAttachment$outboundSchema)).optional(),
|
|
787
956
|
}).transform((v) => {
|
|
788
957
|
return remap$(v, {
|
|
958
|
+
displayId: "display_id",
|
|
789
959
|
billNumber: "bill_number",
|
|
790
960
|
companyId: "company_id",
|
|
961
|
+
departmentId: "department_id",
|
|
791
962
|
currencyRate: "currency_rate",
|
|
792
963
|
taxInclusive: "tax_inclusive",
|
|
793
964
|
billDate: "bill_date",
|
|
@@ -803,6 +974,11 @@ export const BillInput$outboundSchema: z.ZodType<
|
|
|
803
974
|
accountingByRow: "accounting_by_row",
|
|
804
975
|
bankAccount: "bank_account",
|
|
805
976
|
discountPercentage: "discount_percentage",
|
|
977
|
+
templateId: "template_id",
|
|
978
|
+
approvedBy: "approved_by",
|
|
979
|
+
amortizationType: "amortization_type",
|
|
980
|
+
taxMethod: "tax_method",
|
|
981
|
+
documentReceived: "document_received",
|
|
806
982
|
sourceDocumentUrl: "source_document_url",
|
|
807
983
|
trackingCategories: "tracking_categories",
|
|
808
984
|
rowVersion: "row_version",
|