@apideck/unify 0.11.4 → 0.11.5
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/FUNCTIONS.md +119 -0
- package/README.md +3 -3
- package/RUNTIMES.md +22 -0
- package/docs/sdks/invoiceitems/README.md +8 -0
- package/funcs/accountingInvoiceItemsGet.d.ts.map +1 -1
- package/funcs/accountingInvoiceItemsGet.js +4 -2
- package/funcs/accountingInvoiceItemsGet.js.map +1 -1
- package/hooks/registration.d.ts +1 -1
- package/hooks/registration.d.ts.map +1 -1
- package/hooks/registration.js +2 -3
- package/hooks/registration.js.map +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/security.js +1 -1
- package/lib/security.js.map +1 -1
- package/models/components/expense.d.ts +44 -0
- package/models/components/expense.d.ts.map +1 -1
- package/models/components/expense.js +32 -1
- package/models/components/expense.js.map +1 -1
- package/models/components/index.d.ts +1 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -0
- package/models/components/index.js.map +1 -1
- package/models/components/invoiceitem.d.ts +9 -9
- package/models/components/invoiceitem.d.ts.map +1 -1
- package/models/components/invoiceitem.js +15 -15
- package/models/components/invoiceitem.js.map +1 -1
- package/models/components/invoiceitemfilter.d.ts +67 -0
- package/models/components/invoiceitemfilter.d.ts.map +1 -0
- package/models/components/invoiceitemfilter.js +82 -0
- package/models/components/invoiceitemfilter.js.map +1 -0
- package/models/components/invoiceitemsfilter.d.ts +40 -0
- package/models/components/invoiceitemsfilter.d.ts.map +1 -1
- package/models/components/invoiceitemsfilter.js +26 -1
- package/models/components/invoiceitemsfilter.js.map +1 -1
- package/models/components/ledgeraccount.d.ts +17 -17
- package/models/components/ledgeraccount.d.ts.map +1 -1
- package/models/components/ledgeraccount.js +24 -20
- package/models/components/ledgeraccount.js.map +1 -1
- package/models/components/message.d.ts +2 -2
- package/models/components/message.d.ts.map +1 -1
- package/models/components/message.js +4 -4
- package/models/components/message.js.map +1 -1
- package/models/components/supplier.d.ts +10 -0
- package/models/components/supplier.d.ts.map +1 -1
- package/models/components/supplier.js +8 -0
- package/models/components/supplier.js.map +1 -1
- package/models/components/taxrate.d.ts +38 -0
- package/models/components/taxrate.d.ts.map +1 -1
- package/models/components/taxrate.js +32 -1
- package/models/components/taxrate.js.map +1 -1
- package/models/components/trackingcategory.d.ts +38 -0
- package/models/components/trackingcategory.d.ts.map +1 -1
- package/models/components/trackingcategory.js +32 -1
- package/models/components/trackingcategory.js.map +1 -1
- package/models/operations/accountinginvoiceitemsone.d.ts +5 -0
- package/models/operations/accountinginvoiceitemsone.d.ts.map +1 -1
- package/models/operations/accountinginvoiceitemsone.js +2 -0
- package/models/operations/accountinginvoiceitemsone.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/accountingInvoiceItemsGet.ts +15 -5
- package/src/hooks/registration.ts +2 -4
- package/src/lib/config.ts +4 -4
- package/src/lib/security.ts +1 -1
- package/src/models/components/expense.ts +52 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/invoiceitem.ts +19 -19
- package/src/models/components/invoiceitemfilter.ts +106 -0
- package/src/models/components/invoiceitemsfilter.ts +42 -0
- package/src/models/components/ledgeraccount.ts +36 -28
- package/src/models/components/message.ts +2 -2
- package/src/models/components/supplier.ts +18 -0
- package/src/models/components/taxrate.ts +71 -0
- package/src/models/components/trackingcategory.ts +85 -0
- package/src/models/operations/accountinginvoiceitemsone.ts +7 -0
- package/hooks/headers.d.ts +0 -11
- package/hooks/headers.d.ts.map +0 -1
- package/hooks/headers.js +0 -26
- package/hooks/headers.js.map +0 -1
- package/src/hooks/headers.ts +0 -42
|
@@ -142,7 +142,7 @@ export type SubAccounts = {
|
|
|
142
142
|
accountSubName?: string | undefined;
|
|
143
143
|
};
|
|
144
144
|
|
|
145
|
-
export type
|
|
145
|
+
export type LedgerAccountSubsidiaries = {
|
|
146
146
|
/**
|
|
147
147
|
* The ID of the subsidiary.
|
|
148
148
|
*/
|
|
@@ -243,7 +243,7 @@ export type LedgerAccount = {
|
|
|
243
243
|
/**
|
|
244
244
|
* The subsidiaries the account belongs to.
|
|
245
245
|
*/
|
|
246
|
-
subsidiaries?: Array<
|
|
246
|
+
subsidiaries?: Array<LedgerAccountSubsidiaries> | undefined;
|
|
247
247
|
/**
|
|
248
248
|
* When custom mappings are configured on the resource, the result is included here.
|
|
249
249
|
*/
|
|
@@ -356,7 +356,7 @@ export type LedgerAccountInput = {
|
|
|
356
356
|
/**
|
|
357
357
|
* The subsidiaries the account belongs to.
|
|
358
358
|
*/
|
|
359
|
-
subsidiaries?: Array<
|
|
359
|
+
subsidiaries?: Array<LedgerAccountSubsidiaries> | undefined;
|
|
360
360
|
/**
|
|
361
361
|
* A binary value used to detect updates to a object and prevent data conflicts. It is incremented each time an update is made to the object.
|
|
362
362
|
*/
|
|
@@ -609,8 +609,8 @@ export function subAccountsFromJSON(
|
|
|
609
609
|
}
|
|
610
610
|
|
|
611
611
|
/** @internal */
|
|
612
|
-
export const
|
|
613
|
-
|
|
612
|
+
export const LedgerAccountSubsidiaries$inboundSchema: z.ZodType<
|
|
613
|
+
LedgerAccountSubsidiaries,
|
|
614
614
|
z.ZodTypeDef,
|
|
615
615
|
unknown
|
|
616
616
|
> = z.object({
|
|
@@ -618,15 +618,15 @@ export const Subsidiaries$inboundSchema: z.ZodType<
|
|
|
618
618
|
});
|
|
619
619
|
|
|
620
620
|
/** @internal */
|
|
621
|
-
export type
|
|
621
|
+
export type LedgerAccountSubsidiaries$Outbound = {
|
|
622
622
|
id?: string | undefined;
|
|
623
623
|
};
|
|
624
624
|
|
|
625
625
|
/** @internal */
|
|
626
|
-
export const
|
|
627
|
-
|
|
626
|
+
export const LedgerAccountSubsidiaries$outboundSchema: z.ZodType<
|
|
627
|
+
LedgerAccountSubsidiaries$Outbound,
|
|
628
628
|
z.ZodTypeDef,
|
|
629
|
-
|
|
629
|
+
LedgerAccountSubsidiaries
|
|
630
630
|
> = z.object({
|
|
631
631
|
id: z.string().optional(),
|
|
632
632
|
});
|
|
@@ -635,26 +635,30 @@ export const Subsidiaries$outboundSchema: z.ZodType<
|
|
|
635
635
|
* @internal
|
|
636
636
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
637
637
|
*/
|
|
638
|
-
export namespace
|
|
639
|
-
/** @deprecated use `
|
|
640
|
-
export const inboundSchema =
|
|
641
|
-
/** @deprecated use `
|
|
642
|
-
export const outboundSchema =
|
|
643
|
-
/** @deprecated use `
|
|
644
|
-
export type Outbound =
|
|
638
|
+
export namespace LedgerAccountSubsidiaries$ {
|
|
639
|
+
/** @deprecated use `LedgerAccountSubsidiaries$inboundSchema` instead. */
|
|
640
|
+
export const inboundSchema = LedgerAccountSubsidiaries$inboundSchema;
|
|
641
|
+
/** @deprecated use `LedgerAccountSubsidiaries$outboundSchema` instead. */
|
|
642
|
+
export const outboundSchema = LedgerAccountSubsidiaries$outboundSchema;
|
|
643
|
+
/** @deprecated use `LedgerAccountSubsidiaries$Outbound` instead. */
|
|
644
|
+
export type Outbound = LedgerAccountSubsidiaries$Outbound;
|
|
645
645
|
}
|
|
646
646
|
|
|
647
|
-
export function
|
|
648
|
-
|
|
647
|
+
export function ledgerAccountSubsidiariesToJSON(
|
|
648
|
+
ledgerAccountSubsidiaries: LedgerAccountSubsidiaries,
|
|
649
|
+
): string {
|
|
650
|
+
return JSON.stringify(
|
|
651
|
+
LedgerAccountSubsidiaries$outboundSchema.parse(ledgerAccountSubsidiaries),
|
|
652
|
+
);
|
|
649
653
|
}
|
|
650
654
|
|
|
651
|
-
export function
|
|
655
|
+
export function ledgerAccountSubsidiariesFromJSON(
|
|
652
656
|
jsonString: string,
|
|
653
|
-
): SafeParseResult<
|
|
657
|
+
): SafeParseResult<LedgerAccountSubsidiaries, SDKValidationError> {
|
|
654
658
|
return safeParse(
|
|
655
659
|
jsonString,
|
|
656
|
-
(x) =>
|
|
657
|
-
`Failed to parse '
|
|
660
|
+
(x) => LedgerAccountSubsidiaries$inboundSchema.parse(JSON.parse(x)),
|
|
661
|
+
`Failed to parse 'LedgerAccountSubsidiaries' from JSON`,
|
|
658
662
|
);
|
|
659
663
|
}
|
|
660
664
|
|
|
@@ -691,7 +695,8 @@ export const LedgerAccount$inboundSchema: z.ZodType<
|
|
|
691
695
|
last_reconciliation_date: z.nullable(
|
|
692
696
|
z.string().transform(v => new RFCDate(v)),
|
|
693
697
|
).optional(),
|
|
694
|
-
subsidiaries: z.array(z.lazy(() =>
|
|
698
|
+
subsidiaries: z.array(z.lazy(() => LedgerAccountSubsidiaries$inboundSchema))
|
|
699
|
+
.optional(),
|
|
695
700
|
custom_mappings: z.nullable(CustomMappings$inboundSchema).optional(),
|
|
696
701
|
row_version: z.nullable(z.string()).optional(),
|
|
697
702
|
updated_by: z.nullable(z.string()).optional(),
|
|
@@ -755,7 +760,7 @@ export type LedgerAccount$Outbound = {
|
|
|
755
760
|
sub_account?: boolean | null | undefined;
|
|
756
761
|
sub_accounts?: Array<SubAccounts$Outbound> | undefined;
|
|
757
762
|
last_reconciliation_date?: string | null | undefined;
|
|
758
|
-
subsidiaries?: Array<
|
|
763
|
+
subsidiaries?: Array<LedgerAccountSubsidiaries$Outbound> | undefined;
|
|
759
764
|
custom_mappings?: CustomMappings$Outbound | null | undefined;
|
|
760
765
|
row_version?: string | null | undefined;
|
|
761
766
|
updated_by?: string | null | undefined;
|
|
@@ -798,7 +803,8 @@ export const LedgerAccount$outboundSchema: z.ZodType<
|
|
|
798
803
|
lastReconciliationDate: z.nullable(
|
|
799
804
|
z.instanceof(RFCDate).transform(v => v.toString()),
|
|
800
805
|
).optional(),
|
|
801
|
-
subsidiaries: z.array(z.lazy(() =>
|
|
806
|
+
subsidiaries: z.array(z.lazy(() => LedgerAccountSubsidiaries$outboundSchema))
|
|
807
|
+
.optional(),
|
|
802
808
|
customMappings: z.nullable(CustomMappings$outboundSchema).optional(),
|
|
803
809
|
rowVersion: z.nullable(z.string()).optional(),
|
|
804
810
|
updatedBy: z.nullable(z.string()).optional(),
|
|
@@ -888,7 +894,8 @@ export const LedgerAccountInput$inboundSchema: z.ZodType<
|
|
|
888
894
|
last_reconciliation_date: z.nullable(
|
|
889
895
|
z.string().transform(v => new RFCDate(v)),
|
|
890
896
|
).optional(),
|
|
891
|
-
subsidiaries: z.array(z.lazy(() =>
|
|
897
|
+
subsidiaries: z.array(z.lazy(() => LedgerAccountSubsidiaries$inboundSchema))
|
|
898
|
+
.optional(),
|
|
892
899
|
row_version: z.nullable(z.string()).optional(),
|
|
893
900
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
894
901
|
}).transform((v) => {
|
|
@@ -934,7 +941,7 @@ export type LedgerAccountInput$Outbound = {
|
|
|
934
941
|
parent_account?: ParentAccount$Outbound | undefined;
|
|
935
942
|
sub_account?: boolean | null | undefined;
|
|
936
943
|
last_reconciliation_date?: string | null | undefined;
|
|
937
|
-
subsidiaries?: Array<
|
|
944
|
+
subsidiaries?: Array<LedgerAccountSubsidiaries$Outbound> | undefined;
|
|
938
945
|
row_version?: string | null | undefined;
|
|
939
946
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
940
947
|
};
|
|
@@ -969,7 +976,8 @@ export const LedgerAccountInput$outboundSchema: z.ZodType<
|
|
|
969
976
|
lastReconciliationDate: z.nullable(
|
|
970
977
|
z.instanceof(RFCDate).transform(v => v.toString()),
|
|
971
978
|
).optional(),
|
|
972
|
-
subsidiaries: z.array(z.lazy(() =>
|
|
979
|
+
subsidiaries: z.array(z.lazy(() => LedgerAccountSubsidiaries$outboundSchema))
|
|
980
|
+
.optional(),
|
|
973
981
|
rowVersion: z.nullable(z.string()).optional(),
|
|
974
982
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
975
983
|
}).transform((v) => {
|
|
@@ -388,11 +388,11 @@ export namespace ErrorT$ {
|
|
|
388
388
|
export type Outbound = ErrorT$Outbound;
|
|
389
389
|
}
|
|
390
390
|
|
|
391
|
-
export function
|
|
391
|
+
export function errorToJSON(errorT: ErrorT): string {
|
|
392
392
|
return JSON.stringify(ErrorT$outboundSchema.parse(errorT));
|
|
393
393
|
}
|
|
394
394
|
|
|
395
|
-
export function
|
|
395
|
+
export function errorFromJSON(
|
|
396
396
|
jsonString: string,
|
|
397
397
|
): SafeParseResult<ErrorT, SDKValidationError> {
|
|
398
398
|
return safeParse(
|
|
@@ -197,6 +197,10 @@ export type Supplier = {
|
|
|
197
197
|
* The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
|
|
198
198
|
*/
|
|
199
199
|
passThrough?: Array<PassThroughBody> | undefined;
|
|
200
|
+
/**
|
|
201
|
+
* The subsidiary the supplier belongs to.
|
|
202
|
+
*/
|
|
203
|
+
subsidiaryId?: string | undefined;
|
|
200
204
|
};
|
|
201
205
|
|
|
202
206
|
export type SupplierInput = {
|
|
@@ -273,6 +277,10 @@ export type SupplierInput = {
|
|
|
273
277
|
* The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
|
|
274
278
|
*/
|
|
275
279
|
passThrough?: Array<PassThroughBody> | undefined;
|
|
280
|
+
/**
|
|
281
|
+
* The subsidiary the supplier belongs to.
|
|
282
|
+
*/
|
|
283
|
+
subsidiaryId?: string | undefined;
|
|
276
284
|
};
|
|
277
285
|
|
|
278
286
|
/** @internal */
|
|
@@ -338,6 +346,7 @@ export const Supplier$inboundSchema: z.ZodType<
|
|
|
338
346
|
).optional(),
|
|
339
347
|
row_version: z.nullable(z.string()).optional(),
|
|
340
348
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
349
|
+
subsidiary_id: z.string().optional(),
|
|
341
350
|
}).transform((v) => {
|
|
342
351
|
return remap$(v, {
|
|
343
352
|
"downstream_id": "downstreamId",
|
|
@@ -360,6 +369,7 @@ export const Supplier$inboundSchema: z.ZodType<
|
|
|
360
369
|
"created_at": "createdAt",
|
|
361
370
|
"row_version": "rowVersion",
|
|
362
371
|
"pass_through": "passThrough",
|
|
372
|
+
"subsidiary_id": "subsidiaryId",
|
|
363
373
|
});
|
|
364
374
|
});
|
|
365
375
|
|
|
@@ -397,6 +407,7 @@ export type Supplier$Outbound = {
|
|
|
397
407
|
created_at?: string | null | undefined;
|
|
398
408
|
row_version?: string | null | undefined;
|
|
399
409
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
410
|
+
subsidiary_id?: string | undefined;
|
|
400
411
|
};
|
|
401
412
|
|
|
402
413
|
/** @internal */
|
|
@@ -437,6 +448,7 @@ export const Supplier$outboundSchema: z.ZodType<
|
|
|
437
448
|
createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
438
449
|
rowVersion: z.nullable(z.string()).optional(),
|
|
439
450
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
451
|
+
subsidiaryId: z.string().optional(),
|
|
440
452
|
}).transform((v) => {
|
|
441
453
|
return remap$(v, {
|
|
442
454
|
downstreamId: "downstream_id",
|
|
@@ -459,6 +471,7 @@ export const Supplier$outboundSchema: z.ZodType<
|
|
|
459
471
|
createdAt: "created_at",
|
|
460
472
|
rowVersion: "row_version",
|
|
461
473
|
passThrough: "pass_through",
|
|
474
|
+
subsidiaryId: "subsidiary_id",
|
|
462
475
|
});
|
|
463
476
|
});
|
|
464
477
|
|
|
@@ -520,6 +533,7 @@ export const SupplierInput$inboundSchema: z.ZodType<
|
|
|
520
533
|
channel: z.nullable(z.string()).optional(),
|
|
521
534
|
row_version: z.nullable(z.string()).optional(),
|
|
522
535
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
536
|
+
subsidiary_id: z.string().optional(),
|
|
523
537
|
}).transform((v) => {
|
|
524
538
|
return remap$(v, {
|
|
525
539
|
"display_id": "displayId",
|
|
@@ -536,6 +550,7 @@ export const SupplierInput$inboundSchema: z.ZodType<
|
|
|
536
550
|
"payment_method": "paymentMethod",
|
|
537
551
|
"row_version": "rowVersion",
|
|
538
552
|
"pass_through": "passThrough",
|
|
553
|
+
"subsidiary_id": "subsidiaryId",
|
|
539
554
|
});
|
|
540
555
|
});
|
|
541
556
|
|
|
@@ -566,6 +581,7 @@ export type SupplierInput$Outbound = {
|
|
|
566
581
|
channel?: string | null | undefined;
|
|
567
582
|
row_version?: string | null | undefined;
|
|
568
583
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
584
|
+
subsidiary_id?: string | undefined;
|
|
569
585
|
};
|
|
570
586
|
|
|
571
587
|
/** @internal */
|
|
@@ -599,6 +615,7 @@ export const SupplierInput$outboundSchema: z.ZodType<
|
|
|
599
615
|
channel: z.nullable(z.string()).optional(),
|
|
600
616
|
rowVersion: z.nullable(z.string()).optional(),
|
|
601
617
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
618
|
+
subsidiaryId: z.string().optional(),
|
|
602
619
|
}).transform((v) => {
|
|
603
620
|
return remap$(v, {
|
|
604
621
|
displayId: "display_id",
|
|
@@ -615,6 +632,7 @@ export const SupplierInput$outboundSchema: z.ZodType<
|
|
|
615
632
|
paymentMethod: "payment_method",
|
|
616
633
|
rowVersion: "row_version",
|
|
617
634
|
passThrough: "pass_through",
|
|
635
|
+
subsidiaryId: "subsidiary_id",
|
|
618
636
|
});
|
|
619
637
|
});
|
|
620
638
|
|
|
@@ -41,6 +41,13 @@ export const TaxRateStatus = {
|
|
|
41
41
|
*/
|
|
42
42
|
export type TaxRateStatus = ClosedEnum<typeof TaxRateStatus>;
|
|
43
43
|
|
|
44
|
+
export type Subsidiaries = {
|
|
45
|
+
/**
|
|
46
|
+
* The ID of the subsidiary.
|
|
47
|
+
*/
|
|
48
|
+
id?: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
|
|
44
51
|
export type TaxRate = {
|
|
45
52
|
/**
|
|
46
53
|
* ID assigned to identify this tax rate.
|
|
@@ -119,6 +126,10 @@ export type TaxRate = {
|
|
|
119
126
|
* The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
|
|
120
127
|
*/
|
|
121
128
|
passThrough?: Array<PassThroughBody> | undefined;
|
|
129
|
+
/**
|
|
130
|
+
* The subsidiaries this belongs to.
|
|
131
|
+
*/
|
|
132
|
+
subsidiaries?: Array<Subsidiaries> | undefined;
|
|
122
133
|
};
|
|
123
134
|
|
|
124
135
|
export type TaxRateInput = {
|
|
@@ -179,6 +190,10 @@ export type TaxRateInput = {
|
|
|
179
190
|
* The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
|
|
180
191
|
*/
|
|
181
192
|
passThrough?: Array<PassThroughBody> | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* The subsidiaries this belongs to.
|
|
195
|
+
*/
|
|
196
|
+
subsidiaries?: Array<Subsidiaries> | undefined;
|
|
182
197
|
};
|
|
183
198
|
|
|
184
199
|
/** @internal */
|
|
@@ -261,6 +276,56 @@ export namespace TaxRateStatus$ {
|
|
|
261
276
|
export const outboundSchema = TaxRateStatus$outboundSchema;
|
|
262
277
|
}
|
|
263
278
|
|
|
279
|
+
/** @internal */
|
|
280
|
+
export const Subsidiaries$inboundSchema: z.ZodType<
|
|
281
|
+
Subsidiaries,
|
|
282
|
+
z.ZodTypeDef,
|
|
283
|
+
unknown
|
|
284
|
+
> = z.object({
|
|
285
|
+
id: z.string().optional(),
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
/** @internal */
|
|
289
|
+
export type Subsidiaries$Outbound = {
|
|
290
|
+
id?: string | undefined;
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
/** @internal */
|
|
294
|
+
export const Subsidiaries$outboundSchema: z.ZodType<
|
|
295
|
+
Subsidiaries$Outbound,
|
|
296
|
+
z.ZodTypeDef,
|
|
297
|
+
Subsidiaries
|
|
298
|
+
> = z.object({
|
|
299
|
+
id: z.string().optional(),
|
|
300
|
+
});
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @internal
|
|
304
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
305
|
+
*/
|
|
306
|
+
export namespace Subsidiaries$ {
|
|
307
|
+
/** @deprecated use `Subsidiaries$inboundSchema` instead. */
|
|
308
|
+
export const inboundSchema = Subsidiaries$inboundSchema;
|
|
309
|
+
/** @deprecated use `Subsidiaries$outboundSchema` instead. */
|
|
310
|
+
export const outboundSchema = Subsidiaries$outboundSchema;
|
|
311
|
+
/** @deprecated use `Subsidiaries$Outbound` instead. */
|
|
312
|
+
export type Outbound = Subsidiaries$Outbound;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
export function subsidiariesToJSON(subsidiaries: Subsidiaries): string {
|
|
316
|
+
return JSON.stringify(Subsidiaries$outboundSchema.parse(subsidiaries));
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export function subsidiariesFromJSON(
|
|
320
|
+
jsonString: string,
|
|
321
|
+
): SafeParseResult<Subsidiaries, SDKValidationError> {
|
|
322
|
+
return safeParse(
|
|
323
|
+
jsonString,
|
|
324
|
+
(x) => Subsidiaries$inboundSchema.parse(JSON.parse(x)),
|
|
325
|
+
`Failed to parse 'Subsidiaries' from JSON`,
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
|
|
264
329
|
/** @internal */
|
|
265
330
|
export const TaxRate$inboundSchema: z.ZodType<TaxRate, z.ZodTypeDef, unknown> =
|
|
266
331
|
z.object({
|
|
@@ -289,6 +354,7 @@ export const TaxRate$inboundSchema: z.ZodType<TaxRate, z.ZodTypeDef, unknown> =
|
|
|
289
354
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
290
355
|
).optional(),
|
|
291
356
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
357
|
+
subsidiaries: z.array(z.lazy(() => Subsidiaries$inboundSchema)).optional(),
|
|
292
358
|
}).transform((v) => {
|
|
293
359
|
return remap$(v, {
|
|
294
360
|
"effective_tax_rate": "effectiveTaxRate",
|
|
@@ -329,6 +395,7 @@ export type TaxRate$Outbound = {
|
|
|
329
395
|
updated_at?: string | null | undefined;
|
|
330
396
|
created_at?: string | null | undefined;
|
|
331
397
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
398
|
+
subsidiaries?: Array<Subsidiaries$Outbound> | undefined;
|
|
332
399
|
};
|
|
333
400
|
|
|
334
401
|
/** @internal */
|
|
@@ -358,6 +425,7 @@ export const TaxRate$outboundSchema: z.ZodType<
|
|
|
358
425
|
updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
359
426
|
createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
360
427
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
428
|
+
subsidiaries: z.array(z.lazy(() => Subsidiaries$outboundSchema)).optional(),
|
|
361
429
|
}).transform((v) => {
|
|
362
430
|
return remap$(v, {
|
|
363
431
|
effectiveTaxRate: "effective_tax_rate",
|
|
@@ -425,6 +493,7 @@ export const TaxRateInput$inboundSchema: z.ZodType<
|
|
|
425
493
|
status: z.nullable(TaxRateStatus$inboundSchema).optional(),
|
|
426
494
|
row_version: z.nullable(z.string()).optional(),
|
|
427
495
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
496
|
+
subsidiaries: z.array(z.lazy(() => Subsidiaries$inboundSchema)).optional(),
|
|
428
497
|
}).transform((v) => {
|
|
429
498
|
return remap$(v, {
|
|
430
499
|
"effective_tax_rate": "effectiveTaxRate",
|
|
@@ -455,6 +524,7 @@ export type TaxRateInput$Outbound = {
|
|
|
455
524
|
status?: string | null | undefined;
|
|
456
525
|
row_version?: string | null | undefined;
|
|
457
526
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
527
|
+
subsidiaries?: Array<Subsidiaries$Outbound> | undefined;
|
|
458
528
|
};
|
|
459
529
|
|
|
460
530
|
/** @internal */
|
|
@@ -479,6 +549,7 @@ export const TaxRateInput$outboundSchema: z.ZodType<
|
|
|
479
549
|
status: z.nullable(TaxRateStatus$outboundSchema).optional(),
|
|
480
550
|
rowVersion: z.nullable(z.string()).optional(),
|
|
481
551
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
552
|
+
subsidiaries: z.array(z.lazy(() => Subsidiaries$outboundSchema)).optional(),
|
|
482
553
|
}).transform((v) => {
|
|
483
554
|
return remap$(v, {
|
|
484
555
|
effectiveTaxRate: "effective_tax_rate",
|
|
@@ -33,6 +33,13 @@ export const TrackingCategoryStatus = {
|
|
|
33
33
|
*/
|
|
34
34
|
export type TrackingCategoryStatus = ClosedEnum<typeof TrackingCategoryStatus>;
|
|
35
35
|
|
|
36
|
+
export type TrackingCategorySubsidiaries = {
|
|
37
|
+
/**
|
|
38
|
+
* The ID of the subsidiary.
|
|
39
|
+
*/
|
|
40
|
+
id?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
36
43
|
export type TrackingCategory = {
|
|
37
44
|
/**
|
|
38
45
|
* A unique identifier for an object.
|
|
@@ -82,6 +89,10 @@ export type TrackingCategory = {
|
|
|
82
89
|
* The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
|
|
83
90
|
*/
|
|
84
91
|
passThrough?: Array<PassThroughBody> | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* The subsidiaries the account belongs to.
|
|
94
|
+
*/
|
|
95
|
+
subsidiaries?: Array<TrackingCategorySubsidiaries> | undefined;
|
|
85
96
|
};
|
|
86
97
|
|
|
87
98
|
export type TrackingCategoryInput = {
|
|
@@ -109,6 +120,10 @@ export type TrackingCategoryInput = {
|
|
|
109
120
|
* The pass_through property allows passing service-specific, custom data or structured modifications in request body when creating or updating resources.
|
|
110
121
|
*/
|
|
111
122
|
passThrough?: Array<PassThroughBody> | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* The subsidiaries the account belongs to.
|
|
125
|
+
*/
|
|
126
|
+
subsidiaries?: Array<TrackingCategorySubsidiaries> | undefined;
|
|
112
127
|
};
|
|
113
128
|
|
|
114
129
|
/** @internal */
|
|
@@ -132,6 +147,62 @@ export namespace TrackingCategoryStatus$ {
|
|
|
132
147
|
export const outboundSchema = TrackingCategoryStatus$outboundSchema;
|
|
133
148
|
}
|
|
134
149
|
|
|
150
|
+
/** @internal */
|
|
151
|
+
export const TrackingCategorySubsidiaries$inboundSchema: z.ZodType<
|
|
152
|
+
TrackingCategorySubsidiaries,
|
|
153
|
+
z.ZodTypeDef,
|
|
154
|
+
unknown
|
|
155
|
+
> = z.object({
|
|
156
|
+
id: z.string().optional(),
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
/** @internal */
|
|
160
|
+
export type TrackingCategorySubsidiaries$Outbound = {
|
|
161
|
+
id?: string | undefined;
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
/** @internal */
|
|
165
|
+
export const TrackingCategorySubsidiaries$outboundSchema: z.ZodType<
|
|
166
|
+
TrackingCategorySubsidiaries$Outbound,
|
|
167
|
+
z.ZodTypeDef,
|
|
168
|
+
TrackingCategorySubsidiaries
|
|
169
|
+
> = z.object({
|
|
170
|
+
id: z.string().optional(),
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @internal
|
|
175
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
176
|
+
*/
|
|
177
|
+
export namespace TrackingCategorySubsidiaries$ {
|
|
178
|
+
/** @deprecated use `TrackingCategorySubsidiaries$inboundSchema` instead. */
|
|
179
|
+
export const inboundSchema = TrackingCategorySubsidiaries$inboundSchema;
|
|
180
|
+
/** @deprecated use `TrackingCategorySubsidiaries$outboundSchema` instead. */
|
|
181
|
+
export const outboundSchema = TrackingCategorySubsidiaries$outboundSchema;
|
|
182
|
+
/** @deprecated use `TrackingCategorySubsidiaries$Outbound` instead. */
|
|
183
|
+
export type Outbound = TrackingCategorySubsidiaries$Outbound;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export function trackingCategorySubsidiariesToJSON(
|
|
187
|
+
trackingCategorySubsidiaries: TrackingCategorySubsidiaries,
|
|
188
|
+
): string {
|
|
189
|
+
return JSON.stringify(
|
|
190
|
+
TrackingCategorySubsidiaries$outboundSchema.parse(
|
|
191
|
+
trackingCategorySubsidiaries,
|
|
192
|
+
),
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function trackingCategorySubsidiariesFromJSON(
|
|
197
|
+
jsonString: string,
|
|
198
|
+
): SafeParseResult<TrackingCategorySubsidiaries, SDKValidationError> {
|
|
199
|
+
return safeParse(
|
|
200
|
+
jsonString,
|
|
201
|
+
(x) => TrackingCategorySubsidiaries$inboundSchema.parse(JSON.parse(x)),
|
|
202
|
+
`Failed to parse 'TrackingCategorySubsidiaries' from JSON`,
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
|
|
135
206
|
/** @internal */
|
|
136
207
|
export const TrackingCategory$inboundSchema: z.ZodType<
|
|
137
208
|
TrackingCategory,
|
|
@@ -154,6 +225,9 @@ export const TrackingCategory$inboundSchema: z.ZodType<
|
|
|
154
225
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
155
226
|
).optional(),
|
|
156
227
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
228
|
+
subsidiaries: z.array(
|
|
229
|
+
z.lazy(() => TrackingCategorySubsidiaries$inboundSchema),
|
|
230
|
+
).optional(),
|
|
157
231
|
}).transform((v) => {
|
|
158
232
|
return remap$(v, {
|
|
159
233
|
"parent_id": "parentId",
|
|
@@ -181,6 +255,7 @@ export type TrackingCategory$Outbound = {
|
|
|
181
255
|
updated_at?: string | null | undefined;
|
|
182
256
|
created_at?: string | null | undefined;
|
|
183
257
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
258
|
+
subsidiaries?: Array<TrackingCategorySubsidiaries$Outbound> | undefined;
|
|
184
259
|
};
|
|
185
260
|
|
|
186
261
|
/** @internal */
|
|
@@ -201,6 +276,9 @@ export const TrackingCategory$outboundSchema: z.ZodType<
|
|
|
201
276
|
updatedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
202
277
|
createdAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
203
278
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
279
|
+
subsidiaries: z.array(
|
|
280
|
+
z.lazy(() => TrackingCategorySubsidiaries$outboundSchema),
|
|
281
|
+
).optional(),
|
|
204
282
|
}).transform((v) => {
|
|
205
283
|
return remap$(v, {
|
|
206
284
|
parentId: "parent_id",
|
|
@@ -257,6 +335,9 @@ export const TrackingCategoryInput$inboundSchema: z.ZodType<
|
|
|
257
335
|
status: TrackingCategoryStatus$inboundSchema.optional(),
|
|
258
336
|
row_version: z.nullable(z.string()).optional(),
|
|
259
337
|
pass_through: z.array(PassThroughBody$inboundSchema).optional(),
|
|
338
|
+
subsidiaries: z.array(
|
|
339
|
+
z.lazy(() => TrackingCategorySubsidiaries$inboundSchema),
|
|
340
|
+
).optional(),
|
|
260
341
|
}).transform((v) => {
|
|
261
342
|
return remap$(v, {
|
|
262
343
|
"parent_id": "parentId",
|
|
@@ -273,6 +354,7 @@ export type TrackingCategoryInput$Outbound = {
|
|
|
273
354
|
status?: string | undefined;
|
|
274
355
|
row_version?: string | null | undefined;
|
|
275
356
|
pass_through?: Array<PassThroughBody$Outbound> | undefined;
|
|
357
|
+
subsidiaries?: Array<TrackingCategorySubsidiaries$Outbound> | undefined;
|
|
276
358
|
};
|
|
277
359
|
|
|
278
360
|
/** @internal */
|
|
@@ -287,6 +369,9 @@ export const TrackingCategoryInput$outboundSchema: z.ZodType<
|
|
|
287
369
|
status: TrackingCategoryStatus$outboundSchema.optional(),
|
|
288
370
|
rowVersion: z.nullable(z.string()).optional(),
|
|
289
371
|
passThrough: z.array(PassThroughBody$outboundSchema).optional(),
|
|
372
|
+
subsidiaries: z.array(
|
|
373
|
+
z.lazy(() => TrackingCategorySubsidiaries$outboundSchema),
|
|
374
|
+
).optional(),
|
|
290
375
|
}).transform((v) => {
|
|
291
376
|
return remap$(v, {
|
|
292
377
|
parentId: "parent_id",
|
|
@@ -37,6 +37,10 @@ export type AccountingInvoiceItemsOneRequest = {
|
|
|
37
37
|
* The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation. <br /><br />Example: `fields=name,email,addresses.city`<br /><br />In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.
|
|
38
38
|
*/
|
|
39
39
|
fields?: string | null | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Apply filters
|
|
42
|
+
*/
|
|
43
|
+
filter?: components.InvoiceItemFilter | undefined;
|
|
40
44
|
};
|
|
41
45
|
|
|
42
46
|
export type AccountingInvoiceItemsOneResponse = {
|
|
@@ -120,6 +124,7 @@ export const AccountingInvoiceItemsOneRequest$inboundSchema: z.ZodType<
|
|
|
120
124
|
serviceId: z.string().optional(),
|
|
121
125
|
raw: z.boolean().default(false),
|
|
122
126
|
fields: z.nullable(z.string()).optional(),
|
|
127
|
+
filter: components.InvoiceItemFilter$inboundSchema.optional(),
|
|
123
128
|
});
|
|
124
129
|
|
|
125
130
|
/** @internal */
|
|
@@ -128,6 +133,7 @@ export type AccountingInvoiceItemsOneRequest$Outbound = {
|
|
|
128
133
|
serviceId?: string | undefined;
|
|
129
134
|
raw: boolean;
|
|
130
135
|
fields?: string | null | undefined;
|
|
136
|
+
filter?: components.InvoiceItemFilter$Outbound | undefined;
|
|
131
137
|
};
|
|
132
138
|
|
|
133
139
|
/** @internal */
|
|
@@ -140,6 +146,7 @@ export const AccountingInvoiceItemsOneRequest$outboundSchema: z.ZodType<
|
|
|
140
146
|
serviceId: z.string().optional(),
|
|
141
147
|
raw: z.boolean().default(false),
|
|
142
148
|
fields: z.nullable(z.string()).optional(),
|
|
149
|
+
filter: components.InvoiceItemFilter$outboundSchema.optional(),
|
|
143
150
|
});
|
|
144
151
|
|
|
145
152
|
/**
|
package/hooks/headers.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AfterErrorContext, AfterErrorHook, AfterSuccessContext, AfterSuccessHook, BeforeRequestContext, BeforeRequestHook, SDKInitHook, SDKInitOptions } from "./types";
|
|
2
|
-
export declare class HeadersHook implements SDKInitHook, BeforeRequestHook, AfterSuccessHook, AfterErrorHook {
|
|
3
|
-
sdkInit(opts: SDKInitOptions): SDKInitOptions;
|
|
4
|
-
beforeRequest(_: BeforeRequestContext, request: Request): Request;
|
|
5
|
-
afterSuccess(_: AfterSuccessContext, response: Response): Response;
|
|
6
|
-
afterError(_: AfterErrorContext, response: Response | null, error: unknown): {
|
|
7
|
-
response: Response | null;
|
|
8
|
-
error: unknown;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=headers.d.ts.map
|
package/hooks/headers.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../src/hooks/headers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,cAAc,EACf,MAAM,SAAS,CAAC;AAEjB,qBAAa,WACX,YAAW,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc;IAE3E,OAAO,CAAC,IAAI,EAAE,cAAc,GAAG,cAAc;IAO7C,aAAa,CAAC,CAAC,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO;IAOjE,YAAY,CAAC,CAAC,EAAE,mBAAmB,EAAE,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IAKlE,UAAU,CACR,CAAC,EAAE,iBAAiB,EACpB,QAAQ,EAAE,QAAQ,GAAG,IAAI,EACzB,KAAK,EAAE,OAAO,GACb;QAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE;CAIjD"}
|
package/hooks/headers.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HeadersHook = void 0;
|
|
4
|
-
class HeadersHook {
|
|
5
|
-
sdkInit(opts) {
|
|
6
|
-
const { baseURL, client } = opts;
|
|
7
|
-
// modify the baseURL or wrap the client used by the SDK here and return the updated values
|
|
8
|
-
return { baseURL: baseURL, client: client };
|
|
9
|
-
}
|
|
10
|
-
beforeRequest(_, request) {
|
|
11
|
-
// modify the request object before it is sent, such as adding headers or query parameters, or throw an error to stop the request from being sent
|
|
12
|
-
const apiKey = request.headers.get("Authorization");
|
|
13
|
-
request.headers.set("Authorization", `Bearer ${apiKey}`);
|
|
14
|
-
return request;
|
|
15
|
-
}
|
|
16
|
-
afterSuccess(_, response) {
|
|
17
|
-
// modify the response object before deserialization or throw an error to stop the response from being deserialized
|
|
18
|
-
return response;
|
|
19
|
-
}
|
|
20
|
-
afterError(_, response, error) {
|
|
21
|
-
// modify the response before it is deserialized as a custom error or the error object before it is returned or throw an error to stop processing of other error hooks and return early
|
|
22
|
-
return { response, error };
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.HeadersHook = HeadersHook;
|
|
26
|
-
//# sourceMappingURL=headers.js.map
|
package/hooks/headers.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"headers.js","sourceRoot":"","sources":["../src/hooks/headers.ts"],"names":[],"mappings":";;;AAWA,MAAa,WAAW;IAGtB,OAAO,CAAC,IAAoB;QAC1B,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAEjC,2FAA2F;QAC3F,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IAC9C,CAAC;IAED,aAAa,CAAC,CAAuB,EAAE,OAAgB;QACrD,iJAAiJ;QACjJ,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;QACpD,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,UAAU,MAAM,EAAE,CAAC,CAAC;QACzD,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,YAAY,CAAC,CAAsB,EAAE,QAAkB;QACrD,mHAAmH;QACnH,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,UAAU,CACR,CAAoB,EACpB,QAAyB,EACzB,KAAc;QAEd,uLAAuL;QACvL,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;CACF;AA9BD,kCA8BC"}
|