@redotech/redo-api-schema 2.2.245 → 2.2.320
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 +118 -0
- package/lib/openapi.yaml +129 -0
- package/package.json +1 -1
package/lib/openapi.d.ts
CHANGED
|
@@ -121,6 +121,24 @@ export interface paths {
|
|
|
121
121
|
*/
|
|
122
122
|
post: operations["Customer subscriptions update"];
|
|
123
123
|
};
|
|
124
|
+
"/stores/{storeId}/events": {
|
|
125
|
+
/**
|
|
126
|
+
* Create custom event
|
|
127
|
+
* @description Create a custom event to trigger flows with merchant-defined event names and properties.
|
|
128
|
+
*
|
|
129
|
+
* Custom events allow merchants to trigger flows based on events from their own systems.
|
|
130
|
+
* Events can include custom properties that are accessible in email and SMS templates.
|
|
131
|
+
*
|
|
132
|
+
* ## Customer Matching
|
|
133
|
+
* The API matches customers by email or phone number. At least one must be provided.
|
|
134
|
+
*
|
|
135
|
+
* If no matching customer is found, the request will fail with a 404 error.
|
|
136
|
+
*
|
|
137
|
+
* ## Rate Limiting
|
|
138
|
+
* This endpoint is rate-limited to 100 requests per second per store.
|
|
139
|
+
*/
|
|
140
|
+
post: operations["Custom event create"];
|
|
141
|
+
};
|
|
124
142
|
"/stores/{storeId}/invoices": {
|
|
125
143
|
/**
|
|
126
144
|
* List Invoices
|
|
@@ -325,6 +343,42 @@ export interface components {
|
|
|
325
343
|
*/
|
|
326
344
|
price: components["schemas"]["money.schema"];
|
|
327
345
|
};
|
|
346
|
+
/**
|
|
347
|
+
* Custom Event Request
|
|
348
|
+
* @description Custom event to trigger flows with merchant-defined event names and properties.
|
|
349
|
+
*/
|
|
350
|
+
"custom-event-request.schema": {
|
|
351
|
+
/** @description Customer email address (one of email or phone is required). */
|
|
352
|
+
email?: string;
|
|
353
|
+
/** @description The name of the custom event (e.g., 'user_registered', 'purchase_completed'). */
|
|
354
|
+
event_name: string;
|
|
355
|
+
/**
|
|
356
|
+
* Format: date-time
|
|
357
|
+
* @description ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
|
|
358
|
+
*/
|
|
359
|
+
event_timestamp?: string;
|
|
360
|
+
/** @description Customer phone number (one of email or phone is required). */
|
|
361
|
+
phone?: string;
|
|
362
|
+
/** @description Custom properties for this event. Access in templates using dot notation (e.g., {{ properties.product_name }}). */
|
|
363
|
+
properties?: {
|
|
364
|
+
[key: string]: unknown;
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
/**
|
|
368
|
+
* Custom Event Response
|
|
369
|
+
* @description Response after successfully creating a custom event.
|
|
370
|
+
*/
|
|
371
|
+
"custom-event-response.schema": {
|
|
372
|
+
/** @description The unique identifier for the created event. */
|
|
373
|
+
event_id: string;
|
|
374
|
+
/** @description The name of the custom event that was created. */
|
|
375
|
+
event_name: string;
|
|
376
|
+
/**
|
|
377
|
+
* @description Status of the event processing.
|
|
378
|
+
* @enum {string}
|
|
379
|
+
*/
|
|
380
|
+
status: "processed";
|
|
381
|
+
};
|
|
328
382
|
/** @description Email subscription updates */
|
|
329
383
|
"customer-subscription-email.schema": {
|
|
330
384
|
/**
|
|
@@ -913,6 +967,11 @@ export interface components {
|
|
|
913
967
|
* @description Carrier code
|
|
914
968
|
*/
|
|
915
969
|
carrier?: string;
|
|
970
|
+
/**
|
|
971
|
+
* Postage Label
|
|
972
|
+
* @description Postage label URL
|
|
973
|
+
*/
|
|
974
|
+
postageLabel?: string;
|
|
916
975
|
/**
|
|
917
976
|
* Status
|
|
918
977
|
* @description Status of shipment
|
|
@@ -1862,6 +1921,65 @@ export interface operations {
|
|
|
1862
1921
|
};
|
|
1863
1922
|
};
|
|
1864
1923
|
};
|
|
1924
|
+
/**
|
|
1925
|
+
* Create custom event
|
|
1926
|
+
* @description Create a custom event to trigger flows with merchant-defined event names and properties.
|
|
1927
|
+
*
|
|
1928
|
+
* Custom events allow merchants to trigger flows based on events from their own systems.
|
|
1929
|
+
* Events can include custom properties that are accessible in email and SMS templates.
|
|
1930
|
+
*
|
|
1931
|
+
* ## Customer Matching
|
|
1932
|
+
* The API matches customers by email or phone number. At least one must be provided.
|
|
1933
|
+
*
|
|
1934
|
+
* If no matching customer is found, the request will fail with a 404 error.
|
|
1935
|
+
*
|
|
1936
|
+
* ## Rate Limiting
|
|
1937
|
+
* This endpoint is rate-limited to 100 requests per second per store.
|
|
1938
|
+
*/
|
|
1939
|
+
"Custom event create": {
|
|
1940
|
+
parameters: {
|
|
1941
|
+
path: {
|
|
1942
|
+
storeId: components["parameters"]["store-id.param"];
|
|
1943
|
+
};
|
|
1944
|
+
};
|
|
1945
|
+
requestBody: {
|
|
1946
|
+
content: {
|
|
1947
|
+
"application/json": components["schemas"]["custom-event-request.schema"];
|
|
1948
|
+
};
|
|
1949
|
+
};
|
|
1950
|
+
responses: {
|
|
1951
|
+
/** @description Event created successfully */
|
|
1952
|
+
200: {
|
|
1953
|
+
content: {
|
|
1954
|
+
"application/json": components["schemas"]["custom-event-response.schema"];
|
|
1955
|
+
};
|
|
1956
|
+
};
|
|
1957
|
+
/** @description Invalid request body or missing required customer identifier */
|
|
1958
|
+
400: {
|
|
1959
|
+
content: {
|
|
1960
|
+
"application/json": components["schemas"]["error.schema"];
|
|
1961
|
+
};
|
|
1962
|
+
};
|
|
1963
|
+
/** @description Customer not found with provided identifier */
|
|
1964
|
+
404: {
|
|
1965
|
+
content: {
|
|
1966
|
+
"application/json": components["schemas"]["error.schema"];
|
|
1967
|
+
};
|
|
1968
|
+
};
|
|
1969
|
+
/** @description Rate limit exceeded */
|
|
1970
|
+
429: {
|
|
1971
|
+
content: {
|
|
1972
|
+
"application/json": components["schemas"]["error.schema"];
|
|
1973
|
+
};
|
|
1974
|
+
};
|
|
1975
|
+
/** @description Error */
|
|
1976
|
+
default: {
|
|
1977
|
+
content: {
|
|
1978
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
1979
|
+
};
|
|
1980
|
+
};
|
|
1981
|
+
};
|
|
1982
|
+
};
|
|
1865
1983
|
/**
|
|
1866
1984
|
* List Invoices
|
|
1867
1985
|
* @description Get a list of invoices.
|
package/lib/openapi.yaml
CHANGED
|
@@ -217,6 +217,52 @@ components:
|
|
|
217
217
|
- price
|
|
218
218
|
title: Coverage product
|
|
219
219
|
type: object
|
|
220
|
+
custom-event-request.schema:
|
|
221
|
+
additionalProperties: false
|
|
222
|
+
description: Custom event to trigger flows with merchant-defined event names and properties.
|
|
223
|
+
properties:
|
|
224
|
+
email:
|
|
225
|
+
description: Customer email address (one of email or phone is required).
|
|
226
|
+
type: string
|
|
227
|
+
event_name:
|
|
228
|
+
description: The name of the custom event (e.g., 'user_registered', 'purchase_completed').
|
|
229
|
+
type: string
|
|
230
|
+
event_timestamp:
|
|
231
|
+
description: ISO 8601 timestamp when the event occurred. Defaults to current time if not provided.
|
|
232
|
+
format: date-time
|
|
233
|
+
type: string
|
|
234
|
+
phone:
|
|
235
|
+
description: Customer phone number (one of email or phone is required).
|
|
236
|
+
type: string
|
|
237
|
+
properties:
|
|
238
|
+
additionalProperties: true
|
|
239
|
+
description: Custom properties for this event. Access in templates using dot notation (e.g., {{ properties.product_name }}).
|
|
240
|
+
type: object
|
|
241
|
+
required:
|
|
242
|
+
- event_name
|
|
243
|
+
title: Custom Event Request
|
|
244
|
+
type: object
|
|
245
|
+
custom-event-response.schema:
|
|
246
|
+
additionalProperties: false
|
|
247
|
+
description: Response after successfully creating a custom event.
|
|
248
|
+
properties:
|
|
249
|
+
event_id:
|
|
250
|
+
description: The unique identifier for the created event.
|
|
251
|
+
type: string
|
|
252
|
+
event_name:
|
|
253
|
+
description: The name of the custom event that was created.
|
|
254
|
+
type: string
|
|
255
|
+
status:
|
|
256
|
+
description: Status of the event processing.
|
|
257
|
+
enum:
|
|
258
|
+
- processed
|
|
259
|
+
type: string
|
|
260
|
+
required:
|
|
261
|
+
- event_id
|
|
262
|
+
- status
|
|
263
|
+
- event_name
|
|
264
|
+
title: Custom Event Response
|
|
265
|
+
type: object
|
|
220
266
|
customer-subscription-email.schema:
|
|
221
267
|
description: Email subscription updates
|
|
222
268
|
properties:
|
|
@@ -991,6 +1037,10 @@ components:
|
|
|
991
1037
|
description: Carrier code
|
|
992
1038
|
title: Carrier
|
|
993
1039
|
type: string
|
|
1040
|
+
postageLabel:
|
|
1041
|
+
description: Postage label URL
|
|
1042
|
+
title: Postage Label
|
|
1043
|
+
type: string
|
|
994
1044
|
status:
|
|
995
1045
|
description: Status of shipment
|
|
996
1046
|
enum:
|
|
@@ -2087,6 +2137,85 @@ paths:
|
|
|
2087
2137
|
tags:
|
|
2088
2138
|
- Customer Subscriptions
|
|
2089
2139
|
summary: Customer subscriptions
|
|
2140
|
+
/stores/{storeId}/events:
|
|
2141
|
+
post:
|
|
2142
|
+
description: |
|
|
2143
|
+
Create a custom event to trigger flows with merchant-defined event names and properties.
|
|
2144
|
+
|
|
2145
|
+
Custom events allow merchants to trigger flows based on events from their own systems.
|
|
2146
|
+
Events can include custom properties that are accessible in email and SMS templates.
|
|
2147
|
+
|
|
2148
|
+
## Customer Matching
|
|
2149
|
+
The API matches customers by email or phone number. At least one must be provided.
|
|
2150
|
+
|
|
2151
|
+
If no matching customer is found, the request will fail with a 404 error.
|
|
2152
|
+
|
|
2153
|
+
## Rate Limiting
|
|
2154
|
+
This endpoint is rate-limited to 100 requests per second per store.
|
|
2155
|
+
operationId: Custom event create
|
|
2156
|
+
parameters:
|
|
2157
|
+
- $ref: '#/components/parameters/store-id.param'
|
|
2158
|
+
requestBody:
|
|
2159
|
+
content:
|
|
2160
|
+
application/json:
|
|
2161
|
+
examples:
|
|
2162
|
+
purchase_milestone:
|
|
2163
|
+
summary: Purchase milestone event
|
|
2164
|
+
value:
|
|
2165
|
+
event_name: purchase_milestone_reached
|
|
2166
|
+
phone: '+12065551234'
|
|
2167
|
+
properties:
|
|
2168
|
+
milestone_type: 100th_purchase
|
|
2169
|
+
total_spent: 5000
|
|
2170
|
+
vip_tier: gold
|
|
2171
|
+
user_registered:
|
|
2172
|
+
summary: User registration event
|
|
2173
|
+
value:
|
|
2174
|
+
email: customer@example.com
|
|
2175
|
+
event_name: user_registered
|
|
2176
|
+
properties:
|
|
2177
|
+
plan_type: premium
|
|
2178
|
+
referral_code: FRIEND123
|
|
2179
|
+
source: mobile_app
|
|
2180
|
+
schema:
|
|
2181
|
+
$ref: '#/components/schemas/custom-event-request.schema'
|
|
2182
|
+
required: true
|
|
2183
|
+
responses:
|
|
2184
|
+
'200':
|
|
2185
|
+
content:
|
|
2186
|
+
application/json:
|
|
2187
|
+
schema:
|
|
2188
|
+
$ref: '#/components/schemas/custom-event-response.schema'
|
|
2189
|
+
description: Event created successfully
|
|
2190
|
+
'400':
|
|
2191
|
+
content:
|
|
2192
|
+
application/json:
|
|
2193
|
+
schema:
|
|
2194
|
+
$ref: '#/components/schemas/error.schema'
|
|
2195
|
+
description: Invalid request body or missing required customer identifier
|
|
2196
|
+
'404':
|
|
2197
|
+
content:
|
|
2198
|
+
application/json:
|
|
2199
|
+
schema:
|
|
2200
|
+
$ref: '#/components/schemas/error.schema'
|
|
2201
|
+
description: Customer not found with provided identifier
|
|
2202
|
+
'429':
|
|
2203
|
+
content:
|
|
2204
|
+
application/json:
|
|
2205
|
+
schema:
|
|
2206
|
+
$ref: '#/components/schemas/error.schema'
|
|
2207
|
+
description: Rate limit exceeded
|
|
2208
|
+
default:
|
|
2209
|
+
content:
|
|
2210
|
+
application/problem+json:
|
|
2211
|
+
schema:
|
|
2212
|
+
$ref: '#/components/schemas/error.schema'
|
|
2213
|
+
description: Error
|
|
2214
|
+
security:
|
|
2215
|
+
- Bearer: []
|
|
2216
|
+
summary: Create custom event
|
|
2217
|
+
tags:
|
|
2218
|
+
- Custom Events
|
|
2090
2219
|
/stores/{storeId}/invoices:
|
|
2091
2220
|
description: Return a list of invoices.
|
|
2092
2221
|
get:
|
package/package.json
CHANGED