@redotech/redo-api-schema 2.2.190 → 2.2.194

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
@@ -114,6 +114,13 @@ export interface paths {
114
114
  */
115
115
  get: operations["Customer portal navigate"];
116
116
  };
117
+ "/stores/{storeId}/customer-subscriptions": {
118
+ /**
119
+ * Update customer subscriptions
120
+ * @description Update customer subscription status for SMS and email marketing and transactional messages.
121
+ */
122
+ post: operations["updateCustomerSubscriptions"];
123
+ };
117
124
  "/stores/{storeId}/invoices": {
118
125
  /**
119
126
  * Get invoice
@@ -318,6 +325,46 @@ export interface components {
318
325
  */
319
326
  price: components["schemas"]["money.schema"];
320
327
  };
328
+ /** @description Email subscription updates */
329
+ "customer-subscription-email.schema": {
330
+ /**
331
+ * Format: email
332
+ * @description Email address
333
+ */
334
+ email: string;
335
+ subscriptions: {
336
+ marketing?: components["schemas"]["subscription-status-marketing.schema"];
337
+ };
338
+ };
339
+ /** @description SMS subscription updates */
340
+ "customer-subscription-sms.schema": {
341
+ /** @description Phone number in E.164 format (e.g., +12345678900) */
342
+ phoneNumber: string;
343
+ subscriptions: {
344
+ marketing?: components["schemas"]["subscription-status-marketing.schema"];
345
+ transactional?: components["schemas"]["subscription-status-transactional.schema"];
346
+ };
347
+ };
348
+ /** @description Customer subscription update response */
349
+ "customer-subscription-update-response.schema": {
350
+ /** @description Human-readable success message */
351
+ message: string;
352
+ /** @description Whether the operation was successful */
353
+ success: boolean;
354
+ /** @description Details of which subscriptions were updated */
355
+ updatedSubscriptions: {
356
+ email?: {
357
+ /** @description Whether email marketing was updated */
358
+ marketing?: boolean;
359
+ };
360
+ sms?: {
361
+ /** @description Whether SMS marketing was updated */
362
+ marketing?: boolean;
363
+ /** @description Whether SMS transactional was updated */
364
+ transactional?: boolean;
365
+ };
366
+ };
367
+ };
321
368
  /**
322
369
  * Problem details
323
370
  * @description Problem details. See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
@@ -1145,6 +1192,37 @@ export interface components {
1145
1192
  urlWithParams?: string;
1146
1193
  [key: string]: unknown;
1147
1194
  };
1195
+ /** @description Marketing subscription status */
1196
+ "subscription-status-marketing.schema": {
1197
+ /**
1198
+ * @description Subscription status
1199
+ * @enum {string}
1200
+ */
1201
+ subscriptionStatus: "subscribed" | "confirmed" | "unsubscribed";
1202
+ /**
1203
+ * @description Whether to trigger automations for this subscription change. Defaults to false.
1204
+ * @default false
1205
+ */
1206
+ triggerAutomations?: boolean;
1207
+ /**
1208
+ * Format: date-time
1209
+ * @description ISO 8601 timestamp. If not provided, defaults to now.
1210
+ */
1211
+ updatedAt?: string;
1212
+ };
1213
+ /** @description Transactional subscription status (order tracking) */
1214
+ "subscription-status-transactional.schema": {
1215
+ /**
1216
+ * @description Subscription status. Only subscribed and unsubscribed are supported for transactional.
1217
+ * @enum {string}
1218
+ */
1219
+ subscriptionStatus: "subscribed" | "unsubscribed";
1220
+ /**
1221
+ * Format: date-time
1222
+ * @description ISO 8601 timestamp. If not provided, defaults to now.
1223
+ */
1224
+ updatedAt?: string;
1225
+ };
1148
1226
  /**
1149
1227
  * Webhook create
1150
1228
  * @description Webhook create.
@@ -1738,6 +1816,51 @@ export interface operations {
1738
1816
  };
1739
1817
  };
1740
1818
  };
1819
+ /**
1820
+ * Update customer subscriptions
1821
+ * @description Update customer subscription status for SMS and email marketing and transactional messages.
1822
+ */
1823
+ updateCustomerSubscriptions: {
1824
+ parameters: {
1825
+ path: {
1826
+ storeId: components["parameters"]["store-id.param"];
1827
+ };
1828
+ };
1829
+ requestBody: {
1830
+ content: {
1831
+ "application/json": {
1832
+ email?: components["schemas"]["customer-subscription-email.schema"];
1833
+ sms?: components["schemas"]["customer-subscription-sms.schema"];
1834
+ };
1835
+ };
1836
+ };
1837
+ responses: {
1838
+ /** @description Success */
1839
+ 200: {
1840
+ content: {
1841
+ "application/json": components["schemas"]["customer-subscription-update-response.schema"];
1842
+ };
1843
+ };
1844
+ /** @description Bad Request */
1845
+ 400: {
1846
+ content: {
1847
+ "application/problem+json": components["schemas"]["error.schema"];
1848
+ };
1849
+ };
1850
+ /** @description Internal Server Error */
1851
+ 500: {
1852
+ content: {
1853
+ "application/problem+json": components["schemas"]["error.schema"];
1854
+ };
1855
+ };
1856
+ /** @description Error */
1857
+ default: {
1858
+ content: {
1859
+ "application/problem+json": components["schemas"]["error.schema"];
1860
+ };
1861
+ };
1862
+ };
1863
+ };
1741
1864
  /**
1742
1865
  * Get invoice
1743
1866
  * @description Get a list of invoices.
package/lib/openapi.yaml CHANGED
@@ -217,6 +217,72 @@ components:
217
217
  - price
218
218
  title: Coverage product
219
219
  type: object
220
+ customer-subscription-email.schema:
221
+ description: Email subscription updates
222
+ properties:
223
+ email:
224
+ description: Email address
225
+ format: email
226
+ type: string
227
+ subscriptions:
228
+ properties:
229
+ marketing:
230
+ $ref: '#/components/schemas/subscription-status-marketing.schema'
231
+ type: object
232
+ required:
233
+ - email
234
+ - subscriptions
235
+ type: object
236
+ customer-subscription-sms.schema:
237
+ description: SMS subscription updates
238
+ properties:
239
+ phoneNumber:
240
+ description: Phone number in E.164 format (e.g., +12345678900)
241
+ type: string
242
+ subscriptions:
243
+ properties:
244
+ marketing:
245
+ $ref: '#/components/schemas/subscription-status-marketing.schema'
246
+ transactional:
247
+ $ref: '#/components/schemas/subscription-status-transactional.schema'
248
+ type: object
249
+ required:
250
+ - phoneNumber
251
+ - subscriptions
252
+ type: object
253
+ customer-subscription-update-response.schema:
254
+ description: Customer subscription update response
255
+ properties:
256
+ message:
257
+ description: Human-readable success message
258
+ type: string
259
+ success:
260
+ description: Whether the operation was successful
261
+ type: boolean
262
+ updatedSubscriptions:
263
+ description: Details of which subscriptions were updated
264
+ properties:
265
+ email:
266
+ properties:
267
+ marketing:
268
+ description: Whether email marketing was updated
269
+ type: boolean
270
+ type: object
271
+ sms:
272
+ properties:
273
+ marketing:
274
+ description: Whether SMS marketing was updated
275
+ type: boolean
276
+ transactional:
277
+ description: Whether SMS transactional was updated
278
+ type: boolean
279
+ type: object
280
+ type: object
281
+ required:
282
+ - success
283
+ - message
284
+ - updatedSubscriptions
285
+ type: object
220
286
  error.schema:
221
287
  description: Problem details. See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
222
288
  properties:
@@ -1311,6 +1377,43 @@ components:
1311
1377
  - source
1312
1378
  title: Storefront Event
1313
1379
  type: object
1380
+ subscription-status-marketing.schema:
1381
+ description: Marketing subscription status
1382
+ properties:
1383
+ subscriptionStatus:
1384
+ description: Subscription status
1385
+ enum:
1386
+ - subscribed
1387
+ - confirmed
1388
+ - unsubscribed
1389
+ type: string
1390
+ triggerAutomations:
1391
+ default: false
1392
+ description: Whether to trigger automations for this subscription change. Defaults to false.
1393
+ type: boolean
1394
+ updatedAt:
1395
+ description: ISO 8601 timestamp. If not provided, defaults to now.
1396
+ format: date-time
1397
+ type: string
1398
+ required:
1399
+ - subscriptionStatus
1400
+ type: object
1401
+ subscription-status-transactional.schema:
1402
+ description: Transactional subscription status (order tracking)
1403
+ properties:
1404
+ subscriptionStatus:
1405
+ description: Subscription status. Only subscribed and unsubscribed are supported for transactional.
1406
+ enum:
1407
+ - subscribed
1408
+ - unsubscribed
1409
+ type: string
1410
+ updatedAt:
1411
+ description: ISO 8601 timestamp. If not provided, defaults to now.
1412
+ format: date-time
1413
+ type: string
1414
+ required:
1415
+ - subscriptionStatus
1416
+ type: object
1314
1417
  webhook-create.schema:
1315
1418
  description: Webhook create.
1316
1419
  properties:
@@ -1935,6 +2038,55 @@ paths:
1935
2038
  tags:
1936
2039
  - Customer portal
1937
2040
  summary: Customer portal
2041
+ /stores/{storeId}/customer-subscriptions:
2042
+ description: Update customer subscription preferences for marketing and transactional messages.
2043
+ post:
2044
+ description: Update customer subscription status for SMS and email marketing and transactional messages.
2045
+ operationId: updateCustomerSubscriptions
2046
+ parameters:
2047
+ - $ref: '#/components/parameters/store-id.param'
2048
+ requestBody:
2049
+ content:
2050
+ application/json:
2051
+ schema:
2052
+ properties:
2053
+ email:
2054
+ $ref: '#/components/schemas/customer-subscription-email.schema'
2055
+ sms:
2056
+ $ref: '#/components/schemas/customer-subscription-sms.schema'
2057
+ type: object
2058
+ required: true
2059
+ responses:
2060
+ '200':
2061
+ content:
2062
+ application/json:
2063
+ schema:
2064
+ $ref: '#/components/schemas/customer-subscription-update-response.schema'
2065
+ description: Success
2066
+ '400':
2067
+ content:
2068
+ application/problem+json:
2069
+ schema:
2070
+ $ref: '#/components/schemas/error.schema'
2071
+ description: Bad Request
2072
+ '500':
2073
+ content:
2074
+ application/problem+json:
2075
+ schema:
2076
+ $ref: '#/components/schemas/error.schema'
2077
+ description: Internal Server Error
2078
+ default:
2079
+ content:
2080
+ application/problem+json:
2081
+ schema:
2082
+ $ref: '#/components/schemas/error.schema'
2083
+ description: Error
2084
+ security:
2085
+ - Bearer: []
2086
+ summary: Update customer subscriptions
2087
+ tags:
2088
+ - Customer Subscriptions
2089
+ summary: Customer subscriptions
1938
2090
  /stores/{storeId}/invoices:
1939
2091
  description: Return a list of invoices.
1940
2092
  get:
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  ]
32
32
  }
33
33
  },
34
- "version": "2.2.190"
34
+ "version": "2.2.194"
35
35
  }