@composable-os/pack-shop 0.1.0-beta.12 → 0.1.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,796 @@
1
- declare const _default: any;
1
+ declare const _default: import("@composable-os/sdk").Extension<{
2
+ readonly id: "shop";
3
+ readonly version: "0.1.0";
4
+ readonly contractVersion: 1;
5
+ readonly label: "Shop";
6
+ readonly description: string;
7
+ readonly permissions: {
8
+ readonly read: ["person"];
9
+ readonly operations: ["query.sql"];
10
+ readonly modules: ["ops"];
11
+ };
12
+ readonly fields: {
13
+ readonly organisation: {
14
+ readonly supplier: {
15
+ readonly type: "boolean";
16
+ readonly label: "Supplier";
17
+ readonly description: "We buy stock from this organisation.";
18
+ };
19
+ readonly supplierAccount: {
20
+ readonly type: "text";
21
+ readonly label: "Our account number with them";
22
+ };
23
+ readonly supplierEmail: {
24
+ readonly type: "email";
25
+ readonly label: "Email for orders";
26
+ readonly description: "Where purchase orders to this supplier are sent.";
27
+ };
28
+ readonly supplierLeadDays: {
29
+ readonly type: "number";
30
+ readonly label: "Lead time (days)";
31
+ readonly description: "How many days an order from this supplier usually takes to arrive.";
32
+ readonly min: 0;
33
+ readonly step: 1;
34
+ };
35
+ readonly supplierNotes: {
36
+ readonly type: "longText";
37
+ readonly label: "Supplier notes";
38
+ };
39
+ };
40
+ };
41
+ readonly objects: {
42
+ readonly item: {
43
+ readonly label: "Item";
44
+ readonly plural: "Items";
45
+ readonly icon: "shopping-bag";
46
+ readonly titleField: "name";
47
+ readonly description: string;
48
+ readonly navigation: "main";
49
+ readonly navigationOrder: 10;
50
+ readonly fields: {
51
+ readonly name: {
52
+ readonly type: "text";
53
+ readonly label: "Name";
54
+ readonly required: true;
55
+ };
56
+ readonly slug: {
57
+ readonly type: "slug";
58
+ readonly label: "Address";
59
+ };
60
+ readonly description: {
61
+ readonly type: "richText";
62
+ readonly label: "Description";
63
+ };
64
+ readonly image: {
65
+ readonly type: "image";
66
+ readonly label: "Picture";
67
+ };
68
+ readonly image2: {
69
+ readonly type: "image";
70
+ readonly label: "Second picture";
71
+ };
72
+ readonly image3: {
73
+ readonly type: "image";
74
+ readonly label: "Third picture";
75
+ };
76
+ readonly category: {
77
+ readonly type: "text";
78
+ readonly label: "Category";
79
+ readonly description: "Drinks, clothing, supplements: how the shop and the stock list group it.";
80
+ };
81
+ readonly whereSold: {
82
+ readonly type: "select";
83
+ readonly label: "Where sold";
84
+ readonly required: true;
85
+ readonly default: "both";
86
+ readonly options: {
87
+ value: string;
88
+ label: string;
89
+ }[];
90
+ readonly personApproves: true;
91
+ readonly track: "timeline";
92
+ readonly description: string;
93
+ };
94
+ readonly option1Name: {
95
+ readonly type: "text";
96
+ readonly label: "First option";
97
+ readonly description: "What the variants' first option is called, e.g. Size.";
98
+ };
99
+ readonly option2Name: {
100
+ readonly type: "text";
101
+ readonly label: "Second option";
102
+ readonly description: "e.g. Colour.";
103
+ };
104
+ readonly option3Name: {
105
+ readonly type: "text";
106
+ readonly label: "Third option";
107
+ readonly description: "e.g. Flavour.";
108
+ };
109
+ readonly weight: {
110
+ readonly type: "number";
111
+ readonly label: "Weight (grams)";
112
+ readonly description: "Each variant's weight unless it has its own. Not used for postage yet.";
113
+ readonly min: 0;
114
+ readonly step: 1;
115
+ };
116
+ };
117
+ readonly publishable: {
118
+ readonly content: readonly ["name", "description", "image", "image2", "image3", "category", "option1Name", "option2Name", "option3Name"];
119
+ readonly slug: "slug";
120
+ };
121
+ readonly public: {
122
+ readonly read: readonly ["name", "slug", "description", "image", "image2", "image3", "category", "whereSold", "option1Name", "option2Name", "option3Name", "publishedAt"];
123
+ };
124
+ readonly indexes: readonly [readonly ["category"], readonly ["whereSold"]];
125
+ };
126
+ readonly variant: {
127
+ readonly label: "Variant";
128
+ readonly plural: "Variants";
129
+ readonly icon: "tag";
130
+ readonly titleField: "name";
131
+ readonly description: string;
132
+ readonly navigation: "main";
133
+ readonly navigationOrder: 11;
134
+ readonly fields: {
135
+ readonly item: {
136
+ readonly type: "relation";
137
+ readonly label: "Item";
138
+ readonly to: "shop.item";
139
+ readonly required: true;
140
+ readonly personApproves: true;
141
+ };
142
+ readonly name: {
143
+ readonly type: "text";
144
+ readonly label: "Name";
145
+ readonly required: true;
146
+ readonly description: "As the buyer's order shows it, e.g. Club hoodie, Large / Black.";
147
+ };
148
+ readonly option1: {
149
+ readonly type: "text";
150
+ readonly label: "First option value";
151
+ readonly description: "e.g. Large.";
152
+ };
153
+ readonly option2: {
154
+ readonly type: "text";
155
+ readonly label: "Second option value";
156
+ readonly description: "e.g. Black.";
157
+ };
158
+ readonly option3: {
159
+ readonly type: "text";
160
+ readonly label: "Third option value";
161
+ };
162
+ readonly sku: {
163
+ readonly type: "text";
164
+ readonly label: "SKU";
165
+ };
166
+ readonly barcode: {
167
+ readonly type: "text";
168
+ readonly label: "Barcode";
169
+ };
170
+ readonly price: {
171
+ readonly type: "currency";
172
+ readonly label: "Price";
173
+ readonly required: true;
174
+ readonly personApproves: true;
175
+ readonly description: "Including tax. An AI's change of it waits for a person.";
176
+ };
177
+ readonly costPrice: {
178
+ readonly type: "currency";
179
+ readonly label: "Cost price";
180
+ readonly readOnly: true;
181
+ readonly description: "What one cost when it was last received from a supplier.";
182
+ };
183
+ readonly maxPerOrder: {
184
+ readonly type: "number";
185
+ readonly label: "Most per order";
186
+ readonly description: "The most one order may hold. Empty: 10.";
187
+ readonly min: 1;
188
+ readonly step: 1;
189
+ };
190
+ readonly weight: {
191
+ readonly type: "number";
192
+ readonly label: "Weight (grams)";
193
+ readonly description: "Overrides the item's weight.";
194
+ readonly min: 0;
195
+ readonly step: 1;
196
+ };
197
+ readonly reorderAt: {
198
+ readonly type: "number";
199
+ readonly label: "Reorder level";
200
+ readonly description: "At or below this many on hand, the stock is low and staff are told once.";
201
+ readonly min: 0;
202
+ readonly step: 1;
203
+ };
204
+ readonly reorderQty: {
205
+ readonly type: "number";
206
+ readonly label: "Reorder quantity";
207
+ readonly description: "How many to order when it is low.";
208
+ readonly min: 1;
209
+ readonly step: 1;
210
+ };
211
+ readonly supplier: {
212
+ readonly type: "relation";
213
+ readonly label: "Usual supplier";
214
+ readonly to: "organisation";
215
+ };
216
+ readonly state: {
217
+ readonly type: "select";
218
+ readonly label: "State";
219
+ readonly track: "timeline";
220
+ readonly options: readonly [{
221
+ readonly value: "active";
222
+ readonly label: "Active";
223
+ }, {
224
+ readonly value: "retired";
225
+ readonly label: "Retired";
226
+ }];
227
+ };
228
+ };
229
+ readonly states: {
230
+ readonly field: "state";
231
+ readonly initial: "active";
232
+ readonly moves: readonly [{
233
+ readonly from: "active";
234
+ readonly to: "retired";
235
+ readonly by: readonly ["staff"];
236
+ }, {
237
+ readonly from: "retired";
238
+ readonly to: "active";
239
+ readonly by: readonly ["staff"];
240
+ }];
241
+ };
242
+ readonly sellable: {
243
+ readonly price: "price";
244
+ readonly maxPerOrder: "maxPerOrder";
245
+ readonly goods: {
246
+ readonly soldIn: "item.whereSold";
247
+ };
248
+ readonly tax: {
249
+ code: string;
250
+ };
251
+ readonly finance: {
252
+ readonly category: {
253
+ readonly key: "shop";
254
+ readonly label: "Shop";
255
+ };
256
+ readonly earned: "at_sale";
257
+ };
258
+ };
259
+ readonly stock: {
260
+ readonly reorderAt: "reorderAt";
261
+ readonly reorderQty: "reorderQty";
262
+ readonly notify: "shop:stock";
263
+ };
264
+ readonly agreements: {
265
+ readonly point: "buy";
266
+ readonly label: "Buying from the shop";
267
+ readonly inlineStep: true;
268
+ };
269
+ readonly public: {
270
+ readonly read: readonly ["item", "name", "option1", "option2", "option3", "price", "maxPerOrder"];
271
+ readonly when: readonly [{
272
+ readonly field: "state";
273
+ readonly in: readonly ["active"];
274
+ }, {
275
+ readonly via: "item";
276
+ }];
277
+ };
278
+ readonly indexes: readonly [readonly ["item"], readonly ["sku"], readonly ["barcode"], readonly ["supplier"], readonly ["state"]];
279
+ };
280
+ readonly delivery: {
281
+ readonly label: "Delivery option";
282
+ readonly plural: "Delivery options";
283
+ readonly icon: "truck";
284
+ readonly titleField: "name";
285
+ readonly description: string;
286
+ readonly navigation: "settings";
287
+ readonly fields: {
288
+ readonly name: {
289
+ readonly type: "text";
290
+ readonly label: "Name";
291
+ readonly required: true;
292
+ };
293
+ readonly kind: {
294
+ readonly type: "select";
295
+ readonly label: "Kind";
296
+ readonly required: true;
297
+ readonly options: {
298
+ value: string;
299
+ label: string;
300
+ }[];
301
+ readonly personApproves: true;
302
+ readonly description: string;
303
+ };
304
+ readonly price: {
305
+ readonly type: "currency";
306
+ readonly label: "Price";
307
+ readonly personApproves: true;
308
+ readonly description: "Postage, including tax. 0 is free. A post option without one cannot be chosen.";
309
+ };
310
+ readonly freeOver: {
311
+ readonly type: "currency";
312
+ readonly label: "Free over";
313
+ readonly personApproves: true;
314
+ readonly description: "No postage when the order's goods come to at least this. Empty: never free.";
315
+ };
316
+ readonly countries: {
317
+ readonly type: "text";
318
+ readonly label: "Countries";
319
+ readonly personApproves: true;
320
+ readonly defaultSetting: "country";
321
+ readonly description: string;
322
+ };
323
+ readonly collectAt: {
324
+ readonly type: "text";
325
+ readonly label: "Where to collect";
326
+ readonly description: "Collect only: where the buyer picks it up, e.g. the front desk.";
327
+ };
328
+ readonly active: {
329
+ readonly type: "boolean";
330
+ readonly label: "Active";
331
+ readonly default: true;
332
+ readonly personApproves: true;
333
+ readonly description: "Off: buyers cannot choose it.";
334
+ };
335
+ };
336
+ readonly sellable: {
337
+ readonly price: "price";
338
+ readonly delivery: {
339
+ readonly kind: "kind";
340
+ readonly freeOver: "freeOver";
341
+ readonly countries: "countries";
342
+ readonly active: "active";
343
+ };
344
+ readonly tax: {
345
+ code: string;
346
+ };
347
+ readonly grants: {
348
+ readonly object: "shipment";
349
+ readonly set: {
350
+ readonly name: "line.title";
351
+ readonly order: "order";
352
+ readonly buyer: "order.person";
353
+ readonly option: "item";
354
+ readonly kind: "item.kind";
355
+ readonly collectAt: "item.collectAt";
356
+ };
357
+ readonly void: "void";
358
+ };
359
+ readonly finance: {
360
+ readonly category: {
361
+ readonly key: "postage";
362
+ readonly label: "Postage";
363
+ };
364
+ readonly earned: "at_sale";
365
+ };
366
+ };
367
+ readonly public: {
368
+ readonly read: readonly ["name", "kind", "price", "freeOver", "countries", "collectAt", "active"];
369
+ };
370
+ readonly seed: {
371
+ readonly collect: {
372
+ readonly name: "Collect at the gym";
373
+ readonly kind: "collect";
374
+ readonly price: 0;
375
+ readonly collectAt: "The front desk";
376
+ readonly active: true;
377
+ };
378
+ readonly here: {
379
+ readonly name: "Take it now";
380
+ readonly kind: "here";
381
+ readonly price: 0;
382
+ readonly active: true;
383
+ };
384
+ readonly post: {
385
+ readonly name: "Standard post";
386
+ readonly kind: "post";
387
+ readonly active: false;
388
+ };
389
+ readonly international: {
390
+ readonly name: "International post";
391
+ readonly kind: "post";
392
+ readonly countries: "*";
393
+ readonly active: false;
394
+ };
395
+ };
396
+ };
397
+ readonly shipment: {
398
+ readonly label: "Shipment";
399
+ readonly plural: "Shipments";
400
+ readonly icon: "package";
401
+ readonly titleField: "name";
402
+ readonly description: string;
403
+ readonly navigation: "main";
404
+ readonly navigationOrder: 12;
405
+ readonly fields: {
406
+ readonly name: {
407
+ readonly type: "text";
408
+ readonly label: "Name";
409
+ readonly required: true;
410
+ };
411
+ readonly order: {
412
+ readonly type: "text";
413
+ readonly label: "Order";
414
+ readonly readOnly: true;
415
+ readonly description: "The order that granted it, set by the host.";
416
+ };
417
+ readonly buyer: {
418
+ readonly type: "relation";
419
+ readonly label: "Buyer";
420
+ readonly to: "person";
421
+ readonly readOnly: true;
422
+ };
423
+ readonly option: {
424
+ readonly type: "relation";
425
+ readonly label: "Delivery option";
426
+ readonly to: "shop.delivery";
427
+ readonly readOnly: true;
428
+ };
429
+ readonly kind: {
430
+ readonly type: "select";
431
+ readonly label: "Kind";
432
+ readonly readOnly: true;
433
+ readonly options: readonly [{
434
+ readonly value: "post";
435
+ readonly label: "Post";
436
+ }, {
437
+ readonly value: "collect";
438
+ readonly label: "Collect";
439
+ }];
440
+ };
441
+ readonly collectAt: {
442
+ readonly type: "text";
443
+ readonly label: "Where to collect";
444
+ readonly readOnly: true;
445
+ };
446
+ readonly tracking: {
447
+ readonly type: "text";
448
+ readonly label: "Tracking reference";
449
+ };
450
+ readonly state: {
451
+ readonly type: "select";
452
+ readonly label: "State";
453
+ readonly track: "timeline";
454
+ readonly options: readonly [{
455
+ readonly value: "to_pack";
456
+ readonly label: "To pack";
457
+ }, {
458
+ readonly value: "packed";
459
+ readonly label: "Packed";
460
+ }, {
461
+ readonly value: "sent";
462
+ readonly label: "Sent";
463
+ }, {
464
+ readonly value: "ready";
465
+ readonly label: "Ready to collect";
466
+ }, {
467
+ readonly value: "collected";
468
+ readonly label: "Collected";
469
+ }, {
470
+ readonly value: "void";
471
+ readonly label: "Void";
472
+ }];
473
+ };
474
+ readonly packedAt: {
475
+ readonly type: "datetime";
476
+ readonly label: "Packed at";
477
+ readonly readOnly: true;
478
+ };
479
+ readonly sentAt: {
480
+ readonly type: "datetime";
481
+ readonly label: "Sent at";
482
+ readonly readOnly: true;
483
+ };
484
+ readonly readyAt: {
485
+ readonly type: "datetime";
486
+ readonly label: "Ready at";
487
+ readonly readOnly: true;
488
+ };
489
+ readonly collectedAt: {
490
+ readonly type: "datetime";
491
+ readonly label: "Collected at";
492
+ readonly readOnly: true;
493
+ };
494
+ };
495
+ readonly states: {
496
+ readonly field: "state";
497
+ readonly initial: "to_pack";
498
+ readonly moves: readonly [{
499
+ readonly from: "to_pack";
500
+ readonly to: "packed";
501
+ readonly by: readonly ["staff"];
502
+ }, {
503
+ readonly from: "packed";
504
+ readonly to: "to_pack";
505
+ readonly by: readonly ["staff"];
506
+ }, {
507
+ readonly from: readonly ["to_pack", "packed"];
508
+ readonly to: "sent";
509
+ readonly by: readonly ["staff"];
510
+ readonly final: true;
511
+ }, {
512
+ readonly from: readonly ["to_pack", "packed"];
513
+ readonly to: "ready";
514
+ readonly by: readonly ["staff"];
515
+ }, {
516
+ readonly from: "ready";
517
+ readonly to: "collected";
518
+ readonly by: readonly ["staff"];
519
+ readonly final: true;
520
+ }, {
521
+ readonly from: readonly ["to_pack", "packed", "ready"];
522
+ readonly to: "void";
523
+ readonly by: readonly ["host"];
524
+ readonly final: true;
525
+ }];
526
+ };
527
+ readonly customer: {
528
+ readonly field: "buyer";
529
+ readonly read: readonly ["name", "order", "option", "kind", "collectAt", "tracking", "state", "sentAt", "readyAt", "collectedAt"];
530
+ readonly write: readonly [];
531
+ };
532
+ readonly timelineLinks: readonly ["buyer"];
533
+ readonly indexes: readonly [readonly ["state"], readonly ["order"], readonly ["buyer"]];
534
+ };
535
+ };
536
+ readonly views: {
537
+ readonly onlineShop: {
538
+ readonly label: "Sold online";
539
+ readonly object: "shop.item";
540
+ readonly filter: {
541
+ readonly field: "whereSold";
542
+ readonly op: "in";
543
+ readonly value: readonly ["online", "both"];
544
+ };
545
+ readonly sort: {
546
+ readonly field: "name";
547
+ readonly direction: "asc";
548
+ };
549
+ readonly columns: ["name", "category", "whereSold", "publishState"];
550
+ };
551
+ readonly atTheGym: {
552
+ readonly label: "Sold in person";
553
+ readonly object: "shop.item";
554
+ readonly filter: {
555
+ readonly field: "whereSold";
556
+ readonly op: "in";
557
+ readonly value: readonly ["in_person", "both"];
558
+ };
559
+ readonly sort: {
560
+ readonly field: "name";
561
+ readonly direction: "asc";
562
+ };
563
+ readonly columns: ["name", "category", "whereSold", "publishState"];
564
+ };
565
+ readonly stock: {
566
+ readonly label: "Stock";
567
+ readonly object: "shop.variant";
568
+ readonly filter: {
569
+ readonly field: "state";
570
+ readonly op: "eq";
571
+ readonly value: "active";
572
+ };
573
+ readonly sort: {
574
+ readonly field: "available";
575
+ readonly direction: "asc";
576
+ };
577
+ readonly columns: ["name", "item", "onHand", "held", "available", "reorderAt", "supplier"];
578
+ };
579
+ readonly toPack: {
580
+ readonly label: "To pack and send";
581
+ readonly object: "shop.shipment";
582
+ readonly filter: {
583
+ readonly field: "state";
584
+ readonly op: "in";
585
+ readonly value: readonly ["to_pack", "packed"];
586
+ };
587
+ readonly sort: {
588
+ readonly field: "createdAt";
589
+ readonly direction: "asc";
590
+ };
591
+ readonly columns: ["name", "kind", "buyer", "state", "createdAt"];
592
+ };
593
+ readonly readyToCollect: {
594
+ readonly label: "Ready to collect";
595
+ readonly object: "shop.shipment";
596
+ readonly filter: {
597
+ readonly field: "state";
598
+ readonly op: "eq";
599
+ readonly value: "ready";
600
+ };
601
+ readonly sort: {
602
+ readonly field: "readyAt";
603
+ readonly direction: "asc";
604
+ };
605
+ readonly columns: ["name", "buyer", "collectAt", "readyAt"];
606
+ };
607
+ };
608
+ readonly dashboards: {
609
+ shopOverview: import("@composable-os/sdk").DashboardDeclaration;
610
+ };
611
+ readonly recordTabs: {
612
+ readonly itemVariants: {
613
+ readonly label: "Variants";
614
+ readonly on: "shop.item";
615
+ readonly view: {
616
+ readonly type: "table";
617
+ readonly object: "shop.variant";
618
+ readonly relation: "item";
619
+ readonly columns: ["name", "price", "onHand", "available", "reorderAt", "state"];
620
+ readonly sort: {
621
+ readonly field: "name";
622
+ readonly direction: "asc";
623
+ };
624
+ };
625
+ readonly order: 10;
626
+ };
627
+ readonly personShipments: {
628
+ readonly label: "Shipments";
629
+ readonly on: "person";
630
+ readonly view: {
631
+ readonly type: "table";
632
+ readonly object: "shop.shipment";
633
+ readonly relation: "buyer";
634
+ readonly columns: ["name", "kind", "state", "tracking", "createdAt"];
635
+ readonly sort: {
636
+ readonly field: "createdAt";
637
+ readonly direction: "desc";
638
+ };
639
+ };
640
+ readonly order: 40;
641
+ };
642
+ readonly supplierVariants: {
643
+ readonly label: "Supplies";
644
+ readonly on: "organisation";
645
+ readonly view: {
646
+ readonly type: "table";
647
+ readonly object: "shop.variant";
648
+ readonly relation: "supplier";
649
+ readonly columns: ["name", "item", "onHand", "reorderAt", "reorderQty"];
650
+ readonly sort: {
651
+ readonly field: "name";
652
+ readonly direction: "asc";
653
+ };
654
+ };
655
+ readonly order: 40;
656
+ };
657
+ };
658
+ readonly settings: {
659
+ readonly country: {
660
+ readonly type: "text";
661
+ readonly label: "Your country";
662
+ readonly description: string;
663
+ };
664
+ };
665
+ readonly roles: {
666
+ readonly stockroom: {
667
+ readonly label: "Stockroom";
668
+ readonly description: string;
669
+ readonly permissions: readonly ["shop:stock"];
670
+ readonly read: readonly ["shop.item", "shop.variant"];
671
+ };
672
+ };
673
+ readonly grantable: readonly ["shop:read", "shop:fulfil"];
674
+ readonly grantableLabels: {
675
+ readonly "shop:read": "Shop stock: see every variant's stock, what is held by orders being paid and what is low.";
676
+ readonly "shop:fulfil": string;
677
+ };
678
+ readonly tools: {
679
+ readonly stockLevels: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
680
+ lowOnly: import("zod").ZodOptional<import("zod").ZodBoolean>;
681
+ category: import("zod").ZodOptional<import("zod").ZodString>;
682
+ supplierId: import("zod").ZodOptional<import("zod").ZodString>;
683
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
684
+ variants: import("zod").ZodArray<import("zod").ZodObject<{
685
+ variantId: import("zod").ZodString;
686
+ variant: import("zod").ZodNullable<import("zod").ZodString>;
687
+ itemId: import("zod").ZodNullable<import("zod").ZodString>;
688
+ item: import("zod").ZodNullable<import("zod").ZodString>;
689
+ category: import("zod").ZodNullable<import("zod").ZodString>;
690
+ onHand: import("zod").ZodNumber;
691
+ held: import("zod").ZodNumber;
692
+ available: import("zod").ZodNumber;
693
+ reorderAt: import("zod").ZodNullable<import("zod").ZodNumber>;
694
+ reorderQty: import("zod").ZodNullable<import("zod").ZodNumber>;
695
+ low: import("zod").ZodBoolean;
696
+ supplierId: import("zod").ZodNullable<import("zod").ZodString>;
697
+ supplier: import("zod").ZodNullable<import("zod").ZodString>;
698
+ }, import("zod/v4/core").$strip>>;
699
+ truncated: import("zod").ZodBoolean;
700
+ }, import("zod/v4/core").$strip>>;
701
+ readonly shipmentsToSend: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
702
+ state: import("zod").ZodOptional<import("zod").ZodEnum<{
703
+ to_pack: "to_pack";
704
+ packed: "packed";
705
+ ready: "ready";
706
+ }>>;
707
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
708
+ shipments: import("zod").ZodArray<import("zod").ZodObject<{
709
+ id: import("zod").ZodString;
710
+ name: import("zod").ZodNullable<import("zod").ZodString>;
711
+ orderId: import("zod").ZodNullable<import("zod").ZodString>;
712
+ kind: import("zod").ZodNullable<import("zod").ZodString>;
713
+ state: import("zod").ZodNullable<import("zod").ZodString>;
714
+ tracking: import("zod").ZodNullable<import("zod").ZodString>;
715
+ collectAt: import("zod").ZodNullable<import("zod").ZodString>;
716
+ buyerId: import("zod").ZodNullable<import("zod").ZodString>;
717
+ buyer: import("zod").ZodNullable<import("zod").ZodString>;
718
+ createdAt: import("zod").ZodNullable<import("zod").ZodString>;
719
+ }, import("zod/v4/core").$strip>>;
720
+ }, import("zod/v4/core").$strip>>;
721
+ readonly markPacked: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
722
+ shipmentId: import("zod").ZodString;
723
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
724
+ moved: import("zod").ZodBoolean;
725
+ message: import("zod").ZodString;
726
+ shipment: import("zod").ZodObject<{
727
+ id: import("zod").ZodString;
728
+ name: import("zod").ZodNullable<import("zod").ZodString>;
729
+ orderId: import("zod").ZodNullable<import("zod").ZodString>;
730
+ kind: import("zod").ZodNullable<import("zod").ZodString>;
731
+ state: import("zod").ZodNullable<import("zod").ZodString>;
732
+ tracking: import("zod").ZodNullable<import("zod").ZodString>;
733
+ collectAt: import("zod").ZodNullable<import("zod").ZodString>;
734
+ buyerId: import("zod").ZodNullable<import("zod").ZodString>;
735
+ buyer: import("zod").ZodNullable<import("zod").ZodString>;
736
+ createdAt: import("zod").ZodNullable<import("zod").ZodString>;
737
+ }, import("zod/v4/core").$strip>;
738
+ }, import("zod/v4/core").$strip>>;
739
+ readonly markSent: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
740
+ shipmentId: import("zod").ZodString;
741
+ tracking: import("zod").ZodOptional<import("zod").ZodString>;
742
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
743
+ moved: import("zod").ZodBoolean;
744
+ message: import("zod").ZodString;
745
+ shipment: import("zod").ZodObject<{
746
+ id: import("zod").ZodString;
747
+ name: import("zod").ZodNullable<import("zod").ZodString>;
748
+ orderId: import("zod").ZodNullable<import("zod").ZodString>;
749
+ kind: import("zod").ZodNullable<import("zod").ZodString>;
750
+ state: import("zod").ZodNullable<import("zod").ZodString>;
751
+ tracking: import("zod").ZodNullable<import("zod").ZodString>;
752
+ collectAt: import("zod").ZodNullable<import("zod").ZodString>;
753
+ buyerId: import("zod").ZodNullable<import("zod").ZodString>;
754
+ buyer: import("zod").ZodNullable<import("zod").ZodString>;
755
+ createdAt: import("zod").ZodNullable<import("zod").ZodString>;
756
+ }, import("zod/v4/core").$strip>;
757
+ }, import("zod/v4/core").$strip>>;
758
+ readonly markReady: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
759
+ shipmentId: import("zod").ZodString;
760
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
761
+ moved: import("zod").ZodBoolean;
762
+ message: import("zod").ZodString;
763
+ shipment: import("zod").ZodObject<{
764
+ id: import("zod").ZodString;
765
+ name: import("zod").ZodNullable<import("zod").ZodString>;
766
+ orderId: import("zod").ZodNullable<import("zod").ZodString>;
767
+ kind: import("zod").ZodNullable<import("zod").ZodString>;
768
+ state: import("zod").ZodNullable<import("zod").ZodString>;
769
+ tracking: import("zod").ZodNullable<import("zod").ZodString>;
770
+ collectAt: import("zod").ZodNullable<import("zod").ZodString>;
771
+ buyerId: import("zod").ZodNullable<import("zod").ZodString>;
772
+ buyer: import("zod").ZodNullable<import("zod").ZodString>;
773
+ createdAt: import("zod").ZodNullable<import("zod").ZodString>;
774
+ }, import("zod/v4/core").$strip>;
775
+ }, import("zod/v4/core").$strip>>;
776
+ readonly markCollected: import("@composable-os/sdk").ToolSpec<import("zod").ZodObject<{
777
+ shipmentId: import("zod").ZodString;
778
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
779
+ moved: import("zod").ZodBoolean;
780
+ message: import("zod").ZodString;
781
+ shipment: import("zod").ZodObject<{
782
+ id: import("zod").ZodString;
783
+ name: import("zod").ZodNullable<import("zod").ZodString>;
784
+ orderId: import("zod").ZodNullable<import("zod").ZodString>;
785
+ kind: import("zod").ZodNullable<import("zod").ZodString>;
786
+ state: import("zod").ZodNullable<import("zod").ZodString>;
787
+ tracking: import("zod").ZodNullable<import("zod").ZodString>;
788
+ collectAt: import("zod").ZodNullable<import("zod").ZodString>;
789
+ buyerId: import("zod").ZodNullable<import("zod").ZodString>;
790
+ buyer: import("zod").ZodNullable<import("zod").ZodString>;
791
+ createdAt: import("zod").ZodNullable<import("zod").ZodString>;
792
+ }, import("zod/v4/core").$strip>;
793
+ }, import("zod/v4/core").$strip>>;
794
+ };
795
+ }>;
2
796
  export default _default;
package/dist/tools.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { z } from "@composable-os/sdk";
1
2
  export declare const ITEM = "shop.item";
2
3
  export declare const VARIANT = "shop.variant";
3
4
  export declare const SHIPMENT = "shop.shipment";
@@ -9,11 +10,120 @@ export interface HostRecord {
9
10
  }
10
11
  /** The most variants one call lists. */
11
12
  export declare const STOCK_LEVELS_LIMIT = 200;
12
- export declare const stockLevels: any;
13
+ export declare const stockLevels: import("@composable-os/sdk").ToolSpec<z.ZodObject<{
14
+ lowOnly: z.ZodOptional<z.ZodBoolean>;
15
+ category: z.ZodOptional<z.ZodString>;
16
+ supplierId: z.ZodOptional<z.ZodString>;
17
+ }, z.core.$strip>, z.ZodObject<{
18
+ variants: z.ZodArray<z.ZodObject<{
19
+ variantId: z.ZodString;
20
+ variant: z.ZodNullable<z.ZodString>;
21
+ itemId: z.ZodNullable<z.ZodString>;
22
+ item: z.ZodNullable<z.ZodString>;
23
+ category: z.ZodNullable<z.ZodString>;
24
+ onHand: z.ZodNumber;
25
+ held: z.ZodNumber;
26
+ available: z.ZodNumber;
27
+ reorderAt: z.ZodNullable<z.ZodNumber>;
28
+ reorderQty: z.ZodNullable<z.ZodNumber>;
29
+ low: z.ZodBoolean;
30
+ supplierId: z.ZodNullable<z.ZodString>;
31
+ supplier: z.ZodNullable<z.ZodString>;
32
+ }, z.core.$strip>>;
33
+ truncated: z.ZodBoolean;
34
+ }, z.core.$strip>>;
13
35
  /** The most shipments one call lists. */
14
36
  export declare const SHIPMENTS_LIMIT = 100;
15
- export declare const shipmentsToSend: any;
16
- export declare const markPacked: any;
17
- export declare const markSent: any;
18
- export declare const markReady: any;
19
- export declare const markCollected: any;
37
+ export declare const shipmentsToSend: import("@composable-os/sdk").ToolSpec<z.ZodObject<{
38
+ state: z.ZodOptional<z.ZodEnum<{
39
+ to_pack: "to_pack";
40
+ packed: "packed";
41
+ ready: "ready";
42
+ }>>;
43
+ }, z.core.$strip>, z.ZodObject<{
44
+ shipments: z.ZodArray<z.ZodObject<{
45
+ id: z.ZodString;
46
+ name: z.ZodNullable<z.ZodString>;
47
+ orderId: z.ZodNullable<z.ZodString>;
48
+ kind: z.ZodNullable<z.ZodString>;
49
+ state: z.ZodNullable<z.ZodString>;
50
+ tracking: z.ZodNullable<z.ZodString>;
51
+ collectAt: z.ZodNullable<z.ZodString>;
52
+ buyerId: z.ZodNullable<z.ZodString>;
53
+ buyer: z.ZodNullable<z.ZodString>;
54
+ createdAt: z.ZodNullable<z.ZodString>;
55
+ }, z.core.$strip>>;
56
+ }, z.core.$strip>>;
57
+ export declare const markPacked: import("@composable-os/sdk").ToolSpec<z.ZodObject<{
58
+ shipmentId: z.ZodString;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ moved: z.ZodBoolean;
61
+ message: z.ZodString;
62
+ shipment: z.ZodObject<{
63
+ id: z.ZodString;
64
+ name: z.ZodNullable<z.ZodString>;
65
+ orderId: z.ZodNullable<z.ZodString>;
66
+ kind: z.ZodNullable<z.ZodString>;
67
+ state: z.ZodNullable<z.ZodString>;
68
+ tracking: z.ZodNullable<z.ZodString>;
69
+ collectAt: z.ZodNullable<z.ZodString>;
70
+ buyerId: z.ZodNullable<z.ZodString>;
71
+ buyer: z.ZodNullable<z.ZodString>;
72
+ createdAt: z.ZodNullable<z.ZodString>;
73
+ }, z.core.$strip>;
74
+ }, z.core.$strip>>;
75
+ export declare const markSent: import("@composable-os/sdk").ToolSpec<z.ZodObject<{
76
+ shipmentId: z.ZodString;
77
+ tracking: z.ZodOptional<z.ZodString>;
78
+ }, z.core.$strip>, z.ZodObject<{
79
+ moved: z.ZodBoolean;
80
+ message: z.ZodString;
81
+ shipment: z.ZodObject<{
82
+ id: z.ZodString;
83
+ name: z.ZodNullable<z.ZodString>;
84
+ orderId: z.ZodNullable<z.ZodString>;
85
+ kind: z.ZodNullable<z.ZodString>;
86
+ state: z.ZodNullable<z.ZodString>;
87
+ tracking: z.ZodNullable<z.ZodString>;
88
+ collectAt: z.ZodNullable<z.ZodString>;
89
+ buyerId: z.ZodNullable<z.ZodString>;
90
+ buyer: z.ZodNullable<z.ZodString>;
91
+ createdAt: z.ZodNullable<z.ZodString>;
92
+ }, z.core.$strip>;
93
+ }, z.core.$strip>>;
94
+ export declare const markReady: import("@composable-os/sdk").ToolSpec<z.ZodObject<{
95
+ shipmentId: z.ZodString;
96
+ }, z.core.$strip>, z.ZodObject<{
97
+ moved: z.ZodBoolean;
98
+ message: z.ZodString;
99
+ shipment: z.ZodObject<{
100
+ id: z.ZodString;
101
+ name: z.ZodNullable<z.ZodString>;
102
+ orderId: z.ZodNullable<z.ZodString>;
103
+ kind: z.ZodNullable<z.ZodString>;
104
+ state: z.ZodNullable<z.ZodString>;
105
+ tracking: z.ZodNullable<z.ZodString>;
106
+ collectAt: z.ZodNullable<z.ZodString>;
107
+ buyerId: z.ZodNullable<z.ZodString>;
108
+ buyer: z.ZodNullable<z.ZodString>;
109
+ createdAt: z.ZodNullable<z.ZodString>;
110
+ }, z.core.$strip>;
111
+ }, z.core.$strip>>;
112
+ export declare const markCollected: import("@composable-os/sdk").ToolSpec<z.ZodObject<{
113
+ shipmentId: z.ZodString;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ moved: z.ZodBoolean;
116
+ message: z.ZodString;
117
+ shipment: z.ZodObject<{
118
+ id: z.ZodString;
119
+ name: z.ZodNullable<z.ZodString>;
120
+ orderId: z.ZodNullable<z.ZodString>;
121
+ kind: z.ZodNullable<z.ZodString>;
122
+ state: z.ZodNullable<z.ZodString>;
123
+ tracking: z.ZodNullable<z.ZodString>;
124
+ collectAt: z.ZodNullable<z.ZodString>;
125
+ buyerId: z.ZodNullable<z.ZodString>;
126
+ buyer: z.ZodNullable<z.ZodString>;
127
+ createdAt: z.ZodNullable<z.ZodString>;
128
+ }, z.core.$strip>;
129
+ }, z.core.$strip>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composable-os/pack-shop",
3
- "version": "0.1.0-beta.12",
3
+ "version": "0.1.0-beta.13",
4
4
  "license": "FSL-1.1-ALv2",
5
5
  "type": "module",
6
6
  "repository": {
@@ -28,6 +28,6 @@
28
28
  "description": "One list of what the business sells, in its sizes and flavours, sold online and at the gym, with stock kept by the host, posting or collecting, and the shipments to pack and send."
29
29
  },
30
30
  "dependencies": {
31
- "@composable-os/sdk": "0.1.0-beta.12"
31
+ "@composable-os/sdk": "0.1.0-beta.13"
32
32
  }
33
33
  }