restale 0.1.0 → 0.1.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.mts +880 -1
- package/dist/index.mjs +310 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3,6 +3,430 @@ import { ContractRouterClient, InferContractRouterInputs, InferContractRouterOut
|
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import * as _$zod_v4_core0 from "zod/v4/core";
|
|
5
5
|
|
|
6
|
+
//#region src/customers/addresses/schemas.d.ts
|
|
7
|
+
declare const addressSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodUUID;
|
|
9
|
+
label: z.ZodNullable<z.ZodString>;
|
|
10
|
+
recipientName: z.ZodString;
|
|
11
|
+
phone: z.ZodString;
|
|
12
|
+
line1: z.ZodString;
|
|
13
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
14
|
+
city: z.ZodString;
|
|
15
|
+
state: z.ZodString;
|
|
16
|
+
postalCode: z.ZodString;
|
|
17
|
+
country: z.ZodString;
|
|
18
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
19
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
20
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
21
|
+
isDefault: z.ZodBoolean;
|
|
22
|
+
createdAt: z.ZodString;
|
|
23
|
+
updatedAt: z.ZodString;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
declare const addressInputSchema: z.ZodObject<{
|
|
26
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
recipientName: z.ZodString;
|
|
28
|
+
phone: z.ZodString;
|
|
29
|
+
line1: z.ZodString;
|
|
30
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
31
|
+
city: z.ZodString;
|
|
32
|
+
state: z.ZodString;
|
|
33
|
+
postalCode: z.ZodString;
|
|
34
|
+
country: z.ZodString;
|
|
35
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>;
|
|
36
|
+
lng: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>;
|
|
37
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
declare const addressUpdateInputSchema: z.ZodObject<{
|
|
41
|
+
label: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
42
|
+
recipientName: z.ZodOptional<z.ZodString>;
|
|
43
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
44
|
+
line1: z.ZodOptional<z.ZodString>;
|
|
45
|
+
line2: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
46
|
+
city: z.ZodOptional<z.ZodString>;
|
|
47
|
+
state: z.ZodOptional<z.ZodString>;
|
|
48
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
49
|
+
country: z.ZodOptional<z.ZodString>;
|
|
50
|
+
lat: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>>;
|
|
51
|
+
lng: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>>;
|
|
52
|
+
notes: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
53
|
+
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
type Address = z.infer<typeof addressSchema>;
|
|
56
|
+
type AddressInput = z.infer<typeof addressInputSchema>;
|
|
57
|
+
type AddressUpdateInput = z.infer<typeof addressUpdateInputSchema>;
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/customers/schemas.d.ts
|
|
60
|
+
declare const customerSchema: z.ZodObject<{
|
|
61
|
+
id: z.ZodString;
|
|
62
|
+
email: z.ZodEmail;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
emailVerified: z.ZodBoolean;
|
|
65
|
+
image: z.ZodNullable<z.ZodString>;
|
|
66
|
+
createdAt: z.ZodString;
|
|
67
|
+
updatedAt: z.ZodString;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
declare const otpTokenResponseSchema: z.ZodObject<{
|
|
70
|
+
token: z.ZodString;
|
|
71
|
+
expiresAt: z.ZodString;
|
|
72
|
+
customer: z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
email: z.ZodEmail;
|
|
75
|
+
name: z.ZodString;
|
|
76
|
+
emailVerified: z.ZodBoolean;
|
|
77
|
+
image: z.ZodNullable<z.ZodString>;
|
|
78
|
+
createdAt: z.ZodString;
|
|
79
|
+
updatedAt: z.ZodString;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
declare const okSchema: z.ZodObject<{
|
|
83
|
+
ok: z.ZodLiteral<true>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
type Customer = z.infer<typeof customerSchema>;
|
|
86
|
+
type OtpTokenResponse = z.infer<typeof otpTokenResponseSchema>;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/orders/schemas.d.ts
|
|
89
|
+
declare const orderStatusSchema: z.ZodEnum<{
|
|
90
|
+
pending: "pending";
|
|
91
|
+
confirmed: "confirmed";
|
|
92
|
+
preparing: "preparing";
|
|
93
|
+
out_for_delivery: "out_for_delivery";
|
|
94
|
+
completed: "completed";
|
|
95
|
+
cancelled: "cancelled";
|
|
96
|
+
}>;
|
|
97
|
+
declare const orderPaymentStatusSchema: z.ZodEnum<{
|
|
98
|
+
pending: "pending";
|
|
99
|
+
paid: "paid";
|
|
100
|
+
refunded: "refunded";
|
|
101
|
+
failed: "failed";
|
|
102
|
+
}>;
|
|
103
|
+
declare const orderChannelSchema: z.ZodEnum<{
|
|
104
|
+
storefront: "storefront";
|
|
105
|
+
pos: "pos";
|
|
106
|
+
api: "api";
|
|
107
|
+
}>;
|
|
108
|
+
declare const orderFulfillmentTypeSchema: z.ZodEnum<{
|
|
109
|
+
delivery: "delivery";
|
|
110
|
+
pickup: "pickup";
|
|
111
|
+
dine_in: "dine_in";
|
|
112
|
+
}>;
|
|
113
|
+
declare const orderPaymentProviderSchema: z.ZodEnum<{
|
|
114
|
+
cod: "cod";
|
|
115
|
+
}>;
|
|
116
|
+
declare const cartVariantModifierSchema: z.ZodObject<{
|
|
117
|
+
modifierId: z.ZodUUID;
|
|
118
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
declare const cartVariantItemSchema: z.ZodObject<{
|
|
121
|
+
kind: z.ZodLiteral<"variant">;
|
|
122
|
+
variantId: z.ZodUUID;
|
|
123
|
+
quantity: z.ZodNumber;
|
|
124
|
+
modifiers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
125
|
+
modifierId: z.ZodUUID;
|
|
126
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
127
|
+
}, z.core.$strip>>>;
|
|
128
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
declare const cartDealChoiceSchema: z.ZodObject<{
|
|
131
|
+
dealChoiceGroupId: z.ZodUUID;
|
|
132
|
+
variantId: z.ZodUUID;
|
|
133
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
declare const cartDealItemSchema: z.ZodObject<{
|
|
136
|
+
kind: z.ZodLiteral<"deal">;
|
|
137
|
+
dealId: z.ZodUUID;
|
|
138
|
+
quantity: z.ZodNumber;
|
|
139
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
140
|
+
dealChoiceGroupId: z.ZodUUID;
|
|
141
|
+
variantId: z.ZodUUID;
|
|
142
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
143
|
+
}, z.core.$strip>>>;
|
|
144
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
declare const cartItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
147
|
+
kind: z.ZodLiteral<"variant">;
|
|
148
|
+
variantId: z.ZodUUID;
|
|
149
|
+
quantity: z.ZodNumber;
|
|
150
|
+
modifiers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
151
|
+
modifierId: z.ZodUUID;
|
|
152
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
153
|
+
}, z.core.$strip>>>;
|
|
154
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
155
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
156
|
+
kind: z.ZodLiteral<"deal">;
|
|
157
|
+
dealId: z.ZodUUID;
|
|
158
|
+
quantity: z.ZodNumber;
|
|
159
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
160
|
+
dealChoiceGroupId: z.ZodUUID;
|
|
161
|
+
variantId: z.ZodUUID;
|
|
162
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
163
|
+
}, z.core.$strip>>>;
|
|
164
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
165
|
+
}, z.core.$strip>], "kind">;
|
|
166
|
+
declare const createOrderInputSchema: z.ZodObject<{
|
|
167
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
168
|
+
kind: z.ZodLiteral<"variant">;
|
|
169
|
+
variantId: z.ZodUUID;
|
|
170
|
+
quantity: z.ZodNumber;
|
|
171
|
+
modifiers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
172
|
+
modifierId: z.ZodUUID;
|
|
173
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
174
|
+
}, z.core.$strip>>>;
|
|
175
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
177
|
+
kind: z.ZodLiteral<"deal">;
|
|
178
|
+
dealId: z.ZodUUID;
|
|
179
|
+
quantity: z.ZodNumber;
|
|
180
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
181
|
+
dealChoiceGroupId: z.ZodUUID;
|
|
182
|
+
variantId: z.ZodUUID;
|
|
183
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
184
|
+
}, z.core.$strip>>>;
|
|
185
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
186
|
+
}, z.core.$strip>], "kind">>;
|
|
187
|
+
paymentMethodId: z.ZodUUID;
|
|
188
|
+
saveAddress: z.ZodOptional<z.ZodBoolean>;
|
|
189
|
+
contactName: z.ZodString;
|
|
190
|
+
contactPhone: z.ZodString;
|
|
191
|
+
contactEmail: z.ZodEmail;
|
|
192
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
193
|
+
customerAddressId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
194
|
+
address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
195
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
196
|
+
recipientName: z.ZodString;
|
|
197
|
+
phone: z.ZodString;
|
|
198
|
+
line1: z.ZodString;
|
|
199
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
200
|
+
city: z.ZodString;
|
|
201
|
+
state: z.ZodString;
|
|
202
|
+
postalCode: z.ZodString;
|
|
203
|
+
country: z.ZodString;
|
|
204
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>;
|
|
205
|
+
lng: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>;
|
|
206
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
207
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
208
|
+
}, z.core.$strip>>>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
declare const orderItemModifierOutputSchema: z.ZodObject<{
|
|
211
|
+
id: z.ZodUUID;
|
|
212
|
+
modifierId: z.ZodNullable<z.ZodUUID>;
|
|
213
|
+
modifierGroupId: z.ZodNullable<z.ZodUUID>;
|
|
214
|
+
groupName: z.ZodString;
|
|
215
|
+
modifierName: z.ZodString;
|
|
216
|
+
priceDelta: z.ZodString;
|
|
217
|
+
quantity: z.ZodNumber;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
declare const orderItemDealPartOutputSchema: z.ZodObject<{
|
|
220
|
+
id: z.ZodUUID;
|
|
221
|
+
kind: z.ZodEnum<{
|
|
222
|
+
included: "included";
|
|
223
|
+
chosen: "chosen";
|
|
224
|
+
}>;
|
|
225
|
+
dealIncludedItemId: z.ZodNullable<z.ZodUUID>;
|
|
226
|
+
dealChoiceGroupId: z.ZodNullable<z.ZodUUID>;
|
|
227
|
+
variantId: z.ZodNullable<z.ZodUUID>;
|
|
228
|
+
groupName: z.ZodNullable<z.ZodString>;
|
|
229
|
+
variantName: z.ZodString;
|
|
230
|
+
priceDelta: z.ZodString;
|
|
231
|
+
quantity: z.ZodNumber;
|
|
232
|
+
}, z.core.$strip>;
|
|
233
|
+
declare const orderItemOutputSchema: z.ZodObject<{
|
|
234
|
+
id: z.ZodUUID;
|
|
235
|
+
kind: z.ZodEnum<{
|
|
236
|
+
variant: "variant";
|
|
237
|
+
deal: "deal";
|
|
238
|
+
}>;
|
|
239
|
+
variantId: z.ZodNullable<z.ZodUUID>;
|
|
240
|
+
dealId: z.ZodNullable<z.ZodUUID>;
|
|
241
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
242
|
+
variantName: z.ZodNullable<z.ZodString>;
|
|
243
|
+
dealName: z.ZodNullable<z.ZodString>;
|
|
244
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
245
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
246
|
+
unitPrice: z.ZodString;
|
|
247
|
+
quantity: z.ZodNumber;
|
|
248
|
+
modifiersTotal: z.ZodString;
|
|
249
|
+
lineSubtotal: z.ZodString;
|
|
250
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
251
|
+
modifiers: z.ZodArray<z.ZodObject<{
|
|
252
|
+
id: z.ZodUUID;
|
|
253
|
+
modifierId: z.ZodNullable<z.ZodUUID>;
|
|
254
|
+
modifierGroupId: z.ZodNullable<z.ZodUUID>;
|
|
255
|
+
groupName: z.ZodString;
|
|
256
|
+
modifierName: z.ZodString;
|
|
257
|
+
priceDelta: z.ZodString;
|
|
258
|
+
quantity: z.ZodNumber;
|
|
259
|
+
}, z.core.$strip>>;
|
|
260
|
+
dealParts: z.ZodArray<z.ZodObject<{
|
|
261
|
+
id: z.ZodUUID;
|
|
262
|
+
kind: z.ZodEnum<{
|
|
263
|
+
included: "included";
|
|
264
|
+
chosen: "chosen";
|
|
265
|
+
}>;
|
|
266
|
+
dealIncludedItemId: z.ZodNullable<z.ZodUUID>;
|
|
267
|
+
dealChoiceGroupId: z.ZodNullable<z.ZodUUID>;
|
|
268
|
+
variantId: z.ZodNullable<z.ZodUUID>;
|
|
269
|
+
groupName: z.ZodNullable<z.ZodString>;
|
|
270
|
+
variantName: z.ZodString;
|
|
271
|
+
priceDelta: z.ZodString;
|
|
272
|
+
quantity: z.ZodNumber;
|
|
273
|
+
}, z.core.$strip>>;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
declare const orderDeliveryOutputSchema: z.ZodObject<{
|
|
276
|
+
customerAddressId: z.ZodNullable<z.ZodUUID>;
|
|
277
|
+
recipientName: z.ZodString;
|
|
278
|
+
phone: z.ZodString;
|
|
279
|
+
line1: z.ZodString;
|
|
280
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
281
|
+
city: z.ZodString;
|
|
282
|
+
state: z.ZodString;
|
|
283
|
+
postalCode: z.ZodString;
|
|
284
|
+
country: z.ZodString;
|
|
285
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
286
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
287
|
+
deliveryNotes: z.ZodNullable<z.ZodString>;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
declare const orderSummarySchema: z.ZodObject<{
|
|
290
|
+
id: z.ZodUUID;
|
|
291
|
+
orderNumber: z.ZodString;
|
|
292
|
+
status: z.ZodEnum<{
|
|
293
|
+
pending: "pending";
|
|
294
|
+
confirmed: "confirmed";
|
|
295
|
+
preparing: "preparing";
|
|
296
|
+
out_for_delivery: "out_for_delivery";
|
|
297
|
+
completed: "completed";
|
|
298
|
+
cancelled: "cancelled";
|
|
299
|
+
}>;
|
|
300
|
+
paymentStatus: z.ZodEnum<{
|
|
301
|
+
pending: "pending";
|
|
302
|
+
paid: "paid";
|
|
303
|
+
refunded: "refunded";
|
|
304
|
+
failed: "failed";
|
|
305
|
+
}>;
|
|
306
|
+
fulfillmentType: z.ZodEnum<{
|
|
307
|
+
delivery: "delivery";
|
|
308
|
+
pickup: "pickup";
|
|
309
|
+
dine_in: "dine_in";
|
|
310
|
+
}>;
|
|
311
|
+
subtotal: z.ZodString;
|
|
312
|
+
deliveryFee: z.ZodString;
|
|
313
|
+
grandTotal: z.ZodString;
|
|
314
|
+
currency: z.ZodString;
|
|
315
|
+
placedAt: z.ZodString;
|
|
316
|
+
createdAt: z.ZodString;
|
|
317
|
+
}, z.core.$strip>;
|
|
318
|
+
declare const orderDetailSchema: z.ZodObject<{
|
|
319
|
+
id: z.ZodUUID;
|
|
320
|
+
orderNumber: z.ZodString;
|
|
321
|
+
status: z.ZodEnum<{
|
|
322
|
+
pending: "pending";
|
|
323
|
+
confirmed: "confirmed";
|
|
324
|
+
preparing: "preparing";
|
|
325
|
+
out_for_delivery: "out_for_delivery";
|
|
326
|
+
completed: "completed";
|
|
327
|
+
cancelled: "cancelled";
|
|
328
|
+
}>;
|
|
329
|
+
paymentStatus: z.ZodEnum<{
|
|
330
|
+
pending: "pending";
|
|
331
|
+
paid: "paid";
|
|
332
|
+
refunded: "refunded";
|
|
333
|
+
failed: "failed";
|
|
334
|
+
}>;
|
|
335
|
+
fulfillmentType: z.ZodEnum<{
|
|
336
|
+
delivery: "delivery";
|
|
337
|
+
pickup: "pickup";
|
|
338
|
+
dine_in: "dine_in";
|
|
339
|
+
}>;
|
|
340
|
+
subtotal: z.ZodString;
|
|
341
|
+
deliveryFee: z.ZodString;
|
|
342
|
+
grandTotal: z.ZodString;
|
|
343
|
+
currency: z.ZodString;
|
|
344
|
+
placedAt: z.ZodString;
|
|
345
|
+
createdAt: z.ZodString;
|
|
346
|
+
channel: z.ZodEnum<{
|
|
347
|
+
storefront: "storefront";
|
|
348
|
+
pos: "pos";
|
|
349
|
+
api: "api";
|
|
350
|
+
}>;
|
|
351
|
+
paymentProvider: z.ZodEnum<{
|
|
352
|
+
cod: "cod";
|
|
353
|
+
}>;
|
|
354
|
+
paymentMethodId: z.ZodNullable<z.ZodUUID>;
|
|
355
|
+
contactName: z.ZodString;
|
|
356
|
+
contactPhone: z.ZodString;
|
|
357
|
+
contactEmail: z.ZodNullable<z.ZodString>;
|
|
358
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
359
|
+
confirmedAt: z.ZodNullable<z.ZodString>;
|
|
360
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
361
|
+
cancelledAt: z.ZodNullable<z.ZodString>;
|
|
362
|
+
delivery: z.ZodNullable<z.ZodObject<{
|
|
363
|
+
customerAddressId: z.ZodNullable<z.ZodUUID>;
|
|
364
|
+
recipientName: z.ZodString;
|
|
365
|
+
phone: z.ZodString;
|
|
366
|
+
line1: z.ZodString;
|
|
367
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
368
|
+
city: z.ZodString;
|
|
369
|
+
state: z.ZodString;
|
|
370
|
+
postalCode: z.ZodString;
|
|
371
|
+
country: z.ZodString;
|
|
372
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
373
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
374
|
+
deliveryNotes: z.ZodNullable<z.ZodString>;
|
|
375
|
+
}, z.core.$strip>>;
|
|
376
|
+
items: z.ZodArray<z.ZodObject<{
|
|
377
|
+
id: z.ZodUUID;
|
|
378
|
+
kind: z.ZodEnum<{
|
|
379
|
+
variant: "variant";
|
|
380
|
+
deal: "deal";
|
|
381
|
+
}>;
|
|
382
|
+
variantId: z.ZodNullable<z.ZodUUID>;
|
|
383
|
+
dealId: z.ZodNullable<z.ZodUUID>;
|
|
384
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
385
|
+
variantName: z.ZodNullable<z.ZodString>;
|
|
386
|
+
dealName: z.ZodNullable<z.ZodString>;
|
|
387
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
388
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
389
|
+
unitPrice: z.ZodString;
|
|
390
|
+
quantity: z.ZodNumber;
|
|
391
|
+
modifiersTotal: z.ZodString;
|
|
392
|
+
lineSubtotal: z.ZodString;
|
|
393
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
394
|
+
modifiers: z.ZodArray<z.ZodObject<{
|
|
395
|
+
id: z.ZodUUID;
|
|
396
|
+
modifierId: z.ZodNullable<z.ZodUUID>;
|
|
397
|
+
modifierGroupId: z.ZodNullable<z.ZodUUID>;
|
|
398
|
+
groupName: z.ZodString;
|
|
399
|
+
modifierName: z.ZodString;
|
|
400
|
+
priceDelta: z.ZodString;
|
|
401
|
+
quantity: z.ZodNumber;
|
|
402
|
+
}, z.core.$strip>>;
|
|
403
|
+
dealParts: z.ZodArray<z.ZodObject<{
|
|
404
|
+
id: z.ZodUUID;
|
|
405
|
+
kind: z.ZodEnum<{
|
|
406
|
+
included: "included";
|
|
407
|
+
chosen: "chosen";
|
|
408
|
+
}>;
|
|
409
|
+
dealIncludedItemId: z.ZodNullable<z.ZodUUID>;
|
|
410
|
+
dealChoiceGroupId: z.ZodNullable<z.ZodUUID>;
|
|
411
|
+
variantId: z.ZodNullable<z.ZodUUID>;
|
|
412
|
+
groupName: z.ZodNullable<z.ZodString>;
|
|
413
|
+
variantName: z.ZodString;
|
|
414
|
+
priceDelta: z.ZodString;
|
|
415
|
+
quantity: z.ZodNumber;
|
|
416
|
+
}, z.core.$strip>>;
|
|
417
|
+
}, z.core.$strip>>;
|
|
418
|
+
}, z.core.$strip>;
|
|
419
|
+
type OrderStatus = z.infer<typeof orderStatusSchema>;
|
|
420
|
+
type OrderPaymentStatus = z.infer<typeof orderPaymentStatusSchema>;
|
|
421
|
+
type OrderFulfillmentType = z.infer<typeof orderFulfillmentTypeSchema>;
|
|
422
|
+
type CartVariantItem = z.infer<typeof cartVariantItemSchema>;
|
|
423
|
+
type CartDealItem = z.infer<typeof cartDealItemSchema>;
|
|
424
|
+
type CartItem = z.infer<typeof cartItemSchema>;
|
|
425
|
+
type CreateOrderInput = z.infer<typeof createOrderInputSchema>;
|
|
426
|
+
type OrderSummary = z.infer<typeof orderSummarySchema>;
|
|
427
|
+
type OrderDetail = z.infer<typeof orderDetailSchema>;
|
|
428
|
+
type OrderItemOutput = z.infer<typeof orderItemOutputSchema>;
|
|
429
|
+
//#endregion
|
|
6
430
|
//#region src/products/schemas.d.ts
|
|
7
431
|
declare const productStatusSchema: z.ZodEnum<{
|
|
8
432
|
draft: "draft";
|
|
@@ -203,6 +627,459 @@ type ProductDetails = z.infer<typeof productDetailsSchema>;
|
|
|
203
627
|
//#endregion
|
|
204
628
|
//#region src/index.d.ts
|
|
205
629
|
declare const contract: {
|
|
630
|
+
customers: {
|
|
631
|
+
otp: {
|
|
632
|
+
request: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
633
|
+
email: z.ZodEmail;
|
|
634
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
635
|
+
ok: z.ZodLiteral<true>;
|
|
636
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
637
|
+
verify: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
638
|
+
email: z.ZodEmail;
|
|
639
|
+
otp: z.ZodString;
|
|
640
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
641
|
+
token: z.ZodString;
|
|
642
|
+
expiresAt: z.ZodString;
|
|
643
|
+
customer: z.ZodObject<{
|
|
644
|
+
id: z.ZodString;
|
|
645
|
+
email: z.ZodEmail;
|
|
646
|
+
name: z.ZodString;
|
|
647
|
+
emailVerified: z.ZodBoolean;
|
|
648
|
+
image: z.ZodNullable<z.ZodString>;
|
|
649
|
+
createdAt: z.ZodString;
|
|
650
|
+
updatedAt: z.ZodString;
|
|
651
|
+
}, _$zod_v4_core0.$strip>;
|
|
652
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
653
|
+
};
|
|
654
|
+
logout: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{}, _$zod_v4_core0.$strip>>, z.ZodObject<{
|
|
655
|
+
ok: z.ZodLiteral<true>;
|
|
656
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
657
|
+
me: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{}, _$zod_v4_core0.$strip>>, z.ZodObject<{
|
|
658
|
+
id: z.ZodString;
|
|
659
|
+
email: z.ZodEmail;
|
|
660
|
+
name: z.ZodString;
|
|
661
|
+
emailVerified: z.ZodBoolean;
|
|
662
|
+
image: z.ZodNullable<z.ZodString>;
|
|
663
|
+
createdAt: z.ZodString;
|
|
664
|
+
updatedAt: z.ZodString;
|
|
665
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
666
|
+
addresses: {
|
|
667
|
+
list: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{}, _$zod_v4_core0.$strip>>, z.ZodArray<z.ZodObject<{
|
|
668
|
+
id: z.ZodUUID;
|
|
669
|
+
label: z.ZodNullable<z.ZodString>;
|
|
670
|
+
recipientName: z.ZodString;
|
|
671
|
+
phone: z.ZodString;
|
|
672
|
+
line1: z.ZodString;
|
|
673
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
674
|
+
city: z.ZodString;
|
|
675
|
+
state: z.ZodString;
|
|
676
|
+
postalCode: z.ZodString;
|
|
677
|
+
country: z.ZodString;
|
|
678
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
679
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
680
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
681
|
+
isDefault: z.ZodBoolean;
|
|
682
|
+
createdAt: z.ZodString;
|
|
683
|
+
updatedAt: z.ZodString;
|
|
684
|
+
}, _$zod_v4_core0.$strip>>, Record<never, never>, Record<never, never>>;
|
|
685
|
+
get: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
686
|
+
id: z.ZodUUID;
|
|
687
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
688
|
+
id: z.ZodUUID;
|
|
689
|
+
label: z.ZodNullable<z.ZodString>;
|
|
690
|
+
recipientName: z.ZodString;
|
|
691
|
+
phone: z.ZodString;
|
|
692
|
+
line1: z.ZodString;
|
|
693
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
694
|
+
city: z.ZodString;
|
|
695
|
+
state: z.ZodString;
|
|
696
|
+
postalCode: z.ZodString;
|
|
697
|
+
country: z.ZodString;
|
|
698
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
699
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
700
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
701
|
+
isDefault: z.ZodBoolean;
|
|
702
|
+
createdAt: z.ZodString;
|
|
703
|
+
updatedAt: z.ZodString;
|
|
704
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
705
|
+
create: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
706
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
707
|
+
recipientName: z.ZodString;
|
|
708
|
+
phone: z.ZodString;
|
|
709
|
+
line1: z.ZodString;
|
|
710
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
711
|
+
city: z.ZodString;
|
|
712
|
+
state: z.ZodString;
|
|
713
|
+
postalCode: z.ZodString;
|
|
714
|
+
country: z.ZodString;
|
|
715
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>;
|
|
716
|
+
lng: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>;
|
|
717
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
718
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
719
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
720
|
+
id: z.ZodUUID;
|
|
721
|
+
label: z.ZodNullable<z.ZodString>;
|
|
722
|
+
recipientName: z.ZodString;
|
|
723
|
+
phone: z.ZodString;
|
|
724
|
+
line1: z.ZodString;
|
|
725
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
726
|
+
city: z.ZodString;
|
|
727
|
+
state: z.ZodString;
|
|
728
|
+
postalCode: z.ZodString;
|
|
729
|
+
country: z.ZodString;
|
|
730
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
731
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
732
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
733
|
+
isDefault: z.ZodBoolean;
|
|
734
|
+
createdAt: z.ZodString;
|
|
735
|
+
updatedAt: z.ZodString;
|
|
736
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
737
|
+
update: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
738
|
+
id: z.ZodUUID;
|
|
739
|
+
data: z.ZodObject<{
|
|
740
|
+
label: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
741
|
+
recipientName: z.ZodOptional<z.ZodString>;
|
|
742
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
743
|
+
line1: z.ZodOptional<z.ZodString>;
|
|
744
|
+
line2: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
745
|
+
city: z.ZodOptional<z.ZodString>;
|
|
746
|
+
state: z.ZodOptional<z.ZodString>;
|
|
747
|
+
postalCode: z.ZodOptional<z.ZodString>;
|
|
748
|
+
country: z.ZodOptional<z.ZodString>;
|
|
749
|
+
lat: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>>;
|
|
750
|
+
lng: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>>;
|
|
751
|
+
notes: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
752
|
+
isDefault: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
753
|
+
}, _$zod_v4_core0.$strip>;
|
|
754
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
755
|
+
id: z.ZodUUID;
|
|
756
|
+
label: z.ZodNullable<z.ZodString>;
|
|
757
|
+
recipientName: z.ZodString;
|
|
758
|
+
phone: z.ZodString;
|
|
759
|
+
line1: z.ZodString;
|
|
760
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
761
|
+
city: z.ZodString;
|
|
762
|
+
state: z.ZodString;
|
|
763
|
+
postalCode: z.ZodString;
|
|
764
|
+
country: z.ZodString;
|
|
765
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
766
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
767
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
768
|
+
isDefault: z.ZodBoolean;
|
|
769
|
+
createdAt: z.ZodString;
|
|
770
|
+
updatedAt: z.ZodString;
|
|
771
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
772
|
+
delete: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
773
|
+
id: z.ZodUUID;
|
|
774
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
775
|
+
ok: z.ZodLiteral<true>;
|
|
776
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
777
|
+
setDefault: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
778
|
+
id: z.ZodUUID;
|
|
779
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
780
|
+
id: z.ZodUUID;
|
|
781
|
+
label: z.ZodNullable<z.ZodString>;
|
|
782
|
+
recipientName: z.ZodString;
|
|
783
|
+
phone: z.ZodString;
|
|
784
|
+
line1: z.ZodString;
|
|
785
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
786
|
+
city: z.ZodString;
|
|
787
|
+
state: z.ZodString;
|
|
788
|
+
postalCode: z.ZodString;
|
|
789
|
+
country: z.ZodString;
|
|
790
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
791
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
792
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
793
|
+
isDefault: z.ZodBoolean;
|
|
794
|
+
createdAt: z.ZodString;
|
|
795
|
+
updatedAt: z.ZodString;
|
|
796
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
797
|
+
};
|
|
798
|
+
};
|
|
799
|
+
orders: {
|
|
800
|
+
create: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
801
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
802
|
+
kind: z.ZodLiteral<"variant">;
|
|
803
|
+
variantId: z.ZodUUID;
|
|
804
|
+
quantity: z.ZodNumber;
|
|
805
|
+
modifiers: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
806
|
+
modifierId: z.ZodUUID;
|
|
807
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
808
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
809
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
810
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
811
|
+
kind: z.ZodLiteral<"deal">;
|
|
812
|
+
dealId: z.ZodUUID;
|
|
813
|
+
quantity: z.ZodNumber;
|
|
814
|
+
choices: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
815
|
+
dealChoiceGroupId: z.ZodUUID;
|
|
816
|
+
variantId: z.ZodUUID;
|
|
817
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
818
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
819
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
820
|
+
}, _$zod_v4_core0.$strip>], "kind">>;
|
|
821
|
+
paymentMethodId: z.ZodUUID;
|
|
822
|
+
saveAddress: z.ZodOptional<z.ZodBoolean>;
|
|
823
|
+
contactName: z.ZodString;
|
|
824
|
+
contactPhone: z.ZodString;
|
|
825
|
+
contactEmail: z.ZodEmail;
|
|
826
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
827
|
+
customerAddressId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
828
|
+
address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
829
|
+
label: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
830
|
+
recipientName: z.ZodString;
|
|
831
|
+
phone: z.ZodString;
|
|
832
|
+
line1: z.ZodString;
|
|
833
|
+
line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
834
|
+
city: z.ZodString;
|
|
835
|
+
state: z.ZodString;
|
|
836
|
+
postalCode: z.ZodString;
|
|
837
|
+
country: z.ZodString;
|
|
838
|
+
lat: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>;
|
|
839
|
+
lng: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodUnion<readonly [z.ZodPipe<z.ZodLiteral<"">, z.ZodTransform<undefined, "">>, z.ZodPipe<z.ZodCoercedNumber<string>, z.ZodTransform<string, number>>]>>>>;
|
|
840
|
+
notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
841
|
+
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
842
|
+
}, _$zod_v4_core0.$strip>>>;
|
|
843
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
844
|
+
id: z.ZodUUID;
|
|
845
|
+
orderNumber: z.ZodString;
|
|
846
|
+
status: z.ZodEnum<{
|
|
847
|
+
pending: "pending";
|
|
848
|
+
confirmed: "confirmed";
|
|
849
|
+
preparing: "preparing";
|
|
850
|
+
out_for_delivery: "out_for_delivery";
|
|
851
|
+
completed: "completed";
|
|
852
|
+
cancelled: "cancelled";
|
|
853
|
+
}>;
|
|
854
|
+
paymentStatus: z.ZodEnum<{
|
|
855
|
+
pending: "pending";
|
|
856
|
+
paid: "paid";
|
|
857
|
+
refunded: "refunded";
|
|
858
|
+
failed: "failed";
|
|
859
|
+
}>;
|
|
860
|
+
fulfillmentType: z.ZodEnum<{
|
|
861
|
+
delivery: "delivery";
|
|
862
|
+
pickup: "pickup";
|
|
863
|
+
dine_in: "dine_in";
|
|
864
|
+
}>;
|
|
865
|
+
subtotal: z.ZodString;
|
|
866
|
+
deliveryFee: z.ZodString;
|
|
867
|
+
grandTotal: z.ZodString;
|
|
868
|
+
currency: z.ZodString;
|
|
869
|
+
placedAt: z.ZodString;
|
|
870
|
+
createdAt: z.ZodString;
|
|
871
|
+
channel: z.ZodEnum<{
|
|
872
|
+
storefront: "storefront";
|
|
873
|
+
pos: "pos";
|
|
874
|
+
api: "api";
|
|
875
|
+
}>;
|
|
876
|
+
paymentProvider: z.ZodEnum<{
|
|
877
|
+
cod: "cod";
|
|
878
|
+
}>;
|
|
879
|
+
paymentMethodId: z.ZodNullable<z.ZodUUID>;
|
|
880
|
+
contactName: z.ZodString;
|
|
881
|
+
contactPhone: z.ZodString;
|
|
882
|
+
contactEmail: z.ZodNullable<z.ZodString>;
|
|
883
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
884
|
+
confirmedAt: z.ZodNullable<z.ZodString>;
|
|
885
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
886
|
+
cancelledAt: z.ZodNullable<z.ZodString>;
|
|
887
|
+
delivery: z.ZodNullable<z.ZodObject<{
|
|
888
|
+
customerAddressId: z.ZodNullable<z.ZodUUID>;
|
|
889
|
+
recipientName: z.ZodString;
|
|
890
|
+
phone: z.ZodString;
|
|
891
|
+
line1: z.ZodString;
|
|
892
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
893
|
+
city: z.ZodString;
|
|
894
|
+
state: z.ZodString;
|
|
895
|
+
postalCode: z.ZodString;
|
|
896
|
+
country: z.ZodString;
|
|
897
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
898
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
899
|
+
deliveryNotes: z.ZodNullable<z.ZodString>;
|
|
900
|
+
}, _$zod_v4_core0.$strip>>;
|
|
901
|
+
items: z.ZodArray<z.ZodObject<{
|
|
902
|
+
id: z.ZodUUID;
|
|
903
|
+
kind: z.ZodEnum<{
|
|
904
|
+
variant: "variant";
|
|
905
|
+
deal: "deal";
|
|
906
|
+
}>;
|
|
907
|
+
variantId: z.ZodNullable<z.ZodUUID>;
|
|
908
|
+
dealId: z.ZodNullable<z.ZodUUID>;
|
|
909
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
910
|
+
variantName: z.ZodNullable<z.ZodString>;
|
|
911
|
+
dealName: z.ZodNullable<z.ZodString>;
|
|
912
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
913
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
914
|
+
unitPrice: z.ZodString;
|
|
915
|
+
quantity: z.ZodNumber;
|
|
916
|
+
modifiersTotal: z.ZodString;
|
|
917
|
+
lineSubtotal: z.ZodString;
|
|
918
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
919
|
+
modifiers: z.ZodArray<z.ZodObject<{
|
|
920
|
+
id: z.ZodUUID;
|
|
921
|
+
modifierId: z.ZodNullable<z.ZodUUID>;
|
|
922
|
+
modifierGroupId: z.ZodNullable<z.ZodUUID>;
|
|
923
|
+
groupName: z.ZodString;
|
|
924
|
+
modifierName: z.ZodString;
|
|
925
|
+
priceDelta: z.ZodString;
|
|
926
|
+
quantity: z.ZodNumber;
|
|
927
|
+
}, _$zod_v4_core0.$strip>>;
|
|
928
|
+
dealParts: z.ZodArray<z.ZodObject<{
|
|
929
|
+
id: z.ZodUUID;
|
|
930
|
+
kind: z.ZodEnum<{
|
|
931
|
+
included: "included";
|
|
932
|
+
chosen: "chosen";
|
|
933
|
+
}>;
|
|
934
|
+
dealIncludedItemId: z.ZodNullable<z.ZodUUID>;
|
|
935
|
+
dealChoiceGroupId: z.ZodNullable<z.ZodUUID>;
|
|
936
|
+
variantId: z.ZodNullable<z.ZodUUID>;
|
|
937
|
+
groupName: z.ZodNullable<z.ZodString>;
|
|
938
|
+
variantName: z.ZodString;
|
|
939
|
+
priceDelta: z.ZodString;
|
|
940
|
+
quantity: z.ZodNumber;
|
|
941
|
+
}, _$zod_v4_core0.$strip>>;
|
|
942
|
+
}, _$zod_v4_core0.$strip>>;
|
|
943
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
944
|
+
list: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{
|
|
945
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
946
|
+
cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
947
|
+
}, _$zod_v4_core0.$strip>>, z.ZodObject<{
|
|
948
|
+
items: z.ZodArray<z.ZodObject<{
|
|
949
|
+
id: z.ZodUUID;
|
|
950
|
+
orderNumber: z.ZodString;
|
|
951
|
+
status: z.ZodEnum<{
|
|
952
|
+
pending: "pending";
|
|
953
|
+
confirmed: "confirmed";
|
|
954
|
+
preparing: "preparing";
|
|
955
|
+
out_for_delivery: "out_for_delivery";
|
|
956
|
+
completed: "completed";
|
|
957
|
+
cancelled: "cancelled";
|
|
958
|
+
}>;
|
|
959
|
+
paymentStatus: z.ZodEnum<{
|
|
960
|
+
pending: "pending";
|
|
961
|
+
paid: "paid";
|
|
962
|
+
refunded: "refunded";
|
|
963
|
+
failed: "failed";
|
|
964
|
+
}>;
|
|
965
|
+
fulfillmentType: z.ZodEnum<{
|
|
966
|
+
delivery: "delivery";
|
|
967
|
+
pickup: "pickup";
|
|
968
|
+
dine_in: "dine_in";
|
|
969
|
+
}>;
|
|
970
|
+
subtotal: z.ZodString;
|
|
971
|
+
deliveryFee: z.ZodString;
|
|
972
|
+
grandTotal: z.ZodString;
|
|
973
|
+
currency: z.ZodString;
|
|
974
|
+
placedAt: z.ZodString;
|
|
975
|
+
createdAt: z.ZodString;
|
|
976
|
+
}, _$zod_v4_core0.$strip>>;
|
|
977
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
978
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
979
|
+
get: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
980
|
+
id: z.ZodUUID;
|
|
981
|
+
}, _$zod_v4_core0.$strip>, z.ZodObject<{
|
|
982
|
+
id: z.ZodUUID;
|
|
983
|
+
orderNumber: z.ZodString;
|
|
984
|
+
status: z.ZodEnum<{
|
|
985
|
+
pending: "pending";
|
|
986
|
+
confirmed: "confirmed";
|
|
987
|
+
preparing: "preparing";
|
|
988
|
+
out_for_delivery: "out_for_delivery";
|
|
989
|
+
completed: "completed";
|
|
990
|
+
cancelled: "cancelled";
|
|
991
|
+
}>;
|
|
992
|
+
paymentStatus: z.ZodEnum<{
|
|
993
|
+
pending: "pending";
|
|
994
|
+
paid: "paid";
|
|
995
|
+
refunded: "refunded";
|
|
996
|
+
failed: "failed";
|
|
997
|
+
}>;
|
|
998
|
+
fulfillmentType: z.ZodEnum<{
|
|
999
|
+
delivery: "delivery";
|
|
1000
|
+
pickup: "pickup";
|
|
1001
|
+
dine_in: "dine_in";
|
|
1002
|
+
}>;
|
|
1003
|
+
subtotal: z.ZodString;
|
|
1004
|
+
deliveryFee: z.ZodString;
|
|
1005
|
+
grandTotal: z.ZodString;
|
|
1006
|
+
currency: z.ZodString;
|
|
1007
|
+
placedAt: z.ZodString;
|
|
1008
|
+
createdAt: z.ZodString;
|
|
1009
|
+
channel: z.ZodEnum<{
|
|
1010
|
+
storefront: "storefront";
|
|
1011
|
+
pos: "pos";
|
|
1012
|
+
api: "api";
|
|
1013
|
+
}>;
|
|
1014
|
+
paymentProvider: z.ZodEnum<{
|
|
1015
|
+
cod: "cod";
|
|
1016
|
+
}>;
|
|
1017
|
+
paymentMethodId: z.ZodNullable<z.ZodUUID>;
|
|
1018
|
+
contactName: z.ZodString;
|
|
1019
|
+
contactPhone: z.ZodString;
|
|
1020
|
+
contactEmail: z.ZodNullable<z.ZodString>;
|
|
1021
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
1022
|
+
confirmedAt: z.ZodNullable<z.ZodString>;
|
|
1023
|
+
completedAt: z.ZodNullable<z.ZodString>;
|
|
1024
|
+
cancelledAt: z.ZodNullable<z.ZodString>;
|
|
1025
|
+
delivery: z.ZodNullable<z.ZodObject<{
|
|
1026
|
+
customerAddressId: z.ZodNullable<z.ZodUUID>;
|
|
1027
|
+
recipientName: z.ZodString;
|
|
1028
|
+
phone: z.ZodString;
|
|
1029
|
+
line1: z.ZodString;
|
|
1030
|
+
line2: z.ZodNullable<z.ZodString>;
|
|
1031
|
+
city: z.ZodString;
|
|
1032
|
+
state: z.ZodString;
|
|
1033
|
+
postalCode: z.ZodString;
|
|
1034
|
+
country: z.ZodString;
|
|
1035
|
+
lat: z.ZodNullable<z.ZodString>;
|
|
1036
|
+
lng: z.ZodNullable<z.ZodString>;
|
|
1037
|
+
deliveryNotes: z.ZodNullable<z.ZodString>;
|
|
1038
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1039
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1040
|
+
id: z.ZodUUID;
|
|
1041
|
+
kind: z.ZodEnum<{
|
|
1042
|
+
variant: "variant";
|
|
1043
|
+
deal: "deal";
|
|
1044
|
+
}>;
|
|
1045
|
+
variantId: z.ZodNullable<z.ZodUUID>;
|
|
1046
|
+
dealId: z.ZodNullable<z.ZodUUID>;
|
|
1047
|
+
productName: z.ZodNullable<z.ZodString>;
|
|
1048
|
+
variantName: z.ZodNullable<z.ZodString>;
|
|
1049
|
+
dealName: z.ZodNullable<z.ZodString>;
|
|
1050
|
+
sku: z.ZodNullable<z.ZodString>;
|
|
1051
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
1052
|
+
unitPrice: z.ZodString;
|
|
1053
|
+
quantity: z.ZodNumber;
|
|
1054
|
+
modifiersTotal: z.ZodString;
|
|
1055
|
+
lineSubtotal: z.ZodString;
|
|
1056
|
+
notes: z.ZodNullable<z.ZodString>;
|
|
1057
|
+
modifiers: z.ZodArray<z.ZodObject<{
|
|
1058
|
+
id: z.ZodUUID;
|
|
1059
|
+
modifierId: z.ZodNullable<z.ZodUUID>;
|
|
1060
|
+
modifierGroupId: z.ZodNullable<z.ZodUUID>;
|
|
1061
|
+
groupName: z.ZodString;
|
|
1062
|
+
modifierName: z.ZodString;
|
|
1063
|
+
priceDelta: z.ZodString;
|
|
1064
|
+
quantity: z.ZodNumber;
|
|
1065
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1066
|
+
dealParts: z.ZodArray<z.ZodObject<{
|
|
1067
|
+
id: z.ZodUUID;
|
|
1068
|
+
kind: z.ZodEnum<{
|
|
1069
|
+
included: "included";
|
|
1070
|
+
chosen: "chosen";
|
|
1071
|
+
}>;
|
|
1072
|
+
dealIncludedItemId: z.ZodNullable<z.ZodUUID>;
|
|
1073
|
+
dealChoiceGroupId: z.ZodNullable<z.ZodUUID>;
|
|
1074
|
+
variantId: z.ZodNullable<z.ZodUUID>;
|
|
1075
|
+
groupName: z.ZodNullable<z.ZodString>;
|
|
1076
|
+
variantName: z.ZodString;
|
|
1077
|
+
priceDelta: z.ZodString;
|
|
1078
|
+
quantity: z.ZodNumber;
|
|
1079
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1080
|
+
}, _$zod_v4_core0.$strip>>;
|
|
1081
|
+
}, _$zod_v4_core0.$strip>, Record<never, never>, Record<never, never>>;
|
|
1082
|
+
};
|
|
206
1083
|
products: {
|
|
207
1084
|
list: _$_orpc_contract0.ContractProcedureBuilderWithInputOutput<z.ZodOptional<z.ZodObject<{}, _$zod_v4_core0.$strip>>, z.ZodArray<z.ZodObject<{
|
|
208
1085
|
id: z.ZodUUID;
|
|
@@ -308,9 +1185,11 @@ type RestaleOptions = {
|
|
|
308
1185
|
};
|
|
309
1186
|
declare function createRestaleClient(apiKey: string, options?: RestaleOptions): RestaleClient;
|
|
310
1187
|
declare class Restale {
|
|
1188
|
+
readonly customers: RestaleClient["customers"];
|
|
1189
|
+
readonly orders: RestaleClient["orders"];
|
|
311
1190
|
readonly products: RestaleClient["products"];
|
|
312
1191
|
constructor(apiKey: string, options?: RestaleOptions);
|
|
313
1192
|
}
|
|
314
1193
|
//#endregion
|
|
315
|
-
export { Contract, ContractInputs, ContractOutputs, Modifier, ModifierGroup, ModifierStatus, ProductDetails, ProductListItem, ProductMedia, ProductOption, ProductOptionValue, ProductStatus, ProductVariant, ProductVariantWithModifiers, Restale, RestaleClient, RestaleOptions, contract, createRestaleClient, modifierGroupSchema, modifierSchema, modifierStatusSchema, productDetailsSchema, productListItemSchema, productMediaSchema, productOptionSchema, productOptionValueSchema, productStatusSchema, productVariantSchema, productVariantWithModifiersSchema };
|
|
1194
|
+
export { Address, AddressInput, AddressUpdateInput, CartDealItem, CartItem, CartVariantItem, Contract, ContractInputs, ContractOutputs, CreateOrderInput, Customer, Modifier, ModifierGroup, ModifierStatus, OrderDetail, OrderFulfillmentType, OrderItemOutput, OrderPaymentStatus, OrderStatus, OrderSummary, OtpTokenResponse, ProductDetails, ProductListItem, ProductMedia, ProductOption, ProductOptionValue, ProductStatus, ProductVariant, ProductVariantWithModifiers, Restale, RestaleClient, RestaleOptions, addressInputSchema, addressSchema, addressUpdateInputSchema, cartDealChoiceSchema, cartDealItemSchema, cartItemSchema, cartVariantItemSchema, cartVariantModifierSchema, contract, createOrderInputSchema, createRestaleClient, customerSchema, modifierGroupSchema, modifierSchema, modifierStatusSchema, okSchema, orderChannelSchema, orderDeliveryOutputSchema, orderDetailSchema, orderFulfillmentTypeSchema, orderItemDealPartOutputSchema, orderItemModifierOutputSchema, orderItemOutputSchema, orderPaymentProviderSchema, orderPaymentStatusSchema, orderStatusSchema, orderSummarySchema, otpTokenResponseSchema, productDetailsSchema, productListItemSchema, productMediaSchema, productOptionSchema, productOptionValueSchema, productStatusSchema, productVariantSchema, productVariantWithModifiersSchema };
|
|
316
1195
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,295 @@ import { createORPCClient } from "@orpc/client";
|
|
|
2
2
|
import { OpenAPILink } from "@orpc/openapi-client/fetch";
|
|
3
3
|
import { oc } from "@orpc/contract";
|
|
4
4
|
import * as z from "zod";
|
|
5
|
+
//#region src/customers/schemas.ts
|
|
6
|
+
const customerSchema = z.object({
|
|
7
|
+
id: z.string(),
|
|
8
|
+
email: z.email(),
|
|
9
|
+
name: z.string(),
|
|
10
|
+
emailVerified: z.boolean(),
|
|
11
|
+
image: z.string().nullable(),
|
|
12
|
+
createdAt: z.string(),
|
|
13
|
+
updatedAt: z.string()
|
|
14
|
+
});
|
|
15
|
+
const otpTokenResponseSchema = z.object({
|
|
16
|
+
token: z.string(),
|
|
17
|
+
expiresAt: z.string(),
|
|
18
|
+
customer: customerSchema
|
|
19
|
+
});
|
|
20
|
+
const okSchema = z.object({ ok: z.literal(true) });
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/customers/addresses/schemas.ts
|
|
23
|
+
const emptyStringSchema = z.literal("").transform(() => void 0);
|
|
24
|
+
const coordinateNumberSchema = (label, maxAbs) => z.coerce.number(`${label} must be a valid number`).min(-maxAbs, `${label} must be at least ${-maxAbs}`).max(maxAbs, `${label} must be at most ${maxAbs}`).transform((value) => String(value));
|
|
25
|
+
const coordinateInputSchema = (label, maxAbs) => z.string().trim().pipe(z.union([emptyStringSchema, coordinateNumberSchema(label, maxAbs)])).nullish();
|
|
26
|
+
const addressSchema = z.object({
|
|
27
|
+
id: z.uuid(),
|
|
28
|
+
label: z.string().nullable(),
|
|
29
|
+
recipientName: z.string(),
|
|
30
|
+
phone: z.string(),
|
|
31
|
+
line1: z.string(),
|
|
32
|
+
line2: z.string().nullable(),
|
|
33
|
+
city: z.string(),
|
|
34
|
+
state: z.string(),
|
|
35
|
+
postalCode: z.string(),
|
|
36
|
+
country: z.string(),
|
|
37
|
+
lat: z.string().nullable(),
|
|
38
|
+
lng: z.string().nullable(),
|
|
39
|
+
notes: z.string().nullable(),
|
|
40
|
+
isDefault: z.boolean(),
|
|
41
|
+
createdAt: z.string(),
|
|
42
|
+
updatedAt: z.string()
|
|
43
|
+
});
|
|
44
|
+
const addressInputSchema = z.object({
|
|
45
|
+
label: z.string().trim().max(64).nullish(),
|
|
46
|
+
recipientName: z.string().trim().min(1).max(120),
|
|
47
|
+
phone: z.string().trim().min(4).max(32),
|
|
48
|
+
line1: z.string().trim().min(1).max(200),
|
|
49
|
+
line2: z.string().trim().max(200).nullish(),
|
|
50
|
+
city: z.string().trim().min(1).max(120),
|
|
51
|
+
state: z.string().trim().min(1).max(120),
|
|
52
|
+
postalCode: z.string().trim().min(1).max(32),
|
|
53
|
+
country: z.string().trim().min(2).max(64),
|
|
54
|
+
lat: coordinateInputSchema("Latitude", 90),
|
|
55
|
+
lng: coordinateInputSchema("Longitude", 180),
|
|
56
|
+
notes: z.string().trim().max(500).nullish(),
|
|
57
|
+
isDefault: z.boolean().optional()
|
|
58
|
+
});
|
|
59
|
+
const addressUpdateInputSchema = addressInputSchema.partial();
|
|
60
|
+
const addressesContract = {
|
|
61
|
+
list: oc.route({
|
|
62
|
+
method: "GET",
|
|
63
|
+
path: "/customers/addresses",
|
|
64
|
+
tags: ["Customers Addresses"]
|
|
65
|
+
}).input(z.object({}).optional()).output(z.array(addressSchema)),
|
|
66
|
+
get: oc.route({
|
|
67
|
+
method: "GET",
|
|
68
|
+
path: "/customers/addresses/{id}",
|
|
69
|
+
tags: ["Customers Addresses"]
|
|
70
|
+
}).input(z.object({ id: z.uuid() })).output(addressSchema),
|
|
71
|
+
create: oc.route({
|
|
72
|
+
method: "POST",
|
|
73
|
+
path: "/customers/addresses",
|
|
74
|
+
tags: ["Customers Addresses"]
|
|
75
|
+
}).input(addressInputSchema).output(addressSchema),
|
|
76
|
+
update: oc.route({
|
|
77
|
+
method: "PATCH",
|
|
78
|
+
path: "/customers/addresses/{id}",
|
|
79
|
+
tags: ["Customers Addresses"]
|
|
80
|
+
}).input(z.object({
|
|
81
|
+
id: z.uuid(),
|
|
82
|
+
data: addressUpdateInputSchema
|
|
83
|
+
})).output(addressSchema),
|
|
84
|
+
delete: oc.route({
|
|
85
|
+
method: "DELETE",
|
|
86
|
+
path: "/customers/addresses/{id}",
|
|
87
|
+
tags: ["Customers Addresses"]
|
|
88
|
+
}).input(z.object({ id: z.uuid() })).output(okSchema),
|
|
89
|
+
setDefault: oc.route({
|
|
90
|
+
method: "POST",
|
|
91
|
+
path: "/customers/addresses/{id}/default",
|
|
92
|
+
tags: ["Customers Addresses"]
|
|
93
|
+
}).input(z.object({ id: z.uuid() })).output(addressSchema)
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/customers/index.ts
|
|
97
|
+
const requestOtpContract = oc.route({
|
|
98
|
+
method: "POST",
|
|
99
|
+
path: "/customers/otp/request",
|
|
100
|
+
tags: ["Customers"]
|
|
101
|
+
}).input(z.object({ email: z.email() })).output(okSchema);
|
|
102
|
+
const verifyOtpContract = oc.route({
|
|
103
|
+
method: "POST",
|
|
104
|
+
path: "/customers/otp/verify",
|
|
105
|
+
tags: ["Customers"]
|
|
106
|
+
}).input(z.object({
|
|
107
|
+
email: z.email(),
|
|
108
|
+
otp: z.string().trim().min(4).max(10)
|
|
109
|
+
})).output(otpTokenResponseSchema);
|
|
110
|
+
const logoutContract = oc.route({
|
|
111
|
+
method: "POST",
|
|
112
|
+
path: "/customers/logout",
|
|
113
|
+
tags: ["Customers"]
|
|
114
|
+
}).input(z.object({}).optional()).output(okSchema);
|
|
115
|
+
const meContract = oc.route({
|
|
116
|
+
method: "GET",
|
|
117
|
+
path: "/customers/me",
|
|
118
|
+
tags: ["Customers"]
|
|
119
|
+
}).input(z.object({}).optional()).output(customerSchema);
|
|
120
|
+
const customersContract = {
|
|
121
|
+
otp: {
|
|
122
|
+
request: requestOtpContract,
|
|
123
|
+
verify: verifyOtpContract
|
|
124
|
+
},
|
|
125
|
+
logout: logoutContract,
|
|
126
|
+
me: meContract,
|
|
127
|
+
addresses: addressesContract
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/orders/schemas.ts
|
|
131
|
+
const orderStatusSchema = z.enum([
|
|
132
|
+
"pending",
|
|
133
|
+
"confirmed",
|
|
134
|
+
"preparing",
|
|
135
|
+
"out_for_delivery",
|
|
136
|
+
"completed",
|
|
137
|
+
"cancelled"
|
|
138
|
+
]);
|
|
139
|
+
const orderPaymentStatusSchema = z.enum([
|
|
140
|
+
"pending",
|
|
141
|
+
"paid",
|
|
142
|
+
"refunded",
|
|
143
|
+
"failed"
|
|
144
|
+
]);
|
|
145
|
+
const orderChannelSchema = z.enum([
|
|
146
|
+
"storefront",
|
|
147
|
+
"pos",
|
|
148
|
+
"api"
|
|
149
|
+
]);
|
|
150
|
+
const orderFulfillmentTypeSchema = z.enum([
|
|
151
|
+
"delivery",
|
|
152
|
+
"pickup",
|
|
153
|
+
"dine_in"
|
|
154
|
+
]);
|
|
155
|
+
const orderPaymentProviderSchema = z.enum(["cod"]);
|
|
156
|
+
const cartVariantModifierSchema = z.object({
|
|
157
|
+
modifierId: z.uuid(),
|
|
158
|
+
quantity: z.number().int().min(1).default(1)
|
|
159
|
+
});
|
|
160
|
+
const cartVariantItemSchema = z.object({
|
|
161
|
+
kind: z.literal("variant"),
|
|
162
|
+
variantId: z.uuid(),
|
|
163
|
+
quantity: z.number().int().min(1),
|
|
164
|
+
modifiers: z.array(cartVariantModifierSchema).default([]),
|
|
165
|
+
notes: z.string().trim().max(500).nullish()
|
|
166
|
+
});
|
|
167
|
+
const cartDealChoiceSchema = z.object({
|
|
168
|
+
dealChoiceGroupId: z.uuid(),
|
|
169
|
+
variantId: z.uuid(),
|
|
170
|
+
quantity: z.number().int().min(1).default(1)
|
|
171
|
+
});
|
|
172
|
+
const cartDealItemSchema = z.object({
|
|
173
|
+
kind: z.literal("deal"),
|
|
174
|
+
dealId: z.uuid(),
|
|
175
|
+
quantity: z.number().int().min(1),
|
|
176
|
+
choices: z.array(cartDealChoiceSchema).default([]),
|
|
177
|
+
notes: z.string().trim().max(500).nullish()
|
|
178
|
+
});
|
|
179
|
+
const cartItemSchema = z.discriminatedUnion("kind", [cartVariantItemSchema, cartDealItemSchema]);
|
|
180
|
+
const createOrderInputSchema = z.object({
|
|
181
|
+
items: z.array(cartItemSchema).min(1),
|
|
182
|
+
paymentMethodId: z.uuid(),
|
|
183
|
+
saveAddress: z.boolean().optional(),
|
|
184
|
+
contactName: z.string().trim().min(1).max(120),
|
|
185
|
+
contactPhone: z.string().trim().min(4).max(32),
|
|
186
|
+
contactEmail: z.email(),
|
|
187
|
+
notes: z.string().trim().max(1e3).nullish(),
|
|
188
|
+
customerAddressId: z.uuid().nullish(),
|
|
189
|
+
address: addressInputSchema.nullish()
|
|
190
|
+
});
|
|
191
|
+
const orderItemModifierOutputSchema = z.object({
|
|
192
|
+
id: z.uuid(),
|
|
193
|
+
modifierId: z.uuid().nullable(),
|
|
194
|
+
modifierGroupId: z.uuid().nullable(),
|
|
195
|
+
groupName: z.string(),
|
|
196
|
+
modifierName: z.string(),
|
|
197
|
+
priceDelta: z.string(),
|
|
198
|
+
quantity: z.number().int()
|
|
199
|
+
});
|
|
200
|
+
const orderItemDealPartOutputSchema = z.object({
|
|
201
|
+
id: z.uuid(),
|
|
202
|
+
kind: z.enum(["included", "chosen"]),
|
|
203
|
+
dealIncludedItemId: z.uuid().nullable(),
|
|
204
|
+
dealChoiceGroupId: z.uuid().nullable(),
|
|
205
|
+
variantId: z.uuid().nullable(),
|
|
206
|
+
groupName: z.string().nullable(),
|
|
207
|
+
variantName: z.string(),
|
|
208
|
+
priceDelta: z.string(),
|
|
209
|
+
quantity: z.number().int()
|
|
210
|
+
});
|
|
211
|
+
const orderItemOutputSchema = z.object({
|
|
212
|
+
id: z.uuid(),
|
|
213
|
+
kind: z.enum(["variant", "deal"]),
|
|
214
|
+
variantId: z.uuid().nullable(),
|
|
215
|
+
dealId: z.uuid().nullable(),
|
|
216
|
+
productName: z.string().nullable(),
|
|
217
|
+
variantName: z.string().nullable(),
|
|
218
|
+
dealName: z.string().nullable(),
|
|
219
|
+
sku: z.string().nullable(),
|
|
220
|
+
imageUrl: z.string().nullable(),
|
|
221
|
+
unitPrice: z.string(),
|
|
222
|
+
quantity: z.number().int(),
|
|
223
|
+
modifiersTotal: z.string(),
|
|
224
|
+
lineSubtotal: z.string(),
|
|
225
|
+
notes: z.string().nullable(),
|
|
226
|
+
modifiers: z.array(orderItemModifierOutputSchema),
|
|
227
|
+
dealParts: z.array(orderItemDealPartOutputSchema)
|
|
228
|
+
});
|
|
229
|
+
const orderDeliveryOutputSchema = z.object({
|
|
230
|
+
customerAddressId: z.uuid().nullable(),
|
|
231
|
+
recipientName: z.string(),
|
|
232
|
+
phone: z.string(),
|
|
233
|
+
line1: z.string(),
|
|
234
|
+
line2: z.string().nullable(),
|
|
235
|
+
city: z.string(),
|
|
236
|
+
state: z.string(),
|
|
237
|
+
postalCode: z.string(),
|
|
238
|
+
country: z.string(),
|
|
239
|
+
lat: z.string().nullable(),
|
|
240
|
+
lng: z.string().nullable(),
|
|
241
|
+
deliveryNotes: z.string().nullable()
|
|
242
|
+
});
|
|
243
|
+
const orderSummarySchema = z.object({
|
|
244
|
+
id: z.uuid(),
|
|
245
|
+
orderNumber: z.string(),
|
|
246
|
+
status: orderStatusSchema,
|
|
247
|
+
paymentStatus: orderPaymentStatusSchema,
|
|
248
|
+
fulfillmentType: orderFulfillmentTypeSchema,
|
|
249
|
+
subtotal: z.string(),
|
|
250
|
+
deliveryFee: z.string(),
|
|
251
|
+
grandTotal: z.string(),
|
|
252
|
+
currency: z.string(),
|
|
253
|
+
placedAt: z.string(),
|
|
254
|
+
createdAt: z.string()
|
|
255
|
+
});
|
|
256
|
+
const orderDetailSchema = orderSummarySchema.extend({
|
|
257
|
+
channel: orderChannelSchema,
|
|
258
|
+
paymentProvider: orderPaymentProviderSchema,
|
|
259
|
+
paymentMethodId: z.uuid().nullable(),
|
|
260
|
+
contactName: z.string(),
|
|
261
|
+
contactPhone: z.string(),
|
|
262
|
+
contactEmail: z.string().nullable(),
|
|
263
|
+
notes: z.string().nullable(),
|
|
264
|
+
confirmedAt: z.string().nullable(),
|
|
265
|
+
completedAt: z.string().nullable(),
|
|
266
|
+
cancelledAt: z.string().nullable(),
|
|
267
|
+
delivery: orderDeliveryOutputSchema.nullable(),
|
|
268
|
+
items: z.array(orderItemOutputSchema)
|
|
269
|
+
});
|
|
270
|
+
const ordersContract = {
|
|
271
|
+
create: oc.route({
|
|
272
|
+
method: "POST",
|
|
273
|
+
path: "/orders",
|
|
274
|
+
tags: ["Orders"]
|
|
275
|
+
}).input(createOrderInputSchema).output(orderDetailSchema),
|
|
276
|
+
list: oc.route({
|
|
277
|
+
method: "GET",
|
|
278
|
+
path: "/orders",
|
|
279
|
+
tags: ["Orders"]
|
|
280
|
+
}).input(z.object({
|
|
281
|
+
limit: z.number().int().min(1).max(100).default(20),
|
|
282
|
+
cursor: z.string().nullish()
|
|
283
|
+
}).optional()).output(z.object({
|
|
284
|
+
items: z.array(orderSummarySchema),
|
|
285
|
+
nextCursor: z.string().nullable()
|
|
286
|
+
})),
|
|
287
|
+
get: oc.route({
|
|
288
|
+
method: "GET",
|
|
289
|
+
path: "/orders/{id}",
|
|
290
|
+
tags: ["Orders"]
|
|
291
|
+
}).input(z.object({ id: z.uuid() })).output(orderDetailSchema)
|
|
292
|
+
};
|
|
293
|
+
//#endregion
|
|
5
294
|
//#region src/products/schemas.ts
|
|
6
295
|
const productStatusSchema = z.enum([
|
|
7
296
|
"draft",
|
|
@@ -68,16 +357,22 @@ const productListItemSchema = z.object({
|
|
|
68
357
|
const productDetailsSchema = productListItemSchema.extend({ variants: z.array(productVariantWithModifiersSchema) });
|
|
69
358
|
//#endregion
|
|
70
359
|
//#region src/index.ts
|
|
71
|
-
const contract = {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
360
|
+
const contract = {
|
|
361
|
+
customers: customersContract,
|
|
362
|
+
orders: ordersContract,
|
|
363
|
+
products: {
|
|
364
|
+
list: oc.route({
|
|
365
|
+
method: "GET",
|
|
366
|
+
path: "/products",
|
|
367
|
+
tags: ["Products"]
|
|
368
|
+
}).input(z.object({}).optional()).output(z.array(productListItemSchema)),
|
|
369
|
+
get: oc.route({
|
|
370
|
+
method: "GET",
|
|
371
|
+
path: "/products/:handle",
|
|
372
|
+
tags: ["Products"]
|
|
373
|
+
}).input(z.object({ handle: z.string().trim().min(1) })).output(productDetailsSchema.nullable())
|
|
374
|
+
}
|
|
375
|
+
};
|
|
81
376
|
const DEFAULT_BASE_URL = "https://api.restale.dev";
|
|
82
377
|
function createRestaleClient(apiKey, options = {}) {
|
|
83
378
|
return createORPCClient(new OpenAPILink(contract, {
|
|
@@ -90,13 +385,17 @@ function createRestaleClient(apiKey, options = {}) {
|
|
|
90
385
|
}));
|
|
91
386
|
}
|
|
92
387
|
var Restale = class {
|
|
388
|
+
customers;
|
|
389
|
+
orders;
|
|
93
390
|
products;
|
|
94
391
|
constructor(apiKey, options = {}) {
|
|
95
392
|
const client = createRestaleClient(apiKey, options);
|
|
393
|
+
this.customers = client.customers;
|
|
394
|
+
this.orders = client.orders;
|
|
96
395
|
this.products = client.products;
|
|
97
396
|
}
|
|
98
397
|
};
|
|
99
398
|
//#endregion
|
|
100
|
-
export { Restale, contract, createRestaleClient, modifierGroupSchema, modifierSchema, modifierStatusSchema, productDetailsSchema, productListItemSchema, productMediaSchema, productOptionSchema, productOptionValueSchema, productStatusSchema, productVariantSchema, productVariantWithModifiersSchema };
|
|
399
|
+
export { Restale, addressInputSchema, addressSchema, addressUpdateInputSchema, cartDealChoiceSchema, cartDealItemSchema, cartItemSchema, cartVariantItemSchema, cartVariantModifierSchema, contract, createOrderInputSchema, createRestaleClient, customerSchema, modifierGroupSchema, modifierSchema, modifierStatusSchema, okSchema, orderChannelSchema, orderDeliveryOutputSchema, orderDetailSchema, orderFulfillmentTypeSchema, orderItemDealPartOutputSchema, orderItemModifierOutputSchema, orderItemOutputSchema, orderPaymentProviderSchema, orderPaymentStatusSchema, orderStatusSchema, orderSummarySchema, otpTokenResponseSchema, productDetailsSchema, productListItemSchema, productMediaSchema, productOptionSchema, productOptionValueSchema, productStatusSchema, productVariantSchema, productVariantWithModifiersSchema };
|
|
101
400
|
|
|
102
401
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/products/schemas.ts","../src/products/index.ts","../src/index.ts"],"sourcesContent":["import * as z from \"zod\"\n\nexport const productStatusSchema = z.enum([\n \"draft\",\n \"active\",\n \"inactive\",\n \"archived\",\n])\n\nexport const modifierStatusSchema = z.enum([\"active\", \"inactive\", \"archived\"])\n\nexport const productMediaSchema = z.object({\n id: z.uuid(),\n url: z.string(),\n optionValueId: z.uuid().nullable(),\n type: z.string(),\n sortOrder: z.number().int(),\n})\n\nexport const productOptionValueSchema = z.object({\n id: z.uuid(),\n value: z.string(),\n})\n\nexport const productOptionSchema = z.object({\n id: z.uuid(),\n name: z.string(),\n values: z.array(productOptionValueSchema),\n})\n\nexport const productVariantSchema = z.object({\n id: z.uuid(),\n sku: z.string().nullable(),\n price: z.string(),\n compareAtPrice: z.string().nullable(),\n isAvailable: z.boolean(),\n optionValueIds: z.array(z.uuid()),\n})\n\nexport const modifierSchema = z.object({\n id: z.uuid(),\n name: z.string(),\n priceDelta: z.string(),\n maxQuantity: z.number().int().nullable(),\n imageUrl: z.string().nullable(),\n status: modifierStatusSchema,\n})\n\nexport const modifierGroupSchema = z.object({\n id: z.uuid(),\n name: z.string(),\n handle: z.string(),\n minSelections: z.number().int(),\n maxSelections: z.number().int().nullable(),\n modifiers: z.array(modifierSchema),\n})\n\nexport const productVariantWithModifiersSchema = productVariantSchema.extend({\n modifierGroups: z.array(modifierGroupSchema),\n})\n\nexport const productListItemSchema = z.object({\n id: z.uuid(),\n handle: z.string(),\n name: z.string(),\n description: z.string().nullable(),\n status: productStatusSchema,\n media: z.array(productMediaSchema),\n options: z.array(productOptionSchema),\n variants: z.array(productVariantSchema),\n})\n\nexport const productDetailsSchema = productListItemSchema.extend({\n variants: z.array(productVariantWithModifiersSchema),\n})\n\nexport type ProductStatus = z.infer<typeof productStatusSchema>\nexport type ModifierStatus = z.infer<typeof modifierStatusSchema>\nexport type ProductMedia = z.infer<typeof productMediaSchema>\nexport type ProductOptionValue = z.infer<typeof productOptionValueSchema>\nexport type ProductOption = z.infer<typeof productOptionSchema>\nexport type ProductVariant = z.infer<typeof productVariantSchema>\nexport type Modifier = z.infer<typeof modifierSchema>\nexport type ModifierGroup = z.infer<typeof modifierGroupSchema>\nexport type ProductVariantWithModifiers = z.infer<\n typeof productVariantWithModifiersSchema\n>\nexport type ProductListItem = z.infer<typeof productListItemSchema>\nexport type ProductDetails = z.infer<typeof productDetailsSchema>\n","import { oc } from \"@orpc/contract\"\nimport * as z from \"zod\"\n\nimport { productDetailsSchema, productListItemSchema } from \"./schemas\"\n\nexport const listProductsContract = oc\n .route({ method: \"GET\", path: \"/products\" })\n .input(z.object({}).optional())\n .output(z.array(productListItemSchema))\n\nexport const getProductContract = oc\n .route({ method: \"GET\", path: \"/products/:handle\" })\n .input(z.object({ handle: z.string().trim().min(1) }))\n .output(productDetailsSchema.nullable())\n\nexport const productsContract = {\n list: listProductsContract,\n get: getProductContract,\n}\n","import { createORPCClient } from \"@orpc/client\"\nimport type {\n ContractRouterClient,\n InferContractRouterInputs,\n InferContractRouterOutputs,\n} from \"@orpc/contract\"\nimport { OpenAPILink } from \"@orpc/openapi-client/fetch\"\n\nimport { productsContract } from \"./products\"\n\nexport const contract = {\n products: productsContract,\n}\n\nexport type Contract = typeof contract\nexport type ContractInputs = InferContractRouterInputs<Contract>\nexport type ContractOutputs = InferContractRouterOutputs<Contract>\nexport type RestaleClient = ContractRouterClient<Contract>\n\nexport type RestaleOptions = {\n baseUrl?: string\n headers?: Record<string, string>\n fetch?: typeof fetch\n}\n\nconst DEFAULT_BASE_URL = \"https://api.restale.dev\"\n\nexport function createRestaleClient(\n apiKey: string,\n options: RestaleOptions = {}\n): RestaleClient {\n const link = new OpenAPILink(contract, {\n url: options.baseUrl ?? DEFAULT_BASE_URL,\n headers: () => ({\n \"x-api-key\": apiKey,\n ...options.headers,\n }),\n fetch: options.fetch,\n })\n\n return createORPCClient(link)\n}\n\nexport class Restale {\n readonly products: RestaleClient[\"products\"]\n\n constructor(apiKey: string, options: RestaleOptions = {}) {\n const client = createRestaleClient(apiKey, options)\n this.products = client.products\n }\n}\n\nexport * from \"./products/schemas\"\n"],"mappings":";;;;;AAEA,MAAa,sBAAsB,EAAE,KAAK;CACxC;CACA;CACA;CACA;CACD,CAAC;AAEF,MAAa,uBAAuB,EAAE,KAAK;CAAC;CAAU;CAAY;CAAW,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AAE,OAAO;CAC5C,IAAI,EAAE,MAAM;CACZ,QAAQ,EAAE,QAAQ;CAClB,MAAM,EAAE,QAAQ;CAChB,aAAa,EAAE,QAAQ,CAAC,UAAU;CAClC,QAAQ;CACR,OAAO,EAAE,MAAM,mBAAmB;CAClC,SAAS,EAAE,MAAM,oBAAoB;CACrC,UAAU,EAAE,MAAM,qBAAqB;CACxC,CAAC;AAEF,MAAa,uBAAuB,sBAAsB,OAAO,EAC/D,UAAU,EAAE,MAAM,kCAAkC,EACrD,CAAC;;;AEhEF,MAAa,WAAW,EACtB,UDI8B;CAC9B,MAXkC,GACjC,MAAM;EAAE,QAAQ;EAAO,MAAM;EAAa,CAAC,CAC3C,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,CAC9B,OAAO,EAAE,MAAM,sBAAsB,CAAC;CASvC,KAPgC,GAC/B,MAAM;EAAE,QAAQ;EAAO,MAAM;EAAqB,CAAC,CACnD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CACrD,OAAO,qBAAqB,UAAU,CAAC;CAKzC,ECNA;AAaD,MAAM,mBAAmB;AAEzB,SAAgB,oBACd,QACA,UAA0B,EAAE,EACb;AAUf,QAAO,iBATM,IAAI,YAAY,UAAU;EACrC,KAAK,QAAQ,WAAW;EACxB,gBAAgB;GACd,aAAa;GACb,GAAG,QAAQ;GACZ;EACD,OAAO,QAAQ;EAChB,CAAC,CAE2B;;AAG/B,IAAa,UAAb,MAAqB;CACnB;CAEA,YAAY,QAAgB,UAA0B,EAAE,EAAE;EACxD,MAAM,SAAS,oBAAoB,QAAQ,QAAQ;AACnD,OAAK,WAAW,OAAO"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/customers/schemas.ts","../src/customers/addresses/schemas.ts","../src/customers/addresses/index.ts","../src/customers/index.ts","../src/orders/schemas.ts","../src/orders/index.ts","../src/products/schemas.ts","../src/products/index.ts","../src/index.ts"],"sourcesContent":["import * as z from \"zod\"\n\nexport const customerSchema = z.object({\n id: z.string(),\n email: z.email(),\n name: z.string(),\n emailVerified: z.boolean(),\n image: z.string().nullable(),\n createdAt: z.string(),\n updatedAt: z.string(),\n})\n\nexport const otpTokenResponseSchema = z.object({\n token: z.string(),\n expiresAt: z.string(),\n customer: customerSchema,\n})\n\nexport const okSchema = z.object({ ok: z.literal(true) })\n\nexport type Customer = z.infer<typeof customerSchema>\nexport type OtpTokenResponse = z.infer<typeof otpTokenResponseSchema>\n","import * as z from \"zod\"\n\nconst emptyStringSchema = z.literal(\"\").transform(() => undefined)\n\nconst coordinateNumberSchema = (label: string, maxAbs: number) =>\n z.coerce\n .number<string>(`${label} must be a valid number`)\n .min(-maxAbs, `${label} must be at least ${-maxAbs}`)\n .max(maxAbs, `${label} must be at most ${maxAbs}`)\n .transform((value) => String(value))\n\nconst coordinateInputSchema = (label: string, maxAbs: number) =>\n z\n .string()\n .trim()\n .pipe(z.union([emptyStringSchema, coordinateNumberSchema(label, maxAbs)]))\n .nullish()\n\nexport const addressSchema = z.object({\n id: z.uuid(),\n label: z.string().nullable(),\n recipientName: z.string(),\n phone: z.string(),\n line1: z.string(),\n line2: z.string().nullable(),\n city: z.string(),\n state: z.string(),\n postalCode: z.string(),\n country: z.string(),\n lat: z.string().nullable(),\n lng: z.string().nullable(),\n notes: z.string().nullable(),\n isDefault: z.boolean(),\n createdAt: z.string(),\n updatedAt: z.string(),\n})\n\nexport const addressInputSchema = z.object({\n label: z.string().trim().max(64).nullish(),\n recipientName: z.string().trim().min(1).max(120),\n phone: z.string().trim().min(4).max(32),\n line1: z.string().trim().min(1).max(200),\n line2: z.string().trim().max(200).nullish(),\n city: z.string().trim().min(1).max(120),\n state: z.string().trim().min(1).max(120),\n postalCode: z.string().trim().min(1).max(32),\n country: z.string().trim().min(2).max(64),\n lat: coordinateInputSchema(\"Latitude\", 90),\n lng: coordinateInputSchema(\"Longitude\", 180),\n notes: z.string().trim().max(500).nullish(),\n isDefault: z.boolean().optional(),\n})\n\nexport const addressUpdateInputSchema = addressInputSchema.partial()\n\nexport type Address = z.infer<typeof addressSchema>\nexport type AddressInput = z.infer<typeof addressInputSchema>\nexport type AddressUpdateInput = z.infer<typeof addressUpdateInputSchema>\n","import { oc } from \"@orpc/contract\"\nimport * as z from \"zod\"\n\nimport { okSchema } from \"../schemas\"\nimport {\n addressInputSchema,\n addressSchema,\n addressUpdateInputSchema,\n} from \"./schemas\"\n\nexport const listAddressesContract = oc\n .route({\n method: \"GET\",\n path: \"/customers/addresses\",\n tags: [\"Customers Addresses\"],\n })\n .input(z.object({}).optional())\n .output(z.array(addressSchema))\n\nexport const getAddressContract = oc\n .route({\n method: \"GET\",\n path: \"/customers/addresses/{id}\",\n tags: [\"Customers Addresses\"],\n })\n .input(z.object({ id: z.uuid() }))\n .output(addressSchema)\n\nexport const createAddressContract = oc\n .route({\n method: \"POST\",\n path: \"/customers/addresses\",\n tags: [\"Customers Addresses\"],\n })\n .input(addressInputSchema)\n .output(addressSchema)\n\nexport const updateAddressContract = oc\n .route({\n method: \"PATCH\",\n path: \"/customers/addresses/{id}\",\n tags: [\"Customers Addresses\"],\n })\n .input(\n z.object({\n id: z.uuid(),\n data: addressUpdateInputSchema,\n })\n )\n .output(addressSchema)\n\nexport const deleteAddressContract = oc\n .route({\n method: \"DELETE\",\n path: \"/customers/addresses/{id}\",\n tags: [\"Customers Addresses\"],\n })\n .input(z.object({ id: z.uuid() }))\n .output(okSchema)\n\nexport const setDefaultAddressContract = oc\n .route({\n method: \"POST\",\n path: \"/customers/addresses/{id}/default\",\n tags: [\"Customers Addresses\"],\n })\n .input(z.object({ id: z.uuid() }))\n .output(addressSchema)\n\nexport const addressesContract = {\n list: listAddressesContract,\n get: getAddressContract,\n create: createAddressContract,\n update: updateAddressContract,\n delete: deleteAddressContract,\n setDefault: setDefaultAddressContract,\n}\n","import { oc } from \"@orpc/contract\"\nimport * as z from \"zod\"\n\nimport { addressesContract } from \"./addresses\"\nimport { customerSchema, okSchema, otpTokenResponseSchema } from \"./schemas\"\n\nexport const requestOtpContract = oc\n .route({\n method: \"POST\",\n path: \"/customers/otp/request\",\n tags: [\"Customers\"],\n })\n .input(z.object({ email: z.email() }))\n .output(okSchema)\n\nexport const verifyOtpContract = oc\n .route({ method: \"POST\", path: \"/customers/otp/verify\", tags: [\"Customers\"] })\n .input(\n z.object({\n email: z.email(),\n otp: z.string().trim().min(4).max(10),\n })\n )\n .output(otpTokenResponseSchema)\n\nexport const logoutContract = oc\n .route({ method: \"POST\", path: \"/customers/logout\", tags: [\"Customers\"] })\n .input(z.object({}).optional())\n .output(okSchema)\n\nexport const meContract = oc\n .route({ method: \"GET\", path: \"/customers/me\", tags: [\"Customers\"] })\n .input(z.object({}).optional())\n .output(customerSchema)\n\nexport const customersContract = {\n otp: {\n request: requestOtpContract,\n verify: verifyOtpContract,\n },\n logout: logoutContract,\n me: meContract,\n addresses: addressesContract,\n}\n","import * as z from \"zod\"\n\nimport { addressInputSchema } from \"../customers/addresses/schemas\"\n\nexport const orderStatusSchema = z.enum([\n \"pending\",\n \"confirmed\",\n \"preparing\",\n \"out_for_delivery\",\n \"completed\",\n \"cancelled\",\n])\n\nexport const orderPaymentStatusSchema = z.enum([\n \"pending\",\n \"paid\",\n \"refunded\",\n \"failed\",\n])\n\nexport const orderChannelSchema = z.enum([\"storefront\", \"pos\", \"api\"])\nexport const orderFulfillmentTypeSchema = z.enum([\n \"delivery\",\n \"pickup\",\n \"dine_in\",\n])\nexport const orderPaymentProviderSchema = z.enum([\"cod\"])\n\nexport const cartVariantModifierSchema = z.object({\n modifierId: z.uuid(),\n quantity: z.number().int().min(1).default(1),\n})\n\nexport const cartVariantItemSchema = z.object({\n kind: z.literal(\"variant\"),\n variantId: z.uuid(),\n quantity: z.number().int().min(1),\n modifiers: z.array(cartVariantModifierSchema).default([]),\n notes: z.string().trim().max(500).nullish(),\n})\n\nexport const cartDealChoiceSchema = z.object({\n dealChoiceGroupId: z.uuid(),\n variantId: z.uuid(),\n quantity: z.number().int().min(1).default(1),\n})\n\nexport const cartDealItemSchema = z.object({\n kind: z.literal(\"deal\"),\n dealId: z.uuid(),\n quantity: z.number().int().min(1),\n choices: z.array(cartDealChoiceSchema).default([]),\n notes: z.string().trim().max(500).nullish(),\n})\n\nexport const cartItemSchema = z.discriminatedUnion(\"kind\", [\n cartVariantItemSchema,\n cartDealItemSchema,\n])\n\nexport const createOrderInputSchema = z.object({\n items: z.array(cartItemSchema).min(1),\n paymentMethodId: z.uuid(),\n saveAddress: z.boolean().optional(),\n contactName: z.string().trim().min(1).max(120),\n contactPhone: z.string().trim().min(4).max(32),\n contactEmail: z.email(),\n notes: z.string().trim().max(1000).nullish(),\n customerAddressId: z.uuid().nullish(),\n address: addressInputSchema.nullish(),\n})\n\nexport const orderItemModifierOutputSchema = z.object({\n id: z.uuid(),\n modifierId: z.uuid().nullable(),\n modifierGroupId: z.uuid().nullable(),\n groupName: z.string(),\n modifierName: z.string(),\n priceDelta: z.string(),\n quantity: z.number().int(),\n})\n\nexport const orderItemDealPartOutputSchema = z.object({\n id: z.uuid(),\n kind: z.enum([\"included\", \"chosen\"]),\n dealIncludedItemId: z.uuid().nullable(),\n dealChoiceGroupId: z.uuid().nullable(),\n variantId: z.uuid().nullable(),\n groupName: z.string().nullable(),\n variantName: z.string(),\n priceDelta: z.string(),\n quantity: z.number().int(),\n})\n\nexport const orderItemOutputSchema = z.object({\n id: z.uuid(),\n kind: z.enum([\"variant\", \"deal\"]),\n variantId: z.uuid().nullable(),\n dealId: z.uuid().nullable(),\n productName: z.string().nullable(),\n variantName: z.string().nullable(),\n dealName: z.string().nullable(),\n sku: z.string().nullable(),\n imageUrl: z.string().nullable(),\n unitPrice: z.string(),\n quantity: z.number().int(),\n modifiersTotal: z.string(),\n lineSubtotal: z.string(),\n notes: z.string().nullable(),\n modifiers: z.array(orderItemModifierOutputSchema),\n dealParts: z.array(orderItemDealPartOutputSchema),\n})\n\nexport const orderDeliveryOutputSchema = z.object({\n customerAddressId: z.uuid().nullable(),\n recipientName: z.string(),\n phone: z.string(),\n line1: z.string(),\n line2: z.string().nullable(),\n city: z.string(),\n state: z.string(),\n postalCode: z.string(),\n country: z.string(),\n lat: z.string().nullable(),\n lng: z.string().nullable(),\n deliveryNotes: z.string().nullable(),\n})\n\nexport const orderSummarySchema = z.object({\n id: z.uuid(),\n orderNumber: z.string(),\n status: orderStatusSchema,\n paymentStatus: orderPaymentStatusSchema,\n fulfillmentType: orderFulfillmentTypeSchema,\n subtotal: z.string(),\n deliveryFee: z.string(),\n grandTotal: z.string(),\n currency: z.string(),\n placedAt: z.string(),\n createdAt: z.string(),\n})\n\nexport const orderDetailSchema = orderSummarySchema.extend({\n channel: orderChannelSchema,\n paymentProvider: orderPaymentProviderSchema,\n paymentMethodId: z.uuid().nullable(),\n contactName: z.string(),\n contactPhone: z.string(),\n contactEmail: z.string().nullable(),\n notes: z.string().nullable(),\n confirmedAt: z.string().nullable(),\n completedAt: z.string().nullable(),\n cancelledAt: z.string().nullable(),\n delivery: orderDeliveryOutputSchema.nullable(),\n items: z.array(orderItemOutputSchema),\n})\n\nexport type OrderStatus = z.infer<typeof orderStatusSchema>\nexport type OrderPaymentStatus = z.infer<typeof orderPaymentStatusSchema>\nexport type OrderFulfillmentType = z.infer<typeof orderFulfillmentTypeSchema>\nexport type CartVariantItem = z.infer<typeof cartVariantItemSchema>\nexport type CartDealItem = z.infer<typeof cartDealItemSchema>\nexport type CartItem = z.infer<typeof cartItemSchema>\nexport type CreateOrderInput = z.infer<typeof createOrderInputSchema>\nexport type OrderSummary = z.infer<typeof orderSummarySchema>\nexport type OrderDetail = z.infer<typeof orderDetailSchema>\nexport type OrderItemOutput = z.infer<typeof orderItemOutputSchema>\n","import { oc } from \"@orpc/contract\"\nimport * as z from \"zod\"\n\nimport {\n createOrderInputSchema,\n orderDetailSchema,\n orderSummarySchema,\n} from \"./schemas\"\n\nexport const createOrderContract = oc\n .route({ method: \"POST\", path: \"/orders\", tags: [\"Orders\"] })\n .input(createOrderInputSchema)\n .output(orderDetailSchema)\n\nexport const listOrdersContract = oc\n .route({ method: \"GET\", path: \"/orders\", tags: [\"Orders\"] })\n .input(\n z\n .object({\n limit: z.number().int().min(1).max(100).default(20),\n cursor: z.string().nullish(),\n })\n .optional()\n )\n .output(\n z.object({\n items: z.array(orderSummarySchema),\n nextCursor: z.string().nullable(),\n })\n )\n\nexport const getOrderContract = oc\n .route({ method: \"GET\", path: \"/orders/{id}\", tags: [\"Orders\"] })\n .input(z.object({ id: z.uuid() }))\n .output(orderDetailSchema)\n\nexport const ordersContract = {\n create: createOrderContract,\n list: listOrdersContract,\n get: getOrderContract,\n}\n","import * as z from \"zod\"\n\nexport const productStatusSchema = z.enum([\n \"draft\",\n \"active\",\n \"inactive\",\n \"archived\",\n])\n\nexport const modifierStatusSchema = z.enum([\"active\", \"inactive\", \"archived\"])\n\nexport const productMediaSchema = z.object({\n id: z.uuid(),\n url: z.string(),\n optionValueId: z.uuid().nullable(),\n type: z.string(),\n sortOrder: z.number().int(),\n})\n\nexport const productOptionValueSchema = z.object({\n id: z.uuid(),\n value: z.string(),\n})\n\nexport const productOptionSchema = z.object({\n id: z.uuid(),\n name: z.string(),\n values: z.array(productOptionValueSchema),\n})\n\nexport const productVariantSchema = z.object({\n id: z.uuid(),\n sku: z.string().nullable(),\n price: z.string(),\n compareAtPrice: z.string().nullable(),\n isAvailable: z.boolean(),\n optionValueIds: z.array(z.uuid()),\n})\n\nexport const modifierSchema = z.object({\n id: z.uuid(),\n name: z.string(),\n priceDelta: z.string(),\n maxQuantity: z.number().int().nullable(),\n imageUrl: z.string().nullable(),\n status: modifierStatusSchema,\n})\n\nexport const modifierGroupSchema = z.object({\n id: z.uuid(),\n name: z.string(),\n handle: z.string(),\n minSelections: z.number().int(),\n maxSelections: z.number().int().nullable(),\n modifiers: z.array(modifierSchema),\n})\n\nexport const productVariantWithModifiersSchema = productVariantSchema.extend({\n modifierGroups: z.array(modifierGroupSchema),\n})\n\nexport const productListItemSchema = z.object({\n id: z.uuid(),\n handle: z.string(),\n name: z.string(),\n description: z.string().nullable(),\n status: productStatusSchema,\n media: z.array(productMediaSchema),\n options: z.array(productOptionSchema),\n variants: z.array(productVariantSchema),\n})\n\nexport const productDetailsSchema = productListItemSchema.extend({\n variants: z.array(productVariantWithModifiersSchema),\n})\n\nexport type ProductStatus = z.infer<typeof productStatusSchema>\nexport type ModifierStatus = z.infer<typeof modifierStatusSchema>\nexport type ProductMedia = z.infer<typeof productMediaSchema>\nexport type ProductOptionValue = z.infer<typeof productOptionValueSchema>\nexport type ProductOption = z.infer<typeof productOptionSchema>\nexport type ProductVariant = z.infer<typeof productVariantSchema>\nexport type Modifier = z.infer<typeof modifierSchema>\nexport type ModifierGroup = z.infer<typeof modifierGroupSchema>\nexport type ProductVariantWithModifiers = z.infer<\n typeof productVariantWithModifiersSchema\n>\nexport type ProductListItem = z.infer<typeof productListItemSchema>\nexport type ProductDetails = z.infer<typeof productDetailsSchema>\n","import { oc } from \"@orpc/contract\"\nimport * as z from \"zod\"\n\nimport { productDetailsSchema, productListItemSchema } from \"./schemas\"\n\nexport const listProductsContract = oc\n .route({ method: \"GET\", path: \"/products\", tags: [\"Products\"] })\n .input(z.object({}).optional())\n .output(z.array(productListItemSchema))\n\nexport const getProductContract = oc\n .route({ method: \"GET\", path: \"/products/:handle\", tags: [\"Products\"] })\n .input(z.object({ handle: z.string().trim().min(1) }))\n .output(productDetailsSchema.nullable())\n\nexport const productsContract = {\n list: listProductsContract,\n get: getProductContract,\n}\n","import { createORPCClient } from \"@orpc/client\"\nimport type {\n ContractRouterClient,\n InferContractRouterInputs,\n InferContractRouterOutputs,\n} from \"@orpc/contract\"\nimport { OpenAPILink } from \"@orpc/openapi-client/fetch\"\n\nimport { customersContract } from \"./customers\"\nimport { ordersContract } from \"./orders\"\nimport { productsContract } from \"./products\"\n\nexport const contract = {\n customers: customersContract,\n orders: ordersContract,\n products: productsContract,\n}\n\nexport type Contract = typeof contract\nexport type ContractInputs = InferContractRouterInputs<Contract>\nexport type ContractOutputs = InferContractRouterOutputs<Contract>\nexport type RestaleClient = ContractRouterClient<Contract>\n\nexport type RestaleOptions = {\n baseUrl?: string\n headers?: Record<string, string>\n fetch?: typeof fetch\n}\n\nconst DEFAULT_BASE_URL = \"https://api.restale.dev\"\n\nexport function createRestaleClient(\n apiKey: string,\n options: RestaleOptions = {}\n): RestaleClient {\n const link = new OpenAPILink(contract, {\n url: options.baseUrl ?? DEFAULT_BASE_URL,\n headers: () => ({\n \"x-api-key\": apiKey,\n ...options.headers,\n }),\n fetch: options.fetch,\n })\n\n return createORPCClient(link)\n}\n\nexport class Restale {\n readonly customers: RestaleClient[\"customers\"]\n readonly orders: RestaleClient[\"orders\"]\n readonly products: RestaleClient[\"products\"]\n\n constructor(apiKey: string, options: RestaleOptions = {}) {\n const client = createRestaleClient(apiKey, options)\n this.customers = client.customers\n this.orders = client.orders\n this.products = client.products\n }\n}\n\nexport * from \"./customers/addresses/schemas\"\nexport * from \"./customers/schemas\"\nexport * from \"./orders/schemas\"\nexport * from \"./products/schemas\"\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,EAAE,OAAO;CACrC,IAAI,EAAE,QAAQ;CACd,OAAO,EAAE,OAAO;CAChB,MAAM,EAAE,QAAQ;CAChB,eAAe,EAAE,SAAS;CAC1B,OAAO,EAAE,QAAQ,CAAC,UAAU;CAC5B,WAAW,EAAE,QAAQ;CACrB,WAAW,EAAE,QAAQ;CACtB,CAAC;AAEF,MAAa,yBAAyB,EAAE,OAAO;CAC7C,OAAO,EAAE,QAAQ;CACjB,WAAW,EAAE,QAAQ;CACrB,UAAU;CACX,CAAC;AAEF,MAAa,WAAW,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,KAAK,EAAE,CAAC;;;AChBzD,MAAM,oBAAoB,EAAE,QAAQ,GAAG,CAAC,gBAAgB,KAAA,EAAU;AAElE,MAAM,0BAA0B,OA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