@redotech/redo-api-schema 2.2.174 → 2.2.182

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
@@ -53,6 +53,20 @@ export interface paths {
53
53
  };
54
54
  };
55
55
  };
56
+ "/returns/{returnId}/process": {
57
+ /**
58
+ * Process return
59
+ * @description **BETA**: This endpoint is in beta and subject to change.
60
+ *
61
+ * Trigger processing of a return with specified products.
62
+ */
63
+ post: operations["Return process"];
64
+ parameters: {
65
+ path: {
66
+ returnId: components["parameters"]["return-id.param"];
67
+ };
68
+ };
69
+ };
56
70
  "/returns/{returnId}/status": {
57
71
  /**
58
72
  * Get return status
@@ -1425,6 +1439,70 @@ export interface operations {
1425
1439
  };
1426
1440
  };
1427
1441
  };
1442
+ /**
1443
+ * Process return
1444
+ * @description **BETA**: This endpoint is in beta and subject to change.
1445
+ *
1446
+ * Trigger processing of a return with specified products.
1447
+ */
1448
+ "Return process": {
1449
+ parameters: {
1450
+ path: {
1451
+ returnId: components["parameters"]["return-id.param"];
1452
+ };
1453
+ };
1454
+ requestBody: {
1455
+ content: {
1456
+ "application/json": {
1457
+ /** @description Notes to send to customer. These can be rejection notes or processing notes. */
1458
+ customerNotes?: string;
1459
+ /** @description Array of products to process or reject */
1460
+ products: ({
1461
+ /**
1462
+ * @description Product ID found on the return
1463
+ * @example 64e4d5e837572a4813b73e41
1464
+ */
1465
+ _id: string;
1466
+ /** @description Processing details. You may only have one of reject or processInput. */
1467
+ processInput?: ({
1468
+ /** @description Adjustment amount. This will be the amount that is credited to the customer, overriding the original product value. */
1469
+ newMerchantAdjustment?: number | null;
1470
+ /** @description Whether to restock the item */
1471
+ restock?: boolean;
1472
+ }) | null;
1473
+ /**
1474
+ * @description Reject this product. You may only have one of reject or processInput.
1475
+ * @default false
1476
+ */
1477
+ reject?: boolean;
1478
+ })[];
1479
+ };
1480
+ };
1481
+ };
1482
+ responses: {
1483
+ /** @description Processing request completed */
1484
+ 200: {
1485
+ content: {
1486
+ "application/json": {
1487
+ /** @description Status message */
1488
+ message?: string;
1489
+ };
1490
+ };
1491
+ };
1492
+ /** @description Bad request (e.g., missing products array) */
1493
+ 400: {
1494
+ content: {
1495
+ "application/problem+json": components["schemas"]["error.schema"];
1496
+ };
1497
+ };
1498
+ /** @description Error */
1499
+ default: {
1500
+ content: {
1501
+ "application/problem+json": components["schemas"]["error.schema"];
1502
+ };
1503
+ };
1504
+ };
1505
+ };
1428
1506
  /**
1429
1507
  * Get return status
1430
1508
  * @description Get return status.
package/lib/openapi.yaml CHANGED
@@ -1603,6 +1603,88 @@ paths:
1603
1603
  tags:
1604
1604
  - Returns
1605
1605
  summary: Return comment
1606
+ /returns/{returnId}/process:
1607
+ description: Process return.
1608
+ parameters:
1609
+ - $ref: '#/components/parameters/return-id.param'
1610
+ post:
1611
+ description: |
1612
+ **BETA**: This endpoint is in beta and subject to change.
1613
+
1614
+ Trigger processing of a return with specified products.
1615
+ operationId: Return process
1616
+ requestBody:
1617
+ content:
1618
+ application/json:
1619
+ schema:
1620
+ properties:
1621
+ customerNotes:
1622
+ description: Notes to send to customer. These can be rejection notes or processing notes.
1623
+ type: string
1624
+ products:
1625
+ description: Array of products to process or reject
1626
+ items:
1627
+ properties:
1628
+ _id:
1629
+ description: Product ID found on the return
1630
+ example: 64e4d5e837572a4813b73e41
1631
+ type: string
1632
+ processInput:
1633
+ description: Processing details. You may only have one of reject or processInput.
1634
+ nullable: true
1635
+ properties:
1636
+ newMerchantAdjustment:
1637
+ description: Adjustment amount. This will be the amount that is credited to the customer, overriding the original product value.
1638
+ nullable: true
1639
+ type: number
1640
+ restock:
1641
+ description: Whether to restock the item
1642
+ type: boolean
1643
+ type: object
1644
+ reject:
1645
+ default: false
1646
+ description: Reject this product. You may only have one of reject or processInput.
1647
+ type: boolean
1648
+ required:
1649
+ - _id
1650
+ type: object
1651
+ type: array
1652
+ required:
1653
+ - products
1654
+ type: object
1655
+ required: true
1656
+ responses:
1657
+ '200':
1658
+ content:
1659
+ application/json:
1660
+ schema:
1661
+ properties:
1662
+ message:
1663
+ description: Status message
1664
+ examples:
1665
+ - Processing triggered successfully
1666
+ - Successfully prepared some products to be processed, once all products are ready, processing will be triggered
1667
+ type: string
1668
+ type: object
1669
+ description: Processing request completed
1670
+ '400':
1671
+ content:
1672
+ application/problem+json:
1673
+ schema:
1674
+ $ref: '#/components/schemas/error.schema'
1675
+ description: Bad request (e.g., missing products array)
1676
+ default:
1677
+ content:
1678
+ application/problem+json:
1679
+ schema:
1680
+ $ref: '#/components/schemas/error.schema'
1681
+ description: Error
1682
+ security:
1683
+ - Bearer: []
1684
+ summary: Process return
1685
+ tags:
1686
+ - Returns
1687
+ summary: Process return
1606
1688
  /returns/{returnId}/status:
1607
1689
  description: Return status.
1608
1690
  get:
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.174"
34
+ "version": "2.2.182"
35
35
  }