@omni-commerce/sdk 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +86 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +521 -14
- package/dist/index.d.ts +521 -14
- package/dist/index.js +86 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
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 {
|
|
@@ -857,6 +861,48 @@ interface paths {
|
|
|
857
861
|
patch?: never;
|
|
858
862
|
trace?: never;
|
|
859
863
|
};
|
|
864
|
+
"/api/v1/documents": {
|
|
865
|
+
parameters: {
|
|
866
|
+
query?: never;
|
|
867
|
+
header?: never;
|
|
868
|
+
path?: never;
|
|
869
|
+
cookie?: never;
|
|
870
|
+
};
|
|
871
|
+
get?: never;
|
|
872
|
+
put?: never;
|
|
873
|
+
/**
|
|
874
|
+
* Upload Document
|
|
875
|
+
* @description Upload one file to the knowledge base as multipart/form-data. Requires `documents:write`.
|
|
876
|
+
*
|
|
877
|
+
* 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.
|
|
878
|
+
*/
|
|
879
|
+
post: operations["post_v1_documents"];
|
|
880
|
+
delete?: never;
|
|
881
|
+
options?: never;
|
|
882
|
+
head?: never;
|
|
883
|
+
patch?: never;
|
|
884
|
+
trace?: never;
|
|
885
|
+
};
|
|
886
|
+
"/api/v1/documents/{documentId}": {
|
|
887
|
+
parameters: {
|
|
888
|
+
query?: never;
|
|
889
|
+
header?: never;
|
|
890
|
+
path?: never;
|
|
891
|
+
cookie?: never;
|
|
892
|
+
};
|
|
893
|
+
/**
|
|
894
|
+
* Get Document
|
|
895
|
+
* @description Read one knowledge base document and its indexing status. Requires `documents:read`.
|
|
896
|
+
*/
|
|
897
|
+
get: operations["get_v1_documents_by_documentid"];
|
|
898
|
+
put?: never;
|
|
899
|
+
post?: never;
|
|
900
|
+
delete?: never;
|
|
901
|
+
options?: never;
|
|
902
|
+
head?: never;
|
|
903
|
+
patch?: never;
|
|
904
|
+
trace?: never;
|
|
905
|
+
};
|
|
860
906
|
"/api/v1/evaluate": {
|
|
861
907
|
parameters: {
|
|
862
908
|
query?: never;
|
|
@@ -1547,6 +1593,28 @@ interface paths {
|
|
|
1547
1593
|
patch?: never;
|
|
1548
1594
|
trace?: never;
|
|
1549
1595
|
};
|
|
1596
|
+
"/api/v1/products/{productId}/images": {
|
|
1597
|
+
parameters: {
|
|
1598
|
+
query?: never;
|
|
1599
|
+
header?: never;
|
|
1600
|
+
path?: never;
|
|
1601
|
+
cookie?: never;
|
|
1602
|
+
};
|
|
1603
|
+
get?: never;
|
|
1604
|
+
put?: never;
|
|
1605
|
+
/**
|
|
1606
|
+
* Upload Product Image
|
|
1607
|
+
* @description Upload one image to a product's or variant's gallery as multipart/form-data. Requires `catalog:write`.
|
|
1608
|
+
*
|
|
1609
|
+
* 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.
|
|
1610
|
+
*/
|
|
1611
|
+
post: operations["post_v1_products_by_productid_images"];
|
|
1612
|
+
delete?: never;
|
|
1613
|
+
options?: never;
|
|
1614
|
+
head?: never;
|
|
1615
|
+
patch?: never;
|
|
1616
|
+
trace?: never;
|
|
1617
|
+
};
|
|
1550
1618
|
"/api/v1/products/{productId}/inventory": {
|
|
1551
1619
|
parameters: {
|
|
1552
1620
|
query?: never;
|
|
@@ -1814,7 +1882,7 @@ interface paths {
|
|
|
1814
1882
|
patch?: never;
|
|
1815
1883
|
trace?: never;
|
|
1816
1884
|
};
|
|
1817
|
-
"/api/v1/promotions/{promotionId}/
|
|
1885
|
+
"/api/v1/promotions/{promotionId}/retry": {
|
|
1818
1886
|
parameters: {
|
|
1819
1887
|
query?: never;
|
|
1820
1888
|
header?: never;
|
|
@@ -1824,10 +1892,12 @@ interface paths {
|
|
|
1824
1892
|
get?: never;
|
|
1825
1893
|
put?: never;
|
|
1826
1894
|
/**
|
|
1827
|
-
*
|
|
1828
|
-
* @description
|
|
1895
|
+
* Retry Marketplace Delivery
|
|
1896
|
+
* @description Run marketplace delivery again after a failure, for example once a store is reconnected. Requires `promotions:write`.
|
|
1897
|
+
*
|
|
1898
|
+
* 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
1899
|
*/
|
|
1830
|
-
post: operations["
|
|
1900
|
+
post: operations["post_v1_promotions_by_promotionid_retry"];
|
|
1831
1901
|
delete?: never;
|
|
1832
1902
|
options?: never;
|
|
1833
1903
|
head?: never;
|
|
@@ -9495,6 +9565,296 @@ interface operations {
|
|
|
9495
9565
|
};
|
|
9496
9566
|
};
|
|
9497
9567
|
};
|
|
9568
|
+
post_v1_documents: {
|
|
9569
|
+
parameters: {
|
|
9570
|
+
query?: never;
|
|
9571
|
+
header?: never;
|
|
9572
|
+
path?: never;
|
|
9573
|
+
cookie?: never;
|
|
9574
|
+
};
|
|
9575
|
+
requestBody: {
|
|
9576
|
+
content: {
|
|
9577
|
+
"multipart/form-data": {
|
|
9578
|
+
/**
|
|
9579
|
+
* Format: binary
|
|
9580
|
+
* @description The file to upload.
|
|
9581
|
+
*/
|
|
9582
|
+
file: string;
|
|
9583
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
9584
|
+
organizationId?: string;
|
|
9585
|
+
/**
|
|
9586
|
+
* @description What the document is. `bank_statement` is never shown to AI.
|
|
9587
|
+
* @default other
|
|
9588
|
+
* @enum {string}
|
|
9589
|
+
*/
|
|
9590
|
+
documentType?:
|
|
9591
|
+
| "datasheet"
|
|
9592
|
+
| "invoice"
|
|
9593
|
+
| "packing_list"
|
|
9594
|
+
| "compliance_certificate"
|
|
9595
|
+
| "test_report"
|
|
9596
|
+
| "sds"
|
|
9597
|
+
| "manual"
|
|
9598
|
+
| "warranty"
|
|
9599
|
+
| "authorization_letter"
|
|
9600
|
+
| "shipping_doc"
|
|
9601
|
+
| "regulation"
|
|
9602
|
+
| "policy"
|
|
9603
|
+
| "bank_statement"
|
|
9604
|
+
| "other";
|
|
9605
|
+
/**
|
|
9606
|
+
* Format: uuid
|
|
9607
|
+
* @description Attach the document to one product instead of the whole organization.
|
|
9608
|
+
*/
|
|
9609
|
+
productId?: string;
|
|
9610
|
+
/** @description File name to store. Defaults to the uploaded file's name. */
|
|
9611
|
+
fileName?: string;
|
|
9612
|
+
};
|
|
9613
|
+
};
|
|
9614
|
+
};
|
|
9615
|
+
responses: {
|
|
9616
|
+
/** @description The document was stored; indexing is queued. */
|
|
9617
|
+
202: {
|
|
9618
|
+
headers: {
|
|
9619
|
+
[name: string]: unknown;
|
|
9620
|
+
};
|
|
9621
|
+
content: {
|
|
9622
|
+
"application/json": {
|
|
9623
|
+
ok: boolean;
|
|
9624
|
+
/** @constant */
|
|
9625
|
+
apiVersion: "developer_v1";
|
|
9626
|
+
operationId: string;
|
|
9627
|
+
/** @enum {string} */
|
|
9628
|
+
status: "accepted" | "completed" | "failed";
|
|
9629
|
+
jobId?: string;
|
|
9630
|
+
productId?: string;
|
|
9631
|
+
warnings: string[];
|
|
9632
|
+
recommendations: string[];
|
|
9633
|
+
links: {
|
|
9634
|
+
[key: string]: string;
|
|
9635
|
+
};
|
|
9636
|
+
data: {
|
|
9637
|
+
document: {
|
|
9638
|
+
id: string;
|
|
9639
|
+
title: string;
|
|
9640
|
+
fileName: string;
|
|
9641
|
+
mimeType: string;
|
|
9642
|
+
sizeBytes: number;
|
|
9643
|
+
/** @enum {string} */
|
|
9644
|
+
documentType:
|
|
9645
|
+
| "datasheet"
|
|
9646
|
+
| "invoice"
|
|
9647
|
+
| "packing_list"
|
|
9648
|
+
| "compliance_certificate"
|
|
9649
|
+
| "test_report"
|
|
9650
|
+
| "sds"
|
|
9651
|
+
| "manual"
|
|
9652
|
+
| "warranty"
|
|
9653
|
+
| "authorization_letter"
|
|
9654
|
+
| "shipping_doc"
|
|
9655
|
+
| "regulation"
|
|
9656
|
+
| "policy"
|
|
9657
|
+
| "bank_statement"
|
|
9658
|
+
| "other";
|
|
9659
|
+
productId: string | null;
|
|
9660
|
+
/**
|
|
9661
|
+
* @description `pending` and `processing` while indexing; `completed` when agents can search it.
|
|
9662
|
+
* @enum {string}
|
|
9663
|
+
*/
|
|
9664
|
+
status:
|
|
9665
|
+
| "pending"
|
|
9666
|
+
| "processing"
|
|
9667
|
+
| "completed"
|
|
9668
|
+
| "completed_with_warnings"
|
|
9669
|
+
| "failed";
|
|
9670
|
+
/** @description Searchable chunks. CSV and Excel are stored for reading but not indexed, so this is 0. */
|
|
9671
|
+
indexedChunkCount: number | null;
|
|
9672
|
+
pageCount: number | null;
|
|
9673
|
+
errorMessage: string | null;
|
|
9674
|
+
createdAt: string;
|
|
9675
|
+
updatedAt: string;
|
|
9676
|
+
};
|
|
9677
|
+
/** @description Indexing was queued. */
|
|
9678
|
+
queued: boolean;
|
|
9679
|
+
warning?: string;
|
|
9680
|
+
};
|
|
9681
|
+
};
|
|
9682
|
+
};
|
|
9683
|
+
};
|
|
9684
|
+
/** @description Invalid request */
|
|
9685
|
+
400: {
|
|
9686
|
+
headers: {
|
|
9687
|
+
[name: string]: unknown;
|
|
9688
|
+
};
|
|
9689
|
+
content?: never;
|
|
9690
|
+
};
|
|
9691
|
+
/** @description Unauthorized */
|
|
9692
|
+
401: {
|
|
9693
|
+
headers: {
|
|
9694
|
+
[name: string]: unknown;
|
|
9695
|
+
};
|
|
9696
|
+
content?: never;
|
|
9697
|
+
};
|
|
9698
|
+
/** @description Missing the `documents:write` scope */
|
|
9699
|
+
403: {
|
|
9700
|
+
headers: {
|
|
9701
|
+
[name: string]: unknown;
|
|
9702
|
+
};
|
|
9703
|
+
content?: never;
|
|
9704
|
+
};
|
|
9705
|
+
/** @description Product not found */
|
|
9706
|
+
404: {
|
|
9707
|
+
headers: {
|
|
9708
|
+
[name: string]: unknown;
|
|
9709
|
+
};
|
|
9710
|
+
content?: never;
|
|
9711
|
+
};
|
|
9712
|
+
/** @description The request body is not multipart or is too large */
|
|
9713
|
+
413: {
|
|
9714
|
+
headers: {
|
|
9715
|
+
[name: string]: unknown;
|
|
9716
|
+
};
|
|
9717
|
+
content?: never;
|
|
9718
|
+
};
|
|
9719
|
+
/** @description Rate limit exceeded */
|
|
9720
|
+
429: {
|
|
9721
|
+
headers: {
|
|
9722
|
+
[name: string]: unknown;
|
|
9723
|
+
};
|
|
9724
|
+
content?: never;
|
|
9725
|
+
};
|
|
9726
|
+
/** @description Internal Server Error */
|
|
9727
|
+
500: {
|
|
9728
|
+
headers: {
|
|
9729
|
+
[name: string]: unknown;
|
|
9730
|
+
};
|
|
9731
|
+
content?: never;
|
|
9732
|
+
};
|
|
9733
|
+
};
|
|
9734
|
+
};
|
|
9735
|
+
get_v1_documents_by_documentid: {
|
|
9736
|
+
parameters: {
|
|
9737
|
+
query?: {
|
|
9738
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
9739
|
+
organizationId?: string;
|
|
9740
|
+
};
|
|
9741
|
+
header?: never;
|
|
9742
|
+
path: {
|
|
9743
|
+
documentId: string;
|
|
9744
|
+
};
|
|
9745
|
+
cookie?: never;
|
|
9746
|
+
};
|
|
9747
|
+
requestBody?: never;
|
|
9748
|
+
responses: {
|
|
9749
|
+
/** @description The document. */
|
|
9750
|
+
200: {
|
|
9751
|
+
headers: {
|
|
9752
|
+
[name: string]: unknown;
|
|
9753
|
+
};
|
|
9754
|
+
content: {
|
|
9755
|
+
"application/json": {
|
|
9756
|
+
ok: boolean;
|
|
9757
|
+
/** @constant */
|
|
9758
|
+
apiVersion: "developer_v1";
|
|
9759
|
+
operationId: string;
|
|
9760
|
+
/** @enum {string} */
|
|
9761
|
+
status: "accepted" | "completed" | "failed";
|
|
9762
|
+
jobId?: string;
|
|
9763
|
+
productId?: string;
|
|
9764
|
+
warnings: string[];
|
|
9765
|
+
recommendations: string[];
|
|
9766
|
+
links: {
|
|
9767
|
+
[key: string]: string;
|
|
9768
|
+
};
|
|
9769
|
+
data: {
|
|
9770
|
+
document: {
|
|
9771
|
+
id: string;
|
|
9772
|
+
title: string;
|
|
9773
|
+
fileName: string;
|
|
9774
|
+
mimeType: string;
|
|
9775
|
+
sizeBytes: number;
|
|
9776
|
+
/** @enum {string} */
|
|
9777
|
+
documentType:
|
|
9778
|
+
| "datasheet"
|
|
9779
|
+
| "invoice"
|
|
9780
|
+
| "packing_list"
|
|
9781
|
+
| "compliance_certificate"
|
|
9782
|
+
| "test_report"
|
|
9783
|
+
| "sds"
|
|
9784
|
+
| "manual"
|
|
9785
|
+
| "warranty"
|
|
9786
|
+
| "authorization_letter"
|
|
9787
|
+
| "shipping_doc"
|
|
9788
|
+
| "regulation"
|
|
9789
|
+
| "policy"
|
|
9790
|
+
| "bank_statement"
|
|
9791
|
+
| "other";
|
|
9792
|
+
productId: string | null;
|
|
9793
|
+
/**
|
|
9794
|
+
* @description `pending` and `processing` while indexing; `completed` when agents can search it.
|
|
9795
|
+
* @enum {string}
|
|
9796
|
+
*/
|
|
9797
|
+
status:
|
|
9798
|
+
| "pending"
|
|
9799
|
+
| "processing"
|
|
9800
|
+
| "completed"
|
|
9801
|
+
| "completed_with_warnings"
|
|
9802
|
+
| "failed";
|
|
9803
|
+
/** @description Searchable chunks. CSV and Excel are stored for reading but not indexed, so this is 0. */
|
|
9804
|
+
indexedChunkCount: number | null;
|
|
9805
|
+
pageCount: number | null;
|
|
9806
|
+
errorMessage: string | null;
|
|
9807
|
+
createdAt: string;
|
|
9808
|
+
updatedAt: string;
|
|
9809
|
+
};
|
|
9810
|
+
};
|
|
9811
|
+
};
|
|
9812
|
+
};
|
|
9813
|
+
};
|
|
9814
|
+
/** @description Invalid request */
|
|
9815
|
+
400: {
|
|
9816
|
+
headers: {
|
|
9817
|
+
[name: string]: unknown;
|
|
9818
|
+
};
|
|
9819
|
+
content?: never;
|
|
9820
|
+
};
|
|
9821
|
+
/** @description Unauthorized */
|
|
9822
|
+
401: {
|
|
9823
|
+
headers: {
|
|
9824
|
+
[name: string]: unknown;
|
|
9825
|
+
};
|
|
9826
|
+
content?: never;
|
|
9827
|
+
};
|
|
9828
|
+
/** @description Missing the `documents:read` scope */
|
|
9829
|
+
403: {
|
|
9830
|
+
headers: {
|
|
9831
|
+
[name: string]: unknown;
|
|
9832
|
+
};
|
|
9833
|
+
content?: never;
|
|
9834
|
+
};
|
|
9835
|
+
/** @description Document not found */
|
|
9836
|
+
404: {
|
|
9837
|
+
headers: {
|
|
9838
|
+
[name: string]: unknown;
|
|
9839
|
+
};
|
|
9840
|
+
content?: never;
|
|
9841
|
+
};
|
|
9842
|
+
/** @description Rate limit exceeded */
|
|
9843
|
+
429: {
|
|
9844
|
+
headers: {
|
|
9845
|
+
[name: string]: unknown;
|
|
9846
|
+
};
|
|
9847
|
+
content?: never;
|
|
9848
|
+
};
|
|
9849
|
+
/** @description Internal Server Error */
|
|
9850
|
+
500: {
|
|
9851
|
+
headers: {
|
|
9852
|
+
[name: string]: unknown;
|
|
9853
|
+
};
|
|
9854
|
+
content?: never;
|
|
9855
|
+
};
|
|
9856
|
+
};
|
|
9857
|
+
};
|
|
9498
9858
|
post_v1_evaluate: {
|
|
9499
9859
|
parameters: {
|
|
9500
9860
|
query?: never;
|
|
@@ -13570,6 +13930,117 @@ interface operations {
|
|
|
13570
13930
|
};
|
|
13571
13931
|
};
|
|
13572
13932
|
};
|
|
13933
|
+
post_v1_products_by_productid_images: {
|
|
13934
|
+
parameters: {
|
|
13935
|
+
query?: never;
|
|
13936
|
+
header?: never;
|
|
13937
|
+
path: {
|
|
13938
|
+
productId: string;
|
|
13939
|
+
};
|
|
13940
|
+
cookie?: never;
|
|
13941
|
+
};
|
|
13942
|
+
requestBody: {
|
|
13943
|
+
content: {
|
|
13944
|
+
"multipart/form-data": {
|
|
13945
|
+
/**
|
|
13946
|
+
* Format: binary
|
|
13947
|
+
* @description The image file.
|
|
13948
|
+
*/
|
|
13949
|
+
file: string;
|
|
13950
|
+
/** @description Required for session auth. API keys already belong to one organization. */
|
|
13951
|
+
organizationId?: string;
|
|
13952
|
+
/** @description Zero-based place in the gallery; 0 makes it the main image. Defaults to the end. */
|
|
13953
|
+
position?: number;
|
|
13954
|
+
};
|
|
13955
|
+
};
|
|
13956
|
+
};
|
|
13957
|
+
responses: {
|
|
13958
|
+
/** @description The image was added to the gallery. */
|
|
13959
|
+
201: {
|
|
13960
|
+
headers: {
|
|
13961
|
+
[name: string]: unknown;
|
|
13962
|
+
};
|
|
13963
|
+
content: {
|
|
13964
|
+
"application/json": {
|
|
13965
|
+
ok: boolean;
|
|
13966
|
+
/** @constant */
|
|
13967
|
+
apiVersion: "developer_v1";
|
|
13968
|
+
operationId: string;
|
|
13969
|
+
/** @enum {string} */
|
|
13970
|
+
status: "accepted" | "completed" | "failed";
|
|
13971
|
+
jobId?: string;
|
|
13972
|
+
productId?: string;
|
|
13973
|
+
warnings: string[];
|
|
13974
|
+
recommendations: string[];
|
|
13975
|
+
links: {
|
|
13976
|
+
[key: string]: string;
|
|
13977
|
+
};
|
|
13978
|
+
data: {
|
|
13979
|
+
image: {
|
|
13980
|
+
/** @description Public URL of the stored image. */
|
|
13981
|
+
url: string;
|
|
13982
|
+
position: number;
|
|
13983
|
+
};
|
|
13984
|
+
/** @description The product's gallery after the upload, in order. */
|
|
13985
|
+
images: {
|
|
13986
|
+
url: string;
|
|
13987
|
+
position: number;
|
|
13988
|
+
}[];
|
|
13989
|
+
};
|
|
13990
|
+
};
|
|
13991
|
+
};
|
|
13992
|
+
};
|
|
13993
|
+
/** @description Invalid request */
|
|
13994
|
+
400: {
|
|
13995
|
+
headers: {
|
|
13996
|
+
[name: string]: unknown;
|
|
13997
|
+
};
|
|
13998
|
+
content?: never;
|
|
13999
|
+
};
|
|
14000
|
+
/** @description Unauthorized */
|
|
14001
|
+
401: {
|
|
14002
|
+
headers: {
|
|
14003
|
+
[name: string]: unknown;
|
|
14004
|
+
};
|
|
14005
|
+
content?: never;
|
|
14006
|
+
};
|
|
14007
|
+
/** @description Missing the `catalog:write` scope */
|
|
14008
|
+
403: {
|
|
14009
|
+
headers: {
|
|
14010
|
+
[name: string]: unknown;
|
|
14011
|
+
};
|
|
14012
|
+
content?: never;
|
|
14013
|
+
};
|
|
14014
|
+
/** @description Product not found */
|
|
14015
|
+
404: {
|
|
14016
|
+
headers: {
|
|
14017
|
+
[name: string]: unknown;
|
|
14018
|
+
};
|
|
14019
|
+
content?: never;
|
|
14020
|
+
};
|
|
14021
|
+
/** @description The request body is not multipart or is too large */
|
|
14022
|
+
413: {
|
|
14023
|
+
headers: {
|
|
14024
|
+
[name: string]: unknown;
|
|
14025
|
+
};
|
|
14026
|
+
content?: never;
|
|
14027
|
+
};
|
|
14028
|
+
/** @description Rate limit exceeded */
|
|
14029
|
+
429: {
|
|
14030
|
+
headers: {
|
|
14031
|
+
[name: string]: unknown;
|
|
14032
|
+
};
|
|
14033
|
+
content?: never;
|
|
14034
|
+
};
|
|
14035
|
+
/** @description Internal Server Error */
|
|
14036
|
+
500: {
|
|
14037
|
+
headers: {
|
|
14038
|
+
[name: string]: unknown;
|
|
14039
|
+
};
|
|
14040
|
+
content?: never;
|
|
14041
|
+
};
|
|
14042
|
+
};
|
|
14043
|
+
};
|
|
13573
14044
|
patch_v1_products_by_productid_inventory: {
|
|
13574
14045
|
parameters: {
|
|
13575
14046
|
query?: never;
|
|
@@ -15503,7 +15974,7 @@ interface operations {
|
|
|
15503
15974
|
};
|
|
15504
15975
|
};
|
|
15505
15976
|
};
|
|
15506
|
-
|
|
15977
|
+
post_v1_promotions_by_promotionid_retry: {
|
|
15507
15978
|
parameters: {
|
|
15508
15979
|
query?: {
|
|
15509
15980
|
/** @description Optional organization scope for session-authenticated calls. OAuth client credentials resolve the organization from the token. */
|
|
@@ -15525,7 +15996,7 @@ interface operations {
|
|
|
15525
15996
|
"application/json": {
|
|
15526
15997
|
organizationId?: string;
|
|
15527
15998
|
/**
|
|
15528
|
-
* @description
|
|
15999
|
+
* @description Retry one marketplace. When omitted, retries every promotion marketplace.
|
|
15529
16000
|
* @enum {string}
|
|
15530
16001
|
*/
|
|
15531
16002
|
marketplace?:
|
|
@@ -15536,13 +16007,13 @@ interface operations {
|
|
|
15536
16007
|
| "amazon"
|
|
15537
16008
|
| "zalora"
|
|
15538
16009
|
| "ebay";
|
|
15539
|
-
/** @description
|
|
16010
|
+
/** @description Retry only these products. When omitted, retries every assigned product. */
|
|
15540
16011
|
productIds?: string[];
|
|
15541
16012
|
};
|
|
15542
16013
|
};
|
|
15543
16014
|
};
|
|
15544
16015
|
responses: {
|
|
15545
|
-
/** @description
|
|
16016
|
+
/** @description Delivery queued again. */
|
|
15546
16017
|
202: {
|
|
15547
16018
|
headers: {
|
|
15548
16019
|
[name: string]: unknown;
|
|
@@ -19172,6 +19643,28 @@ declare class DirectoryClient {
|
|
|
19172
19643
|
*/
|
|
19173
19644
|
list(requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["get_v1_directory"]>>;
|
|
19174
19645
|
}
|
|
19646
|
+
declare class DocumentsClient {
|
|
19647
|
+
protected readonly _http: OmniHttp;
|
|
19648
|
+
constructor(_http: OmniHttp);
|
|
19649
|
+
/**
|
|
19650
|
+
* Upload Document
|
|
19651
|
+
*
|
|
19652
|
+
* Upload one file to the knowledge base as multipart/form-data. Requires `documents:write`.
|
|
19653
|
+
|
|
19654
|
+
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.
|
|
19655
|
+
*
|
|
19656
|
+
* `POST /api/v1/documents`
|
|
19657
|
+
*/
|
|
19658
|
+
upload(request: OperationBody<operations["post_v1_documents"]>, requestOptions?: BaseRequestOptions): HttpResponsePromise<SuccessData<operations["post_v1_documents"]>>;
|
|
19659
|
+
/**
|
|
19660
|
+
* Get Document
|
|
19661
|
+
*
|
|
19662
|
+
* Read one knowledge base document and its indexing status. Requires `documents:read`.
|
|
19663
|
+
*
|
|
19664
|
+
* `GET /api/v1/documents/{documentId}`
|
|
19665
|
+
*/
|
|
19666
|
+
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"]>>;
|
|
19667
|
+
}
|
|
19175
19668
|
declare class EvaluateClient {
|
|
19176
19669
|
protected readonly _http: OmniHttp;
|
|
19177
19670
|
constructor(_http: OmniHttp);
|
|
@@ -19633,6 +20126,16 @@ declare class ProductsClient {
|
|
|
19633
20126
|
* `POST /api/v1/products/{productId}/delist`
|
|
19634
20127
|
*/
|
|
19635
20128
|
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"]>>;
|
|
20129
|
+
/**
|
|
20130
|
+
* Upload Product Image
|
|
20131
|
+
*
|
|
20132
|
+
* Upload one image to a product's or variant's gallery as multipart/form-data. Requires `catalog:write`.
|
|
20133
|
+
|
|
20134
|
+
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.
|
|
20135
|
+
*
|
|
20136
|
+
* `POST /api/v1/products/{productId}/images`
|
|
20137
|
+
*/
|
|
20138
|
+
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
20139
|
/**
|
|
19637
20140
|
* Update Product Inventory
|
|
19638
20141
|
*
|
|
@@ -19805,13 +20308,15 @@ declare class PromotionsClient {
|
|
|
19805
20308
|
*/
|
|
19806
20309
|
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
20310
|
/**
|
|
19808
|
-
*
|
|
20311
|
+
* Retry Marketplace Delivery
|
|
19809
20312
|
*
|
|
19810
|
-
*
|
|
20313
|
+
* Run marketplace delivery again after a failure, for example once a store is reconnected. Requires `promotions:write`.
|
|
20314
|
+
|
|
20315
|
+
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
20316
|
*
|
|
19812
|
-
* `POST /api/v1/promotions/{promotionId}/
|
|
20317
|
+
* `POST /api/v1/promotions/{promotionId}/retry`
|
|
19813
20318
|
*/
|
|
19814
|
-
|
|
20319
|
+
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
20320
|
}
|
|
19816
20321
|
declare class ReturnsClient {
|
|
19817
20322
|
protected readonly _http: OmniHttp;
|
|
@@ -20105,6 +20610,7 @@ declare class OmniGeneratedClient {
|
|
|
20105
20610
|
readonly checkoutSessions: CheckoutSessionsClient;
|
|
20106
20611
|
readonly compare: CompareClient;
|
|
20107
20612
|
readonly directory: DirectoryClient;
|
|
20613
|
+
readonly documents: DocumentsClient;
|
|
20108
20614
|
readonly evaluate: EvaluateClient;
|
|
20109
20615
|
readonly feed: FeedClient;
|
|
20110
20616
|
readonly images: ImagesClient;
|
|
@@ -20141,6 +20647,7 @@ type OmniResources = {
|
|
|
20141
20647
|
checkoutSessions: CheckoutSessionsClient;
|
|
20142
20648
|
compare: CompareClient;
|
|
20143
20649
|
directory: DirectoryClient;
|
|
20650
|
+
documents: DocumentsClient;
|
|
20144
20651
|
evaluate: EvaluateClient;
|
|
20145
20652
|
feed: FeedClient;
|
|
20146
20653
|
images: ImagesClient;
|
|
@@ -20209,7 +20716,7 @@ declare function constructEvent(payload: string | Uint8Array, headers: WebhookHe
|
|
|
20209
20716
|
toleranceInSeconds?: number;
|
|
20210
20717
|
}): Promise<ConstructedWebhookEvent>;
|
|
20211
20718
|
|
|
20212
|
-
declare const SDK_VERSION = "0.
|
|
20719
|
+
declare const SDK_VERSION = "0.5.0";
|
|
20213
20720
|
|
|
20214
20721
|
type ProductCreatedWebhookEvent = components["schemas"]["ProductCreatedWebhookEvent"];
|
|
20215
20722
|
type ProductUpdatedWebhookEvent = components["schemas"]["ProductUpdatedWebhookEvent"];
|