@omni-commerce/sdk 0.2.0 → 0.3.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.d.cts CHANGED
@@ -293,6 +293,28 @@ interface paths {
293
293
  patch?: never;
294
294
  trace?: never;
295
295
  };
296
+ "/api/v1/analytics/sales": {
297
+ parameters: {
298
+ query?: never;
299
+ header?: never;
300
+ path?: never;
301
+ cookie?: never;
302
+ };
303
+ /**
304
+ * Get Sales Analytics
305
+ * @description Sales KPIs for a date range with the change against the previous period of equal length, a daily trend, sales by order status and by marketplace, and the top products by net sales. Matches the Orders analysis page. Requires `analytics:read`.
306
+ *
307
+ * Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
308
+ */
309
+ get: operations["get_v1_analytics_sales"];
310
+ put?: never;
311
+ post?: never;
312
+ delete?: never;
313
+ options?: never;
314
+ head?: never;
315
+ patch?: never;
316
+ trace?: never;
317
+ };
296
318
  "/api/v1/aop/{aopId}/config": {
297
319
  parameters: {
298
320
  query?: never;
@@ -1079,6 +1101,56 @@ interface paths {
1079
1101
  patch: operations["patch_v1_orders_by_orderid"];
1080
1102
  trace?: never;
1081
1103
  };
1104
+ "/api/v1/orders/{orderId}/action-options": {
1105
+ parameters: {
1106
+ query?: never;
1107
+ header?: never;
1108
+ path?: never;
1109
+ cookie?: never;
1110
+ };
1111
+ /**
1112
+ * Get Order Action Options
1113
+ * @description Ask the marketplace which choices an action needs, such as pickup or drop-off for `ship`. Requires `orders:write`.
1114
+ *
1115
+ * Send the chosen choice's `payload` with `POST /api/v1/orders/{orderId}/actions`.
1116
+ */
1117
+ get: operations["get_v1_orders_by_orderid_action_options"];
1118
+ put?: never;
1119
+ post?: never;
1120
+ delete?: never;
1121
+ options?: never;
1122
+ head?: never;
1123
+ patch?: never;
1124
+ trace?: never;
1125
+ };
1126
+ "/api/v1/orders/{orderId}/actions": {
1127
+ parameters: {
1128
+ query?: never;
1129
+ header?: never;
1130
+ path?: never;
1131
+ cookie?: never;
1132
+ };
1133
+ /**
1134
+ * List Order Actions
1135
+ * @description The order's 20 most recent action jobs, newest first, plus its latest successful label job. Requires `orders:read`.
1136
+ *
1137
+ * Poll this after queueing an action. A succeeded `labels` job lists its label files in `labels`.
1138
+ */
1139
+ get: operations["get_v1_orders_by_orderid_actions"];
1140
+ put?: never;
1141
+ /**
1142
+ * Queue Order Action
1143
+ * @description Ship, cancel, generate shipping labels for, or update tracking on a marketplace order. Requires `orders:write`.
1144
+ *
1145
+ * The marketplace call runs in the background: the response is `202` with `jobId`; poll `GET /api/v1/orders/{orderId}/actions`. A repeated `idempotencyKey` returns `200` with the original job.
1146
+ */
1147
+ post: operations["post_v1_orders_by_orderid_actions"];
1148
+ delete?: never;
1149
+ options?: never;
1150
+ head?: never;
1151
+ patch?: never;
1152
+ trace?: never;
1153
+ };
1082
1154
  "/api/v1/organizations": {
1083
1155
  parameters: {
1084
1156
  query?: never;
@@ -1184,7 +1256,9 @@ interface paths {
1184
1256
  * List Products
1185
1257
  * @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
1258
  *
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.
1259
+ * ### Stock and variants
1260
+ *
1261
+ * 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. A row with `variantCount` above 0 has variants; fetch them from `GET /api/v1/products/{productId}`. List rows do not contain `inventoryQuantity`, `inventory.quantity`, or an embedded `variants` array.
1188
1262
  */
1189
1263
  get: operations["get_v1_products"];
1190
1264
  put?: never;
@@ -1229,6 +1303,8 @@ interface paths {
1229
1303
  * - Localization content and cultural notes
1230
1304
  * - Intent queries and signals
1231
1305
  * - Sources and claims
1306
+ *
1307
+ * A parent product returns its variants in `variants`, with each variant's option values, price, stock, image, and marketplace listings.
1232
1308
  */
1233
1309
  get: operations["get_v1_products_by_productid"];
1234
1310
  put?: never;
@@ -1319,6 +1395,28 @@ interface paths {
1319
1395
  patch: operations["patch_v1_products_by_productid_inventory"];
1320
1396
  trace?: never;
1321
1397
  };
1398
+ "/api/v1/products/{productId}/listings": {
1399
+ parameters: {
1400
+ query?: never;
1401
+ header?: never;
1402
+ path?: never;
1403
+ cookie?: never;
1404
+ };
1405
+ /**
1406
+ * Get Product Listings
1407
+ * @description Where a product is listed: each marketplace's store, live or delisted state, item id, buyer-facing URL, and the latest publish attempt with any rejection details. Requires `catalog:read`.
1408
+ *
1409
+ * Poll after `POST /api/v1/products/{productId}/publish`.
1410
+ */
1411
+ get: operations["get_v1_products_by_productid_listings"];
1412
+ put?: never;
1413
+ post?: never;
1414
+ delete?: never;
1415
+ options?: never;
1416
+ head?: never;
1417
+ patch?: never;
1418
+ trace?: never;
1419
+ };
1322
1420
  "/api/v1/products/{productId}/price": {
1323
1421
  parameters: {
1324
1422
  query?: never;
@@ -1596,6 +1694,92 @@ interface paths {
1596
1694
  patch?: never;
1597
1695
  trace?: never;
1598
1696
  };
1697
+ "/api/v1/reviews": {
1698
+ parameters: {
1699
+ query?: never;
1700
+ header?: never;
1701
+ path?: never;
1702
+ cookie?: never;
1703
+ };
1704
+ /**
1705
+ * List Reviews
1706
+ * @description List marketplace product reviews, newest first unless `sortBy` says otherwise. Requires `reviews:read`.
1707
+ *
1708
+ * Use `priority=unreplied` for a reply queue. `replyRestriction` is null when a reply will be accepted.
1709
+ */
1710
+ get: operations["get_v1_reviews"];
1711
+ put?: never;
1712
+ post?: never;
1713
+ delete?: never;
1714
+ options?: never;
1715
+ head?: never;
1716
+ patch?: never;
1717
+ trace?: never;
1718
+ };
1719
+ "/api/v1/reviews/{reviewId}": {
1720
+ parameters: {
1721
+ query?: never;
1722
+ header?: never;
1723
+ path?: never;
1724
+ cookie?: never;
1725
+ };
1726
+ /**
1727
+ * Get Review
1728
+ * @description Read one review by its OmniCommerce UUID. Requires `reviews:read`.
1729
+ */
1730
+ get: operations["get_v1_reviews_by_reviewid"];
1731
+ put?: never;
1732
+ post?: never;
1733
+ delete?: never;
1734
+ options?: never;
1735
+ head?: never;
1736
+ patch?: never;
1737
+ trace?: never;
1738
+ };
1739
+ "/api/v1/reviews/{reviewId}/draft-reply": {
1740
+ parameters: {
1741
+ query?: never;
1742
+ header?: never;
1743
+ path?: never;
1744
+ cookie?: never;
1745
+ };
1746
+ get?: never;
1747
+ put?: never;
1748
+ /**
1749
+ * Draft Review Reply
1750
+ * @description Draft a reply with AI from the review, the product, recent replies, and the brand kit. Uses AI credits. Requires `reviews:write`.
1751
+ *
1752
+ * Nothing is posted; send the text with `POST /api/v1/reviews/actions`.
1753
+ */
1754
+ post: operations["post_v1_reviews_by_reviewid_draft_reply"];
1755
+ delete?: never;
1756
+ options?: never;
1757
+ head?: never;
1758
+ patch?: never;
1759
+ trace?: never;
1760
+ };
1761
+ "/api/v1/reviews/actions": {
1762
+ parameters: {
1763
+ query?: never;
1764
+ header?: never;
1765
+ path?: never;
1766
+ cookie?: never;
1767
+ };
1768
+ get?: never;
1769
+ put?: never;
1770
+ /**
1771
+ * Act on Reviews
1772
+ * @description Reply to up to 50 reviews, or send Amazon review requests for solicitation rows. Requires `reviews:write`.
1773
+ *
1774
+ * Each target succeeds or fails on its own; read `data.results`. `ok` is true only when every target succeeds.
1775
+ */
1776
+ post: operations["post_v1_reviews_actions"];
1777
+ delete?: never;
1778
+ options?: never;
1779
+ head?: never;
1780
+ patch?: never;
1781
+ trace?: never;
1782
+ };
1599
1783
  "/api/v1/search": {
1600
1784
  parameters: {
1601
1785
  query?: never;
@@ -3848,6 +4032,163 @@ interface operations {
3848
4032
  };
3849
4033
  };
3850
4034
  };
4035
+ get_v1_analytics_sales: {
4036
+ parameters: {
4037
+ query?: {
4038
+ /** @description Required for session auth. API keys already belong to one organization. */
4039
+ organizationId?: string;
4040
+ /** @description First day of the range (YYYY-MM-DD). Defaults to 29 days before `to`. */
4041
+ from?: string;
4042
+ /** @description Last day of the range, inclusive (YYYY-MM-DD). Defaults to today. */
4043
+ to?: string;
4044
+ /** @description Comma-separated marketplaces, for example `shopee,lazada`. */
4045
+ marketplace?: string;
4046
+ /** @description Comma-separated countries. One country selects its currency. */
4047
+ country?: string;
4048
+ /** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
4049
+ store?: string;
4050
+ /** @description ISO currency. Only orders in this currency are counted; amounts are not converted. Defaults to the single country's currency, otherwise SGD. */
4051
+ currency?: string;
4052
+ /** @description IANA time zone that defines each day, for example `Asia/Kuala_Lumpur`. Defaults to Asia/Singapore. */
4053
+ timeZone?: string;
4054
+ };
4055
+ header?: never;
4056
+ path?: never;
4057
+ cookie?: never;
4058
+ };
4059
+ requestBody?: never;
4060
+ responses: {
4061
+ /** @description Sales analytics. */
4062
+ 200: {
4063
+ headers: {
4064
+ [name: string]: unknown;
4065
+ };
4066
+ content: {
4067
+ "application/json": {
4068
+ ok: boolean;
4069
+ /** @constant */
4070
+ apiVersion: "developer_v1";
4071
+ operationId: string;
4072
+ /** @enum {string} */
4073
+ status: "accepted" | "completed" | "failed";
4074
+ jobId?: string;
4075
+ productId?: string;
4076
+ warnings: string[];
4077
+ recommendations: string[];
4078
+ links: {
4079
+ [key: string]: string;
4080
+ };
4081
+ data: {
4082
+ filters: {
4083
+ from: string;
4084
+ to: string;
4085
+ marketplace: string;
4086
+ country: string;
4087
+ store: string;
4088
+ /** @description Currency of every amount in the response. */
4089
+ currency: string;
4090
+ timeZone: string;
4091
+ };
4092
+ previousFrom: string;
4093
+ previousTo: string;
4094
+ kpis: {
4095
+ orders: number;
4096
+ netSales: number;
4097
+ /** @description Average order value. */
4098
+ aov: number;
4099
+ unitsSold: number;
4100
+ unitsPerOrder: number;
4101
+ returnedOrders: number;
4102
+ /** @description Share of orders returned, 0 to 1. */
4103
+ returnRate: number;
4104
+ /** @description Change against the previous period of equal length. Null without a baseline. */
4105
+ ordersChangePercent: number | null;
4106
+ /** @description Change against the previous period of equal length. Null without a baseline. */
4107
+ netSalesChangePercent: number | null;
4108
+ /** @description Change against the previous period of equal length. Null without a baseline. */
4109
+ aovChangePercent: number | null;
4110
+ /** @description Change against the previous period of equal length. Null without a baseline. */
4111
+ unitsChangePercent: number | null;
4112
+ /** @description Change against the previous period of equal length. Null without a baseline. */
4113
+ returnRateChangePercent: number | null;
4114
+ identifiedBuyers: number;
4115
+ repeatBuyers: number;
4116
+ repeatRate: number | null;
4117
+ cancelledOrders: number;
4118
+ cancelRate: number | null;
4119
+ };
4120
+ statusMix: {
4121
+ status: string;
4122
+ orders: number;
4123
+ netSales: number;
4124
+ }[];
4125
+ platformMix: {
4126
+ platform: string;
4127
+ orders: number;
4128
+ netSales: number;
4129
+ }[];
4130
+ dailyTrend: {
4131
+ date: string;
4132
+ previousDate: string | null;
4133
+ orders: number;
4134
+ netSales: number;
4135
+ previousOrders: number;
4136
+ previousNetSales: number;
4137
+ }[];
4138
+ /** @description Up to 40 products ranked by net sales. */
4139
+ topProducts: {
4140
+ productId: string | null;
4141
+ productName: string;
4142
+ platform: string | null;
4143
+ accountId: string | null;
4144
+ externalProductId: string | null;
4145
+ sku: string | null;
4146
+ thumbnailUrl: string | null;
4147
+ orders: number;
4148
+ unitsSold: number;
4149
+ netSales: number;
4150
+ }[];
4151
+ };
4152
+ };
4153
+ };
4154
+ };
4155
+ /** @description Invalid request */
4156
+ 400: {
4157
+ headers: {
4158
+ [name: string]: unknown;
4159
+ };
4160
+ content?: never;
4161
+ };
4162
+ /** @description Unauthorized */
4163
+ 401: {
4164
+ headers: {
4165
+ [name: string]: unknown;
4166
+ };
4167
+ content?: never;
4168
+ };
4169
+ /** @description Missing the `analytics:read` scope */
4170
+ 403: {
4171
+ headers: {
4172
+ [name: string]: unknown;
4173
+ };
4174
+ content?: never;
4175
+ };
4176
+ /** @description Rate limit exceeded */
4177
+ 429: {
4178
+ headers: {
4179
+ [name: string]: unknown;
4180
+ };
4181
+ content?: never;
4182
+ };
4183
+ /** @description Internal Server Error */
4184
+ 500: {
4185
+ headers: {
4186
+ [name: string]: unknown;
4187
+ };
4188
+ content?: never;
4189
+ };
4190
+ };
4191
+ };
3851
4192
  get_v1_aop_by_aopid_config: {
3852
4193
  parameters: {
3853
4194
  query?: {
@@ -9276,64 +9617,94 @@ interface operations {
9276
9617
  };
9277
9618
  };
9278
9619
  };
9279
- post_v1_organizations: {
9620
+ get_v1_orders_by_orderid_action_options: {
9280
9621
  parameters: {
9281
- query?: never;
9622
+ query: {
9623
+ /** @description Required for session auth. API keys already belong to one organization. */
9624
+ organizationId?: string;
9625
+ action: "ship" | "cancel" | "labels" | "update_tracking";
9626
+ };
9282
9627
  header?: never;
9283
- path?: never;
9284
- cookie?: never;
9285
- };
9286
- requestBody: {
9287
- content: {
9288
- /**
9289
- * @example {
9290
- * "name": "Acme Team"
9291
- * }
9292
- */
9293
- "application/json": {
9294
- /** @description Organization display name. */
9295
- name: string;
9296
- /**
9297
- * @description When true, Better Auth keeps the current active organization instead of switching active context.
9298
- * @default false
9299
- */
9300
- keepCurrentActiveOrganization?: boolean;
9301
- };
9628
+ path: {
9629
+ orderId: string;
9302
9630
  };
9631
+ cookie?: never;
9303
9632
  };
9633
+ requestBody?: never;
9304
9634
  responses: {
9305
- /** @description Organization created */
9306
- 201: {
9635
+ /** @description Choices for the action. */
9636
+ 200: {
9307
9637
  headers: {
9308
9638
  [name: string]: unknown;
9309
9639
  };
9310
9640
  content: {
9311
9641
  "application/json": {
9312
9642
  ok: boolean;
9313
- organizationId: string;
9314
- redirectUrl?: string;
9315
- organization: {
9316
- id: string;
9317
- name: string;
9318
- slug: string;
9643
+ /** @constant */
9644
+ apiVersion: "developer_v1";
9645
+ operationId: string;
9646
+ /** @enum {string} */
9647
+ status: "accepted" | "completed" | "failed";
9648
+ jobId?: string;
9649
+ productId?: string;
9650
+ warnings: string[];
9651
+ recommendations: string[];
9652
+ links: {
9653
+ [key: string]: string;
9654
+ };
9655
+ data: {
9656
+ /** @enum {string} */
9657
+ action: "ship" | "cancel" | "labels" | "update_tracking";
9658
+ choices: {
9659
+ id: string;
9660
+ label: string;
9661
+ description?: string;
9662
+ /** @description Send this as the action `payload` to use the choice. */
9663
+ payload?: {
9664
+ [key: string]: unknown;
9665
+ };
9666
+ /** @description The choice needs extra fields, such as a tracking number. */
9667
+ requiresInput?: boolean;
9668
+ }[];
9319
9669
  };
9320
9670
  };
9321
9671
  };
9322
9672
  };
9323
- /** @description Bad Request - Invalid organization name or JSON */
9673
+ /** @description Invalid request */
9324
9674
  400: {
9325
9675
  headers: {
9326
9676
  [name: string]: unknown;
9327
9677
  };
9328
9678
  content?: never;
9329
9679
  };
9330
- /** @description Unauthorized - Sign in is required */
9680
+ /** @description Unauthorized */
9331
9681
  401: {
9332
9682
  headers: {
9333
9683
  [name: string]: unknown;
9334
9684
  };
9335
9685
  content?: never;
9336
9686
  };
9687
+ /** @description Missing the `orders:write` scope */
9688
+ 403: {
9689
+ headers: {
9690
+ [name: string]: unknown;
9691
+ };
9692
+ content?: never;
9693
+ };
9694
+ /** @description Order not found */
9695
+ 404: {
9696
+ headers: {
9697
+ [name: string]: unknown;
9698
+ };
9699
+ content?: never;
9700
+ };
9701
+ /** @description Rate limit exceeded */
9702
+ 429: {
9703
+ headers: {
9704
+ [name: string]: unknown;
9705
+ };
9706
+ content?: never;
9707
+ };
9337
9708
  /** @description Internal Server Error */
9338
9709
  500: {
9339
9710
  headers: {
@@ -9343,43 +9714,69 @@ interface operations {
9343
9714
  };
9344
9715
  };
9345
9716
  };
9346
- get_v1_price_books: {
9717
+ get_v1_orders_by_orderid_actions: {
9347
9718
  parameters: {
9348
9719
  query?: {
9349
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
9720
+ /** @description Required for session auth. API keys already belong to one organization. */
9350
9721
  organizationId?: string;
9351
- /** @description Filter by marketplace platform: `shopee`, `lazada`, `tiktok`, `shopify`, `whatsapp`, `zalora`, `amazon`, or `ebay`. */
9352
- platform?:
9353
- | "shopee"
9354
- | "lazada"
9355
- | "tiktok"
9356
- | "shopify"
9357
- | "whatsapp"
9358
- | "zalora"
9359
- | "amazon"
9360
- | "ebay";
9361
- /** @description When `true`, return only enabled rules. */
9362
- enabledOnly?: boolean;
9363
9722
  };
9364
9723
  header?: never;
9365
- path?: never;
9724
+ path: {
9725
+ orderId: string;
9726
+ };
9366
9727
  cookie?: never;
9367
9728
  };
9368
9729
  requestBody?: never;
9369
9730
  responses: {
9370
- /** @description Price book rules returned. */
9731
+ /** @description Action jobs. */
9371
9732
  200: {
9372
9733
  headers: {
9373
9734
  [name: string]: unknown;
9374
9735
  };
9375
9736
  content: {
9376
9737
  "application/json": {
9377
- rules: Record<string, never>[];
9378
- total: number;
9738
+ ok: boolean;
9739
+ /** @constant */
9740
+ apiVersion: "developer_v1";
9741
+ operationId: string;
9742
+ /** @enum {string} */
9743
+ status: "accepted" | "completed" | "failed";
9744
+ jobId?: string;
9745
+ productId?: string;
9746
+ warnings: string[];
9747
+ recommendations: string[];
9748
+ links: {
9749
+ [key: string]: string;
9750
+ };
9751
+ data: {
9752
+ jobs: {
9753
+ id: string;
9754
+ orderId: string;
9755
+ /** @enum {string} */
9756
+ action: "ship" | "cancel" | "labels" | "update_tracking";
9757
+ /** @enum {string} */
9758
+ status:
9759
+ | "queued"
9760
+ | "running"
9761
+ | "succeeded"
9762
+ | "failed"
9763
+ | "not_supported";
9764
+ errorMessage: string | null;
9765
+ updatedAt: string | null;
9766
+ completedAt: string | null;
9767
+ /** @description Shipping label files. Filled when a `labels` job has succeeded. */
9768
+ labels: {
9769
+ /** @description Download URL of the label file. */
9770
+ url: string;
9771
+ name: string | null;
9772
+ mimeType: string | null;
9773
+ }[];
9774
+ }[];
9775
+ };
9379
9776
  };
9380
9777
  };
9381
9778
  };
9382
- /** @description Bad Request (invalid platform filter) */
9779
+ /** @description Invalid request */
9383
9780
  400: {
9384
9781
  headers: {
9385
9782
  [name: string]: unknown;
@@ -9393,7 +9790,7 @@ interface operations {
9393
9790
  };
9394
9791
  content?: never;
9395
9792
  };
9396
- /** @description Forbidden or missing `price_books:read` scope */
9793
+ /** @description Missing the `orders:read` scope */
9397
9794
  403: {
9398
9795
  headers: {
9399
9796
  [name: string]: unknown;
@@ -9416,74 +9813,92 @@ interface operations {
9416
9813
  };
9417
9814
  };
9418
9815
  };
9419
- post_v1_price_books: {
9816
+ post_v1_orders_by_orderid_actions: {
9420
9817
  parameters: {
9421
9818
  query?: never;
9422
9819
  header?: never;
9423
- path?: never;
9820
+ path: {
9821
+ orderId: string;
9822
+ };
9424
9823
  cookie?: never;
9425
9824
  };
9426
9825
  requestBody: {
9427
9826
  content: {
9428
- /**
9429
- * @example {
9430
- * "platform": "shopee",
9431
- * "marginValue": 10,
9432
- * "country": "singapore",
9433
- * "rounding": "currency_minor",
9434
- * "currency": "SGD",
9435
- * "enabled": true
9436
- * }
9437
- */
9438
9827
  "application/json": {
9439
- /** @description Required for session auth across multiple organizations. Optional for OAuth/API keys bound to one organization. */
9828
+ /** @description Required for session auth. API keys already belong to one organization. */
9440
9829
  organizationId?: string;
9441
- /** @enum {string} */
9442
- platform:
9443
- | "shopee"
9444
- | "lazada"
9445
- | "tiktok"
9446
- | "shopify"
9447
- | "whatsapp"
9448
- | "zalora"
9449
- | "amazon"
9450
- | "ebay";
9451
- /** @description Optional connected store ID. Null/omit applies to all stores for the platform. */
9452
- storeId?: string | null;
9453
- /** @description Optional country scope (name or code). Null/omit applies to all countries. */
9454
- country?: string | null;
9455
- /** @description Markup percent applied to the catalog price. Ignored when `expression` is set. */
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;
9459
9830
  /**
9460
- * @description Defaults to `currency_minor` when omitted.
9831
+ * @description `ship` arranges shipment, `labels` generates shipping labels, `update_tracking` sends a tracking number, and `cancel` cancels the order.
9461
9832
  * @enum {string}
9462
9833
  */
9463
- rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
9464
- /** @description Optional ISO 4217 currency for `currency_minor` rounding. */
9465
- currency?: string | null;
9466
- /**
9467
- * @description Whether the rule is active. Defaults to true.
9468
- * @default true
9469
- */
9470
- enabled?: boolean;
9834
+ action: "ship" | "cancel" | "labels" | "update_tracking";
9835
+ /** @description Marketplace inputs for the action. Send the `payload` of the choice returned by `GET /api/v1/orders/{orderId}/action-options`, plus fields such as `trackingNumber` or `cancelReason` when a choice requires input. */
9836
+ payload?: {
9837
+ [key: string]: unknown;
9838
+ };
9839
+ /** @description Repeat a request with the same key to get the original job instead of a second marketplace call. */
9840
+ idempotencyKey?: string;
9471
9841
  };
9472
9842
  };
9473
9843
  };
9474
9844
  responses: {
9475
- /** @description Price book rule created. */
9476
- 201: {
9845
+ /** @description The idempotency key matched an existing job. */
9846
+ 200: {
9477
9847
  headers: {
9478
9848
  [name: string]: unknown;
9479
9849
  };
9480
9850
  content: {
9481
9851
  "application/json": {
9482
- rule: Record<string, never>;
9852
+ ok: boolean;
9853
+ /** @constant */
9854
+ apiVersion: "developer_v1";
9855
+ operationId: string;
9856
+ /** @enum {string} */
9857
+ status: "accepted" | "completed" | "failed";
9858
+ jobId?: string;
9859
+ productId?: string;
9860
+ warnings: string[];
9861
+ recommendations: string[];
9862
+ links: {
9863
+ [key: string]: string;
9864
+ };
9865
+ data: {
9866
+ jobId: string;
9867
+ jobStatus: string;
9868
+ duplicate: boolean;
9869
+ };
9483
9870
  };
9484
9871
  };
9485
9872
  };
9486
- /** @description Bad Request (invalid payload, markup range, or duplicate platform/store/country scope) */
9873
+ /** @description The action job was queued. */
9874
+ 202: {
9875
+ headers: {
9876
+ [name: string]: unknown;
9877
+ };
9878
+ content: {
9879
+ "application/json": {
9880
+ ok: boolean;
9881
+ /** @constant */
9882
+ apiVersion: "developer_v1";
9883
+ operationId: string;
9884
+ /** @enum {string} */
9885
+ status: "accepted" | "completed" | "failed";
9886
+ jobId?: string;
9887
+ productId?: string;
9888
+ warnings: string[];
9889
+ recommendations: string[];
9890
+ links: {
9891
+ [key: string]: string;
9892
+ };
9893
+ data: {
9894
+ jobId: string;
9895
+ jobStatus: string;
9896
+ duplicate: boolean;
9897
+ };
9898
+ };
9899
+ };
9900
+ };
9901
+ /** @description Invalid request */
9487
9902
  400: {
9488
9903
  headers: {
9489
9904
  [name: string]: unknown;
@@ -9497,13 +9912,20 @@ interface operations {
9497
9912
  };
9498
9913
  content?: never;
9499
9914
  };
9500
- /** @description Forbidden or missing `price_books:write` scope */
9915
+ /** @description Missing the `orders:write` scope */
9501
9916
  403: {
9502
9917
  headers: {
9503
9918
  [name: string]: unknown;
9504
9919
  };
9505
9920
  content?: never;
9506
9921
  };
9922
+ /** @description Order not found */
9923
+ 404: {
9924
+ headers: {
9925
+ [name: string]: unknown;
9926
+ };
9927
+ content?: never;
9928
+ };
9507
9929
  /** @description Rate limit exceeded */
9508
9930
  429: {
9509
9931
  headers: {
@@ -9520,47 +9942,59 @@ interface operations {
9520
9942
  };
9521
9943
  };
9522
9944
  };
9523
- get_v1_price_books_by_ruleid: {
9945
+ post_v1_organizations: {
9524
9946
  parameters: {
9525
- query?: {
9526
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
9527
- organizationId?: string;
9528
- };
9947
+ query?: never;
9529
9948
  header?: never;
9530
- path: {
9531
- ruleId: string;
9532
- };
9949
+ path?: never;
9533
9950
  cookie?: never;
9534
9951
  };
9535
- requestBody?: never;
9952
+ requestBody: {
9953
+ content: {
9954
+ /**
9955
+ * @example {
9956
+ * "name": "Acme Team"
9957
+ * }
9958
+ */
9959
+ "application/json": {
9960
+ /** @description Organization display name. */
9961
+ name: string;
9962
+ /**
9963
+ * @description When true, Better Auth keeps the current active organization instead of switching active context.
9964
+ * @default false
9965
+ */
9966
+ keepCurrentActiveOrganization?: boolean;
9967
+ };
9968
+ };
9969
+ };
9536
9970
  responses: {
9537
- /** @description Price book rule returned. */
9538
- 200: {
9971
+ /** @description Organization created */
9972
+ 201: {
9539
9973
  headers: {
9540
9974
  [name: string]: unknown;
9541
9975
  };
9542
9976
  content: {
9543
9977
  "application/json": {
9544
- rule: Record<string, never>;
9978
+ ok: boolean;
9979
+ organizationId: string;
9980
+ redirectUrl?: string;
9981
+ organization: {
9982
+ id: string;
9983
+ name: string;
9984
+ slug: string;
9985
+ };
9545
9986
  };
9546
9987
  };
9547
9988
  };
9548
- /** @description Unauthorized */
9549
- 401: {
9550
- headers: {
9551
- [name: string]: unknown;
9552
- };
9553
- content?: never;
9554
- };
9555
- /** @description Forbidden or missing `price_books:read` scope */
9556
- 403: {
9989
+ /** @description Bad Request - Invalid organization name or JSON */
9990
+ 400: {
9557
9991
  headers: {
9558
9992
  [name: string]: unknown;
9559
9993
  };
9560
9994
  content?: never;
9561
9995
  };
9562
- /** @description Price book rule not found */
9563
- 404: {
9996
+ /** @description Unauthorized - Sign in is required */
9997
+ 401: {
9564
9998
  headers: {
9565
9999
  [name: string]: unknown;
9566
10000
  };
@@ -9575,16 +10009,248 @@ interface operations {
9575
10009
  };
9576
10010
  };
9577
10011
  };
9578
- delete_v1_price_books_by_ruleid: {
10012
+ get_v1_price_books: {
9579
10013
  parameters: {
9580
10014
  query?: {
9581
10015
  /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
9582
10016
  organizationId?: string;
10017
+ /** @description Filter by marketplace platform: `shopee`, `lazada`, `tiktok`, `shopify`, `whatsapp`, `zalora`, `amazon`, or `ebay`. */
10018
+ platform?:
10019
+ | "shopee"
10020
+ | "lazada"
10021
+ | "tiktok"
10022
+ | "shopify"
10023
+ | "whatsapp"
10024
+ | "zalora"
10025
+ | "amazon"
10026
+ | "ebay";
10027
+ /** @description When `true`, return only enabled rules. */
10028
+ enabledOnly?: boolean;
9583
10029
  };
9584
10030
  header?: never;
9585
- path: {
9586
- ruleId: string;
9587
- };
10031
+ path?: never;
10032
+ cookie?: never;
10033
+ };
10034
+ requestBody?: never;
10035
+ responses: {
10036
+ /** @description Price book rules returned. */
10037
+ 200: {
10038
+ headers: {
10039
+ [name: string]: unknown;
10040
+ };
10041
+ content: {
10042
+ "application/json": {
10043
+ rules: Record<string, never>[];
10044
+ total: number;
10045
+ };
10046
+ };
10047
+ };
10048
+ /** @description Bad Request (invalid platform filter) */
10049
+ 400: {
10050
+ headers: {
10051
+ [name: string]: unknown;
10052
+ };
10053
+ content?: never;
10054
+ };
10055
+ /** @description Unauthorized */
10056
+ 401: {
10057
+ headers: {
10058
+ [name: string]: unknown;
10059
+ };
10060
+ content?: never;
10061
+ };
10062
+ /** @description Forbidden or missing `price_books:read` scope */
10063
+ 403: {
10064
+ headers: {
10065
+ [name: string]: unknown;
10066
+ };
10067
+ content?: never;
10068
+ };
10069
+ /** @description Rate limit exceeded */
10070
+ 429: {
10071
+ headers: {
10072
+ [name: string]: unknown;
10073
+ };
10074
+ content?: never;
10075
+ };
10076
+ /** @description Internal Server Error */
10077
+ 500: {
10078
+ headers: {
10079
+ [name: string]: unknown;
10080
+ };
10081
+ content?: never;
10082
+ };
10083
+ };
10084
+ };
10085
+ post_v1_price_books: {
10086
+ parameters: {
10087
+ query?: never;
10088
+ header?: never;
10089
+ path?: never;
10090
+ cookie?: never;
10091
+ };
10092
+ requestBody: {
10093
+ content: {
10094
+ /**
10095
+ * @example {
10096
+ * "platform": "shopee",
10097
+ * "marginValue": 10,
10098
+ * "country": "singapore",
10099
+ * "rounding": "currency_minor",
10100
+ * "currency": "SGD",
10101
+ * "enabled": true
10102
+ * }
10103
+ */
10104
+ "application/json": {
10105
+ /** @description Required for session auth across multiple organizations. Optional for OAuth/API keys bound to one organization. */
10106
+ organizationId?: string;
10107
+ /** @enum {string} */
10108
+ platform:
10109
+ | "shopee"
10110
+ | "lazada"
10111
+ | "tiktok"
10112
+ | "shopify"
10113
+ | "whatsapp"
10114
+ | "zalora"
10115
+ | "amazon"
10116
+ | "ebay";
10117
+ /** @description Optional connected store ID. Null/omit applies to all stores for the platform. */
10118
+ storeId?: string | null;
10119
+ /** @description Optional country scope (name or code). Null/omit applies to all countries. */
10120
+ country?: string | null;
10121
+ /** @description Markup percent applied to the catalog price. Ignored when `expression` is set. */
10122
+ marginValue: number;
10123
+ /** @description Buyer formula. `price` is the catalog price. Supports arithmetic, percentages, CEILING, IF, and CURRENCY(rate, "USD"). Replaces markup percent. */
10124
+ expression?: string | null;
10125
+ /**
10126
+ * @description Defaults to `currency_minor` when omitted.
10127
+ * @enum {string}
10128
+ */
10129
+ rounding?: "none" | "currency_minor" | "nearest_0_05" | "nearest_1";
10130
+ /** @description Optional ISO 4217 currency for `currency_minor` rounding. */
10131
+ currency?: string | null;
10132
+ /**
10133
+ * @description Whether the rule is active. Defaults to true.
10134
+ * @default true
10135
+ */
10136
+ enabled?: boolean;
10137
+ };
10138
+ };
10139
+ };
10140
+ responses: {
10141
+ /** @description Price book rule created. */
10142
+ 201: {
10143
+ headers: {
10144
+ [name: string]: unknown;
10145
+ };
10146
+ content: {
10147
+ "application/json": {
10148
+ rule: Record<string, never>;
10149
+ };
10150
+ };
10151
+ };
10152
+ /** @description Bad Request (invalid payload, markup range, or duplicate platform/store/country scope) */
10153
+ 400: {
10154
+ headers: {
10155
+ [name: string]: unknown;
10156
+ };
10157
+ content?: never;
10158
+ };
10159
+ /** @description Unauthorized */
10160
+ 401: {
10161
+ headers: {
10162
+ [name: string]: unknown;
10163
+ };
10164
+ content?: never;
10165
+ };
10166
+ /** @description Forbidden or missing `price_books:write` scope */
10167
+ 403: {
10168
+ headers: {
10169
+ [name: string]: unknown;
10170
+ };
10171
+ content?: never;
10172
+ };
10173
+ /** @description Rate limit exceeded */
10174
+ 429: {
10175
+ headers: {
10176
+ [name: string]: unknown;
10177
+ };
10178
+ content?: never;
10179
+ };
10180
+ /** @description Internal Server Error */
10181
+ 500: {
10182
+ headers: {
10183
+ [name: string]: unknown;
10184
+ };
10185
+ content?: never;
10186
+ };
10187
+ };
10188
+ };
10189
+ get_v1_price_books_by_ruleid: {
10190
+ parameters: {
10191
+ query?: {
10192
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
10193
+ organizationId?: string;
10194
+ };
10195
+ header?: never;
10196
+ path: {
10197
+ ruleId: string;
10198
+ };
10199
+ cookie?: never;
10200
+ };
10201
+ requestBody?: never;
10202
+ responses: {
10203
+ /** @description Price book rule returned. */
10204
+ 200: {
10205
+ headers: {
10206
+ [name: string]: unknown;
10207
+ };
10208
+ content: {
10209
+ "application/json": {
10210
+ rule: Record<string, never>;
10211
+ };
10212
+ };
10213
+ };
10214
+ /** @description Unauthorized */
10215
+ 401: {
10216
+ headers: {
10217
+ [name: string]: unknown;
10218
+ };
10219
+ content?: never;
10220
+ };
10221
+ /** @description Forbidden or missing `price_books:read` scope */
10222
+ 403: {
10223
+ headers: {
10224
+ [name: string]: unknown;
10225
+ };
10226
+ content?: never;
10227
+ };
10228
+ /** @description Price book rule not found */
10229
+ 404: {
10230
+ headers: {
10231
+ [name: string]: unknown;
10232
+ };
10233
+ content?: never;
10234
+ };
10235
+ /** @description Internal Server Error */
10236
+ 500: {
10237
+ headers: {
10238
+ [name: string]: unknown;
10239
+ };
10240
+ content?: never;
10241
+ };
10242
+ };
10243
+ };
10244
+ delete_v1_price_books_by_ruleid: {
10245
+ parameters: {
10246
+ query?: {
10247
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
10248
+ organizationId?: string;
10249
+ };
10250
+ header?: never;
10251
+ path: {
10252
+ ruleId: string;
10253
+ };
9588
10254
  cookie?: never;
9589
10255
  };
9590
10256
  requestBody?: never;
@@ -9872,8 +10538,7 @@ interface operations {
9872
10538
  isVariant: boolean;
9873
10539
  /** @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
10540
  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;
10541
+ /** @description Number of non-deleted variants; greater than 0 means the product has variants. A parent row's stockQuantity already includes their stock. Read the variants themselves from `GET /api/v1/products/{productId}`. */
9877
10542
  variantCount: number;
9878
10543
  status?: string;
9879
10544
  /** @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. */
@@ -10461,40 +11126,94 @@ interface operations {
10461
11126
  createdAt?: string;
10462
11127
  /** @description ISO 8601 timestamp */
10463
11128
  updatedAt?: string;
10464
- };
10465
- };
10466
- };
10467
- /** @description Unauthorized - Invalid or missing Bearer token */
10468
- 401: {
10469
- headers: {
10470
- [name: string]: unknown;
10471
- };
10472
- content?: never;
10473
- };
10474
- /** @description Forbidden - Token not authorized for this organization */
10475
- 403: {
10476
- headers: {
10477
- [name: string]: unknown;
10478
- };
10479
- content?: never;
10480
- };
10481
- /** @description Product not found */
10482
- 404: {
10483
- headers: {
10484
- [name: string]: unknown;
10485
- };
10486
- content?: never;
10487
- };
10488
- /** @description Internal Server Error */
10489
- 500: {
10490
- headers: {
10491
- [name: string]: unknown;
10492
- };
10493
- content?: never;
10494
- };
10495
- };
10496
- };
10497
- delete_v1_products_by_productid: {
11129
+ /** @description The product's non-deleted variants, oldest first, in the same row shape as `GET /api/v1/products` items. Empty for a simple product and when the requested product is itself a variant. */
11130
+ variants: ({
11131
+ /** Format: uuid */
11132
+ id: string;
11133
+ name: string;
11134
+ sku: string | null;
11135
+ /** Format: uuid */
11136
+ parentId: string | null;
11137
+ isVariant: boolean;
11138
+ /** @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. */
11139
+ stockQuantity: number | null;
11140
+ /** @description Number of non-deleted variants; greater than 0 means the product has variants. A parent row's stockQuantity already includes their stock. Read the variants themselves from `GET /api/v1/products/{productId}`. */
11141
+ variantCount: number;
11142
+ status?: string;
11143
+ /** @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. */
11144
+ statusFacets?: {
11145
+ /** @enum {string} */
11146
+ lifecycle:
11147
+ | "draft"
11148
+ | "active"
11149
+ | "archived"
11150
+ | "deleted"
11151
+ | "unknown";
11152
+ derived: (
11153
+ | "flagged"
11154
+ | "errors"
11155
+ | "qc_pending"
11156
+ | "qc_rejected"
11157
+ )[];
11158
+ zaloraQualityControl?: Record<string, never>;
11159
+ };
11160
+ } & {
11161
+ /** @description Option values that identify the variant, for example `{ "Color": "Navy", "Size": "M" }`. */
11162
+ variationAttributes?: {
11163
+ [key: string]: string;
11164
+ } | null;
11165
+ price?: number | null;
11166
+ salePrice?: number | null;
11167
+ /** @description Price formatted with the product currency. */
11168
+ priceLabel?: string;
11169
+ /** @description The variant's own image, falling back to the parent product image. */
11170
+ imageUrl?: string | null;
11171
+ imageUrls?: string[];
11172
+ /** @description The variant's listing on each connected marketplace. */
11173
+ marketplaces?: {
11174
+ marketplace?: string;
11175
+ country?: string | null;
11176
+ storeId?: string | null;
11177
+ storeLabel?: string | null;
11178
+ published?: boolean;
11179
+ itemId?: string | null;
11180
+ listingUrl?: string | null;
11181
+ }[];
11182
+ })[];
11183
+ };
11184
+ };
11185
+ };
11186
+ /** @description Unauthorized - Invalid or missing Bearer token */
11187
+ 401: {
11188
+ headers: {
11189
+ [name: string]: unknown;
11190
+ };
11191
+ content?: never;
11192
+ };
11193
+ /** @description Forbidden - Token not authorized for this organization */
11194
+ 403: {
11195
+ headers: {
11196
+ [name: string]: unknown;
11197
+ };
11198
+ content?: never;
11199
+ };
11200
+ /** @description Product not found */
11201
+ 404: {
11202
+ headers: {
11203
+ [name: string]: unknown;
11204
+ };
11205
+ content?: never;
11206
+ };
11207
+ /** @description Internal Server Error */
11208
+ 500: {
11209
+ headers: {
11210
+ [name: string]: unknown;
11211
+ };
11212
+ content?: never;
11213
+ };
11214
+ };
11215
+ };
11216
+ delete_v1_products_by_productid: {
10498
11217
  parameters: {
10499
11218
  query?: never;
10500
11219
  header?: never;
@@ -11106,6 +11825,119 @@ interface operations {
11106
11825
  };
11107
11826
  };
11108
11827
  };
11828
+ get_v1_products_by_productid_listings: {
11829
+ parameters: {
11830
+ query?: {
11831
+ /** @description Required for session auth. API keys already belong to one organization. */
11832
+ organizationId?: string;
11833
+ };
11834
+ header?: never;
11835
+ path: {
11836
+ productId: string;
11837
+ };
11838
+ cookie?: never;
11839
+ };
11840
+ requestBody?: never;
11841
+ responses: {
11842
+ /** @description The product's listings. */
11843
+ 200: {
11844
+ headers: {
11845
+ [name: string]: unknown;
11846
+ };
11847
+ content: {
11848
+ "application/json": {
11849
+ ok: boolean;
11850
+ /** @constant */
11851
+ apiVersion: "developer_v1";
11852
+ operationId: string;
11853
+ /** @enum {string} */
11854
+ status: "accepted" | "completed" | "failed";
11855
+ jobId?: string;
11856
+ productId?: string;
11857
+ warnings: string[];
11858
+ recommendations: string[];
11859
+ links: {
11860
+ [key: string]: string;
11861
+ };
11862
+ data: {
11863
+ productId: string;
11864
+ listings: {
11865
+ marketplace: string;
11866
+ marketplaceLabel: string;
11867
+ country: string | null;
11868
+ storeId: string | null;
11869
+ storeLabel: string | null;
11870
+ /** @description The marketplace has a live listing for the product. */
11871
+ published: boolean;
11872
+ /** @description The listing was delisted; its marketplace identity is kept. */
11873
+ unlisted: boolean;
11874
+ /** @description Marketplace item id. */
11875
+ itemId: string | null;
11876
+ /** @description Buyer-facing listing URL while published. */
11877
+ listingUrl: string | null;
11878
+ publishedAt: string | null;
11879
+ /** @description The most recent publish to this marketplace, including one still running. */
11880
+ latestPublish: {
11881
+ jobId: string;
11882
+ /** @enum {string} */
11883
+ status: "pending" | "running" | "success" | "error";
11884
+ /** @description `created` or `updated` once the job has run. */
11885
+ action: string | null;
11886
+ message: string | null;
11887
+ error: string | null;
11888
+ /** @description The marketplace's rejection details, when it returned any. */
11889
+ errorDetail?: unknown;
11890
+ updatedAt: string;
11891
+ } | null;
11892
+ }[];
11893
+ };
11894
+ };
11895
+ };
11896
+ };
11897
+ /** @description Invalid request */
11898
+ 400: {
11899
+ headers: {
11900
+ [name: string]: unknown;
11901
+ };
11902
+ content?: never;
11903
+ };
11904
+ /** @description Unauthorized */
11905
+ 401: {
11906
+ headers: {
11907
+ [name: string]: unknown;
11908
+ };
11909
+ content?: never;
11910
+ };
11911
+ /** @description Missing the `catalog:read` scope */
11912
+ 403: {
11913
+ headers: {
11914
+ [name: string]: unknown;
11915
+ };
11916
+ content?: never;
11917
+ };
11918
+ /** @description Product not found */
11919
+ 404: {
11920
+ headers: {
11921
+ [name: string]: unknown;
11922
+ };
11923
+ content?: never;
11924
+ };
11925
+ /** @description Rate limit exceeded */
11926
+ 429: {
11927
+ headers: {
11928
+ [name: string]: unknown;
11929
+ };
11930
+ content?: never;
11931
+ };
11932
+ /** @description Internal Server Error */
11933
+ 500: {
11934
+ headers: {
11935
+ [name: string]: unknown;
11936
+ };
11937
+ content?: never;
11938
+ };
11939
+ };
11940
+ };
11109
11941
  patch_v1_products_by_productid_price: {
11110
11942
  parameters: {
11111
11943
  query?: never;
@@ -12691,7 +13523,379 @@ interface operations {
12691
13523
  "application/json": Record<string, never>;
12692
13524
  };
12693
13525
  };
12694
- /** @description Bad Request */
13526
+ /** @description Bad Request */
13527
+ 400: {
13528
+ headers: {
13529
+ [name: string]: unknown;
13530
+ };
13531
+ content?: never;
13532
+ };
13533
+ /** @description Unauthorized */
13534
+ 401: {
13535
+ headers: {
13536
+ [name: string]: unknown;
13537
+ };
13538
+ content?: never;
13539
+ };
13540
+ /** @description Forbidden or missing `promotions:write` scope */
13541
+ 403: {
13542
+ headers: {
13543
+ [name: string]: unknown;
13544
+ };
13545
+ content?: never;
13546
+ };
13547
+ /** @description Internal Server Error */
13548
+ 500: {
13549
+ headers: {
13550
+ [name: string]: unknown;
13551
+ };
13552
+ content?: never;
13553
+ };
13554
+ };
13555
+ };
13556
+ post_v1_promotions_by_promotionid_sync: {
13557
+ parameters: {
13558
+ query?: {
13559
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
13560
+ organizationId?: string;
13561
+ };
13562
+ header?: never;
13563
+ path: {
13564
+ promotionId: string;
13565
+ };
13566
+ cookie?: never;
13567
+ };
13568
+ requestBody: {
13569
+ content: {
13570
+ /**
13571
+ * @example {
13572
+ * "marketplace": "shopee"
13573
+ * }
13574
+ */
13575
+ "application/json": {
13576
+ organizationId?: string;
13577
+ /**
13578
+ * @description Optional single marketplace. When omitted, syncs all promotion marketplaces.
13579
+ * @enum {string}
13580
+ */
13581
+ marketplace?:
13582
+ | "lazada"
13583
+ | "shopee"
13584
+ | "tiktok"
13585
+ | "shopify"
13586
+ | "amazon"
13587
+ | "zalora"
13588
+ | "ebay";
13589
+ /** @description Optional product subset. When omitted, syncs all assigned products. */
13590
+ productIds?: string[];
13591
+ };
13592
+ };
13593
+ };
13594
+ responses: {
13595
+ /** @description Sync queued. */
13596
+ 202: {
13597
+ headers: {
13598
+ [name: string]: unknown;
13599
+ };
13600
+ content: {
13601
+ "application/json": {
13602
+ ok: boolean;
13603
+ queued: boolean;
13604
+ jobId?: string;
13605
+ syncBatchId: string;
13606
+ marketplaces: string[];
13607
+ };
13608
+ };
13609
+ };
13610
+ /** @description Bad Request */
13611
+ 400: {
13612
+ headers: {
13613
+ [name: string]: unknown;
13614
+ };
13615
+ content?: never;
13616
+ };
13617
+ /** @description Unauthorized */
13618
+ 401: {
13619
+ headers: {
13620
+ [name: string]: unknown;
13621
+ };
13622
+ content?: never;
13623
+ };
13624
+ /** @description Forbidden or missing `promotions:write` scope */
13625
+ 403: {
13626
+ headers: {
13627
+ [name: string]: unknown;
13628
+ };
13629
+ content?: never;
13630
+ };
13631
+ /** @description Internal Server Error */
13632
+ 500: {
13633
+ headers: {
13634
+ [name: string]: unknown;
13635
+ };
13636
+ content?: never;
13637
+ };
13638
+ };
13639
+ };
13640
+ get_v1_returns: {
13641
+ parameters: {
13642
+ query?: {
13643
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
13644
+ organizationId?: string;
13645
+ marketplace?: string;
13646
+ accountId?: string;
13647
+ externalOrderId?: string;
13648
+ updatedSince?: string;
13649
+ cursor?: string;
13650
+ limit?: number;
13651
+ };
13652
+ header?: never;
13653
+ path?: never;
13654
+ cookie?: never;
13655
+ };
13656
+ requestBody?: never;
13657
+ responses: {
13658
+ /** @description Success */
13659
+ 200: {
13660
+ headers: {
13661
+ [name: string]: unknown;
13662
+ };
13663
+ content: {
13664
+ "application/json": {
13665
+ ok?: boolean;
13666
+ /** @default developer_v1 */
13667
+ apiVersion: string;
13668
+ };
13669
+ };
13670
+ };
13671
+ /** @description Bad Request */
13672
+ 400: {
13673
+ headers: {
13674
+ [name: string]: unknown;
13675
+ };
13676
+ content?: never;
13677
+ };
13678
+ /** @description Unauthorized */
13679
+ 401: {
13680
+ headers: {
13681
+ [name: string]: unknown;
13682
+ };
13683
+ content?: never;
13684
+ };
13685
+ /** @description Insufficient Credits */
13686
+ 402: {
13687
+ headers: {
13688
+ [name: string]: unknown;
13689
+ };
13690
+ content?: never;
13691
+ };
13692
+ /** @description Forbidden */
13693
+ 403: {
13694
+ headers: {
13695
+ [name: string]: unknown;
13696
+ };
13697
+ content?: never;
13698
+ };
13699
+ /** @description Internal Server Error */
13700
+ 500: {
13701
+ headers: {
13702
+ [name: string]: unknown;
13703
+ };
13704
+ content?: never;
13705
+ };
13706
+ };
13707
+ };
13708
+ get_v1_returns_by_returnid: {
13709
+ parameters: {
13710
+ query?: {
13711
+ /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
13712
+ organizationId?: string;
13713
+ };
13714
+ header?: never;
13715
+ path: {
13716
+ returnId: string;
13717
+ };
13718
+ cookie?: never;
13719
+ };
13720
+ requestBody?: never;
13721
+ responses: {
13722
+ /** @description Success */
13723
+ 200: {
13724
+ headers: {
13725
+ [name: string]: unknown;
13726
+ };
13727
+ content: {
13728
+ "application/json": {
13729
+ ok?: boolean;
13730
+ /** @default developer_v1 */
13731
+ apiVersion: string;
13732
+ };
13733
+ };
13734
+ };
13735
+ /** @description Bad Request */
13736
+ 400: {
13737
+ headers: {
13738
+ [name: string]: unknown;
13739
+ };
13740
+ content?: never;
13741
+ };
13742
+ /** @description Unauthorized */
13743
+ 401: {
13744
+ headers: {
13745
+ [name: string]: unknown;
13746
+ };
13747
+ content?: never;
13748
+ };
13749
+ /** @description Insufficient Credits */
13750
+ 402: {
13751
+ headers: {
13752
+ [name: string]: unknown;
13753
+ };
13754
+ content?: never;
13755
+ };
13756
+ /** @description Forbidden */
13757
+ 403: {
13758
+ headers: {
13759
+ [name: string]: unknown;
13760
+ };
13761
+ content?: never;
13762
+ };
13763
+ /** @description Return not found. */
13764
+ 404: {
13765
+ headers: {
13766
+ [name: string]: unknown;
13767
+ };
13768
+ content?: never;
13769
+ };
13770
+ /** @description Internal Server Error */
13771
+ 500: {
13772
+ headers: {
13773
+ [name: string]: unknown;
13774
+ };
13775
+ content?: never;
13776
+ };
13777
+ };
13778
+ };
13779
+ get_v1_reviews: {
13780
+ parameters: {
13781
+ query?: {
13782
+ /** @description Required for session auth. API keys already belong to one organization. */
13783
+ organizationId?: string;
13784
+ /** @description Search the comment, product name or SKU, marketplace item id, and review id. */
13785
+ q?: string;
13786
+ marketplace?:
13787
+ | "shopee"
13788
+ | "lazada"
13789
+ | "tiktok"
13790
+ | "shopify"
13791
+ | "zalora"
13792
+ | "amazon"
13793
+ | "ebay";
13794
+ status?:
13795
+ | "open"
13796
+ | "replied"
13797
+ | "hidden"
13798
+ | "handoff"
13799
+ | "solicited"
13800
+ | "ineligible";
13801
+ /** @description `unreplied`: open reviews the marketplace allows a reply to. `negative`: rating of 3 or lower. */
13802
+ priority?: "unreplied" | "negative";
13803
+ /** @description Comma-separated store (account) ids from `GET /api/v1/marketplaces/connected`. */
13804
+ store?: string;
13805
+ /** @description A product or variant UUID. Includes reviews of the whole product family. */
13806
+ productId?: string;
13807
+ /** @description Comma-separated sort keys: reviewed_desc, reviewed_asc, rating_desc, rating_asc, status_asc, status_desc, marketplace_asc, marketplace_desc, product_asc, product_desc. Defaults to reviewed_desc. */
13808
+ sortBy?: string;
13809
+ limit?: number;
13810
+ offset?: number;
13811
+ };
13812
+ header?: never;
13813
+ path?: never;
13814
+ cookie?: never;
13815
+ };
13816
+ requestBody?: never;
13817
+ responses: {
13818
+ /** @description A page of reviews. */
13819
+ 200: {
13820
+ headers: {
13821
+ [name: string]: unknown;
13822
+ };
13823
+ content: {
13824
+ "application/json": {
13825
+ ok: boolean;
13826
+ /** @constant */
13827
+ apiVersion: "developer_v1";
13828
+ operationId: string;
13829
+ /** @enum {string} */
13830
+ status: "accepted" | "completed" | "failed";
13831
+ jobId?: string;
13832
+ productId?: string;
13833
+ warnings: string[];
13834
+ recommendations: string[];
13835
+ links: {
13836
+ [key: string]: string;
13837
+ };
13838
+ data: {
13839
+ reviews: {
13840
+ id: string;
13841
+ /** @enum {string} */
13842
+ platform:
13843
+ | "shopee"
13844
+ | "lazada"
13845
+ | "tiktok"
13846
+ | "shopify"
13847
+ | "zalora"
13848
+ | "amazon"
13849
+ | "ebay";
13850
+ /** @description Marketplace store id. */
13851
+ accountId: string | null;
13852
+ storeName: string | null;
13853
+ productId: string | null;
13854
+ productName: string | null;
13855
+ productSku: string | null;
13856
+ productThumbnailUrl: string | null;
13857
+ orderId: string | null;
13858
+ externalItemId: string | null;
13859
+ externalReviewId: string;
13860
+ externalOrderId: string | null;
13861
+ /**
13862
+ * @description `solicitation` rows are Amazon orders you can send a review request for.
13863
+ * @enum {string}
13864
+ */
13865
+ kind: "product_review" | "solicitation";
13866
+ /** @enum {string} */
13867
+ status:
13868
+ | "open"
13869
+ | "replied"
13870
+ | "hidden"
13871
+ | "handoff"
13872
+ | "solicited"
13873
+ | "ineligible";
13874
+ rating: number | null;
13875
+ comment: string | null;
13876
+ sellerReply: string | null;
13877
+ sellerRepliedAt: string | null;
13878
+ /** @description The marketplace's own reply eligibility flag. */
13879
+ canReply: boolean;
13880
+ /** @description Why a reply is not possible right now, or null when `review.reply` will be accepted. */
13881
+ replyRestriction: string | null;
13882
+ reviewedAt: string | null;
13883
+ /** @description Public marketplace product page, when it can be resolved. */
13884
+ marketplaceListingUrl: string | null;
13885
+ sellerCenterUrl: string | null;
13886
+ firstSeenAt: string;
13887
+ lastSeenAt: string;
13888
+ }[];
13889
+ total: number;
13890
+ limit: number;
13891
+ offset: number;
13892
+ hasMore: boolean;
13893
+ nextOffset: number | null;
13894
+ };
13895
+ };
13896
+ };
13897
+ };
13898
+ /** @description Invalid request */
12695
13899
  400: {
12696
13900
  headers: {
12697
13901
  [name: string]: unknown;
@@ -12705,13 +13909,20 @@ interface operations {
12705
13909
  };
12706
13910
  content?: never;
12707
13911
  };
12708
- /** @description Forbidden or missing `promotions:write` scope */
13912
+ /** @description Missing the `reviews:read` scope */
12709
13913
  403: {
12710
13914
  headers: {
12711
13915
  [name: string]: unknown;
12712
13916
  };
12713
13917
  content?: never;
12714
13918
  };
13919
+ /** @description Rate limit exceeded */
13920
+ 429: {
13921
+ headers: {
13922
+ [name: string]: unknown;
13923
+ };
13924
+ content?: never;
13925
+ };
12715
13926
  /** @description Internal Server Error */
12716
13927
  500: {
12717
13928
  headers: {
@@ -12721,61 +13932,96 @@ interface operations {
12721
13932
  };
12722
13933
  };
12723
13934
  };
12724
- post_v1_promotions_by_promotionid_sync: {
13935
+ get_v1_reviews_by_reviewid: {
12725
13936
  parameters: {
12726
13937
  query?: {
12727
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
13938
+ /** @description Required for session auth. API keys already belong to one organization. */
12728
13939
  organizationId?: string;
12729
13940
  };
12730
13941
  header?: never;
12731
13942
  path: {
12732
- promotionId: string;
13943
+ reviewId: string;
12733
13944
  };
12734
13945
  cookie?: never;
12735
13946
  };
12736
- requestBody: {
12737
- content: {
12738
- /**
12739
- * @example {
12740
- * "marketplace": "shopee"
12741
- * }
12742
- */
12743
- "application/json": {
12744
- organizationId?: string;
12745
- /**
12746
- * @description Optional single marketplace. When omitted, syncs all promotion marketplaces.
12747
- * @enum {string}
12748
- */
12749
- marketplace?:
12750
- | "lazada"
12751
- | "shopee"
12752
- | "tiktok"
12753
- | "shopify"
12754
- | "amazon"
12755
- | "zalora"
12756
- | "ebay";
12757
- /** @description Optional product subset. When omitted, syncs all assigned products. */
12758
- productIds?: string[];
12759
- };
12760
- };
12761
- };
13947
+ requestBody?: never;
12762
13948
  responses: {
12763
- /** @description Sync queued. */
12764
- 202: {
13949
+ /** @description The review. */
13950
+ 200: {
12765
13951
  headers: {
12766
13952
  [name: string]: unknown;
12767
13953
  };
12768
13954
  content: {
12769
13955
  "application/json": {
12770
13956
  ok: boolean;
12771
- queued: boolean;
13957
+ /** @constant */
13958
+ apiVersion: "developer_v1";
13959
+ operationId: string;
13960
+ /** @enum {string} */
13961
+ status: "accepted" | "completed" | "failed";
12772
13962
  jobId?: string;
12773
- syncBatchId: string;
12774
- marketplaces: string[];
13963
+ productId?: string;
13964
+ warnings: string[];
13965
+ recommendations: string[];
13966
+ links: {
13967
+ [key: string]: string;
13968
+ };
13969
+ data: {
13970
+ review: {
13971
+ id: string;
13972
+ /** @enum {string} */
13973
+ platform:
13974
+ | "shopee"
13975
+ | "lazada"
13976
+ | "tiktok"
13977
+ | "shopify"
13978
+ | "zalora"
13979
+ | "amazon"
13980
+ | "ebay";
13981
+ /** @description Marketplace store id. */
13982
+ accountId: string | null;
13983
+ storeName: string | null;
13984
+ productId: string | null;
13985
+ productName: string | null;
13986
+ productSku: string | null;
13987
+ productThumbnailUrl: string | null;
13988
+ orderId: string | null;
13989
+ externalItemId: string | null;
13990
+ externalReviewId: string;
13991
+ externalOrderId: string | null;
13992
+ /**
13993
+ * @description `solicitation` rows are Amazon orders you can send a review request for.
13994
+ * @enum {string}
13995
+ */
13996
+ kind: "product_review" | "solicitation";
13997
+ /** @enum {string} */
13998
+ status:
13999
+ | "open"
14000
+ | "replied"
14001
+ | "hidden"
14002
+ | "handoff"
14003
+ | "solicited"
14004
+ | "ineligible";
14005
+ rating: number | null;
14006
+ comment: string | null;
14007
+ sellerReply: string | null;
14008
+ sellerRepliedAt: string | null;
14009
+ /** @description The marketplace's own reply eligibility flag. */
14010
+ canReply: boolean;
14011
+ /** @description Why a reply is not possible right now, or null when `review.reply` will be accepted. */
14012
+ replyRestriction: string | null;
14013
+ reviewedAt: string | null;
14014
+ /** @description Public marketplace product page, when it can be resolved. */
14015
+ marketplaceListingUrl: string | null;
14016
+ sellerCenterUrl: string | null;
14017
+ firstSeenAt: string;
14018
+ lastSeenAt: string;
14019
+ };
14020
+ };
12775
14021
  };
12776
14022
  };
12777
14023
  };
12778
- /** @description Bad Request */
14024
+ /** @description Invalid request */
12779
14025
  400: {
12780
14026
  headers: {
12781
14027
  [name: string]: unknown;
@@ -12789,13 +14035,27 @@ interface operations {
12789
14035
  };
12790
14036
  content?: never;
12791
14037
  };
12792
- /** @description Forbidden or missing `promotions:write` scope */
14038
+ /** @description Missing the `reviews:read` scope */
12793
14039
  403: {
12794
14040
  headers: {
12795
14041
  [name: string]: unknown;
12796
14042
  };
12797
14043
  content?: never;
12798
14044
  };
14045
+ /** @description Review not found */
14046
+ 404: {
14047
+ headers: {
14048
+ [name: string]: unknown;
14049
+ };
14050
+ content?: never;
14051
+ };
14052
+ /** @description Rate limit exceeded */
14053
+ 429: {
14054
+ headers: {
14055
+ [name: string]: unknown;
14056
+ };
14057
+ content?: never;
14058
+ };
12799
14059
  /** @description Internal Server Error */
12800
14060
  500: {
12801
14061
  headers: {
@@ -12805,38 +14065,48 @@ interface operations {
12805
14065
  };
12806
14066
  };
12807
14067
  };
12808
- get_v1_returns: {
14068
+ post_v1_reviews_by_reviewid_draft_reply: {
12809
14069
  parameters: {
12810
14070
  query?: {
12811
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
14071
+ /** @description Required for session auth. API keys already belong to one organization. */
12812
14072
  organizationId?: string;
12813
- marketplace?: string;
12814
- accountId?: string;
12815
- externalOrderId?: string;
12816
- updatedSince?: string;
12817
- cursor?: string;
12818
- limit?: number;
12819
14073
  };
12820
14074
  header?: never;
12821
- path?: never;
14075
+ path: {
14076
+ reviewId: string;
14077
+ };
12822
14078
  cookie?: never;
12823
14079
  };
12824
14080
  requestBody?: never;
12825
14081
  responses: {
12826
- /** @description Success */
14082
+ /** @description The drafted reply. */
12827
14083
  200: {
12828
14084
  headers: {
12829
14085
  [name: string]: unknown;
12830
14086
  };
12831
14087
  content: {
12832
14088
  "application/json": {
12833
- ok?: boolean;
12834
- /** @default developer_v1 */
12835
- apiVersion: string;
14089
+ ok: boolean;
14090
+ /** @constant */
14091
+ apiVersion: "developer_v1";
14092
+ operationId: string;
14093
+ /** @enum {string} */
14094
+ status: "accepted" | "completed" | "failed";
14095
+ jobId?: string;
14096
+ productId?: string;
14097
+ warnings: string[];
14098
+ recommendations: string[];
14099
+ links: {
14100
+ [key: string]: string;
14101
+ };
14102
+ data: {
14103
+ reply: string;
14104
+ model: string;
14105
+ };
12836
14106
  };
12837
14107
  };
12838
14108
  };
12839
- /** @description Bad Request */
14109
+ /** @description Invalid request */
12840
14110
  400: {
12841
14111
  headers: {
12842
14112
  [name: string]: unknown;
@@ -12850,15 +14120,22 @@ interface operations {
12850
14120
  };
12851
14121
  content?: never;
12852
14122
  };
12853
- /** @description Insufficient Credits */
12854
- 402: {
14123
+ /** @description Missing the `reviews:write` scope */
14124
+ 403: {
12855
14125
  headers: {
12856
14126
  [name: string]: unknown;
12857
14127
  };
12858
14128
  content?: never;
12859
14129
  };
12860
- /** @description Forbidden */
12861
- 403: {
14130
+ /** @description Review not found */
14131
+ 404: {
14132
+ headers: {
14133
+ [name: string]: unknown;
14134
+ };
14135
+ content?: never;
14136
+ };
14137
+ /** @description Rate limit exceeded */
14138
+ 429: {
12862
14139
  headers: {
12863
14140
  [name: string]: unknown;
12864
14141
  };
@@ -12871,36 +14148,80 @@ interface operations {
12871
14148
  };
12872
14149
  content?: never;
12873
14150
  };
14151
+ /** @description The AI draft failed */
14152
+ 502: {
14153
+ headers: {
14154
+ [name: string]: unknown;
14155
+ };
14156
+ content?: never;
14157
+ };
12874
14158
  };
12875
14159
  };
12876
- get_v1_returns_by_returnid: {
14160
+ post_v1_reviews_actions: {
12877
14161
  parameters: {
12878
- query?: {
12879
- /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
12880
- organizationId?: string;
12881
- };
14162
+ query?: never;
12882
14163
  header?: never;
12883
- path: {
12884
- returnId: string;
12885
- };
14164
+ path?: never;
12886
14165
  cookie?: never;
12887
14166
  };
12888
- requestBody?: never;
14167
+ requestBody: {
14168
+ content: {
14169
+ "application/json": {
14170
+ /** @description Required for session auth. API keys already belong to one organization. */
14171
+ organizationId?: string;
14172
+ /**
14173
+ * @description `review.reply` posts a seller reply. `review.solicit` sends an Amazon review request for a solicitation row.
14174
+ * @enum {string}
14175
+ */
14176
+ action: "review.reply" | "review.solicit";
14177
+ targets: {
14178
+ /** Format: uuid */
14179
+ reviewId: string;
14180
+ /** @description Reply for this review. Overrides the shared `reply`. */
14181
+ reply?: string;
14182
+ }[];
14183
+ /** @description Reply text used for every target without its own `reply`. */
14184
+ reply?: string;
14185
+ };
14186
+ };
14187
+ };
12889
14188
  responses: {
12890
- /** @description Success */
14189
+ /** @description One result per review. */
12891
14190
  200: {
12892
14191
  headers: {
12893
14192
  [name: string]: unknown;
12894
14193
  };
12895
14194
  content: {
12896
14195
  "application/json": {
12897
- ok?: boolean;
12898
- /** @default developer_v1 */
12899
- apiVersion: string;
14196
+ ok: boolean;
14197
+ /** @constant */
14198
+ apiVersion: "developer_v1";
14199
+ operationId: string;
14200
+ /** @enum {string} */
14201
+ status: "accepted" | "completed" | "failed";
14202
+ jobId?: string;
14203
+ productId?: string;
14204
+ warnings: string[];
14205
+ recommendations: string[];
14206
+ links: {
14207
+ [key: string]: string;
14208
+ };
14209
+ data: {
14210
+ success: boolean;
14211
+ succeededCount: number;
14212
+ failedCount: number;
14213
+ results: {
14214
+ reviewId: string;
14215
+ success: boolean;
14216
+ error?: string;
14217
+ /** @description Where to finish the action by hand when the marketplace API cannot. */
14218
+ sellerCenterUrl?: string;
14219
+ }[];
14220
+ };
12900
14221
  };
12901
14222
  };
12902
14223
  };
12903
- /** @description Bad Request */
14224
+ /** @description Invalid request */
12904
14225
  400: {
12905
14226
  headers: {
12906
14227
  [name: string]: unknown;
@@ -12914,22 +14235,15 @@ interface operations {
12914
14235
  };
12915
14236
  content?: never;
12916
14237
  };
12917
- /** @description Insufficient Credits */
12918
- 402: {
12919
- headers: {
12920
- [name: string]: unknown;
12921
- };
12922
- content?: never;
12923
- };
12924
- /** @description Forbidden */
14238
+ /** @description Missing the `reviews:write` scope */
12925
14239
  403: {
12926
14240
  headers: {
12927
14241
  [name: string]: unknown;
12928
14242
  };
12929
14243
  content?: never;
12930
14244
  };
12931
- /** @description Return not found. */
12932
- 404: {
14245
+ /** @description Rate limit exceeded */
14246
+ 429: {
12933
14247
  headers: {
12934
14248
  [name: string]: unknown;
12935
14249
  };
@@ -15592,6 +16906,20 @@ declare class AgentsClient {
15592
16906
  readonly general: AgentsGeneralClient;
15593
16907
  constructor(_http: OmniHttp);
15594
16908
  }
16909
+ declare class AnalyticsClient {
16910
+ protected readonly _http: OmniHttp;
16911
+ constructor(_http: OmniHttp);
16912
+ /**
16913
+ * Get Sales Analytics
16914
+ *
16915
+ * Sales KPIs for a date range with the change against the previous period of equal length, a daily trend, sales by order status and by marketplace, and the top products by net sales. Matches the Orders analysis page. Requires `analytics:read`.
16916
+
16917
+ Amounts are in `data.filters.currency`. Only orders in that currency are counted; nothing is converted. A range covers at most 366 days.
16918
+ *
16919
+ * `GET /api/v1/analytics/sales`
16920
+ */
16921
+ getSales(request?: OperationQuery<operations["get_v1_analytics_sales"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_analytics_sales"]>>;
16922
+ }
15595
16923
  declare class AopClient {
15596
16924
  protected readonly _http: OmniHttp;
15597
16925
  constructor(_http: OmniHttp);
@@ -16077,6 +17405,36 @@ declare class OrdersClient {
16077
17405
  * `PATCH /api/v1/orders/{orderId}`
16078
17406
  */
16079
17407
  update(request: OperationPath<operations["patch_v1_orders_by_orderid"]> & OperationBody<operations["patch_v1_orders_by_orderid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["patch_v1_orders_by_orderid"]>>;
17408
+ /**
17409
+ * Get Order Action Options
17410
+ *
17411
+ * Ask the marketplace which choices an action needs, such as pickup or drop-off for `ship`. Requires `orders:write`.
17412
+
17413
+ Send the chosen choice's `payload` with `POST /api/v1/orders/{orderId}/actions`.
17414
+ *
17415
+ * `GET /api/v1/orders/{orderId}/action-options`
17416
+ */
17417
+ getActionOptions(request: OperationPath<operations["get_v1_orders_by_orderid_action_options"]> & OperationQuery<operations["get_v1_orders_by_orderid_action_options"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_orders_by_orderid_action_options"]>>;
17418
+ /**
17419
+ * List Order Actions
17420
+ *
17421
+ * The order's 20 most recent action jobs, newest first, plus its latest successful label job. Requires `orders:read`.
17422
+
17423
+ Poll this after queueing an action. A succeeded `labels` job lists its label files in `labels`.
17424
+ *
17425
+ * `GET /api/v1/orders/{orderId}/actions`
17426
+ */
17427
+ listActions(request: OperationPath<operations["get_v1_orders_by_orderid_actions"]> & OperationQuery<operations["get_v1_orders_by_orderid_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_orders_by_orderid_actions"]>>;
17428
+ /**
17429
+ * Queue Order Action
17430
+ *
17431
+ * Ship, cancel, generate shipping labels for, or update tracking on a marketplace order. Requires `orders:write`.
17432
+
17433
+ The marketplace call runs in the background: the response is `202` with `jobId`; poll `GET /api/v1/orders/{orderId}/actions`. A repeated `idempotencyKey` returns `200` with the original job.
17434
+ *
17435
+ * `POST /api/v1/orders/{orderId}/actions`
17436
+ */
17437
+ queueAction(request: OperationPath<operations["post_v1_orders_by_orderid_actions"]> & OperationBody<operations["post_v1_orders_by_orderid_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_orders_by_orderid_actions"]>>;
16080
17438
  }
16081
17439
  declare class OrganizationsClient {
16082
17440
  protected readonly _http: OmniHttp;
@@ -16164,7 +17522,9 @@ declare class ProductsClient {
16164
17522
  *
16165
17523
  * 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
17524
 
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.
17525
+ ### Stock and variants
17526
+
17527
+ 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. A row with `variantCount` above 0 has variants; fetch them from `GET /api/v1/products/{productId}`. List rows do not contain `inventoryQuantity`, `inventory.quantity`, or an embedded `variants` array.
16168
17528
  *
16169
17529
  * `GET /api/v1/products`
16170
17530
  */
@@ -16209,6 +17569,8 @@ declare class ProductsClient {
16209
17569
  - Localization content and cultural notes
16210
17570
  - Intent queries and signals
16211
17571
  - Sources and claims
17572
+
17573
+ A parent product returns its variants in `variants`, with each variant's option values, price, stock, image, and marketplace listings.
16212
17574
  *
16213
17575
  * `GET /api/v1/products/{productId}`
16214
17576
  */
@@ -16257,6 +17619,16 @@ declare class ProductsClient {
16257
17619
  * `PATCH /api/v1/products/{productId}/inventory`
16258
17620
  */
16259
17621
  updateInventory(request: OperationPath<operations["patch_v1_products_by_productid_inventory"]> & OperationBody<operations["patch_v1_products_by_productid_inventory"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["patch_v1_products_by_productid_inventory"]>>;
17622
+ /**
17623
+ * Get Product Listings
17624
+ *
17625
+ * Where a product is listed: each marketplace's store, live or delisted state, item id, buyer-facing URL, and the latest publish attempt with any rejection details. Requires `catalog:read`.
17626
+
17627
+ Poll after `POST /api/v1/products/{productId}/publish`.
17628
+ *
17629
+ * `GET /api/v1/products/{productId}/listings`
17630
+ */
17631
+ getListings(request: OperationPath<operations["get_v1_products_by_productid_listings"]> & OperationQuery<operations["get_v1_products_by_productid_listings"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_products_by_productid_listings"]>>;
16260
17632
  /**
16261
17633
  * Update Product Price
16262
17634
  *
@@ -16431,6 +17803,48 @@ declare class ReturnsClient {
16431
17803
  */
16432
17804
  get(request: OperationPath<operations["get_v1_returns_by_returnid"]> & OperationQuery<operations["get_v1_returns_by_returnid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_returns_by_returnid"]>>;
16433
17805
  }
17806
+ declare class ReviewsClient {
17807
+ protected readonly _http: OmniHttp;
17808
+ constructor(_http: OmniHttp);
17809
+ /**
17810
+ * List Reviews
17811
+ *
17812
+ * List marketplace product reviews, newest first unless `sortBy` says otherwise. Requires `reviews:read`.
17813
+
17814
+ Use `priority=unreplied` for a reply queue. `replyRestriction` is null when a reply will be accepted.
17815
+ *
17816
+ * `GET /api/v1/reviews`
17817
+ */
17818
+ list(request?: OperationQuery<operations["get_v1_reviews"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_reviews"]>>;
17819
+ /**
17820
+ * Get Review
17821
+ *
17822
+ * Read one review by its OmniCommerce UUID. Requires `reviews:read`.
17823
+ *
17824
+ * `GET /api/v1/reviews/{reviewId}`
17825
+ */
17826
+ get(request: OperationPath<operations["get_v1_reviews_by_reviewid"]> & OperationQuery<operations["get_v1_reviews_by_reviewid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_reviews_by_reviewid"]>>;
17827
+ /**
17828
+ * Draft Review Reply
17829
+ *
17830
+ * Draft a reply with AI from the review, the product, recent replies, and the brand kit. Uses AI credits. Requires `reviews:write`.
17831
+
17832
+ Nothing is posted; send the text with `POST /api/v1/reviews/actions`.
17833
+ *
17834
+ * `POST /api/v1/reviews/{reviewId}/draft-reply`
17835
+ */
17836
+ draftReply(request: OperationPath<operations["post_v1_reviews_by_reviewid_draft_reply"]> & OperationQuery<operations["post_v1_reviews_by_reviewid_draft_reply"]> & Record<string, unknown>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_reviews_by_reviewid_draft_reply"]>>;
17837
+ /**
17838
+ * Act on Reviews
17839
+ *
17840
+ * Reply to up to 50 reviews, or send Amazon review requests for solicitation rows. Requires `reviews:write`.
17841
+
17842
+ Each target succeeds or fails on its own; read `data.results`. `ok` is true only when every target succeeds.
17843
+ *
17844
+ * `POST /api/v1/reviews/actions`
17845
+ */
17846
+ actions(request: OperationBody<operations["post_v1_reviews_actions"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_reviews_actions"]>>;
17847
+ }
16434
17848
  declare class SearchClient {
16435
17849
  protected readonly _http: OmniHttp;
16436
17850
  constructor(_http: OmniHttp);
@@ -16654,6 +18068,7 @@ declare class ZaloraClient {
16654
18068
  declare class OmniGeneratedClient {
16655
18069
  protected readonly _http: OmniHttp;
16656
18070
  readonly agents: AgentsClient;
18071
+ readonly analytics: AnalyticsClient;
16657
18072
  readonly aop: AopClient;
16658
18073
  readonly api: ApiClient;
16659
18074
  readonly campaigns: CampaignsClient;
@@ -16677,6 +18092,7 @@ declare class OmniGeneratedClient {
16677
18092
  readonly products: ProductsClient;
16678
18093
  readonly promotions: PromotionsClient;
16679
18094
  readonly returns: ReturnsClient;
18095
+ readonly reviews: ReviewsClient;
16680
18096
  readonly search: SearchClient;
16681
18097
  readonly settlements: SettlementsClient;
16682
18098
  readonly sync: SyncClient;
@@ -16689,6 +18105,7 @@ declare class OmniGeneratedClient {
16689
18105
  }
16690
18106
  type OmniResources = {
16691
18107
  agents: AgentsClient;
18108
+ analytics: AnalyticsClient;
16692
18109
  aop: AopClient;
16693
18110
  api: ApiClient;
16694
18111
  campaigns: CampaignsClient;
@@ -16712,6 +18129,7 @@ type OmniResources = {
16712
18129
  products: ProductsClient;
16713
18130
  promotions: PromotionsClient;
16714
18131
  returns: ReturnsClient;
18132
+ reviews: ReviewsClient;
16715
18133
  search: SearchClient;
16716
18134
  settlements: SettlementsClient;
16717
18135
  sync: SyncClient;
@@ -16763,7 +18181,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
16763
18181
  toleranceInSeconds?: number;
16764
18182
  }): Promise<ConstructedWebhookEvent>;
16765
18183
 
16766
- declare const SDK_VERSION = "0.2.0";
18184
+ declare const SDK_VERSION = "0.3.0";
16767
18185
 
16768
18186
  type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
16769
18187
  type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];