@redotech/redo-api-schema 2.2.418 → 2.2.427

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
@@ -76,6 +76,11 @@ export interface paths {
76
76
  /**
77
77
  * Update Return Status
78
78
  * @description Update return status.
79
+ *
80
+ * Certain status transitions trigger additional side effects to maintain data consistency:
81
+ *
82
+ * - Setting status to **complete** will also mark all return items as complete.
83
+ * - Setting status to **open** from **complete** or **rejected** will reopen the return, resetting all processed/rejected items back to open, clearing pending processing info, resetting the expiration date, and marking the return as reopened. **Note:** Reopening a processed return does not reverse any refunds, exchanges, or other actions that were performed during processing.
79
84
  */
80
85
  put: operations["Return status update"];
81
86
  };
@@ -427,6 +432,19 @@ export interface components {
427
432
  * @description Custom event to trigger flows with merchant-defined event names and properties.
428
433
  */
429
434
  "custom-event-request.schema": {
435
+ /** @description Cart context for product recommendations in triggered emails. If not provided, no cart-aware recommendations will be made. */
436
+ cart_context?: ({
437
+ /** @description Items already in the customer's cart. */
438
+ alreadyInCart: {
439
+ productId: string;
440
+ quantity?: number;
441
+ variantId: string;
442
+ }[];
443
+ /** @description The ID of an existing cart to use for recommendations. */
444
+ existingCartId: string | null;
445
+ /** @description Product IDs to use as the basis for recommendations. */
446
+ productIdsForRecommendations: string[];
447
+ }) | null;
430
448
  /** @description Customer email address (one of email or phone is required). */
431
449
  email?: string;
432
450
  /** @description The name of the custom event (e.g., 'user_registered', 'purchase_completed'). */
@@ -1878,6 +1896,11 @@ export interface operations {
1878
1896
  /**
1879
1897
  * Update Return Status
1880
1898
  * @description Update return status.
1899
+ *
1900
+ * Certain status transitions trigger additional side effects to maintain data consistency:
1901
+ *
1902
+ * - Setting status to **complete** will also mark all return items as complete.
1903
+ * - Setting status to **open** from **complete** or **rejected** will reopen the return, resetting all processed/rejected items back to open, clearing pending processing info, resetting the expiration date, and marking the return as reopened. **Note:** Reopening a processed return does not reverse any refunds, exchanges, or other actions that were performed during processing.
1881
1904
  */
1882
1905
  "Return status update": {
1883
1906
  parameters: {
package/lib/openapi.yaml CHANGED
@@ -830,7 +830,13 @@ paths:
830
830
  tags:
831
831
  - Returns
832
832
  put:
833
- description: Update return status.
833
+ description: |
834
+ Update return status.
835
+
836
+ Certain status transitions trigger additional side effects to maintain data consistency:
837
+
838
+ - Setting status to **complete** will also mark all return items as complete.
839
+ - Setting status to **open** from **complete** or **rejected** will reopen the return, resetting all processed/rejected items back to open, clearing pending processing info, resetting the expiration date, and marking the return as reopened. **Note:** Reopening a processed return does not reverse any refunds, exchanges, or other actions that were performed during processing.
834
840
  operationId: Return status update
835
841
  parameters:
836
842
  - $ref: '#/components/parameters/return-id.param'
@@ -1535,6 +1541,39 @@ components:
1535
1541
  description: ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
1536
1542
  format: date-time
1537
1543
  type: string
1544
+ cart_context:
1545
+ description: Cart context for product recommendations in triggered emails. If not provided, no cart-aware recommendations will be made.
1546
+ nullable: true
1547
+ type: object
1548
+ properties:
1549
+ existingCartId:
1550
+ description: The ID of an existing cart to use for recommendations.
1551
+ type: string
1552
+ nullable: true
1553
+ productIdsForRecommendations:
1554
+ description: Product IDs to use as the basis for recommendations.
1555
+ type: array
1556
+ items:
1557
+ type: string
1558
+ alreadyInCart:
1559
+ description: Items already in the customer's cart.
1560
+ type: array
1561
+ items:
1562
+ type: object
1563
+ properties:
1564
+ productId:
1565
+ type: string
1566
+ variantId:
1567
+ type: string
1568
+ quantity:
1569
+ type: number
1570
+ required:
1571
+ - productId
1572
+ - variantId
1573
+ required:
1574
+ - existingCartId
1575
+ - productIdsForRecommendations
1576
+ - alreadyInCart
1538
1577
  required:
1539
1578
  - event_name
1540
1579
  title: Custom Event Request
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.418"
34
+ "version": "2.2.427"
35
35
  }