@maesn/typescript-sdk 0.6.0 → 0.6.1
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 +2 -2
- package/esm/funcs/accounting-v2-create-booking-proposal-v2.js +1 -1
- package/esm/funcs/accounting-v2-create-booking-proposal-v2.js.map +1 -1
- package/esm/funcs/accounting-v2-create-contact-v2.js +1 -1
- package/esm/funcs/accounting-v2-put-contact-v2.js +1 -1
- package/esm/funcs/accounting-v2-put-contact-v2.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/models/account-response-dto.d.ts +9 -9
- package/esm/models/account-response-dto.d.ts.map +1 -1
- package/esm/models/account-response-dto.js +4 -6
- package/esm/models/account-response-dto.js.map +1 -1
- package/esm/models/address-offer.d.ts +7 -7
- package/esm/models/address-offer.d.ts.map +1 -1
- package/esm/models/address-offer.js +4 -5
- package/esm/models/address-offer.js.map +1 -1
- package/esm/models/address.d.ts +7 -7
- package/esm/models/address.d.ts.map +1 -1
- package/esm/models/address.js +5 -5
- package/esm/models/address.js.map +1 -1
- package/esm/models/async-task-response-dto.d.ts +8 -4
- package/esm/models/async-task-response-dto.d.ts.map +1 -1
- package/esm/models/async-task-response-dto.js +7 -3
- package/esm/models/async-task-response-dto.js.map +1 -1
- package/esm/models/bank-account-response-dto.d.ts +7 -7
- package/esm/models/bank-account-response-dto.d.ts.map +1 -1
- package/esm/models/bank-account-response-dto.js +3 -4
- package/esm/models/bank-account-response-dto.js.map +1 -1
- package/esm/models/bill-response-dto.d.ts +9 -9
- package/esm/models/bill-response-dto.d.ts.map +1 -1
- package/esm/models/bill-response-dto.js +4 -5
- package/esm/models/bill-response-dto.js.map +1 -1
- package/esm/models/booking-proposal-address-response-dto-v2.d.ts +10 -0
- package/esm/models/booking-proposal-address-response-dto-v2.d.ts.map +1 -0
- package/esm/models/booking-proposal-address-response-dto-v2.js +14 -0
- package/esm/models/booking-proposal-address-response-dto-v2.js.map +1 -0
- package/esm/models/booking-proposal-line-item-response-dto-v2.d.ts +42 -0
- package/esm/models/booking-proposal-line-item-response-dto-v2.d.ts.map +1 -0
- package/esm/models/booking-proposal-line-item-response-dto-v2.js +45 -0
- package/esm/models/booking-proposal-line-item-response-dto-v2.js.map +1 -0
- package/esm/models/booking-proposal-response-dto-v2.d.ts +83 -0
- package/esm/models/booking-proposal-response-dto-v2.d.ts.map +1 -0
- package/esm/models/booking-proposal-response-dto-v2.js +86 -0
- package/esm/models/booking-proposal-response-dto-v2.js.map +1 -0
- package/esm/models/booking-proposal-response-dto.d.ts +7 -7
- package/esm/models/booking-proposal-response-dto.d.ts.map +1 -1
- package/esm/models/booking-proposal-response-dto.js +4 -5
- package/esm/models/booking-proposal-response-dto.js.map +1 -1
- package/esm/models/contact-address-v2.d.ts +5 -5
- package/esm/models/contact-address-v2.d.ts.map +1 -1
- package/esm/models/contact-address-v2.js +2 -3
- package/esm/models/contact-address-v2.js.map +1 -1
- package/esm/models/contact-address.d.ts +5 -5
- package/esm/models/contact-address.d.ts.map +1 -1
- package/esm/models/contact-address.js +2 -3
- package/esm/models/contact-address.js.map +1 -1
- package/esm/models/contact-response-dto-v2.d.ts +3 -3
- package/esm/models/contact-response-dto-v2.d.ts.map +1 -1
- package/esm/models/contact-response-dto-v2.js +1 -2
- package/esm/models/contact-response-dto-v2.js.map +1 -1
- package/esm/models/contact-response-dto.d.ts +5 -5
- package/esm/models/contact-response-dto.d.ts.map +1 -1
- package/esm/models/contact-response-dto.js +2 -3
- package/esm/models/contact-response-dto.js.map +1 -1
- package/esm/models/create-vendor-credit-request-dto.d.ts +2 -0
- package/esm/models/create-vendor-credit-request-dto.d.ts.map +1 -1
- package/esm/models/create-vendor-credit-request-dto.js +1 -0
- package/esm/models/create-vendor-credit-request-dto.js.map +1 -1
- package/esm/models/credit-note-response-dto.d.ts +5 -5
- package/esm/models/credit-note-response-dto.d.ts.map +1 -1
- package/esm/models/credit-note-response-dto.js +2 -3
- package/esm/models/credit-note-response-dto.js.map +1 -1
- package/esm/models/dimension-response-common-dto-v2.d.ts +13 -0
- package/esm/models/dimension-response-common-dto-v2.d.ts.map +1 -0
- package/esm/models/dimension-response-common-dto-v2.js +17 -0
- package/esm/models/dimension-response-common-dto-v2.js.map +1 -0
- package/esm/models/email-address-v2.d.ts +4 -4
- package/esm/models/email-address-v2.d.ts.map +1 -1
- package/esm/models/email-address-v2.js +2 -3
- package/esm/models/email-address-v2.js.map +1 -1
- package/esm/models/email-address.d.ts +3 -3
- package/esm/models/email-address.d.ts.map +1 -1
- package/esm/models/email-address.js +1 -2
- package/esm/models/email-address.js.map +1 -1
- package/esm/models/expense-line-item-response.d.ts +3 -3
- package/esm/models/expense-line-item-response.d.ts.map +1 -1
- package/esm/models/expense-line-item-response.js +1 -2
- package/esm/models/expense-line-item-response.js.map +1 -1
- package/esm/models/expense-response-dto.d.ts +7 -7
- package/esm/models/expense-response-dto.d.ts.map +1 -1
- package/esm/models/expense-response-dto.js +3 -4
- package/esm/models/expense-response-dto.js.map +1 -1
- package/esm/models/fiscal-year-response-dto.d.ts +5 -5
- package/esm/models/fiscal-year-response-dto.d.ts.map +1 -1
- package/esm/models/fiscal-year-response-dto.js +2 -3
- package/esm/models/fiscal-year-response-dto.js.map +1 -1
- package/esm/models/index.d.ts +4 -0
- package/esm/models/index.d.ts.map +1 -1
- package/esm/models/index.js +4 -0
- package/esm/models/index.js.map +1 -1
- package/esm/models/invoice-response-dto.d.ts +11 -11
- package/esm/models/invoice-response-dto.d.ts.map +1 -1
- package/esm/models/invoice-response-dto.js +5 -6
- package/esm/models/invoice-response-dto.js.map +1 -1
- package/esm/models/item-response-dto.d.ts +5 -5
- package/esm/models/item-response-dto.d.ts.map +1 -1
- package/esm/models/item-response-dto.js +2 -3
- package/esm/models/item-response-dto.js.map +1 -1
- package/esm/models/journal-entry-response-dto.d.ts +5 -5
- package/esm/models/journal-entry-response-dto.d.ts.map +1 -1
- package/esm/models/journal-entry-response-dto.js +2 -3
- package/esm/models/journal-entry-response-dto.js.map +1 -1
- package/esm/models/journal-line-item.d.ts +5 -5
- package/esm/models/journal-line-item.d.ts.map +1 -1
- package/esm/models/journal-line-item.js +2 -3
- package/esm/models/journal-line-item.js.map +1 -1
- package/esm/models/line-item-response.d.ts +3 -3
- package/esm/models/line-item-response.d.ts.map +1 -1
- package/esm/models/line-item-response.js +1 -2
- package/esm/models/line-item-response.js.map +1 -1
- package/esm/models/monthly-value.d.ts +3 -3
- package/esm/models/monthly-value.d.ts.map +1 -1
- package/esm/models/monthly-value.js +1 -2
- package/esm/models/monthly-value.js.map +1 -1
- package/esm/models/offer-line-item-response-dto.d.ts +3 -3
- package/esm/models/offer-line-item-response-dto.d.ts.map +1 -1
- package/esm/models/offer-line-item-response-dto.js +1 -2
- package/esm/models/offer-line-item-response-dto.js.map +1 -1
- package/esm/models/offer-response-dto.d.ts +3 -3
- package/esm/models/offer-response-dto.d.ts.map +1 -1
- package/esm/models/offer-response-dto.js +1 -2
- package/esm/models/offer-response-dto.js.map +1 -1
- package/esm/models/open-item-entry-response-dto.d.ts +3 -3
- package/esm/models/open-item-entry-response-dto.d.ts.map +1 -1
- package/esm/models/open-item-entry-response-dto.js +1 -2
- package/esm/models/open-item-entry-response-dto.js.map +1 -1
- package/esm/models/open-item-response-dto.d.ts +5 -5
- package/esm/models/open-item-response-dto.d.ts.map +1 -1
- package/esm/models/open-item-response-dto.js +2 -4
- package/esm/models/open-item-response-dto.js.map +1 -1
- package/esm/models/operations/create-booking-proposal-v2.d.ts +68 -18
- package/esm/models/operations/create-booking-proposal-v2.d.ts.map +1 -1
- package/esm/models/operations/create-booking-proposal-v2.js +73 -18
- package/esm/models/operations/create-booking-proposal-v2.js.map +1 -1
- package/esm/models/operations/get-booking-proposals.d.ts +4 -4
- package/esm/models/operations/get-booking-proposals.d.ts.map +1 -1
- package/esm/models/operations/get-booking-proposals.js +3 -4
- package/esm/models/operations/get-booking-proposals.js.map +1 -1
- package/esm/models/operations/put-contact-v2.d.ts +57 -17
- package/esm/models/operations/put-contact-v2.d.ts.map +1 -1
- package/esm/models/operations/put-contact-v2.js +64 -17
- package/esm/models/operations/put-contact-v2.js.map +1 -1
- package/esm/models/payment-response-dto.d.ts +3 -3
- package/esm/models/payment-response-dto.d.ts.map +1 -1
- package/esm/models/payment-response-dto.js +1 -2
- package/esm/models/payment-response-dto.js.map +1 -1
- package/esm/models/payment-term-response-dto.d.ts +5 -5
- package/esm/models/payment-term-response-dto.d.ts.map +1 -1
- package/esm/models/payment-term-response-dto.js +2 -3
- package/esm/models/payment-term-response-dto.js.map +1 -1
- package/esm/models/phone-number-v2.d.ts +4 -4
- package/esm/models/phone-number-v2.d.ts.map +1 -1
- package/esm/models/phone-number-v2.js +2 -3
- package/esm/models/phone-number-v2.js.map +1 -1
- package/esm/models/phone-number.d.ts +3 -3
- package/esm/models/phone-number.d.ts.map +1 -1
- package/esm/models/phone-number.js +1 -2
- package/esm/models/phone-number.js.map +1 -1
- package/esm/models/project-response-dto.d.ts +5 -5
- package/esm/models/project-response-dto.d.ts.map +1 -1
- package/esm/models/project-response-dto.js +2 -3
- package/esm/models/project-response-dto.js.map +1 -1
- package/esm/models/purchase-order-response-dto.d.ts +5 -5
- package/esm/models/purchase-order-response-dto.d.ts.map +1 -1
- package/esm/models/purchase-order-response-dto.js +2 -3
- package/esm/models/purchase-order-response-dto.js.map +1 -1
- package/esm/models/sales-order-response-dto.d.ts +3 -3
- package/esm/models/sales-order-response-dto.d.ts.map +1 -1
- package/esm/models/sales-order-response-dto.js +1 -2
- package/esm/models/sales-order-response-dto.js.map +1 -1
- package/esm/models/tax-rate-response-dto.d.ts +5 -5
- package/esm/models/tax-rate-response-dto.d.ts.map +1 -1
- package/esm/models/tax-rate-response-dto.js +2 -4
- package/esm/models/tax-rate-response-dto.js.map +1 -1
- package/esm/models/transaction-response-dto.d.ts +7 -7
- package/esm/models/transaction-response-dto.d.ts.map +1 -1
- package/esm/models/transaction-response-dto.js +3 -4
- package/esm/models/transaction-response-dto.js.map +1 -1
- package/esm/models/trial-balance-response-dto.d.ts +5 -5
- package/esm/models/trial-balance-response-dto.d.ts.map +1 -1
- package/esm/models/trial-balance-response-dto.js +3 -3
- package/esm/models/trial-balance-response-dto.js.map +1 -1
- package/esm/models/vendor-credit-response-dto.d.ts +10 -9
- package/esm/models/vendor-credit-response-dto.d.ts.map +1 -1
- package/esm/models/vendor-credit-response-dto.js +5 -5
- package/esm/models/vendor-credit-response-dto.js.map +1 -1
- package/esm/types/primitives.d.ts +1 -1
- package/esm/types/primitives.d.ts.map +1 -1
- package/esm/types/primitives.js +2 -3
- package/esm/types/primitives.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/accounting-v2-create-booking-proposal-v2.ts +1 -0
- package/src/funcs/accounting-v2-create-contact-v2.ts +1 -1
- package/src/funcs/accounting-v2-put-contact-v2.ts +1 -0
- package/src/lib/config.ts +4 -3
- package/src/models/account-response-dto.ts +19 -20
- package/src/models/address-offer.ts +17 -20
- package/src/models/address.ts +13 -16
- package/src/models/async-task-response-dto.ts +23 -9
- package/src/models/bank-account-response-dto.ts +13 -17
- package/src/models/bill-response-dto.ts +17 -22
- package/src/models/booking-proposal-address-response-dto-v2.ts +32 -0
- package/src/models/booking-proposal-line-item-response-dto-v2.ts +106 -0
- package/src/models/booking-proposal-response-dto-v2.ts +195 -0
- package/src/models/booking-proposal-response-dto.ts +16 -13
- package/src/models/contact-address-v2.ts +9 -12
- package/src/models/contact-address.ts +9 -12
- package/src/models/contact-response-dto-v2.ts +5 -7
- package/src/models/contact-response-dto.ts +9 -12
- package/src/models/create-vendor-credit-request-dto.ts +3 -0
- package/src/models/credit-note-response-dto.ts +9 -12
- package/src/models/dimension-response-common-dto-v2.ts +37 -0
- package/src/models/email-address-v2.ts +8 -11
- package/src/models/email-address.ts +5 -7
- package/src/models/expense-line-item-response.ts +5 -7
- package/src/models/expense-response-dto.ts +13 -17
- package/src/models/fiscal-year-response-dto.ts +9 -12
- package/src/models/index.ts +4 -0
- package/src/models/invoice-response-dto.ts +21 -27
- package/src/models/item-response-dto.ts +11 -12
- package/src/models/journal-entry-response-dto.ts +9 -10
- package/src/models/journal-line-item.ts +11 -12
- package/src/models/line-item-response.ts +5 -7
- package/src/models/monthly-value.ts +5 -7
- package/src/models/offer-line-item-response-dto.ts +5 -7
- package/src/models/offer-response-dto.ts +5 -7
- package/src/models/open-item-entry-response-dto.ts +5 -5
- package/src/models/open-item-response-dto.ts +11 -10
- package/src/models/operations/create-booking-proposal-v2.ts +212 -41
- package/src/models/operations/get-booking-proposals.ts +9 -6
- package/src/models/operations/put-contact-v2.ts +184 -39
- package/src/models/payment-response-dto.ts +5 -7
- package/src/models/payment-term-response-dto.ts +8 -12
- package/src/models/phone-number-v2.ts +8 -11
- package/src/models/phone-number.ts +5 -7
- package/src/models/project-response-dto.ts +9 -12
- package/src/models/purchase-order-response-dto.ts +9 -12
- package/src/models/sales-order-response-dto.ts +5 -7
- package/src/models/tax-rate-response-dto.ts +7 -10
- package/src/models/transaction-response-dto.ts +13 -17
- package/src/models/trial-balance-response-dto.ts +8 -10
- package/src/models/vendor-credit-response-dto.ts +19 -22
- package/src/types/primitives.ts +2 -4
|
@@ -6,6 +6,7 @@ import * as z from "zod/v4-mini";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import * as types from "../../types/primitives.js";
|
|
9
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
10
11
|
import * as models from "../index.js";
|
|
11
12
|
|
|
@@ -35,32 +36,62 @@ export type PutContactV2Request = {
|
|
|
35
36
|
body: models.CreateContactRequestDtoV2;
|
|
36
37
|
};
|
|
37
38
|
|
|
38
|
-
export type
|
|
39
|
+
export type PutContactV2Pagination2 = {
|
|
39
40
|
total: number;
|
|
40
41
|
perPage: number;
|
|
41
42
|
currentPage: number;
|
|
42
43
|
totalPages: number;
|
|
43
44
|
};
|
|
44
45
|
|
|
45
|
-
export type
|
|
46
|
+
export type PutContactV2Meta2 = {
|
|
46
47
|
warnings?: Array<string> | null | undefined;
|
|
47
|
-
pagination?:
|
|
48
|
+
pagination?: PutContactV2Pagination2 | null | undefined;
|
|
48
49
|
};
|
|
49
50
|
|
|
50
|
-
export type
|
|
51
|
+
export type PutContactV2Errors2 = {};
|
|
51
52
|
|
|
52
|
-
export type
|
|
53
|
+
export type PutContactV2RawData2 = {};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Contact created successfully (upsert)
|
|
57
|
+
*/
|
|
58
|
+
export type PutContactV2ResponseBody2 = {
|
|
59
|
+
meta?: PutContactV2Meta2 | null | undefined;
|
|
60
|
+
data: models.ContactResponseDtoV2;
|
|
61
|
+
errors: PutContactV2Errors2 | null;
|
|
62
|
+
rawData: PutContactV2RawData2 | null;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type PutContactV2Pagination1 = {
|
|
66
|
+
total: number;
|
|
67
|
+
perPage: number;
|
|
68
|
+
currentPage: number;
|
|
69
|
+
totalPages: number;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type PutContactV2Meta1 = {
|
|
73
|
+
warnings?: Array<string> | null | undefined;
|
|
74
|
+
pagination?: PutContactV2Pagination1 | null | undefined;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export type PutContactV2Errors1 = {};
|
|
78
|
+
|
|
79
|
+
export type PutContactV2RawData1 = {};
|
|
53
80
|
|
|
54
81
|
/**
|
|
55
82
|
* Contact updated successfully
|
|
56
83
|
*/
|
|
57
|
-
export type
|
|
58
|
-
meta?:
|
|
84
|
+
export type PutContactV2ResponseBody1 = {
|
|
85
|
+
meta?: PutContactV2Meta1 | null | undefined;
|
|
59
86
|
data: models.ContactResponseDtoV2;
|
|
60
|
-
errors:
|
|
61
|
-
rawData:
|
|
87
|
+
errors: PutContactV2Errors1 | null;
|
|
88
|
+
rawData: PutContactV2RawData1 | null;
|
|
62
89
|
};
|
|
63
90
|
|
|
91
|
+
export type PutContactV2Response =
|
|
92
|
+
| PutContactV2ResponseBody1
|
|
93
|
+
| PutContactV2ResponseBody2;
|
|
94
|
+
|
|
64
95
|
/** @internal */
|
|
65
96
|
export type PutContactV2Request$Outbound = {
|
|
66
97
|
contactId: string;
|
|
@@ -93,8 +124,8 @@ export function putContactV2RequestToJSON(
|
|
|
93
124
|
}
|
|
94
125
|
|
|
95
126
|
/** @internal */
|
|
96
|
-
export const
|
|
97
|
-
|
|
127
|
+
export const PutContactV2Pagination2$inboundSchema: z.ZodMiniType<
|
|
128
|
+
PutContactV2Pagination2,
|
|
98
129
|
unknown
|
|
99
130
|
> = z.object({
|
|
100
131
|
total: types.number(),
|
|
@@ -103,80 +134,194 @@ export const PutContactV2Pagination$inboundSchema: z.ZodMiniType<
|
|
|
103
134
|
totalPages: types.number(),
|
|
104
135
|
});
|
|
105
136
|
|
|
106
|
-
export function
|
|
137
|
+
export function putContactV2Pagination2FromJSON(
|
|
107
138
|
jsonString: string,
|
|
108
|
-
): SafeParseResult<
|
|
139
|
+
): SafeParseResult<PutContactV2Pagination2, SDKValidationError> {
|
|
109
140
|
return safeParse(
|
|
110
141
|
jsonString,
|
|
111
|
-
(x) =>
|
|
112
|
-
`Failed to parse '
|
|
142
|
+
(x) => PutContactV2Pagination2$inboundSchema.parse(JSON.parse(x)),
|
|
143
|
+
`Failed to parse 'PutContactV2Pagination2' from JSON`,
|
|
113
144
|
);
|
|
114
145
|
}
|
|
115
146
|
|
|
116
147
|
/** @internal */
|
|
117
|
-
export const
|
|
118
|
-
|
|
148
|
+
export const PutContactV2Meta2$inboundSchema: z.ZodMiniType<
|
|
149
|
+
PutContactV2Meta2,
|
|
119
150
|
unknown
|
|
120
151
|
> = z.object({
|
|
121
152
|
warnings: z.optional(z.nullable(z.array(types.string()))),
|
|
122
153
|
pagination: z.optional(
|
|
123
|
-
z.nullable(z.lazy(() =>
|
|
154
|
+
z.nullable(z.lazy(() => PutContactV2Pagination2$inboundSchema)),
|
|
124
155
|
),
|
|
125
156
|
});
|
|
126
157
|
|
|
127
|
-
export function
|
|
158
|
+
export function putContactV2Meta2FromJSON(
|
|
128
159
|
jsonString: string,
|
|
129
|
-
): SafeParseResult<
|
|
160
|
+
): SafeParseResult<PutContactV2Meta2, SDKValidationError> {
|
|
130
161
|
return safeParse(
|
|
131
162
|
jsonString,
|
|
132
|
-
(x) =>
|
|
133
|
-
`Failed to parse '
|
|
163
|
+
(x) => PutContactV2Meta2$inboundSchema.parse(JSON.parse(x)),
|
|
164
|
+
`Failed to parse 'PutContactV2Meta2' from JSON`,
|
|
134
165
|
);
|
|
135
166
|
}
|
|
136
167
|
|
|
137
168
|
/** @internal */
|
|
138
|
-
export const
|
|
139
|
-
|
|
169
|
+
export const PutContactV2Errors2$inboundSchema: z.ZodMiniType<
|
|
170
|
+
PutContactV2Errors2,
|
|
140
171
|
unknown
|
|
141
172
|
> = z.object({});
|
|
142
173
|
|
|
143
|
-
export function
|
|
174
|
+
export function putContactV2Errors2FromJSON(
|
|
144
175
|
jsonString: string,
|
|
145
|
-
): SafeParseResult<
|
|
176
|
+
): SafeParseResult<PutContactV2Errors2, SDKValidationError> {
|
|
146
177
|
return safeParse(
|
|
147
178
|
jsonString,
|
|
148
|
-
(x) =>
|
|
149
|
-
`Failed to parse '
|
|
179
|
+
(x) => PutContactV2Errors2$inboundSchema.parse(JSON.parse(x)),
|
|
180
|
+
`Failed to parse 'PutContactV2Errors2' from JSON`,
|
|
150
181
|
);
|
|
151
182
|
}
|
|
152
183
|
|
|
153
184
|
/** @internal */
|
|
154
|
-
export const
|
|
155
|
-
|
|
185
|
+
export const PutContactV2RawData2$inboundSchema: z.ZodMiniType<
|
|
186
|
+
PutContactV2RawData2,
|
|
156
187
|
unknown
|
|
157
188
|
> = z.object({});
|
|
158
189
|
|
|
159
|
-
export function
|
|
190
|
+
export function putContactV2RawData2FromJSON(
|
|
160
191
|
jsonString: string,
|
|
161
|
-
): SafeParseResult<
|
|
192
|
+
): SafeParseResult<PutContactV2RawData2, SDKValidationError> {
|
|
162
193
|
return safeParse(
|
|
163
194
|
jsonString,
|
|
164
|
-
(x) =>
|
|
165
|
-
`Failed to parse '
|
|
195
|
+
(x) => PutContactV2RawData2$inboundSchema.parse(JSON.parse(x)),
|
|
196
|
+
`Failed to parse 'PutContactV2RawData2' from JSON`,
|
|
166
197
|
);
|
|
167
198
|
}
|
|
168
199
|
|
|
169
200
|
/** @internal */
|
|
170
|
-
export const
|
|
171
|
-
|
|
201
|
+
export const PutContactV2ResponseBody2$inboundSchema: z.ZodMiniType<
|
|
202
|
+
PutContactV2ResponseBody2,
|
|
172
203
|
unknown
|
|
173
204
|
> = z.object({
|
|
174
|
-
meta: z.optional(z.nullable(z.lazy(() =>
|
|
205
|
+
meta: z.optional(z.nullable(z.lazy(() => PutContactV2Meta2$inboundSchema))),
|
|
175
206
|
data: models.ContactResponseDtoV2$inboundSchema,
|
|
176
|
-
errors: types.nullable(z.lazy(() =>
|
|
177
|
-
rawData: types.nullable(z.lazy(() =>
|
|
207
|
+
errors: types.nullable(z.lazy(() => PutContactV2Errors2$inboundSchema)),
|
|
208
|
+
rawData: types.nullable(z.lazy(() => PutContactV2RawData2$inboundSchema)),
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
export function putContactV2ResponseBody2FromJSON(
|
|
212
|
+
jsonString: string,
|
|
213
|
+
): SafeParseResult<PutContactV2ResponseBody2, SDKValidationError> {
|
|
214
|
+
return safeParse(
|
|
215
|
+
jsonString,
|
|
216
|
+
(x) => PutContactV2ResponseBody2$inboundSchema.parse(JSON.parse(x)),
|
|
217
|
+
`Failed to parse 'PutContactV2ResponseBody2' from JSON`,
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** @internal */
|
|
222
|
+
export const PutContactV2Pagination1$inboundSchema: z.ZodMiniType<
|
|
223
|
+
PutContactV2Pagination1,
|
|
224
|
+
unknown
|
|
225
|
+
> = z.object({
|
|
226
|
+
total: types.number(),
|
|
227
|
+
perPage: types.number(),
|
|
228
|
+
currentPage: types.number(),
|
|
229
|
+
totalPages: types.number(),
|
|
178
230
|
});
|
|
179
231
|
|
|
232
|
+
export function putContactV2Pagination1FromJSON(
|
|
233
|
+
jsonString: string,
|
|
234
|
+
): SafeParseResult<PutContactV2Pagination1, SDKValidationError> {
|
|
235
|
+
return safeParse(
|
|
236
|
+
jsonString,
|
|
237
|
+
(x) => PutContactV2Pagination1$inboundSchema.parse(JSON.parse(x)),
|
|
238
|
+
`Failed to parse 'PutContactV2Pagination1' from JSON`,
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** @internal */
|
|
243
|
+
export const PutContactV2Meta1$inboundSchema: z.ZodMiniType<
|
|
244
|
+
PutContactV2Meta1,
|
|
245
|
+
unknown
|
|
246
|
+
> = z.object({
|
|
247
|
+
warnings: z.optional(z.nullable(z.array(types.string()))),
|
|
248
|
+
pagination: z.optional(
|
|
249
|
+
z.nullable(z.lazy(() => PutContactV2Pagination1$inboundSchema)),
|
|
250
|
+
),
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
export function putContactV2Meta1FromJSON(
|
|
254
|
+
jsonString: string,
|
|
255
|
+
): SafeParseResult<PutContactV2Meta1, SDKValidationError> {
|
|
256
|
+
return safeParse(
|
|
257
|
+
jsonString,
|
|
258
|
+
(x) => PutContactV2Meta1$inboundSchema.parse(JSON.parse(x)),
|
|
259
|
+
`Failed to parse 'PutContactV2Meta1' from JSON`,
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/** @internal */
|
|
264
|
+
export const PutContactV2Errors1$inboundSchema: z.ZodMiniType<
|
|
265
|
+
PutContactV2Errors1,
|
|
266
|
+
unknown
|
|
267
|
+
> = z.object({});
|
|
268
|
+
|
|
269
|
+
export function putContactV2Errors1FromJSON(
|
|
270
|
+
jsonString: string,
|
|
271
|
+
): SafeParseResult<PutContactV2Errors1, SDKValidationError> {
|
|
272
|
+
return safeParse(
|
|
273
|
+
jsonString,
|
|
274
|
+
(x) => PutContactV2Errors1$inboundSchema.parse(JSON.parse(x)),
|
|
275
|
+
`Failed to parse 'PutContactV2Errors1' from JSON`,
|
|
276
|
+
);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/** @internal */
|
|
280
|
+
export const PutContactV2RawData1$inboundSchema: z.ZodMiniType<
|
|
281
|
+
PutContactV2RawData1,
|
|
282
|
+
unknown
|
|
283
|
+
> = z.object({});
|
|
284
|
+
|
|
285
|
+
export function putContactV2RawData1FromJSON(
|
|
286
|
+
jsonString: string,
|
|
287
|
+
): SafeParseResult<PutContactV2RawData1, SDKValidationError> {
|
|
288
|
+
return safeParse(
|
|
289
|
+
jsonString,
|
|
290
|
+
(x) => PutContactV2RawData1$inboundSchema.parse(JSON.parse(x)),
|
|
291
|
+
`Failed to parse 'PutContactV2RawData1' from JSON`,
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/** @internal */
|
|
296
|
+
export const PutContactV2ResponseBody1$inboundSchema: z.ZodMiniType<
|
|
297
|
+
PutContactV2ResponseBody1,
|
|
298
|
+
unknown
|
|
299
|
+
> = z.object({
|
|
300
|
+
meta: z.optional(z.nullable(z.lazy(() => PutContactV2Meta1$inboundSchema))),
|
|
301
|
+
data: models.ContactResponseDtoV2$inboundSchema,
|
|
302
|
+
errors: types.nullable(z.lazy(() => PutContactV2Errors1$inboundSchema)),
|
|
303
|
+
rawData: types.nullable(z.lazy(() => PutContactV2RawData1$inboundSchema)),
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
export function putContactV2ResponseBody1FromJSON(
|
|
307
|
+
jsonString: string,
|
|
308
|
+
): SafeParseResult<PutContactV2ResponseBody1, SDKValidationError> {
|
|
309
|
+
return safeParse(
|
|
310
|
+
jsonString,
|
|
311
|
+
(x) => PutContactV2ResponseBody1$inboundSchema.parse(JSON.parse(x)),
|
|
312
|
+
`Failed to parse 'PutContactV2ResponseBody1' from JSON`,
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/** @internal */
|
|
317
|
+
export const PutContactV2Response$inboundSchema: z.ZodMiniType<
|
|
318
|
+
PutContactV2Response,
|
|
319
|
+
unknown
|
|
320
|
+
> = smartUnion([
|
|
321
|
+
z.lazy(() => PutContactV2ResponseBody1$inboundSchema),
|
|
322
|
+
z.lazy(() => PutContactV2ResponseBody2$inboundSchema),
|
|
323
|
+
]);
|
|
324
|
+
|
|
180
325
|
export function putContactV2ResponseFromJSON(
|
|
181
326
|
jsonString: string,
|
|
182
327
|
): SafeParseResult<PutContactV2Response, SDKValidationError> {
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
9
|
import * as types from "../types/primitives.js";
|
|
11
10
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
@@ -16,7 +15,7 @@ export const PaymentResponseDtoDocumentType = {
|
|
|
16
15
|
Bill: "BILL",
|
|
17
16
|
BookingProposal: "BOOKING_PROPOSAL",
|
|
18
17
|
} as const;
|
|
19
|
-
export type PaymentResponseDtoDocumentType =
|
|
18
|
+
export type PaymentResponseDtoDocumentType = ClosedEnum<
|
|
20
19
|
typeof PaymentResponseDtoDocumentType
|
|
21
20
|
>;
|
|
22
21
|
|
|
@@ -33,10 +32,9 @@ export type PaymentResponseDto = {
|
|
|
33
32
|
};
|
|
34
33
|
|
|
35
34
|
/** @internal */
|
|
36
|
-
export const PaymentResponseDtoDocumentType$inboundSchema: z.
|
|
37
|
-
PaymentResponseDtoDocumentType
|
|
38
|
-
|
|
39
|
-
> = openEnums.inboundSchema(PaymentResponseDtoDocumentType);
|
|
35
|
+
export const PaymentResponseDtoDocumentType$inboundSchema: z.ZodMiniEnum<
|
|
36
|
+
typeof PaymentResponseDtoDocumentType
|
|
37
|
+
> = z.enum(PaymentResponseDtoDocumentType);
|
|
40
38
|
|
|
41
39
|
/** @internal */
|
|
42
40
|
export const PaymentResponseDto$inboundSchema: z.ZodMiniType<
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
9
|
import * as types from "../types/primitives.js";
|
|
11
10
|
import {
|
|
@@ -18,7 +17,7 @@ export const PaymentTermResponseDtoDueType = {
|
|
|
18
17
|
DueInDays: "DUE_IN_DAYS",
|
|
19
18
|
DueAsPeriod: "DUE_AS_PERIOD",
|
|
20
19
|
} as const;
|
|
21
|
-
export type PaymentTermResponseDtoDueType =
|
|
20
|
+
export type PaymentTermResponseDtoDueType = ClosedEnum<
|
|
22
21
|
typeof PaymentTermResponseDtoDueType
|
|
23
22
|
>;
|
|
24
23
|
|
|
@@ -28,7 +27,7 @@ export const PaymentMethod = {
|
|
|
28
27
|
PaymentServiceProvider: "PAYMENT_SERVICE_PROVIDER",
|
|
29
28
|
AutomaticBankWithdrawal: "AUTOMATIC_BANK_WITHDRAWAL",
|
|
30
29
|
} as const;
|
|
31
|
-
export type PaymentMethod =
|
|
30
|
+
export type PaymentMethod = ClosedEnum<typeof PaymentMethod>;
|
|
32
31
|
|
|
33
32
|
export type PaymentTermResponseDto = {
|
|
34
33
|
id: string | null;
|
|
@@ -48,16 +47,13 @@ export type PaymentTermResponseDto = {
|
|
|
48
47
|
};
|
|
49
48
|
|
|
50
49
|
/** @internal */
|
|
51
|
-
export const PaymentTermResponseDtoDueType$inboundSchema: z.
|
|
52
|
-
PaymentTermResponseDtoDueType
|
|
53
|
-
|
|
54
|
-
> = openEnums.inboundSchema(PaymentTermResponseDtoDueType);
|
|
50
|
+
export const PaymentTermResponseDtoDueType$inboundSchema: z.ZodMiniEnum<
|
|
51
|
+
typeof PaymentTermResponseDtoDueType
|
|
52
|
+
> = z.enum(PaymentTermResponseDtoDueType);
|
|
55
53
|
|
|
56
54
|
/** @internal */
|
|
57
|
-
export const PaymentMethod$inboundSchema: z.
|
|
58
|
-
PaymentMethod
|
|
59
|
-
unknown
|
|
60
|
-
> = openEnums.inboundSchema(PaymentMethod);
|
|
55
|
+
export const PaymentMethod$inboundSchema: z.ZodMiniEnum<typeof PaymentMethod> =
|
|
56
|
+
z.enum(PaymentMethod);
|
|
61
57
|
|
|
62
58
|
/** @internal */
|
|
63
59
|
export const PaymentTermResponseDto$inboundSchema: z.ZodMiniType<
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
9
|
import * as types from "../types/primitives.js";
|
|
11
10
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
@@ -18,7 +17,7 @@ export const PhoneNumberV2Type = {
|
|
|
18
17
|
Private: "PRIVATE",
|
|
19
18
|
Other: "OTHER",
|
|
20
19
|
} as const;
|
|
21
|
-
export type PhoneNumberV2Type =
|
|
20
|
+
export type PhoneNumberV2Type = ClosedEnum<typeof PhoneNumberV2Type>;
|
|
22
21
|
|
|
23
22
|
export type PhoneNumberV2 = {
|
|
24
23
|
number: string | null;
|
|
@@ -26,15 +25,13 @@ export type PhoneNumberV2 = {
|
|
|
26
25
|
};
|
|
27
26
|
|
|
28
27
|
/** @internal */
|
|
29
|
-
export const PhoneNumberV2Type$inboundSchema: z.
|
|
30
|
-
PhoneNumberV2Type
|
|
31
|
-
|
|
32
|
-
> = openEnums.inboundSchema(PhoneNumberV2Type);
|
|
28
|
+
export const PhoneNumberV2Type$inboundSchema: z.ZodMiniEnum<
|
|
29
|
+
typeof PhoneNumberV2Type
|
|
30
|
+
> = z.enum(PhoneNumberV2Type);
|
|
33
31
|
/** @internal */
|
|
34
|
-
export const PhoneNumberV2Type$outboundSchema: z.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
> = openEnums.outboundSchema(PhoneNumberV2Type);
|
|
32
|
+
export const PhoneNumberV2Type$outboundSchema: z.ZodMiniEnum<
|
|
33
|
+
typeof PhoneNumberV2Type
|
|
34
|
+
> = PhoneNumberV2Type$inboundSchema;
|
|
38
35
|
|
|
39
36
|
/** @internal */
|
|
40
37
|
export const PhoneNumberV2$inboundSchema: z.ZodMiniType<
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
9
|
import * as types from "../types/primitives.js";
|
|
11
10
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
@@ -21,7 +20,7 @@ export const PhoneNumberType = {
|
|
|
21
20
|
Whatsapp: "WHATSAPP",
|
|
22
21
|
Other: "OTHER",
|
|
23
22
|
} as const;
|
|
24
|
-
export type PhoneNumberType =
|
|
23
|
+
export type PhoneNumberType = ClosedEnum<typeof PhoneNumberType>;
|
|
25
24
|
|
|
26
25
|
export type PhoneNumber = {
|
|
27
26
|
number: string | null;
|
|
@@ -29,10 +28,9 @@ export type PhoneNumber = {
|
|
|
29
28
|
};
|
|
30
29
|
|
|
31
30
|
/** @internal */
|
|
32
|
-
export const PhoneNumberType$inboundSchema: z.
|
|
33
|
-
PhoneNumberType
|
|
34
|
-
|
|
35
|
-
> = openEnums.inboundSchema(PhoneNumberType);
|
|
31
|
+
export const PhoneNumberType$inboundSchema: z.ZodMiniEnum<
|
|
32
|
+
typeof PhoneNumberType
|
|
33
|
+
> = z.enum(PhoneNumberType);
|
|
36
34
|
|
|
37
35
|
/** @internal */
|
|
38
36
|
export const PhoneNumber$inboundSchema: z.ZodMiniType<PhoneNumber, unknown> = z
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
9
|
import * as types from "../types/primitives.js";
|
|
11
10
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
@@ -168,7 +167,7 @@ export const ProjectResponseDtoCurrency = {
|
|
|
168
167
|
Zmk: "ZMK",
|
|
169
168
|
Zwr: "ZWR",
|
|
170
169
|
} as const;
|
|
171
|
-
export type ProjectResponseDtoCurrency =
|
|
170
|
+
export type ProjectResponseDtoCurrency = ClosedEnum<
|
|
172
171
|
typeof ProjectResponseDtoCurrency
|
|
173
172
|
>;
|
|
174
173
|
|
|
@@ -176,7 +175,7 @@ export const ProjectResponseDtoStatus = {
|
|
|
176
175
|
Active: "ACTIVE",
|
|
177
176
|
Closed: "CLOSED",
|
|
178
177
|
} as const;
|
|
179
|
-
export type ProjectResponseDtoStatus =
|
|
178
|
+
export type ProjectResponseDtoStatus = ClosedEnum<
|
|
180
179
|
typeof ProjectResponseDtoStatus
|
|
181
180
|
>;
|
|
182
181
|
|
|
@@ -197,16 +196,14 @@ export type ProjectResponseDto = {
|
|
|
197
196
|
};
|
|
198
197
|
|
|
199
198
|
/** @internal */
|
|
200
|
-
export const ProjectResponseDtoCurrency$inboundSchema: z.
|
|
201
|
-
ProjectResponseDtoCurrency
|
|
202
|
-
|
|
203
|
-
> = openEnums.inboundSchema(ProjectResponseDtoCurrency);
|
|
199
|
+
export const ProjectResponseDtoCurrency$inboundSchema: z.ZodMiniEnum<
|
|
200
|
+
typeof ProjectResponseDtoCurrency
|
|
201
|
+
> = z.enum(ProjectResponseDtoCurrency);
|
|
204
202
|
|
|
205
203
|
/** @internal */
|
|
206
|
-
export const ProjectResponseDtoStatus$inboundSchema: z.
|
|
207
|
-
ProjectResponseDtoStatus
|
|
208
|
-
|
|
209
|
-
> = openEnums.inboundSchema(ProjectResponseDtoStatus);
|
|
204
|
+
export const ProjectResponseDtoStatus$inboundSchema: z.ZodMiniEnum<
|
|
205
|
+
typeof ProjectResponseDtoStatus
|
|
206
|
+
> = z.enum(ProjectResponseDtoStatus);
|
|
210
207
|
|
|
211
208
|
/** @internal */
|
|
212
209
|
export const ProjectResponseDto$inboundSchema: z.ZodMiniType<
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
9
|
import * as types from "../types/primitives.js";
|
|
11
10
|
import { Address, Address$inboundSchema } from "./address.js";
|
|
@@ -173,7 +172,7 @@ export const PurchaseOrderResponseDtoCurrency = {
|
|
|
173
172
|
Zmk: "ZMK",
|
|
174
173
|
Zwr: "ZWR",
|
|
175
174
|
} as const;
|
|
176
|
-
export type PurchaseOrderResponseDtoCurrency =
|
|
175
|
+
export type PurchaseOrderResponseDtoCurrency = ClosedEnum<
|
|
177
176
|
typeof PurchaseOrderResponseDtoCurrency
|
|
178
177
|
>;
|
|
179
178
|
|
|
@@ -183,7 +182,7 @@ export const PurchaseOrderResponseDtoStatus = {
|
|
|
183
182
|
PartiallyFulfilled: "PARTIALLY_FULFILLED",
|
|
184
183
|
Canceled: "CANCELED",
|
|
185
184
|
} as const;
|
|
186
|
-
export type PurchaseOrderResponseDtoStatus =
|
|
185
|
+
export type PurchaseOrderResponseDtoStatus = ClosedEnum<
|
|
187
186
|
typeof PurchaseOrderResponseDtoStatus
|
|
188
187
|
>;
|
|
189
188
|
|
|
@@ -210,16 +209,14 @@ export type PurchaseOrderResponseDto = {
|
|
|
210
209
|
};
|
|
211
210
|
|
|
212
211
|
/** @internal */
|
|
213
|
-
export const PurchaseOrderResponseDtoCurrency$inboundSchema: z.
|
|
214
|
-
PurchaseOrderResponseDtoCurrency
|
|
215
|
-
|
|
216
|
-
> = openEnums.inboundSchema(PurchaseOrderResponseDtoCurrency);
|
|
212
|
+
export const PurchaseOrderResponseDtoCurrency$inboundSchema: z.ZodMiniEnum<
|
|
213
|
+
typeof PurchaseOrderResponseDtoCurrency
|
|
214
|
+
> = z.enum(PurchaseOrderResponseDtoCurrency);
|
|
217
215
|
|
|
218
216
|
/** @internal */
|
|
219
|
-
export const PurchaseOrderResponseDtoStatus$inboundSchema: z.
|
|
220
|
-
PurchaseOrderResponseDtoStatus
|
|
221
|
-
|
|
222
|
-
> = openEnums.inboundSchema(PurchaseOrderResponseDtoStatus);
|
|
217
|
+
export const PurchaseOrderResponseDtoStatus$inboundSchema: z.ZodMiniEnum<
|
|
218
|
+
typeof PurchaseOrderResponseDtoStatus
|
|
219
|
+
> = z.enum(PurchaseOrderResponseDtoStatus);
|
|
223
220
|
|
|
224
221
|
/** @internal */
|
|
225
222
|
export const PurchaseOrderResponseDto$inboundSchema: z.ZodMiniType<
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
9
|
import * as types from "../types/primitives.js";
|
|
11
10
|
import { Address, Address$inboundSchema } from "./address.js";
|
|
@@ -22,7 +21,7 @@ export const SalesOrderResponseDtoStatus = {
|
|
|
22
21
|
Closed: "CLOSED",
|
|
23
22
|
Voided: "VOIDED",
|
|
24
23
|
} as const;
|
|
25
|
-
export type SalesOrderResponseDtoStatus =
|
|
24
|
+
export type SalesOrderResponseDtoStatus = ClosedEnum<
|
|
26
25
|
typeof SalesOrderResponseDtoStatus
|
|
27
26
|
>;
|
|
28
27
|
|
|
@@ -51,10 +50,9 @@ export type SalesOrderResponseDto = {
|
|
|
51
50
|
};
|
|
52
51
|
|
|
53
52
|
/** @internal */
|
|
54
|
-
export const SalesOrderResponseDtoStatus$inboundSchema: z.
|
|
55
|
-
SalesOrderResponseDtoStatus
|
|
56
|
-
|
|
57
|
-
> = openEnums.inboundSchema(SalesOrderResponseDtoStatus);
|
|
53
|
+
export const SalesOrderResponseDtoStatus$inboundSchema: z.ZodMiniEnum<
|
|
54
|
+
typeof SalesOrderResponseDtoStatus
|
|
55
|
+
> = z.enum(SalesOrderResponseDtoStatus);
|
|
58
56
|
|
|
59
57
|
/** @internal */
|
|
60
58
|
export const SalesOrderResponseDto$inboundSchema: z.ZodMiniType<
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
-
import
|
|
8
|
-
import { OpenEnum } from "../types/enums.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
9
|
import * as types from "../types/primitives.js";
|
|
11
10
|
import { SDKValidationError } from "./errors/sdk-validation-error.js";
|
|
@@ -16,7 +15,7 @@ export const TaxRateResponseDtoType = {
|
|
|
16
15
|
NoTax: "NO_TAX",
|
|
17
16
|
ZeroTax: "ZERO_TAX",
|
|
18
17
|
} as const;
|
|
19
|
-
export type TaxRateResponseDtoType =
|
|
18
|
+
export type TaxRateResponseDtoType = ClosedEnum<typeof TaxRateResponseDtoType>;
|
|
20
19
|
|
|
21
20
|
export const Usage = {
|
|
22
21
|
Invoice: "INVOICE",
|
|
@@ -25,7 +24,7 @@ export const Usage = {
|
|
|
25
24
|
Cash: "CASH",
|
|
26
25
|
All: "ALL",
|
|
27
26
|
} as const;
|
|
28
|
-
export type Usage =
|
|
27
|
+
export type Usage = ClosedEnum<typeof Usage>;
|
|
29
28
|
|
|
30
29
|
export type TaxRateResponseDto = {
|
|
31
30
|
id: string | null;
|
|
@@ -40,14 +39,12 @@ export type TaxRateResponseDto = {
|
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
/** @internal */
|
|
43
|
-
export const TaxRateResponseDtoType$inboundSchema: z.
|
|
44
|
-
TaxRateResponseDtoType
|
|
45
|
-
|
|
46
|
-
> = openEnums.inboundSchema(TaxRateResponseDtoType);
|
|
42
|
+
export const TaxRateResponseDtoType$inboundSchema: z.ZodMiniEnum<
|
|
43
|
+
typeof TaxRateResponseDtoType
|
|
44
|
+
> = z.enum(TaxRateResponseDtoType);
|
|
47
45
|
|
|
48
46
|
/** @internal */
|
|
49
|
-
export const Usage$inboundSchema: z.
|
|
50
|
-
.inboundSchema(Usage);
|
|
47
|
+
export const Usage$inboundSchema: z.ZodMiniEnum<typeof Usage> = z.enum(Usage);
|
|
51
48
|
|
|
52
49
|
/** @internal */
|
|
53
50
|
export const TaxRateResponseDto$inboundSchema: z.ZodMiniType<
|