@develemit/commerce-contracts 0.2.0 → 0.4.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.cjs +293 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +241 -3
- package/dist/index.d.ts +241 -3
- package/dist/index.js +276 -124
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,12 +20,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
adminDiscountListQuerySchema: () => adminDiscountListQuerySchema,
|
|
24
|
+
adminDiscountPageSchema: () => adminDiscountPageSchema,
|
|
23
25
|
adminOrderDetailSchema: () => adminOrderDetailSchema,
|
|
24
26
|
adminOrderListItemSchema: () => adminOrderListItemSchema,
|
|
25
27
|
adminOrderListQuerySchema: () => adminOrderListQuerySchema,
|
|
26
28
|
adminOrderPageSchema: () => adminOrderPageSchema,
|
|
27
29
|
adminProductImageSchema: () => adminProductImageSchema,
|
|
28
30
|
adminProductInputSchema: () => adminProductInputSchema,
|
|
31
|
+
adminProductListQuerySchema: () => adminProductListQuerySchema,
|
|
32
|
+
adminProductPageSchema: () => adminProductPageSchema,
|
|
29
33
|
adminProductPatchSchema: () => adminProductPatchSchema,
|
|
30
34
|
adminProductSchema: () => adminProductSchema,
|
|
31
35
|
availabilitySchema: () => availabilitySchema,
|
|
@@ -34,6 +38,16 @@ __export(index_exports, {
|
|
|
34
38
|
checkoutConflictSchema: () => checkoutConflictSchema,
|
|
35
39
|
checkoutRequestSchema: () => checkoutRequestSchema,
|
|
36
40
|
checkoutResponseSchema: () => checkoutResponseSchema,
|
|
41
|
+
discountCodeSchema: () => discountCodeSchema,
|
|
42
|
+
discountInputSchema: () => discountInputSchema,
|
|
43
|
+
discountPatchSchema: () => discountPatchSchema,
|
|
44
|
+
discountPreviewRequestSchema: () => discountPreviewRequestSchema,
|
|
45
|
+
discountPreviewSchema: () => discountPreviewSchema,
|
|
46
|
+
discountRejectionReasonSchema: () => discountRejectionReasonSchema,
|
|
47
|
+
discountRejectionSchema: () => discountRejectionSchema,
|
|
48
|
+
discountSchema: () => discountSchema,
|
|
49
|
+
discountStatusSchema: () => discountStatusSchema,
|
|
50
|
+
discountTypeSchema: () => discountTypeSchema,
|
|
37
51
|
imageOrderInputSchema: () => imageOrderInputSchema,
|
|
38
52
|
moneySchema: () => moneySchema,
|
|
39
53
|
orderAddressSchema: () => orderAddressSchema,
|
|
@@ -42,6 +56,9 @@ __export(index_exports, {
|
|
|
42
56
|
orderRefundSchema: () => orderRefundSchema,
|
|
43
57
|
orderStatusSchema: () => orderStatusSchema,
|
|
44
58
|
orderSummarySchema: () => orderSummarySchema,
|
|
59
|
+
productCardPageSchema: () => productCardPageSchema,
|
|
60
|
+
productCardSchema: () => productCardSchema,
|
|
61
|
+
productImagePatchSchema: () => productImagePatchSchema,
|
|
45
62
|
productImageSchema: () => productImageSchema,
|
|
46
63
|
productListQuerySchema: () => productListQuerySchema,
|
|
47
64
|
productSchema: () => productSchema,
|
|
@@ -82,6 +99,17 @@ var productSchema = import_zod2.z.object({
|
|
|
82
99
|
availability: availabilitySchema,
|
|
83
100
|
featured: import_zod2.z.boolean()
|
|
84
101
|
});
|
|
102
|
+
var productCardSchema = productSchema.pick({
|
|
103
|
+
id: true,
|
|
104
|
+
slug: true,
|
|
105
|
+
name: true,
|
|
106
|
+
priceCents: true,
|
|
107
|
+
currency: true,
|
|
108
|
+
category: true,
|
|
109
|
+
quantity: true,
|
|
110
|
+
availability: true,
|
|
111
|
+
featured: true
|
|
112
|
+
}).extend({ images: import_zod2.z.array(productImageSchema).max(1) });
|
|
85
113
|
var categorySchema = import_zod2.z.object({
|
|
86
114
|
slug: import_zod2.z.string().min(1),
|
|
87
115
|
label: import_zod2.z.string().min(1),
|
|
@@ -89,7 +117,13 @@ var categorySchema = import_zod2.z.object({
|
|
|
89
117
|
});
|
|
90
118
|
var productListQuerySchema = import_zod2.z.object({
|
|
91
119
|
category: import_zod2.z.string().min(1).optional(),
|
|
92
|
-
featured: import_zod2.z.boolean().optional()
|
|
120
|
+
featured: import_zod2.z.boolean().optional(),
|
|
121
|
+
limit: import_zod2.z.coerce.number().int().min(1).max(100).default(48),
|
|
122
|
+
cursor: import_zod2.z.string().min(1).optional()
|
|
123
|
+
});
|
|
124
|
+
var productCardPageSchema = import_zod2.z.object({
|
|
125
|
+
items: import_zod2.z.array(productCardSchema),
|
|
126
|
+
nextCursor: import_zod2.z.string().nullable()
|
|
93
127
|
});
|
|
94
128
|
|
|
95
129
|
// src/cart.ts
|
|
@@ -106,8 +140,80 @@ var cartLineSchema = import_zod3.z.object({
|
|
|
106
140
|
});
|
|
107
141
|
|
|
108
142
|
// src/checkout.ts
|
|
143
|
+
var import_zod5 = require("zod");
|
|
144
|
+
|
|
145
|
+
// src/discount.ts
|
|
109
146
|
var import_zod4 = require("zod");
|
|
110
|
-
var
|
|
147
|
+
var discountTypeSchema = import_zod4.z.enum(["percent", "fixed"]);
|
|
148
|
+
var discountCodeSchema = import_zod4.z.string().transform((value) => value.trim().toUpperCase()).pipe(
|
|
149
|
+
import_zod4.z.string().min(1).max(40).regex(/^[A-Z0-9_-]+$/)
|
|
150
|
+
);
|
|
151
|
+
var limitFields = {
|
|
152
|
+
minSubtotalCents: import_zod4.z.number().int().positive().nullable().optional(),
|
|
153
|
+
startsAt: import_zod4.z.string().min(1).nullable().optional(),
|
|
154
|
+
endsAt: import_zod4.z.string().min(1).nullable().optional(),
|
|
155
|
+
maxRedemptions: import_zod4.z.number().int().positive().nullable().optional(),
|
|
156
|
+
active: import_zod4.z.boolean()
|
|
157
|
+
};
|
|
158
|
+
var discountValueFields = {
|
|
159
|
+
type: discountTypeSchema,
|
|
160
|
+
percentOff: import_zod4.z.number().int().min(1).max(100).nullable().optional(),
|
|
161
|
+
amountOffCents: import_zod4.z.number().int().positive().nullable().optional(),
|
|
162
|
+
currency: import_zod4.z.string().length(3).nullable().optional()
|
|
163
|
+
};
|
|
164
|
+
var hasValue = (value) => value !== void 0 && value !== null;
|
|
165
|
+
function valueFieldsAgree(input) {
|
|
166
|
+
const { type, percentOff, amountOffCents, currency } = input;
|
|
167
|
+
if (type === "percent") {
|
|
168
|
+
return hasValue(percentOff) && !hasValue(amountOffCents) && !hasValue(currency);
|
|
169
|
+
}
|
|
170
|
+
if (type === "fixed") {
|
|
171
|
+
return !hasValue(percentOff) && hasValue(amountOffCents) && hasValue(currency);
|
|
172
|
+
}
|
|
173
|
+
return !(hasValue(percentOff) && hasValue(amountOffCents));
|
|
174
|
+
}
|
|
175
|
+
var valueFieldsMessage = {
|
|
176
|
+
message: "percent needs percentOff only; fixed needs amountOffCents and currency only",
|
|
177
|
+
path: ["type"]
|
|
178
|
+
};
|
|
179
|
+
var discountSchema = import_zod4.z.object({
|
|
180
|
+
id: import_zod4.z.string().min(1),
|
|
181
|
+
code: discountCodeSchema,
|
|
182
|
+
...discountValueFields,
|
|
183
|
+
...limitFields,
|
|
184
|
+
redeemedCount: import_zod4.z.number().int().nonnegative(),
|
|
185
|
+
reservedCount: import_zod4.z.number().int().nonnegative(),
|
|
186
|
+
createdAt: import_zod4.z.string().min(1)
|
|
187
|
+
});
|
|
188
|
+
var discountInputSchema = import_zod4.z.object({
|
|
189
|
+
code: discountCodeSchema,
|
|
190
|
+
...discountValueFields,
|
|
191
|
+
...limitFields,
|
|
192
|
+
active: limitFields.active.default(true)
|
|
193
|
+
}).refine(valueFieldsAgree, valueFieldsMessage);
|
|
194
|
+
var discountPatchSchema = import_zod4.z.object({
|
|
195
|
+
code: discountCodeSchema,
|
|
196
|
+
...discountValueFields,
|
|
197
|
+
...limitFields
|
|
198
|
+
}).partial().refine(valueFieldsAgree, valueFieldsMessage);
|
|
199
|
+
var discountStatusSchema = import_zod4.z.enum([
|
|
200
|
+
"active",
|
|
201
|
+
"inactive",
|
|
202
|
+
"scheduled",
|
|
203
|
+
"expired"
|
|
204
|
+
]);
|
|
205
|
+
var adminDiscountListQuerySchema = import_zod4.z.object({
|
|
206
|
+
status: discountStatusSchema.optional(),
|
|
207
|
+
q: import_zod4.z.string().trim().min(1).optional(),
|
|
208
|
+
cursor: import_zod4.z.string().min(1).optional(),
|
|
209
|
+
limit: import_zod4.z.coerce.number().int().min(1).max(100).default(25)
|
|
210
|
+
});
|
|
211
|
+
var adminDiscountPageSchema = import_zod4.z.object({
|
|
212
|
+
items: import_zod4.z.array(discountSchema),
|
|
213
|
+
nextCursor: import_zod4.z.string().nullable()
|
|
214
|
+
});
|
|
215
|
+
var discountPreviewRequestSchema = import_zod4.z.object({
|
|
216
|
+
code: discountCodeSchema,
|
|
111
217
|
items: import_zod4.z.array(
|
|
112
218
|
import_zod4.z.object({
|
|
113
219
|
productId: import_zod4.z.string().min(1),
|
|
@@ -115,16 +221,46 @@ var checkoutRequestSchema = import_zod4.z.object({
|
|
|
115
221
|
})
|
|
116
222
|
).min(1)
|
|
117
223
|
});
|
|
118
|
-
var
|
|
119
|
-
|
|
224
|
+
var discountPreviewSchema = import_zod4.z.object({
|
|
225
|
+
code: import_zod4.z.string().min(1),
|
|
226
|
+
discountCents: import_zod4.z.number().int().nonnegative(),
|
|
227
|
+
subtotalCents: import_zod4.z.number().int().nonnegative(),
|
|
228
|
+
currency: import_zod4.z.string().length(3)
|
|
120
229
|
});
|
|
121
|
-
var
|
|
122
|
-
|
|
230
|
+
var discountRejectionReasonSchema = import_zod4.z.enum([
|
|
231
|
+
"not_found",
|
|
232
|
+
"inactive",
|
|
233
|
+
"not_started",
|
|
234
|
+
"expired",
|
|
235
|
+
"min_subtotal",
|
|
236
|
+
"exhausted",
|
|
237
|
+
"currency"
|
|
238
|
+
]);
|
|
239
|
+
var discountRejectionSchema = import_zod4.z.object({
|
|
240
|
+
error: import_zod4.z.literal("DISCOUNT_INVALID"),
|
|
241
|
+
reason: discountRejectionReasonSchema
|
|
242
|
+
});
|
|
243
|
+
|
|
244
|
+
// src/checkout.ts
|
|
245
|
+
var checkoutRequestSchema = import_zod5.z.object({
|
|
246
|
+
items: import_zod5.z.array(
|
|
247
|
+
import_zod5.z.object({
|
|
248
|
+
productId: import_zod5.z.string().min(1),
|
|
249
|
+
quantity: import_zod5.z.number().int().positive()
|
|
250
|
+
})
|
|
251
|
+
).min(1),
|
|
252
|
+
discountCode: discountCodeSchema.optional()
|
|
253
|
+
});
|
|
254
|
+
var checkoutResponseSchema = import_zod5.z.object({
|
|
255
|
+
url: import_zod5.z.string().min(1)
|
|
256
|
+
});
|
|
257
|
+
var checkoutConflictSchema = import_zod5.z.object({
|
|
258
|
+
unavailableProductIds: import_zod5.z.array(import_zod5.z.string().min(1)).min(1)
|
|
123
259
|
});
|
|
124
260
|
|
|
125
261
|
// src/order.ts
|
|
126
|
-
var
|
|
127
|
-
var orderStatusSchema =
|
|
262
|
+
var import_zod6 = require("zod");
|
|
263
|
+
var orderStatusSchema = import_zod6.z.enum([
|
|
128
264
|
"pending",
|
|
129
265
|
"paid",
|
|
130
266
|
"shipped",
|
|
@@ -133,163 +269,183 @@ var orderStatusSchema = import_zod5.z.enum([
|
|
|
133
269
|
"needs_attention",
|
|
134
270
|
"refunded"
|
|
135
271
|
]);
|
|
136
|
-
var orderItemSchema =
|
|
137
|
-
productId:
|
|
138
|
-
name:
|
|
139
|
-
priceCents:
|
|
140
|
-
quantity:
|
|
141
|
-
});
|
|
142
|
-
var orderFulfillmentSchema =
|
|
143
|
-
carrier:
|
|
144
|
-
trackingNumber:
|
|
145
|
-
trackingUrl:
|
|
146
|
-
shippedAt:
|
|
147
|
-
});
|
|
148
|
-
var orderRefundSchema =
|
|
149
|
-
id:
|
|
150
|
-
amountCents:
|
|
151
|
-
reason:
|
|
152
|
-
restocked:
|
|
153
|
-
source:
|
|
154
|
-
status:
|
|
155
|
-
createdAt:
|
|
272
|
+
var orderItemSchema = import_zod6.z.object({
|
|
273
|
+
productId: import_zod6.z.string().min(1),
|
|
274
|
+
name: import_zod6.z.string().min(1),
|
|
275
|
+
priceCents: import_zod6.z.number().int().nonnegative(),
|
|
276
|
+
quantity: import_zod6.z.number().int().positive()
|
|
277
|
+
});
|
|
278
|
+
var orderFulfillmentSchema = import_zod6.z.object({
|
|
279
|
+
carrier: import_zod6.z.string().nullable(),
|
|
280
|
+
trackingNumber: import_zod6.z.string().nullable(),
|
|
281
|
+
trackingUrl: import_zod6.z.string().url().nullable(),
|
|
282
|
+
shippedAt: import_zod6.z.string().min(1)
|
|
283
|
+
});
|
|
284
|
+
var orderRefundSchema = import_zod6.z.object({
|
|
285
|
+
id: import_zod6.z.string().min(1),
|
|
286
|
+
amountCents: import_zod6.z.number().int().positive(),
|
|
287
|
+
reason: import_zod6.z.string().nullable(),
|
|
288
|
+
restocked: import_zod6.z.boolean(),
|
|
289
|
+
source: import_zod6.z.enum(["admin", "gateway"]),
|
|
290
|
+
status: import_zod6.z.enum(["pending", "succeeded"]),
|
|
291
|
+
createdAt: import_zod6.z.string().min(1)
|
|
156
292
|
});
|
|
157
293
|
var orderTotalsShape = {
|
|
158
|
-
id:
|
|
294
|
+
id: import_zod6.z.string().min(1),
|
|
159
295
|
status: orderStatusSchema,
|
|
160
|
-
subtotalCents:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
296
|
+
subtotalCents: import_zod6.z.number().int().nonnegative(),
|
|
297
|
+
discountCents: import_zod6.z.number().int().nonnegative().default(0),
|
|
298
|
+
discountCode: import_zod6.z.string().nullable().default(null),
|
|
299
|
+
shippingCents: import_zod6.z.number().int().nonnegative(),
|
|
300
|
+
shippingLabel: import_zod6.z.string().nullable(),
|
|
301
|
+
totalCents: import_zod6.z.number().int().nonnegative(),
|
|
302
|
+
currency: import_zod6.z.string().length(3),
|
|
303
|
+
items: import_zod6.z.array(orderItemSchema),
|
|
166
304
|
fulfillment: orderFulfillmentSchema.nullable(),
|
|
167
|
-
createdAt:
|
|
305
|
+
createdAt: import_zod6.z.string().min(1)
|
|
168
306
|
};
|
|
169
|
-
var orderSummarySchema =
|
|
170
|
-
var orderAddressSchema =
|
|
171
|
-
name:
|
|
172
|
-
line1:
|
|
173
|
-
line2:
|
|
174
|
-
city:
|
|
175
|
-
state:
|
|
176
|
-
postalCode:
|
|
177
|
-
country:
|
|
178
|
-
});
|
|
179
|
-
var orderDetailSchema =
|
|
307
|
+
var orderSummarySchema = import_zod6.z.object(orderTotalsShape);
|
|
308
|
+
var orderAddressSchema = import_zod6.z.object({
|
|
309
|
+
name: import_zod6.z.string().optional(),
|
|
310
|
+
line1: import_zod6.z.string().optional(),
|
|
311
|
+
line2: import_zod6.z.string().optional(),
|
|
312
|
+
city: import_zod6.z.string().optional(),
|
|
313
|
+
state: import_zod6.z.string().optional(),
|
|
314
|
+
postalCode: import_zod6.z.string().optional(),
|
|
315
|
+
country: import_zod6.z.string().optional()
|
|
316
|
+
});
|
|
317
|
+
var orderDetailSchema = import_zod6.z.object({
|
|
180
318
|
...orderTotalsShape,
|
|
181
|
-
email:
|
|
319
|
+
email: import_zod6.z.string().nullable(),
|
|
182
320
|
shippingAddress: orderAddressSchema.nullable()
|
|
183
321
|
});
|
|
184
322
|
|
|
185
323
|
// src/shipping.ts
|
|
186
|
-
var
|
|
187
|
-
var shippingRateSchema =
|
|
188
|
-
label:
|
|
189
|
-
amountCents:
|
|
190
|
-
currency:
|
|
191
|
-
minDays:
|
|
192
|
-
maxDays:
|
|
193
|
-
active:
|
|
194
|
-
sort:
|
|
324
|
+
var import_zod7 = require("zod");
|
|
325
|
+
var shippingRateSchema = import_zod7.z.object({
|
|
326
|
+
label: import_zod7.z.string().min(1),
|
|
327
|
+
amountCents: import_zod7.z.number().int().nonnegative(),
|
|
328
|
+
currency: import_zod7.z.string().length(3),
|
|
329
|
+
minDays: import_zod7.z.number().int().nonnegative().nullable().optional(),
|
|
330
|
+
maxDays: import_zod7.z.number().int().nonnegative().nullable().optional(),
|
|
331
|
+
active: import_zod7.z.boolean().default(true),
|
|
332
|
+
sort: import_zod7.z.number().int().default(0)
|
|
195
333
|
});
|
|
196
|
-
var shippingRatesInputSchema =
|
|
334
|
+
var shippingRatesInputSchema = import_zod7.z.array(shippingRateSchema).refine((rates) => new Set(rates.map((r) => r.label)).size === rates.length, {
|
|
197
335
|
message: "Shipping rate labels must be unique"
|
|
198
336
|
});
|
|
199
337
|
|
|
200
338
|
// src/admin.ts
|
|
201
|
-
var
|
|
202
|
-
var productStatusSchema =
|
|
203
|
-
var productFields =
|
|
204
|
-
name:
|
|
205
|
-
description:
|
|
206
|
-
materials:
|
|
207
|
-
dimensions:
|
|
208
|
-
priceCents:
|
|
209
|
-
currency:
|
|
210
|
-
category:
|
|
211
|
-
quantity:
|
|
339
|
+
var import_zod8 = require("zod");
|
|
340
|
+
var productStatusSchema = import_zod8.z.enum(["draft", "active", "archived"]);
|
|
341
|
+
var productFields = import_zod8.z.object({
|
|
342
|
+
name: import_zod8.z.string().trim().min(1),
|
|
343
|
+
description: import_zod8.z.string(),
|
|
344
|
+
materials: import_zod8.z.string().nullable().optional(),
|
|
345
|
+
dimensions: import_zod8.z.string().nullable().optional(),
|
|
346
|
+
priceCents: import_zod8.z.number().int().nonnegative(),
|
|
347
|
+
currency: import_zod8.z.string().length(3).optional(),
|
|
348
|
+
category: import_zod8.z.string().trim().min(1),
|
|
349
|
+
quantity: import_zod8.z.number().int().nonnegative(),
|
|
212
350
|
status: productStatusSchema,
|
|
213
|
-
featured:
|
|
351
|
+
featured: import_zod8.z.boolean()
|
|
214
352
|
});
|
|
215
353
|
var adminProductInputSchema = productFields.extend({
|
|
216
|
-
description:
|
|
217
|
-
quantity:
|
|
354
|
+
description: import_zod8.z.string().default(""),
|
|
355
|
+
quantity: import_zod8.z.number().int().nonnegative().default(1),
|
|
218
356
|
status: productStatusSchema.default("draft"),
|
|
219
|
-
featured:
|
|
220
|
-
});
|
|
221
|
-
var adminProductPatchSchema = productFields.partial().extend({ sold:
|
|
222
|
-
var adminProductImageSchema =
|
|
223
|
-
id:
|
|
224
|
-
url:
|
|
225
|
-
alt:
|
|
226
|
-
position:
|
|
227
|
-
});
|
|
228
|
-
var adminProductSchema =
|
|
229
|
-
id:
|
|
230
|
-
slug:
|
|
231
|
-
name:
|
|
232
|
-
description:
|
|
233
|
-
materials:
|
|
234
|
-
dimensions:
|
|
235
|
-
priceCents:
|
|
236
|
-
currency:
|
|
237
|
-
category:
|
|
238
|
-
quantity:
|
|
357
|
+
featured: import_zod8.z.boolean().default(false)
|
|
358
|
+
});
|
|
359
|
+
var adminProductPatchSchema = productFields.partial().extend({ sold: import_zod8.z.boolean().optional() });
|
|
360
|
+
var adminProductImageSchema = import_zod8.z.object({
|
|
361
|
+
id: import_zod8.z.string().min(1),
|
|
362
|
+
url: import_zod8.z.string().min(1),
|
|
363
|
+
alt: import_zod8.z.string(),
|
|
364
|
+
position: import_zod8.z.number().int().nonnegative()
|
|
365
|
+
});
|
|
366
|
+
var adminProductSchema = import_zod8.z.object({
|
|
367
|
+
id: import_zod8.z.string().min(1),
|
|
368
|
+
slug: import_zod8.z.string().min(1),
|
|
369
|
+
name: import_zod8.z.string().min(1),
|
|
370
|
+
description: import_zod8.z.string(),
|
|
371
|
+
materials: import_zod8.z.string().nullable(),
|
|
372
|
+
dimensions: import_zod8.z.string().nullable(),
|
|
373
|
+
priceCents: import_zod8.z.number().int().nonnegative(),
|
|
374
|
+
currency: import_zod8.z.string().length(3),
|
|
375
|
+
category: import_zod8.z.string().min(1),
|
|
376
|
+
quantity: import_zod8.z.number().int().nonnegative(),
|
|
239
377
|
status: productStatusSchema,
|
|
240
|
-
featured:
|
|
241
|
-
images:
|
|
378
|
+
featured: import_zod8.z.boolean(),
|
|
379
|
+
images: import_zod8.z.array(adminProductImageSchema)
|
|
242
380
|
});
|
|
243
|
-
var imageOrderInputSchema =
|
|
244
|
-
imageIds:
|
|
381
|
+
var imageOrderInputSchema = import_zod8.z.object({
|
|
382
|
+
imageIds: import_zod8.z.array(import_zod8.z.string().min(1))
|
|
383
|
+
});
|
|
384
|
+
var productImagePatchSchema = import_zod8.z.object({
|
|
385
|
+
alt: import_zod8.z.string().trim().max(500)
|
|
386
|
+
});
|
|
387
|
+
var adminProductListQuerySchema = import_zod8.z.object({
|
|
388
|
+
status: productStatusSchema.optional(),
|
|
389
|
+
stock: import_zod8.z.enum(["in", "sold"]).optional(),
|
|
390
|
+
q: import_zod8.z.string().trim().min(1).optional(),
|
|
391
|
+
cursor: import_zod8.z.string().min(1).optional(),
|
|
392
|
+
limit: import_zod8.z.coerce.number().int().min(1).max(100).default(50)
|
|
393
|
+
});
|
|
394
|
+
var adminProductPageSchema = import_zod8.z.object({
|
|
395
|
+
items: import_zod8.z.array(adminProductSchema),
|
|
396
|
+
nextCursor: import_zod8.z.string().nullable()
|
|
245
397
|
});
|
|
246
398
|
|
|
247
399
|
// src/admin-orders.ts
|
|
248
|
-
var
|
|
249
|
-
var adminOrderListQuerySchema =
|
|
400
|
+
var import_zod9 = require("zod");
|
|
401
|
+
var adminOrderListQuerySchema = import_zod9.z.object({
|
|
250
402
|
status: orderStatusSchema.optional(),
|
|
251
|
-
q:
|
|
252
|
-
hasPendingRefund:
|
|
253
|
-
cursor:
|
|
254
|
-
limit:
|
|
403
|
+
q: import_zod9.z.string().trim().min(1).optional(),
|
|
404
|
+
hasPendingRefund: import_zod9.z.enum(["true", "false"]).transform((v) => v === "true").optional(),
|
|
405
|
+
cursor: import_zod9.z.string().min(1).optional(),
|
|
406
|
+
limit: import_zod9.z.coerce.number().int().min(1).max(100).default(25)
|
|
255
407
|
});
|
|
256
|
-
var adminOrderListItemSchema =
|
|
257
|
-
id:
|
|
408
|
+
var adminOrderListItemSchema = import_zod9.z.object({
|
|
409
|
+
id: import_zod9.z.string().min(1),
|
|
258
410
|
status: orderStatusSchema,
|
|
259
|
-
email:
|
|
260
|
-
totalCents:
|
|
261
|
-
currency:
|
|
262
|
-
itemCount:
|
|
263
|
-
createdAt:
|
|
411
|
+
email: import_zod9.z.string().nullable(),
|
|
412
|
+
totalCents: import_zod9.z.number().int().nonnegative(),
|
|
413
|
+
currency: import_zod9.z.string().length(3),
|
|
414
|
+
itemCount: import_zod9.z.number().int().nonnegative(),
|
|
415
|
+
createdAt: import_zod9.z.string().min(1)
|
|
264
416
|
});
|
|
265
|
-
var adminOrderPageSchema =
|
|
266
|
-
items:
|
|
267
|
-
nextCursor:
|
|
417
|
+
var adminOrderPageSchema = import_zod9.z.object({
|
|
418
|
+
items: import_zod9.z.array(adminOrderListItemSchema),
|
|
419
|
+
nextCursor: import_zod9.z.string().nullable()
|
|
268
420
|
});
|
|
269
421
|
var adminOrderDetailSchema = orderDetailSchema.extend({
|
|
270
|
-
refunds:
|
|
271
|
-
refundedCents:
|
|
272
|
-
checkoutSessionId:
|
|
273
|
-
updatedAt:
|
|
422
|
+
refunds: import_zod9.z.array(orderRefundSchema),
|
|
423
|
+
refundedCents: import_zod9.z.number().int().nonnegative(),
|
|
424
|
+
checkoutSessionId: import_zod9.z.string().nullable(),
|
|
425
|
+
updatedAt: import_zod9.z.string().min(1)
|
|
274
426
|
});
|
|
275
|
-
var shipOrderInputSchema =
|
|
276
|
-
carrier:
|
|
277
|
-
trackingNumber:
|
|
278
|
-
trackingUrl:
|
|
427
|
+
var shipOrderInputSchema = import_zod9.z.object({
|
|
428
|
+
carrier: import_zod9.z.string().optional(),
|
|
429
|
+
trackingNumber: import_zod9.z.string().optional(),
|
|
430
|
+
trackingUrl: import_zod9.z.string().url().optional()
|
|
279
431
|
});
|
|
280
|
-
var refundOrderInputSchema =
|
|
281
|
-
amountCents:
|
|
282
|
-
reason:
|
|
283
|
-
restock:
|
|
432
|
+
var refundOrderInputSchema = import_zod9.z.object({
|
|
433
|
+
amountCents: import_zod9.z.number().int().positive().optional(),
|
|
434
|
+
reason: import_zod9.z.string().max(500).optional(),
|
|
435
|
+
restock: import_zod9.z.boolean().default(false)
|
|
284
436
|
});
|
|
285
437
|
// Annotate the CommonJS export names for ESM import in node:
|
|
286
438
|
0 && (module.exports = {
|
|
439
|
+
adminDiscountListQuerySchema,
|
|
440
|
+
adminDiscountPageSchema,
|
|
287
441
|
adminOrderDetailSchema,
|
|
288
442
|
adminOrderListItemSchema,
|
|
289
443
|
adminOrderListQuerySchema,
|
|
290
444
|
adminOrderPageSchema,
|
|
291
445
|
adminProductImageSchema,
|
|
292
446
|
adminProductInputSchema,
|
|
447
|
+
adminProductListQuerySchema,
|
|
448
|
+
adminProductPageSchema,
|
|
293
449
|
adminProductPatchSchema,
|
|
294
450
|
adminProductSchema,
|
|
295
451
|
availabilitySchema,
|
|
@@ -298,6 +454,16 @@ var refundOrderInputSchema = import_zod8.z.object({
|
|
|
298
454
|
checkoutConflictSchema,
|
|
299
455
|
checkoutRequestSchema,
|
|
300
456
|
checkoutResponseSchema,
|
|
457
|
+
discountCodeSchema,
|
|
458
|
+
discountInputSchema,
|
|
459
|
+
discountPatchSchema,
|
|
460
|
+
discountPreviewRequestSchema,
|
|
461
|
+
discountPreviewSchema,
|
|
462
|
+
discountRejectionReasonSchema,
|
|
463
|
+
discountRejectionSchema,
|
|
464
|
+
discountSchema,
|
|
465
|
+
discountStatusSchema,
|
|
466
|
+
discountTypeSchema,
|
|
301
467
|
imageOrderInputSchema,
|
|
302
468
|
moneySchema,
|
|
303
469
|
orderAddressSchema,
|
|
@@ -306,6 +472,9 @@ var refundOrderInputSchema = import_zod8.z.object({
|
|
|
306
472
|
orderRefundSchema,
|
|
307
473
|
orderStatusSchema,
|
|
308
474
|
orderSummarySchema,
|
|
475
|
+
productCardPageSchema,
|
|
476
|
+
productCardSchema,
|
|
477
|
+
productImagePatchSchema,
|
|
309
478
|
productImageSchema,
|
|
310
479
|
productListQuerySchema,
|
|
311
480
|
productSchema,
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/money.ts","../src/product.ts","../src/cart.ts","../src/checkout.ts","../src/order.ts","../src/shipping.ts","../src/admin.ts","../src/admin-orders.ts"],"sourcesContent":["export * from './money';\nexport * from './product';\nexport * from './cart';\nexport * from './checkout';\nexport * from './order';\nexport * from './shipping';\nexport * from './admin';\nexport * from './admin-orders';\n","import { z } from 'zod';\n\nexport const moneySchema = z.object({\n amountCents: z.number().int(),\n currency: z.string().length(3),\n});\n\nexport type Money = z.infer<typeof moneySchema>;\n","import { z } from 'zod';\n\nexport const productImageSchema = z.object({\n url: z.string().min(1),\n alt: z.string(),\n});\n\nexport const availabilitySchema = z.enum(['available', 'sold', 'reserved']);\n\nexport const productSchema = z.object({\n id: z.string().min(1),\n slug: z.string().min(1),\n name: z.string().min(1),\n description: z.string(),\n materials: z.string().optional(),\n dimensions: z.string().optional(),\n priceCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n category: z.string().min(1),\n images: z.array(productImageSchema),\n quantity: z.number().int().nonnegative(),\n availability: availabilitySchema,\n featured: z.boolean(),\n});\n\nexport const categorySchema = z.object({\n slug: z.string().min(1),\n label: z.string().min(1),\n count: z.number().int().nonnegative(),\n});\n\nexport const productListQuerySchema = z.object({\n category: z.string().min(1).optional(),\n featured: z.boolean().optional(),\n});\n\nexport type ProductImage = z.infer<typeof productImageSchema>;\nexport type ProductAvailability = z.infer<typeof availabilitySchema>;\nexport type Product = z.infer<typeof productSchema>;\nexport type Category = z.infer<typeof categorySchema>;\nexport type ProductListQuery = z.infer<typeof productListQuerySchema>;\n","import { z } from 'zod';\n\nexport const cartLineSchema = z.object({\n productId: z.string().min(1),\n slug: z.string().min(1),\n name: z.string().min(1),\n priceCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n imageUrl: z.string().optional(),\n quantity: z.number().int().positive(),\n maxQuantity: z.number().int().positive(),\n});\n\nexport type CartLine = z.infer<typeof cartLineSchema>;\n","import { z } from 'zod';\n\nexport const checkoutRequestSchema = z.object({\n items: z\n .array(\n z.object({\n productId: z.string().min(1),\n quantity: z.number().int().positive(),\n }),\n )\n .min(1),\n});\n\nexport const checkoutResponseSchema = z.object({\n url: z.string().min(1),\n});\n\nexport const checkoutConflictSchema = z.object({\n unavailableProductIds: z.array(z.string().min(1)).min(1),\n});\n\nexport type CheckoutRequest = z.infer<typeof checkoutRequestSchema>;\nexport type CheckoutResponse = z.infer<typeof checkoutResponseSchema>;\nexport type CheckoutConflict = z.infer<typeof checkoutConflictSchema>;\n","import { z } from 'zod';\n\nexport const orderStatusSchema = z.enum([\n 'pending',\n 'paid',\n 'shipped',\n 'cancelled',\n 'expired',\n 'needs_attention',\n 'refunded',\n]);\n\nconst orderItemSchema = z.object({\n productId: z.string().min(1),\n name: z.string().min(1),\n priceCents: z.number().int().nonnegative(),\n quantity: z.number().int().positive(),\n});\n\nexport const orderFulfillmentSchema = z.object({\n carrier: z.string().nullable(),\n trackingNumber: z.string().nullable(),\n trackingUrl: z.string().url().nullable(),\n shippedAt: z.string().min(1),\n});\n\nexport const orderRefundSchema = z.object({\n id: z.string().min(1),\n amountCents: z.number().int().positive(),\n reason: z.string().nullable(),\n restocked: z.boolean(),\n source: z.enum(['admin', 'gateway']),\n status: z.enum(['pending', 'succeeded']),\n createdAt: z.string().min(1),\n});\n\nconst orderTotalsShape = {\n id: z.string().min(1),\n status: orderStatusSchema,\n subtotalCents: z.number().int().nonnegative(),\n shippingCents: z.number().int().nonnegative(),\n shippingLabel: z.string().nullable(),\n totalCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n items: z.array(orderItemSchema),\n fulfillment: orderFulfillmentSchema.nullable(),\n createdAt: z.string().min(1),\n};\n\nexport const orderSummarySchema = z.object(orderTotalsShape);\n\nexport const orderAddressSchema = z.object({\n name: z.string().optional(),\n line1: z.string().optional(),\n line2: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n postalCode: z.string().optional(),\n country: z.string().optional(),\n});\n\nexport const orderDetailSchema = z.object({\n ...orderTotalsShape,\n email: z.string().nullable(),\n shippingAddress: orderAddressSchema.nullable(),\n});\n\nexport type OrderStatus = z.infer<typeof orderStatusSchema>;\nexport type OrderFulfillment = z.infer<typeof orderFulfillmentSchema>;\nexport type OrderRefund = z.infer<typeof orderRefundSchema>;\nexport type OrderSummary = z.infer<typeof orderSummarySchema>;\nexport type OrderAddress = z.infer<typeof orderAddressSchema>;\nexport type OrderDetail = z.infer<typeof orderDetailSchema>;\n","import { z } from 'zod';\n\nexport const shippingRateSchema = z.object({\n label: z.string().min(1),\n amountCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n minDays: z.number().int().nonnegative().nullable().optional(),\n maxDays: z.number().int().nonnegative().nullable().optional(),\n active: z.boolean().default(true),\n sort: z.number().int().default(0),\n});\n\nexport const shippingRatesInputSchema = z\n .array(shippingRateSchema)\n .refine((rates) => new Set(rates.map((r) => r.label)).size === rates.length, {\n message: 'Shipping rate labels must be unique',\n });\n\nexport type ShippingRate = z.infer<typeof shippingRateSchema>;\nexport type ShippingRateInput = z.input<typeof shippingRateSchema>;\n","import { z } from 'zod';\n\nexport const productStatusSchema = z.enum(['draft', 'active', 'archived']);\n\nconst productFields = z.object({\n name: z.string().trim().min(1),\n description: z.string(),\n materials: z.string().nullable().optional(),\n dimensions: z.string().nullable().optional(),\n priceCents: z.number().int().nonnegative(),\n currency: z.string().length(3).optional(),\n category: z.string().trim().min(1),\n quantity: z.number().int().nonnegative(),\n status: productStatusSchema,\n featured: z.boolean(),\n});\n\nexport const adminProductInputSchema = productFields.extend({\n description: z.string().default(''),\n quantity: z.number().int().nonnegative().default(1),\n status: productStatusSchema.default('draft'),\n featured: z.boolean().default(false),\n});\n\nexport const adminProductPatchSchema = productFields\n .partial()\n .extend({ sold: z.boolean().optional() });\n\nexport const adminProductImageSchema = z.object({\n id: z.string().min(1),\n url: z.string().min(1),\n alt: z.string(),\n position: z.number().int().nonnegative(),\n});\n\nexport const adminProductSchema = z.object({\n id: z.string().min(1),\n slug: z.string().min(1),\n name: z.string().min(1),\n description: z.string(),\n materials: z.string().nullable(),\n dimensions: z.string().nullable(),\n priceCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n category: z.string().min(1),\n quantity: z.number().int().nonnegative(),\n status: productStatusSchema,\n featured: z.boolean(),\n images: z.array(adminProductImageSchema),\n});\n\nexport const imageOrderInputSchema = z.object({\n imageIds: z.array(z.string().min(1)),\n});\n\nexport type ProductStatus = z.infer<typeof productStatusSchema>;\nexport type AdminProductInput = z.input<typeof adminProductInputSchema>;\nexport type AdminProductPatch = z.input<typeof adminProductPatchSchema>;\nexport type AdminProductImage = z.infer<typeof adminProductImageSchema>;\nexport type AdminProduct = z.infer<typeof adminProductSchema>;\nexport type ImageOrderInput = z.infer<typeof imageOrderInputSchema>;\n","import { z } from 'zod';\nimport {\n orderDetailSchema,\n orderRefundSchema,\n orderStatusSchema,\n} from './order';\n\nexport const adminOrderListQuerySchema = z.object({\n status: orderStatusSchema.optional(),\n q: z.string().trim().min(1).optional(),\n hasPendingRefund: z\n .enum(['true', 'false'])\n .transform((v) => v === 'true')\n .optional(),\n cursor: z.string().min(1).optional(),\n limit: z.coerce.number().int().min(1).max(100).default(25),\n});\n\nexport const adminOrderListItemSchema = z.object({\n id: z.string().min(1),\n status: orderStatusSchema,\n email: z.string().nullable(),\n totalCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n itemCount: z.number().int().nonnegative(),\n createdAt: z.string().min(1),\n});\n\nexport const adminOrderPageSchema = z.object({\n items: z.array(adminOrderListItemSchema),\n nextCursor: z.string().nullable(),\n});\n\nexport const adminOrderDetailSchema = orderDetailSchema.extend({\n refunds: z.array(orderRefundSchema),\n refundedCents: z.number().int().nonnegative(),\n checkoutSessionId: z.string().nullable(),\n updatedAt: z.string().min(1),\n});\n\nexport const shipOrderInputSchema = z.object({\n carrier: z.string().optional(),\n trackingNumber: z.string().optional(),\n trackingUrl: z.string().url().optional(),\n});\n\nexport const refundOrderInputSchema = z.object({\n amountCents: z.number().int().positive().optional(),\n reason: z.string().max(500).optional(),\n restock: z.boolean().default(false),\n});\n\nexport type AdminOrderListQuery = z.infer<typeof adminOrderListQuerySchema>;\nexport type AdminOrderListItem = z.infer<typeof adminOrderListItemSchema>;\nexport type AdminOrderPage = z.infer<typeof adminOrderPageSchema>;\nexport type AdminOrderDetail = z.infer<typeof adminOrderDetailSchema>;\nexport type ShipOrderInput = z.infer<typeof shipOrderInputSchema>;\nexport type RefundOrderInput = z.infer<typeof refundOrderInputSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBAAkB;AAEX,IAAM,cAAc,aAAE,OAAO;AAAA,EAClC,aAAa,aAAE,OAAO,EAAE,IAAI;AAAA,EAC5B,UAAU,aAAE,OAAO,EAAE,OAAO,CAAC;AAC/B,CAAC;;;ACLD,IAAAA,cAAkB;AAEX,IAAM,qBAAqB,cAAE,OAAO;AAAA,EACzC,KAAK,cAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACrB,KAAK,cAAE,OAAO;AAChB,CAAC;AAEM,IAAM,qBAAqB,cAAE,KAAK,CAAC,aAAa,QAAQ,UAAU,CAAC;AAEnE,IAAM,gBAAgB,cAAE,OAAO;AAAA,EACpC,IAAI,cAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACpB,MAAM,cAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACtB,MAAM,cAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACtB,aAAa,cAAE,OAAO;AAAA,EACtB,WAAW,cAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,YAAY,cAAE,OAAO,EAAE,SAAS;AAAA,EAChC,YAAY,cAAE,OAAO,EAAE,IAAI,EAAE,YAAY;AAAA,EACzC,UAAU,cAAE,OAAO,E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SAAS;AAAA,EACpC,aAAa,cAAE,OAAO,EAAE,IAAI,EAAE,SAAS;AACzC,CAAC;AAEM,IAAM,yBAAyB,cAAE,OAAO;AAAA,EAC7C,aAAa,cAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS;AAAA,EAClD,QAAQ,cAAE,OAAO,EAAE,IAAI,GAAG,EAAE,SAAS;AAAA,EACrC,SAAS,cAAE,QAAQ,EAAE,QAAQ,KAAK;AACpC,CAAC;","names":["import_zod","import_zod","import_zod","import_zod","import_zod","import_zod","import_zod"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/money.ts","../src/product.ts","../src/cart.ts","../src/checkout.ts","../src/discount.ts","../src/order.ts","../src/shipping.ts","../src/admin.ts","../src/admin-orders.ts"],"sourcesContent":["export * from './money';\nexport * from './product';\nexport * from './cart';\nexport * from './checkout';\nexport * from './order';\nexport * from './shipping';\nexport * from './admin';\nexport * from './admin-orders';\nexport * from './discount';\n","import { z } from 'zod';\n\nexport const moneySchema = z.object({\n amountCents: z.number().int(),\n currency: z.string().length(3),\n});\n\nexport type Money = z.infer<typeof moneySchema>;\n","import { z } from 'zod';\n\nexport const productImageSchema = z.object({\n url: z.string().min(1),\n alt: z.string(),\n});\n\nexport const availabilitySchema = z.enum(['available', 'sold', 'reserved']);\n\nexport const productSchema = z.object({\n id: z.string().min(1),\n slug: z.string().min(1),\n name: z.string().min(1),\n description: z.string(),\n materials: z.string().optional(),\n dimensions: z.string().optional(),\n priceCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n category: z.string().min(1),\n images: z.array(productImageSchema),\n quantity: z.number().int().nonnegative(),\n availability: availabilitySchema,\n featured: z.boolean(),\n});\n\nexport const productCardSchema = productSchema\n .pick({\n id: true,\n slug: true,\n name: true,\n priceCents: true,\n currency: true,\n category: true,\n quantity: true,\n availability: true,\n featured: true,\n })\n .extend({ images: z.array(productImageSchema).max(1) });\n\nexport const categorySchema = z.object({\n slug: z.string().min(1),\n label: z.string().min(1),\n count: z.number().int().nonnegative(),\n});\n\nexport const productListQuerySchema = z.object({\n category: z.string().min(1).optional(),\n featured: z.boolean().optional(),\n limit: z.coerce.number().int().min(1).max(100).default(48),\n cursor: z.string().min(1).optional(),\n});\n\nexport const productCardPageSchema = z.object({\n items: z.array(productCardSchema),\n nextCursor: z.string().nullable(),\n});\n\nexport type ProductImage = z.infer<typeof productImageSchema>;\nexport type ProductAvailability = z.infer<typeof availabilitySchema>;\nexport type Product = z.infer<typeof productSchema>;\nexport type ProductCard = z.infer<typeof productCardSchema>;\nexport type ProductCardPage = z.infer<typeof productCardPageSchema>;\nexport type Category = z.infer<typeof categorySchema>;\nexport type ProductListQuery = z.input<typeof productListQuerySchema>;\n","import { z } from 'zod';\n\nexport const cartLineSchema = z.object({\n productId: z.string().min(1),\n slug: z.string().min(1),\n name: z.string().min(1),\n priceCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n imageUrl: z.string().optional(),\n quantity: z.number().int().positive(),\n maxQuantity: z.number().int().positive(),\n});\n\nexport type CartLine = z.infer<typeof cartLineSchema>;\n","import { z } from 'zod';\nimport { discountCodeSchema } from './discount';\n\nexport const checkoutRequestSchema = z.object({\n items: z\n .array(\n z.object({\n productId: z.string().min(1),\n quantity: z.number().int().positive(),\n }),\n )\n .min(1),\n discountCode: discountCodeSchema.optional(),\n});\n\nexport const checkoutResponseSchema = z.object({\n url: z.string().min(1),\n});\n\nexport const checkoutConflictSchema = z.object({\n unavailableProductIds: z.array(z.string().min(1)).min(1),\n});\n\nexport type CheckoutRequest = z.infer<typeof checkoutRequestSchema>;\nexport type CheckoutResponse = z.infer<typeof checkoutResponseSchema>;\nexport type CheckoutConflict = z.infer<typeof checkoutConflictSchema>;\n","import { z } from 'zod';\n\nexport const discountTypeSchema = z.enum(['percent', 'fixed']);\n\nexport const discountCodeSchema = z\n .string()\n .transform((value) => value.trim().toUpperCase())\n .pipe(\n z\n .string()\n .min(1)\n .max(40)\n .regex(/^[A-Z0-9_-]+$/),\n );\n\nconst limitFields = {\n minSubtotalCents: z.number().int().positive().nullable().optional(),\n startsAt: z.string().min(1).nullable().optional(),\n endsAt: z.string().min(1).nullable().optional(),\n maxRedemptions: z.number().int().positive().nullable().optional(),\n active: z.boolean(),\n};\n\nconst discountValueFields = {\n type: discountTypeSchema,\n percentOff: z.number().int().min(1).max(100).nullable().optional(),\n amountOffCents: z.number().int().positive().nullable().optional(),\n currency: z.string().length(3).nullable().optional(),\n};\n\ntype ValueFields = {\n type?: z.infer<typeof discountTypeSchema>;\n percentOff?: number | null;\n amountOffCents?: number | null;\n currency?: string | null;\n};\n\nconst hasValue = (value: unknown) => value !== undefined && value !== null;\n\nfunction valueFieldsAgree(input: ValueFields): boolean {\n const { type, percentOff, amountOffCents, currency } = input;\n if (type === 'percent') {\n return (\n hasValue(percentOff) && !hasValue(amountOffCents) && !hasValue(currency)\n );\n }\n if (type === 'fixed') {\n return (\n !hasValue(percentOff) && hasValue(amountOffCents) && hasValue(currency)\n );\n }\n return !(hasValue(percentOff) && hasValue(amountOffCents));\n}\n\nconst valueFieldsMessage = {\n message:\n 'percent needs percentOff only; fixed needs amountOffCents and currency only',\n path: ['type'],\n};\n\nexport const discountSchema = z.object({\n id: z.string().min(1),\n code: discountCodeSchema,\n ...discountValueFields,\n ...limitFields,\n redeemedCount: z.number().int().nonnegative(),\n reservedCount: z.number().int().nonnegative(),\n createdAt: z.string().min(1),\n});\n\nexport const discountInputSchema = z\n .object({\n code: discountCodeSchema,\n ...discountValueFields,\n ...limitFields,\n active: limitFields.active.default(true),\n })\n .refine(valueFieldsAgree, valueFieldsMessage);\n\nexport const discountPatchSchema = z\n .object({\n code: discountCodeSchema,\n ...discountValueFields,\n ...limitFields,\n })\n .partial()\n .refine(valueFieldsAgree, valueFieldsMessage);\n\nexport const discountStatusSchema = z.enum([\n 'active',\n 'inactive',\n 'scheduled',\n 'expired',\n]);\n\nexport const adminDiscountListQuerySchema = z.object({\n status: discountStatusSchema.optional(),\n q: z.string().trim().min(1).optional(),\n cursor: z.string().min(1).optional(),\n limit: z.coerce.number().int().min(1).max(100).default(25),\n});\n\nexport const adminDiscountPageSchema = z.object({\n items: z.array(discountSchema),\n nextCursor: z.string().nullable(),\n});\n\nexport const discountPreviewRequestSchema = z.object({\n code: discountCodeSchema,\n items: z\n .array(\n z.object({\n productId: z.string().min(1),\n quantity: z.number().int().positive(),\n }),\n )\n .min(1),\n});\n\nexport const discountPreviewSchema = z.object({\n code: z.string().min(1),\n discountCents: z.number().int().nonnegative(),\n subtotalCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n});\n\nexport const discountRejectionReasonSchema = z.enum([\n 'not_found',\n 'inactive',\n 'not_started',\n 'expired',\n 'min_subtotal',\n 'exhausted',\n 'currency',\n]);\n\nexport const discountRejectionSchema = z.object({\n error: z.literal('DISCOUNT_INVALID'),\n reason: discountRejectionReasonSchema,\n});\n\nexport type DiscountType = z.infer<typeof discountTypeSchema>;\nexport type Discount = z.infer<typeof discountSchema>;\nexport type DiscountStatus = z.infer<typeof discountStatusSchema>;\nexport type AdminDiscountListQuery = z.infer<\n typeof adminDiscountListQuerySchema\n>;\nexport type AdminDiscountPage = z.infer<typeof adminDiscountPageSchema>;\nexport type DiscountInput = z.input<typeof discountInputSchema>;\nexport type DiscountPatch = z.input<typeof discountPatchSchema>;\nexport type DiscountPreviewRequest = z.input<\n typeof discountPreviewRequestSchema\n>;\nexport type DiscountPreview = z.infer<typeof discountPreviewSchema>;\nexport type DiscountRejectionReason = z.infer<\n typeof discountRejectionReasonSchema\n>;\nexport type DiscountRejection = z.infer<typeof discountRejectionSchema>;\n","import { z } from 'zod';\n\nexport const orderStatusSchema = z.enum([\n 'pending',\n 'paid',\n 'shipped',\n 'cancelled',\n 'expired',\n 'needs_attention',\n 'refunded',\n]);\n\nconst orderItemSchema = z.object({\n productId: z.string().min(1),\n name: z.string().min(1),\n priceCents: z.number().int().nonnegative(),\n quantity: z.number().int().positive(),\n});\n\nexport const orderFulfillmentSchema = z.object({\n carrier: z.string().nullable(),\n trackingNumber: z.string().nullable(),\n trackingUrl: z.string().url().nullable(),\n shippedAt: z.string().min(1),\n});\n\nexport const orderRefundSchema = z.object({\n id: z.string().min(1),\n amountCents: z.number().int().positive(),\n reason: z.string().nullable(),\n restocked: z.boolean(),\n source: z.enum(['admin', 'gateway']),\n status: z.enum(['pending', 'succeeded']),\n createdAt: z.string().min(1),\n});\n\nconst orderTotalsShape = {\n id: z.string().min(1),\n status: orderStatusSchema,\n subtotalCents: z.number().int().nonnegative(),\n discountCents: z.number().int().nonnegative().default(0),\n discountCode: z.string().nullable().default(null),\n shippingCents: z.number().int().nonnegative(),\n shippingLabel: z.string().nullable(),\n totalCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n items: z.array(orderItemSchema),\n fulfillment: orderFulfillmentSchema.nullable(),\n createdAt: z.string().min(1),\n};\n\nexport const orderSummarySchema = z.object(orderTotalsShape);\n\nexport const orderAddressSchema = z.object({\n name: z.string().optional(),\n line1: z.string().optional(),\n line2: z.string().optional(),\n city: z.string().optional(),\n state: z.string().optional(),\n postalCode: z.string().optional(),\n country: z.string().optional(),\n});\n\nexport const orderDetailSchema = z.object({\n ...orderTotalsShape,\n email: z.string().nullable(),\n shippingAddress: orderAddressSchema.nullable(),\n});\n\nexport type OrderStatus = z.infer<typeof orderStatusSchema>;\nexport type OrderFulfillment = z.infer<typeof orderFulfillmentSchema>;\nexport type OrderRefund = z.infer<typeof orderRefundSchema>;\nexport type OrderSummary = z.infer<typeof orderSummarySchema>;\nexport type OrderAddress = z.infer<typeof orderAddressSchema>;\nexport type OrderDetail = z.infer<typeof orderDetailSchema>;\n","import { z } from 'zod';\n\nexport const shippingRateSchema = z.object({\n label: z.string().min(1),\n amountCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n minDays: z.number().int().nonnegative().nullable().optional(),\n maxDays: z.number().int().nonnegative().nullable().optional(),\n active: z.boolean().default(true),\n sort: z.number().int().default(0),\n});\n\nexport const shippingRatesInputSchema = z\n .array(shippingRateSchema)\n .refine((rates) => new Set(rates.map((r) => r.label)).size === rates.length, {\n message: 'Shipping rate labels must be unique',\n });\n\nexport type ShippingRate = z.infer<typeof shippingRateSchema>;\nexport type ShippingRateInput = z.input<typeof shippingRateSchema>;\n","import { z } from 'zod';\n\nexport const productStatusSchema = z.enum(['draft', 'active', 'archived']);\n\nconst productFields = z.object({\n name: z.string().trim().min(1),\n description: z.string(),\n materials: z.string().nullable().optional(),\n dimensions: z.string().nullable().optional(),\n priceCents: z.number().int().nonnegative(),\n currency: z.string().length(3).optional(),\n category: z.string().trim().min(1),\n quantity: z.number().int().nonnegative(),\n status: productStatusSchema,\n featured: z.boolean(),\n});\n\nexport const adminProductInputSchema = productFields.extend({\n description: z.string().default(''),\n quantity: z.number().int().nonnegative().default(1),\n status: productStatusSchema.default('draft'),\n featured: z.boolean().default(false),\n});\n\nexport const adminProductPatchSchema = productFields\n .partial()\n .extend({ sold: z.boolean().optional() });\n\nexport const adminProductImageSchema = z.object({\n id: z.string().min(1),\n url: z.string().min(1),\n alt: z.string(),\n position: z.number().int().nonnegative(),\n});\n\nexport const adminProductSchema = z.object({\n id: z.string().min(1),\n slug: z.string().min(1),\n name: z.string().min(1),\n description: z.string(),\n materials: z.string().nullable(),\n dimensions: z.string().nullable(),\n priceCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n category: z.string().min(1),\n quantity: z.number().int().nonnegative(),\n status: productStatusSchema,\n featured: z.boolean(),\n images: z.array(adminProductImageSchema),\n});\n\nexport const imageOrderInputSchema = z.object({\n imageIds: z.array(z.string().min(1)),\n});\n\nexport const productImagePatchSchema = z.object({\n alt: z.string().trim().max(500),\n});\n\nexport const adminProductListQuerySchema = z.object({\n status: productStatusSchema.optional(),\n stock: z.enum(['in', 'sold']).optional(),\n q: z.string().trim().min(1).optional(),\n cursor: z.string().min(1).optional(),\n limit: z.coerce.number().int().min(1).max(100).default(50),\n});\n\nexport const adminProductPageSchema = z.object({\n items: z.array(adminProductSchema),\n nextCursor: z.string().nullable(),\n});\n\nexport type ProductStatus = z.infer<typeof productStatusSchema>;\nexport type AdminProductInput = z.input<typeof adminProductInputSchema>;\nexport type AdminProductPatch = z.input<typeof adminProductPatchSchema>;\nexport type AdminProductImage = z.infer<typeof adminProductImageSchema>;\nexport type AdminProduct = z.infer<typeof adminProductSchema>;\nexport type ProductImagePatch = z.infer<typeof productImagePatchSchema>;\nexport type ImageOrderInput = z.infer<typeof imageOrderInputSchema>;\nexport type AdminProductListQuery = z.input<typeof adminProductListQuerySchema>;\nexport type AdminProductPage = z.infer<typeof adminProductPageSchema>;\n","import { z } from 'zod';\nimport {\n orderDetailSchema,\n orderRefundSchema,\n orderStatusSchema,\n} from './order';\n\nexport const adminOrderListQuerySchema = z.object({\n status: orderStatusSchema.optional(),\n q: z.string().trim().min(1).optional(),\n hasPendingRefund: z\n .enum(['true', 'false'])\n .transform((v) => v === 'true')\n .optional(),\n cursor: z.string().min(1).optional(),\n limit: z.coerce.number().int().min(1).max(100).default(25),\n});\n\nexport const adminOrderListItemSchema = z.object({\n id: z.string().min(1),\n status: orderStatusSchema,\n email: z.string().nullable(),\n totalCents: z.number().int().nonnegative(),\n currency: z.string().length(3),\n itemCount: z.number().int().nonnegative(),\n createdAt: z.string().min(1),\n});\n\nexport const adminOrderPageSchema = z.object({\n items: z.array(adminOrderListItemSchema),\n nextCursor: z.string().nullable(),\n});\n\nexport const adminOrderDetailSchema = orderDetailSchema.extend({\n refunds: z.array(orderRefundSchema),\n refundedCents: z.number().int().nonnegative(),\n checkoutSessionId: z.string().nullable(),\n updatedAt: z.string().min(1),\n});\n\nexport const shipOrderInputSchema = z.object({\n carrier: z.string().optional(),\n trackingNumber: z.string().optional(),\n trackingUrl: z.string().url().optional(),\n});\n\nexport const refundOrderInputSchema = z.object({\n amountCents: z.number().int().positive().optional(),\n reason: z.string().max(500).optional(),\n restock: z.boolean().default(false),\n});\n\nexport type AdminOrderListQuery = z.infer<typeof adminOrderListQuerySchema>;\nexport type AdminOrderListItem = z.infer<typeof adminOrderListItemSchema>;\nexport type AdminOrderPage = z.infer<typeof adminOrderPageSchema>;\nexport type AdminOrderDetail = z.infer<typeof adminOrderDetailSchema>;\nexport type ShipOrderInput = z.infer<typeof shipOrderInputSchema>;\nexport type RefundOrderInput = z.infer<typeof refundOrderInputSchema>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,iBAAkB;AAEX,IAAM,cAAc,aAAE,OAAO;AAAA,EAClC,aAAa,aAAE,OAAO,EAAE,IAAI;AAAA,EAC5B,UAAU,aAAE,OAAO,EAAE,OAAO,CAAC;AAC/B,CAAC;;;ACLD,IAAAA,cAAkB;AAEX,IAAM,qBAAqB,cAAE,OAAO;AAAA,EACzC,KAAK,cAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACrB,KAAK,cAAE,OAAO;AAChB,CAAC;AAEM,IAAM,qBAAqB,cAAE,KAAK,CAAC,aAAa,QAAQ,UAAU,CAAC;AAEnE,IAAM,gBAAgB,cAAE,OAAO;AAAA,EACpC,IAAI,cAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACpB,MAAM,cAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACtB,MAAM,cAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACtB,aAAa,cAAE,OAAO;AAAA,EACtB,WAAW,cAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,YAAY,cAAE,OAAO,EAAE,SAAS;AAAA,EAChC,YAAY,cAAE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