@voltade/envoy-sdk 1.3.2 → 1.4.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/dist/index.d.ts +14 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/resources/campaigns/index.d.ts.map +1 -1
- package/dist/resources/campaigns/index.js +2 -3
- package/dist/resources/campaigns/index.js.map +1 -1
- package/dist/resources/campaigns/types.d.ts +0 -3
- package/dist/resources/campaigns/types.d.ts.map +1 -1
- package/dist/resources/campaigns/types.js +0 -1
- package/dist/resources/campaigns/types.js.map +1 -1
- package/dist/resources/companies/index.d.ts +28 -3
- package/dist/resources/companies/index.d.ts.map +1 -1
- package/dist/resources/companies/index.js +42 -3
- package/dist/resources/companies/index.js.map +1 -1
- package/dist/resources/companies/types.d.ts +41 -0
- package/dist/resources/companies/types.d.ts.map +1 -1
- package/dist/resources/companies/types.js +4 -0
- package/dist/resources/companies/types.js.map +1 -1
- package/dist/resources/contacts/index.d.ts +36 -3
- package/dist/resources/contacts/index.d.ts.map +1 -1
- package/dist/resources/contacts/index.js +42 -2
- package/dist/resources/contacts/index.js.map +1 -1
- package/dist/resources/contacts/types.d.ts +41 -0
- package/dist/resources/contacts/types.d.ts.map +1 -1
- package/dist/resources/contacts/types.js +4 -0
- package/dist/resources/contacts/types.js.map +1 -1
- package/dist/resources/filters.d.ts +172 -0
- package/dist/resources/filters.d.ts.map +1 -0
- package/dist/resources/filters.js +299 -0
- package/dist/resources/filters.js.map +1 -0
- package/dist/resources/index.d.ts +1 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +1 -0
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/orders/index.d.ts +29 -10
- package/dist/resources/orders/index.d.ts.map +1 -1
- package/dist/resources/orders/index.js +31 -12
- package/dist/resources/orders/index.js.map +1 -1
- package/dist/resources/orders/types.d.ts +234 -201
- package/dist/resources/orders/types.d.ts.map +1 -1
- package/dist/resources/orders/types.js +35 -13
- package/dist/resources/orders/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,230 +3,217 @@ import { z } from "zod";
|
|
|
3
3
|
* Zod Schemas for Orders
|
|
4
4
|
*/
|
|
5
5
|
export declare const OrderSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
6
|
+
export declare const PartyableTypeSchema: z.ZodEnum<["Contact", "Company"]>;
|
|
7
|
+
export declare const PaymentStatusSchema: z.ZodEnum<["pending", "authorized", "paid", "partially_refunded", "refunded", "failed", "partially_paid"]>;
|
|
8
|
+
export declare const FulfillmentStatusSchema: z.ZodEnum<["unfulfilled", "partially_fulfilled", "fulfilled", "returned"]>;
|
|
6
9
|
export declare const OrderLineItemSchema: z.ZodObject<{
|
|
7
|
-
|
|
10
|
+
name: z.ZodOptional<z.ZodString>;
|
|
11
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
8
12
|
quantity: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
description: z.ZodOptional<z.ZodString>;
|
|
10
|
-
line_total: z.ZodOptional<z.ZodNumber>;
|
|
11
13
|
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
name?: string | undefined;
|
|
15
|
+
unit_price?: number | undefined;
|
|
14
16
|
quantity?: number | undefined;
|
|
15
|
-
line_total?: number | undefined;
|
|
16
17
|
}, {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
unit_price?: number | undefined;
|
|
19
20
|
quantity?: number | undefined;
|
|
20
|
-
line_total?: number | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
export declare const OrderMetadataSchema: z.ZodObject<{
|
|
23
23
|
line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
24
|
-
|
|
24
|
+
name: z.ZodOptional<z.ZodString>;
|
|
25
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
25
26
|
quantity: z.ZodOptional<z.ZodNumber>;
|
|
26
|
-
description: z.ZodOptional<z.ZodString>;
|
|
27
|
-
line_total: z.ZodOptional<z.ZodNumber>;
|
|
28
27
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
name?: string | undefined;
|
|
29
|
+
unit_price?: number | undefined;
|
|
31
30
|
quantity?: number | undefined;
|
|
32
|
-
line_total?: number | undefined;
|
|
33
31
|
}, {
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
name?: string | undefined;
|
|
33
|
+
unit_price?: number | undefined;
|
|
36
34
|
quantity?: number | undefined;
|
|
37
|
-
line_total?: number | undefined;
|
|
38
35
|
}>, "many">>;
|
|
39
36
|
}, "strip", z.ZodTypeAny, {
|
|
40
37
|
line_items?: {
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
name?: string | undefined;
|
|
39
|
+
unit_price?: number | undefined;
|
|
43
40
|
quantity?: number | undefined;
|
|
44
|
-
line_total?: number | undefined;
|
|
45
41
|
}[] | undefined;
|
|
46
42
|
}, {
|
|
47
43
|
line_items?: {
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
unit_price?: number | undefined;
|
|
50
46
|
quantity?: number | undefined;
|
|
51
|
-
line_total?: number | undefined;
|
|
52
47
|
}[] | undefined;
|
|
53
48
|
}>;
|
|
54
49
|
export declare const UpsertOrderParamsSchema: z.ZodObject<{
|
|
55
50
|
name: z.ZodOptional<z.ZodString>;
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
partyable_type: z.ZodOptional<z.ZodEnum<["Contact", "Company"]>>;
|
|
52
|
+
partyable_id: z.ZodOptional<z.ZodNumber>;
|
|
58
53
|
currency_code: z.ZodOptional<z.ZodString>;
|
|
59
|
-
|
|
60
|
-
fulfillment_status: z.ZodOptional<z.
|
|
54
|
+
payment_status: z.ZodOptional<z.ZodEnum<["pending", "authorized", "paid", "partially_refunded", "refunded", "failed", "partially_paid"]>>;
|
|
55
|
+
fulfillment_status: z.ZodOptional<z.ZodEnum<["unfulfilled", "partially_fulfilled", "fulfilled", "returned"]>>;
|
|
61
56
|
source: z.ZodString;
|
|
62
57
|
source_id: z.ZodString;
|
|
63
58
|
order_url: z.ZodOptional<z.ZodString>;
|
|
64
59
|
notes: z.ZodOptional<z.ZodString>;
|
|
60
|
+
closed_from_opportunity_id: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
representative_id: z.ZodOptional<z.ZodNumber>;
|
|
65
62
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
66
63
|
line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
67
|
-
|
|
64
|
+
name: z.ZodOptional<z.ZodString>;
|
|
65
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
68
66
|
quantity: z.ZodOptional<z.ZodNumber>;
|
|
69
|
-
description: z.ZodOptional<z.ZodString>;
|
|
70
|
-
line_total: z.ZodOptional<z.ZodNumber>;
|
|
71
67
|
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
unit_price?: number | undefined;
|
|
74
70
|
quantity?: number | undefined;
|
|
75
|
-
line_total?: number | undefined;
|
|
76
71
|
}, {
|
|
77
|
-
|
|
78
|
-
|
|
72
|
+
name?: string | undefined;
|
|
73
|
+
unit_price?: number | undefined;
|
|
79
74
|
quantity?: number | undefined;
|
|
80
|
-
line_total?: number | undefined;
|
|
81
75
|
}>, "many">>;
|
|
82
76
|
}, "strip", z.ZodTypeAny, {
|
|
83
77
|
line_items?: {
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
name?: string | undefined;
|
|
79
|
+
unit_price?: number | undefined;
|
|
86
80
|
quantity?: number | undefined;
|
|
87
|
-
line_total?: number | undefined;
|
|
88
81
|
}[] | undefined;
|
|
89
82
|
}, {
|
|
90
83
|
line_items?: {
|
|
91
|
-
|
|
92
|
-
|
|
84
|
+
name?: string | undefined;
|
|
85
|
+
unit_price?: number | undefined;
|
|
93
86
|
quantity?: number | undefined;
|
|
94
|
-
line_total?: number | undefined;
|
|
95
87
|
}[] | undefined;
|
|
96
88
|
}>>;
|
|
97
89
|
custom_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
98
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
99
90
|
}, "strip", z.ZodTypeAny, {
|
|
100
91
|
source_id: string;
|
|
101
92
|
source: string;
|
|
102
93
|
name?: string | undefined;
|
|
103
94
|
metadata?: {
|
|
104
95
|
line_items?: {
|
|
105
|
-
|
|
106
|
-
|
|
96
|
+
name?: string | undefined;
|
|
97
|
+
unit_price?: number | undefined;
|
|
107
98
|
quantity?: number | undefined;
|
|
108
|
-
line_total?: number | undefined;
|
|
109
99
|
}[] | undefined;
|
|
110
100
|
} | undefined;
|
|
111
|
-
created_at?: string | undefined;
|
|
112
101
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
113
|
-
|
|
114
|
-
|
|
102
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
103
|
+
partyable_id?: number | undefined;
|
|
115
104
|
currency_code?: string | undefined;
|
|
116
|
-
|
|
117
|
-
fulfillment_status?:
|
|
105
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
106
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
118
107
|
order_url?: string | undefined;
|
|
119
108
|
notes?: string | undefined;
|
|
109
|
+
closed_from_opportunity_id?: number | undefined;
|
|
110
|
+
representative_id?: number | undefined;
|
|
120
111
|
}, {
|
|
121
112
|
source_id: string;
|
|
122
113
|
source: string;
|
|
123
114
|
name?: string | undefined;
|
|
124
115
|
metadata?: {
|
|
125
116
|
line_items?: {
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
name?: string | undefined;
|
|
118
|
+
unit_price?: number | undefined;
|
|
128
119
|
quantity?: number | undefined;
|
|
129
|
-
line_total?: number | undefined;
|
|
130
120
|
}[] | undefined;
|
|
131
121
|
} | undefined;
|
|
132
|
-
created_at?: string | undefined;
|
|
133
122
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
134
|
-
|
|
135
|
-
|
|
123
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
124
|
+
partyable_id?: number | undefined;
|
|
136
125
|
currency_code?: string | undefined;
|
|
137
|
-
|
|
138
|
-
fulfillment_status?:
|
|
126
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
127
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
139
128
|
order_url?: string | undefined;
|
|
140
129
|
notes?: string | undefined;
|
|
130
|
+
closed_from_opportunity_id?: number | undefined;
|
|
131
|
+
representative_id?: number | undefined;
|
|
141
132
|
}>;
|
|
142
133
|
export declare const UpsertOrderRequestSchema: z.ZodObject<{
|
|
143
134
|
order: z.ZodObject<{
|
|
144
135
|
name: z.ZodOptional<z.ZodString>;
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
partyable_type: z.ZodOptional<z.ZodEnum<["Contact", "Company"]>>;
|
|
137
|
+
partyable_id: z.ZodOptional<z.ZodNumber>;
|
|
147
138
|
currency_code: z.ZodOptional<z.ZodString>;
|
|
148
|
-
|
|
149
|
-
fulfillment_status: z.ZodOptional<z.
|
|
139
|
+
payment_status: z.ZodOptional<z.ZodEnum<["pending", "authorized", "paid", "partially_refunded", "refunded", "failed", "partially_paid"]>>;
|
|
140
|
+
fulfillment_status: z.ZodOptional<z.ZodEnum<["unfulfilled", "partially_fulfilled", "fulfilled", "returned"]>>;
|
|
150
141
|
source: z.ZodString;
|
|
151
142
|
source_id: z.ZodString;
|
|
152
143
|
order_url: z.ZodOptional<z.ZodString>;
|
|
153
144
|
notes: z.ZodOptional<z.ZodString>;
|
|
145
|
+
closed_from_opportunity_id: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
representative_id: z.ZodOptional<z.ZodNumber>;
|
|
154
147
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
155
148
|
line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
156
|
-
|
|
149
|
+
name: z.ZodOptional<z.ZodString>;
|
|
150
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
157
151
|
quantity: z.ZodOptional<z.ZodNumber>;
|
|
158
|
-
description: z.ZodOptional<z.ZodString>;
|
|
159
|
-
line_total: z.ZodOptional<z.ZodNumber>;
|
|
160
152
|
}, "strip", z.ZodTypeAny, {
|
|
161
|
-
|
|
162
|
-
|
|
153
|
+
name?: string | undefined;
|
|
154
|
+
unit_price?: number | undefined;
|
|
163
155
|
quantity?: number | undefined;
|
|
164
|
-
line_total?: number | undefined;
|
|
165
156
|
}, {
|
|
166
|
-
|
|
167
|
-
|
|
157
|
+
name?: string | undefined;
|
|
158
|
+
unit_price?: number | undefined;
|
|
168
159
|
quantity?: number | undefined;
|
|
169
|
-
line_total?: number | undefined;
|
|
170
160
|
}>, "many">>;
|
|
171
161
|
}, "strip", z.ZodTypeAny, {
|
|
172
162
|
line_items?: {
|
|
173
|
-
|
|
174
|
-
|
|
163
|
+
name?: string | undefined;
|
|
164
|
+
unit_price?: number | undefined;
|
|
175
165
|
quantity?: number | undefined;
|
|
176
|
-
line_total?: number | undefined;
|
|
177
166
|
}[] | undefined;
|
|
178
167
|
}, {
|
|
179
168
|
line_items?: {
|
|
180
|
-
|
|
181
|
-
|
|
169
|
+
name?: string | undefined;
|
|
170
|
+
unit_price?: number | undefined;
|
|
182
171
|
quantity?: number | undefined;
|
|
183
|
-
line_total?: number | undefined;
|
|
184
172
|
}[] | undefined;
|
|
185
173
|
}>>;
|
|
186
174
|
custom_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
187
|
-
created_at: z.ZodOptional<z.ZodString>;
|
|
188
175
|
}, "strip", z.ZodTypeAny, {
|
|
189
176
|
source_id: string;
|
|
190
177
|
source: string;
|
|
191
178
|
name?: string | undefined;
|
|
192
179
|
metadata?: {
|
|
193
180
|
line_items?: {
|
|
194
|
-
|
|
195
|
-
|
|
181
|
+
name?: string | undefined;
|
|
182
|
+
unit_price?: number | undefined;
|
|
196
183
|
quantity?: number | undefined;
|
|
197
|
-
line_total?: number | undefined;
|
|
198
184
|
}[] | undefined;
|
|
199
185
|
} | undefined;
|
|
200
|
-
created_at?: string | undefined;
|
|
201
186
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
202
|
-
|
|
203
|
-
|
|
187
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
188
|
+
partyable_id?: number | undefined;
|
|
204
189
|
currency_code?: string | undefined;
|
|
205
|
-
|
|
206
|
-
fulfillment_status?:
|
|
190
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
191
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
207
192
|
order_url?: string | undefined;
|
|
208
193
|
notes?: string | undefined;
|
|
194
|
+
closed_from_opportunity_id?: number | undefined;
|
|
195
|
+
representative_id?: number | undefined;
|
|
209
196
|
}, {
|
|
210
197
|
source_id: string;
|
|
211
198
|
source: string;
|
|
212
199
|
name?: string | undefined;
|
|
213
200
|
metadata?: {
|
|
214
201
|
line_items?: {
|
|
215
|
-
|
|
216
|
-
|
|
202
|
+
name?: string | undefined;
|
|
203
|
+
unit_price?: number | undefined;
|
|
217
204
|
quantity?: number | undefined;
|
|
218
|
-
line_total?: number | undefined;
|
|
219
205
|
}[] | undefined;
|
|
220
206
|
} | undefined;
|
|
221
|
-
created_at?: string | undefined;
|
|
222
207
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
223
|
-
|
|
224
|
-
|
|
208
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
209
|
+
partyable_id?: number | undefined;
|
|
225
210
|
currency_code?: string | undefined;
|
|
226
|
-
|
|
227
|
-
fulfillment_status?:
|
|
211
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
212
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
228
213
|
order_url?: string | undefined;
|
|
229
214
|
notes?: string | undefined;
|
|
215
|
+
closed_from_opportunity_id?: number | undefined;
|
|
216
|
+
representative_id?: number | undefined;
|
|
230
217
|
}>;
|
|
231
218
|
}, "strip", z.ZodTypeAny, {
|
|
232
219
|
order: {
|
|
@@ -235,21 +222,21 @@ export declare const UpsertOrderRequestSchema: z.ZodObject<{
|
|
|
235
222
|
name?: string | undefined;
|
|
236
223
|
metadata?: {
|
|
237
224
|
line_items?: {
|
|
238
|
-
|
|
239
|
-
|
|
225
|
+
name?: string | undefined;
|
|
226
|
+
unit_price?: number | undefined;
|
|
240
227
|
quantity?: number | undefined;
|
|
241
|
-
line_total?: number | undefined;
|
|
242
228
|
}[] | undefined;
|
|
243
229
|
} | undefined;
|
|
244
|
-
created_at?: string | undefined;
|
|
245
230
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
246
|
-
|
|
247
|
-
|
|
231
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
232
|
+
partyable_id?: number | undefined;
|
|
248
233
|
currency_code?: string | undefined;
|
|
249
|
-
|
|
250
|
-
fulfillment_status?:
|
|
234
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
235
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
251
236
|
order_url?: string | undefined;
|
|
252
237
|
notes?: string | undefined;
|
|
238
|
+
closed_from_opportunity_id?: number | undefined;
|
|
239
|
+
representative_id?: number | undefined;
|
|
253
240
|
};
|
|
254
241
|
}, {
|
|
255
242
|
order: {
|
|
@@ -258,66 +245,64 @@ export declare const UpsertOrderRequestSchema: z.ZodObject<{
|
|
|
258
245
|
name?: string | undefined;
|
|
259
246
|
metadata?: {
|
|
260
247
|
line_items?: {
|
|
261
|
-
|
|
262
|
-
|
|
248
|
+
name?: string | undefined;
|
|
249
|
+
unit_price?: number | undefined;
|
|
263
250
|
quantity?: number | undefined;
|
|
264
|
-
line_total?: number | undefined;
|
|
265
251
|
}[] | undefined;
|
|
266
252
|
} | undefined;
|
|
267
|
-
created_at?: string | undefined;
|
|
268
253
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
269
|
-
|
|
270
|
-
|
|
254
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
255
|
+
partyable_id?: number | undefined;
|
|
271
256
|
currency_code?: string | undefined;
|
|
272
|
-
|
|
273
|
-
fulfillment_status?:
|
|
257
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
258
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
274
259
|
order_url?: string | undefined;
|
|
275
260
|
notes?: string | undefined;
|
|
261
|
+
closed_from_opportunity_id?: number | undefined;
|
|
262
|
+
representative_id?: number | undefined;
|
|
276
263
|
};
|
|
277
264
|
}>;
|
|
278
265
|
export declare const UpsertOrderResponsePayloadSchema: z.ZodObject<{
|
|
279
266
|
id: z.ZodNumber;
|
|
280
267
|
name: z.ZodOptional<z.ZodString>;
|
|
281
|
-
|
|
282
|
-
|
|
268
|
+
partyable_type: z.ZodOptional<z.ZodEnum<["Contact", "Company"]>>;
|
|
269
|
+
partyable_id: z.ZodOptional<z.ZodNumber>;
|
|
270
|
+
partyable_name: z.ZodOptional<z.ZodString>;
|
|
283
271
|
total_amount: z.ZodOptional<z.ZodNumber>;
|
|
284
272
|
currency_code: z.ZodOptional<z.ZodString>;
|
|
285
|
-
|
|
286
|
-
fulfillment_status: z.ZodOptional<z.
|
|
273
|
+
payment_status: z.ZodOptional<z.ZodEnum<["pending", "authorized", "paid", "partially_refunded", "refunded", "failed", "partially_paid"]>>;
|
|
274
|
+
fulfillment_status: z.ZodOptional<z.ZodEnum<["unfulfilled", "partially_fulfilled", "fulfilled", "returned"]>>;
|
|
287
275
|
source: z.ZodString;
|
|
288
276
|
source_id: z.ZodString;
|
|
289
277
|
order_url: z.ZodOptional<z.ZodString>;
|
|
290
278
|
notes: z.ZodOptional<z.ZodString>;
|
|
279
|
+
closed_from_opportunity_id: z.ZodOptional<z.ZodNumber>;
|
|
280
|
+
representative_id: z.ZodOptional<z.ZodNumber>;
|
|
291
281
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
292
282
|
line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
293
|
-
|
|
283
|
+
name: z.ZodOptional<z.ZodString>;
|
|
284
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
294
285
|
quantity: z.ZodOptional<z.ZodNumber>;
|
|
295
|
-
description: z.ZodOptional<z.ZodString>;
|
|
296
|
-
line_total: z.ZodOptional<z.ZodNumber>;
|
|
297
286
|
}, "strip", z.ZodTypeAny, {
|
|
298
|
-
|
|
299
|
-
|
|
287
|
+
name?: string | undefined;
|
|
288
|
+
unit_price?: number | undefined;
|
|
300
289
|
quantity?: number | undefined;
|
|
301
|
-
line_total?: number | undefined;
|
|
302
290
|
}, {
|
|
303
|
-
|
|
304
|
-
|
|
291
|
+
name?: string | undefined;
|
|
292
|
+
unit_price?: number | undefined;
|
|
305
293
|
quantity?: number | undefined;
|
|
306
|
-
line_total?: number | undefined;
|
|
307
294
|
}>, "many">>;
|
|
308
295
|
}, "strip", z.ZodTypeAny, {
|
|
309
296
|
line_items?: {
|
|
310
|
-
|
|
311
|
-
|
|
297
|
+
name?: string | undefined;
|
|
298
|
+
unit_price?: number | undefined;
|
|
312
299
|
quantity?: number | undefined;
|
|
313
|
-
line_total?: number | undefined;
|
|
314
300
|
}[] | undefined;
|
|
315
301
|
}, {
|
|
316
302
|
line_items?: {
|
|
317
|
-
|
|
318
|
-
|
|
303
|
+
name?: string | undefined;
|
|
304
|
+
unit_price?: number | undefined;
|
|
319
305
|
quantity?: number | undefined;
|
|
320
|
-
line_total?: number | undefined;
|
|
321
306
|
}[] | undefined;
|
|
322
307
|
}>>;
|
|
323
308
|
custom_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -332,21 +317,23 @@ export declare const UpsertOrderResponsePayloadSchema: z.ZodObject<{
|
|
|
332
317
|
name?: string | undefined;
|
|
333
318
|
metadata?: {
|
|
334
319
|
line_items?: {
|
|
335
|
-
|
|
336
|
-
|
|
320
|
+
name?: string | undefined;
|
|
321
|
+
unit_price?: number | undefined;
|
|
337
322
|
quantity?: number | undefined;
|
|
338
|
-
line_total?: number | undefined;
|
|
339
323
|
}[] | undefined;
|
|
340
324
|
} | undefined;
|
|
341
325
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
342
|
-
|
|
343
|
-
|
|
326
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
327
|
+
partyable_id?: number | undefined;
|
|
344
328
|
currency_code?: string | undefined;
|
|
345
|
-
|
|
346
|
-
fulfillment_status?:
|
|
329
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
330
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
347
331
|
order_url?: string | undefined;
|
|
348
332
|
notes?: string | undefined;
|
|
349
|
-
|
|
333
|
+
closed_from_opportunity_id?: number | undefined;
|
|
334
|
+
representative_id?: number | undefined;
|
|
335
|
+
partyable_name?: string | undefined;
|
|
336
|
+
total_amount?: number | undefined;
|
|
350
337
|
}, {
|
|
351
338
|
id: number;
|
|
352
339
|
created_at: string;
|
|
@@ -356,66 +343,66 @@ export declare const UpsertOrderResponsePayloadSchema: z.ZodObject<{
|
|
|
356
343
|
name?: string | undefined;
|
|
357
344
|
metadata?: {
|
|
358
345
|
line_items?: {
|
|
359
|
-
|
|
360
|
-
|
|
346
|
+
name?: string | undefined;
|
|
347
|
+
unit_price?: number | undefined;
|
|
361
348
|
quantity?: number | undefined;
|
|
362
|
-
line_total?: number | undefined;
|
|
363
349
|
}[] | undefined;
|
|
364
350
|
} | undefined;
|
|
365
351
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
366
|
-
|
|
367
|
-
|
|
352
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
353
|
+
partyable_id?: number | undefined;
|
|
368
354
|
currency_code?: string | undefined;
|
|
369
|
-
|
|
370
|
-
fulfillment_status?:
|
|
355
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
356
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
371
357
|
order_url?: string | undefined;
|
|
372
358
|
notes?: string | undefined;
|
|
373
|
-
|
|
359
|
+
closed_from_opportunity_id?: number | undefined;
|
|
360
|
+
representative_id?: number | undefined;
|
|
361
|
+
partyable_name?: string | undefined;
|
|
362
|
+
total_amount?: number | undefined;
|
|
374
363
|
}>;
|
|
375
364
|
export declare const UpsertOrderResponseSchema: z.ZodObject<{
|
|
376
365
|
payload: z.ZodObject<{
|
|
377
366
|
id: z.ZodNumber;
|
|
378
367
|
name: z.ZodOptional<z.ZodString>;
|
|
379
|
-
|
|
380
|
-
|
|
368
|
+
partyable_type: z.ZodOptional<z.ZodEnum<["Contact", "Company"]>>;
|
|
369
|
+
partyable_id: z.ZodOptional<z.ZodNumber>;
|
|
370
|
+
partyable_name: z.ZodOptional<z.ZodString>;
|
|
381
371
|
total_amount: z.ZodOptional<z.ZodNumber>;
|
|
382
372
|
currency_code: z.ZodOptional<z.ZodString>;
|
|
383
|
-
|
|
384
|
-
fulfillment_status: z.ZodOptional<z.
|
|
373
|
+
payment_status: z.ZodOptional<z.ZodEnum<["pending", "authorized", "paid", "partially_refunded", "refunded", "failed", "partially_paid"]>>;
|
|
374
|
+
fulfillment_status: z.ZodOptional<z.ZodEnum<["unfulfilled", "partially_fulfilled", "fulfilled", "returned"]>>;
|
|
385
375
|
source: z.ZodString;
|
|
386
376
|
source_id: z.ZodString;
|
|
387
377
|
order_url: z.ZodOptional<z.ZodString>;
|
|
388
378
|
notes: z.ZodOptional<z.ZodString>;
|
|
379
|
+
closed_from_opportunity_id: z.ZodOptional<z.ZodNumber>;
|
|
380
|
+
representative_id: z.ZodOptional<z.ZodNumber>;
|
|
389
381
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
390
382
|
line_items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
391
|
-
|
|
383
|
+
name: z.ZodOptional<z.ZodString>;
|
|
384
|
+
unit_price: z.ZodOptional<z.ZodNumber>;
|
|
392
385
|
quantity: z.ZodOptional<z.ZodNumber>;
|
|
393
|
-
description: z.ZodOptional<z.ZodString>;
|
|
394
|
-
line_total: z.ZodOptional<z.ZodNumber>;
|
|
395
386
|
}, "strip", z.ZodTypeAny, {
|
|
396
|
-
|
|
397
|
-
|
|
387
|
+
name?: string | undefined;
|
|
388
|
+
unit_price?: number | undefined;
|
|
398
389
|
quantity?: number | undefined;
|
|
399
|
-
line_total?: number | undefined;
|
|
400
390
|
}, {
|
|
401
|
-
|
|
402
|
-
|
|
391
|
+
name?: string | undefined;
|
|
392
|
+
unit_price?: number | undefined;
|
|
403
393
|
quantity?: number | undefined;
|
|
404
|
-
line_total?: number | undefined;
|
|
405
394
|
}>, "many">>;
|
|
406
395
|
}, "strip", z.ZodTypeAny, {
|
|
407
396
|
line_items?: {
|
|
408
|
-
|
|
409
|
-
|
|
397
|
+
name?: string | undefined;
|
|
398
|
+
unit_price?: number | undefined;
|
|
410
399
|
quantity?: number | undefined;
|
|
411
|
-
line_total?: number | undefined;
|
|
412
400
|
}[] | undefined;
|
|
413
401
|
}, {
|
|
414
402
|
line_items?: {
|
|
415
|
-
|
|
416
|
-
|
|
403
|
+
name?: string | undefined;
|
|
404
|
+
unit_price?: number | undefined;
|
|
417
405
|
quantity?: number | undefined;
|
|
418
|
-
line_total?: number | undefined;
|
|
419
406
|
}[] | undefined;
|
|
420
407
|
}>>;
|
|
421
408
|
custom_attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -430,21 +417,23 @@ export declare const UpsertOrderResponseSchema: z.ZodObject<{
|
|
|
430
417
|
name?: string | undefined;
|
|
431
418
|
metadata?: {
|
|
432
419
|
line_items?: {
|
|
433
|
-
|
|
434
|
-
|
|
420
|
+
name?: string | undefined;
|
|
421
|
+
unit_price?: number | undefined;
|
|
435
422
|
quantity?: number | undefined;
|
|
436
|
-
line_total?: number | undefined;
|
|
437
423
|
}[] | undefined;
|
|
438
424
|
} | undefined;
|
|
439
425
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
440
|
-
|
|
441
|
-
|
|
426
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
427
|
+
partyable_id?: number | undefined;
|
|
442
428
|
currency_code?: string | undefined;
|
|
443
|
-
|
|
444
|
-
fulfillment_status?:
|
|
429
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
430
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
445
431
|
order_url?: string | undefined;
|
|
446
432
|
notes?: string | undefined;
|
|
447
|
-
|
|
433
|
+
closed_from_opportunity_id?: number | undefined;
|
|
434
|
+
representative_id?: number | undefined;
|
|
435
|
+
partyable_name?: string | undefined;
|
|
436
|
+
total_amount?: number | undefined;
|
|
448
437
|
}, {
|
|
449
438
|
id: number;
|
|
450
439
|
created_at: string;
|
|
@@ -454,21 +443,23 @@ export declare const UpsertOrderResponseSchema: z.ZodObject<{
|
|
|
454
443
|
name?: string | undefined;
|
|
455
444
|
metadata?: {
|
|
456
445
|
line_items?: {
|
|
457
|
-
|
|
458
|
-
|
|
446
|
+
name?: string | undefined;
|
|
447
|
+
unit_price?: number | undefined;
|
|
459
448
|
quantity?: number | undefined;
|
|
460
|
-
line_total?: number | undefined;
|
|
461
449
|
}[] | undefined;
|
|
462
450
|
} | undefined;
|
|
463
451
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
464
|
-
|
|
465
|
-
|
|
452
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
453
|
+
partyable_id?: number | undefined;
|
|
466
454
|
currency_code?: string | undefined;
|
|
467
|
-
|
|
468
|
-
fulfillment_status?:
|
|
455
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
456
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
469
457
|
order_url?: string | undefined;
|
|
470
458
|
notes?: string | undefined;
|
|
471
|
-
|
|
459
|
+
closed_from_opportunity_id?: number | undefined;
|
|
460
|
+
representative_id?: number | undefined;
|
|
461
|
+
partyable_name?: string | undefined;
|
|
462
|
+
total_amount?: number | undefined;
|
|
472
463
|
}>;
|
|
473
464
|
}, "strip", z.ZodTypeAny, {
|
|
474
465
|
payload: {
|
|
@@ -480,21 +471,23 @@ export declare const UpsertOrderResponseSchema: z.ZodObject<{
|
|
|
480
471
|
name?: string | undefined;
|
|
481
472
|
metadata?: {
|
|
482
473
|
line_items?: {
|
|
483
|
-
|
|
484
|
-
|
|
474
|
+
name?: string | undefined;
|
|
475
|
+
unit_price?: number | undefined;
|
|
485
476
|
quantity?: number | undefined;
|
|
486
|
-
line_total?: number | undefined;
|
|
487
477
|
}[] | undefined;
|
|
488
478
|
} | undefined;
|
|
489
479
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
490
|
-
|
|
491
|
-
|
|
480
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
481
|
+
partyable_id?: number | undefined;
|
|
492
482
|
currency_code?: string | undefined;
|
|
493
|
-
|
|
494
|
-
fulfillment_status?:
|
|
483
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
484
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
495
485
|
order_url?: string | undefined;
|
|
496
486
|
notes?: string | undefined;
|
|
497
|
-
|
|
487
|
+
closed_from_opportunity_id?: number | undefined;
|
|
488
|
+
representative_id?: number | undefined;
|
|
489
|
+
partyable_name?: string | undefined;
|
|
490
|
+
total_amount?: number | undefined;
|
|
498
491
|
};
|
|
499
492
|
}, {
|
|
500
493
|
payload: {
|
|
@@ -506,21 +499,23 @@ export declare const UpsertOrderResponseSchema: z.ZodObject<{
|
|
|
506
499
|
name?: string | undefined;
|
|
507
500
|
metadata?: {
|
|
508
501
|
line_items?: {
|
|
509
|
-
|
|
510
|
-
|
|
502
|
+
name?: string | undefined;
|
|
503
|
+
unit_price?: number | undefined;
|
|
511
504
|
quantity?: number | undefined;
|
|
512
|
-
line_total?: number | undefined;
|
|
513
505
|
}[] | undefined;
|
|
514
506
|
} | undefined;
|
|
515
507
|
custom_attributes?: Record<string, unknown> | undefined;
|
|
516
|
-
|
|
517
|
-
|
|
508
|
+
partyable_type?: "Contact" | "Company" | undefined;
|
|
509
|
+
partyable_id?: number | undefined;
|
|
518
510
|
currency_code?: string | undefined;
|
|
519
|
-
|
|
520
|
-
fulfillment_status?:
|
|
511
|
+
payment_status?: "pending" | "authorized" | "paid" | "partially_refunded" | "refunded" | "failed" | "partially_paid" | undefined;
|
|
512
|
+
fulfillment_status?: "unfulfilled" | "partially_fulfilled" | "fulfilled" | "returned" | undefined;
|
|
521
513
|
order_url?: string | undefined;
|
|
522
514
|
notes?: string | undefined;
|
|
523
|
-
|
|
515
|
+
closed_from_opportunity_id?: number | undefined;
|
|
516
|
+
representative_id?: number | undefined;
|
|
517
|
+
partyable_name?: string | undefined;
|
|
518
|
+
total_amount?: number | undefined;
|
|
524
519
|
};
|
|
525
520
|
}>;
|
|
526
521
|
export declare const ListOrdersParamsSchema: z.ZodObject<{
|
|
@@ -529,17 +524,48 @@ export declare const ListOrdersParamsSchema: z.ZodObject<{
|
|
|
529
524
|
since: z.ZodOptional<z.ZodString>;
|
|
530
525
|
until: z.ZodOptional<z.ZodString>;
|
|
531
526
|
sort: z.ZodOptional<z.ZodString>;
|
|
532
|
-
|
|
527
|
+
/** Filter conditions array */
|
|
528
|
+
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
529
|
+
attribute_key: z.ZodString;
|
|
530
|
+
filter_operator: z.ZodEnum<["equal_to", "not_equal_to", "contains", "does_not_contain", "matches_phrase", "does_not_match_phrase", "starts_with", "is_present", "is_not_present", "is_greater_than", "is_less_than", "date_is", "date_is_before", "date_is_after", "date_is_between", "date_within_last_n", "date_within_next_n", "date_more_than_n_ago", "date_is_n_from_today", "in", "not_in"]>;
|
|
531
|
+
values: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">]>;
|
|
532
|
+
query_operator: z.ZodEnum<["and", "or"]>;
|
|
533
|
+
attribute_model: z.ZodOptional<z.ZodEnum<["standard", "customAttributes"]>>;
|
|
534
|
+
}, "strip", z.ZodTypeAny, {
|
|
535
|
+
values: string | number | boolean | (string | number)[];
|
|
536
|
+
attribute_key: string;
|
|
537
|
+
filter_operator: "equal_to" | "not_equal_to" | "contains" | "does_not_contain" | "matches_phrase" | "does_not_match_phrase" | "starts_with" | "is_present" | "is_not_present" | "is_greater_than" | "is_less_than" | "date_is" | "date_is_before" | "date_is_after" | "date_is_between" | "date_within_last_n" | "date_within_next_n" | "date_more_than_n_ago" | "date_is_n_from_today" | "in" | "not_in";
|
|
538
|
+
query_operator: "and" | "or";
|
|
539
|
+
attribute_model?: "standard" | "customAttributes" | undefined;
|
|
540
|
+
}, {
|
|
541
|
+
values: string | number | boolean | (string | number)[];
|
|
542
|
+
attribute_key: string;
|
|
543
|
+
filter_operator: "equal_to" | "not_equal_to" | "contains" | "does_not_contain" | "matches_phrase" | "does_not_match_phrase" | "starts_with" | "is_present" | "is_not_present" | "is_greater_than" | "is_less_than" | "date_is" | "date_is_before" | "date_is_after" | "date_is_between" | "date_within_last_n" | "date_within_next_n" | "date_more_than_n_ago" | "date_is_n_from_today" | "in" | "not_in";
|
|
544
|
+
query_operator: "and" | "or";
|
|
545
|
+
attribute_model?: "standard" | "customAttributes" | undefined;
|
|
546
|
+
}>, "many">>;
|
|
533
547
|
}, "strip", z.ZodTypeAny, {
|
|
534
548
|
page: number;
|
|
535
549
|
per_page: number;
|
|
536
550
|
sort?: string | undefined;
|
|
537
|
-
|
|
551
|
+
filters?: {
|
|
552
|
+
values: string | number | boolean | (string | number)[];
|
|
553
|
+
attribute_key: string;
|
|
554
|
+
filter_operator: "equal_to" | "not_equal_to" | "contains" | "does_not_contain" | "matches_phrase" | "does_not_match_phrase" | "starts_with" | "is_present" | "is_not_present" | "is_greater_than" | "is_less_than" | "date_is" | "date_is_before" | "date_is_after" | "date_is_between" | "date_within_last_n" | "date_within_next_n" | "date_more_than_n_ago" | "date_is_n_from_today" | "in" | "not_in";
|
|
555
|
+
query_operator: "and" | "or";
|
|
556
|
+
attribute_model?: "standard" | "customAttributes" | undefined;
|
|
557
|
+
}[] | undefined;
|
|
538
558
|
since?: string | undefined;
|
|
539
559
|
until?: string | undefined;
|
|
540
560
|
}, {
|
|
541
561
|
sort?: string | undefined;
|
|
542
|
-
|
|
562
|
+
filters?: {
|
|
563
|
+
values: string | number | boolean | (string | number)[];
|
|
564
|
+
attribute_key: string;
|
|
565
|
+
filter_operator: "equal_to" | "not_equal_to" | "contains" | "does_not_contain" | "matches_phrase" | "does_not_match_phrase" | "starts_with" | "is_present" | "is_not_present" | "is_greater_than" | "is_less_than" | "date_is" | "date_is_before" | "date_is_after" | "date_is_between" | "date_within_last_n" | "date_within_next_n" | "date_more_than_n_ago" | "date_is_n_from_today" | "in" | "not_in";
|
|
566
|
+
query_operator: "and" | "or";
|
|
567
|
+
attribute_model?: "standard" | "customAttributes" | undefined;
|
|
568
|
+
}[] | undefined;
|
|
543
569
|
page?: number | undefined;
|
|
544
570
|
per_page?: number | undefined;
|
|
545
571
|
since?: string | undefined;
|
|
@@ -604,9 +630,16 @@ export declare const ListOrdersResponseSchema: z.ZodObject<{
|
|
|
604
630
|
};
|
|
605
631
|
data: Record<string, unknown>[];
|
|
606
632
|
}>;
|
|
633
|
+
/**
|
|
634
|
+
* Order filter attribute keys (standard fields)
|
|
635
|
+
*/
|
|
636
|
+
export type OrderFilterAttribute = "name" | "company_name" | "contact_name" | "payment_status" | "fulfillment_status" | "total_amount" | "currency_code" | "source" | "created_at" | "updated_at" | "line_item_part_number" | "line_item_description" | (string & {});
|
|
607
637
|
/**
|
|
608
638
|
* TypeScript Types (inferred from Zod schemas)
|
|
609
639
|
*/
|
|
640
|
+
export type PartyableType = z.infer<typeof PartyableTypeSchema>;
|
|
641
|
+
export type PaymentStatus = z.infer<typeof PaymentStatusSchema>;
|
|
642
|
+
export type FulfillmentStatus = z.infer<typeof FulfillmentStatusSchema>;
|
|
610
643
|
export type Order = z.infer<typeof OrderSchema>;
|
|
611
644
|
export type ListOrdersParams = z.infer<typeof ListOrdersParamsSchema>;
|
|
612
645
|
export type OrdersMeta = z.infer<typeof OrdersMetaSchema>;
|