@zeyolabs/shopping 2026.11.43 → 2026.11.44

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.
@@ -5,6 +5,11 @@ import { PACKAGE_FORMATS } from '../db/schema';
5
5
  import { FormInput } from '../utils/form-input';
6
6
  import { BULK_DISPATCH_LIMIT, ORDER_FILTERS } from './filters';
7
7
 
8
+ /** The shop's own numbers (`KC-7F3K9Q`), or a number kept from an imported legacy shop. */
9
+ export const OrderNumber = z
10
+ .string()
11
+ .regex(/^(?:[A-Z]{2,5}-[A-Z0-9]{6}|[A-Z0-9]{8,20})$/, 'invalid order number');
12
+
8
13
  export const OrderListSchema = z.object({
9
14
  filter: z.enum(ORDER_FILTERS).default('to-ship'),
10
15
  q: z.string().max(100).default(''),
@@ -12,7 +17,7 @@ export const OrderListSchema = z.object({
12
17
 
13
18
  /** Royal Mail tracking numbers are letters and digits (e.g. AB123456789GB); blank means untracked. */
14
19
  export const ShipSchema = z.object({
15
- number: z.string().regex(/^[A-Z]{2,5}-[A-Z0-9]{6}$/, 'invalid order number'),
20
+ number: OrderNumber,
16
21
  /** Tick to dispatch without emailing the customer (e.g. the email already went another way). */
17
22
  skipEmail: SchemaForm.Boolean,
18
23
  trackingNumber: z
@@ -26,8 +31,6 @@ export const ShipSchema = z.object({
26
31
  ),
27
32
  });
28
33
 
29
- export const OrderNumber = z.string().regex(/^[A-Z]{2,5}-[A-Z0-9]{6}$/, 'invalid order number');
30
-
31
34
  export const ORDER_STEPS = ['start', 'pack', 'hold', 'release'] as const;
32
35
  export type OrderStep = (typeof ORDER_STEPS)[number];
33
36
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zeyolabs/shopping",
3
- "version": "2026.11.43",
3
+ "version": "2026.11.44",
4
4
  "description": "Shop and order fulfilment for SvelteKit 3 on Cloudflare: catalogue, basket, Stripe Checkout, orders, Royal Mail Click & Drop, order emails, packing, pages and admin.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",