@omni-commerce/sdk 0.1.0 → 0.2.0
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/dist/index.cjs +230 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3248 -337
- package/dist/index.d.ts +3248 -337
- package/dist/index.js +230 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -231,6 +231,68 @@ interface paths {
|
|
|
231
231
|
patch?: never;
|
|
232
232
|
trace?: never;
|
|
233
233
|
};
|
|
234
|
+
"/api/v1/agents/general/invoke": {
|
|
235
|
+
parameters: {
|
|
236
|
+
query?: never;
|
|
237
|
+
header?: never;
|
|
238
|
+
path?: never;
|
|
239
|
+
cookie?: never;
|
|
240
|
+
};
|
|
241
|
+
get?: never;
|
|
242
|
+
put?: never;
|
|
243
|
+
/**
|
|
244
|
+
* Invoke the Omni agent
|
|
245
|
+
* @description Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
|
|
246
|
+
*
|
|
247
|
+
* A waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run. Omit `config.enabled_tools` to use the organization's agent tools. Attach images on the latest user message as `{ type: "image", url }` HTTP(S) URLs.
|
|
248
|
+
*/
|
|
249
|
+
post: operations["post_v1_agents_general_invoke"];
|
|
250
|
+
delete?: never;
|
|
251
|
+
options?: never;
|
|
252
|
+
head?: never;
|
|
253
|
+
patch?: never;
|
|
254
|
+
trace?: never;
|
|
255
|
+
};
|
|
256
|
+
"/api/v1/agents/general/runs": {
|
|
257
|
+
parameters: {
|
|
258
|
+
query?: never;
|
|
259
|
+
header?: never;
|
|
260
|
+
path?: never;
|
|
261
|
+
cookie?: never;
|
|
262
|
+
};
|
|
263
|
+
get?: never;
|
|
264
|
+
put?: never;
|
|
265
|
+
/**
|
|
266
|
+
* Start an Omni agent run
|
|
267
|
+
* @description Queue the general Omni agent and return immediately with the run in `queued` state. Poll the URL in the `Location` header (`GET /api/v1/agents/general/runs/{runId}`), honoring `Retry-After`. Requires `agents:invoke`. The request body matches invoke.
|
|
268
|
+
*/
|
|
269
|
+
post: operations["post_v1_agents_general_runs"];
|
|
270
|
+
delete?: never;
|
|
271
|
+
options?: never;
|
|
272
|
+
head?: never;
|
|
273
|
+
patch?: never;
|
|
274
|
+
trace?: never;
|
|
275
|
+
};
|
|
276
|
+
"/api/v1/agents/general/runs/{runId}": {
|
|
277
|
+
parameters: {
|
|
278
|
+
query?: never;
|
|
279
|
+
header?: never;
|
|
280
|
+
path?: never;
|
|
281
|
+
cookie?: never;
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* Get an Omni agent run
|
|
285
|
+
* @description Read a queued, running, completed, paused, or failed Omni agent run. Requires `agents:invoke`.
|
|
286
|
+
*/
|
|
287
|
+
get: operations["get_v1_agents_general_runs_by_runid"];
|
|
288
|
+
put?: never;
|
|
289
|
+
post?: never;
|
|
290
|
+
delete?: never;
|
|
291
|
+
options?: never;
|
|
292
|
+
head?: never;
|
|
293
|
+
patch?: never;
|
|
294
|
+
trace?: never;
|
|
295
|
+
};
|
|
234
296
|
"/api/v1/aop/{aopId}/config": {
|
|
235
297
|
parameters: {
|
|
236
298
|
query?: never;
|
|
@@ -315,6 +377,134 @@ interface paths {
|
|
|
315
377
|
patch?: never;
|
|
316
378
|
trace?: never;
|
|
317
379
|
};
|
|
380
|
+
"/api/v1/campaigns": {
|
|
381
|
+
parameters: {
|
|
382
|
+
query?: never;
|
|
383
|
+
header?: never;
|
|
384
|
+
path?: never;
|
|
385
|
+
cookie?: never;
|
|
386
|
+
};
|
|
387
|
+
/**
|
|
388
|
+
* List Campaigns
|
|
389
|
+
* @description List campaigns for the authenticated organization. `stage=all` is the workspace working set: draft and running. Requires `promotions:read`.
|
|
390
|
+
*/
|
|
391
|
+
get: operations["get_v1_campaigns"];
|
|
392
|
+
put?: never;
|
|
393
|
+
/**
|
|
394
|
+
* Create Campaign
|
|
395
|
+
* @description Create a draft campaign. `ownerId` and `approverId` must be members of the organization, and every store must already be connected. Requires `promotions:write`.
|
|
396
|
+
*/
|
|
397
|
+
post: operations["post_v1_campaigns"];
|
|
398
|
+
delete?: never;
|
|
399
|
+
options?: never;
|
|
400
|
+
head?: never;
|
|
401
|
+
patch?: never;
|
|
402
|
+
trace?: never;
|
|
403
|
+
};
|
|
404
|
+
"/api/v1/campaigns/{campaignId}": {
|
|
405
|
+
parameters: {
|
|
406
|
+
query?: never;
|
|
407
|
+
header?: never;
|
|
408
|
+
path?: never;
|
|
409
|
+
cookie?: never;
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Get Campaign
|
|
413
|
+
* @description Read one campaign, including its plan, executions, audit, schedule, and progress. Requires `promotions:read`.
|
|
414
|
+
*/
|
|
415
|
+
get: operations["get_v1_campaigns_by_campaignid"];
|
|
416
|
+
/**
|
|
417
|
+
* Update Campaign
|
|
418
|
+
* @description Replace a draft or approved plan, or propose one change to a running plan. Send `expectedRevision` from the last read. Requires `promotions:write`.
|
|
419
|
+
*/
|
|
420
|
+
put: operations["put_v1_campaigns_by_campaignid"];
|
|
421
|
+
post?: never;
|
|
422
|
+
delete?: never;
|
|
423
|
+
options?: never;
|
|
424
|
+
head?: never;
|
|
425
|
+
patch?: never;
|
|
426
|
+
trace?: never;
|
|
427
|
+
};
|
|
428
|
+
"/api/v1/campaigns/{campaignId}/actions": {
|
|
429
|
+
parameters: {
|
|
430
|
+
query?: never;
|
|
431
|
+
header?: never;
|
|
432
|
+
path?: never;
|
|
433
|
+
cookie?: never;
|
|
434
|
+
};
|
|
435
|
+
get?: never;
|
|
436
|
+
put?: never;
|
|
437
|
+
/**
|
|
438
|
+
* Act on Campaign
|
|
439
|
+
* @description Approve, start, end, resume, retry, or decide a proposed live change. Approve, run, resume, and approving a change must be called by the named approver. Requires `promotions:write`.
|
|
440
|
+
*/
|
|
441
|
+
post: operations["post_v1_campaigns_by_campaignid_actions"];
|
|
442
|
+
delete?: never;
|
|
443
|
+
options?: never;
|
|
444
|
+
head?: never;
|
|
445
|
+
patch?: never;
|
|
446
|
+
trace?: never;
|
|
447
|
+
};
|
|
448
|
+
"/api/v1/campaigns/archive": {
|
|
449
|
+
parameters: {
|
|
450
|
+
query?: never;
|
|
451
|
+
header?: never;
|
|
452
|
+
path?: never;
|
|
453
|
+
cookie?: never;
|
|
454
|
+
};
|
|
455
|
+
get?: never;
|
|
456
|
+
put?: never;
|
|
457
|
+
/**
|
|
458
|
+
* Archive Campaigns
|
|
459
|
+
* @description Archive campaigns, or restore archived campaigns by id or by the current archived list filters. Requires `promotions:write`.
|
|
460
|
+
*/
|
|
461
|
+
post: operations["post_v1_campaigns_archive"];
|
|
462
|
+
delete?: never;
|
|
463
|
+
options?: never;
|
|
464
|
+
head?: never;
|
|
465
|
+
patch?: never;
|
|
466
|
+
trace?: never;
|
|
467
|
+
};
|
|
468
|
+
"/api/v1/campaigns/delete": {
|
|
469
|
+
parameters: {
|
|
470
|
+
query?: never;
|
|
471
|
+
header?: never;
|
|
472
|
+
path?: never;
|
|
473
|
+
cookie?: never;
|
|
474
|
+
};
|
|
475
|
+
get?: never;
|
|
476
|
+
put?: never;
|
|
477
|
+
/**
|
|
478
|
+
* Delete Campaigns
|
|
479
|
+
* @description Permanently delete archived campaigns by explicit id or by archived list filters. Requires `promotions:write`.
|
|
480
|
+
*/
|
|
481
|
+
post: operations["post_v1_campaigns_delete"];
|
|
482
|
+
delete?: never;
|
|
483
|
+
options?: never;
|
|
484
|
+
head?: never;
|
|
485
|
+
patch?: never;
|
|
486
|
+
trace?: never;
|
|
487
|
+
};
|
|
488
|
+
"/api/v1/campaigns/options": {
|
|
489
|
+
parameters: {
|
|
490
|
+
query?: never;
|
|
491
|
+
header?: never;
|
|
492
|
+
path?: never;
|
|
493
|
+
cookie?: never;
|
|
494
|
+
};
|
|
495
|
+
/**
|
|
496
|
+
* Get Campaign Options
|
|
497
|
+
* @description List the organization members and connected stores a campaign plan can name. Use a member `id` for `ownerId` and `approverId`. Requires `promotions:write`.
|
|
498
|
+
*/
|
|
499
|
+
get: operations["get_v1_campaigns_options"];
|
|
500
|
+
put?: never;
|
|
501
|
+
post?: never;
|
|
502
|
+
delete?: never;
|
|
503
|
+
options?: never;
|
|
504
|
+
head?: never;
|
|
505
|
+
patch?: never;
|
|
506
|
+
trace?: never;
|
|
507
|
+
};
|
|
318
508
|
"/api/v1/catalog/items": {
|
|
319
509
|
parameters: {
|
|
320
510
|
query?: never;
|
|
@@ -918,13 +1108,15 @@ interface paths {
|
|
|
918
1108
|
};
|
|
919
1109
|
/**
|
|
920
1110
|
* List Price Book Rules
|
|
921
|
-
* @description List marketplace price book rules for the authenticated organization.
|
|
1111
|
+
* @description List marketplace price book rules for the authenticated organization. A rule applies either a buyer formula or a markup percent to the catalog price at publish time, by platform and optional store/country. Requires `price_books:read`.
|
|
922
1112
|
*/
|
|
923
1113
|
get: operations["get_v1_price_books"];
|
|
924
1114
|
put?: never;
|
|
925
1115
|
/**
|
|
926
1116
|
* Create Price Book Rule
|
|
927
|
-
* @description Create a marketplace price book rule for a platform (optional store
|
|
1117
|
+
* @description Create a marketplace price book rule for a platform (optional store and country). Does not change Omni product prices. Requires `price_books:write`.
|
|
1118
|
+
*
|
|
1119
|
+
* `expression` is the buyer formula and replaces markup percent. `price` in that formula is the catalog price, not cost price. Without an expression, `marginValue` is the markup percent.
|
|
928
1120
|
*/
|
|
929
1121
|
post: operations["post_v1_price_books"];
|
|
930
1122
|
delete?: never;
|
|
@@ -956,7 +1148,7 @@ interface paths {
|
|
|
956
1148
|
head?: never;
|
|
957
1149
|
/**
|
|
958
1150
|
* Update Price Book Rule
|
|
959
|
-
* @description Update store, country,
|
|
1151
|
+
* @description Update store, country, markup, buyer formula, rounding, currency, or enabled flag for a price book rule. Platform cannot be changed; create a new rule instead. Requires `price_books:write`.
|
|
960
1152
|
*/
|
|
961
1153
|
patch: operations["patch_v1_price_books_by_ruleid"];
|
|
962
1154
|
trace?: never;
|
|
@@ -991,6 +1183,8 @@ interface paths {
|
|
|
991
1183
|
/**
|
|
992
1184
|
* List Products
|
|
993
1185
|
* @description List products for the authenticated organization with optional filters and pagination. Authenticate with an API key or OAuth bearer token. The organization is taken from that credential; do not send `organizationId`.
|
|
1186
|
+
*
|
|
1187
|
+
* Rows are in `items`. Read catalog stock from `items[].stockQuantity`: parent rows already aggregate their non-deleted variants, and virtual bundles use component availability with any manual cap. Null means unknown, not zero. List rows do not contain `inventoryQuantity`, `inventory.quantity`, or an embedded `variants` array.
|
|
994
1188
|
*/
|
|
995
1189
|
get: operations["get_v1_products"];
|
|
996
1190
|
put?: never;
|
|
@@ -1086,7 +1280,9 @@ interface paths {
|
|
|
1086
1280
|
put?: never;
|
|
1087
1281
|
/**
|
|
1088
1282
|
* Delist Product
|
|
1089
|
-
* @description Queue delist for one product on the marketplaces you name. `marketplaces` accepts one or more of shopee, lazada, tiktok, shopify, whatsapp, zalora, amazon, and ebay. Each named marketplace must already have a listing; other channels are left untouched. Omit `marketplaces` to delist every existing listing. This does not delete the OmniCommerce product.
|
|
1283
|
+
* @description Queue delist for one product on the marketplaces you name. `marketplaces` accepts one or more of shopee, lazada, tiktok, shopify, whatsapp, zalora, amazon, and ebay. Each named marketplace must already have a listing; other channels are left untouched. Omit `marketplaces` to delist every existing listing. This does not delete the OmniCommerce product.
|
|
1284
|
+
*
|
|
1285
|
+
* Poll GET /api/v1/jobs/{jobId} until data.status is succeeded, partial, or failed. Accepted means the job was queued, not that the marketplace has removed the listing.
|
|
1090
1286
|
*/
|
|
1091
1287
|
post: operations["post_v1_products_by_productid_delist"];
|
|
1092
1288
|
delete?: never;
|
|
@@ -1992,91 +2188,339 @@ interface components {
|
|
|
1992
2188
|
| "za"
|
|
1993
2189
|
| "zm"
|
|
1994
2190
|
| "zw";
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2191
|
+
CampaignPlan: {
|
|
2192
|
+
brief: {
|
|
2193
|
+
name: string;
|
|
2194
|
+
/** @default */
|
|
2195
|
+
objective: string;
|
|
2196
|
+
/** @default */
|
|
2197
|
+
brand: string;
|
|
2198
|
+
ownerId: string;
|
|
2199
|
+
approverId: string;
|
|
2200
|
+
timezone: string;
|
|
2201
|
+
/** @default [] */
|
|
2202
|
+
stores: {
|
|
2203
|
+
/** @enum {string} */
|
|
2204
|
+
marketplace:
|
|
2205
|
+
| "shopee"
|
|
2206
|
+
| "lazada"
|
|
2207
|
+
| "tiktok"
|
|
2208
|
+
| "shopify"
|
|
2209
|
+
| "whatsapp"
|
|
2210
|
+
| "zalora"
|
|
2211
|
+
| "amazon"
|
|
2212
|
+
| "ebay";
|
|
2213
|
+
country: string;
|
|
2214
|
+
storeId: string;
|
|
2215
|
+
}[];
|
|
2216
|
+
/** @default */
|
|
2217
|
+
serviceRequest: string;
|
|
2218
|
+
/**
|
|
2219
|
+
* @default standard
|
|
2220
|
+
* @enum {string}
|
|
2221
|
+
*/
|
|
2222
|
+
priority: "standard" | "priority" | "super_priority";
|
|
2223
|
+
/** @default [] */
|
|
2224
|
+
documentIds: string[];
|
|
2225
|
+
/** @default null */
|
|
2226
|
+
reviewDueAt: string | null;
|
|
2227
|
+
sourceCurrency?: string;
|
|
2228
|
+
/** @enum {string} */
|
|
2229
|
+
sourceMarketplace?:
|
|
2230
|
+
| "shopee"
|
|
2231
|
+
| "lazada"
|
|
2232
|
+
| "tiktok"
|
|
2233
|
+
| "shopify"
|
|
2234
|
+
| "whatsapp"
|
|
2235
|
+
| "zalora"
|
|
2236
|
+
| "amazon"
|
|
2237
|
+
| "ebay";
|
|
2238
|
+
sourceCountry?: string;
|
|
2239
|
+
/** @default */
|
|
2240
|
+
cleanupNotes: string;
|
|
2241
|
+
};
|
|
2242
|
+
/** @default [] */
|
|
2243
|
+
windows: {
|
|
2244
|
+
id: string;
|
|
2245
|
+
name: string;
|
|
2246
|
+
/**
|
|
2247
|
+
* @description Preparation time: publish promotions with the future live start/end. Must be at or before startsAt.
|
|
2248
|
+
* @default null
|
|
2249
|
+
*/
|
|
2250
|
+
preparesAt: string | null;
|
|
2251
|
+
startsAt: string | null;
|
|
2252
|
+
endsAt: string | null;
|
|
2253
|
+
/** @default */
|
|
2254
|
+
reviewNotes: string;
|
|
2044
2255
|
}[];
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2256
|
+
offers?: {
|
|
2257
|
+
id: string;
|
|
2258
|
+
windowId: string;
|
|
2259
|
+
/**
|
|
2260
|
+
* Format: uuid
|
|
2261
|
+
* @description Existing draft promotion attached to this window; the campaign controls its live dates.
|
|
2262
|
+
*/
|
|
2263
|
+
promotionId?: string;
|
|
2264
|
+
promotion: {
|
|
2265
|
+
name?: string;
|
|
2266
|
+
description?: string | null;
|
|
2267
|
+
/**
|
|
2268
|
+
* @description Canonical OmniCommerce promotion mechanic: product discount, flash sale, voucher, gift with purchase, Buy-X-Get-Y, bundle deal, or Lazada-only free shipping and early bird price.
|
|
2269
|
+
* @enum {string}
|
|
2270
|
+
*/
|
|
2271
|
+
kind?:
|
|
2272
|
+
| "product_discount"
|
|
2273
|
+
| "flash_sale"
|
|
2274
|
+
| "voucher"
|
|
2275
|
+
| "gift_with_purchase"
|
|
2276
|
+
| "buy_x_get_y"
|
|
2277
|
+
| "bundle_deal"
|
|
2278
|
+
| "free_shipping"
|
|
2279
|
+
| "early_bird_price";
|
|
2280
|
+
salesChannels?: ("pdp" | "live")[];
|
|
2281
|
+
/** @enum {string} */
|
|
2282
|
+
discountType?: "percentage" | "fixed_amount";
|
|
2283
|
+
discountValue?: number;
|
|
2284
|
+
/** @description Patch discount terms for exact target store keys; unnamed stores remain unchanged. Null discountValue restores shared campaign terms for that store. */
|
|
2285
|
+
storeDiscounts?: {
|
|
2286
|
+
storeKey: string;
|
|
2287
|
+
/** @enum {string} */
|
|
2288
|
+
discountType: "percentage" | "fixed_amount";
|
|
2289
|
+
discountValue: number | null;
|
|
2290
|
+
}[];
|
|
2291
|
+
/** @description Up to 100 connected stores for create (required) or update. Copy marketplace, country, and storeId from get_promotions targetStores or find_products marketplaceDetails. Do not concatenate a storeKeys string. */
|
|
2292
|
+
targetStores?: {
|
|
2293
|
+
/** @enum {string} */
|
|
2294
|
+
marketplace:
|
|
2295
|
+
| "lazada"
|
|
2296
|
+
| "shopee"
|
|
2297
|
+
| "tiktok"
|
|
2298
|
+
| "shopify"
|
|
2299
|
+
| "amazon"
|
|
2300
|
+
| "zalora"
|
|
2301
|
+
| "ebay";
|
|
2302
|
+
country: string;
|
|
2303
|
+
storeId: string;
|
|
2304
|
+
}[];
|
|
2305
|
+
minSalePrice?: number | null;
|
|
2306
|
+
maxDiscountAmount?: number | null;
|
|
2307
|
+
minSpend?: number | null;
|
|
2308
|
+
voucherCode?: string | null;
|
|
2309
|
+
claimStartsAt?: string | null;
|
|
2310
|
+
totalUsageLimit?: number | null;
|
|
2311
|
+
perBuyerLimit?: number | null;
|
|
2312
|
+
mechanicConfig?: {
|
|
2313
|
+
/** @description Voucher subtype from get_promotions capabilities.voucherTypes. Browser AOP types (delivery=browser_aop) are writable Seller Center vouchers. Omit browserAutomation.aopId to use the built-in marketplace AOP. */
|
|
2314
|
+
voucherType?:
|
|
2315
|
+
| (
|
|
2316
|
+
| "shopee_shop"
|
|
2317
|
+
| "shopee_product"
|
|
2318
|
+
| "shopee_private"
|
|
2319
|
+
| "shopee_live"
|
|
2320
|
+
| "shopee_video"
|
|
2321
|
+
| "shopee_new_buyer"
|
|
2322
|
+
| "shopee_repeat_buyer"
|
|
2323
|
+
| "shopee_follow_prize"
|
|
2324
|
+
| "shopee_exclusive_streamer"
|
|
2325
|
+
| "shopee_welcome"
|
|
2326
|
+
| "shopee_member_repeat_buyer"
|
|
2327
|
+
| "shopee_exclusive"
|
|
2328
|
+
| "shopee_redemption"
|
|
2329
|
+
| "shopee_exclusive_creator"
|
|
2330
|
+
| "lazada_store_follower"
|
|
2331
|
+
| "lazada_regular"
|
|
2332
|
+
| "lazada_store_new_buyer"
|
|
2333
|
+
| "lazada_live"
|
|
2334
|
+
| "lazada_offline"
|
|
2335
|
+
| "lazada_co_funded"
|
|
2336
|
+
| "lazada_welcome"
|
|
2337
|
+
| "lazada_linked_member"
|
|
2338
|
+
| "lazada_new_member"
|
|
2339
|
+
| "lazada_member_exclusive"
|
|
2340
|
+
| "lazada_points_redeemable"
|
|
2341
|
+
| "tiktok_seller_coupon"
|
|
2342
|
+
| "shopify_discount_code"
|
|
2343
|
+
| "amazon_promotion_code"
|
|
2344
|
+
| "zalora_seller_voucher"
|
|
2345
|
+
| "ebay_coded_coupon"
|
|
2346
|
+
)
|
|
2347
|
+
| null;
|
|
2348
|
+
browserAutomation?: {
|
|
2349
|
+
aopId?: string;
|
|
2350
|
+
variableValues?: {
|
|
2351
|
+
[key: string]: string;
|
|
2352
|
+
};
|
|
2353
|
+
instructions?: string;
|
|
2354
|
+
} | null;
|
|
2355
|
+
/**
|
|
2356
|
+
* @description shop = all products, products = selected assigned products. Repeat Buyer defaults to shop.
|
|
2357
|
+
* @enum {string}
|
|
2358
|
+
*/
|
|
2359
|
+
voucherScope?: "products" | "shop";
|
|
2360
|
+
/**
|
|
2361
|
+
* @description Seller Center reward type. coins_cashback is a percentage greater than 3 and does not reduce salePrice.
|
|
2362
|
+
* @enum {string}
|
|
2363
|
+
*/
|
|
2364
|
+
voucherReward?: "discount" | "coins_cashback";
|
|
2365
|
+
/** @enum {string} */
|
|
2366
|
+
voucherAudience?: "general" | "shop_follow";
|
|
2367
|
+
/** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
|
|
2368
|
+
repeatPurchaseMinCount?: number;
|
|
2369
|
+
/** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
|
|
2370
|
+
repeatPurchaseLookbackDays?: number;
|
|
2371
|
+
/** @description Shopee Smart Voucher toggle. Used by New Buyer and similar portal types. */
|
|
2372
|
+
smartVoucher?: boolean;
|
|
2373
|
+
/** @description Shopee Follow Prize: days after claim until expiry. Seller Center is 7. */
|
|
2374
|
+
followPrizeExpiryDays?: number;
|
|
2375
|
+
/**
|
|
2376
|
+
* @description Shopee Video display: shopee_video = all Shopee Video; creator_video = targeted creator videos only.
|
|
2377
|
+
* @enum {string}
|
|
2378
|
+
*/
|
|
2379
|
+
videoDisplayMode?: "shopee_video" | "creator_video";
|
|
2380
|
+
/** @description Exclusive Creator Voucher: up to 15 Shopee usernames. */
|
|
2381
|
+
exclusiveCreatorUsernames?: string[];
|
|
2382
|
+
/** @description Exclusive Streamer Voucher: up to 15 Shopee usernames. */
|
|
2383
|
+
exclusiveStreamerUsernames?: string[];
|
|
2384
|
+
/** @description Shopee display setting. ["all"] = display on all pages; [] = hidden/share by code. */
|
|
2385
|
+
voucherDisplayChannels?: (
|
|
2386
|
+
| "all"
|
|
2387
|
+
| "feed"
|
|
2388
|
+
| "live"
|
|
2389
|
+
| "order_page"
|
|
2390
|
+
| "followers"
|
|
2391
|
+
| "offline"
|
|
2392
|
+
)[];
|
|
2393
|
+
/** @enum {string} */
|
|
2394
|
+
bundlePriceType?: "discount" | "fixed_price";
|
|
2395
|
+
bundleTiers?: {
|
|
2396
|
+
minimumQuantity: number;
|
|
2397
|
+
discountValue: number;
|
|
2398
|
+
}[];
|
|
2399
|
+
/** @enum {string} */
|
|
2400
|
+
thresholdType?: "item_quantity" | "order_amount";
|
|
2401
|
+
thresholdValue?: number;
|
|
2402
|
+
/** @enum {string} */
|
|
2403
|
+
giftType?: "gift" | "sample";
|
|
2404
|
+
giftQuantity?: number;
|
|
2405
|
+
gifts?: {
|
|
2406
|
+
/** Format: uuid */
|
|
2407
|
+
productId: string;
|
|
2408
|
+
variantId?: string | null;
|
|
2409
|
+
totalClaimLimit: number;
|
|
2410
|
+
}[];
|
|
2411
|
+
buyQuantity?: number;
|
|
2412
|
+
getQuantity?: number;
|
|
2413
|
+
benefitProductIds?: string[];
|
|
2414
|
+
/** @enum {string} */
|
|
2415
|
+
benefitType?: "free" | "percentage" | "fixed_amount";
|
|
2416
|
+
benefitValue?: number;
|
|
2417
|
+
maxApplicationsPerOrder?: number;
|
|
2418
|
+
bundleMinimumQuantity?: number;
|
|
2419
|
+
/** @description Free shipping delivery option. Lazada: STANDARD (default), ECONOMY, EXPRESS, SELLER_OWN_FLEET or P2P, as offered by the store. */
|
|
2420
|
+
shippingDeliveryOption?: string;
|
|
2421
|
+
/** @description Free shipping: total shipping subsidy budget in the store currency. Omit for an unlimited budget. */
|
|
2422
|
+
shippingBudget?: number;
|
|
2423
|
+
};
|
|
2424
|
+
};
|
|
2425
|
+
/** @default [] */
|
|
2426
|
+
productIds: string[];
|
|
2427
|
+
/** @default */
|
|
2428
|
+
reviewNotes: string;
|
|
2429
|
+
/** @default */
|
|
2430
|
+
excludedReason: string;
|
|
2431
|
+
source?: {
|
|
2432
|
+
sheet: string;
|
|
2433
|
+
rows: number[];
|
|
2434
|
+
headers: string[];
|
|
2435
|
+
values: string[][];
|
|
2436
|
+
};
|
|
2437
|
+
}[];
|
|
2438
|
+
};
|
|
2439
|
+
ProductEnrichmentWebhookSnapshot: {
|
|
2440
|
+
jobId: string;
|
|
2441
|
+
batchId: string | null;
|
|
2442
|
+
/** @enum {string} */
|
|
2443
|
+
workflow: "listing_copy" | "marketplace_taxonomy";
|
|
2444
|
+
marketplace: string | null;
|
|
2445
|
+
/** @enum {string} */
|
|
2446
|
+
status: "running" | "pending_review" | "applied";
|
|
2447
|
+
};
|
|
2448
|
+
ProductWebhookSnapshot: {
|
|
2449
|
+
id: string;
|
|
2450
|
+
parentId: string | null;
|
|
2451
|
+
/** @enum {string} */
|
|
2452
|
+
type: "product" | "variant";
|
|
2453
|
+
productFamilyId: string;
|
|
2454
|
+
productFamilyName: string | null;
|
|
2455
|
+
name: string | null;
|
|
2456
|
+
description: string | null;
|
|
2457
|
+
sku: string | null;
|
|
2458
|
+
brand: string | null;
|
|
2459
|
+
status: string | null;
|
|
2460
|
+
/** @description Catalog price in the legacy product event contract. Use currency with this value. */
|
|
2461
|
+
price: number | null;
|
|
2462
|
+
/** @description Optional catalog sale price in the legacy product event contract. */
|
|
2463
|
+
salePrice: number | null;
|
|
2464
|
+
compareAtPrice: number | null;
|
|
2465
|
+
costPrice: number | null;
|
|
2466
|
+
costPriceCurrency: string | null;
|
|
2467
|
+
mapPrice: number | null;
|
|
2468
|
+
msrpPrice: number | null;
|
|
2469
|
+
currency: string | null;
|
|
2470
|
+
upc: string | null;
|
|
2471
|
+
category: string | null;
|
|
2472
|
+
tags: string[];
|
|
2473
|
+
inventory: {
|
|
2474
|
+
quantity?: number | null;
|
|
2475
|
+
} & {
|
|
2476
|
+
[key: string]: unknown;
|
|
2477
|
+
};
|
|
2478
|
+
images: unknown[];
|
|
2479
|
+
variants: unknown[];
|
|
2480
|
+
variationSchema: {
|
|
2481
|
+
[key: string]: unknown;
|
|
2482
|
+
};
|
|
2483
|
+
marketplaces: {
|
|
2484
|
+
[key: string]: unknown;
|
|
2485
|
+
};
|
|
2486
|
+
promotions: {
|
|
2487
|
+
[key: string]: unknown;
|
|
2488
|
+
}[];
|
|
2489
|
+
/** Format: date-time */
|
|
2490
|
+
updatedAt: string | null;
|
|
2491
|
+
/** Format: date-time */
|
|
2492
|
+
createdAt: string | null;
|
|
2493
|
+
} & {
|
|
2494
|
+
[key: string]: unknown;
|
|
2495
|
+
};
|
|
2496
|
+
LookProductWebhookSnapshot: {
|
|
2497
|
+
id: string;
|
|
2498
|
+
name: string;
|
|
2499
|
+
sku: string | null;
|
|
2500
|
+
brand: string | null;
|
|
2501
|
+
price: number | null;
|
|
2502
|
+
currency: string | null;
|
|
2503
|
+
imageUrl: string | null;
|
|
2504
|
+
} & {
|
|
2505
|
+
[key: string]: unknown;
|
|
2506
|
+
};
|
|
2507
|
+
LookWebhookSnapshot: {
|
|
2508
|
+
id: string;
|
|
2509
|
+
organizationId: string;
|
|
2510
|
+
title: string | null;
|
|
2511
|
+
/** @enum {string} */
|
|
2512
|
+
status: "draft" | "published";
|
|
2513
|
+
subject: string | null;
|
|
2514
|
+
style: string | null;
|
|
2515
|
+
season: string | null;
|
|
2516
|
+
timeOfDay: string | null;
|
|
2517
|
+
city: string | null;
|
|
2518
|
+
additionalNotes: string | null;
|
|
2519
|
+
stylePrompt: string | null;
|
|
2520
|
+
heroImageTagId: string | null;
|
|
2521
|
+
heroImageUrl: string | null;
|
|
2522
|
+
createdBy: string | null;
|
|
2523
|
+
/** Format: date-time */
|
|
2080
2524
|
createdAt: string;
|
|
2081
2525
|
/** Format: date-time */
|
|
2082
2526
|
updatedAt: string;
|
|
@@ -2087,6 +2531,33 @@ interface components {
|
|
|
2087
2531
|
} & {
|
|
2088
2532
|
[key: string]: unknown;
|
|
2089
2533
|
};
|
|
2534
|
+
ReviewWebhookSnapshot: {
|
|
2535
|
+
id: string;
|
|
2536
|
+
organizationId: string;
|
|
2537
|
+
platform: string;
|
|
2538
|
+
accountId: string | null;
|
|
2539
|
+
productId: string | null;
|
|
2540
|
+
orderId: string | null;
|
|
2541
|
+
externalItemId: string | null;
|
|
2542
|
+
externalReviewId: string;
|
|
2543
|
+
externalOrderId: string | null;
|
|
2544
|
+
/** @enum {string} */
|
|
2545
|
+
kind: "product_review" | "solicitation";
|
|
2546
|
+
/** @enum {string} */
|
|
2547
|
+
status:
|
|
2548
|
+
| "open"
|
|
2549
|
+
| "replied"
|
|
2550
|
+
| "hidden"
|
|
2551
|
+
| "handoff"
|
|
2552
|
+
| "solicited"
|
|
2553
|
+
| "ineligible";
|
|
2554
|
+
rating: number | null;
|
|
2555
|
+
comment: string | null;
|
|
2556
|
+
sellerReply: string | null;
|
|
2557
|
+
canReply: boolean;
|
|
2558
|
+
/** Format: date-time */
|
|
2559
|
+
reviewedAt: string | null;
|
|
2560
|
+
};
|
|
2090
2561
|
ProductCreatedWebhookEvent: {
|
|
2091
2562
|
/** @description Stable event ID and recipient idempotency key. */
|
|
2092
2563
|
eventId: string;
|
|
@@ -2297,6 +2768,72 @@ interface components {
|
|
|
2297
2768
|
} & {
|
|
2298
2769
|
[key: string]: unknown;
|
|
2299
2770
|
};
|
|
2771
|
+
ReviewCreatedWebhookEvent: {
|
|
2772
|
+
/** @description Stable event ID and recipient idempotency key. */
|
|
2773
|
+
eventId: string;
|
|
2774
|
+
/** @constant */
|
|
2775
|
+
eventType: "review.created";
|
|
2776
|
+
organizationId: string;
|
|
2777
|
+
reviewId: string;
|
|
2778
|
+
productId: string | null;
|
|
2779
|
+
previousStatus?: string | null;
|
|
2780
|
+
changedFields: string[];
|
|
2781
|
+
/** Format: date-time */
|
|
2782
|
+
occurredAt: string;
|
|
2783
|
+
/** @description Internal OmniCommerce workflow provenance when supplied. */
|
|
2784
|
+
source?: string | null;
|
|
2785
|
+
data: {
|
|
2786
|
+
review: components["schemas"]["ReviewWebhookSnapshot"];
|
|
2787
|
+
} & {
|
|
2788
|
+
[key: string]: unknown;
|
|
2789
|
+
};
|
|
2790
|
+
} & {
|
|
2791
|
+
[key: string]: unknown;
|
|
2792
|
+
};
|
|
2793
|
+
ReviewUpdatedWebhookEvent: {
|
|
2794
|
+
/** @description Stable event ID and recipient idempotency key. */
|
|
2795
|
+
eventId: string;
|
|
2796
|
+
/** @constant */
|
|
2797
|
+
eventType: "review.updated";
|
|
2798
|
+
organizationId: string;
|
|
2799
|
+
reviewId: string;
|
|
2800
|
+
productId: string | null;
|
|
2801
|
+
previousStatus?: string | null;
|
|
2802
|
+
changedFields: string[];
|
|
2803
|
+
/** Format: date-time */
|
|
2804
|
+
occurredAt: string;
|
|
2805
|
+
/** @description Internal OmniCommerce workflow provenance when supplied. */
|
|
2806
|
+
source?: string | null;
|
|
2807
|
+
data: {
|
|
2808
|
+
review: components["schemas"]["ReviewWebhookSnapshot"];
|
|
2809
|
+
} & {
|
|
2810
|
+
[key: string]: unknown;
|
|
2811
|
+
};
|
|
2812
|
+
} & {
|
|
2813
|
+
[key: string]: unknown;
|
|
2814
|
+
};
|
|
2815
|
+
ReviewStatusChangedWebhookEvent: {
|
|
2816
|
+
/** @description Stable event ID and recipient idempotency key. */
|
|
2817
|
+
eventId: string;
|
|
2818
|
+
/** @constant */
|
|
2819
|
+
eventType: "review.status.changed";
|
|
2820
|
+
organizationId: string;
|
|
2821
|
+
reviewId: string;
|
|
2822
|
+
productId: string | null;
|
|
2823
|
+
previousStatus?: string | null;
|
|
2824
|
+
changedFields: string[];
|
|
2825
|
+
/** Format: date-time */
|
|
2826
|
+
occurredAt: string;
|
|
2827
|
+
/** @description Internal OmniCommerce workflow provenance when supplied. */
|
|
2828
|
+
source?: string | null;
|
|
2829
|
+
data: {
|
|
2830
|
+
review: components["schemas"]["ReviewWebhookSnapshot"];
|
|
2831
|
+
} & {
|
|
2832
|
+
[key: string]: unknown;
|
|
2833
|
+
};
|
|
2834
|
+
} & {
|
|
2835
|
+
[key: string]: unknown;
|
|
2836
|
+
};
|
|
2300
2837
|
WebhookMoney: {
|
|
2301
2838
|
/** @description Decimal monetary amount encoded as a JSON string. */
|
|
2302
2839
|
amount: string;
|
|
@@ -2906,51 +3443,114 @@ interface operations {
|
|
|
2906
3443
|
};
|
|
2907
3444
|
};
|
|
2908
3445
|
};
|
|
2909
|
-
|
|
3446
|
+
post_v1_agents_general_invoke: {
|
|
2910
3447
|
parameters: {
|
|
2911
|
-
query?:
|
|
2912
|
-
organizationId?: string;
|
|
2913
|
-
};
|
|
3448
|
+
query?: never;
|
|
2914
3449
|
header?: never;
|
|
2915
|
-
path
|
|
2916
|
-
aopId: string;
|
|
2917
|
-
};
|
|
3450
|
+
path?: never;
|
|
2918
3451
|
cookie?: never;
|
|
2919
3452
|
};
|
|
2920
|
-
requestBody
|
|
3453
|
+
requestBody: {
|
|
3454
|
+
content: {
|
|
3455
|
+
/**
|
|
3456
|
+
* @example {
|
|
3457
|
+
* "messages": [
|
|
3458
|
+
* {
|
|
3459
|
+
* "role": "user",
|
|
3460
|
+
* "content": "How many products are missing a price?"
|
|
3461
|
+
* }
|
|
3462
|
+
* ]
|
|
3463
|
+
* }
|
|
3464
|
+
*/
|
|
3465
|
+
"application/json": {
|
|
3466
|
+
organizationId?: string;
|
|
3467
|
+
thread_id?: string | null;
|
|
3468
|
+
channel?: string;
|
|
3469
|
+
messages?: {
|
|
3470
|
+
/** @enum {string} */
|
|
3471
|
+
role?: "user" | "assistant" | "system";
|
|
3472
|
+
content:
|
|
3473
|
+
| string
|
|
3474
|
+
| (
|
|
3475
|
+
| {
|
|
3476
|
+
/** @constant */
|
|
3477
|
+
type: "text";
|
|
3478
|
+
text: string;
|
|
3479
|
+
}
|
|
3480
|
+
| {
|
|
3481
|
+
/** @constant */
|
|
3482
|
+
type: "image";
|
|
3483
|
+
url: string;
|
|
3484
|
+
filename?: string;
|
|
3485
|
+
}
|
|
3486
|
+
)[];
|
|
3487
|
+
id?: string;
|
|
3488
|
+
name?: string;
|
|
3489
|
+
}[];
|
|
3490
|
+
config?: {
|
|
3491
|
+
enabled_tools?: string[];
|
|
3492
|
+
model?: string | null;
|
|
3493
|
+
system_prompt?: string;
|
|
3494
|
+
structured_output?: {
|
|
3495
|
+
[key: string]: unknown;
|
|
3496
|
+
} | null;
|
|
3497
|
+
};
|
|
3498
|
+
decisions?: {
|
|
3499
|
+
/** @enum {string} */
|
|
3500
|
+
action: "approve" | "reject";
|
|
3501
|
+
reason?: string;
|
|
3502
|
+
}[];
|
|
3503
|
+
};
|
|
3504
|
+
};
|
|
3505
|
+
};
|
|
2921
3506
|
responses: {
|
|
2922
|
-
/** @description
|
|
3507
|
+
/** @description The agent finished or is waiting for approval. */
|
|
2923
3508
|
200: {
|
|
2924
3509
|
headers: {
|
|
2925
3510
|
[name: string]: unknown;
|
|
2926
3511
|
};
|
|
2927
3512
|
content: {
|
|
2928
3513
|
"application/json": {
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
3514
|
+
run_id: string;
|
|
3515
|
+
thread_id: string;
|
|
3516
|
+
/** @enum {string} */
|
|
3517
|
+
status:
|
|
3518
|
+
| "queued"
|
|
3519
|
+
| "running"
|
|
3520
|
+
| "completed"
|
|
3521
|
+
| "awaiting_approval"
|
|
3522
|
+
| "failed";
|
|
3523
|
+
messages: {
|
|
3524
|
+
/** @enum {string} */
|
|
3525
|
+
type: "human" | "ai" | "tool" | "system";
|
|
3526
|
+
/** @enum {string} */
|
|
3527
|
+
role: "user" | "assistant" | "tool" | "system";
|
|
3528
|
+
content: string;
|
|
3529
|
+
id?: string;
|
|
3530
|
+
name?: string;
|
|
3531
|
+
tool_calls?: {
|
|
3532
|
+
id?: string;
|
|
3533
|
+
name: string;
|
|
3534
|
+
args: unknown;
|
|
3535
|
+
}[];
|
|
3536
|
+
tool_call_id?: string;
|
|
3537
|
+
}[];
|
|
3538
|
+
structured_output: {
|
|
2948
3539
|
[key: string]: unknown;
|
|
2949
3540
|
} | null;
|
|
3541
|
+
approvals:
|
|
3542
|
+
| {
|
|
3543
|
+
interrupt_instance_id: string;
|
|
3544
|
+
tool_name: string | null;
|
|
3545
|
+
tool_args: unknown;
|
|
3546
|
+
message: string;
|
|
3547
|
+
}[]
|
|
3548
|
+
| null;
|
|
3549
|
+
error: string | null;
|
|
2950
3550
|
};
|
|
2951
3551
|
};
|
|
2952
3552
|
};
|
|
2953
|
-
/** @description Invalid
|
|
3553
|
+
/** @description Invalid agent request, unknown tool or model, or a decision count that does not match the pending approvals */
|
|
2954
3554
|
400: {
|
|
2955
3555
|
headers: {
|
|
2956
3556
|
[name: string]: unknown;
|
|
@@ -2971,76 +3571,148 @@ interface operations {
|
|
|
2971
3571
|
};
|
|
2972
3572
|
content?: never;
|
|
2973
3573
|
};
|
|
2974
|
-
/** @description
|
|
3574
|
+
/** @description Missing agents:invoke scope or Assistant access */
|
|
2975
3575
|
403: {
|
|
2976
3576
|
headers: {
|
|
2977
3577
|
[name: string]: unknown;
|
|
2978
3578
|
};
|
|
2979
3579
|
content?: never;
|
|
2980
3580
|
};
|
|
2981
|
-
/** @description
|
|
2982
|
-
|
|
3581
|
+
/** @description The thread already has an active run, or decisions were sent for a thread with no run awaiting approval */
|
|
3582
|
+
409: {
|
|
2983
3583
|
headers: {
|
|
2984
3584
|
[name: string]: unknown;
|
|
2985
3585
|
};
|
|
2986
3586
|
content?: never;
|
|
2987
3587
|
};
|
|
2988
|
-
/** @description
|
|
3588
|
+
/** @description The agent run failed. `data.run_id` identifies the stored run */
|
|
2989
3589
|
500: {
|
|
2990
3590
|
headers: {
|
|
2991
3591
|
[name: string]: unknown;
|
|
2992
3592
|
};
|
|
2993
3593
|
content?: never;
|
|
2994
3594
|
};
|
|
3595
|
+
/** @description The agent run timed out. `data.run_id` identifies the stored run */
|
|
3596
|
+
504: {
|
|
3597
|
+
headers: {
|
|
3598
|
+
[name: string]: unknown;
|
|
3599
|
+
};
|
|
3600
|
+
content?: never;
|
|
3601
|
+
};
|
|
2995
3602
|
};
|
|
2996
3603
|
};
|
|
2997
|
-
|
|
3604
|
+
post_v1_agents_general_runs: {
|
|
2998
3605
|
parameters: {
|
|
2999
3606
|
query?: never;
|
|
3000
3607
|
header?: never;
|
|
3001
|
-
path
|
|
3002
|
-
aopId: string;
|
|
3003
|
-
};
|
|
3608
|
+
path?: never;
|
|
3004
3609
|
cookie?: never;
|
|
3005
3610
|
};
|
|
3006
3611
|
requestBody: {
|
|
3007
3612
|
content: {
|
|
3613
|
+
/**
|
|
3614
|
+
* @example {
|
|
3615
|
+
* "messages": [
|
|
3616
|
+
* {
|
|
3617
|
+
* "role": "user",
|
|
3618
|
+
* "content": "Summarize orders placed today."
|
|
3619
|
+
* }
|
|
3620
|
+
* ]
|
|
3621
|
+
* }
|
|
3622
|
+
*/
|
|
3008
3623
|
"application/json": {
|
|
3009
|
-
prompt?: string | null;
|
|
3010
|
-
description?: string | null;
|
|
3011
|
-
agentId?: string | null;
|
|
3012
|
-
agent_config?: {
|
|
3013
|
-
[key: string]: unknown;
|
|
3014
|
-
} | null;
|
|
3015
|
-
icon?: string | null;
|
|
3016
|
-
section?: string | null;
|
|
3017
|
-
structured_output?: {
|
|
3018
|
-
[key: string]: unknown;
|
|
3019
|
-
} | null;
|
|
3020
|
-
user_notification_configs?: {
|
|
3021
|
-
[key: string]: unknown;
|
|
3022
|
-
} | null;
|
|
3023
|
-
/** @description Required for session auth. Optional for API keys. */
|
|
3024
3624
|
organizationId?: string;
|
|
3625
|
+
thread_id?: string | null;
|
|
3626
|
+
channel?: string;
|
|
3627
|
+
messages?: {
|
|
3628
|
+
/** @enum {string} */
|
|
3629
|
+
role?: "user" | "assistant" | "system";
|
|
3630
|
+
content:
|
|
3631
|
+
| string
|
|
3632
|
+
| (
|
|
3633
|
+
| {
|
|
3634
|
+
/** @constant */
|
|
3635
|
+
type: "text";
|
|
3636
|
+
text: string;
|
|
3637
|
+
}
|
|
3638
|
+
| {
|
|
3639
|
+
/** @constant */
|
|
3640
|
+
type: "image";
|
|
3641
|
+
url: string;
|
|
3642
|
+
filename?: string;
|
|
3643
|
+
}
|
|
3644
|
+
)[];
|
|
3645
|
+
id?: string;
|
|
3646
|
+
name?: string;
|
|
3647
|
+
}[];
|
|
3648
|
+
config?: {
|
|
3649
|
+
enabled_tools?: string[];
|
|
3650
|
+
model?: string | null;
|
|
3651
|
+
system_prompt?: string;
|
|
3652
|
+
structured_output?: {
|
|
3653
|
+
[key: string]: unknown;
|
|
3654
|
+
} | null;
|
|
3655
|
+
};
|
|
3656
|
+
decisions?: {
|
|
3657
|
+
/** @enum {string} */
|
|
3658
|
+
action: "approve" | "reject";
|
|
3659
|
+
reason?: string;
|
|
3660
|
+
}[];
|
|
3025
3661
|
};
|
|
3026
3662
|
};
|
|
3027
3663
|
};
|
|
3028
3664
|
responses: {
|
|
3029
|
-
/** @description
|
|
3030
|
-
|
|
3665
|
+
/** @description The agent run was queued. */
|
|
3666
|
+
202: {
|
|
3031
3667
|
headers: {
|
|
3668
|
+
/** @description The run to poll. */
|
|
3669
|
+
Location?: string;
|
|
3670
|
+
/** @description Seconds to wait before polling again. Sent while the run is queued or running. */
|
|
3671
|
+
"Retry-After"?: number;
|
|
3032
3672
|
[name: string]: unknown;
|
|
3033
3673
|
};
|
|
3034
3674
|
content: {
|
|
3035
3675
|
"application/json": {
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3676
|
+
run_id: string;
|
|
3677
|
+
thread_id: string;
|
|
3678
|
+
/** @enum {string} */
|
|
3679
|
+
status:
|
|
3680
|
+
| "queued"
|
|
3681
|
+
| "running"
|
|
3682
|
+
| "completed"
|
|
3683
|
+
| "awaiting_approval"
|
|
3684
|
+
| "failed";
|
|
3685
|
+
messages: {
|
|
3686
|
+
/** @enum {string} */
|
|
3687
|
+
type: "human" | "ai" | "tool" | "system";
|
|
3688
|
+
/** @enum {string} */
|
|
3689
|
+
role: "user" | "assistant" | "tool" | "system";
|
|
3690
|
+
content: string;
|
|
3691
|
+
id?: string;
|
|
3692
|
+
name?: string;
|
|
3693
|
+
tool_calls?: {
|
|
3694
|
+
id?: string;
|
|
3695
|
+
name: string;
|
|
3696
|
+
args: unknown;
|
|
3697
|
+
}[];
|
|
3698
|
+
tool_call_id?: string;
|
|
3699
|
+
}[];
|
|
3700
|
+
structured_output: {
|
|
3701
|
+
[key: string]: unknown;
|
|
3702
|
+
} | null;
|
|
3703
|
+
approvals:
|
|
3704
|
+
| {
|
|
3705
|
+
interrupt_instance_id: string;
|
|
3706
|
+
tool_name: string | null;
|
|
3707
|
+
tool_args: unknown;
|
|
3708
|
+
message: string;
|
|
3709
|
+
}[]
|
|
3710
|
+
| null;
|
|
3711
|
+
error: string | null;
|
|
3040
3712
|
};
|
|
3041
3713
|
};
|
|
3042
3714
|
};
|
|
3043
|
-
/** @description Invalid
|
|
3715
|
+
/** @description Invalid agent request, unknown tool or model, or a decision count that does not match the pending approvals */
|
|
3044
3716
|
400: {
|
|
3045
3717
|
headers: {
|
|
3046
3718
|
[name: string]: unknown;
|
|
@@ -3061,21 +3733,21 @@ interface operations {
|
|
|
3061
3733
|
};
|
|
3062
3734
|
content?: never;
|
|
3063
3735
|
};
|
|
3064
|
-
/** @description
|
|
3736
|
+
/** @description Missing agents:invoke scope or Assistant access */
|
|
3065
3737
|
403: {
|
|
3066
3738
|
headers: {
|
|
3067
3739
|
[name: string]: unknown;
|
|
3068
3740
|
};
|
|
3069
3741
|
content?: never;
|
|
3070
3742
|
};
|
|
3071
|
-
/** @description
|
|
3072
|
-
|
|
3743
|
+
/** @description The thread already has an active run, or decisions were sent for a thread with no run awaiting approval */
|
|
3744
|
+
409: {
|
|
3073
3745
|
headers: {
|
|
3074
3746
|
[name: string]: unknown;
|
|
3075
3747
|
};
|
|
3076
3748
|
content?: never;
|
|
3077
3749
|
};
|
|
3078
|
-
/** @description
|
|
3750
|
+
/** @description The agent run failed. `data.run_id` identifies the stored run */
|
|
3079
3751
|
500: {
|
|
3080
3752
|
headers: {
|
|
3081
3753
|
[name: string]: unknown;
|
|
@@ -3084,83 +3756,69 @@ interface operations {
|
|
|
3084
3756
|
};
|
|
3085
3757
|
};
|
|
3086
3758
|
};
|
|
3087
|
-
|
|
3759
|
+
get_v1_agents_general_runs_by_runid: {
|
|
3088
3760
|
parameters: {
|
|
3089
|
-
query?:
|
|
3761
|
+
query?: {
|
|
3762
|
+
/** @description Required for session auth. Optional for API keys, which already belong to one organization. */
|
|
3763
|
+
organizationId?: string;
|
|
3764
|
+
};
|
|
3090
3765
|
header?: never;
|
|
3091
3766
|
path: {
|
|
3092
|
-
|
|
3767
|
+
runId: string;
|
|
3093
3768
|
};
|
|
3094
3769
|
cookie?: never;
|
|
3095
3770
|
};
|
|
3096
|
-
requestBody?:
|
|
3097
|
-
content: {
|
|
3098
|
-
/**
|
|
3099
|
-
* @example {
|
|
3100
|
-
* "user_inputs": {
|
|
3101
|
-
* "company": "Acme Corp",
|
|
3102
|
-
* "quarter": "Q1 2024"
|
|
3103
|
-
* }
|
|
3104
|
-
* }
|
|
3105
|
-
*/
|
|
3106
|
-
"application/json": {
|
|
3107
|
-
/**
|
|
3108
|
-
* @description Execute as a Test run: the agent uses its real prompt, config, and read-only tools, but side-effectful tool calls are captured instead of executed.
|
|
3109
|
-
* @default false
|
|
3110
|
-
*/
|
|
3111
|
-
dry_run?: boolean;
|
|
3112
|
-
/** @description Optional user inputs appended to the AOP prompt as key-value pairs. */
|
|
3113
|
-
user_inputs?: {
|
|
3114
|
-
[key: string]: string | number | boolean;
|
|
3115
|
-
} | null;
|
|
3116
|
-
/** @description Required for session auth. Optional for API keys. */
|
|
3117
|
-
organizationId?: string;
|
|
3118
|
-
};
|
|
3119
|
-
};
|
|
3120
|
-
};
|
|
3771
|
+
requestBody?: never;
|
|
3121
3772
|
responses: {
|
|
3122
|
-
/** @description
|
|
3773
|
+
/** @description The agent run. */
|
|
3123
3774
|
200: {
|
|
3124
3775
|
headers: {
|
|
3776
|
+
/** @description Seconds to wait before polling again. Sent while the run is queued or running. */
|
|
3777
|
+
"Retry-After"?: number;
|
|
3125
3778
|
[name: string]: unknown;
|
|
3126
3779
|
};
|
|
3127
3780
|
content: {
|
|
3128
|
-
/**
|
|
3129
|
-
* @example {
|
|
3130
|
-
* "status": "started",
|
|
3131
|
-
* "thread_id": "agent-aop-run_1",
|
|
3132
|
-
* "trigger_type": "api",
|
|
3133
|
-
* "message": "Task execution started successfully. Use the thread_id to track progress.",
|
|
3134
|
-
* "aop_id": "aop_1",
|
|
3135
|
-
* "aop_title": "Market Research Report Generator",
|
|
3136
|
-
* "base_prompt": "Generate a comprehensive market research report",
|
|
3137
|
-
* "final_prompt": "Generate a comprehensive market research report\n\n--- User Inputs ---\ncompany: Acme Corp\n",
|
|
3138
|
-
* "aop_config": {
|
|
3139
|
-
* "agentId": "research"
|
|
3140
|
-
* }
|
|
3141
|
-
* }
|
|
3142
|
-
*/
|
|
3143
3781
|
"application/json": {
|
|
3144
|
-
|
|
3145
|
-
status: string;
|
|
3782
|
+
run_id: string;
|
|
3146
3783
|
thread_id: string;
|
|
3147
|
-
/** @
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3784
|
+
/** @enum {string} */
|
|
3785
|
+
status:
|
|
3786
|
+
| "queued"
|
|
3787
|
+
| "running"
|
|
3788
|
+
| "completed"
|
|
3789
|
+
| "awaiting_approval"
|
|
3790
|
+
| "failed";
|
|
3791
|
+
messages: {
|
|
3792
|
+
/** @enum {string} */
|
|
3793
|
+
type: "human" | "ai" | "tool" | "system";
|
|
3794
|
+
/** @enum {string} */
|
|
3795
|
+
role: "user" | "assistant" | "tool" | "system";
|
|
3796
|
+
content: string;
|
|
3797
|
+
id?: string;
|
|
3798
|
+
name?: string;
|
|
3799
|
+
tool_calls?: {
|
|
3800
|
+
id?: string;
|
|
3801
|
+
name: string;
|
|
3802
|
+
args: unknown;
|
|
3803
|
+
}[];
|
|
3804
|
+
tool_call_id?: string;
|
|
3805
|
+
}[];
|
|
3806
|
+
structured_output: {
|
|
3158
3807
|
[key: string]: unknown;
|
|
3159
|
-
};
|
|
3808
|
+
} | null;
|
|
3809
|
+
approvals:
|
|
3810
|
+
| {
|
|
3811
|
+
interrupt_instance_id: string;
|
|
3812
|
+
tool_name: string | null;
|
|
3813
|
+
tool_args: unknown;
|
|
3814
|
+
message: string;
|
|
3815
|
+
}[]
|
|
3816
|
+
| null;
|
|
3817
|
+
error: string | null;
|
|
3160
3818
|
};
|
|
3161
3819
|
};
|
|
3162
3820
|
};
|
|
3163
|
-
/** @description Invalid
|
|
3821
|
+
/** @description Invalid agent request, unknown tool or model, or a decision count that does not match the pending approvals */
|
|
3164
3822
|
400: {
|
|
3165
3823
|
headers: {
|
|
3166
3824
|
[name: string]: unknown;
|
|
@@ -3174,58 +3832,126 @@ interface operations {
|
|
|
3174
3832
|
};
|
|
3175
3833
|
content?: never;
|
|
3176
3834
|
};
|
|
3177
|
-
/** @description
|
|
3178
|
-
402: {
|
|
3179
|
-
headers: {
|
|
3180
|
-
[name: string]: unknown;
|
|
3181
|
-
};
|
|
3182
|
-
content?: never;
|
|
3183
|
-
};
|
|
3184
|
-
/** @description Forbidden. Missing OAuth scope. */
|
|
3835
|
+
/** @description Missing agents:invoke scope or Assistant access */
|
|
3185
3836
|
403: {
|
|
3186
3837
|
headers: {
|
|
3187
3838
|
[name: string]: unknown;
|
|
3188
3839
|
};
|
|
3189
3840
|
content?: never;
|
|
3190
3841
|
};
|
|
3191
|
-
/** @description
|
|
3842
|
+
/** @description Agent run not found */
|
|
3192
3843
|
404: {
|
|
3193
3844
|
headers: {
|
|
3194
3845
|
[name: string]: unknown;
|
|
3195
3846
|
};
|
|
3196
3847
|
content?: never;
|
|
3197
3848
|
};
|
|
3198
|
-
/** @description Internal server error */
|
|
3199
|
-
500: {
|
|
3200
|
-
headers: {
|
|
3201
|
-
[name: string]: unknown;
|
|
3202
|
-
};
|
|
3203
|
-
content?: never;
|
|
3204
|
-
};
|
|
3205
3849
|
};
|
|
3206
3850
|
};
|
|
3207
|
-
|
|
3851
|
+
get_v1_aop_by_aopid_config: {
|
|
3208
3852
|
parameters: {
|
|
3209
|
-
query?:
|
|
3853
|
+
query?: {
|
|
3854
|
+
organizationId?: string;
|
|
3855
|
+
};
|
|
3210
3856
|
header?: never;
|
|
3211
|
-
path
|
|
3857
|
+
path: {
|
|
3858
|
+
aopId: string;
|
|
3859
|
+
};
|
|
3212
3860
|
cookie?: never;
|
|
3213
3861
|
};
|
|
3214
|
-
requestBody
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3862
|
+
requestBody?: never;
|
|
3863
|
+
responses: {
|
|
3864
|
+
/** @description Success */
|
|
3865
|
+
200: {
|
|
3866
|
+
headers: {
|
|
3867
|
+
[name: string]: unknown;
|
|
3868
|
+
};
|
|
3869
|
+
content: {
|
|
3870
|
+
"application/json": {
|
|
3871
|
+
aop_id: string;
|
|
3872
|
+
title?: string | null;
|
|
3873
|
+
prompt?: string;
|
|
3874
|
+
description?: string;
|
|
3875
|
+
agentId?: string | null;
|
|
3876
|
+
/** @default ListTodo */
|
|
3877
|
+
icon: string;
|
|
3878
|
+
section?: string;
|
|
3879
|
+
structured_output?: {
|
|
3880
|
+
[key: string]: unknown;
|
|
3881
|
+
} | null;
|
|
3882
|
+
/** @description Computed JSON Schema for user_inputs, derived from [[ placeholder ]] tokens and declared variables. */
|
|
3883
|
+
structured_inputs?: {
|
|
3884
|
+
[key: string]: unknown;
|
|
3885
|
+
} | null;
|
|
3886
|
+
agent_config?: {
|
|
3887
|
+
[key: string]: unknown;
|
|
3888
|
+
} | null;
|
|
3889
|
+
user_notification_configs?: {
|
|
3890
|
+
[key: string]: unknown;
|
|
3891
|
+
} | null;
|
|
3892
|
+
};
|
|
3893
|
+
};
|
|
3894
|
+
};
|
|
3895
|
+
/** @description Invalid AOP configuration or request */
|
|
3896
|
+
400: {
|
|
3897
|
+
headers: {
|
|
3898
|
+
[name: string]: unknown;
|
|
3899
|
+
};
|
|
3900
|
+
content?: never;
|
|
3901
|
+
};
|
|
3902
|
+
/** @description Unauthorized */
|
|
3903
|
+
401: {
|
|
3904
|
+
headers: {
|
|
3905
|
+
[name: string]: unknown;
|
|
3906
|
+
};
|
|
3907
|
+
content?: never;
|
|
3908
|
+
};
|
|
3909
|
+
/** @description Insufficient AI credits */
|
|
3910
|
+
402: {
|
|
3911
|
+
headers: {
|
|
3912
|
+
[name: string]: unknown;
|
|
3913
|
+
};
|
|
3914
|
+
content?: never;
|
|
3915
|
+
};
|
|
3916
|
+
/** @description Forbidden. Missing OAuth scope. */
|
|
3917
|
+
403: {
|
|
3918
|
+
headers: {
|
|
3919
|
+
[name: string]: unknown;
|
|
3920
|
+
};
|
|
3921
|
+
content?: never;
|
|
3922
|
+
};
|
|
3923
|
+
/** @description AOP or thread not found */
|
|
3924
|
+
404: {
|
|
3925
|
+
headers: {
|
|
3926
|
+
[name: string]: unknown;
|
|
3927
|
+
};
|
|
3928
|
+
content?: never;
|
|
3929
|
+
};
|
|
3930
|
+
/** @description Internal server error */
|
|
3931
|
+
500: {
|
|
3932
|
+
headers: {
|
|
3933
|
+
[name: string]: unknown;
|
|
3934
|
+
};
|
|
3935
|
+
content?: never;
|
|
3936
|
+
};
|
|
3937
|
+
};
|
|
3938
|
+
};
|
|
3939
|
+
put_v1_aop_by_aopid_config: {
|
|
3940
|
+
parameters: {
|
|
3941
|
+
query?: never;
|
|
3942
|
+
header?: never;
|
|
3943
|
+
path: {
|
|
3944
|
+
aopId: string;
|
|
3945
|
+
};
|
|
3946
|
+
cookie?: never;
|
|
3947
|
+
};
|
|
3948
|
+
requestBody: {
|
|
3949
|
+
content: {
|
|
3950
|
+
"application/json": {
|
|
3951
|
+
prompt?: string | null;
|
|
3952
|
+
description?: string | null;
|
|
3953
|
+
agentId?: string | null;
|
|
3954
|
+
agent_config?: {
|
|
3229
3955
|
[key: string]: unknown;
|
|
3230
3956
|
} | null;
|
|
3231
3957
|
icon?: string | null;
|
|
@@ -3236,31 +3962,2003 @@ interface operations {
|
|
|
3236
3962
|
user_notification_configs?: {
|
|
3237
3963
|
[key: string]: unknown;
|
|
3238
3964
|
} | null;
|
|
3239
|
-
/** @description Optional workstream ID. */
|
|
3240
|
-
parent_folder_id?: string | null;
|
|
3241
3965
|
/** @description Required for session auth. Optional for API keys. */
|
|
3242
3966
|
organizationId?: string;
|
|
3243
3967
|
};
|
|
3244
3968
|
};
|
|
3245
3969
|
};
|
|
3246
3970
|
responses: {
|
|
3247
|
-
/** @description Success */
|
|
3971
|
+
/** @description Success */
|
|
3972
|
+
200: {
|
|
3973
|
+
headers: {
|
|
3974
|
+
[name: string]: unknown;
|
|
3975
|
+
};
|
|
3976
|
+
content: {
|
|
3977
|
+
"application/json": {
|
|
3978
|
+
aop_id: string;
|
|
3979
|
+
/** @default updated */
|
|
3980
|
+
status: string;
|
|
3981
|
+
message?: string;
|
|
3982
|
+
};
|
|
3983
|
+
};
|
|
3984
|
+
};
|
|
3985
|
+
/** @description Invalid AOP configuration or request */
|
|
3986
|
+
400: {
|
|
3987
|
+
headers: {
|
|
3988
|
+
[name: string]: unknown;
|
|
3989
|
+
};
|
|
3990
|
+
content?: never;
|
|
3991
|
+
};
|
|
3992
|
+
/** @description Unauthorized */
|
|
3993
|
+
401: {
|
|
3994
|
+
headers: {
|
|
3995
|
+
[name: string]: unknown;
|
|
3996
|
+
};
|
|
3997
|
+
content?: never;
|
|
3998
|
+
};
|
|
3999
|
+
/** @description Insufficient AI credits */
|
|
4000
|
+
402: {
|
|
4001
|
+
headers: {
|
|
4002
|
+
[name: string]: unknown;
|
|
4003
|
+
};
|
|
4004
|
+
content?: never;
|
|
4005
|
+
};
|
|
4006
|
+
/** @description Forbidden. Missing OAuth scope. */
|
|
4007
|
+
403: {
|
|
4008
|
+
headers: {
|
|
4009
|
+
[name: string]: unknown;
|
|
4010
|
+
};
|
|
4011
|
+
content?: never;
|
|
4012
|
+
};
|
|
4013
|
+
/** @description AOP or thread not found */
|
|
4014
|
+
404: {
|
|
4015
|
+
headers: {
|
|
4016
|
+
[name: string]: unknown;
|
|
4017
|
+
};
|
|
4018
|
+
content?: never;
|
|
4019
|
+
};
|
|
4020
|
+
/** @description Internal server error */
|
|
4021
|
+
500: {
|
|
4022
|
+
headers: {
|
|
4023
|
+
[name: string]: unknown;
|
|
4024
|
+
};
|
|
4025
|
+
content?: never;
|
|
4026
|
+
};
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
4029
|
+
post_v1_aop_by_aopid_execute: {
|
|
4030
|
+
parameters: {
|
|
4031
|
+
query?: never;
|
|
4032
|
+
header?: never;
|
|
4033
|
+
path: {
|
|
4034
|
+
aopId: string;
|
|
4035
|
+
};
|
|
4036
|
+
cookie?: never;
|
|
4037
|
+
};
|
|
4038
|
+
requestBody?: {
|
|
4039
|
+
content: {
|
|
4040
|
+
/**
|
|
4041
|
+
* @example {
|
|
4042
|
+
* "user_inputs": {
|
|
4043
|
+
* "company": "Acme Corp",
|
|
4044
|
+
* "quarter": "Q1 2024"
|
|
4045
|
+
* }
|
|
4046
|
+
* }
|
|
4047
|
+
*/
|
|
4048
|
+
"application/json": {
|
|
4049
|
+
/**
|
|
4050
|
+
* @description Execute as a Test run: the agent uses its real prompt, config, and read-only tools, but side-effectful tool calls are captured instead of executed.
|
|
4051
|
+
* @default false
|
|
4052
|
+
*/
|
|
4053
|
+
dry_run?: boolean;
|
|
4054
|
+
/** @description Optional user inputs appended to the AOP prompt as key-value pairs. */
|
|
4055
|
+
user_inputs?: {
|
|
4056
|
+
[key: string]: string | number | boolean;
|
|
4057
|
+
} | null;
|
|
4058
|
+
/** @description Required for session auth. Optional for API keys. */
|
|
4059
|
+
organizationId?: string;
|
|
4060
|
+
};
|
|
4061
|
+
};
|
|
4062
|
+
};
|
|
4063
|
+
responses: {
|
|
4064
|
+
/** @description Success */
|
|
4065
|
+
200: {
|
|
4066
|
+
headers: {
|
|
4067
|
+
[name: string]: unknown;
|
|
4068
|
+
};
|
|
4069
|
+
content: {
|
|
4070
|
+
/**
|
|
4071
|
+
* @example {
|
|
4072
|
+
* "status": "started",
|
|
4073
|
+
* "thread_id": "agent-aop-run_1",
|
|
4074
|
+
* "trigger_type": "api",
|
|
4075
|
+
* "message": "Task execution started successfully. Use the thread_id to track progress.",
|
|
4076
|
+
* "aop_id": "aop_1",
|
|
4077
|
+
* "aop_title": "Market Research Report Generator",
|
|
4078
|
+
* "base_prompt": "Generate a comprehensive market research report",
|
|
4079
|
+
* "final_prompt": "Generate a comprehensive market research report\n\n--- User Inputs ---\ncompany: Acme Corp\n",
|
|
4080
|
+
* "aop_config": {
|
|
4081
|
+
* "agentId": "research"
|
|
4082
|
+
* }
|
|
4083
|
+
* }
|
|
4084
|
+
*/
|
|
4085
|
+
"application/json": {
|
|
4086
|
+
/** @example started */
|
|
4087
|
+
status: string;
|
|
4088
|
+
thread_id: string;
|
|
4089
|
+
/** @constant */
|
|
4090
|
+
trigger_type: "api";
|
|
4091
|
+
message?: string;
|
|
4092
|
+
aop_id: string;
|
|
4093
|
+
aop_title: string;
|
|
4094
|
+
base_prompt: string;
|
|
4095
|
+
final_prompt: string;
|
|
4096
|
+
aop_config: {
|
|
4097
|
+
[key: string]: unknown;
|
|
4098
|
+
};
|
|
4099
|
+
conversation?: {
|
|
4100
|
+
[key: string]: unknown;
|
|
4101
|
+
};
|
|
4102
|
+
};
|
|
4103
|
+
};
|
|
4104
|
+
};
|
|
4105
|
+
/** @description Invalid AOP configuration or request */
|
|
4106
|
+
400: {
|
|
4107
|
+
headers: {
|
|
4108
|
+
[name: string]: unknown;
|
|
4109
|
+
};
|
|
4110
|
+
content?: never;
|
|
4111
|
+
};
|
|
4112
|
+
/** @description Unauthorized */
|
|
4113
|
+
401: {
|
|
4114
|
+
headers: {
|
|
4115
|
+
[name: string]: unknown;
|
|
4116
|
+
};
|
|
4117
|
+
content?: never;
|
|
4118
|
+
};
|
|
4119
|
+
/** @description Insufficient AI credits */
|
|
4120
|
+
402: {
|
|
4121
|
+
headers: {
|
|
4122
|
+
[name: string]: unknown;
|
|
4123
|
+
};
|
|
4124
|
+
content?: never;
|
|
4125
|
+
};
|
|
4126
|
+
/** @description Forbidden. Missing OAuth scope. */
|
|
4127
|
+
403: {
|
|
4128
|
+
headers: {
|
|
4129
|
+
[name: string]: unknown;
|
|
4130
|
+
};
|
|
4131
|
+
content?: never;
|
|
4132
|
+
};
|
|
4133
|
+
/** @description AOP or thread not found */
|
|
4134
|
+
404: {
|
|
4135
|
+
headers: {
|
|
4136
|
+
[name: string]: unknown;
|
|
4137
|
+
};
|
|
4138
|
+
content?: never;
|
|
4139
|
+
};
|
|
4140
|
+
/** @description Internal server error */
|
|
4141
|
+
500: {
|
|
4142
|
+
headers: {
|
|
4143
|
+
[name: string]: unknown;
|
|
4144
|
+
};
|
|
4145
|
+
content?: never;
|
|
4146
|
+
};
|
|
4147
|
+
};
|
|
4148
|
+
};
|
|
4149
|
+
post_v1_aop_create: {
|
|
4150
|
+
parameters: {
|
|
4151
|
+
query?: never;
|
|
4152
|
+
header?: never;
|
|
4153
|
+
path?: never;
|
|
4154
|
+
cookie?: never;
|
|
4155
|
+
};
|
|
4156
|
+
requestBody: {
|
|
4157
|
+
content: {
|
|
4158
|
+
/**
|
|
4159
|
+
* @example {
|
|
4160
|
+
* "title": "Market Research Report",
|
|
4161
|
+
* "prompt": "Generate a comprehensive market research report for [[ company ]]",
|
|
4162
|
+
* "agentId": "research"
|
|
4163
|
+
* }
|
|
4164
|
+
*/
|
|
4165
|
+
"application/json": {
|
|
4166
|
+
title?: string | null;
|
|
4167
|
+
prompt?: string | null;
|
|
4168
|
+
description?: string | null;
|
|
4169
|
+
agentId?: string | null;
|
|
4170
|
+
agent_config?: {
|
|
4171
|
+
[key: string]: unknown;
|
|
4172
|
+
} | null;
|
|
4173
|
+
icon?: string | null;
|
|
4174
|
+
section?: string | null;
|
|
4175
|
+
structured_output?: {
|
|
4176
|
+
[key: string]: unknown;
|
|
4177
|
+
} | null;
|
|
4178
|
+
user_notification_configs?: {
|
|
4179
|
+
[key: string]: unknown;
|
|
4180
|
+
} | null;
|
|
4181
|
+
/** @description Optional workstream ID. */
|
|
4182
|
+
parent_folder_id?: string | null;
|
|
4183
|
+
/** @description Required for session auth. Optional for API keys. */
|
|
4184
|
+
organizationId?: string;
|
|
4185
|
+
};
|
|
4186
|
+
};
|
|
4187
|
+
};
|
|
4188
|
+
responses: {
|
|
4189
|
+
/** @description Success */
|
|
4190
|
+
200: {
|
|
4191
|
+
headers: {
|
|
4192
|
+
[name: string]: unknown;
|
|
4193
|
+
};
|
|
4194
|
+
content: {
|
|
4195
|
+
"application/json": {
|
|
4196
|
+
aop_id: string;
|
|
4197
|
+
title: string;
|
|
4198
|
+
/** @default created */
|
|
4199
|
+
status: string;
|
|
4200
|
+
message?: string;
|
|
4201
|
+
parent_folder_id?: string | null;
|
|
4202
|
+
};
|
|
4203
|
+
};
|
|
4204
|
+
};
|
|
4205
|
+
/** @description Invalid AOP configuration or request */
|
|
4206
|
+
400: {
|
|
4207
|
+
headers: {
|
|
4208
|
+
[name: string]: unknown;
|
|
4209
|
+
};
|
|
4210
|
+
content?: never;
|
|
4211
|
+
};
|
|
4212
|
+
/** @description Unauthorized */
|
|
4213
|
+
401: {
|
|
4214
|
+
headers: {
|
|
4215
|
+
[name: string]: unknown;
|
|
4216
|
+
};
|
|
4217
|
+
content?: never;
|
|
4218
|
+
};
|
|
4219
|
+
/** @description Insufficient AI credits */
|
|
4220
|
+
402: {
|
|
4221
|
+
headers: {
|
|
4222
|
+
[name: string]: unknown;
|
|
4223
|
+
};
|
|
4224
|
+
content?: never;
|
|
4225
|
+
};
|
|
4226
|
+
/** @description Forbidden. Missing OAuth scope. */
|
|
4227
|
+
403: {
|
|
4228
|
+
headers: {
|
|
4229
|
+
[name: string]: unknown;
|
|
4230
|
+
};
|
|
4231
|
+
content?: never;
|
|
4232
|
+
};
|
|
4233
|
+
/** @description AOP or thread not found */
|
|
4234
|
+
404: {
|
|
4235
|
+
headers: {
|
|
4236
|
+
[name: string]: unknown;
|
|
4237
|
+
};
|
|
4238
|
+
content?: never;
|
|
4239
|
+
};
|
|
4240
|
+
/** @description Internal server error */
|
|
4241
|
+
500: {
|
|
4242
|
+
headers: {
|
|
4243
|
+
[name: string]: unknown;
|
|
4244
|
+
};
|
|
4245
|
+
content?: never;
|
|
4246
|
+
};
|
|
4247
|
+
};
|
|
4248
|
+
};
|
|
4249
|
+
post_v1_aop_retry: {
|
|
4250
|
+
parameters: {
|
|
4251
|
+
query?: never;
|
|
4252
|
+
header?: never;
|
|
4253
|
+
path?: never;
|
|
4254
|
+
cookie?: never;
|
|
4255
|
+
};
|
|
4256
|
+
requestBody: {
|
|
4257
|
+
content: {
|
|
4258
|
+
"application/json": {
|
|
4259
|
+
/** @description Thread ID of the failed AOP execution to retry. */
|
|
4260
|
+
thread_id: string;
|
|
4261
|
+
/** @description Optional user inputs appended to the AOP prompt as key-value pairs. */
|
|
4262
|
+
user_inputs?: {
|
|
4263
|
+
[key: string]: string | number | boolean;
|
|
4264
|
+
} | null;
|
|
4265
|
+
/** @description Required for session auth. Optional for API keys. */
|
|
4266
|
+
organizationId?: string;
|
|
4267
|
+
};
|
|
4268
|
+
};
|
|
4269
|
+
};
|
|
4270
|
+
responses: {
|
|
4271
|
+
/** @description Success */
|
|
4272
|
+
200: {
|
|
4273
|
+
headers: {
|
|
4274
|
+
[name: string]: unknown;
|
|
4275
|
+
};
|
|
4276
|
+
content: {
|
|
4277
|
+
"application/json": {
|
|
4278
|
+
/** @constant */
|
|
4279
|
+
status: "started";
|
|
4280
|
+
new_thread_id: string;
|
|
4281
|
+
message: string;
|
|
4282
|
+
};
|
|
4283
|
+
};
|
|
4284
|
+
};
|
|
4285
|
+
/** @description Invalid AOP configuration or request */
|
|
4286
|
+
400: {
|
|
4287
|
+
headers: {
|
|
4288
|
+
[name: string]: unknown;
|
|
4289
|
+
};
|
|
4290
|
+
content?: never;
|
|
4291
|
+
};
|
|
4292
|
+
/** @description Unauthorized */
|
|
4293
|
+
401: {
|
|
4294
|
+
headers: {
|
|
4295
|
+
[name: string]: unknown;
|
|
4296
|
+
};
|
|
4297
|
+
content?: never;
|
|
4298
|
+
};
|
|
4299
|
+
/** @description Insufficient AI credits */
|
|
4300
|
+
402: {
|
|
4301
|
+
headers: {
|
|
4302
|
+
[name: string]: unknown;
|
|
4303
|
+
};
|
|
4304
|
+
content?: never;
|
|
4305
|
+
};
|
|
4306
|
+
/** @description Forbidden. Missing OAuth scope. */
|
|
4307
|
+
403: {
|
|
4308
|
+
headers: {
|
|
4309
|
+
[name: string]: unknown;
|
|
4310
|
+
};
|
|
4311
|
+
content?: never;
|
|
4312
|
+
};
|
|
4313
|
+
/** @description AOP or thread not found */
|
|
4314
|
+
404: {
|
|
4315
|
+
headers: {
|
|
4316
|
+
[name: string]: unknown;
|
|
4317
|
+
};
|
|
4318
|
+
content?: never;
|
|
4319
|
+
};
|
|
4320
|
+
/** @description Internal server error */
|
|
4321
|
+
500: {
|
|
4322
|
+
headers: {
|
|
4323
|
+
[name: string]: unknown;
|
|
4324
|
+
};
|
|
4325
|
+
content?: never;
|
|
4326
|
+
};
|
|
4327
|
+
};
|
|
4328
|
+
};
|
|
4329
|
+
get_v1_campaigns: {
|
|
4330
|
+
parameters: {
|
|
4331
|
+
query?: {
|
|
4332
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
4333
|
+
organizationId?: string;
|
|
4334
|
+
/** @description Search campaign name. */
|
|
4335
|
+
q?: string;
|
|
4336
|
+
/** @description `all` lists draft and running campaigns. Any other value lists that stage only. */
|
|
4337
|
+
stage?:
|
|
4338
|
+
| "all"
|
|
4339
|
+
| "draft"
|
|
4340
|
+
| "approved"
|
|
4341
|
+
| "running"
|
|
4342
|
+
| "ending"
|
|
4343
|
+
| "completed"
|
|
4344
|
+
| "archived";
|
|
4345
|
+
offset?: number;
|
|
4346
|
+
limit?: number;
|
|
4347
|
+
};
|
|
4348
|
+
header?: never;
|
|
4349
|
+
path?: never;
|
|
4350
|
+
cookie?: never;
|
|
4351
|
+
};
|
|
4352
|
+
requestBody?: never;
|
|
4353
|
+
responses: {
|
|
4354
|
+
/** @description Campaign page and stage summary. */
|
|
4355
|
+
200: {
|
|
4356
|
+
headers: {
|
|
4357
|
+
[name: string]: unknown;
|
|
4358
|
+
};
|
|
4359
|
+
content: {
|
|
4360
|
+
"application/json": {
|
|
4361
|
+
campaigns: {
|
|
4362
|
+
id: string;
|
|
4363
|
+
organizationId: string;
|
|
4364
|
+
revision: number;
|
|
4365
|
+
/** @enum {string} */
|
|
4366
|
+
stage:
|
|
4367
|
+
| "draft"
|
|
4368
|
+
| "approved"
|
|
4369
|
+
| "running"
|
|
4370
|
+
| "ending"
|
|
4371
|
+
| "completed"
|
|
4372
|
+
| "archived";
|
|
4373
|
+
approval: {
|
|
4374
|
+
revision: number;
|
|
4375
|
+
userId: string;
|
|
4376
|
+
approvedAt: string;
|
|
4377
|
+
} | null;
|
|
4378
|
+
runId: string | null;
|
|
4379
|
+
startedAt: string | null;
|
|
4380
|
+
endedAt: string | null;
|
|
4381
|
+
createdAt: string;
|
|
4382
|
+
updatedAt: string;
|
|
4383
|
+
name: string;
|
|
4384
|
+
brand: string;
|
|
4385
|
+
storeCount: number;
|
|
4386
|
+
windowCount: number;
|
|
4387
|
+
offerCount: number;
|
|
4388
|
+
cleanupFailed?: boolean;
|
|
4389
|
+
}[];
|
|
4390
|
+
total: number;
|
|
4391
|
+
hasMore: boolean;
|
|
4392
|
+
nextOffset: number;
|
|
4393
|
+
summary: {
|
|
4394
|
+
/** @description Draft and running campaigns matching `q`. */
|
|
4395
|
+
totalCount: number;
|
|
4396
|
+
stageCounts: {
|
|
4397
|
+
[key: string]: number;
|
|
4398
|
+
};
|
|
4399
|
+
};
|
|
4400
|
+
pagination: {
|
|
4401
|
+
offset: number;
|
|
4402
|
+
limit: number;
|
|
4403
|
+
total: number;
|
|
4404
|
+
hasMore: boolean;
|
|
4405
|
+
nextOffset: number | null;
|
|
4406
|
+
maxLimit: number;
|
|
4407
|
+
defaultLimit: number;
|
|
4408
|
+
};
|
|
4409
|
+
};
|
|
4410
|
+
};
|
|
4411
|
+
};
|
|
4412
|
+
/** @description Invalid campaign payload or plan state. */
|
|
4413
|
+
400: {
|
|
4414
|
+
headers: {
|
|
4415
|
+
[name: string]: unknown;
|
|
4416
|
+
};
|
|
4417
|
+
content?: never;
|
|
4418
|
+
};
|
|
4419
|
+
/** @description Unauthorized */
|
|
4420
|
+
401: {
|
|
4421
|
+
headers: {
|
|
4422
|
+
[name: string]: unknown;
|
|
4423
|
+
};
|
|
4424
|
+
content?: never;
|
|
4425
|
+
};
|
|
4426
|
+
/** @description Forbidden: missing `promotions:read` scope, or a session member without organization-wide access */
|
|
4427
|
+
403: {
|
|
4428
|
+
headers: {
|
|
4429
|
+
[name: string]: unknown;
|
|
4430
|
+
};
|
|
4431
|
+
content?: never;
|
|
4432
|
+
};
|
|
4433
|
+
/** @description Rate limit exceeded */
|
|
4434
|
+
429: {
|
|
4435
|
+
headers: {
|
|
4436
|
+
[name: string]: unknown;
|
|
4437
|
+
};
|
|
4438
|
+
content?: never;
|
|
4439
|
+
};
|
|
4440
|
+
/** @description Internal Server Error */
|
|
4441
|
+
500: {
|
|
4442
|
+
headers: {
|
|
4443
|
+
[name: string]: unknown;
|
|
4444
|
+
};
|
|
4445
|
+
content?: never;
|
|
4446
|
+
};
|
|
4447
|
+
};
|
|
4448
|
+
};
|
|
4449
|
+
post_v1_campaigns: {
|
|
4450
|
+
parameters: {
|
|
4451
|
+
query?: never;
|
|
4452
|
+
header?: never;
|
|
4453
|
+
path?: never;
|
|
4454
|
+
cookie?: never;
|
|
4455
|
+
};
|
|
4456
|
+
requestBody: {
|
|
4457
|
+
content: {
|
|
4458
|
+
"application/json": {
|
|
4459
|
+
/** @description Required for session auth. Optional for an API key, which already identifies the organization. */
|
|
4460
|
+
organizationId?: string;
|
|
4461
|
+
plan: {
|
|
4462
|
+
brief: {
|
|
4463
|
+
name: string;
|
|
4464
|
+
/** @default */
|
|
4465
|
+
objective?: string;
|
|
4466
|
+
/** @default */
|
|
4467
|
+
brand?: string;
|
|
4468
|
+
ownerId: string;
|
|
4469
|
+
approverId: string;
|
|
4470
|
+
timezone: string;
|
|
4471
|
+
/** @default [] */
|
|
4472
|
+
stores?: {
|
|
4473
|
+
/** @enum {string} */
|
|
4474
|
+
marketplace:
|
|
4475
|
+
| "shopee"
|
|
4476
|
+
| "lazada"
|
|
4477
|
+
| "tiktok"
|
|
4478
|
+
| "shopify"
|
|
4479
|
+
| "whatsapp"
|
|
4480
|
+
| "zalora"
|
|
4481
|
+
| "amazon"
|
|
4482
|
+
| "ebay";
|
|
4483
|
+
country: string;
|
|
4484
|
+
storeId: string;
|
|
4485
|
+
}[];
|
|
4486
|
+
/** @default */
|
|
4487
|
+
serviceRequest?: string;
|
|
4488
|
+
/**
|
|
4489
|
+
* @default standard
|
|
4490
|
+
* @enum {string}
|
|
4491
|
+
*/
|
|
4492
|
+
priority?: "standard" | "priority" | "super_priority";
|
|
4493
|
+
/** @default [] */
|
|
4494
|
+
documentIds?: string[];
|
|
4495
|
+
/** @default null */
|
|
4496
|
+
reviewDueAt?: string | null;
|
|
4497
|
+
sourceCurrency?: string;
|
|
4498
|
+
/** @enum {string} */
|
|
4499
|
+
sourceMarketplace?:
|
|
4500
|
+
| "shopee"
|
|
4501
|
+
| "lazada"
|
|
4502
|
+
| "tiktok"
|
|
4503
|
+
| "shopify"
|
|
4504
|
+
| "whatsapp"
|
|
4505
|
+
| "zalora"
|
|
4506
|
+
| "amazon"
|
|
4507
|
+
| "ebay";
|
|
4508
|
+
sourceCountry?: string;
|
|
4509
|
+
/** @default */
|
|
4510
|
+
cleanupNotes?: string;
|
|
4511
|
+
};
|
|
4512
|
+
/** @default [] */
|
|
4513
|
+
windows?: {
|
|
4514
|
+
id: string;
|
|
4515
|
+
name: string;
|
|
4516
|
+
/**
|
|
4517
|
+
* @description Preparation time: publish promotions with the future live start/end. Must be at or before startsAt.
|
|
4518
|
+
* @default null
|
|
4519
|
+
*/
|
|
4520
|
+
preparesAt?: string | null;
|
|
4521
|
+
startsAt: string | null;
|
|
4522
|
+
endsAt: string | null;
|
|
4523
|
+
/** @default */
|
|
4524
|
+
reviewNotes?: string;
|
|
4525
|
+
}[];
|
|
4526
|
+
offers?: {
|
|
4527
|
+
id: string;
|
|
4528
|
+
windowId: string;
|
|
4529
|
+
/**
|
|
4530
|
+
* Format: uuid
|
|
4531
|
+
* @description Existing draft promotion attached to this window; the campaign controls its live dates.
|
|
4532
|
+
*/
|
|
4533
|
+
promotionId?: string;
|
|
4534
|
+
promotion: {
|
|
4535
|
+
name?: string;
|
|
4536
|
+
description?: string | null;
|
|
4537
|
+
/**
|
|
4538
|
+
* @description Canonical OmniCommerce promotion mechanic: product discount, flash sale, voucher, gift with purchase, Buy-X-Get-Y, bundle deal, or Lazada-only free shipping and early bird price.
|
|
4539
|
+
* @enum {string}
|
|
4540
|
+
*/
|
|
4541
|
+
kind?:
|
|
4542
|
+
| "product_discount"
|
|
4543
|
+
| "flash_sale"
|
|
4544
|
+
| "voucher"
|
|
4545
|
+
| "gift_with_purchase"
|
|
4546
|
+
| "buy_x_get_y"
|
|
4547
|
+
| "bundle_deal"
|
|
4548
|
+
| "free_shipping"
|
|
4549
|
+
| "early_bird_price";
|
|
4550
|
+
salesChannels?: ("pdp" | "live")[];
|
|
4551
|
+
/** @enum {string} */
|
|
4552
|
+
discountType?: "percentage" | "fixed_amount";
|
|
4553
|
+
discountValue?: number;
|
|
4554
|
+
/** @description Patch discount terms for exact target store keys; unnamed stores remain unchanged. Null discountValue restores shared campaign terms for that store. */
|
|
4555
|
+
storeDiscounts?: {
|
|
4556
|
+
storeKey: string;
|
|
4557
|
+
/** @enum {string} */
|
|
4558
|
+
discountType: "percentage" | "fixed_amount";
|
|
4559
|
+
discountValue: number | null;
|
|
4560
|
+
}[];
|
|
4561
|
+
/** @description Up to 100 connected stores for create (required) or update. Copy marketplace, country, and storeId from get_promotions targetStores or find_products marketplaceDetails. Do not concatenate a storeKeys string. */
|
|
4562
|
+
targetStores?: {
|
|
4563
|
+
/** @enum {string} */
|
|
4564
|
+
marketplace:
|
|
4565
|
+
| "lazada"
|
|
4566
|
+
| "shopee"
|
|
4567
|
+
| "tiktok"
|
|
4568
|
+
| "shopify"
|
|
4569
|
+
| "amazon"
|
|
4570
|
+
| "zalora"
|
|
4571
|
+
| "ebay";
|
|
4572
|
+
country: string;
|
|
4573
|
+
storeId: string;
|
|
4574
|
+
}[];
|
|
4575
|
+
minSalePrice?: number | null;
|
|
4576
|
+
maxDiscountAmount?: number | null;
|
|
4577
|
+
minSpend?: number | null;
|
|
4578
|
+
voucherCode?: string | null;
|
|
4579
|
+
claimStartsAt?: string | null;
|
|
4580
|
+
totalUsageLimit?: number | null;
|
|
4581
|
+
perBuyerLimit?: number | null;
|
|
4582
|
+
mechanicConfig?: {
|
|
4583
|
+
/** @description Voucher subtype from get_promotions capabilities.voucherTypes. Browser AOP types (delivery=browser_aop) are writable Seller Center vouchers. Omit browserAutomation.aopId to use the built-in marketplace AOP. */
|
|
4584
|
+
voucherType?:
|
|
4585
|
+
| (
|
|
4586
|
+
| "shopee_shop"
|
|
4587
|
+
| "shopee_product"
|
|
4588
|
+
| "shopee_private"
|
|
4589
|
+
| "shopee_live"
|
|
4590
|
+
| "shopee_video"
|
|
4591
|
+
| "shopee_new_buyer"
|
|
4592
|
+
| "shopee_repeat_buyer"
|
|
4593
|
+
| "shopee_follow_prize"
|
|
4594
|
+
| "shopee_exclusive_streamer"
|
|
4595
|
+
| "shopee_welcome"
|
|
4596
|
+
| "shopee_member_repeat_buyer"
|
|
4597
|
+
| "shopee_exclusive"
|
|
4598
|
+
| "shopee_redemption"
|
|
4599
|
+
| "shopee_exclusive_creator"
|
|
4600
|
+
| "lazada_store_follower"
|
|
4601
|
+
| "lazada_regular"
|
|
4602
|
+
| "lazada_store_new_buyer"
|
|
4603
|
+
| "lazada_live"
|
|
4604
|
+
| "lazada_offline"
|
|
4605
|
+
| "lazada_co_funded"
|
|
4606
|
+
| "lazada_welcome"
|
|
4607
|
+
| "lazada_linked_member"
|
|
4608
|
+
| "lazada_new_member"
|
|
4609
|
+
| "lazada_member_exclusive"
|
|
4610
|
+
| "lazada_points_redeemable"
|
|
4611
|
+
| "tiktok_seller_coupon"
|
|
4612
|
+
| "shopify_discount_code"
|
|
4613
|
+
| "amazon_promotion_code"
|
|
4614
|
+
| "zalora_seller_voucher"
|
|
4615
|
+
| "ebay_coded_coupon"
|
|
4616
|
+
)
|
|
4617
|
+
| null;
|
|
4618
|
+
browserAutomation?: {
|
|
4619
|
+
aopId?: string;
|
|
4620
|
+
variableValues?: {
|
|
4621
|
+
[key: string]: string;
|
|
4622
|
+
};
|
|
4623
|
+
instructions?: string;
|
|
4624
|
+
} | null;
|
|
4625
|
+
/**
|
|
4626
|
+
* @description shop = all products, products = selected assigned products. Repeat Buyer defaults to shop.
|
|
4627
|
+
* @enum {string}
|
|
4628
|
+
*/
|
|
4629
|
+
voucherScope?: "products" | "shop";
|
|
4630
|
+
/**
|
|
4631
|
+
* @description Seller Center reward type. coins_cashback is a percentage greater than 3 and does not reduce salePrice.
|
|
4632
|
+
* @enum {string}
|
|
4633
|
+
*/
|
|
4634
|
+
voucherReward?: "discount" | "coins_cashback";
|
|
4635
|
+
/** @enum {string} */
|
|
4636
|
+
voucherAudience?: "general" | "shop_follow";
|
|
4637
|
+
/** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
|
|
4638
|
+
repeatPurchaseMinCount?: number;
|
|
4639
|
+
/** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
|
|
4640
|
+
repeatPurchaseLookbackDays?: number;
|
|
4641
|
+
/** @description Shopee Smart Voucher toggle. Used by New Buyer and similar portal types. */
|
|
4642
|
+
smartVoucher?: boolean;
|
|
4643
|
+
/** @description Shopee Follow Prize: days after claim until expiry. Seller Center is 7. */
|
|
4644
|
+
followPrizeExpiryDays?: number;
|
|
4645
|
+
/**
|
|
4646
|
+
* @description Shopee Video display: shopee_video = all Shopee Video; creator_video = targeted creator videos only.
|
|
4647
|
+
* @enum {string}
|
|
4648
|
+
*/
|
|
4649
|
+
videoDisplayMode?: "shopee_video" | "creator_video";
|
|
4650
|
+
/** @description Exclusive Creator Voucher: up to 15 Shopee usernames. */
|
|
4651
|
+
exclusiveCreatorUsernames?: string[];
|
|
4652
|
+
/** @description Exclusive Streamer Voucher: up to 15 Shopee usernames. */
|
|
4653
|
+
exclusiveStreamerUsernames?: string[];
|
|
4654
|
+
/** @description Shopee display setting. ["all"] = display on all pages; [] = hidden/share by code. */
|
|
4655
|
+
voucherDisplayChannels?: (
|
|
4656
|
+
| "all"
|
|
4657
|
+
| "feed"
|
|
4658
|
+
| "live"
|
|
4659
|
+
| "order_page"
|
|
4660
|
+
| "followers"
|
|
4661
|
+
| "offline"
|
|
4662
|
+
)[];
|
|
4663
|
+
/** @enum {string} */
|
|
4664
|
+
bundlePriceType?: "discount" | "fixed_price";
|
|
4665
|
+
bundleTiers?: {
|
|
4666
|
+
minimumQuantity: number;
|
|
4667
|
+
discountValue: number;
|
|
4668
|
+
}[];
|
|
4669
|
+
/** @enum {string} */
|
|
4670
|
+
thresholdType?: "item_quantity" | "order_amount";
|
|
4671
|
+
thresholdValue?: number;
|
|
4672
|
+
/** @enum {string} */
|
|
4673
|
+
giftType?: "gift" | "sample";
|
|
4674
|
+
giftQuantity?: number;
|
|
4675
|
+
gifts?: {
|
|
4676
|
+
/** Format: uuid */
|
|
4677
|
+
productId: string;
|
|
4678
|
+
variantId?: string | null;
|
|
4679
|
+
totalClaimLimit: number;
|
|
4680
|
+
}[];
|
|
4681
|
+
buyQuantity?: number;
|
|
4682
|
+
getQuantity?: number;
|
|
4683
|
+
benefitProductIds?: string[];
|
|
4684
|
+
/** @enum {string} */
|
|
4685
|
+
benefitType?: "free" | "percentage" | "fixed_amount";
|
|
4686
|
+
benefitValue?: number;
|
|
4687
|
+
maxApplicationsPerOrder?: number;
|
|
4688
|
+
bundleMinimumQuantity?: number;
|
|
4689
|
+
/** @description Free shipping delivery option. Lazada: STANDARD (default), ECONOMY, EXPRESS, SELLER_OWN_FLEET or P2P, as offered by the store. */
|
|
4690
|
+
shippingDeliveryOption?: string;
|
|
4691
|
+
/** @description Free shipping: total shipping subsidy budget in the store currency. Omit for an unlimited budget. */
|
|
4692
|
+
shippingBudget?: number;
|
|
4693
|
+
};
|
|
4694
|
+
};
|
|
4695
|
+
/** @default [] */
|
|
4696
|
+
productIds?: string[];
|
|
4697
|
+
/** @default */
|
|
4698
|
+
reviewNotes?: string;
|
|
4699
|
+
/** @default */
|
|
4700
|
+
excludedReason?: string;
|
|
4701
|
+
source?: {
|
|
4702
|
+
sheet: string;
|
|
4703
|
+
rows: number[];
|
|
4704
|
+
headers: string[];
|
|
4705
|
+
values: string[][];
|
|
4706
|
+
};
|
|
4707
|
+
}[];
|
|
4708
|
+
};
|
|
4709
|
+
};
|
|
4710
|
+
};
|
|
4711
|
+
};
|
|
4712
|
+
responses: {
|
|
4713
|
+
/** @description Campaign detail: plan, revision, executions, audit, schedule, and progress. */
|
|
4714
|
+
201: {
|
|
4715
|
+
headers: {
|
|
4716
|
+
[name: string]: unknown;
|
|
4717
|
+
};
|
|
4718
|
+
content: {
|
|
4719
|
+
"application/json": {
|
|
4720
|
+
campaign: {
|
|
4721
|
+
id: string;
|
|
4722
|
+
organizationId: string;
|
|
4723
|
+
revision: number;
|
|
4724
|
+
/** @enum {string} */
|
|
4725
|
+
stage:
|
|
4726
|
+
| "draft"
|
|
4727
|
+
| "approved"
|
|
4728
|
+
| "running"
|
|
4729
|
+
| "ending"
|
|
4730
|
+
| "completed"
|
|
4731
|
+
| "archived";
|
|
4732
|
+
approval: {
|
|
4733
|
+
revision: number;
|
|
4734
|
+
userId: string;
|
|
4735
|
+
approvedAt: string;
|
|
4736
|
+
} | null;
|
|
4737
|
+
runId: string | null;
|
|
4738
|
+
startedAt: string | null;
|
|
4739
|
+
endedAt: string | null;
|
|
4740
|
+
createdAt: string;
|
|
4741
|
+
updatedAt: string;
|
|
4742
|
+
plan: components["schemas"]["CampaignPlan"];
|
|
4743
|
+
/** @description A running campaign's proposed plan, applied only when the approver approves it. */
|
|
4744
|
+
pendingChange: {
|
|
4745
|
+
version: number;
|
|
4746
|
+
plan: components["schemas"]["CampaignPlan"];
|
|
4747
|
+
proposedBy: string;
|
|
4748
|
+
proposedAt: string;
|
|
4749
|
+
} | null;
|
|
4750
|
+
};
|
|
4751
|
+
executions: {
|
|
4752
|
+
offerId: string;
|
|
4753
|
+
windowId: string;
|
|
4754
|
+
promotionId: string | null;
|
|
4755
|
+
/** @enum {string} */
|
|
4756
|
+
state:
|
|
4757
|
+
| "draft"
|
|
4758
|
+
| "activating"
|
|
4759
|
+
| "prepared"
|
|
4760
|
+
| "active"
|
|
4761
|
+
| "ending"
|
|
4762
|
+
| "ended"
|
|
4763
|
+
| "failed";
|
|
4764
|
+
error: string | null;
|
|
4765
|
+
evidence: unknown;
|
|
4766
|
+
termsRevision: number | null;
|
|
4767
|
+
}[];
|
|
4768
|
+
audit: {
|
|
4769
|
+
id: string;
|
|
4770
|
+
action: string;
|
|
4771
|
+
actorId: string | null;
|
|
4772
|
+
actorName: string | null;
|
|
4773
|
+
createdAt: string;
|
|
4774
|
+
details: {
|
|
4775
|
+
[key: string]: unknown;
|
|
4776
|
+
};
|
|
4777
|
+
summary?: string;
|
|
4778
|
+
items?: {
|
|
4779
|
+
/** @enum {string} */
|
|
4780
|
+
kind: "brief" | "window" | "offer";
|
|
4781
|
+
/** @enum {string} */
|
|
4782
|
+
action: "add" | "update" | "remove";
|
|
4783
|
+
id: string;
|
|
4784
|
+
name: string;
|
|
4785
|
+
changes: {
|
|
4786
|
+
field: string;
|
|
4787
|
+
label: string;
|
|
4788
|
+
from: string | null;
|
|
4789
|
+
to: string | null;
|
|
4790
|
+
}[];
|
|
4791
|
+
}[];
|
|
4792
|
+
hiddenCount?: number;
|
|
4793
|
+
}[];
|
|
4794
|
+
/** @description Issues that block approving or running the current plan. */
|
|
4795
|
+
readiness: string[];
|
|
4796
|
+
/** @description Issues that block approving the proposed live change. */
|
|
4797
|
+
pendingChangeIssues: string[];
|
|
4798
|
+
pendingScheduleCount: number;
|
|
4799
|
+
failedScheduleCount: number;
|
|
4800
|
+
waitingBrowserJobCount: number;
|
|
4801
|
+
scheduleIssues?: {
|
|
4802
|
+
windowId: string;
|
|
4803
|
+
/** @enum {string} */
|
|
4804
|
+
phase: "prepare" | "live";
|
|
4805
|
+
/** @enum {string} */
|
|
4806
|
+
kind: "overdue" | "missed";
|
|
4807
|
+
}[];
|
|
4808
|
+
recovery?: {
|
|
4809
|
+
windowId: string;
|
|
4810
|
+
/** @enum {string} */
|
|
4811
|
+
phase: "prepare" | "live" | "start" | "end" | "revise";
|
|
4812
|
+
state: string;
|
|
4813
|
+
attempt: number;
|
|
4814
|
+
nextRetryAt: string;
|
|
4815
|
+
error: string | null;
|
|
4816
|
+
}[];
|
|
4817
|
+
cleanupFailed?: boolean;
|
|
4818
|
+
progress?: {
|
|
4819
|
+
asOf: string;
|
|
4820
|
+
title: string;
|
|
4821
|
+
description: string;
|
|
4822
|
+
total: number;
|
|
4823
|
+
counts: {
|
|
4824
|
+
waiting: number;
|
|
4825
|
+
preparing: number;
|
|
4826
|
+
prepared: number;
|
|
4827
|
+
live: number;
|
|
4828
|
+
ending: number;
|
|
4829
|
+
ended: number;
|
|
4830
|
+
cancelled: number;
|
|
4831
|
+
failed: number;
|
|
4832
|
+
};
|
|
4833
|
+
issues: {
|
|
4834
|
+
offerId: string;
|
|
4835
|
+
name: string;
|
|
4836
|
+
error: string;
|
|
4837
|
+
}[];
|
|
4838
|
+
scheduleIssues: {
|
|
4839
|
+
windowId: string;
|
|
4840
|
+
/** @enum {string} */
|
|
4841
|
+
phase: "prepare" | "live";
|
|
4842
|
+
/** @enum {string} */
|
|
4843
|
+
kind: "overdue" | "missed";
|
|
4844
|
+
name: string;
|
|
4845
|
+
message: string;
|
|
4846
|
+
}[];
|
|
4847
|
+
blockers: string[];
|
|
4848
|
+
nextWindow: {
|
|
4849
|
+
id: string;
|
|
4850
|
+
name: string;
|
|
4851
|
+
preparesAt: string | null;
|
|
4852
|
+
startsAt: string | null;
|
|
4853
|
+
endsAt: string | null;
|
|
4854
|
+
} | null;
|
|
4855
|
+
};
|
|
4856
|
+
};
|
|
4857
|
+
};
|
|
4858
|
+
};
|
|
4859
|
+
/** @description Invalid campaign payload or plan state. */
|
|
4860
|
+
400: {
|
|
4861
|
+
headers: {
|
|
4862
|
+
[name: string]: unknown;
|
|
4863
|
+
};
|
|
4864
|
+
content?: never;
|
|
4865
|
+
};
|
|
4866
|
+
/** @description Unauthorized */
|
|
4867
|
+
401: {
|
|
4868
|
+
headers: {
|
|
4869
|
+
[name: string]: unknown;
|
|
4870
|
+
};
|
|
4871
|
+
content?: never;
|
|
4872
|
+
};
|
|
4873
|
+
/** @description Forbidden: missing `promotions:write` scope, or a session member without organization-wide access */
|
|
4874
|
+
403: {
|
|
4875
|
+
headers: {
|
|
4876
|
+
[name: string]: unknown;
|
|
4877
|
+
};
|
|
4878
|
+
content?: never;
|
|
4879
|
+
};
|
|
4880
|
+
/** @description Rate limit exceeded */
|
|
4881
|
+
429: {
|
|
4882
|
+
headers: {
|
|
4883
|
+
[name: string]: unknown;
|
|
4884
|
+
};
|
|
4885
|
+
content?: never;
|
|
4886
|
+
};
|
|
4887
|
+
/** @description Internal Server Error */
|
|
4888
|
+
500: {
|
|
4889
|
+
headers: {
|
|
4890
|
+
[name: string]: unknown;
|
|
4891
|
+
};
|
|
4892
|
+
content?: never;
|
|
4893
|
+
};
|
|
4894
|
+
};
|
|
4895
|
+
};
|
|
4896
|
+
get_v1_campaigns_by_campaignid: {
|
|
4897
|
+
parameters: {
|
|
4898
|
+
query?: {
|
|
4899
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
4900
|
+
organizationId?: string;
|
|
4901
|
+
};
|
|
4902
|
+
header?: never;
|
|
4903
|
+
path: {
|
|
4904
|
+
campaignId: string;
|
|
4905
|
+
};
|
|
4906
|
+
cookie?: never;
|
|
4907
|
+
};
|
|
4908
|
+
requestBody?: never;
|
|
4909
|
+
responses: {
|
|
4910
|
+
/** @description Campaign detail: plan, revision, executions, audit, schedule, and progress. */
|
|
4911
|
+
200: {
|
|
4912
|
+
headers: {
|
|
4913
|
+
[name: string]: unknown;
|
|
4914
|
+
};
|
|
4915
|
+
content: {
|
|
4916
|
+
"application/json": {
|
|
4917
|
+
campaign: {
|
|
4918
|
+
id: string;
|
|
4919
|
+
organizationId: string;
|
|
4920
|
+
revision: number;
|
|
4921
|
+
/** @enum {string} */
|
|
4922
|
+
stage:
|
|
4923
|
+
| "draft"
|
|
4924
|
+
| "approved"
|
|
4925
|
+
| "running"
|
|
4926
|
+
| "ending"
|
|
4927
|
+
| "completed"
|
|
4928
|
+
| "archived";
|
|
4929
|
+
approval: {
|
|
4930
|
+
revision: number;
|
|
4931
|
+
userId: string;
|
|
4932
|
+
approvedAt: string;
|
|
4933
|
+
} | null;
|
|
4934
|
+
runId: string | null;
|
|
4935
|
+
startedAt: string | null;
|
|
4936
|
+
endedAt: string | null;
|
|
4937
|
+
createdAt: string;
|
|
4938
|
+
updatedAt: string;
|
|
4939
|
+
plan: components["schemas"]["CampaignPlan"];
|
|
4940
|
+
/** @description A running campaign's proposed plan, applied only when the approver approves it. */
|
|
4941
|
+
pendingChange: {
|
|
4942
|
+
version: number;
|
|
4943
|
+
plan: components["schemas"]["CampaignPlan"];
|
|
4944
|
+
proposedBy: string;
|
|
4945
|
+
proposedAt: string;
|
|
4946
|
+
} | null;
|
|
4947
|
+
};
|
|
4948
|
+
executions: {
|
|
4949
|
+
offerId: string;
|
|
4950
|
+
windowId: string;
|
|
4951
|
+
promotionId: string | null;
|
|
4952
|
+
/** @enum {string} */
|
|
4953
|
+
state:
|
|
4954
|
+
| "draft"
|
|
4955
|
+
| "activating"
|
|
4956
|
+
| "prepared"
|
|
4957
|
+
| "active"
|
|
4958
|
+
| "ending"
|
|
4959
|
+
| "ended"
|
|
4960
|
+
| "failed";
|
|
4961
|
+
error: string | null;
|
|
4962
|
+
evidence: unknown;
|
|
4963
|
+
termsRevision: number | null;
|
|
4964
|
+
}[];
|
|
4965
|
+
audit: {
|
|
4966
|
+
id: string;
|
|
4967
|
+
action: string;
|
|
4968
|
+
actorId: string | null;
|
|
4969
|
+
actorName: string | null;
|
|
4970
|
+
createdAt: string;
|
|
4971
|
+
details: {
|
|
4972
|
+
[key: string]: unknown;
|
|
4973
|
+
};
|
|
4974
|
+
summary?: string;
|
|
4975
|
+
items?: {
|
|
4976
|
+
/** @enum {string} */
|
|
4977
|
+
kind: "brief" | "window" | "offer";
|
|
4978
|
+
/** @enum {string} */
|
|
4979
|
+
action: "add" | "update" | "remove";
|
|
4980
|
+
id: string;
|
|
4981
|
+
name: string;
|
|
4982
|
+
changes: {
|
|
4983
|
+
field: string;
|
|
4984
|
+
label: string;
|
|
4985
|
+
from: string | null;
|
|
4986
|
+
to: string | null;
|
|
4987
|
+
}[];
|
|
4988
|
+
}[];
|
|
4989
|
+
hiddenCount?: number;
|
|
4990
|
+
}[];
|
|
4991
|
+
/** @description Issues that block approving or running the current plan. */
|
|
4992
|
+
readiness: string[];
|
|
4993
|
+
/** @description Issues that block approving the proposed live change. */
|
|
4994
|
+
pendingChangeIssues: string[];
|
|
4995
|
+
pendingScheduleCount: number;
|
|
4996
|
+
failedScheduleCount: number;
|
|
4997
|
+
waitingBrowserJobCount: number;
|
|
4998
|
+
scheduleIssues?: {
|
|
4999
|
+
windowId: string;
|
|
5000
|
+
/** @enum {string} */
|
|
5001
|
+
phase: "prepare" | "live";
|
|
5002
|
+
/** @enum {string} */
|
|
5003
|
+
kind: "overdue" | "missed";
|
|
5004
|
+
}[];
|
|
5005
|
+
recovery?: {
|
|
5006
|
+
windowId: string;
|
|
5007
|
+
/** @enum {string} */
|
|
5008
|
+
phase: "prepare" | "live" | "start" | "end" | "revise";
|
|
5009
|
+
state: string;
|
|
5010
|
+
attempt: number;
|
|
5011
|
+
nextRetryAt: string;
|
|
5012
|
+
error: string | null;
|
|
5013
|
+
}[];
|
|
5014
|
+
cleanupFailed?: boolean;
|
|
5015
|
+
progress?: {
|
|
5016
|
+
asOf: string;
|
|
5017
|
+
title: string;
|
|
5018
|
+
description: string;
|
|
5019
|
+
total: number;
|
|
5020
|
+
counts: {
|
|
5021
|
+
waiting: number;
|
|
5022
|
+
preparing: number;
|
|
5023
|
+
prepared: number;
|
|
5024
|
+
live: number;
|
|
5025
|
+
ending: number;
|
|
5026
|
+
ended: number;
|
|
5027
|
+
cancelled: number;
|
|
5028
|
+
failed: number;
|
|
5029
|
+
};
|
|
5030
|
+
issues: {
|
|
5031
|
+
offerId: string;
|
|
5032
|
+
name: string;
|
|
5033
|
+
error: string;
|
|
5034
|
+
}[];
|
|
5035
|
+
scheduleIssues: {
|
|
5036
|
+
windowId: string;
|
|
5037
|
+
/** @enum {string} */
|
|
5038
|
+
phase: "prepare" | "live";
|
|
5039
|
+
/** @enum {string} */
|
|
5040
|
+
kind: "overdue" | "missed";
|
|
5041
|
+
name: string;
|
|
5042
|
+
message: string;
|
|
5043
|
+
}[];
|
|
5044
|
+
blockers: string[];
|
|
5045
|
+
nextWindow: {
|
|
5046
|
+
id: string;
|
|
5047
|
+
name: string;
|
|
5048
|
+
preparesAt: string | null;
|
|
5049
|
+
startsAt: string | null;
|
|
5050
|
+
endsAt: string | null;
|
|
5051
|
+
} | null;
|
|
5052
|
+
};
|
|
5053
|
+
};
|
|
5054
|
+
};
|
|
5055
|
+
};
|
|
5056
|
+
/** @description Invalid campaign payload or plan state. */
|
|
5057
|
+
400: {
|
|
5058
|
+
headers: {
|
|
5059
|
+
[name: string]: unknown;
|
|
5060
|
+
};
|
|
5061
|
+
content?: never;
|
|
5062
|
+
};
|
|
5063
|
+
/** @description Unauthorized */
|
|
5064
|
+
401: {
|
|
5065
|
+
headers: {
|
|
5066
|
+
[name: string]: unknown;
|
|
5067
|
+
};
|
|
5068
|
+
content?: never;
|
|
5069
|
+
};
|
|
5070
|
+
/** @description Forbidden: missing `promotions:read` scope, or a session member without organization-wide access */
|
|
5071
|
+
403: {
|
|
5072
|
+
headers: {
|
|
5073
|
+
[name: string]: unknown;
|
|
5074
|
+
};
|
|
5075
|
+
content?: never;
|
|
5076
|
+
};
|
|
5077
|
+
/** @description Campaign not found for this organization */
|
|
5078
|
+
404: {
|
|
5079
|
+
headers: {
|
|
5080
|
+
[name: string]: unknown;
|
|
5081
|
+
};
|
|
5082
|
+
content?: never;
|
|
5083
|
+
};
|
|
5084
|
+
/** @description Rate limit exceeded */
|
|
5085
|
+
429: {
|
|
5086
|
+
headers: {
|
|
5087
|
+
[name: string]: unknown;
|
|
5088
|
+
};
|
|
5089
|
+
content?: never;
|
|
5090
|
+
};
|
|
5091
|
+
/** @description Internal Server Error */
|
|
5092
|
+
500: {
|
|
5093
|
+
headers: {
|
|
5094
|
+
[name: string]: unknown;
|
|
5095
|
+
};
|
|
5096
|
+
content?: never;
|
|
5097
|
+
};
|
|
5098
|
+
};
|
|
5099
|
+
};
|
|
5100
|
+
put_v1_campaigns_by_campaignid: {
|
|
5101
|
+
parameters: {
|
|
5102
|
+
query?: never;
|
|
5103
|
+
header?: never;
|
|
5104
|
+
path: {
|
|
5105
|
+
campaignId: string;
|
|
5106
|
+
};
|
|
5107
|
+
cookie?: never;
|
|
5108
|
+
};
|
|
5109
|
+
requestBody: {
|
|
5110
|
+
content: {
|
|
5111
|
+
"application/json": {
|
|
5112
|
+
/** @description Required for session auth. Optional for an API key, which already identifies the organization. */
|
|
5113
|
+
organizationId?: string;
|
|
5114
|
+
expectedRevision: number;
|
|
5115
|
+
/** @enum {string} */
|
|
5116
|
+
expectedStage?: "draft" | "approved";
|
|
5117
|
+
expectedPendingVersion?: number | null;
|
|
5118
|
+
plan: {
|
|
5119
|
+
brief: {
|
|
5120
|
+
name: string;
|
|
5121
|
+
/** @default */
|
|
5122
|
+
objective?: string;
|
|
5123
|
+
/** @default */
|
|
5124
|
+
brand?: string;
|
|
5125
|
+
ownerId: string;
|
|
5126
|
+
approverId: string;
|
|
5127
|
+
timezone: string;
|
|
5128
|
+
/** @default [] */
|
|
5129
|
+
stores?: {
|
|
5130
|
+
/** @enum {string} */
|
|
5131
|
+
marketplace:
|
|
5132
|
+
| "shopee"
|
|
5133
|
+
| "lazada"
|
|
5134
|
+
| "tiktok"
|
|
5135
|
+
| "shopify"
|
|
5136
|
+
| "whatsapp"
|
|
5137
|
+
| "zalora"
|
|
5138
|
+
| "amazon"
|
|
5139
|
+
| "ebay";
|
|
5140
|
+
country: string;
|
|
5141
|
+
storeId: string;
|
|
5142
|
+
}[];
|
|
5143
|
+
/** @default */
|
|
5144
|
+
serviceRequest?: string;
|
|
5145
|
+
/**
|
|
5146
|
+
* @default standard
|
|
5147
|
+
* @enum {string}
|
|
5148
|
+
*/
|
|
5149
|
+
priority?: "standard" | "priority" | "super_priority";
|
|
5150
|
+
/** @default [] */
|
|
5151
|
+
documentIds?: string[];
|
|
5152
|
+
/** @default null */
|
|
5153
|
+
reviewDueAt?: string | null;
|
|
5154
|
+
sourceCurrency?: string;
|
|
5155
|
+
/** @enum {string} */
|
|
5156
|
+
sourceMarketplace?:
|
|
5157
|
+
| "shopee"
|
|
5158
|
+
| "lazada"
|
|
5159
|
+
| "tiktok"
|
|
5160
|
+
| "shopify"
|
|
5161
|
+
| "whatsapp"
|
|
5162
|
+
| "zalora"
|
|
5163
|
+
| "amazon"
|
|
5164
|
+
| "ebay";
|
|
5165
|
+
sourceCountry?: string;
|
|
5166
|
+
/** @default */
|
|
5167
|
+
cleanupNotes?: string;
|
|
5168
|
+
};
|
|
5169
|
+
/** @default [] */
|
|
5170
|
+
windows?: {
|
|
5171
|
+
id: string;
|
|
5172
|
+
name: string;
|
|
5173
|
+
/**
|
|
5174
|
+
* @description Preparation time: publish promotions with the future live start/end. Must be at or before startsAt.
|
|
5175
|
+
* @default null
|
|
5176
|
+
*/
|
|
5177
|
+
preparesAt?: string | null;
|
|
5178
|
+
startsAt: string | null;
|
|
5179
|
+
endsAt: string | null;
|
|
5180
|
+
/** @default */
|
|
5181
|
+
reviewNotes?: string;
|
|
5182
|
+
}[];
|
|
5183
|
+
offers?: {
|
|
5184
|
+
id: string;
|
|
5185
|
+
windowId: string;
|
|
5186
|
+
/**
|
|
5187
|
+
* Format: uuid
|
|
5188
|
+
* @description Existing draft promotion attached to this window; the campaign controls its live dates.
|
|
5189
|
+
*/
|
|
5190
|
+
promotionId?: string;
|
|
5191
|
+
promotion: {
|
|
5192
|
+
name?: string;
|
|
5193
|
+
description?: string | null;
|
|
5194
|
+
/**
|
|
5195
|
+
* @description Canonical OmniCommerce promotion mechanic: product discount, flash sale, voucher, gift with purchase, Buy-X-Get-Y, bundle deal, or Lazada-only free shipping and early bird price.
|
|
5196
|
+
* @enum {string}
|
|
5197
|
+
*/
|
|
5198
|
+
kind?:
|
|
5199
|
+
| "product_discount"
|
|
5200
|
+
| "flash_sale"
|
|
5201
|
+
| "voucher"
|
|
5202
|
+
| "gift_with_purchase"
|
|
5203
|
+
| "buy_x_get_y"
|
|
5204
|
+
| "bundle_deal"
|
|
5205
|
+
| "free_shipping"
|
|
5206
|
+
| "early_bird_price";
|
|
5207
|
+
salesChannels?: ("pdp" | "live")[];
|
|
5208
|
+
/** @enum {string} */
|
|
5209
|
+
discountType?: "percentage" | "fixed_amount";
|
|
5210
|
+
discountValue?: number;
|
|
5211
|
+
/** @description Patch discount terms for exact target store keys; unnamed stores remain unchanged. Null discountValue restores shared campaign terms for that store. */
|
|
5212
|
+
storeDiscounts?: {
|
|
5213
|
+
storeKey: string;
|
|
5214
|
+
/** @enum {string} */
|
|
5215
|
+
discountType: "percentage" | "fixed_amount";
|
|
5216
|
+
discountValue: number | null;
|
|
5217
|
+
}[];
|
|
5218
|
+
/** @description Up to 100 connected stores for create (required) or update. Copy marketplace, country, and storeId from get_promotions targetStores or find_products marketplaceDetails. Do not concatenate a storeKeys string. */
|
|
5219
|
+
targetStores?: {
|
|
5220
|
+
/** @enum {string} */
|
|
5221
|
+
marketplace:
|
|
5222
|
+
| "lazada"
|
|
5223
|
+
| "shopee"
|
|
5224
|
+
| "tiktok"
|
|
5225
|
+
| "shopify"
|
|
5226
|
+
| "amazon"
|
|
5227
|
+
| "zalora"
|
|
5228
|
+
| "ebay";
|
|
5229
|
+
country: string;
|
|
5230
|
+
storeId: string;
|
|
5231
|
+
}[];
|
|
5232
|
+
minSalePrice?: number | null;
|
|
5233
|
+
maxDiscountAmount?: number | null;
|
|
5234
|
+
minSpend?: number | null;
|
|
5235
|
+
voucherCode?: string | null;
|
|
5236
|
+
claimStartsAt?: string | null;
|
|
5237
|
+
totalUsageLimit?: number | null;
|
|
5238
|
+
perBuyerLimit?: number | null;
|
|
5239
|
+
mechanicConfig?: {
|
|
5240
|
+
/** @description Voucher subtype from get_promotions capabilities.voucherTypes. Browser AOP types (delivery=browser_aop) are writable Seller Center vouchers. Omit browserAutomation.aopId to use the built-in marketplace AOP. */
|
|
5241
|
+
voucherType?:
|
|
5242
|
+
| (
|
|
5243
|
+
| "shopee_shop"
|
|
5244
|
+
| "shopee_product"
|
|
5245
|
+
| "shopee_private"
|
|
5246
|
+
| "shopee_live"
|
|
5247
|
+
| "shopee_video"
|
|
5248
|
+
| "shopee_new_buyer"
|
|
5249
|
+
| "shopee_repeat_buyer"
|
|
5250
|
+
| "shopee_follow_prize"
|
|
5251
|
+
| "shopee_exclusive_streamer"
|
|
5252
|
+
| "shopee_welcome"
|
|
5253
|
+
| "shopee_member_repeat_buyer"
|
|
5254
|
+
| "shopee_exclusive"
|
|
5255
|
+
| "shopee_redemption"
|
|
5256
|
+
| "shopee_exclusive_creator"
|
|
5257
|
+
| "lazada_store_follower"
|
|
5258
|
+
| "lazada_regular"
|
|
5259
|
+
| "lazada_store_new_buyer"
|
|
5260
|
+
| "lazada_live"
|
|
5261
|
+
| "lazada_offline"
|
|
5262
|
+
| "lazada_co_funded"
|
|
5263
|
+
| "lazada_welcome"
|
|
5264
|
+
| "lazada_linked_member"
|
|
5265
|
+
| "lazada_new_member"
|
|
5266
|
+
| "lazada_member_exclusive"
|
|
5267
|
+
| "lazada_points_redeemable"
|
|
5268
|
+
| "tiktok_seller_coupon"
|
|
5269
|
+
| "shopify_discount_code"
|
|
5270
|
+
| "amazon_promotion_code"
|
|
5271
|
+
| "zalora_seller_voucher"
|
|
5272
|
+
| "ebay_coded_coupon"
|
|
5273
|
+
)
|
|
5274
|
+
| null;
|
|
5275
|
+
browserAutomation?: {
|
|
5276
|
+
aopId?: string;
|
|
5277
|
+
variableValues?: {
|
|
5278
|
+
[key: string]: string;
|
|
5279
|
+
};
|
|
5280
|
+
instructions?: string;
|
|
5281
|
+
} | null;
|
|
5282
|
+
/**
|
|
5283
|
+
* @description shop = all products, products = selected assigned products. Repeat Buyer defaults to shop.
|
|
5284
|
+
* @enum {string}
|
|
5285
|
+
*/
|
|
5286
|
+
voucherScope?: "products" | "shop";
|
|
5287
|
+
/**
|
|
5288
|
+
* @description Seller Center reward type. coins_cashback is a percentage greater than 3 and does not reduce salePrice.
|
|
5289
|
+
* @enum {string}
|
|
5290
|
+
*/
|
|
5291
|
+
voucherReward?: "discount" | "coins_cashback";
|
|
5292
|
+
/** @enum {string} */
|
|
5293
|
+
voucherAudience?: "general" | "shop_follow";
|
|
5294
|
+
/** @description Shopee Repeat Buyer: minimum completed shop orders, 1 or 2. Required for shopee_repeat_buyer. */
|
|
5295
|
+
repeatPurchaseMinCount?: number;
|
|
5296
|
+
/** @description Shopee Repeat Buyer: lookback window in days, one of 30, 90, 180 or 365. Required for shopee_repeat_buyer. */
|
|
5297
|
+
repeatPurchaseLookbackDays?: number;
|
|
5298
|
+
/** @description Shopee Smart Voucher toggle. Used by New Buyer and similar portal types. */
|
|
5299
|
+
smartVoucher?: boolean;
|
|
5300
|
+
/** @description Shopee Follow Prize: days after claim until expiry. Seller Center is 7. */
|
|
5301
|
+
followPrizeExpiryDays?: number;
|
|
5302
|
+
/**
|
|
5303
|
+
* @description Shopee Video display: shopee_video = all Shopee Video; creator_video = targeted creator videos only.
|
|
5304
|
+
* @enum {string}
|
|
5305
|
+
*/
|
|
5306
|
+
videoDisplayMode?: "shopee_video" | "creator_video";
|
|
5307
|
+
/** @description Exclusive Creator Voucher: up to 15 Shopee usernames. */
|
|
5308
|
+
exclusiveCreatorUsernames?: string[];
|
|
5309
|
+
/** @description Exclusive Streamer Voucher: up to 15 Shopee usernames. */
|
|
5310
|
+
exclusiveStreamerUsernames?: string[];
|
|
5311
|
+
/** @description Shopee display setting. ["all"] = display on all pages; [] = hidden/share by code. */
|
|
5312
|
+
voucherDisplayChannels?: (
|
|
5313
|
+
| "all"
|
|
5314
|
+
| "feed"
|
|
5315
|
+
| "live"
|
|
5316
|
+
| "order_page"
|
|
5317
|
+
| "followers"
|
|
5318
|
+
| "offline"
|
|
5319
|
+
)[];
|
|
5320
|
+
/** @enum {string} */
|
|
5321
|
+
bundlePriceType?: "discount" | "fixed_price";
|
|
5322
|
+
bundleTiers?: {
|
|
5323
|
+
minimumQuantity: number;
|
|
5324
|
+
discountValue: number;
|
|
5325
|
+
}[];
|
|
5326
|
+
/** @enum {string} */
|
|
5327
|
+
thresholdType?: "item_quantity" | "order_amount";
|
|
5328
|
+
thresholdValue?: number;
|
|
5329
|
+
/** @enum {string} */
|
|
5330
|
+
giftType?: "gift" | "sample";
|
|
5331
|
+
giftQuantity?: number;
|
|
5332
|
+
gifts?: {
|
|
5333
|
+
/** Format: uuid */
|
|
5334
|
+
productId: string;
|
|
5335
|
+
variantId?: string | null;
|
|
5336
|
+
totalClaimLimit: number;
|
|
5337
|
+
}[];
|
|
5338
|
+
buyQuantity?: number;
|
|
5339
|
+
getQuantity?: number;
|
|
5340
|
+
benefitProductIds?: string[];
|
|
5341
|
+
/** @enum {string} */
|
|
5342
|
+
benefitType?: "free" | "percentage" | "fixed_amount";
|
|
5343
|
+
benefitValue?: number;
|
|
5344
|
+
maxApplicationsPerOrder?: number;
|
|
5345
|
+
bundleMinimumQuantity?: number;
|
|
5346
|
+
/** @description Free shipping delivery option. Lazada: STANDARD (default), ECONOMY, EXPRESS, SELLER_OWN_FLEET or P2P, as offered by the store. */
|
|
5347
|
+
shippingDeliveryOption?: string;
|
|
5348
|
+
/** @description Free shipping: total shipping subsidy budget in the store currency. Omit for an unlimited budget. */
|
|
5349
|
+
shippingBudget?: number;
|
|
5350
|
+
};
|
|
5351
|
+
};
|
|
5352
|
+
/** @default [] */
|
|
5353
|
+
productIds?: string[];
|
|
5354
|
+
/** @default */
|
|
5355
|
+
reviewNotes?: string;
|
|
5356
|
+
/** @default */
|
|
5357
|
+
excludedReason?: string;
|
|
5358
|
+
source?: {
|
|
5359
|
+
sheet: string;
|
|
5360
|
+
rows: number[];
|
|
5361
|
+
headers: string[];
|
|
5362
|
+
values: string[][];
|
|
5363
|
+
};
|
|
5364
|
+
}[];
|
|
5365
|
+
};
|
|
5366
|
+
};
|
|
5367
|
+
};
|
|
5368
|
+
};
|
|
5369
|
+
responses: {
|
|
5370
|
+
/** @description Campaign detail: plan, revision, executions, audit, schedule, and progress. */
|
|
5371
|
+
200: {
|
|
5372
|
+
headers: {
|
|
5373
|
+
[name: string]: unknown;
|
|
5374
|
+
};
|
|
5375
|
+
content: {
|
|
5376
|
+
"application/json": {
|
|
5377
|
+
campaign: {
|
|
5378
|
+
id: string;
|
|
5379
|
+
organizationId: string;
|
|
5380
|
+
revision: number;
|
|
5381
|
+
/** @enum {string} */
|
|
5382
|
+
stage:
|
|
5383
|
+
| "draft"
|
|
5384
|
+
| "approved"
|
|
5385
|
+
| "running"
|
|
5386
|
+
| "ending"
|
|
5387
|
+
| "completed"
|
|
5388
|
+
| "archived";
|
|
5389
|
+
approval: {
|
|
5390
|
+
revision: number;
|
|
5391
|
+
userId: string;
|
|
5392
|
+
approvedAt: string;
|
|
5393
|
+
} | null;
|
|
5394
|
+
runId: string | null;
|
|
5395
|
+
startedAt: string | null;
|
|
5396
|
+
endedAt: string | null;
|
|
5397
|
+
createdAt: string;
|
|
5398
|
+
updatedAt: string;
|
|
5399
|
+
plan: components["schemas"]["CampaignPlan"];
|
|
5400
|
+
/** @description A running campaign's proposed plan, applied only when the approver approves it. */
|
|
5401
|
+
pendingChange: {
|
|
5402
|
+
version: number;
|
|
5403
|
+
plan: components["schemas"]["CampaignPlan"];
|
|
5404
|
+
proposedBy: string;
|
|
5405
|
+
proposedAt: string;
|
|
5406
|
+
} | null;
|
|
5407
|
+
};
|
|
5408
|
+
executions: {
|
|
5409
|
+
offerId: string;
|
|
5410
|
+
windowId: string;
|
|
5411
|
+
promotionId: string | null;
|
|
5412
|
+
/** @enum {string} */
|
|
5413
|
+
state:
|
|
5414
|
+
| "draft"
|
|
5415
|
+
| "activating"
|
|
5416
|
+
| "prepared"
|
|
5417
|
+
| "active"
|
|
5418
|
+
| "ending"
|
|
5419
|
+
| "ended"
|
|
5420
|
+
| "failed";
|
|
5421
|
+
error: string | null;
|
|
5422
|
+
evidence: unknown;
|
|
5423
|
+
termsRevision: number | null;
|
|
5424
|
+
}[];
|
|
5425
|
+
audit: {
|
|
5426
|
+
id: string;
|
|
5427
|
+
action: string;
|
|
5428
|
+
actorId: string | null;
|
|
5429
|
+
actorName: string | null;
|
|
5430
|
+
createdAt: string;
|
|
5431
|
+
details: {
|
|
5432
|
+
[key: string]: unknown;
|
|
5433
|
+
};
|
|
5434
|
+
summary?: string;
|
|
5435
|
+
items?: {
|
|
5436
|
+
/** @enum {string} */
|
|
5437
|
+
kind: "brief" | "window" | "offer";
|
|
5438
|
+
/** @enum {string} */
|
|
5439
|
+
action: "add" | "update" | "remove";
|
|
5440
|
+
id: string;
|
|
5441
|
+
name: string;
|
|
5442
|
+
changes: {
|
|
5443
|
+
field: string;
|
|
5444
|
+
label: string;
|
|
5445
|
+
from: string | null;
|
|
5446
|
+
to: string | null;
|
|
5447
|
+
}[];
|
|
5448
|
+
}[];
|
|
5449
|
+
hiddenCount?: number;
|
|
5450
|
+
}[];
|
|
5451
|
+
/** @description Issues that block approving or running the current plan. */
|
|
5452
|
+
readiness: string[];
|
|
5453
|
+
/** @description Issues that block approving the proposed live change. */
|
|
5454
|
+
pendingChangeIssues: string[];
|
|
5455
|
+
pendingScheduleCount: number;
|
|
5456
|
+
failedScheduleCount: number;
|
|
5457
|
+
waitingBrowserJobCount: number;
|
|
5458
|
+
scheduleIssues?: {
|
|
5459
|
+
windowId: string;
|
|
5460
|
+
/** @enum {string} */
|
|
5461
|
+
phase: "prepare" | "live";
|
|
5462
|
+
/** @enum {string} */
|
|
5463
|
+
kind: "overdue" | "missed";
|
|
5464
|
+
}[];
|
|
5465
|
+
recovery?: {
|
|
5466
|
+
windowId: string;
|
|
5467
|
+
/** @enum {string} */
|
|
5468
|
+
phase: "prepare" | "live" | "start" | "end" | "revise";
|
|
5469
|
+
state: string;
|
|
5470
|
+
attempt: number;
|
|
5471
|
+
nextRetryAt: string;
|
|
5472
|
+
error: string | null;
|
|
5473
|
+
}[];
|
|
5474
|
+
cleanupFailed?: boolean;
|
|
5475
|
+
progress?: {
|
|
5476
|
+
asOf: string;
|
|
5477
|
+
title: string;
|
|
5478
|
+
description: string;
|
|
5479
|
+
total: number;
|
|
5480
|
+
counts: {
|
|
5481
|
+
waiting: number;
|
|
5482
|
+
preparing: number;
|
|
5483
|
+
prepared: number;
|
|
5484
|
+
live: number;
|
|
5485
|
+
ending: number;
|
|
5486
|
+
ended: number;
|
|
5487
|
+
cancelled: number;
|
|
5488
|
+
failed: number;
|
|
5489
|
+
};
|
|
5490
|
+
issues: {
|
|
5491
|
+
offerId: string;
|
|
5492
|
+
name: string;
|
|
5493
|
+
error: string;
|
|
5494
|
+
}[];
|
|
5495
|
+
scheduleIssues: {
|
|
5496
|
+
windowId: string;
|
|
5497
|
+
/** @enum {string} */
|
|
5498
|
+
phase: "prepare" | "live";
|
|
5499
|
+
/** @enum {string} */
|
|
5500
|
+
kind: "overdue" | "missed";
|
|
5501
|
+
name: string;
|
|
5502
|
+
message: string;
|
|
5503
|
+
}[];
|
|
5504
|
+
blockers: string[];
|
|
5505
|
+
nextWindow: {
|
|
5506
|
+
id: string;
|
|
5507
|
+
name: string;
|
|
5508
|
+
preparesAt: string | null;
|
|
5509
|
+
startsAt: string | null;
|
|
5510
|
+
endsAt: string | null;
|
|
5511
|
+
} | null;
|
|
5512
|
+
};
|
|
5513
|
+
};
|
|
5514
|
+
};
|
|
5515
|
+
};
|
|
5516
|
+
/** @description Invalid campaign payload or plan state. */
|
|
5517
|
+
400: {
|
|
5518
|
+
headers: {
|
|
5519
|
+
[name: string]: unknown;
|
|
5520
|
+
};
|
|
5521
|
+
content?: never;
|
|
5522
|
+
};
|
|
5523
|
+
/** @description Unauthorized */
|
|
5524
|
+
401: {
|
|
5525
|
+
headers: {
|
|
5526
|
+
[name: string]: unknown;
|
|
5527
|
+
};
|
|
5528
|
+
content?: never;
|
|
5529
|
+
};
|
|
5530
|
+
/** @description Forbidden: missing `promotions:write` scope, or a session member without organization-wide access */
|
|
5531
|
+
403: {
|
|
5532
|
+
headers: {
|
|
5533
|
+
[name: string]: unknown;
|
|
5534
|
+
};
|
|
5535
|
+
content?: never;
|
|
5536
|
+
};
|
|
5537
|
+
/** @description Campaign not found for this organization */
|
|
5538
|
+
404: {
|
|
5539
|
+
headers: {
|
|
5540
|
+
[name: string]: unknown;
|
|
5541
|
+
};
|
|
5542
|
+
content?: never;
|
|
5543
|
+
};
|
|
5544
|
+
/** @description Rate limit exceeded */
|
|
5545
|
+
429: {
|
|
5546
|
+
headers: {
|
|
5547
|
+
[name: string]: unknown;
|
|
5548
|
+
};
|
|
5549
|
+
content?: never;
|
|
5550
|
+
};
|
|
5551
|
+
/** @description Internal Server Error */
|
|
5552
|
+
500: {
|
|
5553
|
+
headers: {
|
|
5554
|
+
[name: string]: unknown;
|
|
5555
|
+
};
|
|
5556
|
+
content?: never;
|
|
5557
|
+
};
|
|
5558
|
+
};
|
|
5559
|
+
};
|
|
5560
|
+
post_v1_campaigns_by_campaignid_actions: {
|
|
5561
|
+
parameters: {
|
|
5562
|
+
query?: never;
|
|
5563
|
+
header?: never;
|
|
5564
|
+
path: {
|
|
5565
|
+
campaignId: string;
|
|
5566
|
+
};
|
|
5567
|
+
cookie?: never;
|
|
5568
|
+
};
|
|
5569
|
+
requestBody: {
|
|
5570
|
+
content: {
|
|
5571
|
+
"application/json": {
|
|
5572
|
+
/** @enum {string} */
|
|
5573
|
+
action:
|
|
5574
|
+
| "approve"
|
|
5575
|
+
| "run"
|
|
5576
|
+
| "approve_and_run"
|
|
5577
|
+
| "end"
|
|
5578
|
+
| "resume"
|
|
5579
|
+
| "retry"
|
|
5580
|
+
| "approve_change"
|
|
5581
|
+
| "discard_change";
|
|
5582
|
+
expectedRevision: number;
|
|
5583
|
+
expectedPendingVersion?: number;
|
|
5584
|
+
/** @description Required for session auth. Optional for an API key, which already identifies the organization. */
|
|
5585
|
+
organizationId?: string;
|
|
5586
|
+
};
|
|
5587
|
+
};
|
|
5588
|
+
};
|
|
5589
|
+
responses: {
|
|
5590
|
+
/** @description Campaign detail after the action, plus the scheduling result. */
|
|
5591
|
+
200: {
|
|
5592
|
+
headers: {
|
|
5593
|
+
[name: string]: unknown;
|
|
5594
|
+
};
|
|
5595
|
+
content: {
|
|
5596
|
+
"application/json": {
|
|
5597
|
+
campaign: {
|
|
5598
|
+
id: string;
|
|
5599
|
+
organizationId: string;
|
|
5600
|
+
revision: number;
|
|
5601
|
+
/** @enum {string} */
|
|
5602
|
+
stage:
|
|
5603
|
+
| "draft"
|
|
5604
|
+
| "approved"
|
|
5605
|
+
| "running"
|
|
5606
|
+
| "ending"
|
|
5607
|
+
| "completed"
|
|
5608
|
+
| "archived";
|
|
5609
|
+
approval: {
|
|
5610
|
+
revision: number;
|
|
5611
|
+
userId: string;
|
|
5612
|
+
approvedAt: string;
|
|
5613
|
+
} | null;
|
|
5614
|
+
runId: string | null;
|
|
5615
|
+
startedAt: string | null;
|
|
5616
|
+
endedAt: string | null;
|
|
5617
|
+
createdAt: string;
|
|
5618
|
+
updatedAt: string;
|
|
5619
|
+
plan: components["schemas"]["CampaignPlan"];
|
|
5620
|
+
/** @description A running campaign's proposed plan, applied only when the approver approves it. */
|
|
5621
|
+
pendingChange: {
|
|
5622
|
+
version: number;
|
|
5623
|
+
plan: components["schemas"]["CampaignPlan"];
|
|
5624
|
+
proposedBy: string;
|
|
5625
|
+
proposedAt: string;
|
|
5626
|
+
} | null;
|
|
5627
|
+
};
|
|
5628
|
+
executions: {
|
|
5629
|
+
offerId: string;
|
|
5630
|
+
windowId: string;
|
|
5631
|
+
promotionId: string | null;
|
|
5632
|
+
/** @enum {string} */
|
|
5633
|
+
state:
|
|
5634
|
+
| "draft"
|
|
5635
|
+
| "activating"
|
|
5636
|
+
| "prepared"
|
|
5637
|
+
| "active"
|
|
5638
|
+
| "ending"
|
|
5639
|
+
| "ended"
|
|
5640
|
+
| "failed";
|
|
5641
|
+
error: string | null;
|
|
5642
|
+
evidence: unknown;
|
|
5643
|
+
termsRevision: number | null;
|
|
5644
|
+
}[];
|
|
5645
|
+
audit: {
|
|
5646
|
+
id: string;
|
|
5647
|
+
action: string;
|
|
5648
|
+
actorId: string | null;
|
|
5649
|
+
actorName: string | null;
|
|
5650
|
+
createdAt: string;
|
|
5651
|
+
details: {
|
|
5652
|
+
[key: string]: unknown;
|
|
5653
|
+
};
|
|
5654
|
+
summary?: string;
|
|
5655
|
+
items?: {
|
|
5656
|
+
/** @enum {string} */
|
|
5657
|
+
kind: "brief" | "window" | "offer";
|
|
5658
|
+
/** @enum {string} */
|
|
5659
|
+
action: "add" | "update" | "remove";
|
|
5660
|
+
id: string;
|
|
5661
|
+
name: string;
|
|
5662
|
+
changes: {
|
|
5663
|
+
field: string;
|
|
5664
|
+
label: string;
|
|
5665
|
+
from: string | null;
|
|
5666
|
+
to: string | null;
|
|
5667
|
+
}[];
|
|
5668
|
+
}[];
|
|
5669
|
+
hiddenCount?: number;
|
|
5670
|
+
}[];
|
|
5671
|
+
/** @description Issues that block approving or running the current plan. */
|
|
5672
|
+
readiness: string[];
|
|
5673
|
+
/** @description Issues that block approving the proposed live change. */
|
|
5674
|
+
pendingChangeIssues: string[];
|
|
5675
|
+
pendingScheduleCount: number;
|
|
5676
|
+
failedScheduleCount: number;
|
|
5677
|
+
waitingBrowserJobCount: number;
|
|
5678
|
+
scheduleIssues?: {
|
|
5679
|
+
windowId: string;
|
|
5680
|
+
/** @enum {string} */
|
|
5681
|
+
phase: "prepare" | "live";
|
|
5682
|
+
/** @enum {string} */
|
|
5683
|
+
kind: "overdue" | "missed";
|
|
5684
|
+
}[];
|
|
5685
|
+
recovery?: {
|
|
5686
|
+
windowId: string;
|
|
5687
|
+
/** @enum {string} */
|
|
5688
|
+
phase: "prepare" | "live" | "start" | "end" | "revise";
|
|
5689
|
+
state: string;
|
|
5690
|
+
attempt: number;
|
|
5691
|
+
nextRetryAt: string;
|
|
5692
|
+
error: string | null;
|
|
5693
|
+
}[];
|
|
5694
|
+
cleanupFailed?: boolean;
|
|
5695
|
+
progress?: {
|
|
5696
|
+
asOf: string;
|
|
5697
|
+
title: string;
|
|
5698
|
+
description: string;
|
|
5699
|
+
total: number;
|
|
5700
|
+
counts: {
|
|
5701
|
+
waiting: number;
|
|
5702
|
+
preparing: number;
|
|
5703
|
+
prepared: number;
|
|
5704
|
+
live: number;
|
|
5705
|
+
ending: number;
|
|
5706
|
+
ended: number;
|
|
5707
|
+
cancelled: number;
|
|
5708
|
+
failed: number;
|
|
5709
|
+
};
|
|
5710
|
+
issues: {
|
|
5711
|
+
offerId: string;
|
|
5712
|
+
name: string;
|
|
5713
|
+
error: string;
|
|
5714
|
+
}[];
|
|
5715
|
+
scheduleIssues: {
|
|
5716
|
+
windowId: string;
|
|
5717
|
+
/** @enum {string} */
|
|
5718
|
+
phase: "prepare" | "live";
|
|
5719
|
+
/** @enum {string} */
|
|
5720
|
+
kind: "overdue" | "missed";
|
|
5721
|
+
name: string;
|
|
5722
|
+
message: string;
|
|
5723
|
+
}[];
|
|
5724
|
+
blockers: string[];
|
|
5725
|
+
nextWindow: {
|
|
5726
|
+
id: string;
|
|
5727
|
+
name: string;
|
|
5728
|
+
preparesAt: string | null;
|
|
5729
|
+
startsAt: string | null;
|
|
5730
|
+
endsAt: string | null;
|
|
5731
|
+
} | null;
|
|
5732
|
+
};
|
|
5733
|
+
/** @description `pending` is true when the schedule was saved but not yet acknowledged; retry the action to confirm. */
|
|
5734
|
+
scheduling: {
|
|
5735
|
+
queued: number;
|
|
5736
|
+
pending: boolean;
|
|
5737
|
+
};
|
|
5738
|
+
};
|
|
5739
|
+
};
|
|
5740
|
+
};
|
|
5741
|
+
/** @description Invalid campaign payload or plan state. */
|
|
5742
|
+
400: {
|
|
5743
|
+
headers: {
|
|
5744
|
+
[name: string]: unknown;
|
|
5745
|
+
};
|
|
5746
|
+
content?: never;
|
|
5747
|
+
};
|
|
5748
|
+
/** @description Unauthorized */
|
|
5749
|
+
401: {
|
|
5750
|
+
headers: {
|
|
5751
|
+
[name: string]: unknown;
|
|
5752
|
+
};
|
|
5753
|
+
content?: never;
|
|
5754
|
+
};
|
|
5755
|
+
/** @description Forbidden: missing `promotions:write` scope, or a session member without organization-wide access */
|
|
5756
|
+
403: {
|
|
5757
|
+
headers: {
|
|
5758
|
+
[name: string]: unknown;
|
|
5759
|
+
};
|
|
5760
|
+
content?: never;
|
|
5761
|
+
};
|
|
5762
|
+
/** @description Campaign not found for this organization */
|
|
5763
|
+
404: {
|
|
5764
|
+
headers: {
|
|
5765
|
+
[name: string]: unknown;
|
|
5766
|
+
};
|
|
5767
|
+
content?: never;
|
|
5768
|
+
};
|
|
5769
|
+
/** @description Rate limit exceeded */
|
|
5770
|
+
429: {
|
|
5771
|
+
headers: {
|
|
5772
|
+
[name: string]: unknown;
|
|
5773
|
+
};
|
|
5774
|
+
content?: never;
|
|
5775
|
+
};
|
|
5776
|
+
/** @description Internal Server Error */
|
|
5777
|
+
500: {
|
|
5778
|
+
headers: {
|
|
5779
|
+
[name: string]: unknown;
|
|
5780
|
+
};
|
|
5781
|
+
content?: never;
|
|
5782
|
+
};
|
|
5783
|
+
};
|
|
5784
|
+
};
|
|
5785
|
+
post_v1_campaigns_archive: {
|
|
5786
|
+
parameters: {
|
|
5787
|
+
query?: never;
|
|
5788
|
+
header?: never;
|
|
5789
|
+
path?: never;
|
|
5790
|
+
cookie?: never;
|
|
5791
|
+
};
|
|
5792
|
+
requestBody: {
|
|
5793
|
+
content: {
|
|
5794
|
+
"application/json":
|
|
5795
|
+
| {
|
|
5796
|
+
campaignIds: string[];
|
|
5797
|
+
/** @enum {string} */
|
|
5798
|
+
action: "archive" | "restore";
|
|
5799
|
+
/** @description Required for session auth. Optional for an API key, which already identifies the organization. */
|
|
5800
|
+
organizationId?: string;
|
|
5801
|
+
}
|
|
5802
|
+
| {
|
|
5803
|
+
/** @constant */
|
|
5804
|
+
action: "restore";
|
|
5805
|
+
selection: {
|
|
5806
|
+
/** @constant */
|
|
5807
|
+
mode: "all_matching";
|
|
5808
|
+
filters: {
|
|
5809
|
+
/** @default */
|
|
5810
|
+
q?: string;
|
|
5811
|
+
/**
|
|
5812
|
+
* @default all
|
|
5813
|
+
* @enum {string}
|
|
5814
|
+
*/
|
|
5815
|
+
stage?:
|
|
5816
|
+
| "all"
|
|
5817
|
+
| "draft"
|
|
5818
|
+
| "approved"
|
|
5819
|
+
| "running"
|
|
5820
|
+
| "ending"
|
|
5821
|
+
| "completed"
|
|
5822
|
+
| "archived";
|
|
5823
|
+
};
|
|
5824
|
+
/** @default [] */
|
|
5825
|
+
excludedCampaignIds?: string[];
|
|
5826
|
+
};
|
|
5827
|
+
/** @description Required for session auth. Optional for an API key, which already identifies the organization. */
|
|
5828
|
+
organizationId?: string;
|
|
5829
|
+
};
|
|
5830
|
+
};
|
|
5831
|
+
};
|
|
5832
|
+
responses: {
|
|
5833
|
+
/** @description Aggregate result plus one result per campaign. `success` is true only when every requested campaign succeeds. */
|
|
5834
|
+
200: {
|
|
5835
|
+
headers: {
|
|
5836
|
+
[name: string]: unknown;
|
|
5837
|
+
};
|
|
5838
|
+
content: {
|
|
5839
|
+
"application/json": {
|
|
5840
|
+
/** @description True only when every requested campaign succeeds. */
|
|
5841
|
+
success: boolean;
|
|
5842
|
+
campaignIds: string[];
|
|
5843
|
+
succeededCount: number;
|
|
5844
|
+
failedCount: number;
|
|
5845
|
+
results: {
|
|
5846
|
+
success: boolean;
|
|
5847
|
+
campaignId: string;
|
|
5848
|
+
/** @enum {string} */
|
|
5849
|
+
stage?:
|
|
5850
|
+
| "draft"
|
|
5851
|
+
| "approved"
|
|
5852
|
+
| "running"
|
|
5853
|
+
| "ending"
|
|
5854
|
+
| "completed"
|
|
5855
|
+
| "archived";
|
|
5856
|
+
error?: string;
|
|
5857
|
+
}[];
|
|
5858
|
+
};
|
|
5859
|
+
};
|
|
5860
|
+
};
|
|
5861
|
+
/** @description Invalid campaign payload or plan state. */
|
|
5862
|
+
400: {
|
|
5863
|
+
headers: {
|
|
5864
|
+
[name: string]: unknown;
|
|
5865
|
+
};
|
|
5866
|
+
content?: never;
|
|
5867
|
+
};
|
|
5868
|
+
/** @description Unauthorized */
|
|
5869
|
+
401: {
|
|
5870
|
+
headers: {
|
|
5871
|
+
[name: string]: unknown;
|
|
5872
|
+
};
|
|
5873
|
+
content?: never;
|
|
5874
|
+
};
|
|
5875
|
+
/** @description Forbidden: missing `promotions:write` scope, or a session member without organization-wide access */
|
|
5876
|
+
403: {
|
|
5877
|
+
headers: {
|
|
5878
|
+
[name: string]: unknown;
|
|
5879
|
+
};
|
|
5880
|
+
content?: never;
|
|
5881
|
+
};
|
|
5882
|
+
/** @description Rate limit exceeded */
|
|
5883
|
+
429: {
|
|
5884
|
+
headers: {
|
|
5885
|
+
[name: string]: unknown;
|
|
5886
|
+
};
|
|
5887
|
+
content?: never;
|
|
5888
|
+
};
|
|
5889
|
+
/** @description Internal Server Error */
|
|
5890
|
+
500: {
|
|
5891
|
+
headers: {
|
|
5892
|
+
[name: string]: unknown;
|
|
5893
|
+
};
|
|
5894
|
+
content?: never;
|
|
5895
|
+
};
|
|
5896
|
+
};
|
|
5897
|
+
};
|
|
5898
|
+
post_v1_campaigns_delete: {
|
|
5899
|
+
parameters: {
|
|
5900
|
+
query?: never;
|
|
5901
|
+
header?: never;
|
|
5902
|
+
path?: never;
|
|
5903
|
+
cookie?: never;
|
|
5904
|
+
};
|
|
5905
|
+
requestBody: {
|
|
5906
|
+
content: {
|
|
5907
|
+
"application/json": {
|
|
5908
|
+
/** @description Required for session auth. Optional for an API key, which already identifies the organization. */
|
|
5909
|
+
organizationId?: string;
|
|
5910
|
+
selection:
|
|
5911
|
+
| {
|
|
5912
|
+
/** @constant */
|
|
5913
|
+
mode: "explicit";
|
|
5914
|
+
campaignIds: string[];
|
|
5915
|
+
}
|
|
5916
|
+
| {
|
|
5917
|
+
/** @constant */
|
|
5918
|
+
mode: "all_matching";
|
|
5919
|
+
filters: {
|
|
5920
|
+
/** @default */
|
|
5921
|
+
q?: string;
|
|
5922
|
+
/**
|
|
5923
|
+
* @default all
|
|
5924
|
+
* @enum {string}
|
|
5925
|
+
*/
|
|
5926
|
+
stage?:
|
|
5927
|
+
| "all"
|
|
5928
|
+
| "draft"
|
|
5929
|
+
| "approved"
|
|
5930
|
+
| "running"
|
|
5931
|
+
| "ending"
|
|
5932
|
+
| "completed"
|
|
5933
|
+
| "archived";
|
|
5934
|
+
};
|
|
5935
|
+
excludedCampaignIds?: string[];
|
|
5936
|
+
};
|
|
5937
|
+
};
|
|
5938
|
+
};
|
|
5939
|
+
};
|
|
5940
|
+
responses: {
|
|
5941
|
+
/** @description Aggregate result plus one result per campaign. `success` is true only when every requested campaign succeeds. */
|
|
3248
5942
|
200: {
|
|
3249
5943
|
headers: {
|
|
3250
5944
|
[name: string]: unknown;
|
|
3251
5945
|
};
|
|
3252
5946
|
content: {
|
|
3253
5947
|
"application/json": {
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
5948
|
+
/** @description True only when every requested campaign succeeds. */
|
|
5949
|
+
success: boolean;
|
|
5950
|
+
campaignIds: string[];
|
|
5951
|
+
succeededCount: number;
|
|
5952
|
+
failedCount: number;
|
|
5953
|
+
results: {
|
|
5954
|
+
success: boolean;
|
|
5955
|
+
campaignId: string;
|
|
5956
|
+
error?: string;
|
|
5957
|
+
}[];
|
|
3260
5958
|
};
|
|
3261
5959
|
};
|
|
3262
5960
|
};
|
|
3263
|
-
/** @description Invalid
|
|
5961
|
+
/** @description Invalid campaign payload or plan state. */
|
|
3264
5962
|
400: {
|
|
3265
5963
|
headers: {
|
|
3266
5964
|
[name: string]: unknown;
|
|
@@ -3274,28 +5972,21 @@ interface operations {
|
|
|
3274
5972
|
};
|
|
3275
5973
|
content?: never;
|
|
3276
5974
|
};
|
|
3277
|
-
/** @description
|
|
3278
|
-
402: {
|
|
3279
|
-
headers: {
|
|
3280
|
-
[name: string]: unknown;
|
|
3281
|
-
};
|
|
3282
|
-
content?: never;
|
|
3283
|
-
};
|
|
3284
|
-
/** @description Forbidden. Missing OAuth scope. */
|
|
5975
|
+
/** @description Forbidden: missing `promotions:write` scope, or a session member without organization-wide access */
|
|
3285
5976
|
403: {
|
|
3286
5977
|
headers: {
|
|
3287
5978
|
[name: string]: unknown;
|
|
3288
5979
|
};
|
|
3289
5980
|
content?: never;
|
|
3290
5981
|
};
|
|
3291
|
-
/** @description
|
|
3292
|
-
|
|
5982
|
+
/** @description Rate limit exceeded */
|
|
5983
|
+
429: {
|
|
3293
5984
|
headers: {
|
|
3294
5985
|
[name: string]: unknown;
|
|
3295
5986
|
};
|
|
3296
5987
|
content?: never;
|
|
3297
5988
|
};
|
|
3298
|
-
/** @description Internal
|
|
5989
|
+
/** @description Internal Server Error */
|
|
3299
5990
|
500: {
|
|
3300
5991
|
headers: {
|
|
3301
5992
|
[name: string]: unknown;
|
|
@@ -3304,43 +5995,69 @@ interface operations {
|
|
|
3304
5995
|
};
|
|
3305
5996
|
};
|
|
3306
5997
|
};
|
|
3307
|
-
|
|
5998
|
+
get_v1_campaigns_options: {
|
|
3308
5999
|
parameters: {
|
|
3309
|
-
query?:
|
|
6000
|
+
query?: {
|
|
6001
|
+
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
6002
|
+
organizationId?: string;
|
|
6003
|
+
};
|
|
3310
6004
|
header?: never;
|
|
3311
6005
|
path?: never;
|
|
3312
6006
|
cookie?: never;
|
|
3313
6007
|
};
|
|
3314
|
-
requestBody
|
|
3315
|
-
content: {
|
|
3316
|
-
"application/json": {
|
|
3317
|
-
/** @description Thread ID of the failed AOP execution to retry. */
|
|
3318
|
-
thread_id: string;
|
|
3319
|
-
/** @description Optional user inputs appended to the AOP prompt as key-value pairs. */
|
|
3320
|
-
user_inputs?: {
|
|
3321
|
-
[key: string]: string | number | boolean;
|
|
3322
|
-
} | null;
|
|
3323
|
-
/** @description Required for session auth. Optional for API keys. */
|
|
3324
|
-
organizationId?: string;
|
|
3325
|
-
};
|
|
3326
|
-
};
|
|
3327
|
-
};
|
|
6008
|
+
requestBody?: never;
|
|
3328
6009
|
responses: {
|
|
3329
|
-
/** @description
|
|
6010
|
+
/** @description Members and connected stores. */
|
|
3330
6011
|
200: {
|
|
3331
6012
|
headers: {
|
|
3332
6013
|
[name: string]: unknown;
|
|
3333
6014
|
};
|
|
3334
6015
|
content: {
|
|
3335
6016
|
"application/json": {
|
|
3336
|
-
/** @
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
6017
|
+
/** @description Organization members. Use `id` for `ownerId` and `approverId`. */
|
|
6018
|
+
members: {
|
|
6019
|
+
id: string;
|
|
6020
|
+
name: string;
|
|
6021
|
+
email: string;
|
|
6022
|
+
}[];
|
|
6023
|
+
/** @description Connected stores for `brief.stores`. */
|
|
6024
|
+
stores: {
|
|
6025
|
+
/** @enum {string} */
|
|
6026
|
+
marketplace:
|
|
6027
|
+
| "shopify"
|
|
6028
|
+
| "shopee"
|
|
6029
|
+
| "lazada"
|
|
6030
|
+
| "tiktok"
|
|
6031
|
+
| "whatsapp"
|
|
6032
|
+
| "zalora"
|
|
6033
|
+
| "amazon"
|
|
6034
|
+
| "ebay";
|
|
6035
|
+
country: string;
|
|
6036
|
+
storeId: string;
|
|
6037
|
+
storeName: string;
|
|
6038
|
+
isDefaultPublish?: boolean;
|
|
6039
|
+
dbsHazmatApproved?: boolean;
|
|
6040
|
+
}[];
|
|
6041
|
+
/** @description Connected stores for offer `promotion.targetStores`. */
|
|
6042
|
+
promotionStores: {
|
|
6043
|
+
/** @enum {string} */
|
|
6044
|
+
marketplace:
|
|
6045
|
+
| "lazada"
|
|
6046
|
+
| "shopee"
|
|
6047
|
+
| "tiktok"
|
|
6048
|
+
| "shopify"
|
|
6049
|
+
| "amazon"
|
|
6050
|
+
| "zalora"
|
|
6051
|
+
| "ebay";
|
|
6052
|
+
country: string;
|
|
6053
|
+
storeId: string;
|
|
6054
|
+
storeName?: string;
|
|
6055
|
+
currency?: string | null;
|
|
6056
|
+
}[];
|
|
3340
6057
|
};
|
|
3341
6058
|
};
|
|
3342
6059
|
};
|
|
3343
|
-
/** @description Invalid
|
|
6060
|
+
/** @description Invalid campaign payload or plan state. */
|
|
3344
6061
|
400: {
|
|
3345
6062
|
headers: {
|
|
3346
6063
|
[name: string]: unknown;
|
|
@@ -3354,28 +6071,21 @@ interface operations {
|
|
|
3354
6071
|
};
|
|
3355
6072
|
content?: never;
|
|
3356
6073
|
};
|
|
3357
|
-
/** @description
|
|
3358
|
-
402: {
|
|
3359
|
-
headers: {
|
|
3360
|
-
[name: string]: unknown;
|
|
3361
|
-
};
|
|
3362
|
-
content?: never;
|
|
3363
|
-
};
|
|
3364
|
-
/** @description Forbidden. Missing OAuth scope. */
|
|
6074
|
+
/** @description Forbidden: missing `promotions:write` scope, or a session member without organization-wide access */
|
|
3365
6075
|
403: {
|
|
3366
6076
|
headers: {
|
|
3367
6077
|
[name: string]: unknown;
|
|
3368
6078
|
};
|
|
3369
6079
|
content?: never;
|
|
3370
6080
|
};
|
|
3371
|
-
/** @description
|
|
3372
|
-
|
|
6081
|
+
/** @description Rate limit exceeded */
|
|
6082
|
+
429: {
|
|
3373
6083
|
headers: {
|
|
3374
6084
|
[name: string]: unknown;
|
|
3375
6085
|
};
|
|
3376
6086
|
content?: never;
|
|
3377
6087
|
};
|
|
3378
|
-
/** @description Internal
|
|
6088
|
+
/** @description Internal Server Error */
|
|
3379
6089
|
500: {
|
|
3380
6090
|
headers: {
|
|
3381
6091
|
[name: string]: unknown;
|
|
@@ -6742,28 +9452,16 @@ interface operations {
|
|
|
6742
9452
|
storeId?: string | null;
|
|
6743
9453
|
/** @description Optional country scope (name or code). Null/omit applies to all countries. */
|
|
6744
9454
|
country?: string | null;
|
|
6745
|
-
/** @description
|
|
6746
|
-
sourceKey?: string | null;
|
|
6747
|
-
/**
|
|
6748
|
-
* @description Starting amount for a formula. Ignored when `steps` is empty. Defaults to `list_price`.
|
|
6749
|
-
* @enum {string}
|
|
6750
|
-
*/
|
|
6751
|
-
base?: "list_price" | "cost";
|
|
6752
|
-
/**
|
|
6753
|
-
* @description `list_price` rewrites the shelf price. `payout` is calculated and not published. Defaults to `list_price`.
|
|
6754
|
-
* @enum {string}
|
|
6755
|
-
*/
|
|
6756
|
-
application?: "list_price" | "payout";
|
|
6757
|
-
/** @description Ordered formula steps. When non-empty, these replace the percent markup. */
|
|
6758
|
-
steps?: Record<string, never>[];
|
|
6759
|
-
/** @description Markup percent applied to canonical list price. Ignored when `steps` is non-empty. */
|
|
9455
|
+
/** @description Markup percent applied to the catalog price. Ignored when `expression` is set. */
|
|
6760
9456
|
marginValue: number;
|
|
9457
|
+
/** @description Buyer formula. `price` is the catalog price. Supports arithmetic, percentages, CEILING, IF, and CURRENCY(rate, "USD"). Replaces markup percent. */
|
|
9458
|
+
expression?: string | null;
|
|
6761
9459
|
/**
|
|
6762
9460
|
* @description Defaults to `currency_minor` when omitted.
|
|
6763
9461
|
* @enum {string}
|
|
6764
9462
|
*/
|
|
6765
9463
|
rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
|
|
6766
|
-
/** @description ISO 4217 currency
|
|
9464
|
+
/** @description Optional ISO 4217 currency for `currency_minor` rounding. */
|
|
6767
9465
|
currency?: string | null;
|
|
6768
9466
|
/**
|
|
6769
9467
|
* @description Whether the rule is active. Defaults to true.
|
|
@@ -6956,17 +9654,12 @@ interface operations {
|
|
|
6956
9654
|
organizationId?: string;
|
|
6957
9655
|
storeId?: string | null;
|
|
6958
9656
|
country?: string | null;
|
|
6959
|
-
sourceKey?: string | null;
|
|
6960
|
-
/** @enum {string} */
|
|
6961
|
-
base?: "list_price" | "cost";
|
|
6962
|
-
/** @enum {string} */
|
|
6963
|
-
application?: "list_price" | "payout";
|
|
6964
|
-
/** @description Ordered formula steps. When non-empty, these replace the percent markup. */
|
|
6965
|
-
steps?: Record<string, never>[];
|
|
6966
9657
|
marginValue?: number;
|
|
6967
9658
|
/** @enum {string} */
|
|
6968
9659
|
rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
|
|
6969
9660
|
currency?: string | null;
|
|
9661
|
+
/** @description Buyer formula. `price` is the catalog price. Null clears the formula and markup percent applies again. */
|
|
9662
|
+
expression?: string | null;
|
|
6970
9663
|
enabled?: boolean;
|
|
6971
9664
|
};
|
|
6972
9665
|
};
|
|
@@ -7050,16 +9743,8 @@ interface operations {
|
|
|
7050
9743
|
| "zalora"
|
|
7051
9744
|
| "amazon"
|
|
7052
9745
|
| "ebay";
|
|
7053
|
-
/** @description Canonical list price
|
|
9746
|
+
/** @description Canonical list price to mark up. */
|
|
7054
9747
|
listPrice: number;
|
|
7055
|
-
/** @description Cost used when the matching formula starts from cost. */
|
|
7056
|
-
costPrice?: number;
|
|
7057
|
-
costCurrency?: string | null;
|
|
7058
|
-
sourceKey?: string | null;
|
|
7059
|
-
/** @description Pricing category used by a shipping rate step. */
|
|
7060
|
-
categoryKey?: string | null;
|
|
7061
|
-
/** @enum {string} */
|
|
7062
|
-
application?: "list_price" | "payout";
|
|
7063
9748
|
storeId?: string | null;
|
|
7064
9749
|
country?: string | null;
|
|
7065
9750
|
currency?: string | null;
|
|
@@ -7085,12 +9770,18 @@ interface operations {
|
|
|
7085
9770
|
/** @enum {string} */
|
|
7086
9771
|
source: "price_book" | "canonical";
|
|
7087
9772
|
markupPercent?: number;
|
|
9773
|
+
/** @description Listed currency when known. A buyer formula with CURRENCY sets it. */
|
|
9774
|
+
currency?: string;
|
|
9775
|
+
/** @description Present and true when the buyer formula lists below the catalog price in the same currency. This is usually a payout formula, price * (1 - fees), used where the gross-up, price / (1 - fees), was meant. */
|
|
9776
|
+
belowCatalogPrice?: boolean;
|
|
9777
|
+
/** @description Set when the matched buyer formula cannot price this list price. Publish fails for that listing instead of using the catalog price. */
|
|
9778
|
+
formulaError?: string;
|
|
7088
9779
|
rule?: Record<string, never> | null;
|
|
7089
9780
|
message?: string;
|
|
7090
9781
|
};
|
|
7091
9782
|
};
|
|
7092
9783
|
};
|
|
7093
|
-
/** @description Bad Request */
|
|
9784
|
+
/** @description Bad Request, or the forced `ruleId` has a buyer formula that cannot price this list price */
|
|
7094
9785
|
400: {
|
|
7095
9786
|
headers: {
|
|
7096
9787
|
[name: string]: unknown;
|
|
@@ -7172,6 +9863,18 @@ interface operations {
|
|
|
7172
9863
|
content: {
|
|
7173
9864
|
"application/json": {
|
|
7174
9865
|
items?: {
|
|
9866
|
+
/** Format: uuid */
|
|
9867
|
+
id: string;
|
|
9868
|
+
name: string;
|
|
9869
|
+
sku: string | null;
|
|
9870
|
+
/** Format: uuid */
|
|
9871
|
+
parentId: string | null;
|
|
9872
|
+
isVariant: boolean;
|
|
9873
|
+
/** @description Catalog stock in whole units, matching the Products page. Parent rows aggregate non-deleted variants in the same organization; virtual bundles derive stock from components and any manual cap. Null means unknown: never substitute zero for missing or null stock. This is not a sum of marketplace inventory mirrors or a per-location available-to-promise balance. */
|
|
9874
|
+
stockQuantity: number | null;
|
|
9875
|
+
/** @description Whether the product has variants. The list row's stockQuantity already includes their stock; variants are not embedded in this response. */
|
|
9876
|
+
hasVariants: boolean;
|
|
9877
|
+
variantCount: number;
|
|
7175
9878
|
status?: string;
|
|
7176
9879
|
/** @description Read-only product-wide state. Lifecycle status and derived quality/error signals are independent; this field is recalculated from current product, marketplace QC, and review flags. */
|
|
7177
9880
|
statusFacets?: {
|
|
@@ -7194,8 +9897,12 @@ interface operations {
|
|
|
7194
9897
|
hasMore?: boolean;
|
|
7195
9898
|
nextOffset?: number;
|
|
7196
9899
|
summary?: {
|
|
9900
|
+
/** @description All-tab count under the other filters, before applying the selected status. Use pagination.total for the matching result count. */
|
|
7197
9901
|
totalCount?: number;
|
|
7198
|
-
|
|
9902
|
+
/** @description Counts by product status under the other selected filters. */
|
|
9903
|
+
statusCounts?: {
|
|
9904
|
+
[key: string]: number;
|
|
9905
|
+
};
|
|
7199
9906
|
};
|
|
7200
9907
|
/** @description Echoes the offset/limit actually applied to the query (after clamping) plus discovery metadata for paging. */
|
|
7201
9908
|
pagination?: {
|
|
@@ -8784,8 +11491,8 @@ interface operations {
|
|
|
8784
11491
|
| "fail_job";
|
|
8785
11492
|
autoApproveThreshold?: number | null;
|
|
8786
11493
|
spendCeilingUsd?: number | null;
|
|
8787
|
-
/** @description
|
|
8788
|
-
marketplaceStoreSelections
|
|
11494
|
+
/** @description Required: select at least one connected store. One store per marketplace, not an array of store IDs. */
|
|
11495
|
+
marketplaceStoreSelections: {
|
|
8789
11496
|
/** @description Connected shopee store ID. */
|
|
8790
11497
|
shopee?: string;
|
|
8791
11498
|
/** @description Connected lazada store ID. */
|
|
@@ -8856,7 +11563,7 @@ interface operations {
|
|
|
8856
11563
|
/** @description JSON object mapping CSV headers to import fields, e.g. `{"sku":"SKU","title":"Product Name"}`. */
|
|
8857
11564
|
fieldMapping?: string;
|
|
8858
11565
|
/** @description Connected store ID for each target marketplace. JSON requests send an object; multipart may send that object as a JSON string. */
|
|
8859
|
-
marketplaceStoreSelections
|
|
11566
|
+
marketplaceStoreSelections:
|
|
8860
11567
|
| {
|
|
8861
11568
|
/** @description Connected shopee store ID. */
|
|
8862
11569
|
shopee?: string;
|
|
@@ -9904,6 +12611,12 @@ interface operations {
|
|
|
9904
12611
|
variantSku?: string | null;
|
|
9905
12612
|
/** @default 0 */
|
|
9906
12613
|
priority?: number;
|
|
12614
|
+
/** @description Optional per-product discount for product discounts and flash sales. Uses the campaign discount type. Null restores the shared discount. Shopee and TikTok publish the resulting price. Lazada vouchers and Shopify fail sync while any product has its own discount. */
|
|
12615
|
+
productDiscounts?: {
|
|
12616
|
+
/** Format: uuid */
|
|
12617
|
+
productId: string;
|
|
12618
|
+
discountValue: number | null;
|
|
12619
|
+
}[];
|
|
9907
12620
|
};
|
|
9908
12621
|
};
|
|
9909
12622
|
};
|
|
@@ -10990,6 +13703,9 @@ interface operations {
|
|
|
10990
13703
|
| "order.status.changed"
|
|
10991
13704
|
| "look.created"
|
|
10992
13705
|
| "look.deleted"
|
|
13706
|
+
| "review.created"
|
|
13707
|
+
| "review.updated"
|
|
13708
|
+
| "review.status.changed"
|
|
10993
13709
|
| "settlement.created"
|
|
10994
13710
|
| "settlement.updated"
|
|
10995
13711
|
| "settlement.status.changed"
|
|
@@ -12444,6 +15160,90 @@ interface operations {
|
|
|
12444
15160
|
};
|
|
12445
15161
|
};
|
|
12446
15162
|
};
|
|
15163
|
+
review_created_webhook: {
|
|
15164
|
+
parameters: {
|
|
15165
|
+
query?: never;
|
|
15166
|
+
header: {
|
|
15167
|
+
"X-Omni-Event-Id": string;
|
|
15168
|
+
"X-Omni-Event-Type": "review.created";
|
|
15169
|
+
"X-Omni-Timestamp": string;
|
|
15170
|
+
/** @description Hex HMAC-SHA256 of `{timestamp}.{rawBody}` using the subscription secret. */
|
|
15171
|
+
"X-Omni-Signature": string;
|
|
15172
|
+
};
|
|
15173
|
+
path?: never;
|
|
15174
|
+
cookie?: never;
|
|
15175
|
+
};
|
|
15176
|
+
requestBody: {
|
|
15177
|
+
content: {
|
|
15178
|
+
"application/json": components["schemas"]["ReviewCreatedWebhookEvent"];
|
|
15179
|
+
};
|
|
15180
|
+
};
|
|
15181
|
+
responses: {
|
|
15182
|
+
/** @description Event accepted. */
|
|
15183
|
+
"2XX": {
|
|
15184
|
+
headers: {
|
|
15185
|
+
[name: string]: unknown;
|
|
15186
|
+
};
|
|
15187
|
+
content?: never;
|
|
15188
|
+
};
|
|
15189
|
+
};
|
|
15190
|
+
};
|
|
15191
|
+
review_updated_webhook: {
|
|
15192
|
+
parameters: {
|
|
15193
|
+
query?: never;
|
|
15194
|
+
header: {
|
|
15195
|
+
"X-Omni-Event-Id": string;
|
|
15196
|
+
"X-Omni-Event-Type": "review.updated";
|
|
15197
|
+
"X-Omni-Timestamp": string;
|
|
15198
|
+
/** @description Hex HMAC-SHA256 of `{timestamp}.{rawBody}` using the subscription secret. */
|
|
15199
|
+
"X-Omni-Signature": string;
|
|
15200
|
+
};
|
|
15201
|
+
path?: never;
|
|
15202
|
+
cookie?: never;
|
|
15203
|
+
};
|
|
15204
|
+
requestBody: {
|
|
15205
|
+
content: {
|
|
15206
|
+
"application/json": components["schemas"]["ReviewUpdatedWebhookEvent"];
|
|
15207
|
+
};
|
|
15208
|
+
};
|
|
15209
|
+
responses: {
|
|
15210
|
+
/** @description Event accepted. */
|
|
15211
|
+
"2XX": {
|
|
15212
|
+
headers: {
|
|
15213
|
+
[name: string]: unknown;
|
|
15214
|
+
};
|
|
15215
|
+
content?: never;
|
|
15216
|
+
};
|
|
15217
|
+
};
|
|
15218
|
+
};
|
|
15219
|
+
review_status_changed_webhook: {
|
|
15220
|
+
parameters: {
|
|
15221
|
+
query?: never;
|
|
15222
|
+
header: {
|
|
15223
|
+
"X-Omni-Event-Id": string;
|
|
15224
|
+
"X-Omni-Event-Type": "review.status.changed";
|
|
15225
|
+
"X-Omni-Timestamp": string;
|
|
15226
|
+
/** @description Hex HMAC-SHA256 of `{timestamp}.{rawBody}` using the subscription secret. */
|
|
15227
|
+
"X-Omni-Signature": string;
|
|
15228
|
+
};
|
|
15229
|
+
path?: never;
|
|
15230
|
+
cookie?: never;
|
|
15231
|
+
};
|
|
15232
|
+
requestBody: {
|
|
15233
|
+
content: {
|
|
15234
|
+
"application/json": components["schemas"]["ReviewStatusChangedWebhookEvent"];
|
|
15235
|
+
};
|
|
15236
|
+
};
|
|
15237
|
+
responses: {
|
|
15238
|
+
/** @description Event accepted. */
|
|
15239
|
+
"2XX": {
|
|
15240
|
+
headers: {
|
|
15241
|
+
[name: string]: unknown;
|
|
15242
|
+
};
|
|
15243
|
+
content?: never;
|
|
15244
|
+
};
|
|
15245
|
+
};
|
|
15246
|
+
};
|
|
12447
15247
|
order_created_webhook: {
|
|
12448
15248
|
parameters: {
|
|
12449
15249
|
query?: never;
|
|
@@ -12757,6 +15557,41 @@ interface operations {
|
|
|
12757
15557
|
* `get`/`list`/`create`-style names.
|
|
12758
15558
|
*/
|
|
12759
15559
|
|
|
15560
|
+
declare class AgentsGeneralClient {
|
|
15561
|
+
protected readonly _http: OmniHttp;
|
|
15562
|
+
constructor(_http: OmniHttp);
|
|
15563
|
+
/**
|
|
15564
|
+
* Invoke the Omni agent
|
|
15565
|
+
*
|
|
15566
|
+
* Run the general Omni agent and wait until it completes, pauses for approval, or fails. Requires `agents:invoke`.
|
|
15567
|
+
|
|
15568
|
+
A waiting call can take several minutes; raise the client timeout. Send `decisions` with the same `thread_id` to approve or reject a paused run. Omit `config.enabled_tools` to use the organization's agent tools. Attach images on the latest user message as `{ type: "image", url }` HTTP(S) URLs.
|
|
15569
|
+
*
|
|
15570
|
+
* `POST /api/v1/agents/general/invoke`
|
|
15571
|
+
*/
|
|
15572
|
+
invoke(request: OperationBody<operations["post_v1_agents_general_invoke"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_agents_general_invoke"]>>;
|
|
15573
|
+
/**
|
|
15574
|
+
* Start an Omni agent run
|
|
15575
|
+
*
|
|
15576
|
+
* Queue the general Omni agent and return immediately with the run in `queued` state. Poll the URL in the `Location` header (`GET /api/v1/agents/general/runs/{runId}`), honoring `Retry-After`. Requires `agents:invoke`. The request body matches invoke.
|
|
15577
|
+
*
|
|
15578
|
+
* `POST /api/v1/agents/general/runs`
|
|
15579
|
+
*/
|
|
15580
|
+
start(request: OperationBody<operations["post_v1_agents_general_runs"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_agents_general_runs"]>>;
|
|
15581
|
+
/**
|
|
15582
|
+
* Get an Omni agent run
|
|
15583
|
+
*
|
|
15584
|
+
* Read a queued, running, completed, paused, or failed Omni agent run. Requires `agents:invoke`.
|
|
15585
|
+
*
|
|
15586
|
+
* `GET /api/v1/agents/general/runs/{runId}`
|
|
15587
|
+
*/
|
|
15588
|
+
getRun(request: OperationPath<operations["get_v1_agents_general_runs_by_runid"]> & OperationQuery<operations["get_v1_agents_general_runs_by_runid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_agents_general_runs_by_runid"]>>;
|
|
15589
|
+
}
|
|
15590
|
+
declare class AgentsClient {
|
|
15591
|
+
protected readonly _http: OmniHttp;
|
|
15592
|
+
readonly general: AgentsGeneralClient;
|
|
15593
|
+
constructor(_http: OmniHttp);
|
|
15594
|
+
}
|
|
12760
15595
|
declare class AopClient {
|
|
12761
15596
|
protected readonly _http: OmniHttp;
|
|
12762
15597
|
constructor(_http: OmniHttp);
|
|
@@ -12821,6 +15656,74 @@ declare class ApiClient {
|
|
|
12821
15656
|
*/
|
|
12822
15657
|
v1(requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1"]>>;
|
|
12823
15658
|
}
|
|
15659
|
+
declare class CampaignsClient {
|
|
15660
|
+
protected readonly _http: OmniHttp;
|
|
15661
|
+
constructor(_http: OmniHttp);
|
|
15662
|
+
/**
|
|
15663
|
+
* List Campaigns
|
|
15664
|
+
*
|
|
15665
|
+
* List campaigns for the authenticated organization. `stage=all` is the workspace working set: draft and running. Requires `promotions:read`.
|
|
15666
|
+
*
|
|
15667
|
+
* `GET /api/v1/campaigns`
|
|
15668
|
+
*/
|
|
15669
|
+
list(request?: OperationQuery<operations["get_v1_campaigns"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_campaigns"]>>;
|
|
15670
|
+
/**
|
|
15671
|
+
* Create Campaign
|
|
15672
|
+
*
|
|
15673
|
+
* Create a draft campaign. `ownerId` and `approverId` must be members of the organization, and every store must already be connected. Requires `promotions:write`.
|
|
15674
|
+
*
|
|
15675
|
+
* `POST /api/v1/campaigns`
|
|
15676
|
+
*/
|
|
15677
|
+
create(request: OperationBody<operations["post_v1_campaigns"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_campaigns"]>>;
|
|
15678
|
+
/**
|
|
15679
|
+
* Get Campaign
|
|
15680
|
+
*
|
|
15681
|
+
* Read one campaign, including its plan, executions, audit, schedule, and progress. Requires `promotions:read`.
|
|
15682
|
+
*
|
|
15683
|
+
* `GET /api/v1/campaigns/{campaignId}`
|
|
15684
|
+
*/
|
|
15685
|
+
get(request: OperationPath<operations["get_v1_campaigns_by_campaignid"]> & OperationQuery<operations["get_v1_campaigns_by_campaignid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_campaigns_by_campaignid"]>>;
|
|
15686
|
+
/**
|
|
15687
|
+
* Update Campaign
|
|
15688
|
+
*
|
|
15689
|
+
* Replace a draft or approved plan, or propose one change to a running plan. Send `expectedRevision` from the last read. Requires `promotions:write`.
|
|
15690
|
+
*
|
|
15691
|
+
* `PUT /api/v1/campaigns/{campaignId}`
|
|
15692
|
+
*/
|
|
15693
|
+
replace(request: OperationPath<operations["put_v1_campaigns_by_campaignid"]> & OperationBody<operations["put_v1_campaigns_by_campaignid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["put_v1_campaigns_by_campaignid"]>>;
|
|
15694
|
+
/**
|
|
15695
|
+
* Act on Campaign
|
|
15696
|
+
*
|
|
15697
|
+
* Approve, start, end, resume, retry, or decide a proposed live change. Approve, run, resume, and approving a change must be called by the named approver. Requires `promotions:write`.
|
|
15698
|
+
*
|
|
15699
|
+
* `POST /api/v1/campaigns/{campaignId}/actions`
|
|
15700
|
+
*/
|
|
15701
|
+
actions(request: OperationPath<operations["post_v1_campaigns_by_campaignid_actions"]> & OperationBody<operations["post_v1_campaigns_by_campaignid_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_campaigns_by_campaignid_actions"]>>;
|
|
15702
|
+
/**
|
|
15703
|
+
* Archive Campaigns
|
|
15704
|
+
*
|
|
15705
|
+
* Archive campaigns, or restore archived campaigns by id or by the current archived list filters. Requires `promotions:write`.
|
|
15706
|
+
*
|
|
15707
|
+
* `POST /api/v1/campaigns/archive`
|
|
15708
|
+
*/
|
|
15709
|
+
archive(request: OperationBody<operations["post_v1_campaigns_archive"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_campaigns_archive"]>>;
|
|
15710
|
+
/**
|
|
15711
|
+
* Delete Campaigns
|
|
15712
|
+
*
|
|
15713
|
+
* Permanently delete archived campaigns by explicit id or by archived list filters. Requires `promotions:write`.
|
|
15714
|
+
*
|
|
15715
|
+
* `POST /api/v1/campaigns/delete`
|
|
15716
|
+
*/
|
|
15717
|
+
delete(request: OperationBody<operations["post_v1_campaigns_delete"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_campaigns_delete"]>>;
|
|
15718
|
+
/**
|
|
15719
|
+
* Get Campaign Options
|
|
15720
|
+
*
|
|
15721
|
+
* List the organization members and connected stores a campaign plan can name. Use a member `id` for `ownerId` and `approverId`. Requires `promotions:write`.
|
|
15722
|
+
*
|
|
15723
|
+
* `GET /api/v1/campaigns/options`
|
|
15724
|
+
*/
|
|
15725
|
+
getOptions(request?: OperationQuery<operations["get_v1_campaigns_options"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_campaigns_options"]>>;
|
|
15726
|
+
}
|
|
12824
15727
|
declare class CatalogClient {
|
|
12825
15728
|
protected readonly _http: OmniHttp;
|
|
12826
15729
|
constructor(_http: OmniHttp);
|
|
@@ -13260,6 +16163,8 @@ declare class ProductsClient {
|
|
|
13260
16163
|
* List Products
|
|
13261
16164
|
*
|
|
13262
16165
|
* List products for the authenticated organization with optional filters and pagination. Authenticate with an API key or OAuth bearer token. The organization is taken from that credential; do not send `organizationId`.
|
|
16166
|
+
|
|
16167
|
+
Rows are in `items`. Read catalog stock from `items[].stockQuantity`: parent rows already aggregate their non-deleted variants, and virtual bundles use component availability with any manual cap. Null means unknown, not zero. List rows do not contain `inventoryQuantity`, `inventory.quantity`, or an embedded `variants` array.
|
|
13263
16168
|
*
|
|
13264
16169
|
* `GET /api/v1/products`
|
|
13265
16170
|
*/
|
|
@@ -13329,7 +16234,9 @@ declare class ProductsClient {
|
|
|
13329
16234
|
/**
|
|
13330
16235
|
* Delist Product
|
|
13331
16236
|
*
|
|
13332
|
-
* Queue delist for one product on the marketplaces you name. `marketplaces` accepts one or more of shopee, lazada, tiktok, shopify, whatsapp, zalora, amazon, and ebay. Each named marketplace must already have a listing; other channels are left untouched. Omit `marketplaces` to delist every existing listing. This does not delete the OmniCommerce product.
|
|
16237
|
+
* Queue delist for one product on the marketplaces you name. `marketplaces` accepts one or more of shopee, lazada, tiktok, shopify, whatsapp, zalora, amazon, and ebay. Each named marketplace must already have a listing; other channels are left untouched. Omit `marketplaces` to delist every existing listing. This does not delete the OmniCommerce product.
|
|
16238
|
+
|
|
16239
|
+
Poll GET /api/v1/jobs/{jobId} until data.status is succeeded, partial, or failed. Accepted means the job was queued, not that the marketplace has removed the listing.
|
|
13333
16240
|
*
|
|
13334
16241
|
* `POST /api/v1/products/{productId}/delist`
|
|
13335
16242
|
*/
|
|
@@ -13746,8 +16653,10 @@ declare class ZaloraClient {
|
|
|
13746
16653
|
}
|
|
13747
16654
|
declare class OmniGeneratedClient {
|
|
13748
16655
|
protected readonly _http: OmniHttp;
|
|
16656
|
+
readonly agents: AgentsClient;
|
|
13749
16657
|
readonly aop: AopClient;
|
|
13750
16658
|
readonly api: ApiClient;
|
|
16659
|
+
readonly campaigns: CampaignsClient;
|
|
13751
16660
|
readonly catalog: CatalogClient;
|
|
13752
16661
|
readonly checkoutSessions: CheckoutSessionsClient;
|
|
13753
16662
|
readonly compare: CompareClient;
|
|
@@ -13779,8 +16688,10 @@ declare class OmniGeneratedClient {
|
|
|
13779
16688
|
constructor(_http: OmniHttp);
|
|
13780
16689
|
}
|
|
13781
16690
|
type OmniResources = {
|
|
16691
|
+
agents: AgentsClient;
|
|
13782
16692
|
aop: AopClient;
|
|
13783
16693
|
api: ApiClient;
|
|
16694
|
+
campaigns: CampaignsClient;
|
|
13784
16695
|
catalog: CatalogClient;
|
|
13785
16696
|
checkoutSessions: CheckoutSessionsClient;
|
|
13786
16697
|
compare: CompareClient;
|
|
@@ -13852,7 +16763,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
13852
16763
|
toleranceInSeconds?: number;
|
|
13853
16764
|
}): Promise<ConstructedWebhookEvent>;
|
|
13854
16765
|
|
|
13855
|
-
declare const SDK_VERSION = "0.
|
|
16766
|
+
declare const SDK_VERSION = "0.2.0";
|
|
13856
16767
|
|
|
13857
16768
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
13858
16769
|
type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];
|