@redotech/redo-api-schema 2.2.108 → 2.2.112

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/lib/openapi.d.ts CHANGED
@@ -70,6 +70,20 @@ export interface paths {
70
70
  };
71
71
  };
72
72
  };
73
+ "/shipments/buy": {
74
+ /**
75
+ * Purchase shipping label
76
+ * @description Purchase a shipping label based on origin, destination, carrier, service, and parcel information.
77
+ */
78
+ post: operations["Shipment buy"];
79
+ };
80
+ "/shipments/rates": {
81
+ /**
82
+ * Get shipping rates
83
+ * @description Get available shipping rates based on origin, destination, and parcel information.
84
+ */
85
+ post: operations["Shipment rates"];
86
+ };
73
87
  "/stores/{storeId}/admin": {
74
88
  /**
75
89
  * Navigate to merchant admin
@@ -365,6 +379,23 @@ export interface components {
365
379
  * @example 1
366
380
  */
367
381
  "item-quantity.schema": number;
382
+ /**
383
+ * Length
384
+ * @description Length measurement with unit.
385
+ */
386
+ "length.schema": {
387
+ /**
388
+ * Unit
389
+ * @description Length unit
390
+ * @enum {string}
391
+ */
392
+ unit: "in" | "cm";
393
+ /**
394
+ * Value
395
+ * @description Numeric length value
396
+ */
397
+ value: number;
398
+ };
368
399
  /**
369
400
  * Money
370
401
  * @description Currency amount
@@ -438,6 +469,23 @@ export interface components {
438
469
  */
439
470
  name: string;
440
471
  };
472
+ /**
473
+ * Parcel Type
474
+ * @description Parcel type enum.
475
+ * @enum {string}
476
+ */
477
+ "parcel-type.schema": "box" | "envelope" | "soft_pack";
478
+ /**
479
+ * Parcel
480
+ * @description Parcel information for shipping.
481
+ */
482
+ "parcel.schema": {
483
+ height: components["schemas"]["length.schema"];
484
+ length: components["schemas"]["length.schema"];
485
+ type: components["schemas"]["parcel-type.schema"];
486
+ weight: components["schemas"]["shipping-weight.schema"];
487
+ width: components["schemas"]["length.schema"];
488
+ };
441
489
  /**
442
490
  * Person name
443
491
  * @description Person name.
@@ -690,6 +738,114 @@ export interface components {
690
738
  * @enum {string}
691
739
  */
692
740
  "return-status.schema": "manual_review" | "open" | "transit" | "delivered" | "flagged" | "cancelled" | "closed";
741
+ /**
742
+ * Shipment Document Type
743
+ * @description Type of shipping document.
744
+ * @enum {string}
745
+ */
746
+ "shipment-document-type.schema": "label" | "commercialInvoice";
747
+ /**
748
+ * Shipment Document
749
+ * @description Shipping document information.
750
+ */
751
+ "shipment-document.schema": {
752
+ type: components["schemas"]["shipment-document-type.schema"];
753
+ /**
754
+ * URL
755
+ * Format: uri
756
+ * @description URL to download the document
757
+ */
758
+ url: string;
759
+ };
760
+ /**
761
+ * Shipment Rate
762
+ * @description Shipping rate information.
763
+ */
764
+ "shipment-rate.schema": {
765
+ carrier: {
766
+ /**
767
+ * Carrier Account ID
768
+ * @description ID for the carrier account that provides the shipping rate.
769
+ */
770
+ id: string;
771
+ /**
772
+ * Carrier Name
773
+ * @description Carrier display name
774
+ */
775
+ name: string;
776
+ };
777
+ price: components["schemas"]["money.schema"];
778
+ service: {
779
+ /**
780
+ * Service Name
781
+ * @description Service level name
782
+ */
783
+ name: string;
784
+ };
785
+ };
786
+ /**
787
+ * Shipment Tracker
788
+ * @description Shipment tracking information.
789
+ */
790
+ "shipment-tracker.schema": {
791
+ /**
792
+ * Tracking Code
793
+ * @description Carrier tracking code
794
+ */
795
+ code: string;
796
+ };
797
+ /**
798
+ * Shipment
799
+ * @description Shipment information.
800
+ */
801
+ "shipment.schema": {
802
+ /**
803
+ * Documents
804
+ * @description Shipping documents
805
+ */
806
+ documents: components["schemas"]["shipment-document.schema"][];
807
+ /**
808
+ * Shipment ID
809
+ * @description Shipment identifier
810
+ */
811
+ id: string;
812
+ price: components["schemas"]["money.schema"];
813
+ tracker: components["schemas"]["shipment-tracker.schema"];
814
+ };
815
+ /**
816
+ * Shipping Contact
817
+ * @description Contact information for shipping.
818
+ */
819
+ "shipping-contact.schema": {
820
+ address: components["schemas"]["address.schema"];
821
+ /**
822
+ * Name
823
+ * @description Contact name
824
+ */
825
+ name: string;
826
+ /**
827
+ * Phone Number
828
+ * @description Contact phone number
829
+ */
830
+ phoneNumber: string;
831
+ };
832
+ /**
833
+ * Shipping Weight
834
+ * @description Weight measurement with unit for shipping.
835
+ */
836
+ "shipping-weight.schema": {
837
+ /**
838
+ * Unit
839
+ * @description Weight unit
840
+ * @enum {string}
841
+ */
842
+ unit: "g" | "kg" | "oz" | "lb";
843
+ /**
844
+ * Value
845
+ * @description Numeric weight value
846
+ */
847
+ value: number;
848
+ };
693
849
  /**
694
850
  * Storefront Cart
695
851
  * @description Storefront cart.
@@ -1090,6 +1246,84 @@ export interface operations {
1090
1246
  };
1091
1247
  };
1092
1248
  };
1249
+ /**
1250
+ * Purchase shipping label
1251
+ * @description Purchase a shipping label based on origin, destination, carrier, service, and parcel information.
1252
+ */
1253
+ "Shipment buy": {
1254
+ requestBody: {
1255
+ content: {
1256
+ "application/json": {
1257
+ carrier: {
1258
+ /**
1259
+ * Carrier Account ID
1260
+ * @description ID for the carrier account that provides the shipping rate.
1261
+ */
1262
+ id: string;
1263
+ };
1264
+ destination: components["schemas"]["shipping-contact.schema"];
1265
+ origin: components["schemas"]["shipping-contact.schema"];
1266
+ parcel: components["schemas"]["parcel.schema"];
1267
+ service: {
1268
+ /** @description Service level name */
1269
+ name: string;
1270
+ };
1271
+ };
1272
+ };
1273
+ };
1274
+ responses: {
1275
+ /** @description Success */
1276
+ 200: {
1277
+ content: {
1278
+ "application/json": {
1279
+ shipment: components["schemas"]["shipment.schema"];
1280
+ };
1281
+ };
1282
+ };
1283
+ /** @description Error */
1284
+ default: {
1285
+ content: {
1286
+ "application/problem+json": components["schemas"]["error.schema"];
1287
+ };
1288
+ };
1289
+ };
1290
+ };
1291
+ /**
1292
+ * Get shipping rates
1293
+ * @description Get available shipping rates based on origin, destination, and parcel information.
1294
+ */
1295
+ "Shipment rates": {
1296
+ requestBody: {
1297
+ content: {
1298
+ "application/json": {
1299
+ destination: {
1300
+ address: components["schemas"]["address.schema"];
1301
+ };
1302
+ origin: {
1303
+ address: components["schemas"]["address.schema"];
1304
+ };
1305
+ parcel: components["schemas"]["parcel.schema"];
1306
+ };
1307
+ };
1308
+ };
1309
+ responses: {
1310
+ /** @description Success */
1311
+ 200: {
1312
+ content: {
1313
+ "application/json": {
1314
+ /** @description Available shipping rates */
1315
+ rates: components["schemas"]["shipment-rate.schema"][];
1316
+ };
1317
+ };
1318
+ };
1319
+ /** @description Error */
1320
+ default: {
1321
+ content: {
1322
+ "application/problem+json": components["schemas"]["error.schema"];
1323
+ };
1324
+ };
1325
+ };
1326
+ };
1093
1327
  /**
1094
1328
  * Navigate to merchant admin
1095
1329
  * @description Navigate to the merchant admin page.
package/lib/openapi.yaml CHANGED
@@ -283,6 +283,32 @@ components:
283
283
  exclusiveMinimum: 0
284
284
  title: Item quantity
285
285
  type: number
286
+ length.schema:
287
+ description: Length measurement with unit.
288
+ properties:
289
+ unit:
290
+ description: Length unit
291
+ enum:
292
+ - in
293
+ - cm
294
+ examples:
295
+ - in
296
+ - cm
297
+ title: Unit
298
+ type: string
299
+ value:
300
+ description: Numeric length value
301
+ examples:
302
+ - 10.5
303
+ - 30
304
+ minimum: 0
305
+ title: Value
306
+ type: number
307
+ required:
308
+ - value
309
+ - unit
310
+ title: Length
311
+ type: object
286
312
  money.schema:
287
313
  description: Currency amount
288
314
  properties:
@@ -383,6 +409,35 @@ components:
383
409
  - name
384
410
  title: Order
385
411
  type: object
412
+ parcel-type.schema:
413
+ description: Parcel type enum.
414
+ enum:
415
+ - box
416
+ - envelope
417
+ - soft_pack
418
+ title: Parcel Type
419
+ type: string
420
+ parcel.schema:
421
+ description: Parcel information for shipping.
422
+ properties:
423
+ height:
424
+ $ref: '#/components/schemas/length.schema'
425
+ length:
426
+ $ref: '#/components/schemas/length.schema'
427
+ type:
428
+ $ref: '#/components/schemas/parcel-type.schema'
429
+ weight:
430
+ $ref: '#/components/schemas/shipping-weight.schema'
431
+ width:
432
+ $ref: '#/components/schemas/length.schema'
433
+ required:
434
+ - height
435
+ - length
436
+ - width
437
+ - weight
438
+ - type
439
+ title: Parcel
440
+ type: object
386
441
  person-name.schema:
387
442
  description: Person name.
388
443
  properties:
@@ -707,6 +762,158 @@ components:
707
762
  example: open
708
763
  title: Return status
709
764
  type: string
765
+ shipment-document-type.schema:
766
+ description: Type of shipping document.
767
+ enum:
768
+ - label
769
+ - commercialInvoice
770
+ title: Shipment Document Type
771
+ type: string
772
+ shipment-document.schema:
773
+ description: Shipping document information.
774
+ properties:
775
+ type:
776
+ $ref: '#/components/schemas/shipment-document-type.schema'
777
+ url:
778
+ description: URL to download the document
779
+ examples:
780
+ - https://example.com/labels/123.pdf
781
+ format: uri
782
+ title: URL
783
+ type: string
784
+ required:
785
+ - type
786
+ - url
787
+ title: Shipment Document
788
+ type: object
789
+ shipment-rate.schema:
790
+ description: Shipping rate information.
791
+ properties:
792
+ carrier:
793
+ properties:
794
+ id:
795
+ description: ID for the carrier account that provides the shipping rate.
796
+ title: Carrier Account ID
797
+ type: string
798
+ name:
799
+ description: Carrier display name
800
+ examples:
801
+ - USPS
802
+ - FedEx
803
+ title: Carrier Name
804
+ type: string
805
+ required:
806
+ - id
807
+ - name
808
+ type: object
809
+ price:
810
+ $ref: '#/components/schemas/money.schema'
811
+ service:
812
+ properties:
813
+ name:
814
+ description: Service level name
815
+ examples:
816
+ - Priority
817
+ - Ground
818
+ title: Service Name
819
+ type: string
820
+ required:
821
+ - name
822
+ type: object
823
+ required:
824
+ - carrier
825
+ - price
826
+ - service
827
+ title: Shipment Rate
828
+ type: object
829
+ shipment-tracker.schema:
830
+ description: Shipment tracking information.
831
+ properties:
832
+ code:
833
+ description: Carrier tracking code
834
+ examples:
835
+ - '9400100000000000000000'
836
+ title: Tracking Code
837
+ type: string
838
+ required:
839
+ - code
840
+ title: Shipment Tracker
841
+ type: object
842
+ shipment.schema:
843
+ description: Shipment information.
844
+ properties:
845
+ documents:
846
+ description: Shipping documents
847
+ items:
848
+ $ref: '#/components/schemas/shipment-document.schema'
849
+ title: Documents
850
+ type: array
851
+ id:
852
+ description: Shipment identifier
853
+ title: Shipment ID
854
+ type: string
855
+ price:
856
+ $ref: '#/components/schemas/money.schema'
857
+ tracker:
858
+ $ref: '#/components/schemas/shipment-tracker.schema'
859
+ required:
860
+ - id
861
+ - documents
862
+ - tracker
863
+ - price
864
+ title: Shipment
865
+ type: object
866
+ shipping-contact.schema:
867
+ description: Contact information for shipping.
868
+ properties:
869
+ address:
870
+ $ref: '#/components/schemas/address.schema'
871
+ name:
872
+ description: Contact name
873
+ examples:
874
+ - John Doe
875
+ title: Name
876
+ type: string
877
+ phoneNumber:
878
+ description: Contact phone number
879
+ examples:
880
+ - '+12025550123'
881
+ title: Phone Number
882
+ type: string
883
+ required:
884
+ - name
885
+ - phoneNumber
886
+ - address
887
+ title: Shipping Contact
888
+ type: object
889
+ shipping-weight.schema:
890
+ description: Weight measurement with unit for shipping.
891
+ properties:
892
+ unit:
893
+ description: Weight unit
894
+ enum:
895
+ - g
896
+ - kg
897
+ - oz
898
+ - lb
899
+ examples:
900
+ - lb
901
+ - kg
902
+ title: Unit
903
+ type: string
904
+ value:
905
+ description: Numeric weight value
906
+ examples:
907
+ - 1.5
908
+ - 10
909
+ minimum: 0
910
+ title: Value
911
+ type: number
912
+ required:
913
+ - value
914
+ - unit
915
+ title: Shipping Weight
916
+ type: object
710
917
  storefront-cart.schema:
711
918
  description: Storefront cart.
712
919
  properties:
@@ -1150,6 +1357,133 @@ paths:
1150
1357
  tags:
1151
1358
  - Returns
1152
1359
  summary: Return status
1360
+ /shipments/buy:
1361
+ description: Purchase a shipping label.
1362
+ post:
1363
+ description: Purchase a shipping label based on origin, destination, carrier, service, and parcel information.
1364
+ operationId: Shipment buy
1365
+ requestBody:
1366
+ content:
1367
+ application/json:
1368
+ schema:
1369
+ properties:
1370
+ carrier:
1371
+ properties:
1372
+ id:
1373
+ description: ID for the carrier account that provides the shipping rate.
1374
+ title: Carrier Account ID
1375
+ type: string
1376
+ required:
1377
+ - id
1378
+ type: object
1379
+ destination:
1380
+ $ref: '#/components/schemas/shipping-contact.schema'
1381
+ origin:
1382
+ $ref: '#/components/schemas/shipping-contact.schema'
1383
+ parcel:
1384
+ $ref: '#/components/schemas/parcel.schema'
1385
+ service:
1386
+ properties:
1387
+ name:
1388
+ description: Service level name
1389
+ examples:
1390
+ - Priority
1391
+ - Ground
1392
+ type: string
1393
+ required:
1394
+ - name
1395
+ type: object
1396
+ required:
1397
+ - origin
1398
+ - destination
1399
+ - carrier
1400
+ - service
1401
+ - parcel
1402
+ type: object
1403
+ required: true
1404
+ responses:
1405
+ '200':
1406
+ content:
1407
+ application/json:
1408
+ schema:
1409
+ properties:
1410
+ shipment:
1411
+ $ref: '#/components/schemas/shipment.schema'
1412
+ required:
1413
+ - shipment
1414
+ type: object
1415
+ description: Success
1416
+ default:
1417
+ content:
1418
+ application/problem+json:
1419
+ schema:
1420
+ $ref: '#/components/schemas/error.schema'
1421
+ description: Error
1422
+ security:
1423
+ - Bearer: []
1424
+ summary: Purchase shipping label
1425
+ tags:
1426
+ - Shipping
1427
+ summary: Shipment Buy
1428
+ /shipments/rates:
1429
+ description: Fetch available shipping label rates.
1430
+ post:
1431
+ description: Get available shipping rates based on origin, destination, and parcel information.
1432
+ operationId: Shipment rates
1433
+ requestBody:
1434
+ content:
1435
+ application/json:
1436
+ schema:
1437
+ properties:
1438
+ destination:
1439
+ properties:
1440
+ address:
1441
+ $ref: '#/components/schemas/address.schema'
1442
+ required:
1443
+ - address
1444
+ type: object
1445
+ origin:
1446
+ properties:
1447
+ address:
1448
+ $ref: '#/components/schemas/address.schema'
1449
+ required:
1450
+ - address
1451
+ type: object
1452
+ parcel:
1453
+ $ref: '#/components/schemas/parcel.schema'
1454
+ required:
1455
+ - origin
1456
+ - destination
1457
+ - parcel
1458
+ type: object
1459
+ required: true
1460
+ responses:
1461
+ '200':
1462
+ content:
1463
+ application/json:
1464
+ schema:
1465
+ properties:
1466
+ rates:
1467
+ description: Available shipping rates
1468
+ items:
1469
+ $ref: '#/components/schemas/shipment-rate.schema'
1470
+ type: array
1471
+ required:
1472
+ - rates
1473
+ type: object
1474
+ description: Success
1475
+ default:
1476
+ content:
1477
+ application/problem+json:
1478
+ schema:
1479
+ $ref: '#/components/schemas/error.schema'
1480
+ description: Error
1481
+ security:
1482
+ - Bearer: []
1483
+ summary: Get shipping rates
1484
+ tags:
1485
+ - Shipping
1486
+ summary: Shipment Rates
1153
1487
  /stores/{storeId}/admin:
1154
1488
  description: Navigate to the merchant admin page.
1155
1489
  get:
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.108"
34
+ "version": "2.2.112"
35
35
  }