@onefivecommerce/sdk 0.13.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 +45 -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}
|
|
@@ -4780,6 +4795,11 @@ interface operations {
|
|
|
4780
4795
|
* @example 1001
|
|
4781
4796
|
*/
|
|
4782
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;
|
|
4783
4803
|
/** @example false */
|
|
4784
4804
|
require_email_verification?: boolean;
|
|
4785
4805
|
/**
|
|
@@ -8990,6 +9010,30 @@ interface operations {
|
|
|
8990
9010
|
};
|
|
8991
9011
|
};
|
|
8992
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
|
+
};
|
|
8993
9037
|
listVariantPrices: {
|
|
8994
9038
|
parameters: {
|
|
8995
9039
|
query?: never;
|
|
@@ -22798,6 +22842,7 @@ declare class VariantsResource {
|
|
|
22798
22842
|
}): Promise<DataResponse<Variant>>;
|
|
22799
22843
|
update(id: string, body: UpdateBody$p): Promise<DataResponse<Variant>>;
|
|
22800
22844
|
delete(id: string): Promise<void>;
|
|
22845
|
+
generateBarcode(id: string): Promise<DataResponse<Variant>>;
|
|
22801
22846
|
listPrices(variantId: string): Promise<DataResponse<Record<string, VariantPrice>>>;
|
|
22802
22847
|
upsertPrice(variantId: string, priceKeySlug: string, body: UpsertPriceBody): Promise<DataResponse<VariantPrice>>;
|
|
22803
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`);
|