@redotech/redo-api-schema 2.2.174 → 2.2.178

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,66 @@ 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 Whether to mark the return as reviewed before processing */
1460
+ markAsReviewed?: boolean;
1461
+ /** @description Array of products to process with their processing or rejection details */
1462
+ products: ({
1463
+ /**
1464
+ * @description Product ID
1465
+ * @example 64e4d5e837572a4813b73e41
1466
+ */
1467
+ _id: string;
1468
+ processInput?: ({
1469
+ /** @description Adjustment amount. This will be the amount that is credited to the customer. */
1470
+ newMerchantAdjustment?: number | null;
1471
+ /** @description Whether to restock the item */
1472
+ restock?: boolean;
1473
+ }) | null;
1474
+ })[];
1475
+ };
1476
+ };
1477
+ };
1478
+ responses: {
1479
+ /** @description Processing request completed */
1480
+ 200: {
1481
+ content: {
1482
+ "application/json": {
1483
+ /** @description Status message */
1484
+ message?: string;
1485
+ };
1486
+ };
1487
+ };
1488
+ /** @description Bad request (e.g., missing products array) */
1489
+ 400: {
1490
+ content: {
1491
+ "application/problem+json": components["schemas"]["error.schema"];
1492
+ };
1493
+ };
1494
+ /** @description Error */
1495
+ default: {
1496
+ content: {
1497
+ "application/problem+json": components["schemas"]["error.schema"];
1498
+ };
1499
+ };
1500
+ };
1501
+ };
1428
1502
  /**
1429
1503
  * Get return status
1430
1504
  * @description Get return status.
package/lib/openapi.yaml CHANGED
@@ -1603,6 +1603,86 @@ 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
+ markAsReviewed:
1625
+ description: Whether to mark the return as reviewed before processing
1626
+ type: boolean
1627
+ products:
1628
+ description: Array of products to process with their processing or rejection details
1629
+ items:
1630
+ properties:
1631
+ _id:
1632
+ description: Product ID
1633
+ example: 64e4d5e837572a4813b73e41
1634
+ type: string
1635
+ processInput:
1636
+ nullable: true
1637
+ properties:
1638
+ newMerchantAdjustment:
1639
+ description: Adjustment amount. This will be the amount that is credited to the customer.
1640
+ nullable: true
1641
+ type: number
1642
+ restock:
1643
+ description: Whether to restock the item
1644
+ type: boolean
1645
+ type: object
1646
+ required:
1647
+ - _id
1648
+ type: object
1649
+ type: array
1650
+ required:
1651
+ - products
1652
+ type: object
1653
+ required: true
1654
+ responses:
1655
+ '200':
1656
+ content:
1657
+ application/json:
1658
+ schema:
1659
+ properties:
1660
+ message:
1661
+ description: Status message
1662
+ examples:
1663
+ - Processing triggered successfully
1664
+ - Successfully prepared some products to be processed
1665
+ type: string
1666
+ type: object
1667
+ description: Processing request completed
1668
+ '400':
1669
+ content:
1670
+ application/problem+json:
1671
+ schema:
1672
+ $ref: '#/components/schemas/error.schema'
1673
+ description: Bad request (e.g., missing products array)
1674
+ default:
1675
+ content:
1676
+ application/problem+json:
1677
+ schema:
1678
+ $ref: '#/components/schemas/error.schema'
1679
+ description: Error
1680
+ security:
1681
+ - Bearer: []
1682
+ summary: Process return
1683
+ tags:
1684
+ - Returns
1685
+ summary: Process return
1606
1686
  /returns/{returnId}/status:
1607
1687
  description: Return status.
1608
1688
  get:
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.174"
34
+ "version": "2.2.178"
35
35
  }