@redotech/redo-api-schema 2.2.187 → 2.2.192
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 +129 -0
- package/lib/openapi.yaml +168 -0
- package/package.json +1 -1
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
|
+
patch: 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.
|
|
@@ -1279,10 +1357,14 @@ export interface components {
|
|
|
1279
1357
|
* @example 20
|
|
1280
1358
|
*/
|
|
1281
1359
|
"page-size.param"?: number;
|
|
1360
|
+
/** @description Provider specific order name */
|
|
1361
|
+
"provider-order-name"?: string;
|
|
1282
1362
|
/** @description Return ID */
|
|
1283
1363
|
"return-id.param": string;
|
|
1284
1364
|
/** @description Shipment ID */
|
|
1285
1365
|
"shipment-id.param": string;
|
|
1366
|
+
/** @description Shopify specific order name */
|
|
1367
|
+
"shopify-order-name"?: string;
|
|
1286
1368
|
/** @description Store ID */
|
|
1287
1369
|
"store-id.param": string;
|
|
1288
1370
|
/**
|
|
@@ -1734,6 +1816,51 @@ export interface operations {
|
|
|
1734
1816
|
};
|
|
1735
1817
|
};
|
|
1736
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
|
+
};
|
|
1737
1864
|
/**
|
|
1738
1865
|
* Get invoice
|
|
1739
1866
|
* @description Get a list of invoices.
|
|
@@ -1770,6 +1897,8 @@ export interface operations {
|
|
|
1770
1897
|
query?: {
|
|
1771
1898
|
updated_at_max?: components["parameters"]["updated-at-max.param"];
|
|
1772
1899
|
updated_at_min?: components["parameters"]["updated-at-min.param"];
|
|
1900
|
+
shopify_order_name?: components["parameters"]["shopify-order-name"];
|
|
1901
|
+
provider_order_name?: components["parameters"]["provider-order-name"];
|
|
1773
1902
|
};
|
|
1774
1903
|
header?: {
|
|
1775
1904
|
"X-Page-Continue"?: components["parameters"]["page-continue.param"];
|
package/lib/openapi.yaml
CHANGED
|
@@ -36,6 +36,13 @@ components:
|
|
|
36
36
|
maximum: 500
|
|
37
37
|
minimum: 1
|
|
38
38
|
type: integer
|
|
39
|
+
provider-order-name:
|
|
40
|
+
description: Provider specific order name
|
|
41
|
+
in: query
|
|
42
|
+
name: provider_order_name
|
|
43
|
+
schema:
|
|
44
|
+
example: XYZ1025
|
|
45
|
+
type: string
|
|
39
46
|
return-id.param:
|
|
40
47
|
description: Return ID
|
|
41
48
|
in: path
|
|
@@ -52,6 +59,13 @@ components:
|
|
|
52
59
|
schema:
|
|
53
60
|
example: 67c7e87a2c8c262c0ddc9861
|
|
54
61
|
type: string
|
|
62
|
+
shopify-order-name:
|
|
63
|
+
description: Shopify specific order name
|
|
64
|
+
in: query
|
|
65
|
+
name: shopify_order_name
|
|
66
|
+
schema:
|
|
67
|
+
example: XYZ1025
|
|
68
|
+
type: string
|
|
55
69
|
store-id.param:
|
|
56
70
|
description: Store ID
|
|
57
71
|
in: path
|
|
@@ -203,6 +217,72 @@ components:
|
|
|
203
217
|
- price
|
|
204
218
|
title: Coverage product
|
|
205
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
|
|
206
286
|
error.schema:
|
|
207
287
|
description: Problem details. See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
|
|
208
288
|
properties:
|
|
@@ -1297,6 +1377,43 @@ components:
|
|
|
1297
1377
|
- source
|
|
1298
1378
|
title: Storefront Event
|
|
1299
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
|
|
1300
1417
|
webhook-create.schema:
|
|
1301
1418
|
description: Webhook create.
|
|
1302
1419
|
properties:
|
|
@@ -1921,6 +2038,55 @@ paths:
|
|
|
1921
2038
|
tags:
|
|
1922
2039
|
- Customer portal
|
|
1923
2040
|
summary: Customer portal
|
|
2041
|
+
/stores/{storeId}/customer-subscriptions:
|
|
2042
|
+
description: Update customer subscription preferences for marketing and transactional messages.
|
|
2043
|
+
patch:
|
|
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
|
|
1924
2090
|
/stores/{storeId}/invoices:
|
|
1925
2091
|
description: Return a list of invoices.
|
|
1926
2092
|
get:
|
|
@@ -1964,6 +2130,8 @@ paths:
|
|
|
1964
2130
|
- $ref: '#/components/parameters/page-size.param'
|
|
1965
2131
|
- $ref: '#/components/parameters/updated-at-max.param'
|
|
1966
2132
|
- $ref: '#/components/parameters/updated-at-min.param'
|
|
2133
|
+
- $ref: '#/components/parameters/shopify-order-name'
|
|
2134
|
+
- $ref: '#/components/parameters/provider-order-name'
|
|
1967
2135
|
responses:
|
|
1968
2136
|
'200':
|
|
1969
2137
|
content:
|
package/package.json
CHANGED