@redotech/redo-api-schema 2.2.405 → 2.2.416
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 +255 -0
- package/lib/openapi.yaml +2606 -2241
- package/package.json +1 -1
package/lib/openapi.d.ts
CHANGED
|
@@ -121,6 +121,39 @@ export interface paths {
|
|
|
121
121
|
*/
|
|
122
122
|
post: operations["Customer subscriptions update"];
|
|
123
123
|
};
|
|
124
|
+
"/stores/{storeId}/customers": {
|
|
125
|
+
/**
|
|
126
|
+
* Get customer by email
|
|
127
|
+
* @description Retrieve a customer profile by email address.
|
|
128
|
+
*
|
|
129
|
+
* The response includes the customer's name, contact information, location,
|
|
130
|
+
* and any custom fields associated with the profile. Custom fields are returned
|
|
131
|
+
* as `{ fieldName: value }` pairs.
|
|
132
|
+
*/
|
|
133
|
+
get: operations["Customer get"];
|
|
134
|
+
/**
|
|
135
|
+
* Create or update customer
|
|
136
|
+
* @description Create or update a customer profile. Uses the email address as the upsert
|
|
137
|
+
* key — if a customer with that email exists, their profile is updated;
|
|
138
|
+
* otherwise, a new customer is created.
|
|
139
|
+
*
|
|
140
|
+
* ## Profile fields
|
|
141
|
+
* - `firstName` and `lastName` are set directly on the customer. A full
|
|
142
|
+
* display name is automatically generated from these fields.
|
|
143
|
+
* - `phoneNumber` should be in E.164 format (e.g., `+12345678900`). If the
|
|
144
|
+
* number is new, it is added to the customer's contact information.
|
|
145
|
+
*
|
|
146
|
+
* ## Location
|
|
147
|
+
* Providing `location` sets the customer's current location. Only the fields
|
|
148
|
+
* you include are updated.
|
|
149
|
+
*
|
|
150
|
+
* ## Custom fields
|
|
151
|
+
* Use `customFields` to store arbitrary key-value data on the customer (e.g.,
|
|
152
|
+
* `pricing_plan`, `subscription_source`). Values can be strings, numbers, or
|
|
153
|
+
* booleans. If a custom field doesn't exist yet, it is created automatically.
|
|
154
|
+
*/
|
|
155
|
+
put: operations["Customer upsert"];
|
|
156
|
+
};
|
|
124
157
|
"/stores/{storeId}/events": {
|
|
125
158
|
/**
|
|
126
159
|
* Create custom event
|
|
@@ -343,6 +376,70 @@ export interface components {
|
|
|
343
376
|
*/
|
|
344
377
|
status: "processed";
|
|
345
378
|
};
|
|
379
|
+
/**
|
|
380
|
+
* Customer Location
|
|
381
|
+
* @description Customer location information.
|
|
382
|
+
*/
|
|
383
|
+
"customer-location.schema": {
|
|
384
|
+
/** @description City name */
|
|
385
|
+
city?: string;
|
|
386
|
+
/** @description Country name */
|
|
387
|
+
country?: string;
|
|
388
|
+
/** @description ISO 3166-1 alpha-2 country code */
|
|
389
|
+
countryCode?: string;
|
|
390
|
+
/** @description IANA time zone identifier */
|
|
391
|
+
ianaTimeZoneName?: string;
|
|
392
|
+
/** @description Latitude coordinate */
|
|
393
|
+
latitude?: number;
|
|
394
|
+
/** @description Longitude coordinate */
|
|
395
|
+
longitude?: number;
|
|
396
|
+
/** @description Postal or ZIP code */
|
|
397
|
+
postalCode?: string;
|
|
398
|
+
/** @description State or province name */
|
|
399
|
+
state?: string;
|
|
400
|
+
/** @description State or province abbreviation */
|
|
401
|
+
stateCode?: string;
|
|
402
|
+
/** @description Street address line 1 */
|
|
403
|
+
street1?: string;
|
|
404
|
+
/** @description Street address line 2 */
|
|
405
|
+
street2?: string;
|
|
406
|
+
};
|
|
407
|
+
/**
|
|
408
|
+
* Customer
|
|
409
|
+
* @description Customer profile.
|
|
410
|
+
*/
|
|
411
|
+
"customer-read.schema": {
|
|
412
|
+
/**
|
|
413
|
+
* Created at
|
|
414
|
+
* Format: date-time
|
|
415
|
+
* @description Timestamp when the customer was created.
|
|
416
|
+
*/
|
|
417
|
+
createdAt: string;
|
|
418
|
+
/** @description Custom field values as key-value pairs, where keys are field names and values can be strings, numbers, or booleans. */
|
|
419
|
+
customFields?: {
|
|
420
|
+
[key: string]: string | number | boolean;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* Format: email
|
|
424
|
+
* @description Customer email address
|
|
425
|
+
*/
|
|
426
|
+
email: string;
|
|
427
|
+
/** @description Customer first name */
|
|
428
|
+
firstName?: string;
|
|
429
|
+
/** @description Redo customer ID */
|
|
430
|
+
id: string;
|
|
431
|
+
/** @description Customer last name */
|
|
432
|
+
lastName?: string;
|
|
433
|
+
location?: components["schemas"]["customer-location.schema"];
|
|
434
|
+
/** @description Customer phone number in E.164 format */
|
|
435
|
+
phoneNumber?: string;
|
|
436
|
+
/**
|
|
437
|
+
* Updated at
|
|
438
|
+
* Format: date-time
|
|
439
|
+
* @description Timestamp when the customer was last updated.
|
|
440
|
+
*/
|
|
441
|
+
updatedAt: string;
|
|
442
|
+
};
|
|
346
443
|
/** @description Email subscription updates */
|
|
347
444
|
"customer-subscription-email.schema": {
|
|
348
445
|
/**
|
|
@@ -383,6 +480,48 @@ export interface components {
|
|
|
383
480
|
};
|
|
384
481
|
};
|
|
385
482
|
};
|
|
483
|
+
/**
|
|
484
|
+
* Customer Upsert Request
|
|
485
|
+
* @description Request body for creating or updating a customer profile. The email address is used as the upsert key.
|
|
486
|
+
*/
|
|
487
|
+
"customer-upsert-request.schema": {
|
|
488
|
+
/**
|
|
489
|
+
* @description Custom field values as key-value pairs. Keys are field names and values can be strings, numbers, or booleans. New fields are created automatically if they don't exist yet.
|
|
490
|
+
* @example {
|
|
491
|
+
* "subscription_source": "web",
|
|
492
|
+
* "status": "Active",
|
|
493
|
+
* "loyalty_points": 1250,
|
|
494
|
+
* "vip_member": true
|
|
495
|
+
* }
|
|
496
|
+
*/
|
|
497
|
+
customFields?: {
|
|
498
|
+
[key: string]: string | number | boolean;
|
|
499
|
+
};
|
|
500
|
+
/**
|
|
501
|
+
* Format: email
|
|
502
|
+
* @description Customer email address. Used as the upsert key to find or create the customer.
|
|
503
|
+
*/
|
|
504
|
+
email: string;
|
|
505
|
+
/** @description Customer first name */
|
|
506
|
+
firstName?: string;
|
|
507
|
+
/** @description Customer last name */
|
|
508
|
+
lastName?: string;
|
|
509
|
+
location?: components["schemas"]["customer-location.schema"];
|
|
510
|
+
/** @description Customer phone number in E.164 format (e.g., +12345678900). Appended to the existing phone list if not already present. */
|
|
511
|
+
phoneNumber?: string;
|
|
512
|
+
};
|
|
513
|
+
/**
|
|
514
|
+
* Customer Upsert Response
|
|
515
|
+
* @description Response after creating or updating a customer profile.
|
|
516
|
+
*/
|
|
517
|
+
"customer-upsert-response.schema": {
|
|
518
|
+
/** @description Whether a new customer was created (true) or an existing customer was updated (false). */
|
|
519
|
+
created: boolean;
|
|
520
|
+
/** @description Customer email address */
|
|
521
|
+
email: string;
|
|
522
|
+
/** @description Redo customer ID */
|
|
523
|
+
id: string;
|
|
524
|
+
};
|
|
386
525
|
/**
|
|
387
526
|
* Problem details
|
|
388
527
|
* @description Problem details. See [RFC 7807 Section 3](https://datatracker.ietf.org/doc/html/rfc7807#section-3).
|
|
@@ -1899,6 +2038,122 @@ export interface operations {
|
|
|
1899
2038
|
};
|
|
1900
2039
|
};
|
|
1901
2040
|
};
|
|
2041
|
+
/**
|
|
2042
|
+
* Get customer by email
|
|
2043
|
+
* @description Retrieve a customer profile by email address.
|
|
2044
|
+
*
|
|
2045
|
+
* The response includes the customer's name, contact information, location,
|
|
2046
|
+
* and any custom fields associated with the profile. Custom fields are returned
|
|
2047
|
+
* as `{ fieldName: value }` pairs.
|
|
2048
|
+
*/
|
|
2049
|
+
"Customer get": {
|
|
2050
|
+
parameters: {
|
|
2051
|
+
query: {
|
|
2052
|
+
/** @description Customer email address */
|
|
2053
|
+
email: string;
|
|
2054
|
+
};
|
|
2055
|
+
path: {
|
|
2056
|
+
storeId: components["parameters"]["store-id.param"];
|
|
2057
|
+
};
|
|
2058
|
+
};
|
|
2059
|
+
responses: {
|
|
2060
|
+
/** @description Customer found */
|
|
2061
|
+
200: {
|
|
2062
|
+
content: {
|
|
2063
|
+
"application/json": components["schemas"]["customer-read.schema"];
|
|
2064
|
+
};
|
|
2065
|
+
};
|
|
2066
|
+
/** @description Missing or invalid email parameter */
|
|
2067
|
+
400: {
|
|
2068
|
+
content: {
|
|
2069
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
2070
|
+
};
|
|
2071
|
+
};
|
|
2072
|
+
/** @description No customer found for that email */
|
|
2073
|
+
404: {
|
|
2074
|
+
content: {
|
|
2075
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
2076
|
+
};
|
|
2077
|
+
};
|
|
2078
|
+
/** @description Internal server error */
|
|
2079
|
+
500: {
|
|
2080
|
+
content: {
|
|
2081
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
/** @description Error */
|
|
2085
|
+
default: {
|
|
2086
|
+
content: {
|
|
2087
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
2088
|
+
};
|
|
2089
|
+
};
|
|
2090
|
+
};
|
|
2091
|
+
};
|
|
2092
|
+
/**
|
|
2093
|
+
* Create or update customer
|
|
2094
|
+
* @description Create or update a customer profile. Uses the email address as the upsert
|
|
2095
|
+
* key — if a customer with that email exists, their profile is updated;
|
|
2096
|
+
* otherwise, a new customer is created.
|
|
2097
|
+
*
|
|
2098
|
+
* ## Profile fields
|
|
2099
|
+
* - `firstName` and `lastName` are set directly on the customer. A full
|
|
2100
|
+
* display name is automatically generated from these fields.
|
|
2101
|
+
* - `phoneNumber` should be in E.164 format (e.g., `+12345678900`). If the
|
|
2102
|
+
* number is new, it is added to the customer's contact information.
|
|
2103
|
+
*
|
|
2104
|
+
* ## Location
|
|
2105
|
+
* Providing `location` sets the customer's current location. Only the fields
|
|
2106
|
+
* you include are updated.
|
|
2107
|
+
*
|
|
2108
|
+
* ## Custom fields
|
|
2109
|
+
* Use `customFields` to store arbitrary key-value data on the customer (e.g.,
|
|
2110
|
+
* `pricing_plan`, `subscription_source`). Values can be strings, numbers, or
|
|
2111
|
+
* booleans. If a custom field doesn't exist yet, it is created automatically.
|
|
2112
|
+
*/
|
|
2113
|
+
"Customer upsert": {
|
|
2114
|
+
parameters: {
|
|
2115
|
+
path: {
|
|
2116
|
+
storeId: components["parameters"]["store-id.param"];
|
|
2117
|
+
};
|
|
2118
|
+
};
|
|
2119
|
+
requestBody: {
|
|
2120
|
+
content: {
|
|
2121
|
+
"application/json": components["schemas"]["customer-upsert-request.schema"];
|
|
2122
|
+
};
|
|
2123
|
+
};
|
|
2124
|
+
responses: {
|
|
2125
|
+
/** @description Existing customer updated */
|
|
2126
|
+
200: {
|
|
2127
|
+
content: {
|
|
2128
|
+
"application/json": components["schemas"]["customer-upsert-response.schema"];
|
|
2129
|
+
};
|
|
2130
|
+
};
|
|
2131
|
+
/** @description New customer created */
|
|
2132
|
+
201: {
|
|
2133
|
+
content: {
|
|
2134
|
+
"application/json": components["schemas"]["customer-upsert-response.schema"];
|
|
2135
|
+
};
|
|
2136
|
+
};
|
|
2137
|
+
/** @description Invalid request body or invalid email address */
|
|
2138
|
+
400: {
|
|
2139
|
+
content: {
|
|
2140
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
2141
|
+
};
|
|
2142
|
+
};
|
|
2143
|
+
/** @description Internal server error */
|
|
2144
|
+
500: {
|
|
2145
|
+
content: {
|
|
2146
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
2147
|
+
};
|
|
2148
|
+
};
|
|
2149
|
+
/** @description Error */
|
|
2150
|
+
default: {
|
|
2151
|
+
content: {
|
|
2152
|
+
"application/problem+json": components["schemas"]["error.schema"];
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2156
|
+
};
|
|
1902
2157
|
/**
|
|
1903
2158
|
* Create custom event
|
|
1904
2159
|
* @description Create a custom event to trigger flows with merchant-defined event names and properties.
|