@develemit/commerce-contracts 0.3.0 → 0.6.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 +265 -131
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +160 -10
- package/dist/index.d.ts +160 -10
- package/dist/index.js +252 -131
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,8 @@ 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,
|
|
@@ -36,6 +38,16 @@ __export(index_exports, {
|
|
|
36
38
|
checkoutConflictSchema: () => checkoutConflictSchema,
|
|
37
39
|
checkoutRequestSchema: () => checkoutRequestSchema,
|
|
38
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,
|
|
39
51
|
imageOrderInputSchema: () => imageOrderInputSchema,
|
|
40
52
|
moneySchema: () => moneySchema,
|
|
41
53
|
orderAddressSchema: () => orderAddressSchema,
|
|
@@ -46,6 +58,7 @@ __export(index_exports, {
|
|
|
46
58
|
orderSummarySchema: () => orderSummarySchema,
|
|
47
59
|
productCardPageSchema: () => productCardPageSchema,
|
|
48
60
|
productCardSchema: () => productCardSchema,
|
|
61
|
+
productImagePatchSchema: () => productImagePatchSchema,
|
|
49
62
|
productImageSchema: () => productImageSchema,
|
|
50
63
|
productListQuerySchema: () => productListQuerySchema,
|
|
51
64
|
productSchema: () => productSchema,
|
|
@@ -127,8 +140,81 @@ var cartLineSchema = import_zod3.z.object({
|
|
|
127
140
|
});
|
|
128
141
|
|
|
129
142
|
// src/checkout.ts
|
|
143
|
+
var import_zod5 = require("zod");
|
|
144
|
+
|
|
145
|
+
// src/discount.ts
|
|
130
146
|
var import_zod4 = require("zod");
|
|
131
|
-
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 currencyInputSchema = import_zod4.z.string().transform((value) => value.trim().toUpperCase()).pipe(import_zod4.z.string().length(3));
|
|
152
|
+
var limitFields = {
|
|
153
|
+
minSubtotalCents: import_zod4.z.number().int().positive().nullable().optional(),
|
|
154
|
+
startsAt: import_zod4.z.string().min(1).nullable().optional(),
|
|
155
|
+
endsAt: import_zod4.z.string().min(1).nullable().optional(),
|
|
156
|
+
maxRedemptions: import_zod4.z.number().int().positive().nullable().optional(),
|
|
157
|
+
active: import_zod4.z.boolean()
|
|
158
|
+
};
|
|
159
|
+
var discountValueFields = {
|
|
160
|
+
type: discountTypeSchema,
|
|
161
|
+
percentOff: import_zod4.z.number().int().min(1).max(100).nullable().optional(),
|
|
162
|
+
amountOffCents: import_zod4.z.number().int().positive().nullable().optional(),
|
|
163
|
+
currency: currencyInputSchema.nullable().optional()
|
|
164
|
+
};
|
|
165
|
+
var hasValue = (value) => value !== void 0 && value !== null;
|
|
166
|
+
function valueFieldsAgree(input) {
|
|
167
|
+
const { type, percentOff, amountOffCents, currency } = input;
|
|
168
|
+
if (type === "percent") {
|
|
169
|
+
return hasValue(percentOff) && !hasValue(amountOffCents) && !hasValue(currency);
|
|
170
|
+
}
|
|
171
|
+
if (type === "fixed") {
|
|
172
|
+
return !hasValue(percentOff) && hasValue(amountOffCents) && hasValue(currency);
|
|
173
|
+
}
|
|
174
|
+
return !(hasValue(percentOff) && hasValue(amountOffCents));
|
|
175
|
+
}
|
|
176
|
+
var valueFieldsMessage = {
|
|
177
|
+
message: "percent needs percentOff only; fixed needs amountOffCents and currency only",
|
|
178
|
+
path: ["type"]
|
|
179
|
+
};
|
|
180
|
+
var discountSchema = import_zod4.z.object({
|
|
181
|
+
id: import_zod4.z.string().min(1),
|
|
182
|
+
code: discountCodeSchema,
|
|
183
|
+
...discountValueFields,
|
|
184
|
+
...limitFields,
|
|
185
|
+
redeemedCount: import_zod4.z.number().int().nonnegative(),
|
|
186
|
+
reservedCount: import_zod4.z.number().int().nonnegative(),
|
|
187
|
+
createdAt: import_zod4.z.string().min(1)
|
|
188
|
+
});
|
|
189
|
+
var discountInputSchema = import_zod4.z.object({
|
|
190
|
+
code: discountCodeSchema,
|
|
191
|
+
...discountValueFields,
|
|
192
|
+
...limitFields,
|
|
193
|
+
active: limitFields.active.default(true)
|
|
194
|
+
}).refine(valueFieldsAgree, valueFieldsMessage);
|
|
195
|
+
var discountPatchSchema = import_zod4.z.object({
|
|
196
|
+
code: discountCodeSchema,
|
|
197
|
+
...discountValueFields,
|
|
198
|
+
...limitFields
|
|
199
|
+
}).partial().refine(valueFieldsAgree, valueFieldsMessage);
|
|
200
|
+
var discountStatusSchema = import_zod4.z.enum([
|
|
201
|
+
"active",
|
|
202
|
+
"inactive",
|
|
203
|
+
"scheduled",
|
|
204
|
+
"expired"
|
|
205
|
+
]);
|
|
206
|
+
var adminDiscountListQuerySchema = import_zod4.z.object({
|
|
207
|
+
status: discountStatusSchema.optional(),
|
|
208
|
+
q: import_zod4.z.string().trim().min(1).optional(),
|
|
209
|
+
cursor: import_zod4.z.string().min(1).optional(),
|
|
210
|
+
limit: import_zod4.z.coerce.number().int().min(1).max(100).default(25)
|
|
211
|
+
});
|
|
212
|
+
var adminDiscountPageSchema = import_zod4.z.object({
|
|
213
|
+
items: import_zod4.z.array(discountSchema),
|
|
214
|
+
nextCursor: import_zod4.z.string().nullable()
|
|
215
|
+
});
|
|
216
|
+
var discountPreviewRequestSchema = import_zod4.z.object({
|
|
217
|
+
code: discountCodeSchema,
|
|
132
218
|
items: import_zod4.z.array(
|
|
133
219
|
import_zod4.z.object({
|
|
134
220
|
productId: import_zod4.z.string().min(1),
|
|
@@ -136,16 +222,46 @@ var checkoutRequestSchema = import_zod4.z.object({
|
|
|
136
222
|
})
|
|
137
223
|
).min(1)
|
|
138
224
|
});
|
|
139
|
-
var
|
|
140
|
-
|
|
225
|
+
var discountPreviewSchema = import_zod4.z.object({
|
|
226
|
+
code: import_zod4.z.string().min(1),
|
|
227
|
+
discountCents: import_zod4.z.number().int().nonnegative(),
|
|
228
|
+
subtotalCents: import_zod4.z.number().int().nonnegative(),
|
|
229
|
+
currency: import_zod4.z.string().length(3)
|
|
141
230
|
});
|
|
142
|
-
var
|
|
143
|
-
|
|
231
|
+
var discountRejectionReasonSchema = import_zod4.z.enum([
|
|
232
|
+
"not_found",
|
|
233
|
+
"inactive",
|
|
234
|
+
"not_started",
|
|
235
|
+
"expired",
|
|
236
|
+
"min_subtotal",
|
|
237
|
+
"exhausted",
|
|
238
|
+
"currency"
|
|
239
|
+
]);
|
|
240
|
+
var discountRejectionSchema = import_zod4.z.object({
|
|
241
|
+
error: import_zod4.z.literal("DISCOUNT_INVALID"),
|
|
242
|
+
reason: discountRejectionReasonSchema
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
// src/checkout.ts
|
|
246
|
+
var checkoutRequestSchema = import_zod5.z.object({
|
|
247
|
+
items: import_zod5.z.array(
|
|
248
|
+
import_zod5.z.object({
|
|
249
|
+
productId: import_zod5.z.string().min(1),
|
|
250
|
+
quantity: import_zod5.z.number().int().positive()
|
|
251
|
+
})
|
|
252
|
+
).min(1),
|
|
253
|
+
discountCode: discountCodeSchema.optional()
|
|
254
|
+
});
|
|
255
|
+
var checkoutResponseSchema = import_zod5.z.object({
|
|
256
|
+
url: import_zod5.z.string().min(1)
|
|
257
|
+
});
|
|
258
|
+
var checkoutConflictSchema = import_zod5.z.object({
|
|
259
|
+
unavailableProductIds: import_zod5.z.array(import_zod5.z.string().min(1)).min(1)
|
|
144
260
|
});
|
|
145
261
|
|
|
146
262
|
// src/order.ts
|
|
147
|
-
var
|
|
148
|
-
var orderStatusSchema =
|
|
263
|
+
var import_zod6 = require("zod");
|
|
264
|
+
var orderStatusSchema = import_zod6.z.enum([
|
|
149
265
|
"pending",
|
|
150
266
|
"paid",
|
|
151
267
|
"shipped",
|
|
@@ -154,168 +270,175 @@ var orderStatusSchema = import_zod5.z.enum([
|
|
|
154
270
|
"needs_attention",
|
|
155
271
|
"refunded"
|
|
156
272
|
]);
|
|
157
|
-
var orderItemSchema =
|
|
158
|
-
productId:
|
|
159
|
-
name:
|
|
160
|
-
priceCents:
|
|
161
|
-
quantity:
|
|
162
|
-
});
|
|
163
|
-
var orderFulfillmentSchema =
|
|
164
|
-
carrier:
|
|
165
|
-
trackingNumber:
|
|
166
|
-
trackingUrl:
|
|
167
|
-
shippedAt:
|
|
168
|
-
});
|
|
169
|
-
var orderRefundSchema =
|
|
170
|
-
id:
|
|
171
|
-
amountCents:
|
|
172
|
-
reason:
|
|
173
|
-
restocked:
|
|
174
|
-
source:
|
|
175
|
-
status:
|
|
176
|
-
createdAt:
|
|
273
|
+
var orderItemSchema = import_zod6.z.object({
|
|
274
|
+
productId: import_zod6.z.string().min(1),
|
|
275
|
+
name: import_zod6.z.string().min(1),
|
|
276
|
+
priceCents: import_zod6.z.number().int().nonnegative(),
|
|
277
|
+
quantity: import_zod6.z.number().int().positive()
|
|
278
|
+
});
|
|
279
|
+
var orderFulfillmentSchema = import_zod6.z.object({
|
|
280
|
+
carrier: import_zod6.z.string().nullable(),
|
|
281
|
+
trackingNumber: import_zod6.z.string().nullable(),
|
|
282
|
+
trackingUrl: import_zod6.z.string().url().nullable(),
|
|
283
|
+
shippedAt: import_zod6.z.string().min(1)
|
|
284
|
+
});
|
|
285
|
+
var orderRefundSchema = import_zod6.z.object({
|
|
286
|
+
id: import_zod6.z.string().min(1),
|
|
287
|
+
amountCents: import_zod6.z.number().int().positive(),
|
|
288
|
+
reason: import_zod6.z.string().nullable(),
|
|
289
|
+
restocked: import_zod6.z.boolean(),
|
|
290
|
+
source: import_zod6.z.enum(["admin", "gateway"]),
|
|
291
|
+
status: import_zod6.z.enum(["pending", "succeeded"]),
|
|
292
|
+
createdAt: import_zod6.z.string().min(1)
|
|
177
293
|
});
|
|
178
294
|
var orderTotalsShape = {
|
|
179
|
-
id:
|
|
295
|
+
id: import_zod6.z.string().min(1),
|
|
180
296
|
status: orderStatusSchema,
|
|
181
|
-
subtotalCents:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
297
|
+
subtotalCents: import_zod6.z.number().int().nonnegative(),
|
|
298
|
+
discountCents: import_zod6.z.number().int().nonnegative().default(0),
|
|
299
|
+
discountCode: import_zod6.z.string().nullable().default(null),
|
|
300
|
+
shippingCents: import_zod6.z.number().int().nonnegative(),
|
|
301
|
+
shippingLabel: import_zod6.z.string().nullable(),
|
|
302
|
+
totalCents: import_zod6.z.number().int().nonnegative(),
|
|
303
|
+
currency: import_zod6.z.string().length(3),
|
|
304
|
+
items: import_zod6.z.array(orderItemSchema),
|
|
187
305
|
fulfillment: orderFulfillmentSchema.nullable(),
|
|
188
|
-
createdAt:
|
|
306
|
+
createdAt: import_zod6.z.string().min(1)
|
|
189
307
|
};
|
|
190
|
-
var orderSummarySchema =
|
|
191
|
-
var orderAddressSchema =
|
|
192
|
-
name:
|
|
193
|
-
line1:
|
|
194
|
-
line2:
|
|
195
|
-
city:
|
|
196
|
-
state:
|
|
197
|
-
postalCode:
|
|
198
|
-
country:
|
|
199
|
-
});
|
|
200
|
-
var orderDetailSchema =
|
|
308
|
+
var orderSummarySchema = import_zod6.z.object(orderTotalsShape);
|
|
309
|
+
var orderAddressSchema = import_zod6.z.object({
|
|
310
|
+
name: import_zod6.z.string().optional(),
|
|
311
|
+
line1: import_zod6.z.string().optional(),
|
|
312
|
+
line2: import_zod6.z.string().optional(),
|
|
313
|
+
city: import_zod6.z.string().optional(),
|
|
314
|
+
state: import_zod6.z.string().optional(),
|
|
315
|
+
postalCode: import_zod6.z.string().optional(),
|
|
316
|
+
country: import_zod6.z.string().optional()
|
|
317
|
+
});
|
|
318
|
+
var orderDetailSchema = import_zod6.z.object({
|
|
201
319
|
...orderTotalsShape,
|
|
202
|
-
email:
|
|
320
|
+
email: import_zod6.z.string().nullable(),
|
|
203
321
|
shippingAddress: orderAddressSchema.nullable()
|
|
204
322
|
});
|
|
205
323
|
|
|
206
324
|
// src/shipping.ts
|
|
207
|
-
var
|
|
208
|
-
var shippingRateSchema =
|
|
209
|
-
label:
|
|
210
|
-
amountCents:
|
|
211
|
-
currency:
|
|
212
|
-
minDays:
|
|
213
|
-
maxDays:
|
|
214
|
-
active:
|
|
215
|
-
sort:
|
|
325
|
+
var import_zod7 = require("zod");
|
|
326
|
+
var shippingRateSchema = import_zod7.z.object({
|
|
327
|
+
label: import_zod7.z.string().min(1),
|
|
328
|
+
amountCents: import_zod7.z.number().int().nonnegative(),
|
|
329
|
+
currency: import_zod7.z.string().length(3),
|
|
330
|
+
minDays: import_zod7.z.number().int().nonnegative().nullable().optional(),
|
|
331
|
+
maxDays: import_zod7.z.number().int().nonnegative().nullable().optional(),
|
|
332
|
+
active: import_zod7.z.boolean().default(true),
|
|
333
|
+
sort: import_zod7.z.number().int().default(0)
|
|
216
334
|
});
|
|
217
|
-
var shippingRatesInputSchema =
|
|
335
|
+
var shippingRatesInputSchema = import_zod7.z.array(shippingRateSchema).refine((rates) => new Set(rates.map((r) => r.label)).size === rates.length, {
|
|
218
336
|
message: "Shipping rate labels must be unique"
|
|
219
337
|
});
|
|
220
338
|
|
|
221
339
|
// src/admin.ts
|
|
222
|
-
var
|
|
223
|
-
var productStatusSchema =
|
|
224
|
-
var productFields =
|
|
225
|
-
name:
|
|
226
|
-
description:
|
|
227
|
-
materials:
|
|
228
|
-
dimensions:
|
|
229
|
-
priceCents:
|
|
230
|
-
currency:
|
|
231
|
-
category:
|
|
232
|
-
quantity:
|
|
340
|
+
var import_zod8 = require("zod");
|
|
341
|
+
var productStatusSchema = import_zod8.z.enum(["draft", "active", "archived"]);
|
|
342
|
+
var productFields = import_zod8.z.object({
|
|
343
|
+
name: import_zod8.z.string().trim().min(1),
|
|
344
|
+
description: import_zod8.z.string(),
|
|
345
|
+
materials: import_zod8.z.string().nullable().optional(),
|
|
346
|
+
dimensions: import_zod8.z.string().nullable().optional(),
|
|
347
|
+
priceCents: import_zod8.z.number().int().nonnegative(),
|
|
348
|
+
currency: import_zod8.z.string().length(3).optional(),
|
|
349
|
+
category: import_zod8.z.string().trim().min(1),
|
|
350
|
+
quantity: import_zod8.z.number().int().nonnegative(),
|
|
233
351
|
status: productStatusSchema,
|
|
234
|
-
featured:
|
|
352
|
+
featured: import_zod8.z.boolean()
|
|
235
353
|
});
|
|
236
354
|
var adminProductInputSchema = productFields.extend({
|
|
237
|
-
description:
|
|
238
|
-
quantity:
|
|
355
|
+
description: import_zod8.z.string().default(""),
|
|
356
|
+
quantity: import_zod8.z.number().int().nonnegative().default(1),
|
|
239
357
|
status: productStatusSchema.default("draft"),
|
|
240
|
-
featured:
|
|
241
|
-
});
|
|
242
|
-
var adminProductPatchSchema = productFields.partial().extend({ sold:
|
|
243
|
-
var adminProductImageSchema =
|
|
244
|
-
id:
|
|
245
|
-
url:
|
|
246
|
-
alt:
|
|
247
|
-
position:
|
|
248
|
-
});
|
|
249
|
-
var adminProductSchema =
|
|
250
|
-
id:
|
|
251
|
-
slug:
|
|
252
|
-
name:
|
|
253
|
-
description:
|
|
254
|
-
materials:
|
|
255
|
-
dimensions:
|
|
256
|
-
priceCents:
|
|
257
|
-
currency:
|
|
258
|
-
category:
|
|
259
|
-
quantity:
|
|
358
|
+
featured: import_zod8.z.boolean().default(false)
|
|
359
|
+
});
|
|
360
|
+
var adminProductPatchSchema = productFields.partial().extend({ sold: import_zod8.z.boolean().optional() });
|
|
361
|
+
var adminProductImageSchema = import_zod8.z.object({
|
|
362
|
+
id: import_zod8.z.string().min(1),
|
|
363
|
+
url: import_zod8.z.string().min(1),
|
|
364
|
+
alt: import_zod8.z.string(),
|
|
365
|
+
position: import_zod8.z.number().int().nonnegative()
|
|
366
|
+
});
|
|
367
|
+
var adminProductSchema = import_zod8.z.object({
|
|
368
|
+
id: import_zod8.z.string().min(1),
|
|
369
|
+
slug: import_zod8.z.string().min(1),
|
|
370
|
+
name: import_zod8.z.string().min(1),
|
|
371
|
+
description: import_zod8.z.string(),
|
|
372
|
+
materials: import_zod8.z.string().nullable(),
|
|
373
|
+
dimensions: import_zod8.z.string().nullable(),
|
|
374
|
+
priceCents: import_zod8.z.number().int().nonnegative(),
|
|
375
|
+
currency: import_zod8.z.string().length(3),
|
|
376
|
+
category: import_zod8.z.string().min(1),
|
|
377
|
+
quantity: import_zod8.z.number().int().nonnegative(),
|
|
260
378
|
status: productStatusSchema,
|
|
261
|
-
featured:
|
|
262
|
-
images:
|
|
379
|
+
featured: import_zod8.z.boolean(),
|
|
380
|
+
images: import_zod8.z.array(adminProductImageSchema)
|
|
263
381
|
});
|
|
264
|
-
var imageOrderInputSchema =
|
|
265
|
-
imageIds:
|
|
382
|
+
var imageOrderInputSchema = import_zod8.z.object({
|
|
383
|
+
imageIds: import_zod8.z.array(import_zod8.z.string().min(1))
|
|
266
384
|
});
|
|
267
|
-
var
|
|
385
|
+
var productImagePatchSchema = import_zod8.z.object({
|
|
386
|
+
alt: import_zod8.z.string().trim().max(500)
|
|
387
|
+
});
|
|
388
|
+
var adminProductListQuerySchema = import_zod8.z.object({
|
|
268
389
|
status: productStatusSchema.optional(),
|
|
269
|
-
stock:
|
|
270
|
-
q:
|
|
271
|
-
cursor:
|
|
272
|
-
limit:
|
|
390
|
+
stock: import_zod8.z.enum(["in", "sold"]).optional(),
|
|
391
|
+
q: import_zod8.z.string().trim().min(1).optional(),
|
|
392
|
+
cursor: import_zod8.z.string().min(1).optional(),
|
|
393
|
+
limit: import_zod8.z.coerce.number().int().min(1).max(100).default(50)
|
|
273
394
|
});
|
|
274
|
-
var adminProductPageSchema =
|
|
275
|
-
items:
|
|
276
|
-
nextCursor:
|
|
395
|
+
var adminProductPageSchema = import_zod8.z.object({
|
|
396
|
+
items: import_zod8.z.array(adminProductSchema),
|
|
397
|
+
nextCursor: import_zod8.z.string().nullable()
|
|
277
398
|
});
|
|
278
399
|
|
|
279
400
|
// src/admin-orders.ts
|
|
280
|
-
var
|
|
281
|
-
var adminOrderListQuerySchema =
|
|
401
|
+
var import_zod9 = require("zod");
|
|
402
|
+
var adminOrderListQuerySchema = import_zod9.z.object({
|
|
282
403
|
status: orderStatusSchema.optional(),
|
|
283
|
-
q:
|
|
284
|
-
hasPendingRefund:
|
|
285
|
-
cursor:
|
|
286
|
-
limit:
|
|
404
|
+
q: import_zod9.z.string().trim().min(1).optional(),
|
|
405
|
+
hasPendingRefund: import_zod9.z.enum(["true", "false"]).transform((v) => v === "true").optional(),
|
|
406
|
+
cursor: import_zod9.z.string().min(1).optional(),
|
|
407
|
+
limit: import_zod9.z.coerce.number().int().min(1).max(100).default(25)
|
|
287
408
|
});
|
|
288
|
-
var adminOrderListItemSchema =
|
|
289
|
-
id:
|
|
409
|
+
var adminOrderListItemSchema = import_zod9.z.object({
|
|
410
|
+
id: import_zod9.z.string().min(1),
|
|
290
411
|
status: orderStatusSchema,
|
|
291
|
-
email:
|
|
292
|
-
totalCents:
|
|
293
|
-
currency:
|
|
294
|
-
itemCount:
|
|
295
|
-
createdAt:
|
|
412
|
+
email: import_zod9.z.string().nullable(),
|
|
413
|
+
totalCents: import_zod9.z.number().int().nonnegative(),
|
|
414
|
+
currency: import_zod9.z.string().length(3),
|
|
415
|
+
itemCount: import_zod9.z.number().int().nonnegative(),
|
|
416
|
+
createdAt: import_zod9.z.string().min(1)
|
|
296
417
|
});
|
|
297
|
-
var adminOrderPageSchema =
|
|
298
|
-
items:
|
|
299
|
-
nextCursor:
|
|
418
|
+
var adminOrderPageSchema = import_zod9.z.object({
|
|
419
|
+
items: import_zod9.z.array(adminOrderListItemSchema),
|
|
420
|
+
nextCursor: import_zod9.z.string().nullable()
|
|
300
421
|
});
|
|
301
422
|
var adminOrderDetailSchema = orderDetailSchema.extend({
|
|
302
|
-
refunds:
|
|
303
|
-
refundedCents:
|
|
304
|
-
checkoutSessionId:
|
|
305
|
-
updatedAt:
|
|
423
|
+
refunds: import_zod9.z.array(orderRefundSchema),
|
|
424
|
+
refundedCents: import_zod9.z.number().int().nonnegative(),
|
|
425
|
+
checkoutSessionId: import_zod9.z.string().nullable(),
|
|
426
|
+
updatedAt: import_zod9.z.string().min(1)
|
|
306
427
|
});
|
|
307
|
-
var shipOrderInputSchema =
|
|
308
|
-
carrier:
|
|
309
|
-
trackingNumber:
|
|
310
|
-
trackingUrl:
|
|
428
|
+
var shipOrderInputSchema = import_zod9.z.object({
|
|
429
|
+
carrier: import_zod9.z.string().optional(),
|
|
430
|
+
trackingNumber: import_zod9.z.string().optional(),
|
|
431
|
+
trackingUrl: import_zod9.z.string().url().optional()
|
|
311
432
|
});
|
|
312
|
-
var refundOrderInputSchema =
|
|
313
|
-
amountCents:
|
|
314
|
-
reason:
|
|
315
|
-
restock:
|
|
433
|
+
var refundOrderInputSchema = import_zod9.z.object({
|
|
434
|
+
amountCents: import_zod9.z.number().int().positive().optional(),
|
|
435
|
+
reason: import_zod9.z.string().max(500).optional(),
|
|
436
|
+
restock: import_zod9.z.boolean().default(false)
|
|
316
437
|
});
|
|
317
438
|
// Annotate the CommonJS export names for ESM import in node:
|
|
318
439
|
0 && (module.exports = {
|
|
440
|
+
adminDiscountListQuerySchema,
|
|
441
|
+
adminDiscountPageSchema,
|
|
319
442
|
adminOrderDetailSchema,
|
|
320
443
|
adminOrderListItemSchema,
|
|
321
444
|
adminOrderListQuerySchema,
|
|
@@ -332,6 +455,16 @@ var refundOrderInputSchema = import_zod8.z.object({
|
|
|
332
455
|
checkoutConflictSchema,
|
|
333
456
|
checkoutRequestSchema,
|
|
334
457
|
checkoutResponseSchema,
|
|
458
|
+
discountCodeSchema,
|
|
459
|
+
discountInputSchema,
|
|
460
|
+
discountPatchSchema,
|
|
461
|
+
discountPreviewRequestSchema,
|
|
462
|
+
discountPreviewSchema,
|
|
463
|
+
discountRejectionReasonSchema,
|
|
464
|
+
discountRejectionSchema,
|
|
465
|
+
discountSchema,
|
|
466
|
+
discountStatusSchema,
|
|
467
|
+
discountTypeSchema,
|
|
335
468
|
imageOrderInputSchema,
|
|
336
469
|
moneySchema,
|
|
337
470
|
orderAddressSchema,
|
|
@@ -342,6 +475,7 @@ var refundOrderInputSchema = import_zod8.z.object({
|
|
|
342
475
|
orderSummarySchema,
|
|
343
476
|
productCardPageSchema,
|
|
344
477
|
productCardSchema,
|
|
478
|
+
productImagePatchSchema,
|
|
345
479
|
productImageSchema,
|
|
346
480
|
productListQuerySchema,
|
|
347
481
|
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 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';\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 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 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;;;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,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S;AAClC,CAAC;AAEM,IAAM,yBAAyB,kBAAkB,OAAO;AAAA,EAC7D,SAAS,cAAE,MAAM,iBAAiB;AAAA,EAClC,eAAe,cAAE,OAAO,EAAE,IAAI,EAAE,YAAY;AAAA,EAC5C,mBAAmB,cAAE,OAAO,EAAE,SAAS;AAAA,EACvC,WAAW,cAAE,OAAO,EAAE,IAAI,CAAC;AAC7B,CAAC;AAEM,IAAM,uBAAuB,cAAE,OAAO;AAAA,EAC3C,SAAS,cAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,gBAAgB,cAAE,OAAO,EAAE,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 currencyInputSchema = z\n .string()\n .transform((value) => value.trim().toUpperCase())\n .pipe(z.string().length(3));\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: currencyInputSchema.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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