restale 0.1.0 → 0.2.0
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 +1411 -6
- package/dist/index.mjs +454 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +22 -17
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,363 @@ 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(["delivery", "pickup"]);
|
|
151
|
+
const orderPaymentProviderSchema = z.enum(["cod"]);
|
|
152
|
+
const cartVariantModifierSchema = z.object({
|
|
153
|
+
modifierId: z.uuid(),
|
|
154
|
+
quantity: z.number().int().min(1).default(1)
|
|
155
|
+
});
|
|
156
|
+
const cartVariantItemSchema = z.object({
|
|
157
|
+
kind: z.literal("variant"),
|
|
158
|
+
variantId: z.uuid(),
|
|
159
|
+
quantity: z.number().int().min(1),
|
|
160
|
+
modifiers: z.array(cartVariantModifierSchema).default([]),
|
|
161
|
+
notes: z.string().trim().max(500).nullish()
|
|
162
|
+
});
|
|
163
|
+
const cartDealChoiceSchema = z.object({
|
|
164
|
+
dealChoiceGroupId: z.uuid(),
|
|
165
|
+
variantId: z.uuid(),
|
|
166
|
+
quantity: z.number().int().min(1).default(1)
|
|
167
|
+
});
|
|
168
|
+
const cartDealItemSchema = z.object({
|
|
169
|
+
kind: z.literal("deal"),
|
|
170
|
+
dealId: z.uuid(),
|
|
171
|
+
quantity: z.number().int().min(1),
|
|
172
|
+
choices: z.array(cartDealChoiceSchema).default([]),
|
|
173
|
+
notes: z.string().trim().max(500).nullish()
|
|
174
|
+
});
|
|
175
|
+
const cartItemSchema = z.discriminatedUnion("kind", [cartVariantItemSchema, cartDealItemSchema]);
|
|
176
|
+
const createOrderBaseInputSchema = z.object({
|
|
177
|
+
items: z.array(cartItemSchema).min(1),
|
|
178
|
+
paymentMethodId: z.uuid(),
|
|
179
|
+
contactPhone: z.string().trim().min(4).max(32),
|
|
180
|
+
notes: z.string().trim().max(500).nullish()
|
|
181
|
+
});
|
|
182
|
+
const createDeliveryOrderInputSchema = createOrderBaseInputSchema.extend({
|
|
183
|
+
fulfillmentType: z.literal("delivery"),
|
|
184
|
+
delivery: z.object({
|
|
185
|
+
customerAddressId: z.uuid(),
|
|
186
|
+
deliveryNotes: z.string().trim().max(500).nullish()
|
|
187
|
+
})
|
|
188
|
+
});
|
|
189
|
+
const createPickupOrderInputSchema = createOrderBaseInputSchema.extend({ fulfillmentType: z.literal("pickup") });
|
|
190
|
+
const createOrderInputSchema = z.discriminatedUnion("fulfillmentType", [createDeliveryOrderInputSchema, createPickupOrderInputSchema]);
|
|
191
|
+
const createdOrderRowSchema = z.object({
|
|
192
|
+
id: z.uuid(),
|
|
193
|
+
organizationId: z.string(),
|
|
194
|
+
customerId: z.string().nullable(),
|
|
195
|
+
orderNumber: z.string(),
|
|
196
|
+
channel: orderChannelSchema,
|
|
197
|
+
fulfillmentType: orderFulfillmentTypeSchema,
|
|
198
|
+
status: orderStatusSchema,
|
|
199
|
+
paymentStatus: orderPaymentStatusSchema,
|
|
200
|
+
paymentMethodId: z.uuid().nullable(),
|
|
201
|
+
paymentProvider: orderPaymentProviderSchema,
|
|
202
|
+
subtotal: z.string(),
|
|
203
|
+
deliveryFee: z.string(),
|
|
204
|
+
grandTotal: z.string(),
|
|
205
|
+
currency: z.string(),
|
|
206
|
+
contactName: z.string(),
|
|
207
|
+
contactPhone: z.string(),
|
|
208
|
+
contactEmail: z.string().nullable(),
|
|
209
|
+
notes: z.string().nullable(),
|
|
210
|
+
placedAt: z.date(),
|
|
211
|
+
confirmedAt: z.date().nullable(),
|
|
212
|
+
completedAt: z.date().nullable(),
|
|
213
|
+
cancelledAt: z.date().nullable(),
|
|
214
|
+
createdAt: z.date(),
|
|
215
|
+
updatedAt: z.date()
|
|
216
|
+
});
|
|
217
|
+
const createdOrderItemSchema = z.object({
|
|
218
|
+
id: z.uuid(),
|
|
219
|
+
orderId: z.uuid(),
|
|
220
|
+
organizationId: z.string(),
|
|
221
|
+
kind: z.enum(["variant", "deal"]),
|
|
222
|
+
variantId: z.uuid().nullable(),
|
|
223
|
+
dealId: z.uuid().nullable(),
|
|
224
|
+
productName: z.string().nullable(),
|
|
225
|
+
variantName: z.string().nullable(),
|
|
226
|
+
dealName: z.string().nullable(),
|
|
227
|
+
sku: z.string().nullable(),
|
|
228
|
+
imageUrl: z.string().nullable(),
|
|
229
|
+
unitPrice: z.string(),
|
|
230
|
+
quantity: z.number().int(),
|
|
231
|
+
modifiersTotal: z.string(),
|
|
232
|
+
lineSubtotal: z.string(),
|
|
233
|
+
notes: z.string().nullable(),
|
|
234
|
+
sortOrder: z.number().int(),
|
|
235
|
+
createdAt: z.date()
|
|
236
|
+
});
|
|
237
|
+
const createdOrderDealPartSchema = z.object({
|
|
238
|
+
id: z.uuid(),
|
|
239
|
+
orderItemId: z.uuid(),
|
|
240
|
+
kind: z.enum(["included", "chosen"]),
|
|
241
|
+
dealIncludedItemId: z.uuid().nullable(),
|
|
242
|
+
dealChoiceGroupId: z.uuid().nullable(),
|
|
243
|
+
variantId: z.uuid().nullable(),
|
|
244
|
+
groupName: z.string().nullable(),
|
|
245
|
+
variantName: z.string(),
|
|
246
|
+
priceDelta: z.string(),
|
|
247
|
+
quantity: z.number().int(),
|
|
248
|
+
sortOrder: z.number().int(),
|
|
249
|
+
createdAt: z.date()
|
|
250
|
+
});
|
|
251
|
+
const orderDeliveryOutputSchema = z.object({
|
|
252
|
+
customerAddressId: z.uuid().nullable(),
|
|
253
|
+
recipientName: z.string(),
|
|
254
|
+
phone: z.string(),
|
|
255
|
+
line1: z.string(),
|
|
256
|
+
line2: z.string().nullable(),
|
|
257
|
+
city: z.string(),
|
|
258
|
+
state: z.string(),
|
|
259
|
+
postalCode: z.string(),
|
|
260
|
+
country: z.string(),
|
|
261
|
+
lat: z.string().nullable(),
|
|
262
|
+
lng: z.string().nullable(),
|
|
263
|
+
deliveryNotes: z.string().nullable()
|
|
264
|
+
});
|
|
265
|
+
const createOrderOutputSchema = z.object({
|
|
266
|
+
order: createdOrderRowSchema,
|
|
267
|
+
delivery: orderDeliveryOutputSchema.nullable(),
|
|
268
|
+
items: z.array(createdOrderItemSchema),
|
|
269
|
+
dealParts: z.array(createdOrderDealPartSchema)
|
|
270
|
+
});
|
|
271
|
+
const orderItemModifierOutputSchema = z.object({
|
|
272
|
+
id: z.uuid(),
|
|
273
|
+
modifierId: z.uuid().nullable(),
|
|
274
|
+
modifierGroupId: z.uuid().nullable(),
|
|
275
|
+
groupName: z.string(),
|
|
276
|
+
modifierName: z.string(),
|
|
277
|
+
priceDelta: z.string(),
|
|
278
|
+
quantity: z.number().int()
|
|
279
|
+
});
|
|
280
|
+
const orderItemDealPartOutputSchema = z.object({
|
|
281
|
+
id: z.uuid(),
|
|
282
|
+
kind: z.enum(["included", "chosen"]),
|
|
283
|
+
dealIncludedItemId: z.uuid().nullable(),
|
|
284
|
+
dealChoiceGroupId: z.uuid().nullable(),
|
|
285
|
+
variantId: z.uuid().nullable(),
|
|
286
|
+
groupName: z.string().nullable(),
|
|
287
|
+
variantName: z.string(),
|
|
288
|
+
priceDelta: z.string(),
|
|
289
|
+
quantity: z.number().int()
|
|
290
|
+
});
|
|
291
|
+
const orderItemOutputSchema = z.object({
|
|
292
|
+
id: z.uuid(),
|
|
293
|
+
kind: z.enum(["variant", "deal"]),
|
|
294
|
+
variantId: z.uuid().nullable(),
|
|
295
|
+
dealId: z.uuid().nullable(),
|
|
296
|
+
productName: z.string().nullable(),
|
|
297
|
+
variantName: z.string().nullable(),
|
|
298
|
+
dealName: z.string().nullable(),
|
|
299
|
+
sku: z.string().nullable(),
|
|
300
|
+
imageUrl: z.string().nullable(),
|
|
301
|
+
unitPrice: z.string(),
|
|
302
|
+
quantity: z.number().int(),
|
|
303
|
+
modifiersTotal: z.string(),
|
|
304
|
+
lineSubtotal: z.string(),
|
|
305
|
+
notes: z.string().nullable(),
|
|
306
|
+
modifiers: z.array(orderItemModifierOutputSchema),
|
|
307
|
+
dealParts: z.array(orderItemDealPartOutputSchema)
|
|
308
|
+
});
|
|
309
|
+
const orderSummarySchema = z.object({
|
|
310
|
+
id: z.uuid(),
|
|
311
|
+
orderNumber: z.string(),
|
|
312
|
+
status: orderStatusSchema,
|
|
313
|
+
paymentStatus: orderPaymentStatusSchema,
|
|
314
|
+
fulfillmentType: orderFulfillmentTypeSchema,
|
|
315
|
+
subtotal: z.string(),
|
|
316
|
+
deliveryFee: z.string(),
|
|
317
|
+
grandTotal: z.string(),
|
|
318
|
+
currency: z.string(),
|
|
319
|
+
placedAt: z.string(),
|
|
320
|
+
createdAt: z.string()
|
|
321
|
+
});
|
|
322
|
+
const orderDetailSchema = orderSummarySchema.extend({
|
|
323
|
+
channel: orderChannelSchema,
|
|
324
|
+
paymentProvider: orderPaymentProviderSchema,
|
|
325
|
+
paymentMethodId: z.uuid().nullable(),
|
|
326
|
+
contactName: z.string(),
|
|
327
|
+
contactPhone: z.string(),
|
|
328
|
+
contactEmail: z.string().nullable(),
|
|
329
|
+
notes: z.string().nullable(),
|
|
330
|
+
confirmedAt: z.string().nullable(),
|
|
331
|
+
completedAt: z.string().nullable(),
|
|
332
|
+
cancelledAt: z.string().nullable(),
|
|
333
|
+
delivery: orderDeliveryOutputSchema.nullable(),
|
|
334
|
+
items: z.array(orderItemOutputSchema)
|
|
335
|
+
});
|
|
336
|
+
const ordersContract = {
|
|
337
|
+
create: oc.route({
|
|
338
|
+
method: "POST",
|
|
339
|
+
path: "/orders",
|
|
340
|
+
tags: ["Orders"]
|
|
341
|
+
}).input(createOrderInputSchema).output(createOrderOutputSchema),
|
|
342
|
+
list: oc.route({
|
|
343
|
+
method: "GET",
|
|
344
|
+
path: "/orders",
|
|
345
|
+
tags: ["Orders"]
|
|
346
|
+
}).input(z.object({
|
|
347
|
+
page: z.number().int().min(1).default(1),
|
|
348
|
+
pageSize: z.number().int().min(1).max(100).default(20)
|
|
349
|
+
}).optional()).output(z.object({
|
|
350
|
+
items: z.array(orderSummarySchema),
|
|
351
|
+
page: z.number().int().min(1),
|
|
352
|
+
pageSize: z.number().int().min(1).max(100),
|
|
353
|
+
hasNextPage: z.boolean()
|
|
354
|
+
})),
|
|
355
|
+
get: oc.route({
|
|
356
|
+
method: "GET",
|
|
357
|
+
path: "/orders/{id}",
|
|
358
|
+
tags: ["Orders"]
|
|
359
|
+
}).input(z.object({ id: z.uuid() })).output(orderDetailSchema)
|
|
360
|
+
};
|
|
361
|
+
//#endregion
|
|
5
362
|
//#region src/products/schemas.ts
|
|
6
363
|
const productStatusSchema = z.enum([
|
|
7
364
|
"draft",
|
|
@@ -16,7 +373,7 @@ const modifierStatusSchema = z.enum([
|
|
|
16
373
|
]);
|
|
17
374
|
const productMediaSchema = z.object({
|
|
18
375
|
id: z.uuid(),
|
|
19
|
-
|
|
376
|
+
objectKey: z.string().nullable(),
|
|
20
377
|
optionValueId: z.uuid().nullable(),
|
|
21
378
|
type: z.string(),
|
|
22
379
|
sortOrder: z.number().int()
|
|
@@ -66,18 +423,101 @@ const productListItemSchema = z.object({
|
|
|
66
423
|
variants: z.array(productVariantSchema)
|
|
67
424
|
});
|
|
68
425
|
const productDetailsSchema = productListItemSchema.extend({ variants: z.array(productVariantWithModifiersSchema) });
|
|
69
|
-
|
|
70
|
-
//#region src/index.ts
|
|
71
|
-
const contract = { products: {
|
|
426
|
+
const productsContract = {
|
|
72
427
|
list: oc.route({
|
|
73
428
|
method: "GET",
|
|
74
|
-
path: "/products"
|
|
429
|
+
path: "/products",
|
|
430
|
+
tags: ["Products"]
|
|
75
431
|
}).input(z.object({}).optional()).output(z.array(productListItemSchema)),
|
|
76
432
|
get: oc.route({
|
|
77
433
|
method: "GET",
|
|
78
|
-
path: "/products/:handle"
|
|
434
|
+
path: "/products/:handle",
|
|
435
|
+
tags: ["Products"]
|
|
79
436
|
}).input(z.object({ handle: z.string().trim().min(1) })).output(productDetailsSchema.nullable())
|
|
80
|
-
}
|
|
437
|
+
};
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/store/schemas.ts
|
|
440
|
+
const storeAvailabilityStatusSchema = z.enum(["open", "closed"]);
|
|
441
|
+
const storeAvailabilityReasonSchema = z.enum([
|
|
442
|
+
"open",
|
|
443
|
+
"paused",
|
|
444
|
+
"outside_hours",
|
|
445
|
+
"not_configured"
|
|
446
|
+
]);
|
|
447
|
+
const storeFulfillmentTypeSchema = z.enum(["delivery", "pickup"]);
|
|
448
|
+
const storePaymentProviderSchema = z.enum(["cod"]);
|
|
449
|
+
const storeTimingIntervalSchema = z.object({
|
|
450
|
+
dayOfWeek: z.number().int().min(0).max(6),
|
|
451
|
+
opensAtMinute: z.number().int().min(0).max(1439),
|
|
452
|
+
closesAtMinute: z.number().int().min(1).max(2880),
|
|
453
|
+
sortOrder: z.number().int().min(0)
|
|
454
|
+
});
|
|
455
|
+
const storeAvailabilitySchema = z.object({
|
|
456
|
+
status: storeAvailabilityStatusSchema,
|
|
457
|
+
reason: storeAvailabilityReasonSchema,
|
|
458
|
+
timeZone: z.string(),
|
|
459
|
+
serverTime: z.string(),
|
|
460
|
+
pause: z.object({
|
|
461
|
+
onlineOrderingPaused: z.boolean(),
|
|
462
|
+
pausedUntil: z.string().nullable()
|
|
463
|
+
}),
|
|
464
|
+
weeklySchedule: z.array(storeTimingIntervalSchema)
|
|
465
|
+
});
|
|
466
|
+
const storeFulfillmentConfigSchema = z.object({
|
|
467
|
+
fulfillmentType: storeFulfillmentTypeSchema,
|
|
468
|
+
enabled: z.boolean()
|
|
469
|
+
});
|
|
470
|
+
const storeDeliveryConfigSchema = z.object({ fee: z.string() });
|
|
471
|
+
const storePickupConfigSchema = z.object({ instructions: z.string().nullable() });
|
|
472
|
+
const storeFulfillmentSettingsSchema = z.object({
|
|
473
|
+
fulfillments: z.object({
|
|
474
|
+
delivery: storeFulfillmentConfigSchema.nullable(),
|
|
475
|
+
pickup: storeFulfillmentConfigSchema.nullable()
|
|
476
|
+
}),
|
|
477
|
+
enabledFulfillmentTypes: z.array(storeFulfillmentTypeSchema),
|
|
478
|
+
deliveryConfig: storeDeliveryConfigSchema.nullable(),
|
|
479
|
+
pickupConfig: storePickupConfigSchema.nullable()
|
|
480
|
+
});
|
|
481
|
+
const storePaymentMethodFulfillmentConfigSchema = z.object({
|
|
482
|
+
fulfillmentType: storeFulfillmentTypeSchema,
|
|
483
|
+
enabled: z.boolean()
|
|
484
|
+
});
|
|
485
|
+
const storePaymentMethodSchema = z.object({
|
|
486
|
+
id: z.uuid(),
|
|
487
|
+
provider: storePaymentProviderSchema,
|
|
488
|
+
displayName: z.string(),
|
|
489
|
+
instructions: z.string().nullable(),
|
|
490
|
+
supportedFulfillmentTypes: z.array(storeFulfillmentTypeSchema),
|
|
491
|
+
enabledFulfillmentTypes: z.array(storeFulfillmentTypeSchema),
|
|
492
|
+
fulfillments: z.object({
|
|
493
|
+
delivery: storePaymentMethodFulfillmentConfigSchema.nullable(),
|
|
494
|
+
pickup: storePaymentMethodFulfillmentConfigSchema.nullable()
|
|
495
|
+
})
|
|
496
|
+
});
|
|
497
|
+
//#endregion
|
|
498
|
+
//#region src/index.ts
|
|
499
|
+
const contract = {
|
|
500
|
+
customers: customersContract,
|
|
501
|
+
orders: ordersContract,
|
|
502
|
+
products: productsContract,
|
|
503
|
+
store: {
|
|
504
|
+
getAvailability: oc.route({
|
|
505
|
+
method: "GET",
|
|
506
|
+
path: "/store/availability",
|
|
507
|
+
tags: ["Store"]
|
|
508
|
+
}).input(z.object({}).optional()).output(storeAvailabilitySchema),
|
|
509
|
+
getFulfillments: oc.route({
|
|
510
|
+
method: "GET",
|
|
511
|
+
path: "/store/fulfillments",
|
|
512
|
+
tags: ["Store"]
|
|
513
|
+
}).input(z.object({}).optional()).output(storeFulfillmentSettingsSchema),
|
|
514
|
+
listPaymentMethods: oc.route({
|
|
515
|
+
method: "GET",
|
|
516
|
+
path: "/store/payment-methods",
|
|
517
|
+
tags: ["Store"]
|
|
518
|
+
}).input(z.object({ fulfillmentType: storeFulfillmentTypeSchema.optional() }).optional()).output(z.array(storePaymentMethodSchema))
|
|
519
|
+
}
|
|
520
|
+
};
|
|
81
521
|
const DEFAULT_BASE_URL = "https://api.restale.dev";
|
|
82
522
|
function createRestaleClient(apiKey, options = {}) {
|
|
83
523
|
return createORPCClient(new OpenAPILink(contract, {
|
|
@@ -90,13 +530,19 @@ function createRestaleClient(apiKey, options = {}) {
|
|
|
90
530
|
}));
|
|
91
531
|
}
|
|
92
532
|
var Restale = class {
|
|
533
|
+
customers;
|
|
534
|
+
orders;
|
|
93
535
|
products;
|
|
536
|
+
store;
|
|
94
537
|
constructor(apiKey, options = {}) {
|
|
95
538
|
const client = createRestaleClient(apiKey, options);
|
|
539
|
+
this.customers = client.customers;
|
|
540
|
+
this.orders = client.orders;
|
|
96
541
|
this.products = client.products;
|
|
542
|
+
this.store = client.store;
|
|
97
543
|
}
|
|
98
544
|
};
|
|
99
545
|
//#endregion
|
|
100
|
-
export { Restale, contract, createRestaleClient, modifierGroupSchema, modifierSchema, modifierStatusSchema, productDetailsSchema, productListItemSchema, productMediaSchema, productOptionSchema, productOptionValueSchema, productStatusSchema, productVariantSchema, productVariantWithModifiersSchema };
|
|
546
|
+
export { Restale, addressInputSchema, addressSchema, addressUpdateInputSchema, cartDealChoiceSchema, cartDealItemSchema, cartItemSchema, cartVariantItemSchema, cartVariantModifierSchema, contract, createDeliveryOrderInputSchema, createOrderBaseInputSchema, createOrderInputSchema, createOrderOutputSchema, createPickupOrderInputSchema, createRestaleClient, createdOrderDealPartSchema, createdOrderItemSchema, createdOrderRowSchema, 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, storeAvailabilityReasonSchema, storeAvailabilitySchema, storeAvailabilityStatusSchema, storeDeliveryConfigSchema, storeFulfillmentConfigSchema, storeFulfillmentSettingsSchema, storeFulfillmentTypeSchema, storePaymentMethodFulfillmentConfigSchema, storePaymentMethodSchema, storePaymentProviderSchema, storePickupConfigSchema, storeTimingIntervalSchema };
|
|
101
547
|
|
|
102
548
|
//# 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,CAAC;AAE9E,MAAa,qBAAqB,EAAE,OAAO;CACzC,IAAI,EAAE,MAAM;CACZ,KAAK,EAAE,QAAQ;CACf,eAAe,EAAE,MAAM,CAAC,UAAU;CAClC,MAAM,EAAE,QAAQ;CAChB,WAAW,EAAE,QAAQ,CAAC,KAAK;CAC5B,CAAC;AAEF,MAAa,2B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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/store/schemas.ts","../src/store/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\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([\"delivery\", \"pickup\"])\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 createOrderBaseInputSchema = z.object({\n items: z.array(cartItemSchema).min(1),\n paymentMethodId: z.uuid(),\n contactPhone: z.string().trim().min(4).max(32),\n notes: z.string().trim().max(500).nullish(),\n})\n\nexport const createDeliveryOrderInputSchema = createOrderBaseInputSchema.extend({\n fulfillmentType: z.literal(\"delivery\"),\n delivery: z.object({\n customerAddressId: z.uuid(),\n deliveryNotes: z.string().trim().max(500).nullish(),\n }),\n})\n\nexport const createPickupOrderInputSchema = createOrderBaseInputSchema.extend({\n fulfillmentType: z.literal(\"pickup\"),\n})\n\nexport const createOrderInputSchema = z.discriminatedUnion(\"fulfillmentType\", [\n createDeliveryOrderInputSchema,\n createPickupOrderInputSchema,\n])\n\nexport const createdOrderRowSchema = z.object({\n id: z.uuid(),\n organizationId: z.string(),\n customerId: z.string().nullable(),\n orderNumber: z.string(),\n channel: orderChannelSchema,\n fulfillmentType: orderFulfillmentTypeSchema,\n status: orderStatusSchema,\n paymentStatus: orderPaymentStatusSchema,\n paymentMethodId: z.uuid().nullable(),\n paymentProvider: orderPaymentProviderSchema,\n subtotal: z.string(),\n deliveryFee: z.string(),\n grandTotal: z.string(),\n currency: z.string(),\n contactName: z.string(),\n contactPhone: z.string(),\n contactEmail: z.string().nullable(),\n notes: z.string().nullable(),\n placedAt: z.date(),\n confirmedAt: z.date().nullable(),\n completedAt: z.date().nullable(),\n cancelledAt: z.date().nullable(),\n createdAt: z.date(),\n updatedAt: z.date(),\n})\n\nexport const createdOrderItemSchema = z.object({\n id: z.uuid(),\n orderId: z.uuid(),\n organizationId: z.string(),\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 sortOrder: z.number().int(),\n createdAt: z.date(),\n})\n\nexport const createdOrderDealPartSchema = z.object({\n id: z.uuid(),\n orderItemId: 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 sortOrder: z.number().int(),\n createdAt: z.date(),\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 createOrderOutputSchema = z.object({\n order: createdOrderRowSchema,\n delivery: orderDeliveryOutputSchema.nullable(),\n items: z.array(createdOrderItemSchema),\n dealParts: z.array(createdOrderDealPartSchema),\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 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 CreateOrderOutput = z.infer<typeof createOrderOutputSchema>\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 createOrderOutputSchema,\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(createOrderOutputSchema)\n\nexport const listOrdersContract = oc\n .route({ method: \"GET\", path: \"/orders\", tags: [\"Orders\"] })\n .input(\n z\n .object({\n page: z.number().int().min(1).default(1),\n pageSize: z.number().int().min(1).max(100).default(20),\n })\n .optional()\n )\n .output(\n z.object({\n items: z.array(orderSummarySchema),\n page: z.number().int().min(1),\n pageSize: z.number().int().min(1).max(100),\n hasNextPage: z.boolean(),\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 objectKey: z.string().nullable(),\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 * as z from \"zod\"\n\nexport const storeAvailabilityStatusSchema = z.enum([\"open\", \"closed\"])\n\nexport const storeAvailabilityReasonSchema = z.enum([\n \"open\",\n \"paused\",\n \"outside_hours\",\n \"not_configured\",\n])\n\nexport const storeFulfillmentTypeSchema = z.enum([\"delivery\", \"pickup\"])\nexport const storePaymentProviderSchema = z.enum([\"cod\"])\n\nexport const storeTimingIntervalSchema = z.object({\n dayOfWeek: z.number().int().min(0).max(6),\n opensAtMinute: z.number().int().min(0).max(1439),\n closesAtMinute: z.number().int().min(1).max(2880),\n sortOrder: z.number().int().min(0),\n})\n\nexport const storeAvailabilitySchema = z.object({\n status: storeAvailabilityStatusSchema,\n reason: storeAvailabilityReasonSchema,\n timeZone: z.string(),\n serverTime: z.string(),\n pause: z.object({\n onlineOrderingPaused: z.boolean(),\n pausedUntil: z.string().nullable(),\n }),\n weeklySchedule: z.array(storeTimingIntervalSchema),\n})\n\nexport const storeFulfillmentConfigSchema = z.object({\n fulfillmentType: storeFulfillmentTypeSchema,\n enabled: z.boolean(),\n})\n\nexport const storeDeliveryConfigSchema = z.object({\n fee: z.string(),\n})\n\nexport const storePickupConfigSchema = z.object({\n instructions: z.string().nullable(),\n})\n\nexport const storeFulfillmentSettingsSchema = z.object({\n fulfillments: z.object({\n delivery: storeFulfillmentConfigSchema.nullable(),\n pickup: storeFulfillmentConfigSchema.nullable(),\n }),\n enabledFulfillmentTypes: z.array(storeFulfillmentTypeSchema),\n deliveryConfig: storeDeliveryConfigSchema.nullable(),\n pickupConfig: storePickupConfigSchema.nullable(),\n})\n\nexport const storePaymentMethodFulfillmentConfigSchema = z.object({\n fulfillmentType: storeFulfillmentTypeSchema,\n enabled: z.boolean(),\n})\n\nexport const storePaymentMethodSchema = z.object({\n id: z.uuid(),\n provider: storePaymentProviderSchema,\n displayName: z.string(),\n instructions: z.string().nullable(),\n supportedFulfillmentTypes: z.array(storeFulfillmentTypeSchema),\n enabledFulfillmentTypes: z.array(storeFulfillmentTypeSchema),\n fulfillments: z.object({\n delivery: storePaymentMethodFulfillmentConfigSchema.nullable(),\n pickup: storePaymentMethodFulfillmentConfigSchema.nullable(),\n }),\n})\n\nexport type StoreAvailabilityStatus = z.infer<\n typeof storeAvailabilityStatusSchema\n>\nexport type StoreAvailabilityReason = z.infer<\n typeof storeAvailabilityReasonSchema\n>\nexport type StoreFulfillmentType = z.infer<typeof storeFulfillmentTypeSchema>\nexport type StorePaymentProvider = z.infer<typeof storePaymentProviderSchema>\nexport type StoreTimingInterval = z.infer<typeof storeTimingIntervalSchema>\nexport type StoreAvailability = z.infer<typeof storeAvailabilitySchema>\nexport type StoreFulfillmentConfig = z.infer<\n typeof storeFulfillmentConfigSchema\n>\nexport type StoreDeliveryConfig = z.infer<typeof storeDeliveryConfigSchema>\nexport type StorePickupConfig = z.infer<typeof storePickupConfigSchema>\nexport type StoreFulfillmentSettings = z.infer<\n typeof storeFulfillmentSettingsSchema\n>\nexport type StorePaymentMethodFulfillmentConfig = z.infer<\n typeof storePaymentMethodFulfillmentConfigSchema\n>\nexport type StorePaymentMethod = z.infer<typeof storePaymentMethodSchema>\n","import { oc } from \"@orpc/contract\"\nimport * as z from \"zod\"\n\nimport {\n storeAvailabilitySchema,\n storeFulfillmentSettingsSchema,\n storeFulfillmentTypeSchema,\n storePaymentMethodSchema,\n} from \"./schemas\"\n\nexport const getStoreAvailabilityContract = oc\n .route({ method: \"GET\", path: \"/store/availability\", tags: [\"Store\"] })\n .input(z.object({}).optional())\n .output(storeAvailabilitySchema)\n\nexport const getStoreFulfillmentsContract = oc\n .route({ method: \"GET\", path: \"/store/fulfillments\", tags: [\"Store\"] })\n .input(z.object({}).optional())\n .output(storeFulfillmentSettingsSchema)\n\nexport const listStorePaymentMethodsContract = oc\n .route({ method: \"GET\", path: \"/store/payment-methods\", tags: [\"Store\"] })\n .input(\n z\n .object({\n fulfillmentType: storeFulfillmentTypeSchema.optional(),\n })\n .optional()\n )\n .output(z.array(storePaymentMethodSchema))\n\nexport const storeContract = {\n getAvailability: getStoreAvailabilityContract,\n getFulfillments: getStoreFulfillmentsContract,\n listPaymentMethods: listStorePaymentMethodsContract,\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\"\nimport { storeContract } from \"./store\"\n\nexport const contract = {\n customers: customersContract,\n orders: ordersContract,\n products: productsContract,\n store: storeContract,\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 readonly store: RestaleClient[\"store\"]\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 this.store = client.store\n }\n}\n\nexport * from \"./customers/addresses/schemas\"\nexport * from \"./customers/schemas\"\nexport * from \"./orders/schemas\"\nexport * from \"./products/schemas\"\nexport * from \"./store/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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;GAAO,MAAM;GAAuB,MAAM,CAAC,QAAQ;GAAE,CAAC,CACtE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,CAC9B,OAAO,wBAAwB;EAoBhC,iBAlB0C,GACzC,MAAM;GAAE,QAAQ;GAAO,MAAM;GAAuB,MAAM,CAAC,QAAQ;GAAE,CAAC,CACtE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,CAC9B,OAAO,+BAA+B;EAgBvC,oBAd6C,GAC5C,MAAM;GAAE,QAAQ;GAAO,MAAM;GAA0B,MAAM,CAAC,QAAQ;GAAE,CAAC,CACzE,MACC,EACG,OAAO,EACN,iBAAiB,2BAA2B,UAAU,EACvD,CAAC,CACD,UAAU,CACd,CACA,OAAO,EAAE,MAAM,yBAAyB,CAAC;EAM3C;CCjBA;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;CACA;CACA;CACA;CAEA,YAAY,QAAgB,UAA0B,EAAE,EAAE;EACxD,MAAM,SAAS,oBAAoB,QAAQ,QAAQ;AACnD,OAAK,YAAY,OAAO;AACxB,OAAK,SAAS,OAAO;AACrB,OAAK,WAAW,OAAO;AACvB,OAAK,QAAQ,OAAO"}
|
package/package.json
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "restale",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Typed SDK and contract for the Restale storefront API.",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "./
|
|
8
|
-
"types": "./
|
|
7
|
+
"main": "./src/index.ts",
|
|
8
|
+
"types": "./src/index.ts",
|
|
9
9
|
"exports": {
|
|
10
|
-
".":
|
|
11
|
-
"types": "./dist/index.d.mts",
|
|
12
|
-
"import": "./dist/index.mjs",
|
|
13
|
-
"default": "./dist/index.mjs"
|
|
14
|
-
}
|
|
10
|
+
".": "./src/index.ts"
|
|
15
11
|
},
|
|
16
12
|
"files": [
|
|
17
13
|
"dist",
|
|
18
14
|
"README.md"
|
|
19
15
|
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsdown",
|
|
18
|
+
"release": "pnpm publish --access public",
|
|
19
|
+
"lint": "eslint .",
|
|
20
|
+
"format": "prettier --write \"**/*.ts\"",
|
|
21
|
+
"typecheck": "tsc --noEmit"
|
|
22
|
+
},
|
|
20
23
|
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
24
|
+
"access": "public",
|
|
25
|
+
"main": "./dist/index.mjs",
|
|
26
|
+
"types": "./dist/index.d.mts",
|
|
27
|
+
"exports": {
|
|
28
|
+
".": {
|
|
29
|
+
"types": "./dist/index.d.mts",
|
|
30
|
+
"import": "./dist/index.mjs",
|
|
31
|
+
"default": "./dist/index.mjs"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
22
34
|
},
|
|
23
35
|
"dependencies": {
|
|
24
36
|
"@orpc/client": "^1.13.13",
|
|
@@ -31,12 +43,5 @@
|
|
|
31
43
|
"prettier": "^3.8.1",
|
|
32
44
|
"tsdown": "^0.21.9",
|
|
33
45
|
"typescript": "^5.9.3"
|
|
34
|
-
},
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build": "tsdown",
|
|
37
|
-
"release": "pnpm publish --access public",
|
|
38
|
-
"lint": "eslint .",
|
|
39
|
-
"format": "prettier --write \"**/*.ts\"",
|
|
40
|
-
"typecheck": "tsc --noEmit"
|
|
41
46
|
}
|
|
42
|
-
}
|
|
47
|
+
}
|