@unified-api/typescript-sdk 2.10.0 → 2.10.2
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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- package/sdk/models/shared/accountingaccount.d.ts +23 -9
- package/sdk/models/shared/accountingaccount.d.ts.map +1 -1
- package/sdk/models/shared/accountingaccount.js +28 -3
- package/sdk/models/shared/accountingaccount.js.map +1 -1
- package/sdk/models/shared/accountingcontact.d.ts +23 -6
- package/sdk/models/shared/accountingcontact.d.ts.map +1 -1
- package/sdk/models/shared/accountingcontact.js +26 -3
- package/sdk/models/shared/accountingcontact.js.map +1 -1
- package/sdk/models/shared/accountinginvoice.d.ts +23 -6
- package/sdk/models/shared/accountinginvoice.d.ts.map +1 -1
- package/sdk/models/shared/accountinginvoice.js +26 -3
- package/sdk/models/shared/accountinginvoice.js.map +1 -1
- package/sdk/models/shared/accountingjournal.d.ts +23 -6
- package/sdk/models/shared/accountingjournal.d.ts.map +1 -1
- package/sdk/models/shared/accountingjournal.js +26 -3
- package/sdk/models/shared/accountingjournal.js.map +1 -1
- package/sdk/models/shared/accountingorder.d.ts +23 -6
- package/sdk/models/shared/accountingorder.d.ts.map +1 -1
- package/sdk/models/shared/accountingorder.js +26 -3
- package/sdk/models/shared/accountingorder.js.map +1 -1
- package/sdk/models/shared/accountingorganization.d.ts +23 -6
- package/sdk/models/shared/accountingorganization.d.ts.map +1 -1
- package/sdk/models/shared/accountingorganization.js +26 -3
- package/sdk/models/shared/accountingorganization.js.map +1 -1
- package/sdk/models/shared/accountingtaxrate.d.ts +23 -6
- package/sdk/models/shared/accountingtaxrate.d.ts.map +1 -1
- package/sdk/models/shared/accountingtaxrate.js +26 -3
- package/sdk/models/shared/accountingtaxrate.js.map +1 -1
- package/sdk/models/shared/accountingtransaction.d.ts +23 -6
- package/sdk/models/shared/accountingtransaction.d.ts.map +1 -1
- package/sdk/models/shared/accountingtransaction.js +26 -3
- package/sdk/models/shared/accountingtransaction.js.map +1 -1
- package/sdk/models/shared/accountingtransactioncontact.d.ts +10 -2
- package/sdk/models/shared/accountingtransactioncontact.d.ts.map +1 -1
- package/sdk/models/shared/accountingtransactioncontact.js +21 -2
- package/sdk/models/shared/accountingtransactioncontact.js.map +1 -1
- package/sdk/models/shared/atsactivity.d.ts +15 -15
- package/sdk/models/shared/atsactivity.d.ts.map +1 -1
- package/sdk/models/shared/atsactivity.js +18 -20
- package/sdk/models/shared/atsactivity.js.map +1 -1
- package/sdk/models/shared/atsoffer.d.ts +85 -2
- package/sdk/models/shared/atsoffer.d.ts.map +1 -1
- package/sdk/models/shared/atsoffer.js +103 -3
- package/sdk/models/shared/atsoffer.js.map +1 -1
- package/sdk/models/shared/crmcompany.d.ts +26 -9
- package/sdk/models/shared/crmcompany.d.ts.map +1 -1
- package/sdk/models/shared/crmcompany.js +26 -3
- package/sdk/models/shared/crmcompany.js.map +1 -1
- package/sdk/models/shared/crmcontact.d.ts +26 -9
- package/sdk/models/shared/crmcontact.d.ts.map +1 -1
- package/sdk/models/shared/crmcontact.js +26 -3
- package/sdk/models/shared/crmcontact.js.map +1 -1
- package/sdk/models/shared/crmdeal.d.ts +27 -9
- package/sdk/models/shared/crmdeal.d.ts.map +1 -1
- package/sdk/models/shared/crmdeal.js +34 -3
- package/sdk/models/shared/crmdeal.js.map +1 -1
- package/sdk/models/shared/crmevent.d.ts +23 -9
- package/sdk/models/shared/crmevent.d.ts.map +1 -1
- package/sdk/models/shared/crmevent.js +26 -3
- package/sdk/models/shared/crmevent.js.map +1 -1
- package/sdk/models/shared/crmeventformfield.d.ts +3 -0
- package/sdk/models/shared/crmeventformfield.d.ts.map +1 -1
- package/sdk/models/shared/crmeventformfield.js +1 -0
- package/sdk/models/shared/crmeventformfield.js.map +1 -1
- package/sdk/models/shared/crmlead.d.ts +23 -6
- package/sdk/models/shared/crmlead.d.ts.map +1 -1
- package/sdk/models/shared/crmlead.js +26 -3
- package/sdk/models/shared/crmlead.js.map +1 -1
- package/sdk/models/shared/crmpipeline.d.ts +23 -6
- package/sdk/models/shared/crmpipeline.d.ts.map +1 -1
- package/sdk/models/shared/crmpipeline.js +26 -3
- package/sdk/models/shared/crmpipeline.js.map +1 -1
- package/sdk/models/shared/hriscompany.d.ts +23 -6
- package/sdk/models/shared/hriscompany.d.ts.map +1 -1
- package/sdk/models/shared/hriscompany.js +26 -3
- package/sdk/models/shared/hriscompany.js.map +1 -1
- package/sdk/models/shared/hrisemployee.d.ts +23 -6
- package/sdk/models/shared/hrisemployee.d.ts.map +1 -1
- package/sdk/models/shared/hrisemployee.js +26 -3
- package/sdk/models/shared/hrisemployee.js.map +1 -1
- package/sdk/models/shared/hrisgroup.d.ts +23 -6
- package/sdk/models/shared/hrisgroup.d.ts.map +1 -1
- package/sdk/models/shared/hrisgroup.js +26 -3
- package/sdk/models/shared/hrisgroup.js.map +1 -1
- package/sdk/models/shared/hrislocation.d.ts +23 -6
- package/sdk/models/shared/hrislocation.d.ts.map +1 -1
- package/sdk/models/shared/hrislocation.js +26 -3
- package/sdk/models/shared/hrislocation.js.map +1 -1
- package/sdk/models/shared/hrispayslip.d.ts +27 -8
- package/sdk/models/shared/hrispayslip.d.ts.map +1 -1
- package/sdk/models/shared/hrispayslip.js +32 -5
- package/sdk/models/shared/hrispayslip.js.map +1 -1
- package/sdk/models/shared/hristimeoff.d.ts +27 -8
- package/sdk/models/shared/hristimeoff.d.ts.map +1 -1
- package/sdk/models/shared/hristimeoff.js +32 -5
- package/sdk/models/shared/hristimeoff.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +42 -2
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +38 -3
- package/sdk/models/shared/webhook.js.map +1 -1
- package/src/lib/config.ts +2 -2
- package/src/sdk/models/shared/accountingaccount.ts +44 -7
- package/src/sdk/models/shared/accountingcontact.ts +54 -4
- package/src/sdk/models/shared/accountinginvoice.ts +54 -4
- package/src/sdk/models/shared/accountingjournal.ts +54 -4
- package/src/sdk/models/shared/accountingorder.ts +54 -4
- package/src/sdk/models/shared/accountingorganization.ts +54 -4
- package/src/sdk/models/shared/accountingtaxrate.ts +54 -4
- package/src/sdk/models/shared/accountingtransaction.ts +54 -4
- package/src/sdk/models/shared/accountingtransactioncontact.ts +31 -4
- package/src/sdk/models/shared/atsactivity.ts +29 -23
- package/src/sdk/models/shared/atsoffer.ts +170 -4
- package/src/sdk/models/shared/crmcompany.ts +53 -7
- package/src/sdk/models/shared/crmcontact.ts +53 -7
- package/src/sdk/models/shared/crmdeal.ts +62 -7
- package/src/sdk/models/shared/crmevent.ts +50 -7
- package/src/sdk/models/shared/crmeventformfield.ts +1 -0
- package/src/sdk/models/shared/crmlead.ts +50 -4
- package/src/sdk/models/shared/crmpipeline.ts +50 -4
- package/src/sdk/models/shared/hriscompany.ts +50 -4
- package/src/sdk/models/shared/hrisemployee.ts +52 -4
- package/src/sdk/models/shared/hrisgroup.ts +50 -4
- package/src/sdk/models/shared/hrislocation.ts +52 -4
- package/src/sdk/models/shared/hrispayslip.ts +60 -8
- package/src/sdk/models/shared/hristimeoff.ts +60 -8
- package/src/sdk/models/shared/webhook.ts +50 -4
|
@@ -23,6 +23,8 @@ export type PaymentCollectionMethod = ClosedEnum<
|
|
|
23
23
|
typeof PaymentCollectionMethod
|
|
24
24
|
>;
|
|
25
25
|
|
|
26
|
+
export type AccountingInvoiceRaw = {};
|
|
27
|
+
|
|
26
28
|
export const AccountingInvoiceStatus = {
|
|
27
29
|
Draft: "DRAFT",
|
|
28
30
|
Voided: "VOIDED",
|
|
@@ -58,7 +60,7 @@ export type AccountingInvoice = {
|
|
|
58
60
|
paidAmount?: number | undefined;
|
|
59
61
|
paidAt?: Date | undefined;
|
|
60
62
|
paymentCollectionMethod?: PaymentCollectionMethod | undefined;
|
|
61
|
-
raw?:
|
|
63
|
+
raw?: AccountingInvoiceRaw | undefined;
|
|
62
64
|
refundAmount?: number | undefined;
|
|
63
65
|
refundReason?: string | undefined;
|
|
64
66
|
refundedAt?: Date | undefined;
|
|
@@ -91,6 +93,54 @@ export namespace PaymentCollectionMethod$ {
|
|
|
91
93
|
export const outboundSchema = PaymentCollectionMethod$outboundSchema;
|
|
92
94
|
}
|
|
93
95
|
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const AccountingInvoiceRaw$inboundSchema: z.ZodType<
|
|
98
|
+
AccountingInvoiceRaw,
|
|
99
|
+
z.ZodTypeDef,
|
|
100
|
+
unknown
|
|
101
|
+
> = z.object({});
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export type AccountingInvoiceRaw$Outbound = {};
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export const AccountingInvoiceRaw$outboundSchema: z.ZodType<
|
|
108
|
+
AccountingInvoiceRaw$Outbound,
|
|
109
|
+
z.ZodTypeDef,
|
|
110
|
+
AccountingInvoiceRaw
|
|
111
|
+
> = z.object({});
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @internal
|
|
115
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
116
|
+
*/
|
|
117
|
+
export namespace AccountingInvoiceRaw$ {
|
|
118
|
+
/** @deprecated use `AccountingInvoiceRaw$inboundSchema` instead. */
|
|
119
|
+
export const inboundSchema = AccountingInvoiceRaw$inboundSchema;
|
|
120
|
+
/** @deprecated use `AccountingInvoiceRaw$outboundSchema` instead. */
|
|
121
|
+
export const outboundSchema = AccountingInvoiceRaw$outboundSchema;
|
|
122
|
+
/** @deprecated use `AccountingInvoiceRaw$Outbound` instead. */
|
|
123
|
+
export type Outbound = AccountingInvoiceRaw$Outbound;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export function accountingInvoiceRawToJSON(
|
|
127
|
+
accountingInvoiceRaw: AccountingInvoiceRaw,
|
|
128
|
+
): string {
|
|
129
|
+
return JSON.stringify(
|
|
130
|
+
AccountingInvoiceRaw$outboundSchema.parse(accountingInvoiceRaw),
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function accountingInvoiceRawFromJSON(
|
|
135
|
+
jsonString: string,
|
|
136
|
+
): SafeParseResult<AccountingInvoiceRaw, SDKValidationError> {
|
|
137
|
+
return safeParse(
|
|
138
|
+
jsonString,
|
|
139
|
+
(x) => AccountingInvoiceRaw$inboundSchema.parse(JSON.parse(x)),
|
|
140
|
+
`Failed to parse 'AccountingInvoiceRaw' from JSON`,
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
94
144
|
/** @internal */
|
|
95
145
|
export const AccountingInvoiceStatus$inboundSchema: z.ZodNativeEnum<
|
|
96
146
|
typeof AccountingInvoiceStatus
|
|
@@ -160,7 +210,7 @@ export const AccountingInvoice$inboundSchema: z.ZodType<
|
|
|
160
210
|
paid_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
161
211
|
.optional(),
|
|
162
212
|
payment_collection_method: PaymentCollectionMethod$inboundSchema.optional(),
|
|
163
|
-
raw: z.
|
|
213
|
+
raw: z.lazy(() => AccountingInvoiceRaw$inboundSchema).optional(),
|
|
164
214
|
refund_amount: z.number().optional(),
|
|
165
215
|
refund_reason: z.string().optional(),
|
|
166
216
|
refunded_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
@@ -211,7 +261,7 @@ export type AccountingInvoice$Outbound = {
|
|
|
211
261
|
paid_amount?: number | undefined;
|
|
212
262
|
paid_at?: string | undefined;
|
|
213
263
|
payment_collection_method?: string | undefined;
|
|
214
|
-
raw?:
|
|
264
|
+
raw?: AccountingInvoiceRaw$Outbound | undefined;
|
|
215
265
|
refund_amount?: number | undefined;
|
|
216
266
|
refund_reason?: string | undefined;
|
|
217
267
|
refunded_at?: string | undefined;
|
|
@@ -244,7 +294,7 @@ export const AccountingInvoice$outboundSchema: z.ZodType<
|
|
|
244
294
|
paidAmount: z.number().optional(),
|
|
245
295
|
paidAt: z.date().transform(v => v.toISOString()).optional(),
|
|
246
296
|
paymentCollectionMethod: PaymentCollectionMethod$outboundSchema.optional(),
|
|
247
|
-
raw: z.
|
|
297
|
+
raw: z.lazy(() => AccountingInvoiceRaw$outboundSchema).optional(),
|
|
248
298
|
refundAmount: z.number().optional(),
|
|
249
299
|
refundReason: z.string().optional(),
|
|
250
300
|
refundedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
AccountingJournalLineitem$outboundSchema,
|
|
15
15
|
} from "./accountingjournallineitem.js";
|
|
16
16
|
|
|
17
|
+
export type AccountingJournalRaw = {};
|
|
18
|
+
|
|
17
19
|
export type AccountingJournal = {
|
|
18
20
|
createdAt?: Date | undefined;
|
|
19
21
|
currency?: string | undefined;
|
|
@@ -23,13 +25,61 @@ export type AccountingJournal = {
|
|
|
23
25
|
* new field name
|
|
24
26
|
*/
|
|
25
27
|
lineitems?: Array<AccountingJournalLineitem> | undefined;
|
|
26
|
-
raw?:
|
|
28
|
+
raw?: AccountingJournalRaw | undefined;
|
|
27
29
|
reference?: string | undefined;
|
|
28
30
|
taxAmount?: number | undefined;
|
|
29
31
|
taxrateId?: string | undefined;
|
|
30
32
|
updatedAt?: Date | undefined;
|
|
31
33
|
};
|
|
32
34
|
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const AccountingJournalRaw$inboundSchema: z.ZodType<
|
|
37
|
+
AccountingJournalRaw,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.object({});
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type AccountingJournalRaw$Outbound = {};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const AccountingJournalRaw$outboundSchema: z.ZodType<
|
|
47
|
+
AccountingJournalRaw$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
AccountingJournalRaw
|
|
50
|
+
> = z.object({});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace AccountingJournalRaw$ {
|
|
57
|
+
/** @deprecated use `AccountingJournalRaw$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = AccountingJournalRaw$inboundSchema;
|
|
59
|
+
/** @deprecated use `AccountingJournalRaw$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = AccountingJournalRaw$outboundSchema;
|
|
61
|
+
/** @deprecated use `AccountingJournalRaw$Outbound` instead. */
|
|
62
|
+
export type Outbound = AccountingJournalRaw$Outbound;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function accountingJournalRawToJSON(
|
|
66
|
+
accountingJournalRaw: AccountingJournalRaw,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
AccountingJournalRaw$outboundSchema.parse(accountingJournalRaw),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function accountingJournalRawFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<AccountingJournalRaw, SDKValidationError> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) => AccountingJournalRaw$inboundSchema.parse(JSON.parse(x)),
|
|
79
|
+
`Failed to parse 'AccountingJournalRaw' from JSON`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
33
83
|
/** @internal */
|
|
34
84
|
export const AccountingJournal$inboundSchema: z.ZodType<
|
|
35
85
|
AccountingJournal,
|
|
@@ -42,7 +92,7 @@ export const AccountingJournal$inboundSchema: z.ZodType<
|
|
|
42
92
|
description: z.string().optional(),
|
|
43
93
|
id: z.string().optional(),
|
|
44
94
|
lineitems: z.array(AccountingJournalLineitem$inboundSchema).optional(),
|
|
45
|
-
raw: z.
|
|
95
|
+
raw: z.lazy(() => AccountingJournalRaw$inboundSchema).optional(),
|
|
46
96
|
reference: z.string().optional(),
|
|
47
97
|
tax_amount: z.number().optional(),
|
|
48
98
|
taxrate_id: z.string().optional(),
|
|
@@ -64,7 +114,7 @@ export type AccountingJournal$Outbound = {
|
|
|
64
114
|
description?: string | undefined;
|
|
65
115
|
id?: string | undefined;
|
|
66
116
|
lineitems?: Array<AccountingJournalLineitem$Outbound> | undefined;
|
|
67
|
-
raw?:
|
|
117
|
+
raw?: AccountingJournalRaw$Outbound | undefined;
|
|
68
118
|
reference?: string | undefined;
|
|
69
119
|
tax_amount?: number | undefined;
|
|
70
120
|
taxrate_id?: string | undefined;
|
|
@@ -82,7 +132,7 @@ export const AccountingJournal$outboundSchema: z.ZodType<
|
|
|
82
132
|
description: z.string().optional(),
|
|
83
133
|
id: z.string().optional(),
|
|
84
134
|
lineitems: z.array(AccountingJournalLineitem$outboundSchema).optional(),
|
|
85
|
-
raw: z.
|
|
135
|
+
raw: z.lazy(() => AccountingJournalRaw$outboundSchema).optional(),
|
|
86
136
|
reference: z.string().optional(),
|
|
87
137
|
taxAmount: z.number().optional(),
|
|
88
138
|
taxrateId: z.string().optional(),
|
|
@@ -27,6 +27,8 @@ import {
|
|
|
27
27
|
PropertyAccountingOrderShippingAddress$outboundSchema,
|
|
28
28
|
} from "./propertyaccountingordershippingaddress.js";
|
|
29
29
|
|
|
30
|
+
export type AccountingOrderRaw = {};
|
|
31
|
+
|
|
30
32
|
export const AccountingOrderStatus = {
|
|
31
33
|
Draft: "DRAFT",
|
|
32
34
|
Voided: "VOIDED",
|
|
@@ -52,7 +54,7 @@ export type AccountingOrder = {
|
|
|
52
54
|
currency?: string | undefined;
|
|
53
55
|
id?: string | undefined;
|
|
54
56
|
lineitems?: Array<AccountingLineitem> | undefined;
|
|
55
|
-
raw?:
|
|
57
|
+
raw?: AccountingOrderRaw | undefined;
|
|
56
58
|
shippingAddress?: PropertyAccountingOrderShippingAddress | undefined;
|
|
57
59
|
status?: AccountingOrderStatus | undefined;
|
|
58
60
|
totalAmount?: number | undefined;
|
|
@@ -60,6 +62,54 @@ export type AccountingOrder = {
|
|
|
60
62
|
updatedAt?: Date | undefined;
|
|
61
63
|
};
|
|
62
64
|
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const AccountingOrderRaw$inboundSchema: z.ZodType<
|
|
67
|
+
AccountingOrderRaw,
|
|
68
|
+
z.ZodTypeDef,
|
|
69
|
+
unknown
|
|
70
|
+
> = z.object({});
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export type AccountingOrderRaw$Outbound = {};
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const AccountingOrderRaw$outboundSchema: z.ZodType<
|
|
77
|
+
AccountingOrderRaw$Outbound,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
AccountingOrderRaw
|
|
80
|
+
> = z.object({});
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
85
|
+
*/
|
|
86
|
+
export namespace AccountingOrderRaw$ {
|
|
87
|
+
/** @deprecated use `AccountingOrderRaw$inboundSchema` instead. */
|
|
88
|
+
export const inboundSchema = AccountingOrderRaw$inboundSchema;
|
|
89
|
+
/** @deprecated use `AccountingOrderRaw$outboundSchema` instead. */
|
|
90
|
+
export const outboundSchema = AccountingOrderRaw$outboundSchema;
|
|
91
|
+
/** @deprecated use `AccountingOrderRaw$Outbound` instead. */
|
|
92
|
+
export type Outbound = AccountingOrderRaw$Outbound;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function accountingOrderRawToJSON(
|
|
96
|
+
accountingOrderRaw: AccountingOrderRaw,
|
|
97
|
+
): string {
|
|
98
|
+
return JSON.stringify(
|
|
99
|
+
AccountingOrderRaw$outboundSchema.parse(accountingOrderRaw),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function accountingOrderRawFromJSON(
|
|
104
|
+
jsonString: string,
|
|
105
|
+
): SafeParseResult<AccountingOrderRaw, SDKValidationError> {
|
|
106
|
+
return safeParse(
|
|
107
|
+
jsonString,
|
|
108
|
+
(x) => AccountingOrderRaw$inboundSchema.parse(JSON.parse(x)),
|
|
109
|
+
`Failed to parse 'AccountingOrderRaw' from JSON`,
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
63
113
|
/** @internal */
|
|
64
114
|
export const AccountingOrderStatus$inboundSchema: z.ZodNativeEnum<
|
|
65
115
|
typeof AccountingOrderStatus
|
|
@@ -117,7 +167,7 @@ export const AccountingOrder$inboundSchema: z.ZodType<
|
|
|
117
167
|
currency: z.string().optional(),
|
|
118
168
|
id: z.string().optional(),
|
|
119
169
|
lineitems: z.array(AccountingLineitem$inboundSchema).optional(),
|
|
120
|
-
raw: z.
|
|
170
|
+
raw: z.lazy(() => AccountingOrderRaw$inboundSchema).optional(),
|
|
121
171
|
shipping_address: PropertyAccountingOrderShippingAddress$inboundSchema
|
|
122
172
|
.optional(),
|
|
123
173
|
status: AccountingOrderStatus$inboundSchema.optional(),
|
|
@@ -146,7 +196,7 @@ export type AccountingOrder$Outbound = {
|
|
|
146
196
|
currency?: string | undefined;
|
|
147
197
|
id?: string | undefined;
|
|
148
198
|
lineitems?: Array<AccountingLineitem$Outbound> | undefined;
|
|
149
|
-
raw?:
|
|
199
|
+
raw?: AccountingOrderRaw$Outbound | undefined;
|
|
150
200
|
shipping_address?:
|
|
151
201
|
| PropertyAccountingOrderShippingAddress$Outbound
|
|
152
202
|
| undefined;
|
|
@@ -170,7 +220,7 @@ export const AccountingOrder$outboundSchema: z.ZodType<
|
|
|
170
220
|
currency: z.string().optional(),
|
|
171
221
|
id: z.string().optional(),
|
|
172
222
|
lineitems: z.array(AccountingLineitem$outboundSchema).optional(),
|
|
173
|
-
raw: z.
|
|
223
|
+
raw: z.lazy(() => AccountingOrderRaw$outboundSchema).optional(),
|
|
174
224
|
shippingAddress: PropertyAccountingOrderShippingAddress$outboundSchema
|
|
175
225
|
.optional(),
|
|
176
226
|
status: AccountingOrderStatus$outboundSchema.optional(),
|
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
PropertyAccountingOrganizationAddress$outboundSchema,
|
|
15
15
|
} from "./propertyaccountingorganizationaddress.js";
|
|
16
16
|
|
|
17
|
+
export type AccountingOrganizationRaw = {};
|
|
18
|
+
|
|
17
19
|
export type AccountingOrganization = {
|
|
18
20
|
address?: PropertyAccountingOrganizationAddress | undefined;
|
|
19
21
|
createdAt?: Date | undefined;
|
|
@@ -23,13 +25,61 @@ export type AccountingOrganization = {
|
|
|
23
25
|
legalName?: string | undefined;
|
|
24
26
|
name: string;
|
|
25
27
|
organizationCode?: string | undefined;
|
|
26
|
-
raw?:
|
|
28
|
+
raw?: AccountingOrganizationRaw | undefined;
|
|
27
29
|
taxNumber?: string | undefined;
|
|
28
30
|
timezone?: string | undefined;
|
|
29
31
|
updatedAt?: Date | undefined;
|
|
30
32
|
website?: string | undefined;
|
|
31
33
|
};
|
|
32
34
|
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const AccountingOrganizationRaw$inboundSchema: z.ZodType<
|
|
37
|
+
AccountingOrganizationRaw,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.object({});
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export type AccountingOrganizationRaw$Outbound = {};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const AccountingOrganizationRaw$outboundSchema: z.ZodType<
|
|
47
|
+
AccountingOrganizationRaw$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
AccountingOrganizationRaw
|
|
50
|
+
> = z.object({});
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export namespace AccountingOrganizationRaw$ {
|
|
57
|
+
/** @deprecated use `AccountingOrganizationRaw$inboundSchema` instead. */
|
|
58
|
+
export const inboundSchema = AccountingOrganizationRaw$inboundSchema;
|
|
59
|
+
/** @deprecated use `AccountingOrganizationRaw$outboundSchema` instead. */
|
|
60
|
+
export const outboundSchema = AccountingOrganizationRaw$outboundSchema;
|
|
61
|
+
/** @deprecated use `AccountingOrganizationRaw$Outbound` instead. */
|
|
62
|
+
export type Outbound = AccountingOrganizationRaw$Outbound;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function accountingOrganizationRawToJSON(
|
|
66
|
+
accountingOrganizationRaw: AccountingOrganizationRaw,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
AccountingOrganizationRaw$outboundSchema.parse(accountingOrganizationRaw),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function accountingOrganizationRawFromJSON(
|
|
74
|
+
jsonString: string,
|
|
75
|
+
): SafeParseResult<AccountingOrganizationRaw, SDKValidationError> {
|
|
76
|
+
return safeParse(
|
|
77
|
+
jsonString,
|
|
78
|
+
(x) => AccountingOrganizationRaw$inboundSchema.parse(JSON.parse(x)),
|
|
79
|
+
`Failed to parse 'AccountingOrganizationRaw' from JSON`,
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
33
83
|
/** @internal */
|
|
34
84
|
export const AccountingOrganization$inboundSchema: z.ZodType<
|
|
35
85
|
AccountingOrganization,
|
|
@@ -45,7 +95,7 @@ export const AccountingOrganization$inboundSchema: z.ZodType<
|
|
|
45
95
|
legal_name: z.string().optional(),
|
|
46
96
|
name: z.string(),
|
|
47
97
|
organization_code: z.string().optional(),
|
|
48
|
-
raw: z.
|
|
98
|
+
raw: z.lazy(() => AccountingOrganizationRaw$inboundSchema).optional(),
|
|
49
99
|
tax_number: z.string().optional(),
|
|
50
100
|
timezone: z.string().optional(),
|
|
51
101
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
@@ -72,7 +122,7 @@ export type AccountingOrganization$Outbound = {
|
|
|
72
122
|
legal_name?: string | undefined;
|
|
73
123
|
name: string;
|
|
74
124
|
organization_code?: string | undefined;
|
|
75
|
-
raw?:
|
|
125
|
+
raw?: AccountingOrganizationRaw$Outbound | undefined;
|
|
76
126
|
tax_number?: string | undefined;
|
|
77
127
|
timezone?: string | undefined;
|
|
78
128
|
updated_at?: string | undefined;
|
|
@@ -93,7 +143,7 @@ export const AccountingOrganization$outboundSchema: z.ZodType<
|
|
|
93
143
|
legalName: z.string().optional(),
|
|
94
144
|
name: z.string(),
|
|
95
145
|
organizationCode: z.string().optional(),
|
|
96
|
-
raw: z.
|
|
146
|
+
raw: z.lazy(() => AccountingOrganizationRaw$outboundSchema).optional(),
|
|
97
147
|
taxNumber: z.string().optional(),
|
|
98
148
|
timezone: z.string().optional(),
|
|
99
149
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
@@ -8,6 +8,8 @@ import { safeParse } from "../../../lib/schemas.js";
|
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
|
+
export type AccountingTaxrateRaw = {};
|
|
12
|
+
|
|
11
13
|
export type AccountingTaxrate = {
|
|
12
14
|
createdAt?: Date | undefined;
|
|
13
15
|
description?: string | undefined;
|
|
@@ -15,10 +17,58 @@ export type AccountingTaxrate = {
|
|
|
15
17
|
isActive?: boolean | undefined;
|
|
16
18
|
name?: string | undefined;
|
|
17
19
|
rate?: number | undefined;
|
|
18
|
-
raw?:
|
|
20
|
+
raw?: AccountingTaxrateRaw | undefined;
|
|
19
21
|
updatedAt?: Date | undefined;
|
|
20
22
|
};
|
|
21
23
|
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const AccountingTaxrateRaw$inboundSchema: z.ZodType<
|
|
26
|
+
AccountingTaxrateRaw,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({});
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type AccountingTaxrateRaw$Outbound = {};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const AccountingTaxrateRaw$outboundSchema: z.ZodType<
|
|
36
|
+
AccountingTaxrateRaw$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
AccountingTaxrateRaw
|
|
39
|
+
> = z.object({});
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
+
*/
|
|
45
|
+
export namespace AccountingTaxrateRaw$ {
|
|
46
|
+
/** @deprecated use `AccountingTaxrateRaw$inboundSchema` instead. */
|
|
47
|
+
export const inboundSchema = AccountingTaxrateRaw$inboundSchema;
|
|
48
|
+
/** @deprecated use `AccountingTaxrateRaw$outboundSchema` instead. */
|
|
49
|
+
export const outboundSchema = AccountingTaxrateRaw$outboundSchema;
|
|
50
|
+
/** @deprecated use `AccountingTaxrateRaw$Outbound` instead. */
|
|
51
|
+
export type Outbound = AccountingTaxrateRaw$Outbound;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function accountingTaxrateRawToJSON(
|
|
55
|
+
accountingTaxrateRaw: AccountingTaxrateRaw,
|
|
56
|
+
): string {
|
|
57
|
+
return JSON.stringify(
|
|
58
|
+
AccountingTaxrateRaw$outboundSchema.parse(accountingTaxrateRaw),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function accountingTaxrateRawFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<AccountingTaxrateRaw, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => AccountingTaxrateRaw$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'AccountingTaxrateRaw' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
22
72
|
/** @internal */
|
|
23
73
|
export const AccountingTaxrate$inboundSchema: z.ZodType<
|
|
24
74
|
AccountingTaxrate,
|
|
@@ -32,7 +82,7 @@ export const AccountingTaxrate$inboundSchema: z.ZodType<
|
|
|
32
82
|
is_active: z.boolean().optional(),
|
|
33
83
|
name: z.string().optional(),
|
|
34
84
|
rate: z.number().optional(),
|
|
35
|
-
raw: z.
|
|
85
|
+
raw: z.lazy(() => AccountingTaxrateRaw$inboundSchema).optional(),
|
|
36
86
|
updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
37
87
|
.optional(),
|
|
38
88
|
}).transform((v) => {
|
|
@@ -51,7 +101,7 @@ export type AccountingTaxrate$Outbound = {
|
|
|
51
101
|
is_active?: boolean | undefined;
|
|
52
102
|
name?: string | undefined;
|
|
53
103
|
rate?: number | undefined;
|
|
54
|
-
raw?:
|
|
104
|
+
raw?: AccountingTaxrateRaw$Outbound | undefined;
|
|
55
105
|
updated_at?: string | undefined;
|
|
56
106
|
};
|
|
57
107
|
|
|
@@ -67,7 +117,7 @@ export const AccountingTaxrate$outboundSchema: z.ZodType<
|
|
|
67
117
|
isActive: z.boolean().optional(),
|
|
68
118
|
name: z.string().optional(),
|
|
69
119
|
rate: z.number().optional(),
|
|
70
|
-
raw: z.
|
|
120
|
+
raw: z.lazy(() => AccountingTaxrateRaw$outboundSchema).optional(),
|
|
71
121
|
updatedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
72
122
|
}).transform((v) => {
|
|
73
123
|
return remap$(v, {
|
|
@@ -20,6 +20,8 @@ import {
|
|
|
20
20
|
AccountingTransactionLineItem$outboundSchema,
|
|
21
21
|
} from "./accountingtransactionlineitem.js";
|
|
22
22
|
|
|
23
|
+
export type AccountingTransactionRaw = {};
|
|
24
|
+
|
|
23
25
|
export type AccountingTransaction = {
|
|
24
26
|
accountId?: string | undefined;
|
|
25
27
|
contactId?: string | undefined;
|
|
@@ -32,7 +34,7 @@ export type AccountingTransaction = {
|
|
|
32
34
|
memo?: string | undefined;
|
|
33
35
|
paymentMethod?: string | undefined;
|
|
34
36
|
paymentTerms?: string | undefined;
|
|
35
|
-
raw?:
|
|
37
|
+
raw?: AccountingTransactionRaw | undefined;
|
|
36
38
|
reference?: string | undefined;
|
|
37
39
|
splitAccountId?: string | undefined;
|
|
38
40
|
subTotalAmount?: number | undefined;
|
|
@@ -42,6 +44,54 @@ export type AccountingTransaction = {
|
|
|
42
44
|
updatedAt?: Date | undefined;
|
|
43
45
|
};
|
|
44
46
|
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const AccountingTransactionRaw$inboundSchema: z.ZodType<
|
|
49
|
+
AccountingTransactionRaw,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
unknown
|
|
52
|
+
> = z.object({});
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type AccountingTransactionRaw$Outbound = {};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const AccountingTransactionRaw$outboundSchema: z.ZodType<
|
|
59
|
+
AccountingTransactionRaw$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
AccountingTransactionRaw
|
|
62
|
+
> = z.object({});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace AccountingTransactionRaw$ {
|
|
69
|
+
/** @deprecated use `AccountingTransactionRaw$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = AccountingTransactionRaw$inboundSchema;
|
|
71
|
+
/** @deprecated use `AccountingTransactionRaw$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = AccountingTransactionRaw$outboundSchema;
|
|
73
|
+
/** @deprecated use `AccountingTransactionRaw$Outbound` instead. */
|
|
74
|
+
export type Outbound = AccountingTransactionRaw$Outbound;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function accountingTransactionRawToJSON(
|
|
78
|
+
accountingTransactionRaw: AccountingTransactionRaw,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
AccountingTransactionRaw$outboundSchema.parse(accountingTransactionRaw),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function accountingTransactionRawFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<AccountingTransactionRaw, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) => AccountingTransactionRaw$inboundSchema.parse(JSON.parse(x)),
|
|
91
|
+
`Failed to parse 'AccountingTransactionRaw' from JSON`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
45
95
|
/** @internal */
|
|
46
96
|
export const AccountingTransaction$inboundSchema: z.ZodType<
|
|
47
97
|
AccountingTransaction,
|
|
@@ -60,7 +110,7 @@ export const AccountingTransaction$inboundSchema: z.ZodType<
|
|
|
60
110
|
memo: z.string().optional(),
|
|
61
111
|
payment_method: z.string().optional(),
|
|
62
112
|
payment_terms: z.string().optional(),
|
|
63
|
-
raw: z.
|
|
113
|
+
raw: z.lazy(() => AccountingTransactionRaw$inboundSchema).optional(),
|
|
64
114
|
reference: z.string().optional(),
|
|
65
115
|
split_account_id: z.string().optional(),
|
|
66
116
|
sub_total_amount: z.number().optional(),
|
|
@@ -98,7 +148,7 @@ export type AccountingTransaction$Outbound = {
|
|
|
98
148
|
memo?: string | undefined;
|
|
99
149
|
payment_method?: string | undefined;
|
|
100
150
|
payment_terms?: string | undefined;
|
|
101
|
-
raw?:
|
|
151
|
+
raw?: AccountingTransactionRaw$Outbound | undefined;
|
|
102
152
|
reference?: string | undefined;
|
|
103
153
|
split_account_id?: string | undefined;
|
|
104
154
|
sub_total_amount?: number | undefined;
|
|
@@ -125,7 +175,7 @@ export const AccountingTransaction$outboundSchema: z.ZodType<
|
|
|
125
175
|
memo: z.string().optional(),
|
|
126
176
|
paymentMethod: z.string().optional(),
|
|
127
177
|
paymentTerms: z.string().optional(),
|
|
128
|
-
raw: z.
|
|
178
|
+
raw: z.lazy(() => AccountingTransactionRaw$outboundSchema).optional(),
|
|
129
179
|
reference: z.string().optional(),
|
|
130
180
|
splitAccountId: z.string().optional(),
|
|
131
181
|
subTotalAmount: z.number().optional(),
|
|
@@ -3,28 +3,55 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
10
|
|
|
10
|
-
export type AccountingTransactionContact = {
|
|
11
|
+
export type AccountingTransactionContact = {
|
|
12
|
+
id: string;
|
|
13
|
+
isCustomer?: boolean | undefined;
|
|
14
|
+
isSupplier?: boolean | undefined;
|
|
15
|
+
};
|
|
11
16
|
|
|
12
17
|
/** @internal */
|
|
13
18
|
export const AccountingTransactionContact$inboundSchema: z.ZodType<
|
|
14
19
|
AccountingTransactionContact,
|
|
15
20
|
z.ZodTypeDef,
|
|
16
21
|
unknown
|
|
17
|
-
> = z.object({
|
|
22
|
+
> = z.object({
|
|
23
|
+
id: z.string(),
|
|
24
|
+
is_customer: z.boolean().optional(),
|
|
25
|
+
is_supplier: z.boolean().optional(),
|
|
26
|
+
}).transform((v) => {
|
|
27
|
+
return remap$(v, {
|
|
28
|
+
"is_customer": "isCustomer",
|
|
29
|
+
"is_supplier": "isSupplier",
|
|
30
|
+
});
|
|
31
|
+
});
|
|
18
32
|
|
|
19
33
|
/** @internal */
|
|
20
|
-
export type AccountingTransactionContact$Outbound = {
|
|
34
|
+
export type AccountingTransactionContact$Outbound = {
|
|
35
|
+
id: string;
|
|
36
|
+
is_customer?: boolean | undefined;
|
|
37
|
+
is_supplier?: boolean | undefined;
|
|
38
|
+
};
|
|
21
39
|
|
|
22
40
|
/** @internal */
|
|
23
41
|
export const AccountingTransactionContact$outboundSchema: z.ZodType<
|
|
24
42
|
AccountingTransactionContact$Outbound,
|
|
25
43
|
z.ZodTypeDef,
|
|
26
44
|
AccountingTransactionContact
|
|
27
|
-
> = z.object({
|
|
45
|
+
> = z.object({
|
|
46
|
+
id: z.string(),
|
|
47
|
+
isCustomer: z.boolean().optional(),
|
|
48
|
+
isSupplier: z.boolean().optional(),
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
isCustomer: "is_customer",
|
|
52
|
+
isSupplier: "is_supplier",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
28
55
|
|
|
29
56
|
/**
|
|
30
57
|
* @internal
|