@forjio/storlaunch-cli 0.15.3 → 0.17.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.
@@ -102,18 +102,27 @@ export const API_ROUTES = [
102
102
  "path": "/api/v1/account/blog/posts",
103
103
  "summary": "List posts",
104
104
  "pathParams": [],
105
- "query": [],
106
- "body": null
107
- },
108
- {
109
- "name": "blog-posts-2",
110
- "method": "GET",
111
- "path": "/api/v1/account/blog/posts/{id}",
112
- "summary": "Get a post",
113
- "pathParams": [
114
- "id"
105
+ "query": [
106
+ {
107
+ "name": "status",
108
+ "kind": "string",
109
+ "required": false,
110
+ "choices": [
111
+ "draft",
112
+ "published"
113
+ ]
114
+ },
115
+ {
116
+ "name": "limit",
117
+ "kind": "number",
118
+ "required": false
119
+ },
120
+ {
121
+ "name": "cursor",
122
+ "kind": "string",
123
+ "required": false
124
+ }
115
125
  ],
116
- "query": [],
117
126
  "body": null
118
127
  },
119
128
  {
@@ -293,17 +302,6 @@ export const API_ROUTES = [
293
302
  "query": [],
294
303
  "body": null
295
304
  },
296
- {
297
- "name": "domains-2",
298
- "method": "GET",
299
- "path": "/api/v1/account/domains/{id}",
300
- "summary": "Get domain",
301
- "pathParams": [
302
- "id"
303
- ],
304
- "query": [],
305
- "body": null
306
- },
307
305
  {
308
306
  "name": "domains-provision-callback",
309
307
  "method": "POST",
@@ -364,6 +362,34 @@ export const API_ROUTES = [
364
362
  ],
365
363
  "body": null
366
364
  },
365
+ {
366
+ "name": "get-blog-posts",
367
+ "method": "GET",
368
+ "path": "/api/v1/account/blog/posts/{id}",
369
+ "summary": "Get a post",
370
+ "pathParams": [
371
+ "id"
372
+ ],
373
+ "query": [],
374
+ "body": null,
375
+ "aliases": [
376
+ "blog-posts-2"
377
+ ]
378
+ },
379
+ {
380
+ "name": "get-domains",
381
+ "method": "GET",
382
+ "path": "/api/v1/account/domains/{id}",
383
+ "summary": "Get domain",
384
+ "pathParams": [
385
+ "id"
386
+ ],
387
+ "query": [],
388
+ "body": null,
389
+ "aliases": [
390
+ "domains-2"
391
+ ]
392
+ },
367
393
  {
368
394
  "name": "list",
369
395
  "method": "GET",
@@ -830,7 +856,19 @@ export const API_ROUTES = [
830
856
  "path": "/api/v1/analytics/overview",
831
857
  "summary": "GET /analytics/overview Response shape is flat to match what the dashboard page reads (frontend/src/app/(dashboard)/dashboard/page.tsx). `recentTransactions` unions paid Invoices (Plugipay-driven) and",
832
858
  "pathParams": [],
833
- "query": [],
859
+ "query": [
860
+ {
861
+ "name": "period",
862
+ "kind": "string",
863
+ "required": false,
864
+ "choices": [
865
+ "7d",
866
+ "30d",
867
+ "90d",
868
+ "12m"
869
+ ]
870
+ }
871
+ ],
834
872
  "body": null
835
873
  },
836
874
  {
@@ -839,7 +877,29 @@ export const API_ROUTES = [
839
877
  "path": "/api/v1/analytics/revenue",
840
878
  "summary": "GET /analytics/revenue",
841
879
  "pathParams": [],
842
- "query": [],
880
+ "query": [
881
+ {
882
+ "name": "period",
883
+ "kind": "string",
884
+ "required": false,
885
+ "choices": [
886
+ "7d",
887
+ "30d",
888
+ "90d",
889
+ "12m"
890
+ ]
891
+ },
892
+ {
893
+ "name": "granularity",
894
+ "kind": "string",
895
+ "required": false,
896
+ "choices": [
897
+ "day",
898
+ "week",
899
+ "month"
900
+ ]
901
+ }
902
+ ],
843
903
  "body": null
844
904
  },
845
905
  {
@@ -848,7 +908,29 @@ export const API_ROUTES = [
848
908
  "path": "/api/v1/analytics/subscriptions",
849
909
  "summary": "GET /analytics/subscriptions",
850
910
  "pathParams": [],
851
- "query": [],
911
+ "query": [
912
+ {
913
+ "name": "period",
914
+ "kind": "string",
915
+ "required": false,
916
+ "choices": [
917
+ "7d",
918
+ "30d",
919
+ "90d",
920
+ "12m"
921
+ ]
922
+ },
923
+ {
924
+ "name": "granularity",
925
+ "kind": "string",
926
+ "required": false,
927
+ "choices": [
928
+ "day",
929
+ "week",
930
+ "month"
931
+ ]
932
+ }
933
+ ],
852
934
  "body": null
853
935
  }
854
936
  ]
@@ -978,7 +1060,23 @@ export const API_ROUTES = [
978
1060
  "path": "/api/v1/buyers",
979
1061
  "summary": "List buyers",
980
1062
  "pathParams": [],
981
- "query": [],
1063
+ "query": [
1064
+ {
1065
+ "name": "search",
1066
+ "kind": "string",
1067
+ "required": false
1068
+ },
1069
+ {
1070
+ "name": "limit",
1071
+ "kind": "number",
1072
+ "required": false
1073
+ },
1074
+ {
1075
+ "name": "cursor",
1076
+ "kind": "string",
1077
+ "required": false
1078
+ }
1079
+ ],
982
1080
  "body": null
983
1081
  }
984
1082
  ]
@@ -1124,24 +1222,7 @@ export const API_ROUTES = [
1124
1222
  {
1125
1223
  "name": "accountSlug",
1126
1224
  "kind": "string",
1127
- "required": false
1128
- }
1129
- ],
1130
- "body": null
1131
- },
1132
- {
1133
- "name": "addresses-2",
1134
- "method": "GET",
1135
- "path": "/api/v1/checkout/addresses/{id}",
1136
- "summary": "Get an address",
1137
- "pathParams": [
1138
- "id"
1139
- ],
1140
- "query": [
1141
- {
1142
- "name": "accountSlug",
1143
- "kind": "string",
1144
- "required": false
1225
+ "required": true
1145
1226
  }
1146
1227
  ],
1147
1228
  "body": null
@@ -1430,7 +1511,7 @@ export const API_ROUTES = [
1430
1511
  {
1431
1512
  "name": "accountSlug",
1432
1513
  "kind": "string",
1433
- "required": false
1514
+ "required": true
1434
1515
  }
1435
1516
  ],
1436
1517
  "body": []
@@ -1495,6 +1576,68 @@ export const API_ROUTES = [
1495
1576
  }
1496
1577
  ]
1497
1578
  },
1579
+ {
1580
+ "name": "get-addresses",
1581
+ "method": "GET",
1582
+ "path": "/api/v1/checkout/addresses/{id}",
1583
+ "summary": "Get an address",
1584
+ "pathParams": [
1585
+ "id"
1586
+ ],
1587
+ "query": [
1588
+ {
1589
+ "name": "accountSlug",
1590
+ "kind": "string",
1591
+ "required": true
1592
+ }
1593
+ ],
1594
+ "body": null,
1595
+ "aliases": [
1596
+ "addresses-2"
1597
+ ]
1598
+ },
1599
+ {
1600
+ "name": "get-invoices",
1601
+ "method": "GET",
1602
+ "path": "/api/v1/checkout/invoices/{id}",
1603
+ "summary": "Get an invoice",
1604
+ "pathParams": [
1605
+ "id"
1606
+ ],
1607
+ "query": [],
1608
+ "body": null,
1609
+ "aliases": [
1610
+ "invoices-2"
1611
+ ]
1612
+ },
1613
+ {
1614
+ "name": "get-orders",
1615
+ "method": "GET",
1616
+ "path": "/api/v1/checkout/orders/{id}",
1617
+ "summary": "Get an order",
1618
+ "pathParams": [
1619
+ "id"
1620
+ ],
1621
+ "query": [],
1622
+ "body": null,
1623
+ "aliases": [
1624
+ "orders-2"
1625
+ ]
1626
+ },
1627
+ {
1628
+ "name": "get-subscriptions",
1629
+ "method": "GET",
1630
+ "path": "/api/v1/checkout/subscriptions/{id}",
1631
+ "summary": "Get a subscription",
1632
+ "pathParams": [
1633
+ "id"
1634
+ ],
1635
+ "query": [],
1636
+ "body": null,
1637
+ "aliases": [
1638
+ "subscriptions-2"
1639
+ ]
1640
+ },
1498
1641
  {
1499
1642
  "name": "gifts",
1500
1643
  "method": "GET",
@@ -1513,17 +1656,6 @@ export const API_ROUTES = [
1513
1656
  "query": [],
1514
1657
  "body": null
1515
1658
  },
1516
- {
1517
- "name": "invoices-2",
1518
- "method": "GET",
1519
- "path": "/api/v1/checkout/invoices/{id}",
1520
- "summary": "Get an invoice",
1521
- "pathParams": [
1522
- "id"
1523
- ],
1524
- "query": [],
1525
- "body": null
1526
- },
1527
1659
  {
1528
1660
  "name": "invoices-pdf",
1529
1661
  "method": "GET",
@@ -1565,17 +1697,6 @@ export const API_ROUTES = [
1565
1697
  "query": [],
1566
1698
  "body": null
1567
1699
  },
1568
- {
1569
- "name": "orders-2",
1570
- "method": "GET",
1571
- "path": "/api/v1/checkout/orders/{id}",
1572
- "summary": "Get an order",
1573
- "pathParams": [
1574
- "id"
1575
- ],
1576
- "query": [],
1577
- "body": null
1578
- },
1579
1700
  {
1580
1701
  "name": "profile",
1581
1702
  "method": "GET",
@@ -1666,17 +1787,6 @@ export const API_ROUTES = [
1666
1787
  "query": [],
1667
1788
  "body": null
1668
1789
  },
1669
- {
1670
- "name": "subscriptions-2",
1671
- "method": "GET",
1672
- "path": "/api/v1/checkout/subscriptions/{id}",
1673
- "summary": "Get a subscription",
1674
- "pathParams": [
1675
- "id"
1676
- ],
1677
- "query": [],
1678
- "body": null
1679
- },
1680
1790
  {
1681
1791
  "name": "subscriptions-cancel",
1682
1792
  "method": "POST",
@@ -1993,7 +2103,13 @@ export const API_ROUTES = [
1993
2103
  "path": "/api/v1/conversations/embed/products",
1994
2104
  "summary": "List products",
1995
2105
  "pathParams": [],
1996
- "query": [],
2106
+ "query": [
2107
+ {
2108
+ "name": "q",
2109
+ "kind": "string",
2110
+ "required": false
2111
+ }
2112
+ ],
1997
2113
  "body": null
1998
2114
  },
1999
2115
  {
@@ -2465,7 +2581,7 @@ export const API_ROUTES = [
2465
2581
  {
2466
2582
  "name": "variantId",
2467
2583
  "kind": "string",
2468
- "required": false
2584
+ "required": true
2469
2585
  }
2470
2586
  ],
2471
2587
  "body": null
@@ -2564,7 +2680,7 @@ export const API_ROUTES = [
2564
2680
  {
2565
2681
  "name": "productId",
2566
2682
  "kind": "string",
2567
- "required": false
2683
+ "required": true
2568
2684
  }
2569
2685
  ],
2570
2686
  "body": null
@@ -2682,17 +2798,6 @@ export const API_ROUTES = [
2682
2798
  ],
2683
2799
  "body": null
2684
2800
  },
2685
- {
2686
- "name": "entries-2",
2687
- "method": "GET",
2688
- "path": "/api/v1/ledger/entries/{id}",
2689
- "summary": "Get an entry",
2690
- "pathParams": [
2691
- "id"
2692
- ],
2693
- "query": [],
2694
- "body": null
2695
- },
2696
2801
  {
2697
2802
  "name": "entries-csv",
2698
2803
  "method": "GET",
@@ -2701,6 +2806,20 @@ export const API_ROUTES = [
2701
2806
  "pathParams": [],
2702
2807
  "query": [],
2703
2808
  "body": null
2809
+ },
2810
+ {
2811
+ "name": "get-entries",
2812
+ "method": "GET",
2813
+ "path": "/api/v1/ledger/entries/{id}",
2814
+ "summary": "Get an entry",
2815
+ "pathParams": [
2816
+ "id"
2817
+ ],
2818
+ "query": [],
2819
+ "body": null,
2820
+ "aliases": [
2821
+ "entries-2"
2822
+ ]
2704
2823
  }
2705
2824
  ]
2706
2825
  },
@@ -2804,19 +2923,53 @@ export const API_ROUTES = [
2804
2923
  "path": "/api/v1/manual-orders",
2805
2924
  "summary": "List manual orders",
2806
2925
  "pathParams": [],
2807
- "query": [],
2808
- "body": null
2809
- },
2810
- {
2811
- "name": "tracking",
2812
- "method": "GET",
2813
- "path": "/api/v1/manual-orders/{id}/tracking",
2814
- "summary": "S-086: live Biteship tracking (driver, status, history) for orders with a Fulkruma-managed shipment.",
2815
- "pathParams": [
2816
- "id"
2817
- ],
2818
- "query": [],
2819
- "body": null
2926
+ "query": [
2927
+ {
2928
+ "name": "limit",
2929
+ "kind": "number",
2930
+ "required": false
2931
+ },
2932
+ {
2933
+ "name": "cursor",
2934
+ "kind": "string",
2935
+ "required": false
2936
+ },
2937
+ {
2938
+ "name": "paymentStatus",
2939
+ "kind": "string",
2940
+ "required": false,
2941
+ "choices": [
2942
+ "awaiting_payment",
2943
+ "payment_claimed",
2944
+ "payment_confirmed",
2945
+ "canceled",
2946
+ "refunded"
2947
+ ]
2948
+ },
2949
+ {
2950
+ "name": "fulfillmentStatus",
2951
+ "kind": "string",
2952
+ "required": false,
2953
+ "choices": [
2954
+ "preparing",
2955
+ "ready_to_ship",
2956
+ "shipped",
2957
+ "delivered"
2958
+ ]
2959
+ }
2960
+ ],
2961
+ "body": null
2962
+ },
2963
+ {
2964
+ "name": "tracking",
2965
+ "method": "GET",
2966
+ "path": "/api/v1/manual-orders/{id}/tracking",
2967
+ "summary": "S-086: live Biteship tracking (driver, status, history) for orders with a Fulkruma-managed shipment.",
2968
+ "pathParams": [
2969
+ "id"
2970
+ ],
2971
+ "query": [],
2972
+ "body": null
2820
2973
  },
2821
2974
  {
2822
2975
  "name": "update",
@@ -2957,18 +3110,33 @@ export const API_ROUTES = [
2957
3110
  "path": "/api/v1/payment/checkout-sessions",
2958
3111
  "summary": "List checkout sessions",
2959
3112
  "pathParams": [],
2960
- "query": [],
2961
- "body": null
2962
- },
2963
- {
2964
- "name": "checkout-sessions-2",
2965
- "method": "GET",
2966
- "path": "/api/v1/payment/checkout-sessions/{id}",
2967
- "summary": "Get a checkout session",
2968
- "pathParams": [
2969
- "id"
3113
+ "query": [
3114
+ {
3115
+ "name": "limit",
3116
+ "kind": "number",
3117
+ "required": false
3118
+ },
3119
+ {
3120
+ "name": "cursor",
3121
+ "kind": "string",
3122
+ "required": false
3123
+ },
3124
+ {
3125
+ "name": "status",
3126
+ "kind": "string",
3127
+ "required": false,
3128
+ "choices": [
3129
+ "open",
3130
+ "completed",
3131
+ "expired"
3132
+ ]
3133
+ },
3134
+ {
3135
+ "name": "customerId",
3136
+ "kind": "string",
3137
+ "required": false
3138
+ }
2970
3139
  ],
2971
- "query": [],
2972
3140
  "body": null
2973
3141
  },
2974
3142
  {
@@ -3289,7 +3457,7 @@ export const API_ROUTES = [
3289
3457
  "name": "create-webhook-endpoints",
3290
3458
  "method": "POST",
3291
3459
  "path": "/api/v1/payment/webhook-endpoints",
3292
- "summary": "Create a webhook endpoint",
3460
+ "summary": "Register an endpoint.",
3293
3461
  "pathParams": [],
3294
3462
  "query": [],
3295
3463
  "body": [
@@ -3301,12 +3469,17 @@ export const API_ROUTES = [
3301
3469
  {
3302
3470
  "name": "events",
3303
3471
  "kind": "array",
3304
- "required": true
3472
+ "required": false
3305
3473
  },
3306
3474
  {
3307
3475
  "name": "description",
3308
3476
  "kind": "string",
3309
3477
  "required": false
3478
+ },
3479
+ {
3480
+ "name": "active",
3481
+ "kind": "boolean",
3482
+ "required": false
3310
3483
  }
3311
3484
  ]
3312
3485
  },
@@ -3316,18 +3489,23 @@ export const API_ROUTES = [
3316
3489
  "path": "/api/v1/payment/customers",
3317
3490
  "summary": "List customers",
3318
3491
  "pathParams": [],
3319
- "query": [],
3320
- "body": null
3321
- },
3322
- {
3323
- "name": "customers-2",
3324
- "method": "GET",
3325
- "path": "/api/v1/payment/customers/{id}",
3326
- "summary": "Get a customer",
3327
- "pathParams": [
3328
- "id"
3492
+ "query": [
3493
+ {
3494
+ "name": "limit",
3495
+ "kind": "number",
3496
+ "required": false
3497
+ },
3498
+ {
3499
+ "name": "cursor",
3500
+ "kind": "string",
3501
+ "required": false
3502
+ },
3503
+ {
3504
+ "name": "email",
3505
+ "kind": "string",
3506
+ "required": false
3507
+ }
3329
3508
  ],
3330
- "query": [],
3331
3509
  "body": null
3332
3510
  },
3333
3511
  {
@@ -3402,6 +3580,132 @@ export const API_ROUTES = [
3402
3580
  "query": [],
3403
3581
  "body": null
3404
3582
  },
3583
+ {
3584
+ "name": "get-checkout-sessions",
3585
+ "method": "GET",
3586
+ "path": "/api/v1/payment/checkout-sessions/{id}",
3587
+ "summary": "Get a checkout session",
3588
+ "pathParams": [
3589
+ "id"
3590
+ ],
3591
+ "query": [],
3592
+ "body": null,
3593
+ "aliases": [
3594
+ "checkout-sessions-2"
3595
+ ]
3596
+ },
3597
+ {
3598
+ "name": "get-customers",
3599
+ "method": "GET",
3600
+ "path": "/api/v1/payment/customers/{id}",
3601
+ "summary": "Get a customer",
3602
+ "pathParams": [
3603
+ "id"
3604
+ ],
3605
+ "query": [],
3606
+ "body": null,
3607
+ "aliases": [
3608
+ "customers-2"
3609
+ ]
3610
+ },
3611
+ {
3612
+ "name": "get-gift-cards",
3613
+ "method": "GET",
3614
+ "path": "/api/v1/payment/gift-cards/{code}",
3615
+ "summary": "Balance lookup by redemption code (used by checkout too).",
3616
+ "pathParams": [
3617
+ "code"
3618
+ ],
3619
+ "query": [],
3620
+ "body": null,
3621
+ "aliases": [
3622
+ "gift-cards-2"
3623
+ ]
3624
+ },
3625
+ {
3626
+ "name": "get-invoices",
3627
+ "method": "GET",
3628
+ "path": "/api/v1/payment/invoices/{id}",
3629
+ "summary": "Get an invoice",
3630
+ "pathParams": [
3631
+ "id"
3632
+ ],
3633
+ "query": [],
3634
+ "body": null,
3635
+ "aliases": [
3636
+ "invoices-2"
3637
+ ]
3638
+ },
3639
+ {
3640
+ "name": "get-plans",
3641
+ "method": "GET",
3642
+ "path": "/api/v1/payment/plans/{id}",
3643
+ "summary": "Get a plan",
3644
+ "pathParams": [
3645
+ "id"
3646
+ ],
3647
+ "query": [],
3648
+ "body": null,
3649
+ "aliases": [
3650
+ "plans-2"
3651
+ ]
3652
+ },
3653
+ {
3654
+ "name": "get-receipts",
3655
+ "method": "GET",
3656
+ "path": "/api/v1/payment/receipts/{id}",
3657
+ "summary": "Get a receipt",
3658
+ "pathParams": [
3659
+ "id"
3660
+ ],
3661
+ "query": [],
3662
+ "body": null,
3663
+ "aliases": [
3664
+ "receipts-2"
3665
+ ]
3666
+ },
3667
+ {
3668
+ "name": "get-subscriptions",
3669
+ "method": "GET",
3670
+ "path": "/api/v1/payment/subscriptions/{id}",
3671
+ "summary": "Get a subscription",
3672
+ "pathParams": [
3673
+ "id"
3674
+ ],
3675
+ "query": [],
3676
+ "body": null,
3677
+ "aliases": [
3678
+ "subscriptions-2"
3679
+ ]
3680
+ },
3681
+ {
3682
+ "name": "get-webhook-endpoints",
3683
+ "method": "GET",
3684
+ "path": "/api/v1/payment/webhook-endpoints/{id}",
3685
+ "summary": "Get a webhook endpoint",
3686
+ "pathParams": [
3687
+ "id"
3688
+ ],
3689
+ "query": [],
3690
+ "body": null,
3691
+ "aliases": [
3692
+ "webhook-endpoints-2"
3693
+ ]
3694
+ },
3695
+ {
3696
+ "name": "get-webhook-events",
3697
+ "method": "GET",
3698
+ "path": "/api/v1/payment/webhook-events/{id}",
3699
+ "summary": "Get a webhook delivery, with every attempt made at it.",
3700
+ "pathParams": [
3701
+ "id"
3702
+ ],
3703
+ "query": [],
3704
+ "body": null,
3705
+ "aliases": [
3706
+ "webhook-events-2"
3707
+ ]
3708
+ },
3405
3709
  {
3406
3710
  "name": "gift-cards",
3407
3711
  "method": "GET",
@@ -3432,17 +3736,6 @@ export const API_ROUTES = [
3432
3736
  ],
3433
3737
  "body": null
3434
3738
  },
3435
- {
3436
- "name": "gift-cards-2",
3437
- "method": "GET",
3438
- "path": "/api/v1/payment/gift-cards/{code}",
3439
- "summary": "Balance lookup by redemption code (used by checkout too).",
3440
- "pathParams": [
3441
- "code"
3442
- ],
3443
- "query": [],
3444
- "body": null
3445
- },
3446
3739
  {
3447
3740
  "name": "gift-cards-redeem",
3448
3741
  "method": "POST",
@@ -3569,18 +3862,40 @@ export const API_ROUTES = [
3569
3862
  "path": "/api/v1/payment/invoices",
3570
3863
  "summary": "List invoices",
3571
3864
  "pathParams": [],
3572
- "query": [],
3573
- "body": null
3574
- },
3575
- {
3576
- "name": "invoices-2",
3577
- "method": "GET",
3578
- "path": "/api/v1/payment/invoices/{id}",
3579
- "summary": "Get an invoice",
3580
- "pathParams": [
3581
- "id"
3865
+ "query": [
3866
+ {
3867
+ "name": "limit",
3868
+ "kind": "number",
3869
+ "required": false
3870
+ },
3871
+ {
3872
+ "name": "cursor",
3873
+ "kind": "string",
3874
+ "required": false
3875
+ },
3876
+ {
3877
+ "name": "customerId",
3878
+ "kind": "string",
3879
+ "required": false
3880
+ },
3881
+ {
3882
+ "name": "subscriptionId",
3883
+ "kind": "string",
3884
+ "required": false
3885
+ },
3886
+ {
3887
+ "name": "status",
3888
+ "kind": "string",
3889
+ "required": false,
3890
+ "choices": [
3891
+ "draft",
3892
+ "open",
3893
+ "paid",
3894
+ "overdue",
3895
+ "void"
3896
+ ]
3897
+ }
3582
3898
  ],
3583
- "query": [],
3584
3899
  "body": null
3585
3900
  },
3586
3901
  {
@@ -3620,18 +3935,23 @@ export const API_ROUTES = [
3620
3935
  "path": "/api/v1/payment/plans",
3621
3936
  "summary": "List plans",
3622
3937
  "pathParams": [],
3623
- "query": [],
3624
- "body": null
3625
- },
3626
- {
3627
- "name": "plans-2",
3628
- "method": "GET",
3629
- "path": "/api/v1/payment/plans/{id}",
3630
- "summary": "Get a plan",
3631
- "pathParams": [
3632
- "id"
3938
+ "query": [
3939
+ {
3940
+ "name": "limit",
3941
+ "kind": "number",
3942
+ "required": false
3943
+ },
3944
+ {
3945
+ "name": "cursor",
3946
+ "kind": "string",
3947
+ "required": false
3948
+ },
3949
+ {
3950
+ "name": "active",
3951
+ "kind": "string",
3952
+ "required": false
3953
+ }
3633
3954
  ],
3634
- "query": [],
3635
3955
  "body": null
3636
3956
  },
3637
3957
  {
@@ -3720,17 +4040,6 @@ export const API_ROUTES = [
3720
4040
  ],
3721
4041
  "body": null
3722
4042
  },
3723
- {
3724
- "name": "receipts-2",
3725
- "method": "GET",
3726
- "path": "/api/v1/payment/receipts/{id}",
3727
- "summary": "Get a receipt",
3728
- "pathParams": [
3729
- "id"
3730
- ],
3731
- "query": [],
3732
- "body": null
3733
- },
3734
4043
  {
3735
4044
  "name": "receipts-email",
3736
4045
  "method": "POST",
@@ -3818,18 +4127,40 @@ export const API_ROUTES = [
3818
4127
  "path": "/api/v1/payment/subscriptions",
3819
4128
  "summary": "List subscriptions",
3820
4129
  "pathParams": [],
3821
- "query": [],
3822
- "body": null
3823
- },
3824
- {
3825
- "name": "subscriptions-2",
3826
- "method": "GET",
3827
- "path": "/api/v1/payment/subscriptions/{id}",
3828
- "summary": "Get a subscription",
3829
- "pathParams": [
3830
- "id"
4130
+ "query": [
4131
+ {
4132
+ "name": "limit",
4133
+ "kind": "number",
4134
+ "required": false
4135
+ },
4136
+ {
4137
+ "name": "cursor",
4138
+ "kind": "string",
4139
+ "required": false
4140
+ },
4141
+ {
4142
+ "name": "customerId",
4143
+ "kind": "string",
4144
+ "required": false
4145
+ },
4146
+ {
4147
+ "name": "planId",
4148
+ "kind": "string",
4149
+ "required": false
4150
+ },
4151
+ {
4152
+ "name": "status",
4153
+ "kind": "string",
4154
+ "required": false,
4155
+ "choices": [
4156
+ "trialing",
4157
+ "active",
4158
+ "past_due",
4159
+ "paused",
4160
+ "canceled"
4161
+ ]
4162
+ }
3831
4163
  ],
3832
- "query": [],
3833
4164
  "body": null
3834
4165
  },
3835
4166
  {
@@ -3957,7 +4288,7 @@ export const API_ROUTES = [
3957
4288
  "name": "update-webhook-endpoints",
3958
4289
  "method": "PATCH",
3959
4290
  "path": "/api/v1/payment/webhook-endpoints/{id}",
3960
- "summary": "Update a webhook endpoint",
4291
+ "summary": "Update an endpoint. `active: false` pauses it (its queued deliveries become failed); `active: true` re-enables it — also after Storlaunch switched it off for failing — and clears its failure streak.",
3961
4292
  "pathParams": [
3962
4293
  "id"
3963
4294
  ],
@@ -3982,6 +4313,11 @@ export const API_ROUTES = [
3982
4313
  "name": "description",
3983
4314
  "kind": "string",
3984
4315
  "required": false
4316
+ },
4317
+ {
4318
+ "name": "rotateSecret",
4319
+ "kind": "boolean",
4320
+ "required": false
3985
4321
  }
3986
4322
  ]
3987
4323
  },
@@ -3989,16 +4325,36 @@ export const API_ROUTES = [
3989
4325
  "name": "webhook-endpoints",
3990
4326
  "method": "GET",
3991
4327
  "path": "/api/v1/payment/webhook-endpoints",
3992
- "summary": "List webhook endpoints",
4328
+ "summary": "List endpoints, newest first.",
3993
4329
  "pathParams": [],
3994
- "query": [],
4330
+ "query": [
4331
+ {
4332
+ "name": "limit",
4333
+ "kind": "number",
4334
+ "required": false
4335
+ },
4336
+ {
4337
+ "name": "cursor",
4338
+ "kind": "string",
4339
+ "required": false
4340
+ }
4341
+ ],
3995
4342
  "body": null
3996
4343
  },
3997
4344
  {
3998
- "name": "webhook-endpoints-2",
4345
+ "name": "webhook-endpoints-event-types",
3999
4346
  "method": "GET",
4000
- "path": "/api/v1/payment/webhook-endpoints/{id}",
4001
- "summary": "Get a webhook endpoint",
4347
+ "path": "/api/v1/payment/webhook-endpoints/event-types",
4348
+ "summary": "The event types an endpoint can subscribe to: Storlaunch's own catalogue, and — with the Payment module on — Plugipay's (delivered by Plugipay to the same endpoint).",
4349
+ "pathParams": [],
4350
+ "query": [],
4351
+ "body": null
4352
+ },
4353
+ {
4354
+ "name": "webhook-endpoints-test",
4355
+ "method": "POST",
4356
+ "path": "/api/v1/payment/webhook-endpoints/{id}/test",
4357
+ "summary": "Send a test event.",
4002
4358
  "pathParams": [
4003
4359
  "id"
4004
4360
  ],
@@ -4009,27 +4365,56 @@ export const API_ROUTES = [
4009
4365
  "name": "webhook-events",
4010
4366
  "method": "GET",
4011
4367
  "path": "/api/v1/payment/webhook-events",
4012
- "summary": "List webhook events",
4368
+ "summary": "List webhook deliveries, newest first: each with its status (pending, sent, failed), attempt count, next retry, last response and every attempt made.",
4013
4369
  "pathParams": [],
4014
- "query": [],
4015
- "body": null
4016
- },
4017
- {
4018
- "name": "webhook-events-2",
4019
- "method": "GET",
4020
- "path": "/api/v1/payment/webhook-events/{id}",
4021
- "summary": "Get a webhook event",
4022
- "pathParams": [
4023
- "id"
4370
+ "query": [
4371
+ {
4372
+ "name": "limit",
4373
+ "kind": "number",
4374
+ "required": false
4375
+ },
4376
+ {
4377
+ "name": "cursor",
4378
+ "kind": "string",
4379
+ "required": false
4380
+ },
4381
+ {
4382
+ "name": "type",
4383
+ "kind": "string",
4384
+ "required": false
4385
+ },
4386
+ {
4387
+ "name": "endpointId",
4388
+ "kind": "string",
4389
+ "required": false
4390
+ },
4391
+ {
4392
+ "name": "status",
4393
+ "kind": "string",
4394
+ "required": false,
4395
+ "choices": [
4396
+ "pending",
4397
+ "sent",
4398
+ "failed"
4399
+ ]
4400
+ },
4401
+ {
4402
+ "name": "source",
4403
+ "kind": "string",
4404
+ "required": false,
4405
+ "choices": [
4406
+ "storlaunch",
4407
+ "plugipay"
4408
+ ]
4409
+ }
4024
4410
  ],
4025
- "query": [],
4026
4411
  "body": null
4027
4412
  },
4028
4413
  {
4029
4414
  "name": "webhook-events-resend",
4030
4415
  "method": "POST",
4031
4416
  "path": "/api/v1/payment/webhook-events/{id}/resend",
4032
- "summary": "Resend a webhook event",
4417
+ "summary": "Resend a webhook delivery.",
4033
4418
  "pathParams": [
4034
4419
  "id"
4035
4420
  ],
@@ -4421,9 +4806,15 @@ export const API_ROUTES = [
4421
4806
  "name": "areas",
4422
4807
  "method": "GET",
4423
4808
  "path": "/api/v1/shipping/areas",
4424
- "summary": "List areas",
4809
+ "summary": "Area search (the Biteship area ids an origin/rates call takes) lives in fulkruma.",
4425
4810
  "pathParams": [],
4426
- "query": [],
4811
+ "query": [
4812
+ {
4813
+ "name": "q",
4814
+ "kind": "string",
4815
+ "required": false
4816
+ }
4817
+ ],
4427
4818
  "body": null
4428
4819
  },
4429
4820
  {
@@ -4495,6 +4886,20 @@ export const API_ROUTES = [
4495
4886
  }
4496
4887
  ]
4497
4888
  },
4889
+ {
4890
+ "name": "get-shipments",
4891
+ "method": "GET",
4892
+ "path": "/api/v1/shipping/shipments/{id}",
4893
+ "summary": "Get a shipment",
4894
+ "pathParams": [
4895
+ "id"
4896
+ ],
4897
+ "query": [],
4898
+ "body": null,
4899
+ "aliases": [
4900
+ "shipments-2"
4901
+ ]
4902
+ },
4498
4903
  {
4499
4904
  "name": "origin",
4500
4905
  "method": "GET",
@@ -4528,17 +4933,6 @@ export const API_ROUTES = [
4528
4933
  ],
4529
4934
  "body": null
4530
4935
  },
4531
- {
4532
- "name": "shipments-2",
4533
- "method": "GET",
4534
- "path": "/api/v1/shipping/shipments/{id}",
4535
- "summary": "Get a shipment",
4536
- "pathParams": [
4537
- "id"
4538
- ],
4539
- "query": [],
4540
- "body": null
4541
- },
4542
4936
  {
4543
4937
  "name": "shipments-cancel",
4544
4938
  "method": "POST",
@@ -4575,7 +4969,90 @@ export const API_ROUTES = [
4575
4969
  "pathParams": [
4576
4970
  "id"
4577
4971
  ],
4578
- "query": [],
4972
+ "query": [
4973
+ {
4974
+ "name": "size",
4975
+ "kind": "string",
4976
+ "required": false,
4977
+ "choices": [
4978
+ "a4",
4979
+ "thermal-80x100",
4980
+ "thermal-100x150"
4981
+ ]
4982
+ },
4983
+ {
4984
+ "name": "showSenderPhone",
4985
+ "kind": "string",
4986
+ "required": false,
4987
+ "choices": [
4988
+ "true",
4989
+ "false"
4990
+ ]
4991
+ },
4992
+ {
4993
+ "name": "showRecipientPhone",
4994
+ "kind": "string",
4995
+ "required": false,
4996
+ "choices": [
4997
+ "true",
4998
+ "false"
4999
+ ]
5000
+ },
5001
+ {
5002
+ "name": "maskRecipientName",
5003
+ "kind": "string",
5004
+ "required": false,
5005
+ "choices": [
5006
+ "true",
5007
+ "false"
5008
+ ]
5009
+ },
5010
+ {
5011
+ "name": "showShippingCost",
5012
+ "kind": "string",
5013
+ "required": false,
5014
+ "choices": [
5015
+ "true",
5016
+ "false"
5017
+ ]
5018
+ },
5019
+ {
5020
+ "name": "showInsurance",
5021
+ "kind": "string",
5022
+ "required": false,
5023
+ "choices": [
5024
+ "true",
5025
+ "false"
5026
+ ]
5027
+ },
5028
+ {
5029
+ "name": "showItems",
5030
+ "kind": "string",
5031
+ "required": false,
5032
+ "choices": [
5033
+ "true",
5034
+ "false"
5035
+ ]
5036
+ },
5037
+ {
5038
+ "name": "showItemDescriptions",
5039
+ "kind": "string",
5040
+ "required": false,
5041
+ "choices": [
5042
+ "true",
5043
+ "false"
5044
+ ]
5045
+ },
5046
+ {
5047
+ "name": "showItemSkus",
5048
+ "kind": "string",
5049
+ "required": false,
5050
+ "choices": [
5051
+ "true",
5052
+ "false"
5053
+ ]
5054
+ }
5055
+ ],
4579
5056
  "body": null
4580
5057
  },
4581
5058
  {
@@ -4726,7 +5203,22 @@ export const API_ROUTES = [
4726
5203
  "path": "/api/v1/shipping-credits/quote",
4727
5204
  "summary": "What this rupiah amount of credit costs on a given rail.",
4728
5205
  "pathParams": [],
4729
- "query": [],
5206
+ "query": [
5207
+ {
5208
+ "name": "amount",
5209
+ "kind": "number",
5210
+ "required": true
5211
+ },
5212
+ {
5213
+ "name": "currency",
5214
+ "kind": "string",
5215
+ "required": false,
5216
+ "choices": [
5217
+ "IDR",
5218
+ "USD"
5219
+ ]
5220
+ }
5221
+ ],
4730
5222
  "body": null
4731
5223
  },
4732
5224
  {
@@ -4784,7 +5276,23 @@ export const API_ROUTES = [
4784
5276
  "path": "/api/v1/shoppers",
4785
5277
  "summary": "List shoppers",
4786
5278
  "pathParams": [],
4787
- "query": [],
5279
+ "query": [
5280
+ {
5281
+ "name": "search",
5282
+ "kind": "string",
5283
+ "required": false
5284
+ },
5285
+ {
5286
+ "name": "limit",
5287
+ "kind": "number",
5288
+ "required": false
5289
+ },
5290
+ {
5291
+ "name": "cursor",
5292
+ "kind": "string",
5293
+ "required": false
5294
+ }
5295
+ ],
4788
5296
  "body": null
4789
5297
  }
4790
5298
  ]
@@ -5081,64 +5589,185 @@ export const API_ROUTES = [
5081
5589
  "path": "/api/v1/storefront/products/{id}/license-keys/{keyId}",
5082
5590
  "summary": "Keys/:keyId Removes an unassigned key.",
5083
5591
  "pathParams": [
5084
- "id",
5085
- "keyId"
5592
+ "id",
5593
+ "keyId"
5594
+ ],
5595
+ "query": [],
5596
+ "body": null
5597
+ },
5598
+ {
5599
+ "name": "deliveries",
5600
+ "method": "GET",
5601
+ "path": "/api/v1/storefront/deliveries",
5602
+ "summary": "List deliveries",
5603
+ "pathParams": [],
5604
+ "query": [],
5605
+ "body": null
5606
+ },
5607
+ {
5608
+ "name": "deliveries-extend",
5609
+ "method": "POST",
5610
+ "path": "/api/v1/storefront/deliveries/{id}/extend",
5611
+ "summary": "Extend the download window 30 days — from now, or from the current expiry if it's still in the future.",
5612
+ "pathParams": [
5613
+ "id"
5614
+ ],
5615
+ "query": [],
5616
+ "body": null
5617
+ },
5618
+ {
5619
+ "name": "deliveries-reset-downloads",
5620
+ "method": "POST",
5621
+ "path": "/api/v1/storefront/deliveries/{id}/reset-downloads",
5622
+ "summary": "Reset the download counter so the buyer can download again.",
5623
+ "pathParams": [
5624
+ "id"
5625
+ ],
5626
+ "query": [],
5627
+ "body": null
5628
+ },
5629
+ {
5630
+ "name": "deliveries-revoke",
5631
+ "method": "POST",
5632
+ "path": "/api/v1/storefront/deliveries/{id}/revoke",
5633
+ "summary": "Revoke: expire the delivery now — the /dl route 410s past expiry, so the buyer's links stop working immediately.",
5634
+ "pathParams": [
5635
+ "id"
5636
+ ],
5637
+ "query": [],
5638
+ "body": null
5639
+ },
5640
+ {
5641
+ "name": "get-deliveries",
5642
+ "method": "GET",
5643
+ "path": "/api/v1/storefront/deliveries/{id}",
5644
+ "summary": "Get a delivery",
5645
+ "pathParams": [
5646
+ "id"
5647
+ ],
5648
+ "query": [],
5649
+ "body": null,
5650
+ "aliases": [
5651
+ "deliveries-2"
5652
+ ]
5653
+ },
5654
+ {
5655
+ "name": "get-licenses",
5656
+ "method": "GET",
5657
+ "path": "/api/v1/storefront/licenses/{key}",
5658
+ "summary": "Get a license",
5659
+ "pathParams": [
5660
+ "key"
5661
+ ],
5662
+ "query": [],
5663
+ "body": null,
5664
+ "aliases": [
5665
+ "licenses-2"
5666
+ ]
5667
+ },
5668
+ {
5669
+ "name": "get-products",
5670
+ "method": "GET",
5671
+ "path": "/api/v1/storefront/products/{id}",
5672
+ "summary": "GET /storefront/products/:id",
5673
+ "pathParams": [
5674
+ "id"
5086
5675
  ],
5087
5676
  "query": [],
5088
- "body": null
5677
+ "body": null,
5678
+ "aliases": [
5679
+ "products-2"
5680
+ ]
5089
5681
  },
5090
5682
  {
5091
- "name": "deliveries",
5683
+ "name": "get-public",
5092
5684
  "method": "GET",
5093
- "path": "/api/v1/storefront/deliveries",
5094
- "summary": "List deliveries",
5095
- "pathParams": [],
5685
+ "path": "/api/v1/storefront/public/{merchantSlug}",
5686
+ "summary": "List all published products for a merchant",
5687
+ "pathParams": [
5688
+ "merchantSlug"
5689
+ ],
5096
5690
  "query": [],
5097
- "body": null
5691
+ "body": null,
5692
+ "aliases": [
5693
+ "public"
5694
+ ]
5098
5695
  },
5099
5696
  {
5100
- "name": "deliveries-2",
5697
+ "name": "get-public-2",
5101
5698
  "method": "GET",
5102
- "path": "/api/v1/storefront/deliveries/{id}",
5103
- "summary": "Get a delivery",
5699
+ "path": "/api/v1/storefront/public/{merchantSlug}/{productSlug}",
5700
+ "summary": "Single product detail",
5104
5701
  "pathParams": [
5105
- "id"
5702
+ "merchantSlug",
5703
+ "productSlug"
5106
5704
  ],
5107
5705
  "query": [],
5108
- "body": null
5706
+ "body": null,
5707
+ "aliases": [
5708
+ "public-2"
5709
+ ]
5109
5710
  },
5110
5711
  {
5111
- "name": "deliveries-extend",
5112
- "method": "POST",
5113
- "path": "/api/v1/storefront/deliveries/{id}/extend",
5114
- "summary": "Extend the download window 30 days — from now, or from the current expiry if it's still in the future.",
5712
+ "name": "get-public-blog",
5713
+ "method": "GET",
5714
+ "path": "/api/v1/storefront/public/{merchantSlug}/blog/{slug}",
5715
+ "summary": "Single post",
5115
5716
  "pathParams": [
5116
- "id"
5717
+ "merchantSlug",
5718
+ "slug"
5117
5719
  ],
5118
5720
  "query": [],
5119
- "body": null
5721
+ "body": null,
5722
+ "aliases": [
5723
+ "public-blog-2"
5724
+ ]
5120
5725
  },
5121
5726
  {
5122
- "name": "deliveries-reset-downloads",
5123
- "method": "POST",
5124
- "path": "/api/v1/storefront/deliveries/{id}/reset-downloads",
5125
- "summary": "Reset the download counter so the buyer can download again.",
5727
+ "name": "get-public-order",
5728
+ "method": "GET",
5729
+ "path": "/api/v1/storefront/public/{merchantSlug}/order/{number}",
5730
+ "summary": "Public tracking endpoint — buyer enters email (or is logged in) to view their order.",
5126
5731
  "pathParams": [
5127
- "id"
5732
+ "merchantSlug",
5733
+ "number"
5128
5734
  ],
5129
- "query": [],
5130
- "body": null
5735
+ "query": [
5736
+ {
5737
+ "name": "email",
5738
+ "kind": "string",
5739
+ "required": false
5740
+ }
5741
+ ],
5742
+ "body": null,
5743
+ "aliases": [
5744
+ "public-order"
5745
+ ]
5131
5746
  },
5132
5747
  {
5133
- "name": "deliveries-revoke",
5134
- "method": "POST",
5135
- "path": "/api/v1/storefront/deliveries/{id}/revoke",
5136
- "summary": "Revoke: expire the delivery now — the /dl route 410s past expiry, so the buyer's links stop working immediately.",
5748
+ "name": "get-public-order-2",
5749
+ "method": "GET",
5750
+ "path": "/api/v1/storefront/public/order/{deliveryId}",
5751
+ "summary": "View order details (requires signed URL)",
5137
5752
  "pathParams": [
5138
- "id"
5753
+ "deliveryId"
5139
5754
  ],
5140
- "query": [],
5141
- "body": null
5755
+ "query": [
5756
+ {
5757
+ "name": "email",
5758
+ "kind": "string",
5759
+ "required": true
5760
+ },
5761
+ {
5762
+ "name": "sig",
5763
+ "kind": "string",
5764
+ "required": true
5765
+ }
5766
+ ],
5767
+ "body": null,
5768
+ "aliases": [
5769
+ "public-order-2"
5770
+ ]
5142
5771
  },
5143
5772
  {
5144
5773
  "name": "licenses",
@@ -5149,17 +5778,6 @@ export const API_ROUTES = [
5149
5778
  "query": [],
5150
5779
  "body": null
5151
5780
  },
5152
- {
5153
- "name": "licenses-2",
5154
- "method": "GET",
5155
- "path": "/api/v1/storefront/licenses/{key}",
5156
- "summary": "Get a license",
5157
- "pathParams": [
5158
- "key"
5159
- ],
5160
- "query": [],
5161
- "body": null
5162
- },
5163
5781
  {
5164
5782
  "name": "licenses-activate",
5165
5783
  "method": "POST",
@@ -5204,7 +5822,7 @@ export const API_ROUTES = [
5204
5822
  {
5205
5823
  "name": "key",
5206
5824
  "kind": "string",
5207
- "required": false
5825
+ "required": true
5208
5826
  },
5209
5827
  {
5210
5828
  "name": "productId",
@@ -5220,18 +5838,34 @@ export const API_ROUTES = [
5220
5838
  "path": "/api/v1/storefront/products",
5221
5839
  "summary": "GET /storefront/products",
5222
5840
  "pathParams": [],
5223
- "query": [],
5224
- "body": null
5225
- },
5226
- {
5227
- "name": "products-2",
5228
- "method": "GET",
5229
- "path": "/api/v1/storefront/products/{id}",
5230
- "summary": "GET /storefront/products/:id",
5231
- "pathParams": [
5232
- "id"
5841
+ "query": [
5842
+ {
5843
+ "name": "limit",
5844
+ "kind": "number",
5845
+ "required": false
5846
+ },
5847
+ {
5848
+ "name": "cursor",
5849
+ "kind": "string",
5850
+ "required": false
5851
+ },
5852
+ {
5853
+ "name": "published",
5854
+ "kind": "string",
5855
+ "required": false
5856
+ },
5857
+ {
5858
+ "name": "type",
5859
+ "kind": "string",
5860
+ "required": false,
5861
+ "choices": [
5862
+ "digital",
5863
+ "subscription",
5864
+ "physical",
5865
+ "license"
5866
+ ]
5867
+ }
5233
5868
  ],
5234
- "query": [],
5235
5869
  "body": null
5236
5870
  },
5237
5871
  {
@@ -5278,29 +5912,6 @@ export const API_ROUTES = [
5278
5912
  "query": [],
5279
5913
  "body": null
5280
5914
  },
5281
- {
5282
- "name": "public",
5283
- "method": "GET",
5284
- "path": "/api/v1/storefront/public/{merchantSlug}",
5285
- "summary": "List all published products for a merchant",
5286
- "pathParams": [
5287
- "merchantSlug"
5288
- ],
5289
- "query": [],
5290
- "body": null
5291
- },
5292
- {
5293
- "name": "public-2",
5294
- "method": "GET",
5295
- "path": "/api/v1/storefront/public/{merchantSlug}/{productSlug}",
5296
- "summary": "Single product detail",
5297
- "pathParams": [
5298
- "merchantSlug",
5299
- "productSlug"
5300
- ],
5301
- "query": [],
5302
- "body": null
5303
- },
5304
5915
  {
5305
5916
  "name": "public-blog",
5306
5917
  "method": "GET",
@@ -5312,18 +5923,6 @@ export const API_ROUTES = [
5312
5923
  "query": [],
5313
5924
  "body": null
5314
5925
  },
5315
- {
5316
- "name": "public-blog-2",
5317
- "method": "GET",
5318
- "path": "/api/v1/storefront/public/{merchantSlug}/blog/{slug}",
5319
- "summary": "Single post",
5320
- "pathParams": [
5321
- "merchantSlug",
5322
- "slug"
5323
- ],
5324
- "query": [],
5325
- "body": null
5326
- },
5327
5926
  {
5328
5927
  "name": "public-blog-rss-xml",
5329
5928
  "method": "GET",
@@ -5480,7 +6079,7 @@ export const API_ROUTES = [
5480
6079
  {
5481
6080
  "name": "token",
5482
6081
  "kind": "string",
5483
- "required": false
6082
+ "required": true
5484
6083
  }
5485
6084
  ],
5486
6085
  "body": null
@@ -5567,46 +6166,6 @@ export const API_ROUTES = [
5567
6166
  }
5568
6167
  ]
5569
6168
  },
5570
- {
5571
- "name": "public-order",
5572
- "method": "GET",
5573
- "path": "/api/v1/storefront/public/{merchantSlug}/order/{number}",
5574
- "summary": "Public tracking endpoint — buyer enters email (or is logged in) to view their order.",
5575
- "pathParams": [
5576
- "merchantSlug",
5577
- "number"
5578
- ],
5579
- "query": [
5580
- {
5581
- "name": "email",
5582
- "kind": "string",
5583
- "required": false
5584
- }
5585
- ],
5586
- "body": null
5587
- },
5588
- {
5589
- "name": "public-order-2",
5590
- "method": "GET",
5591
- "path": "/api/v1/storefront/public/order/{deliveryId}",
5592
- "summary": "View order details (requires signed URL)",
5593
- "pathParams": [
5594
- "deliveryId"
5595
- ],
5596
- "query": [
5597
- {
5598
- "name": "email",
5599
- "kind": "string",
5600
- "required": false
5601
- },
5602
- {
5603
- "name": "sig",
5604
- "kind": "string",
5605
- "required": false
5606
- }
5607
- ],
5608
- "body": null
5609
- },
5610
6169
  {
5611
6170
  "name": "public-order-claim-payment",
5612
6171
  "method": "POST",
@@ -5788,7 +6347,13 @@ export const API_ROUTES = [
5788
6347
  "summary": "Request tracking links by email",
5789
6348
  "pathParams": [],
5790
6349
  "query": [],
5791
- "body": []
6350
+ "body": [
6351
+ {
6352
+ "name": "email",
6353
+ "kind": "string",
6354
+ "required": true
6355
+ }
6356
+ ]
5792
6357
  },
5793
6358
  {
5794
6359
  "name": "public-validate-discount",
@@ -5797,7 +6362,43 @@ export const API_ROUTES = [
5797
6362
  "summary": "Public dry-run that the storefront checkout uses to compute a discount before committing.",
5798
6363
  "pathParams": [],
5799
6364
  "query": [],
5800
- "body": []
6365
+ "body": [
6366
+ {
6367
+ "name": "code",
6368
+ "kind": "string",
6369
+ "required": false
6370
+ },
6371
+ {
6372
+ "name": "currency",
6373
+ "kind": "string",
6374
+ "required": false
6375
+ },
6376
+ {
6377
+ "name": "customerId",
6378
+ "kind": "string",
6379
+ "required": false
6380
+ },
6381
+ {
6382
+ "name": "items",
6383
+ "kind": "string",
6384
+ "required": false
6385
+ },
6386
+ {
6387
+ "name": "merchantSlug",
6388
+ "kind": "string",
6389
+ "required": false
6390
+ },
6391
+ {
6392
+ "name": "shipping",
6393
+ "kind": "string",
6394
+ "required": false
6395
+ },
6396
+ {
6397
+ "name": "subtotal",
6398
+ "kind": "string",
6399
+ "required": false
6400
+ }
6401
+ ]
5801
6402
  },
5802
6403
  {
5803
6404
  "name": "update-products",
@@ -6272,47 +6873,49 @@ export function buildApiCommand() {
6272
6873
  for (const { area, routes } of API_ROUTES) {
6273
6874
  const group = new Command(area).description(`${area} routes`);
6274
6875
  for (const route of routes) {
6275
- const cmd = new Command(route.name).description(`${route.summary} (${route.method} ${route.path})`);
6276
- for (const p of route.pathParams)
6277
- cmd.argument(`<${p}>`);
6278
- const fields = [...route.query, ...(route.body ?? [])];
6279
- for (const f of fields) {
6280
- const hint = f.choices ? ` (${f.choices.join('|')})` : f.kind === 'json' || f.kind === 'array' ? ` (${f.kind})` : '';
6281
- cmd.option(f.kind === 'boolean' ? `--${flag(f.name)} [value]` : `--${flag(f.name)} <value>`, `${f.required ? 'required' : 'optional'}${hint}`);
6282
- }
6283
- if (route.body)
6284
- cmd.option('--body-json <json>', 'the whole body as JSON (fields given as flags override it)');
6285
- cmd.action(async (...parts) => {
6286
- const command = parts[parts.length - 1];
6287
- const opts = command.opts();
6288
- try {
6289
- let path = route.path;
6290
- route.pathParams.forEach((p, i) => { path = path.replace(`{${p}}`, encodeURIComponent(String(parts[i]))); });
6291
- const query = {};
6292
- for (const f of route.query) {
6293
- const raw = opts[camel(f.name)];
6294
- if (raw !== undefined)
6295
- query[f.name] = value(f, raw === true ? '' : String(raw));
6296
- }
6297
- let body;
6298
- if (route.body) {
6299
- body = opts.bodyJson ? JSON.parse(String(opts.bodyJson)) : {};
6300
- for (const f of route.body) {
6876
+ for (const name of [route.name, ...(route.aliases ?? [])]) {
6877
+ const cmd = new Command(name).description(`${route.summary} (${route.method} ${route.path})`);
6878
+ for (const p of route.pathParams)
6879
+ cmd.argument(`<${p}>`);
6880
+ const fields = [...route.query, ...(route.body ?? [])];
6881
+ for (const f of fields) {
6882
+ const hint = f.choices ? ` (${f.choices.join('|')})` : f.kind === 'json' || f.kind === 'array' ? ` (${f.kind})` : '';
6883
+ cmd.option(f.kind === 'boolean' ? `--${flag(f.name)} [value]` : `--${flag(f.name)} <value>`, `${f.required ? 'required' : 'optional'}${hint}`);
6884
+ }
6885
+ if (route.body)
6886
+ cmd.option('--body-json <json>', 'the whole body as JSON (fields given as flags override it)');
6887
+ cmd.action(async (...parts) => {
6888
+ const command = parts[parts.length - 1];
6889
+ const opts = command.opts();
6890
+ try {
6891
+ let path = route.path;
6892
+ route.pathParams.forEach((p, i) => { path = path.replace(`{${p}}`, encodeURIComponent(String(parts[i]))); });
6893
+ const query = {};
6894
+ for (const f of route.query) {
6301
6895
  const raw = opts[camel(f.name)];
6302
6896
  if (raw !== undefined)
6303
- body[f.name] = value(f, raw === true ? '' : String(raw));
6897
+ query[f.name] = value(f, raw === true ? '' : String(raw));
6898
+ }
6899
+ let body;
6900
+ if (route.body) {
6901
+ body = opts.bodyJson ? JSON.parse(String(opts.bodyJson)) : {};
6902
+ for (const f of route.body) {
6903
+ const raw = opts[camel(f.name)];
6904
+ if (raw !== undefined)
6905
+ body[f.name] = value(f, raw === true ? '' : String(raw));
6906
+ }
6907
+ const missing = route.body.filter((f) => f.required && body[f.name] === undefined).map((f) => `--${flag(f.name)}`);
6908
+ if (missing.length)
6909
+ throw new Error(`missing ${missing.join(', ')}`);
6304
6910
  }
6305
- const missing = route.body.filter((f) => f.required && body[f.name] === undefined).map((f) => `--${flag(f.name)}`);
6306
- if (missing.length)
6307
- throw new Error(`missing ${missing.join(', ')}`);
6911
+ await callRoute(command, route.method, path, query, body);
6308
6912
  }
6309
- await callRoute(command, route.method, path, query, body);
6310
- }
6311
- catch (err) {
6312
- await failRoute(command, err);
6313
- }
6314
- });
6315
- group.addCommand(cmd);
6913
+ catch (err) {
6914
+ await failRoute(command, err);
6915
+ }
6916
+ });
6917
+ group.addCommand(cmd, { hidden: name !== route.name });
6918
+ }
6316
6919
  }
6317
6920
  api.addCommand(group);
6318
6921
  }