@omni-commerce/sdk 0.4.0 → 0.6.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.ts CHANGED
@@ -125,7 +125,11 @@ type OperationBody<Op> = RequestBodyContent<Op> extends never ? undefined : Requ
125
125
  "application/x-www-form-urlencoded": infer U;
126
126
  } ? U : RequestBodyContent<Op> extends {
127
127
  "multipart/form-data": infer M;
128
- } ? M | FormData : undefined;
128
+ } ? MultipartFields<M> : undefined;
129
+ /** Multipart fields: a binary (string) field also takes a Blob or File. */
130
+ type MultipartFields<T> = {
131
+ [K in keyof T]: T[K] extends string ? T[K] | Blob : T[K];
132
+ };
129
133
  type FlattenedRequest<Op> = OperationPath<Op> & OperationQuery<Op> & (OperationBody<Op> extends undefined ? Record<string, never> : OperationBody<Op>);
130
134
 
131
135
  declare class OmniError extends Error {
@@ -579,6 +583,38 @@ interface paths {
579
583
  patch?: never;
580
584
  trace?: never;
581
585
  };
586
+ "/api/v1/brandsgateway/import": {
587
+ parameters: {
588
+ query?: never;
589
+ header?: never;
590
+ path?: never;
591
+ cookie?: never;
592
+ };
593
+ get?: never;
594
+ put?: never;
595
+ /**
596
+ * Import BrandsGateway Products
597
+ * @description Requires catalog:write and a connected BrandsGateway account. Uses the same parameters and import service as the import_brandsgateway_products tool.
598
+ *
599
+ * ### Selection
600
+ *
601
+ * Choose catalogProductIds or importAllMatching with filters. maxProducts limits new imports to 1–50 across pages (default 50); already imported products are skipped. Numeric brandIds, vendorIds (supplier warehouses), categoryIds, and conditionIds arrays match any value within each field and all supplied fields together. Omit a field for no restriction; empty arrays and legacy singular/string filters are rejected. Brands accept at most 500 IDs; other filter arrays accept at most 50 each. Broad combinations may exceed the supplier request budget and return a failure asking you to narrow the filters.
602
+ *
603
+ * ### Updated dates and enrichment
604
+ *
605
+ * updatedAtMin and updatedAtMax map to the supplier updated_at_min and updated_at_max filters; dates use midnight UTC. There is no creation-date sorting. Products import as drafts. Connected marketplace selections and country apply to the entire import. Enrichment and taxonomy are queued according to the organization's BrandsGateway preferences; any AI usage is billed to that organization. This endpoint does not publish listings.
606
+ *
607
+ * ### Result
608
+ *
609
+ * Returns HTTP 200 when the import attempt finishes, including partial failures. Inspect ok, data.success, counts, results, and data.error; failed or partial imports have ok=false and status=failed. Enrichment may still be running when data.enrichmentQueued=true.
610
+ */
611
+ post: operations["post_v1_brandsgateway_import"];
612
+ delete?: never;
613
+ options?: never;
614
+ head?: never;
615
+ patch?: never;
616
+ trace?: never;
617
+ };
582
618
  "/api/v1/campaigns": {
583
619
  parameters: {
584
620
  query?: never;
@@ -857,6 +893,48 @@ interface paths {
857
893
  patch?: never;
858
894
  trace?: never;
859
895
  };
896
+ "/api/v1/documents": {
897
+ parameters: {
898
+ query?: never;
899
+ header?: never;
900
+ path?: never;
901
+ cookie?: never;
902
+ };
903
+ get?: never;
904
+ put?: never;
905
+ /**
906
+ * Upload Document
907
+ * @description Upload one file to the knowledge base as multipart/form-data. Requires `documents:write`.
908
+ *
909
+ * Accepted: PDF up to 20 MB, Excel (.xlsx/.xlsm) up to 10 MB, images up to 8 MB, CSV and Markdown up to 2 MB. PDFs, Markdown, and images are indexed in the background; poll `GET /api/v1/documents/{documentId}` until `status` is `completed`. CSV and Excel are stored for agents to read but are not indexed.
910
+ */
911
+ post: operations["post_v1_documents"];
912
+ delete?: never;
913
+ options?: never;
914
+ head?: never;
915
+ patch?: never;
916
+ trace?: never;
917
+ };
918
+ "/api/v1/documents/{documentId}": {
919
+ parameters: {
920
+ query?: never;
921
+ header?: never;
922
+ path?: never;
923
+ cookie?: never;
924
+ };
925
+ /**
926
+ * Get Document
927
+ * @description Read one knowledge base document and its indexing status. Requires `documents:read`.
928
+ */
929
+ get: operations["get_v1_documents_by_documentid"];
930
+ put?: never;
931
+ post?: never;
932
+ delete?: never;
933
+ options?: never;
934
+ head?: never;
935
+ patch?: never;
936
+ trace?: never;
937
+ };
860
938
  "/api/v1/evaluate": {
861
939
  parameters: {
862
940
  query?: never;
@@ -1547,6 +1625,28 @@ interface paths {
1547
1625
  patch?: never;
1548
1626
  trace?: never;
1549
1627
  };
1628
+ "/api/v1/products/{productId}/images": {
1629
+ parameters: {
1630
+ query?: never;
1631
+ header?: never;
1632
+ path?: never;
1633
+ cookie?: never;
1634
+ };
1635
+ get?: never;
1636
+ put?: never;
1637
+ /**
1638
+ * Upload Product Image
1639
+ * @description Upload one image to a product's or variant's gallery as multipart/form-data. Requires `catalog:write`.
1640
+ *
1641
+ * JPEG, PNG, WebP, AVIF, or HEIC up to 8 MB; WebP, AVIF, and HEIC are stored as JPEG. The image is added at `position`, or at the end. Publish the product to send the new gallery to marketplaces.
1642
+ */
1643
+ post: operations["post_v1_products_by_productid_images"];
1644
+ delete?: never;
1645
+ options?: never;
1646
+ head?: never;
1647
+ patch?: never;
1648
+ trace?: never;
1649
+ };
1550
1650
  "/api/v1/products/{productId}/inventory": {
1551
1651
  parameters: {
1552
1652
  query?: never;
@@ -1814,7 +1914,7 @@ interface paths {
1814
1914
  patch?: never;
1815
1915
  trace?: never;
1816
1916
  };
1817
- "/api/v1/promotions/{promotionId}/sync": {
1917
+ "/api/v1/promotions/{promotionId}/retry": {
1818
1918
  parameters: {
1819
1919
  query?: never;
1820
1920
  header?: never;
@@ -1824,10 +1924,12 @@ interface paths {
1824
1924
  get?: never;
1825
1925
  put?: never;
1826
1926
  /**
1827
- * Sync Promotion to Marketplaces
1828
- * @description Queue marketplace push for assigned products (Shopee promotion, Lazada Store Flash Sale/voucher/Flexicombo, TikTok activity, or Shopify discount). Requires `promotions:write`.
1927
+ * Retry Marketplace Delivery
1928
+ * @description Run marketplace delivery again after a failure, for example once a store is reconnected. Requires `promotions:write`.
1929
+ *
1930
+ * You do not need this to publish a promotion: creating or activating it, editing it while active or scheduled, and assigning products already deliver it, and pausing, ending, or archiving removes it. A retry brings each marketplace back in line with the promotion's current status.
1829
1931
  */
1830
- post: operations["post_v1_promotions_by_promotionid_sync"];
1932
+ post: operations["post_v1_promotions_by_promotionid_retry"];
1831
1933
  delete?: never;
1832
1934
  options?: never;
1833
1935
  head?: never;
@@ -6617,6 +6719,163 @@ interface operations {
6617
6719
  };
6618
6720
  };
6619
6721
  };
6722
+ post_v1_brandsgateway_import: {
6723
+ parameters: {
6724
+ query?: never;
6725
+ header?: never;
6726
+ path?: never;
6727
+ cookie?: never;
6728
+ };
6729
+ requestBody: {
6730
+ content: {
6731
+ /**
6732
+ * @example {
6733
+ * "importAllMatching": true,
6734
+ * "maxProducts": 10,
6735
+ * "filters": {
6736
+ * "categoryIds": [
6737
+ * 71816
6738
+ * ],
6739
+ * "vendorIds": [
6740
+ * 73680
6741
+ * ],
6742
+ * "brandIds": [
6743
+ * 68571,
6744
+ * 615
6745
+ * ],
6746
+ * "updatedAtMin": "2026-10-01"
6747
+ * }
6748
+ * }
6749
+ */
6750
+ "application/json": {
6751
+ /** @description BrandsGateway catalog product IDs (supplier numbers, not Omni product IDs). Trimmed and de-duplicated while preserving order. Max 50. */
6752
+ catalogProductIds?: number[];
6753
+ /** @description Import up to maxProducts products matching filters instead of an explicit catalogProductIds list (defaults to 50). */
6754
+ importAllMatching?: boolean;
6755
+ /** @description Maximum products to import in this call (1–50, defaults to 50). Applied across all matching catalog pages. An explicit catalogProductIds selection cannot exceed this limit after deduplication. */
6756
+ maxProducts?: number;
6757
+ /** @description Catalog product IDs to skip when importAllMatching is true. */
6758
+ excludedProductIds?: number[];
6759
+ /** @description Listing filters when importAllMatching is true. Numeric ID arrays match any ID within each field, and all supplied fields must match. Omit a field to leave it unrestricted. */
6760
+ filters?: {
6761
+ q?: string;
6762
+ /** @description Numeric brand IDs. Match any selected brand. Max 500; duplicates removed in first-requested order. */
6763
+ brandIds?: number[];
6764
+ /** @description Numeric warehouse/vendor IDs. Match any selected warehouse. Max 50; duplicates removed in first-requested order. */
6765
+ vendorIds?: number[];
6766
+ /** @description Numeric category IDs. Match any selected category. Max 50; duplicates removed in first-requested order. */
6767
+ categoryIds?: number[];
6768
+ /** @description Numeric product-condition IDs. Match any selected condition. Max 50; duplicates removed in first-requested order. */
6769
+ conditionIds?: number[];
6770
+ /** @constant */
6771
+ stock?: "instock";
6772
+ priceMin?: string;
6773
+ priceMax?: string;
6774
+ /** @enum {string} */
6775
+ imported?: "not_imported" | "imported" | "all";
6776
+ /** @description Supplier updated_at_min: only products last updated after this ISO date or date-time. Date-only values mean midnight UTC; offset date-times are converted to UTC. */
6777
+ updatedAtMin?: string;
6778
+ /** @description Supplier updated_at_max: only products last updated before this ISO date or date-time. Date-only values mean midnight UTC; offset date-times are converted to UTC. */
6779
+ updatedAtMax?: string;
6780
+ };
6781
+ /** @description Connected marketplaces to assign on import. Taxonomy enrichment uses taxonomy-capable stores from this list. */
6782
+ targetMarketplaces?: string[];
6783
+ /** @description Connected store ID keyed by marketplace. */
6784
+ marketplaceStoreSelections?: {
6785
+ [key: string]: string;
6786
+ };
6787
+ /** @description Shared country for the selected import stores. */
6788
+ country?: string;
6789
+ /** @description Required for session auth; derived from the credential for bearer auth. */
6790
+ organizationId?: string;
6791
+ };
6792
+ };
6793
+ };
6794
+ responses: {
6795
+ /** @description Import attempt finished. Inspect success and per-product results, including partial failures. */
6796
+ 200: {
6797
+ headers: {
6798
+ [name: string]: unknown;
6799
+ };
6800
+ content: {
6801
+ "application/json": {
6802
+ ok: boolean;
6803
+ apiVersion: string;
6804
+ operationId: string;
6805
+ /** @enum {string} */
6806
+ status: "completed" | "failed";
6807
+ data: {
6808
+ success: boolean;
6809
+ catalogProductIds: number[];
6810
+ importedProductIds: string[];
6811
+ importAllMatching: boolean;
6812
+ succeededCount: number;
6813
+ failedCount: number;
6814
+ skippedCount: number;
6815
+ results: {
6816
+ catalogProductId?: number;
6817
+ productId?: string;
6818
+ success: boolean;
6819
+ skipped?: boolean;
6820
+ error?: string;
6821
+ }[];
6822
+ runEnrichment: boolean;
6823
+ /** @description True when this import queued listing enrichment and taxonomy for importedProductIds. Do not call product_enrichment_tool again for those ids. */
6824
+ enrichmentQueued: boolean;
6825
+ taxonomyAssignments: {
6826
+ marketplace: string;
6827
+ storeId: string;
6828
+ storeName: string;
6829
+ country: string;
6830
+ }[];
6831
+ error?: string;
6832
+ };
6833
+ error?: string;
6834
+ links?: {
6835
+ [key: string]: string;
6836
+ };
6837
+ warnings?: string[];
6838
+ recommendations?: string[];
6839
+ };
6840
+ };
6841
+ };
6842
+ /** @description Invalid request, including nonnumeric IDs or an invalid quantity. */
6843
+ 400: {
6844
+ headers: {
6845
+ [name: string]: unknown;
6846
+ };
6847
+ content?: never;
6848
+ };
6849
+ /** @description Missing or invalid credentials. */
6850
+ 401: {
6851
+ headers: {
6852
+ [name: string]: unknown;
6853
+ };
6854
+ content?: never;
6855
+ };
6856
+ /** @description Missing catalog:write scope, insufficient permission, organization mismatch, or inactive organization. */
6857
+ 403: {
6858
+ headers: {
6859
+ [name: string]: unknown;
6860
+ };
6861
+ content?: never;
6862
+ };
6863
+ /** @description Rate limit exceeded. */
6864
+ 429: {
6865
+ headers: {
6866
+ [name: string]: unknown;
6867
+ };
6868
+ content?: never;
6869
+ };
6870
+ /** @description Unexpected import failure. */
6871
+ 500: {
6872
+ headers: {
6873
+ [name: string]: unknown;
6874
+ };
6875
+ content?: never;
6876
+ };
6877
+ };
6878
+ };
6620
6879
  get_v1_campaigns: {
6621
6880
  parameters: {
6622
6881
  query?: {
@@ -9495,6 +9754,296 @@ interface operations {
9495
9754
  };
9496
9755
  };
9497
9756
  };
9757
+ post_v1_documents: {
9758
+ parameters: {
9759
+ query?: never;
9760
+ header?: never;
9761
+ path?: never;
9762
+ cookie?: never;
9763
+ };
9764
+ requestBody: {
9765
+ content: {
9766
+ "multipart/form-data": {
9767
+ /**
9768
+ * Format: binary
9769
+ * @description The file to upload.
9770
+ */
9771
+ file: string;
9772
+ /** @description Required for session auth. API keys already belong to one organization. */
9773
+ organizationId?: string;
9774
+ /**
9775
+ * @description What the document is. `bank_statement` is never shown to AI.
9776
+ * @default other
9777
+ * @enum {string}
9778
+ */
9779
+ documentType?:
9780
+ | "datasheet"
9781
+ | "invoice"
9782
+ | "packing_list"
9783
+ | "compliance_certificate"
9784
+ | "test_report"
9785
+ | "sds"
9786
+ | "manual"
9787
+ | "warranty"
9788
+ | "authorization_letter"
9789
+ | "shipping_doc"
9790
+ | "regulation"
9791
+ | "policy"
9792
+ | "bank_statement"
9793
+ | "other";
9794
+ /**
9795
+ * Format: uuid
9796
+ * @description Attach the document to one product instead of the whole organization.
9797
+ */
9798
+ productId?: string;
9799
+ /** @description File name to store. Defaults to the uploaded file's name. */
9800
+ fileName?: string;
9801
+ };
9802
+ };
9803
+ };
9804
+ responses: {
9805
+ /** @description The document was stored; indexing is queued. */
9806
+ 202: {
9807
+ headers: {
9808
+ [name: string]: unknown;
9809
+ };
9810
+ content: {
9811
+ "application/json": {
9812
+ ok: boolean;
9813
+ /** @constant */
9814
+ apiVersion: "developer_v1";
9815
+ operationId: string;
9816
+ /** @enum {string} */
9817
+ status: "accepted" | "completed" | "failed";
9818
+ jobId?: string;
9819
+ productId?: string;
9820
+ warnings: string[];
9821
+ recommendations: string[];
9822
+ links: {
9823
+ [key: string]: string;
9824
+ };
9825
+ data: {
9826
+ document: {
9827
+ id: string;
9828
+ title: string;
9829
+ fileName: string;
9830
+ mimeType: string;
9831
+ sizeBytes: number;
9832
+ /** @enum {string} */
9833
+ documentType:
9834
+ | "datasheet"
9835
+ | "invoice"
9836
+ | "packing_list"
9837
+ | "compliance_certificate"
9838
+ | "test_report"
9839
+ | "sds"
9840
+ | "manual"
9841
+ | "warranty"
9842
+ | "authorization_letter"
9843
+ | "shipping_doc"
9844
+ | "regulation"
9845
+ | "policy"
9846
+ | "bank_statement"
9847
+ | "other";
9848
+ productId: string | null;
9849
+ /**
9850
+ * @description `pending` and `processing` while indexing; `completed` when agents can search it.
9851
+ * @enum {string}
9852
+ */
9853
+ status:
9854
+ | "pending"
9855
+ | "processing"
9856
+ | "completed"
9857
+ | "completed_with_warnings"
9858
+ | "failed";
9859
+ /** @description Searchable chunks. CSV and Excel are stored for reading but not indexed, so this is 0. */
9860
+ indexedChunkCount: number | null;
9861
+ pageCount: number | null;
9862
+ errorMessage: string | null;
9863
+ createdAt: string;
9864
+ updatedAt: string;
9865
+ };
9866
+ /** @description Indexing was queued. */
9867
+ queued: boolean;
9868
+ warning?: string;
9869
+ };
9870
+ };
9871
+ };
9872
+ };
9873
+ /** @description Invalid request */
9874
+ 400: {
9875
+ headers: {
9876
+ [name: string]: unknown;
9877
+ };
9878
+ content?: never;
9879
+ };
9880
+ /** @description Unauthorized */
9881
+ 401: {
9882
+ headers: {
9883
+ [name: string]: unknown;
9884
+ };
9885
+ content?: never;
9886
+ };
9887
+ /** @description Missing the `documents:write` scope */
9888
+ 403: {
9889
+ headers: {
9890
+ [name: string]: unknown;
9891
+ };
9892
+ content?: never;
9893
+ };
9894
+ /** @description Product not found */
9895
+ 404: {
9896
+ headers: {
9897
+ [name: string]: unknown;
9898
+ };
9899
+ content?: never;
9900
+ };
9901
+ /** @description The request body is not multipart or is too large */
9902
+ 413: {
9903
+ headers: {
9904
+ [name: string]: unknown;
9905
+ };
9906
+ content?: never;
9907
+ };
9908
+ /** @description Rate limit exceeded */
9909
+ 429: {
9910
+ headers: {
9911
+ [name: string]: unknown;
9912
+ };
9913
+ content?: never;
9914
+ };
9915
+ /** @description Internal Server Error */
9916
+ 500: {
9917
+ headers: {
9918
+ [name: string]: unknown;
9919
+ };
9920
+ content?: never;
9921
+ };
9922
+ };
9923
+ };
9924
+ get_v1_documents_by_documentid: {
9925
+ parameters: {
9926
+ query?: {
9927
+ /** @description Required for session auth. API keys already belong to one organization. */
9928
+ organizationId?: string;
9929
+ };
9930
+ header?: never;
9931
+ path: {
9932
+ documentId: string;
9933
+ };
9934
+ cookie?: never;
9935
+ };
9936
+ requestBody?: never;
9937
+ responses: {
9938
+ /** @description The document. */
9939
+ 200: {
9940
+ headers: {
9941
+ [name: string]: unknown;
9942
+ };
9943
+ content: {
9944
+ "application/json": {
9945
+ ok: boolean;
9946
+ /** @constant */
9947
+ apiVersion: "developer_v1";
9948
+ operationId: string;
9949
+ /** @enum {string} */
9950
+ status: "accepted" | "completed" | "failed";
9951
+ jobId?: string;
9952
+ productId?: string;
9953
+ warnings: string[];
9954
+ recommendations: string[];
9955
+ links: {
9956
+ [key: string]: string;
9957
+ };
9958
+ data: {
9959
+ document: {
9960
+ id: string;
9961
+ title: string;
9962
+ fileName: string;
9963
+ mimeType: string;
9964
+ sizeBytes: number;
9965
+ /** @enum {string} */
9966
+ documentType:
9967
+ | "datasheet"
9968
+ | "invoice"
9969
+ | "packing_list"
9970
+ | "compliance_certificate"
9971
+ | "test_report"
9972
+ | "sds"
9973
+ | "manual"
9974
+ | "warranty"
9975
+ | "authorization_letter"
9976
+ | "shipping_doc"
9977
+ | "regulation"
9978
+ | "policy"
9979
+ | "bank_statement"
9980
+ | "other";
9981
+ productId: string | null;
9982
+ /**
9983
+ * @description `pending` and `processing` while indexing; `completed` when agents can search it.
9984
+ * @enum {string}
9985
+ */
9986
+ status:
9987
+ | "pending"
9988
+ | "processing"
9989
+ | "completed"
9990
+ | "completed_with_warnings"
9991
+ | "failed";
9992
+ /** @description Searchable chunks. CSV and Excel are stored for reading but not indexed, so this is 0. */
9993
+ indexedChunkCount: number | null;
9994
+ pageCount: number | null;
9995
+ errorMessage: string | null;
9996
+ createdAt: string;
9997
+ updatedAt: string;
9998
+ };
9999
+ };
10000
+ };
10001
+ };
10002
+ };
10003
+ /** @description Invalid request */
10004
+ 400: {
10005
+ headers: {
10006
+ [name: string]: unknown;
10007
+ };
10008
+ content?: never;
10009
+ };
10010
+ /** @description Unauthorized */
10011
+ 401: {
10012
+ headers: {
10013
+ [name: string]: unknown;
10014
+ };
10015
+ content?: never;
10016
+ };
10017
+ /** @description Missing the `documents:read` scope */
10018
+ 403: {
10019
+ headers: {
10020
+ [name: string]: unknown;
10021
+ };
10022
+ content?: never;
10023
+ };
10024
+ /** @description Document not found */
10025
+ 404: {
10026
+ headers: {
10027
+ [name: string]: unknown;
10028
+ };
10029
+ content?: never;
10030
+ };
10031
+ /** @description Rate limit exceeded */
10032
+ 429: {
10033
+ headers: {
10034
+ [name: string]: unknown;
10035
+ };
10036
+ content?: never;
10037
+ };
10038
+ /** @description Internal Server Error */
10039
+ 500: {
10040
+ headers: {
10041
+ [name: string]: unknown;
10042
+ };
10043
+ content?: never;
10044
+ };
10045
+ };
10046
+ };
9498
10047
  post_v1_evaluate: {
9499
10048
  parameters: {
9500
10049
  query?: never;
@@ -13570,6 +14119,117 @@ interface operations {
13570
14119
  };
13571
14120
  };
13572
14121
  };
14122
+ post_v1_products_by_productid_images: {
14123
+ parameters: {
14124
+ query?: never;
14125
+ header?: never;
14126
+ path: {
14127
+ productId: string;
14128
+ };
14129
+ cookie?: never;
14130
+ };
14131
+ requestBody: {
14132
+ content: {
14133
+ "multipart/form-data": {
14134
+ /**
14135
+ * Format: binary
14136
+ * @description The image file.
14137
+ */
14138
+ file: string;
14139
+ /** @description Required for session auth. API keys already belong to one organization. */
14140
+ organizationId?: string;
14141
+ /** @description Zero-based place in the gallery; 0 makes it the main image. Defaults to the end. */
14142
+ position?: number;
14143
+ };
14144
+ };
14145
+ };
14146
+ responses: {
14147
+ /** @description The image was added to the gallery. */
14148
+ 201: {
14149
+ headers: {
14150
+ [name: string]: unknown;
14151
+ };
14152
+ content: {
14153
+ "application/json": {
14154
+ ok: boolean;
14155
+ /** @constant */
14156
+ apiVersion: "developer_v1";
14157
+ operationId: string;
14158
+ /** @enum {string} */
14159
+ status: "accepted" | "completed" | "failed";
14160
+ jobId?: string;
14161
+ productId?: string;
14162
+ warnings: string[];
14163
+ recommendations: string[];
14164
+ links: {
14165
+ [key: string]: string;
14166
+ };
14167
+ data: {
14168
+ image: {
14169
+ /** @description Public URL of the stored image. */
14170
+ url: string;
14171
+ position: number;
14172
+ };
14173
+ /** @description The product's gallery after the upload, in order. */
14174
+ images: {
14175
+ url: string;
14176
+ position: number;
14177
+ }[];
14178
+ };
14179
+ };
14180
+ };
14181
+ };
14182
+ /** @description Invalid request */
14183
+ 400: {
14184
+ headers: {
14185
+ [name: string]: unknown;
14186
+ };
14187
+ content?: never;
14188
+ };
14189
+ /** @description Unauthorized */
14190
+ 401: {
14191
+ headers: {
14192
+ [name: string]: unknown;
14193
+ };
14194
+ content?: never;
14195
+ };
14196
+ /** @description Missing the `catalog:write` scope */
14197
+ 403: {
14198
+ headers: {
14199
+ [name: string]: unknown;
14200
+ };
14201
+ content?: never;
14202
+ };
14203
+ /** @description Product not found */
14204
+ 404: {
14205
+ headers: {
14206
+ [name: string]: unknown;
14207
+ };
14208
+ content?: never;
14209
+ };
14210
+ /** @description The request body is not multipart or is too large */
14211
+ 413: {
14212
+ headers: {
14213
+ [name: string]: unknown;
14214
+ };
14215
+ content?: never;
14216
+ };
14217
+ /** @description Rate limit exceeded */
14218
+ 429: {
14219
+ headers: {
14220
+ [name: string]: unknown;
14221
+ };
14222
+ content?: never;
14223
+ };
14224
+ /** @description Internal Server Error */
14225
+ 500: {
14226
+ headers: {
14227
+ [name: string]: unknown;
14228
+ };
14229
+ content?: never;
14230
+ };
14231
+ };
14232
+ };
13573
14233
  patch_v1_products_by_productid_inventory: {
13574
14234
  parameters: {
13575
14235
  query?: never;
@@ -15503,7 +16163,7 @@ interface operations {
15503
16163
  };
15504
16164
  };
15505
16165
  };
15506
- post_v1_promotions_by_promotionid_sync: {
16166
+ post_v1_promotions_by_promotionid_retry: {
15507
16167
  parameters: {
15508
16168
  query?: {
15509
16169
  /** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
@@ -15525,7 +16185,7 @@ interface operations {
15525
16185
  "application/json": {
15526
16186
  organizationId?: string;
15527
16187
  /**
15528
- * @description Optional single marketplace. When omitted, syncs all promotion marketplaces.
16188
+ * @description Retry one marketplace. When omitted, retries every promotion marketplace.
15529
16189
  * @enum {string}
15530
16190
  */
15531
16191
  marketplace?:
@@ -15536,13 +16196,13 @@ interface operations {
15536
16196
  | "amazon"
15537
16197
  | "zalora"
15538
16198
  | "ebay";
15539
- /** @description Optional product subset. When omitted, syncs all assigned products. */
16199
+ /** @description Retry only these products. When omitted, retries every assigned product. */
15540
16200
  productIds?: string[];
15541
16201
  };
15542
16202
  };
15543
16203
  };
15544
16204
  responses: {
15545
- /** @description Sync queued. */
16205
+ /** @description Delivery queued again. */
15546
16206
  202: {
15547
16207
  headers: {
15548
16208
  [name: string]: unknown;
@@ -19014,6 +19674,24 @@ declare class AopClient {
19014
19674
  */
19015
19675
  retry(request: OperationBody<operations["post_v1_aop_retry"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_aop_retry"]>>;
19016
19676
  }
19677
+ declare class BrandsgatewayClient {
19678
+ protected readonly _http: OmniHttp;
19679
+ constructor(_http: OmniHttp);
19680
+ /**
19681
+ * Import BrandsGateway Products
19682
+ *
19683
+ * Requires catalog:write and a connected BrandsGateway account. Uses the same parameters and import service as the import_brandsgateway_products tool.
19684
+
19685
+ ### Selection
19686
+
19687
+ Choose catalogProductIds or importAllMatching with filters. maxProducts limits new imports to 1–50 across pages (default 50); already imported products are skipped. Numeric brandIds, vendorIds (supplier warehouses), categoryIds, and conditionIds arrays match any value within each field and all supplied fields together. Omit a field for no restriction; empty arrays and legacy singular/string filters are rejected. Brands accept at most 500 IDs; other filter arrays accept at most 50 each. Broad combinations may exceed the supplier request budget and return a failure asking you to narrow the filters.
19688
+
19689
+ ### Updated dates and enrichme
19690
+ *
19691
+ * `POST /api/v1/brandsgateway/import`
19692
+ */
19693
+ importProducts(request: OperationBody<operations["post_v1_brandsgateway_import"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_brandsgateway_import"]>>;
19694
+ }
19017
19695
  declare class CampaignsClient {
19018
19696
  protected readonly _http: OmniHttp;
19019
19697
  constructor(_http: OmniHttp);
@@ -19172,6 +19850,28 @@ declare class DirectoryClient {
19172
19850
  */
19173
19851
  list(requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_directory"]>>;
19174
19852
  }
19853
+ declare class DocumentsClient {
19854
+ protected readonly _http: OmniHttp;
19855
+ constructor(_http: OmniHttp);
19856
+ /**
19857
+ * Upload Document
19858
+ *
19859
+ * Upload one file to the knowledge base as multipart/form-data. Requires `documents:write`.
19860
+
19861
+ Accepted: PDF up to 20 MB, Excel (.xlsx/.xlsm) up to 10 MB, images up to 8 MB, CSV and Markdown up to 2 MB. PDFs, Markdown, and images are indexed in the background; poll `GET /api/v1/documents/{documentId}` until `status` is `completed`. CSV and Excel are stored for agents to read but are not indexed.
19862
+ *
19863
+ * `POST /api/v1/documents`
19864
+ */
19865
+ upload(request: OperationBody<operations["post_v1_documents"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_documents"]>>;
19866
+ /**
19867
+ * Get Document
19868
+ *
19869
+ * Read one knowledge base document and its indexing status. Requires `documents:read`.
19870
+ *
19871
+ * `GET /api/v1/documents/{documentId}`
19872
+ */
19873
+ get(request: OperationPath<operations["get_v1_documents_by_documentid"]> & OperationQuery<operations["get_v1_documents_by_documentid"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_documents_by_documentid"]>>;
19874
+ }
19175
19875
  declare class EvaluateClient {
19176
19876
  protected readonly _http: OmniHttp;
19177
19877
  constructor(_http: OmniHttp);
@@ -19633,6 +20333,16 @@ declare class ProductsClient {
19633
20333
  * `POST /api/v1/products/{productId}/delist`
19634
20334
  */
19635
20335
  delist(request: OperationPath<operations["post_v1_products_by_productid_delist"]> & OperationBody<operations["post_v1_products_by_productid_delist"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_products_by_productid_delist"]>>;
20336
+ /**
20337
+ * Upload Product Image
20338
+ *
20339
+ * Upload one image to a product's or variant's gallery as multipart/form-data. Requires `catalog:write`.
20340
+
20341
+ JPEG, PNG, WebP, AVIF, or HEIC up to 8 MB; WebP, AVIF, and HEIC are stored as JPEG. The image is added at `position`, or at the end. Publish the product to send the new gallery to marketplaces.
20342
+ *
20343
+ * `POST /api/v1/products/{productId}/images`
20344
+ */
20345
+ uploadImage(request: OperationPath<operations["post_v1_products_by_productid_images"]> & OperationBody<operations["post_v1_products_by_productid_images"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_products_by_productid_images"]>>;
19636
20346
  /**
19637
20347
  * Update Product Inventory
19638
20348
  *
@@ -19805,13 +20515,15 @@ declare class PromotionsClient {
19805
20515
  */
19806
20516
  addProducts(request: OperationPath<operations["post_v1_promotions_by_promotionid_products"]> & OperationQuery<operations["post_v1_promotions_by_promotionid_products"]> & OperationBody<operations["post_v1_promotions_by_promotionid_products"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_promotions_by_promotionid_products"]>>;
19807
20517
  /**
19808
- * Sync Promotion to Marketplaces
20518
+ * Retry Marketplace Delivery
19809
20519
  *
19810
- * Queue marketplace push for assigned products (Shopee promotion, Lazada Store Flash Sale/voucher/Flexicombo, TikTok activity, or Shopify discount). Requires `promotions:write`.
20520
+ * Run marketplace delivery again after a failure, for example once a store is reconnected. Requires `promotions:write`.
20521
+
20522
+ You do not need this to publish a promotion: creating or activating it, editing it while active or scheduled, and assigning products already deliver it, and pausing, ending, or archiving removes it. A retry brings each marketplace back in line with the promotion's current status.
19811
20523
  *
19812
- * `POST /api/v1/promotions/{promotionId}/sync`
20524
+ * `POST /api/v1/promotions/{promotionId}/retry`
19813
20525
  */
19814
- sync(request: OperationPath<operations["post_v1_promotions_by_promotionid_sync"]> & OperationQuery<operations["post_v1_promotions_by_promotionid_sync"]> & OperationBody<operations["post_v1_promotions_by_promotionid_sync"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_promotions_by_promotionid_sync"]>>;
20526
+ retry(request: OperationPath<operations["post_v1_promotions_by_promotionid_retry"]> & OperationQuery<operations["post_v1_promotions_by_promotionid_retry"]> & OperationBody<operations["post_v1_promotions_by_promotionid_retry"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_promotions_by_promotionid_retry"]>>;
19815
20527
  }
19816
20528
  declare class ReturnsClient {
19817
20529
  protected readonly _http: OmniHttp;
@@ -20100,11 +20812,13 @@ declare class OmniGeneratedClient {
20100
20812
  readonly agents: AgentsClient;
20101
20813
  readonly analytics: AnalyticsClient;
20102
20814
  readonly aop: AopClient;
20815
+ readonly brandsgateway: BrandsgatewayClient;
20103
20816
  readonly campaigns: CampaignsClient;
20104
20817
  readonly catalog: CatalogClient;
20105
20818
  readonly checkoutSessions: CheckoutSessionsClient;
20106
20819
  readonly compare: CompareClient;
20107
20820
  readonly directory: DirectoryClient;
20821
+ readonly documents: DocumentsClient;
20108
20822
  readonly evaluate: EvaluateClient;
20109
20823
  readonly feed: FeedClient;
20110
20824
  readonly images: ImagesClient;
@@ -20136,11 +20850,13 @@ type OmniResources = {
20136
20850
  agents: AgentsClient;
20137
20851
  analytics: AnalyticsClient;
20138
20852
  aop: AopClient;
20853
+ brandsgateway: BrandsgatewayClient;
20139
20854
  campaigns: CampaignsClient;
20140
20855
  catalog: CatalogClient;
20141
20856
  checkoutSessions: CheckoutSessionsClient;
20142
20857
  compare: CompareClient;
20143
20858
  directory: DirectoryClient;
20859
+ documents: DocumentsClient;
20144
20860
  evaluate: EvaluateClient;
20145
20861
  feed: FeedClient;
20146
20862
  images: ImagesClient;
@@ -20209,7 +20925,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
20209
20925
  toleranceInSeconds?: number;
20210
20926
  }): Promise<ConstructedWebhookEvent>;
20211
20927
 
20212
- declare const SDK_VERSION = "0.4.0";
20928
+ declare const SDK_VERSION = "0.6.0";
20213
20929
 
20214
20930
  type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
20215
20931
  type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];