@onefivecommerce/sdk 0.12.0 → 0.14.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 +74 -0
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -159,6 +159,21 @@ interface components {
|
|
|
159
159
|
created_at: string;
|
|
160
160
|
}[];
|
|
161
161
|
};
|
|
162
|
+
/** @example PO */
|
|
163
|
+
po_prefix: string | null;
|
|
164
|
+
/** @example 1 */
|
|
165
|
+
next_po_number: number;
|
|
166
|
+
/** @example INV */
|
|
167
|
+
invoice_prefix: string | null;
|
|
168
|
+
/** @example 1 */
|
|
169
|
+
next_invoice_number: number;
|
|
170
|
+
/** @example 1001 */
|
|
171
|
+
next_order_number: number;
|
|
172
|
+
/**
|
|
173
|
+
* @description Next internal barcode sequence number to be assigned
|
|
174
|
+
* @example 321507191
|
|
175
|
+
*/
|
|
176
|
+
next_barcode_number: number;
|
|
162
177
|
/**
|
|
163
178
|
* @example disabled
|
|
164
179
|
* @enum {string}
|
|
@@ -977,6 +992,8 @@ interface components {
|
|
|
977
992
|
* @enum {string|null}
|
|
978
993
|
*/
|
|
979
994
|
weight_unit: "g" | "kg" | "oz" | "lb" | null;
|
|
995
|
+
/** @example 0 */
|
|
996
|
+
position: number;
|
|
980
997
|
/**
|
|
981
998
|
* @example {
|
|
982
999
|
* "Color": "Black",
|
|
@@ -4778,6 +4795,11 @@ interface operations {
|
|
|
4778
4795
|
* @example 1001
|
|
4779
4796
|
*/
|
|
4780
4797
|
next_order_number?: number;
|
|
4798
|
+
/**
|
|
4799
|
+
* @description Next internal barcode sequence number to be assigned
|
|
4800
|
+
* @example 321507191
|
|
4801
|
+
*/
|
|
4802
|
+
next_barcode_number?: number;
|
|
4781
4803
|
/** @example false */
|
|
4782
4804
|
require_email_verification?: boolean;
|
|
4783
4805
|
/**
|
|
@@ -8828,6 +8850,33 @@ interface operations {
|
|
|
8828
8850
|
};
|
|
8829
8851
|
};
|
|
8830
8852
|
};
|
|
8853
|
+
reorderVariants: {
|
|
8854
|
+
parameters: {
|
|
8855
|
+
query?: never;
|
|
8856
|
+
header?: never;
|
|
8857
|
+
path?: never;
|
|
8858
|
+
cookie?: never;
|
|
8859
|
+
};
|
|
8860
|
+
requestBody?: {
|
|
8861
|
+
content: {
|
|
8862
|
+
"application/json": {
|
|
8863
|
+
variants: {
|
|
8864
|
+
id: string;
|
|
8865
|
+
position: number;
|
|
8866
|
+
}[];
|
|
8867
|
+
};
|
|
8868
|
+
};
|
|
8869
|
+
};
|
|
8870
|
+
responses: {
|
|
8871
|
+
/** @description Variants reordered */
|
|
8872
|
+
204: {
|
|
8873
|
+
headers: {
|
|
8874
|
+
[name: string]: unknown;
|
|
8875
|
+
};
|
|
8876
|
+
content?: never;
|
|
8877
|
+
};
|
|
8878
|
+
};
|
|
8879
|
+
};
|
|
8831
8880
|
getVariant: {
|
|
8832
8881
|
parameters: {
|
|
8833
8882
|
query?: {
|
|
@@ -8961,6 +9010,30 @@ interface operations {
|
|
|
8961
9010
|
};
|
|
8962
9011
|
};
|
|
8963
9012
|
};
|
|
9013
|
+
generateVariantBarcode: {
|
|
9014
|
+
parameters: {
|
|
9015
|
+
query?: never;
|
|
9016
|
+
header?: never;
|
|
9017
|
+
path: {
|
|
9018
|
+
id: string;
|
|
9019
|
+
};
|
|
9020
|
+
cookie?: never;
|
|
9021
|
+
};
|
|
9022
|
+
requestBody?: never;
|
|
9023
|
+
responses: {
|
|
9024
|
+
/** @description Variant with generated barcode */
|
|
9025
|
+
200: {
|
|
9026
|
+
headers: {
|
|
9027
|
+
[name: string]: unknown;
|
|
9028
|
+
};
|
|
9029
|
+
content: {
|
|
9030
|
+
"application/json": {
|
|
9031
|
+
data: components["schemas"]["Variant"];
|
|
9032
|
+
};
|
|
9033
|
+
};
|
|
9034
|
+
};
|
|
9035
|
+
};
|
|
9036
|
+
};
|
|
8964
9037
|
listVariantPrices: {
|
|
8965
9038
|
parameters: {
|
|
8966
9039
|
query?: never;
|
|
@@ -22769,6 +22842,7 @@ declare class VariantsResource {
|
|
|
22769
22842
|
}): Promise<DataResponse<Variant>>;
|
|
22770
22843
|
update(id: string, body: UpdateBody$p): Promise<DataResponse<Variant>>;
|
|
22771
22844
|
delete(id: string): Promise<void>;
|
|
22845
|
+
generateBarcode(id: string): Promise<DataResponse<Variant>>;
|
|
22772
22846
|
listPrices(variantId: string): Promise<DataResponse<Record<string, VariantPrice>>>;
|
|
22773
22847
|
upsertPrice(variantId: string, priceKeySlug: string, body: UpsertPriceBody): Promise<DataResponse<VariantPrice>>;
|
|
22774
22848
|
deletePrice(variantId: string, priceKeySlug: string): Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -186,6 +186,9 @@ var VariantsResource = class {
|
|
|
186
186
|
async delete(id) {
|
|
187
187
|
return this.client.request("DELETE", `/v1/variants/${id}`);
|
|
188
188
|
}
|
|
189
|
+
async generateBarcode(id) {
|
|
190
|
+
return this.client.request("POST", `/v1/variants/${id}/barcode/generate`);
|
|
191
|
+
}
|
|
189
192
|
// Price keys
|
|
190
193
|
async listPrices(variantId) {
|
|
191
194
|
return this.client.request("GET", `/v1/variants/${variantId}/prices`);
|