@forjio/storlaunch-cli 0.15.3 → 0.16.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.
|
@@ -105,17 +105,6 @@ export const API_ROUTES = [
|
|
|
105
105
|
"query": [],
|
|
106
106
|
"body": null
|
|
107
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"
|
|
115
|
-
],
|
|
116
|
-
"query": [],
|
|
117
|
-
"body": null
|
|
118
|
-
},
|
|
119
108
|
{
|
|
120
109
|
"name": "blog-posts-publish",
|
|
121
110
|
"method": "POST",
|
|
@@ -293,17 +282,6 @@ export const API_ROUTES = [
|
|
|
293
282
|
"query": [],
|
|
294
283
|
"body": null
|
|
295
284
|
},
|
|
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
285
|
{
|
|
308
286
|
"name": "domains-provision-callback",
|
|
309
287
|
"method": "POST",
|
|
@@ -364,6 +342,34 @@ export const API_ROUTES = [
|
|
|
364
342
|
],
|
|
365
343
|
"body": null
|
|
366
344
|
},
|
|
345
|
+
{
|
|
346
|
+
"name": "get-blog-posts",
|
|
347
|
+
"method": "GET",
|
|
348
|
+
"path": "/api/v1/account/blog/posts/{id}",
|
|
349
|
+
"summary": "Get a post",
|
|
350
|
+
"pathParams": [
|
|
351
|
+
"id"
|
|
352
|
+
],
|
|
353
|
+
"query": [],
|
|
354
|
+
"body": null,
|
|
355
|
+
"aliases": [
|
|
356
|
+
"blog-posts-2"
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"name": "get-domains",
|
|
361
|
+
"method": "GET",
|
|
362
|
+
"path": "/api/v1/account/domains/{id}",
|
|
363
|
+
"summary": "Get domain",
|
|
364
|
+
"pathParams": [
|
|
365
|
+
"id"
|
|
366
|
+
],
|
|
367
|
+
"query": [],
|
|
368
|
+
"body": null,
|
|
369
|
+
"aliases": [
|
|
370
|
+
"domains-2"
|
|
371
|
+
]
|
|
372
|
+
},
|
|
367
373
|
{
|
|
368
374
|
"name": "list",
|
|
369
375
|
"method": "GET",
|
|
@@ -1124,24 +1130,7 @@ export const API_ROUTES = [
|
|
|
1124
1130
|
{
|
|
1125
1131
|
"name": "accountSlug",
|
|
1126
1132
|
"kind": "string",
|
|
1127
|
-
"required":
|
|
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
|
|
1133
|
+
"required": true
|
|
1145
1134
|
}
|
|
1146
1135
|
],
|
|
1147
1136
|
"body": null
|
|
@@ -1430,7 +1419,7 @@ export const API_ROUTES = [
|
|
|
1430
1419
|
{
|
|
1431
1420
|
"name": "accountSlug",
|
|
1432
1421
|
"kind": "string",
|
|
1433
|
-
"required":
|
|
1422
|
+
"required": true
|
|
1434
1423
|
}
|
|
1435
1424
|
],
|
|
1436
1425
|
"body": []
|
|
@@ -1495,6 +1484,68 @@ export const API_ROUTES = [
|
|
|
1495
1484
|
}
|
|
1496
1485
|
]
|
|
1497
1486
|
},
|
|
1487
|
+
{
|
|
1488
|
+
"name": "get-addresses",
|
|
1489
|
+
"method": "GET",
|
|
1490
|
+
"path": "/api/v1/checkout/addresses/{id}",
|
|
1491
|
+
"summary": "Get an address",
|
|
1492
|
+
"pathParams": [
|
|
1493
|
+
"id"
|
|
1494
|
+
],
|
|
1495
|
+
"query": [
|
|
1496
|
+
{
|
|
1497
|
+
"name": "accountSlug",
|
|
1498
|
+
"kind": "string",
|
|
1499
|
+
"required": true
|
|
1500
|
+
}
|
|
1501
|
+
],
|
|
1502
|
+
"body": null,
|
|
1503
|
+
"aliases": [
|
|
1504
|
+
"addresses-2"
|
|
1505
|
+
]
|
|
1506
|
+
},
|
|
1507
|
+
{
|
|
1508
|
+
"name": "get-invoices",
|
|
1509
|
+
"method": "GET",
|
|
1510
|
+
"path": "/api/v1/checkout/invoices/{id}",
|
|
1511
|
+
"summary": "Get an invoice",
|
|
1512
|
+
"pathParams": [
|
|
1513
|
+
"id"
|
|
1514
|
+
],
|
|
1515
|
+
"query": [],
|
|
1516
|
+
"body": null,
|
|
1517
|
+
"aliases": [
|
|
1518
|
+
"invoices-2"
|
|
1519
|
+
]
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"name": "get-orders",
|
|
1523
|
+
"method": "GET",
|
|
1524
|
+
"path": "/api/v1/checkout/orders/{id}",
|
|
1525
|
+
"summary": "Get an order",
|
|
1526
|
+
"pathParams": [
|
|
1527
|
+
"id"
|
|
1528
|
+
],
|
|
1529
|
+
"query": [],
|
|
1530
|
+
"body": null,
|
|
1531
|
+
"aliases": [
|
|
1532
|
+
"orders-2"
|
|
1533
|
+
]
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
"name": "get-subscriptions",
|
|
1537
|
+
"method": "GET",
|
|
1538
|
+
"path": "/api/v1/checkout/subscriptions/{id}",
|
|
1539
|
+
"summary": "Get a subscription",
|
|
1540
|
+
"pathParams": [
|
|
1541
|
+
"id"
|
|
1542
|
+
],
|
|
1543
|
+
"query": [],
|
|
1544
|
+
"body": null,
|
|
1545
|
+
"aliases": [
|
|
1546
|
+
"subscriptions-2"
|
|
1547
|
+
]
|
|
1548
|
+
},
|
|
1498
1549
|
{
|
|
1499
1550
|
"name": "gifts",
|
|
1500
1551
|
"method": "GET",
|
|
@@ -1513,17 +1564,6 @@ export const API_ROUTES = [
|
|
|
1513
1564
|
"query": [],
|
|
1514
1565
|
"body": null
|
|
1515
1566
|
},
|
|
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
1567
|
{
|
|
1528
1568
|
"name": "invoices-pdf",
|
|
1529
1569
|
"method": "GET",
|
|
@@ -1565,17 +1605,6 @@ export const API_ROUTES = [
|
|
|
1565
1605
|
"query": [],
|
|
1566
1606
|
"body": null
|
|
1567
1607
|
},
|
|
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
1608
|
{
|
|
1580
1609
|
"name": "profile",
|
|
1581
1610
|
"method": "GET",
|
|
@@ -1666,17 +1695,6 @@ export const API_ROUTES = [
|
|
|
1666
1695
|
"query": [],
|
|
1667
1696
|
"body": null
|
|
1668
1697
|
},
|
|
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
1698
|
{
|
|
1681
1699
|
"name": "subscriptions-cancel",
|
|
1682
1700
|
"method": "POST",
|
|
@@ -2465,7 +2483,7 @@ export const API_ROUTES = [
|
|
|
2465
2483
|
{
|
|
2466
2484
|
"name": "variantId",
|
|
2467
2485
|
"kind": "string",
|
|
2468
|
-
"required":
|
|
2486
|
+
"required": true
|
|
2469
2487
|
}
|
|
2470
2488
|
],
|
|
2471
2489
|
"body": null
|
|
@@ -2564,7 +2582,7 @@ export const API_ROUTES = [
|
|
|
2564
2582
|
{
|
|
2565
2583
|
"name": "productId",
|
|
2566
2584
|
"kind": "string",
|
|
2567
|
-
"required":
|
|
2585
|
+
"required": true
|
|
2568
2586
|
}
|
|
2569
2587
|
],
|
|
2570
2588
|
"body": null
|
|
@@ -2682,17 +2700,6 @@ export const API_ROUTES = [
|
|
|
2682
2700
|
],
|
|
2683
2701
|
"body": null
|
|
2684
2702
|
},
|
|
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
2703
|
{
|
|
2697
2704
|
"name": "entries-csv",
|
|
2698
2705
|
"method": "GET",
|
|
@@ -2701,6 +2708,20 @@ export const API_ROUTES = [
|
|
|
2701
2708
|
"pathParams": [],
|
|
2702
2709
|
"query": [],
|
|
2703
2710
|
"body": null
|
|
2711
|
+
},
|
|
2712
|
+
{
|
|
2713
|
+
"name": "get-entries",
|
|
2714
|
+
"method": "GET",
|
|
2715
|
+
"path": "/api/v1/ledger/entries/{id}",
|
|
2716
|
+
"summary": "Get an entry",
|
|
2717
|
+
"pathParams": [
|
|
2718
|
+
"id"
|
|
2719
|
+
],
|
|
2720
|
+
"query": [],
|
|
2721
|
+
"body": null,
|
|
2722
|
+
"aliases": [
|
|
2723
|
+
"entries-2"
|
|
2724
|
+
]
|
|
2704
2725
|
}
|
|
2705
2726
|
]
|
|
2706
2727
|
},
|
|
@@ -2960,17 +2981,6 @@ export const API_ROUTES = [
|
|
|
2960
2981
|
"query": [],
|
|
2961
2982
|
"body": null
|
|
2962
2983
|
},
|
|
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"
|
|
2970
|
-
],
|
|
2971
|
-
"query": [],
|
|
2972
|
-
"body": null
|
|
2973
|
-
},
|
|
2974
2984
|
{
|
|
2975
2985
|
"name": "checkout-sessions-confirm",
|
|
2976
2986
|
"method": "POST",
|
|
@@ -3319,17 +3329,6 @@ export const API_ROUTES = [
|
|
|
3319
3329
|
"query": [],
|
|
3320
3330
|
"body": null
|
|
3321
3331
|
},
|
|
3322
|
-
{
|
|
3323
|
-
"name": "customers-2",
|
|
3324
|
-
"method": "GET",
|
|
3325
|
-
"path": "/api/v1/payment/customers/{id}",
|
|
3326
|
-
"summary": "Get a customer",
|
|
3327
|
-
"pathParams": [
|
|
3328
|
-
"id"
|
|
3329
|
-
],
|
|
3330
|
-
"query": [],
|
|
3331
|
-
"body": null
|
|
3332
|
-
},
|
|
3333
3332
|
{
|
|
3334
3333
|
"name": "delete-checkout-sessions",
|
|
3335
3334
|
"method": "DELETE",
|
|
@@ -3403,37 +3402,35 @@ export const API_ROUTES = [
|
|
|
3403
3402
|
"body": null
|
|
3404
3403
|
},
|
|
3405
3404
|
{
|
|
3406
|
-
"name": "
|
|
3405
|
+
"name": "get-checkout-sessions",
|
|
3407
3406
|
"method": "GET",
|
|
3408
|
-
"path": "/api/v1/payment/
|
|
3409
|
-
"summary": "
|
|
3410
|
-
"pathParams": [
|
|
3411
|
-
|
|
3412
|
-
{
|
|
3413
|
-
"name": "cursor",
|
|
3414
|
-
"kind": "string",
|
|
3415
|
-
"required": false
|
|
3416
|
-
},
|
|
3417
|
-
{
|
|
3418
|
-
"name": "customerId",
|
|
3419
|
-
"kind": "string",
|
|
3420
|
-
"required": false
|
|
3421
|
-
},
|
|
3422
|
-
{
|
|
3423
|
-
"name": "limit",
|
|
3424
|
-
"kind": "string",
|
|
3425
|
-
"required": false
|
|
3426
|
-
},
|
|
3427
|
-
{
|
|
3428
|
-
"name": "status",
|
|
3429
|
-
"kind": "string",
|
|
3430
|
-
"required": false
|
|
3431
|
-
}
|
|
3407
|
+
"path": "/api/v1/payment/checkout-sessions/{id}",
|
|
3408
|
+
"summary": "Get a checkout session",
|
|
3409
|
+
"pathParams": [
|
|
3410
|
+
"id"
|
|
3432
3411
|
],
|
|
3433
|
-
"
|
|
3412
|
+
"query": [],
|
|
3413
|
+
"body": null,
|
|
3414
|
+
"aliases": [
|
|
3415
|
+
"checkout-sessions-2"
|
|
3416
|
+
]
|
|
3417
|
+
},
|
|
3418
|
+
{
|
|
3419
|
+
"name": "get-customers",
|
|
3420
|
+
"method": "GET",
|
|
3421
|
+
"path": "/api/v1/payment/customers/{id}",
|
|
3422
|
+
"summary": "Get a customer",
|
|
3423
|
+
"pathParams": [
|
|
3424
|
+
"id"
|
|
3425
|
+
],
|
|
3426
|
+
"query": [],
|
|
3427
|
+
"body": null,
|
|
3428
|
+
"aliases": [
|
|
3429
|
+
"customers-2"
|
|
3430
|
+
]
|
|
3434
3431
|
},
|
|
3435
3432
|
{
|
|
3436
|
-
"name": "gift-cards
|
|
3433
|
+
"name": "get-gift-cards",
|
|
3437
3434
|
"method": "GET",
|
|
3438
3435
|
"path": "/api/v1/payment/gift-cards/{code}",
|
|
3439
3436
|
"summary": "Balance lookup by redemption code (used by checkout too).",
|
|
@@ -3441,45 +3438,162 @@ export const API_ROUTES = [
|
|
|
3441
3438
|
"code"
|
|
3442
3439
|
],
|
|
3443
3440
|
"query": [],
|
|
3444
|
-
"body": null
|
|
3441
|
+
"body": null,
|
|
3442
|
+
"aliases": [
|
|
3443
|
+
"gift-cards-2"
|
|
3444
|
+
]
|
|
3445
3445
|
},
|
|
3446
3446
|
{
|
|
3447
|
-
"name": "
|
|
3448
|
-
"method": "
|
|
3449
|
-
"path": "/api/v1/payment/
|
|
3450
|
-
"summary": "
|
|
3447
|
+
"name": "get-invoices",
|
|
3448
|
+
"method": "GET",
|
|
3449
|
+
"path": "/api/v1/payment/invoices/{id}",
|
|
3450
|
+
"summary": "Get an invoice",
|
|
3451
3451
|
"pathParams": [
|
|
3452
3452
|
"id"
|
|
3453
3453
|
],
|
|
3454
3454
|
"query": [],
|
|
3455
|
-
"body":
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
"kind": "number",
|
|
3459
|
-
"required": true
|
|
3460
|
-
},
|
|
3461
|
-
{
|
|
3462
|
-
"name": "externalRef",
|
|
3463
|
-
"kind": "string",
|
|
3464
|
-
"required": false
|
|
3465
|
-
},
|
|
3466
|
-
{
|
|
3467
|
-
"name": "checkoutSessionId",
|
|
3468
|
-
"kind": "string",
|
|
3469
|
-
"required": false
|
|
3470
|
-
},
|
|
3471
|
-
{
|
|
3472
|
-
"name": "note",
|
|
3473
|
-
"kind": "string",
|
|
3474
|
-
"required": false
|
|
3475
|
-
}
|
|
3455
|
+
"body": null,
|
|
3456
|
+
"aliases": [
|
|
3457
|
+
"invoices-2"
|
|
3476
3458
|
]
|
|
3477
3459
|
},
|
|
3478
3460
|
{
|
|
3479
|
-
"name": "
|
|
3480
|
-
"method": "
|
|
3481
|
-
"path": "/api/v1/payment/
|
|
3482
|
-
"summary": "
|
|
3461
|
+
"name": "get-plans",
|
|
3462
|
+
"method": "GET",
|
|
3463
|
+
"path": "/api/v1/payment/plans/{id}",
|
|
3464
|
+
"summary": "Get a plan",
|
|
3465
|
+
"pathParams": [
|
|
3466
|
+
"id"
|
|
3467
|
+
],
|
|
3468
|
+
"query": [],
|
|
3469
|
+
"body": null,
|
|
3470
|
+
"aliases": [
|
|
3471
|
+
"plans-2"
|
|
3472
|
+
]
|
|
3473
|
+
},
|
|
3474
|
+
{
|
|
3475
|
+
"name": "get-receipts",
|
|
3476
|
+
"method": "GET",
|
|
3477
|
+
"path": "/api/v1/payment/receipts/{id}",
|
|
3478
|
+
"summary": "Get a receipt",
|
|
3479
|
+
"pathParams": [
|
|
3480
|
+
"id"
|
|
3481
|
+
],
|
|
3482
|
+
"query": [],
|
|
3483
|
+
"body": null,
|
|
3484
|
+
"aliases": [
|
|
3485
|
+
"receipts-2"
|
|
3486
|
+
]
|
|
3487
|
+
},
|
|
3488
|
+
{
|
|
3489
|
+
"name": "get-subscriptions",
|
|
3490
|
+
"method": "GET",
|
|
3491
|
+
"path": "/api/v1/payment/subscriptions/{id}",
|
|
3492
|
+
"summary": "Get a subscription",
|
|
3493
|
+
"pathParams": [
|
|
3494
|
+
"id"
|
|
3495
|
+
],
|
|
3496
|
+
"query": [],
|
|
3497
|
+
"body": null,
|
|
3498
|
+
"aliases": [
|
|
3499
|
+
"subscriptions-2"
|
|
3500
|
+
]
|
|
3501
|
+
},
|
|
3502
|
+
{
|
|
3503
|
+
"name": "get-webhook-endpoints",
|
|
3504
|
+
"method": "GET",
|
|
3505
|
+
"path": "/api/v1/payment/webhook-endpoints/{id}",
|
|
3506
|
+
"summary": "Get a webhook endpoint",
|
|
3507
|
+
"pathParams": [
|
|
3508
|
+
"id"
|
|
3509
|
+
],
|
|
3510
|
+
"query": [],
|
|
3511
|
+
"body": null,
|
|
3512
|
+
"aliases": [
|
|
3513
|
+
"webhook-endpoints-2"
|
|
3514
|
+
]
|
|
3515
|
+
},
|
|
3516
|
+
{
|
|
3517
|
+
"name": "get-webhook-events",
|
|
3518
|
+
"method": "GET",
|
|
3519
|
+
"path": "/api/v1/payment/webhook-events/{id}",
|
|
3520
|
+
"summary": "Get a webhook event",
|
|
3521
|
+
"pathParams": [
|
|
3522
|
+
"id"
|
|
3523
|
+
],
|
|
3524
|
+
"query": [],
|
|
3525
|
+
"body": null,
|
|
3526
|
+
"aliases": [
|
|
3527
|
+
"webhook-events-2"
|
|
3528
|
+
]
|
|
3529
|
+
},
|
|
3530
|
+
{
|
|
3531
|
+
"name": "gift-cards",
|
|
3532
|
+
"method": "GET",
|
|
3533
|
+
"path": "/api/v1/payment/gift-cards",
|
|
3534
|
+
"summary": "List gift cards (filter by customer / status).",
|
|
3535
|
+
"pathParams": [],
|
|
3536
|
+
"query": [
|
|
3537
|
+
{
|
|
3538
|
+
"name": "cursor",
|
|
3539
|
+
"kind": "string",
|
|
3540
|
+
"required": false
|
|
3541
|
+
},
|
|
3542
|
+
{
|
|
3543
|
+
"name": "customerId",
|
|
3544
|
+
"kind": "string",
|
|
3545
|
+
"required": false
|
|
3546
|
+
},
|
|
3547
|
+
{
|
|
3548
|
+
"name": "limit",
|
|
3549
|
+
"kind": "string",
|
|
3550
|
+
"required": false
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
"name": "status",
|
|
3554
|
+
"kind": "string",
|
|
3555
|
+
"required": false
|
|
3556
|
+
}
|
|
3557
|
+
],
|
|
3558
|
+
"body": null
|
|
3559
|
+
},
|
|
3560
|
+
{
|
|
3561
|
+
"name": "gift-cards-redeem",
|
|
3562
|
+
"method": "POST",
|
|
3563
|
+
"path": "/api/v1/payment/gift-cards/{id}/redeem",
|
|
3564
|
+
"summary": "Spend value off a card (externalRef = order/session id).",
|
|
3565
|
+
"pathParams": [
|
|
3566
|
+
"id"
|
|
3567
|
+
],
|
|
3568
|
+
"query": [],
|
|
3569
|
+
"body": [
|
|
3570
|
+
{
|
|
3571
|
+
"name": "amount",
|
|
3572
|
+
"kind": "number",
|
|
3573
|
+
"required": true
|
|
3574
|
+
},
|
|
3575
|
+
{
|
|
3576
|
+
"name": "externalRef",
|
|
3577
|
+
"kind": "string",
|
|
3578
|
+
"required": false
|
|
3579
|
+
},
|
|
3580
|
+
{
|
|
3581
|
+
"name": "checkoutSessionId",
|
|
3582
|
+
"kind": "string",
|
|
3583
|
+
"required": false
|
|
3584
|
+
},
|
|
3585
|
+
{
|
|
3586
|
+
"name": "note",
|
|
3587
|
+
"kind": "string",
|
|
3588
|
+
"required": false
|
|
3589
|
+
}
|
|
3590
|
+
]
|
|
3591
|
+
},
|
|
3592
|
+
{
|
|
3593
|
+
"name": "gift-cards-refund-to-store-credit",
|
|
3594
|
+
"method": "POST",
|
|
3595
|
+
"path": "/api/v1/payment/gift-cards/refund-to-store-credit",
|
|
3596
|
+
"summary": "Refund an order to store credit instead of (or alongside) a gateway refund.",
|
|
3483
3597
|
"pathParams": [],
|
|
3484
3598
|
"query": [],
|
|
3485
3599
|
"body": [
|
|
@@ -3572,17 +3686,6 @@ export const API_ROUTES = [
|
|
|
3572
3686
|
"query": [],
|
|
3573
3687
|
"body": null
|
|
3574
3688
|
},
|
|
3575
|
-
{
|
|
3576
|
-
"name": "invoices-2",
|
|
3577
|
-
"method": "GET",
|
|
3578
|
-
"path": "/api/v1/payment/invoices/{id}",
|
|
3579
|
-
"summary": "Get an invoice",
|
|
3580
|
-
"pathParams": [
|
|
3581
|
-
"id"
|
|
3582
|
-
],
|
|
3583
|
-
"query": [],
|
|
3584
|
-
"body": null
|
|
3585
|
-
},
|
|
3586
3689
|
{
|
|
3587
3690
|
"name": "invoices-export-csv",
|
|
3588
3691
|
"method": "GET",
|
|
@@ -3623,17 +3726,6 @@ export const API_ROUTES = [
|
|
|
3623
3726
|
"query": [],
|
|
3624
3727
|
"body": null
|
|
3625
3728
|
},
|
|
3626
|
-
{
|
|
3627
|
-
"name": "plans-2",
|
|
3628
|
-
"method": "GET",
|
|
3629
|
-
"path": "/api/v1/payment/plans/{id}",
|
|
3630
|
-
"summary": "Get a plan",
|
|
3631
|
-
"pathParams": [
|
|
3632
|
-
"id"
|
|
3633
|
-
],
|
|
3634
|
-
"query": [],
|
|
3635
|
-
"body": null
|
|
3636
|
-
},
|
|
3637
3729
|
{
|
|
3638
3730
|
"name": "plugipay-settings-templates-preview",
|
|
3639
3731
|
"method": "POST",
|
|
@@ -3720,17 +3812,6 @@ export const API_ROUTES = [
|
|
|
3720
3812
|
],
|
|
3721
3813
|
"body": null
|
|
3722
3814
|
},
|
|
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
3815
|
{
|
|
3735
3816
|
"name": "receipts-email",
|
|
3736
3817
|
"method": "POST",
|
|
@@ -3821,17 +3902,6 @@ export const API_ROUTES = [
|
|
|
3821
3902
|
"query": [],
|
|
3822
3903
|
"body": null
|
|
3823
3904
|
},
|
|
3824
|
-
{
|
|
3825
|
-
"name": "subscriptions-2",
|
|
3826
|
-
"method": "GET",
|
|
3827
|
-
"path": "/api/v1/payment/subscriptions/{id}",
|
|
3828
|
-
"summary": "Get a subscription",
|
|
3829
|
-
"pathParams": [
|
|
3830
|
-
"id"
|
|
3831
|
-
],
|
|
3832
|
-
"query": [],
|
|
3833
|
-
"body": null
|
|
3834
|
-
},
|
|
3835
3905
|
{
|
|
3836
3906
|
"name": "update-customers",
|
|
3837
3907
|
"method": "PATCH",
|
|
@@ -3994,17 +4064,6 @@ export const API_ROUTES = [
|
|
|
3994
4064
|
"query": [],
|
|
3995
4065
|
"body": null
|
|
3996
4066
|
},
|
|
3997
|
-
{
|
|
3998
|
-
"name": "webhook-endpoints-2",
|
|
3999
|
-
"method": "GET",
|
|
4000
|
-
"path": "/api/v1/payment/webhook-endpoints/{id}",
|
|
4001
|
-
"summary": "Get a webhook endpoint",
|
|
4002
|
-
"pathParams": [
|
|
4003
|
-
"id"
|
|
4004
|
-
],
|
|
4005
|
-
"query": [],
|
|
4006
|
-
"body": null
|
|
4007
|
-
},
|
|
4008
4067
|
{
|
|
4009
4068
|
"name": "webhook-events",
|
|
4010
4069
|
"method": "GET",
|
|
@@ -4014,17 +4073,6 @@ export const API_ROUTES = [
|
|
|
4014
4073
|
"query": [],
|
|
4015
4074
|
"body": null
|
|
4016
4075
|
},
|
|
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"
|
|
4024
|
-
],
|
|
4025
|
-
"query": [],
|
|
4026
|
-
"body": null
|
|
4027
|
-
},
|
|
4028
4076
|
{
|
|
4029
4077
|
"name": "webhook-events-resend",
|
|
4030
4078
|
"method": "POST",
|
|
@@ -4421,9 +4469,15 @@ export const API_ROUTES = [
|
|
|
4421
4469
|
"name": "areas",
|
|
4422
4470
|
"method": "GET",
|
|
4423
4471
|
"path": "/api/v1/shipping/areas",
|
|
4424
|
-
"summary": "
|
|
4472
|
+
"summary": "Area search (the Biteship area ids an origin/rates call takes) lives in fulkruma.",
|
|
4425
4473
|
"pathParams": [],
|
|
4426
|
-
"query": [
|
|
4474
|
+
"query": [
|
|
4475
|
+
{
|
|
4476
|
+
"name": "q",
|
|
4477
|
+
"kind": "string",
|
|
4478
|
+
"required": false
|
|
4479
|
+
}
|
|
4480
|
+
],
|
|
4427
4481
|
"body": null
|
|
4428
4482
|
},
|
|
4429
4483
|
{
|
|
@@ -4495,6 +4549,20 @@ export const API_ROUTES = [
|
|
|
4495
4549
|
}
|
|
4496
4550
|
]
|
|
4497
4551
|
},
|
|
4552
|
+
{
|
|
4553
|
+
"name": "get-shipments",
|
|
4554
|
+
"method": "GET",
|
|
4555
|
+
"path": "/api/v1/shipping/shipments/{id}",
|
|
4556
|
+
"summary": "Get a shipment",
|
|
4557
|
+
"pathParams": [
|
|
4558
|
+
"id"
|
|
4559
|
+
],
|
|
4560
|
+
"query": [],
|
|
4561
|
+
"body": null,
|
|
4562
|
+
"aliases": [
|
|
4563
|
+
"shipments-2"
|
|
4564
|
+
]
|
|
4565
|
+
},
|
|
4498
4566
|
{
|
|
4499
4567
|
"name": "origin",
|
|
4500
4568
|
"method": "GET",
|
|
@@ -4528,17 +4596,6 @@ export const API_ROUTES = [
|
|
|
4528
4596
|
],
|
|
4529
4597
|
"body": null
|
|
4530
4598
|
},
|
|
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
4599
|
{
|
|
4543
4600
|
"name": "shipments-cancel",
|
|
4544
4601
|
"method": "POST",
|
|
@@ -5096,17 +5153,6 @@ export const API_ROUTES = [
|
|
|
5096
5153
|
"query": [],
|
|
5097
5154
|
"body": null
|
|
5098
5155
|
},
|
|
5099
|
-
{
|
|
5100
|
-
"name": "deliveries-2",
|
|
5101
|
-
"method": "GET",
|
|
5102
|
-
"path": "/api/v1/storefront/deliveries/{id}",
|
|
5103
|
-
"summary": "Get a delivery",
|
|
5104
|
-
"pathParams": [
|
|
5105
|
-
"id"
|
|
5106
|
-
],
|
|
5107
|
-
"query": [],
|
|
5108
|
-
"body": null
|
|
5109
|
-
},
|
|
5110
5156
|
{
|
|
5111
5157
|
"name": "deliveries-extend",
|
|
5112
5158
|
"method": "POST",
|
|
@@ -5141,16 +5187,21 @@ export const API_ROUTES = [
|
|
|
5141
5187
|
"body": null
|
|
5142
5188
|
},
|
|
5143
5189
|
{
|
|
5144
|
-
"name": "
|
|
5190
|
+
"name": "get-deliveries",
|
|
5145
5191
|
"method": "GET",
|
|
5146
|
-
"path": "/api/v1/storefront/
|
|
5147
|
-
"summary": "
|
|
5148
|
-
"pathParams": [
|
|
5192
|
+
"path": "/api/v1/storefront/deliveries/{id}",
|
|
5193
|
+
"summary": "Get a delivery",
|
|
5194
|
+
"pathParams": [
|
|
5195
|
+
"id"
|
|
5196
|
+
],
|
|
5149
5197
|
"query": [],
|
|
5150
|
-
"body": null
|
|
5198
|
+
"body": null,
|
|
5199
|
+
"aliases": [
|
|
5200
|
+
"deliveries-2"
|
|
5201
|
+
]
|
|
5151
5202
|
},
|
|
5152
5203
|
{
|
|
5153
|
-
"name": "licenses
|
|
5204
|
+
"name": "get-licenses",
|
|
5154
5205
|
"method": "GET",
|
|
5155
5206
|
"path": "/api/v1/storefront/licenses/{key}",
|
|
5156
5207
|
"summary": "Get a license",
|
|
@@ -5158,6 +5209,122 @@ export const API_ROUTES = [
|
|
|
5158
5209
|
"key"
|
|
5159
5210
|
],
|
|
5160
5211
|
"query": [],
|
|
5212
|
+
"body": null,
|
|
5213
|
+
"aliases": [
|
|
5214
|
+
"licenses-2"
|
|
5215
|
+
]
|
|
5216
|
+
},
|
|
5217
|
+
{
|
|
5218
|
+
"name": "get-products",
|
|
5219
|
+
"method": "GET",
|
|
5220
|
+
"path": "/api/v1/storefront/products/{id}",
|
|
5221
|
+
"summary": "GET /storefront/products/:id",
|
|
5222
|
+
"pathParams": [
|
|
5223
|
+
"id"
|
|
5224
|
+
],
|
|
5225
|
+
"query": [],
|
|
5226
|
+
"body": null,
|
|
5227
|
+
"aliases": [
|
|
5228
|
+
"products-2"
|
|
5229
|
+
]
|
|
5230
|
+
},
|
|
5231
|
+
{
|
|
5232
|
+
"name": "get-public",
|
|
5233
|
+
"method": "GET",
|
|
5234
|
+
"path": "/api/v1/storefront/public/{merchantSlug}",
|
|
5235
|
+
"summary": "List all published products for a merchant",
|
|
5236
|
+
"pathParams": [
|
|
5237
|
+
"merchantSlug"
|
|
5238
|
+
],
|
|
5239
|
+
"query": [],
|
|
5240
|
+
"body": null,
|
|
5241
|
+
"aliases": [
|
|
5242
|
+
"public"
|
|
5243
|
+
]
|
|
5244
|
+
},
|
|
5245
|
+
{
|
|
5246
|
+
"name": "get-public-2",
|
|
5247
|
+
"method": "GET",
|
|
5248
|
+
"path": "/api/v1/storefront/public/{merchantSlug}/{productSlug}",
|
|
5249
|
+
"summary": "Single product detail",
|
|
5250
|
+
"pathParams": [
|
|
5251
|
+
"merchantSlug",
|
|
5252
|
+
"productSlug"
|
|
5253
|
+
],
|
|
5254
|
+
"query": [],
|
|
5255
|
+
"body": null,
|
|
5256
|
+
"aliases": [
|
|
5257
|
+
"public-2"
|
|
5258
|
+
]
|
|
5259
|
+
},
|
|
5260
|
+
{
|
|
5261
|
+
"name": "get-public-blog",
|
|
5262
|
+
"method": "GET",
|
|
5263
|
+
"path": "/api/v1/storefront/public/{merchantSlug}/blog/{slug}",
|
|
5264
|
+
"summary": "Single post",
|
|
5265
|
+
"pathParams": [
|
|
5266
|
+
"merchantSlug",
|
|
5267
|
+
"slug"
|
|
5268
|
+
],
|
|
5269
|
+
"query": [],
|
|
5270
|
+
"body": null,
|
|
5271
|
+
"aliases": [
|
|
5272
|
+
"public-blog-2"
|
|
5273
|
+
]
|
|
5274
|
+
},
|
|
5275
|
+
{
|
|
5276
|
+
"name": "get-public-order",
|
|
5277
|
+
"method": "GET",
|
|
5278
|
+
"path": "/api/v1/storefront/public/{merchantSlug}/order/{number}",
|
|
5279
|
+
"summary": "Public tracking endpoint — buyer enters email (or is logged in) to view their order.",
|
|
5280
|
+
"pathParams": [
|
|
5281
|
+
"merchantSlug",
|
|
5282
|
+
"number"
|
|
5283
|
+
],
|
|
5284
|
+
"query": [
|
|
5285
|
+
{
|
|
5286
|
+
"name": "email",
|
|
5287
|
+
"kind": "string",
|
|
5288
|
+
"required": false
|
|
5289
|
+
}
|
|
5290
|
+
],
|
|
5291
|
+
"body": null,
|
|
5292
|
+
"aliases": [
|
|
5293
|
+
"public-order"
|
|
5294
|
+
]
|
|
5295
|
+
},
|
|
5296
|
+
{
|
|
5297
|
+
"name": "get-public-order-2",
|
|
5298
|
+
"method": "GET",
|
|
5299
|
+
"path": "/api/v1/storefront/public/order/{deliveryId}",
|
|
5300
|
+
"summary": "View order details (requires signed URL)",
|
|
5301
|
+
"pathParams": [
|
|
5302
|
+
"deliveryId"
|
|
5303
|
+
],
|
|
5304
|
+
"query": [
|
|
5305
|
+
{
|
|
5306
|
+
"name": "email",
|
|
5307
|
+
"kind": "string",
|
|
5308
|
+
"required": true
|
|
5309
|
+
},
|
|
5310
|
+
{
|
|
5311
|
+
"name": "sig",
|
|
5312
|
+
"kind": "string",
|
|
5313
|
+
"required": true
|
|
5314
|
+
}
|
|
5315
|
+
],
|
|
5316
|
+
"body": null,
|
|
5317
|
+
"aliases": [
|
|
5318
|
+
"public-order-2"
|
|
5319
|
+
]
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
"name": "licenses",
|
|
5323
|
+
"method": "GET",
|
|
5324
|
+
"path": "/api/v1/storefront/licenses",
|
|
5325
|
+
"summary": "List licenses",
|
|
5326
|
+
"pathParams": [],
|
|
5327
|
+
"query": [],
|
|
5161
5328
|
"body": null
|
|
5162
5329
|
},
|
|
5163
5330
|
{
|
|
@@ -5204,7 +5371,7 @@ export const API_ROUTES = [
|
|
|
5204
5371
|
{
|
|
5205
5372
|
"name": "key",
|
|
5206
5373
|
"kind": "string",
|
|
5207
|
-
"required":
|
|
5374
|
+
"required": true
|
|
5208
5375
|
},
|
|
5209
5376
|
{
|
|
5210
5377
|
"name": "productId",
|
|
@@ -5223,17 +5390,6 @@ export const API_ROUTES = [
|
|
|
5223
5390
|
"query": [],
|
|
5224
5391
|
"body": null
|
|
5225
5392
|
},
|
|
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"
|
|
5233
|
-
],
|
|
5234
|
-
"query": [],
|
|
5235
|
-
"body": null
|
|
5236
|
-
},
|
|
5237
5393
|
{
|
|
5238
5394
|
"name": "products-ai-generate",
|
|
5239
5395
|
"method": "POST",
|
|
@@ -5278,29 +5434,6 @@ export const API_ROUTES = [
|
|
|
5278
5434
|
"query": [],
|
|
5279
5435
|
"body": null
|
|
5280
5436
|
},
|
|
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
5437
|
{
|
|
5305
5438
|
"name": "public-blog",
|
|
5306
5439
|
"method": "GET",
|
|
@@ -5312,18 +5445,6 @@ export const API_ROUTES = [
|
|
|
5312
5445
|
"query": [],
|
|
5313
5446
|
"body": null
|
|
5314
5447
|
},
|
|
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
5448
|
{
|
|
5328
5449
|
"name": "public-blog-rss-xml",
|
|
5329
5450
|
"method": "GET",
|
|
@@ -5480,7 +5601,7 @@ export const API_ROUTES = [
|
|
|
5480
5601
|
{
|
|
5481
5602
|
"name": "token",
|
|
5482
5603
|
"kind": "string",
|
|
5483
|
-
"required":
|
|
5604
|
+
"required": true
|
|
5484
5605
|
}
|
|
5485
5606
|
],
|
|
5486
5607
|
"body": null
|
|
@@ -5567,46 +5688,6 @@ export const API_ROUTES = [
|
|
|
5567
5688
|
}
|
|
5568
5689
|
]
|
|
5569
5690
|
},
|
|
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
5691
|
{
|
|
5611
5692
|
"name": "public-order-claim-payment",
|
|
5612
5693
|
"method": "POST",
|
|
@@ -5788,7 +5869,13 @@ export const API_ROUTES = [
|
|
|
5788
5869
|
"summary": "Request tracking links by email",
|
|
5789
5870
|
"pathParams": [],
|
|
5790
5871
|
"query": [],
|
|
5791
|
-
"body": [
|
|
5872
|
+
"body": [
|
|
5873
|
+
{
|
|
5874
|
+
"name": "email",
|
|
5875
|
+
"kind": "string",
|
|
5876
|
+
"required": true
|
|
5877
|
+
}
|
|
5878
|
+
]
|
|
5792
5879
|
},
|
|
5793
5880
|
{
|
|
5794
5881
|
"name": "public-validate-discount",
|
|
@@ -5797,7 +5884,43 @@ export const API_ROUTES = [
|
|
|
5797
5884
|
"summary": "Public dry-run that the storefront checkout uses to compute a discount before committing.",
|
|
5798
5885
|
"pathParams": [],
|
|
5799
5886
|
"query": [],
|
|
5800
|
-
"body": [
|
|
5887
|
+
"body": [
|
|
5888
|
+
{
|
|
5889
|
+
"name": "code",
|
|
5890
|
+
"kind": "string",
|
|
5891
|
+
"required": false
|
|
5892
|
+
},
|
|
5893
|
+
{
|
|
5894
|
+
"name": "currency",
|
|
5895
|
+
"kind": "string",
|
|
5896
|
+
"required": false
|
|
5897
|
+
},
|
|
5898
|
+
{
|
|
5899
|
+
"name": "customerId",
|
|
5900
|
+
"kind": "string",
|
|
5901
|
+
"required": false
|
|
5902
|
+
},
|
|
5903
|
+
{
|
|
5904
|
+
"name": "items",
|
|
5905
|
+
"kind": "string",
|
|
5906
|
+
"required": false
|
|
5907
|
+
},
|
|
5908
|
+
{
|
|
5909
|
+
"name": "merchantSlug",
|
|
5910
|
+
"kind": "string",
|
|
5911
|
+
"required": false
|
|
5912
|
+
},
|
|
5913
|
+
{
|
|
5914
|
+
"name": "shipping",
|
|
5915
|
+
"kind": "string",
|
|
5916
|
+
"required": false
|
|
5917
|
+
},
|
|
5918
|
+
{
|
|
5919
|
+
"name": "subtotal",
|
|
5920
|
+
"kind": "string",
|
|
5921
|
+
"required": false
|
|
5922
|
+
}
|
|
5923
|
+
]
|
|
5801
5924
|
},
|
|
5802
5925
|
{
|
|
5803
5926
|
"name": "update-products",
|
|
@@ -6272,47 +6395,49 @@ export function buildApiCommand() {
|
|
|
6272
6395
|
for (const { area, routes } of API_ROUTES) {
|
|
6273
6396
|
const group = new Command(area).description(`${area} routes`);
|
|
6274
6397
|
for (const route of routes) {
|
|
6275
|
-
const
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
const
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
const
|
|
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) {
|
|
6398
|
+
for (const name of [route.name, ...(route.aliases ?? [])]) {
|
|
6399
|
+
const cmd = new Command(name).description(`${route.summary} (${route.method} ${route.path})`);
|
|
6400
|
+
for (const p of route.pathParams)
|
|
6401
|
+
cmd.argument(`<${p}>`);
|
|
6402
|
+
const fields = [...route.query, ...(route.body ?? [])];
|
|
6403
|
+
for (const f of fields) {
|
|
6404
|
+
const hint = f.choices ? ` (${f.choices.join('|')})` : f.kind === 'json' || f.kind === 'array' ? ` (${f.kind})` : '';
|
|
6405
|
+
cmd.option(f.kind === 'boolean' ? `--${flag(f.name)} [value]` : `--${flag(f.name)} <value>`, `${f.required ? 'required' : 'optional'}${hint}`);
|
|
6406
|
+
}
|
|
6407
|
+
if (route.body)
|
|
6408
|
+
cmd.option('--body-json <json>', 'the whole body as JSON (fields given as flags override it)');
|
|
6409
|
+
cmd.action(async (...parts) => {
|
|
6410
|
+
const command = parts[parts.length - 1];
|
|
6411
|
+
const opts = command.opts();
|
|
6412
|
+
try {
|
|
6413
|
+
let path = route.path;
|
|
6414
|
+
route.pathParams.forEach((p, i) => { path = path.replace(`{${p}}`, encodeURIComponent(String(parts[i]))); });
|
|
6415
|
+
const query = {};
|
|
6416
|
+
for (const f of route.query) {
|
|
6301
6417
|
const raw = opts[camel(f.name)];
|
|
6302
6418
|
if (raw !== undefined)
|
|
6303
|
-
|
|
6419
|
+
query[f.name] = value(f, raw === true ? '' : String(raw));
|
|
6304
6420
|
}
|
|
6305
|
-
|
|
6306
|
-
if (
|
|
6307
|
-
|
|
6421
|
+
let body;
|
|
6422
|
+
if (route.body) {
|
|
6423
|
+
body = opts.bodyJson ? JSON.parse(String(opts.bodyJson)) : {};
|
|
6424
|
+
for (const f of route.body) {
|
|
6425
|
+
const raw = opts[camel(f.name)];
|
|
6426
|
+
if (raw !== undefined)
|
|
6427
|
+
body[f.name] = value(f, raw === true ? '' : String(raw));
|
|
6428
|
+
}
|
|
6429
|
+
const missing = route.body.filter((f) => f.required && body[f.name] === undefined).map((f) => `--${flag(f.name)}`);
|
|
6430
|
+
if (missing.length)
|
|
6431
|
+
throw new Error(`missing ${missing.join(', ')}`);
|
|
6432
|
+
}
|
|
6433
|
+
await callRoute(command, route.method, path, query, body);
|
|
6308
6434
|
}
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
}
|
|
6314
|
-
}
|
|
6315
|
-
group.addCommand(cmd);
|
|
6435
|
+
catch (err) {
|
|
6436
|
+
await failRoute(command, err);
|
|
6437
|
+
}
|
|
6438
|
+
});
|
|
6439
|
+
group.addCommand(cmd, { hidden: name !== route.name });
|
|
6440
|
+
}
|
|
6316
6441
|
}
|
|
6317
6442
|
api.addCommand(group);
|
|
6318
6443
|
}
|