starta.apiclient 1.112.12591 → 1.112.12596
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.
|
@@ -9,8 +9,8 @@ export default class Products {
|
|
|
9
9
|
warehouseIds?: string[];
|
|
10
10
|
availability?: ProductAvailability[];
|
|
11
11
|
}): Promise<import("../../types").StartaResponse>;
|
|
12
|
-
add(organizationLogin: string, { name, sku, category, categoryId, forSale,
|
|
13
|
-
update(organizationLogin: string, productId: string, { name, sku, category, categoryId, forSale,
|
|
12
|
+
add(organizationLogin: string, { name, sku, category, categoryId, forSale, conversions, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }: Product): Promise<import("../../types").StartaResponse>;
|
|
13
|
+
update(organizationLogin: string, productId: string, { name, sku, category, categoryId, forSale, conversions, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }: Product): Promise<import("../../types").StartaResponse>;
|
|
14
14
|
delete(organizationLogin: string, productId: string): Promise<import("../../types").StartaResponse>;
|
|
15
15
|
get(organizationLogin: string, productId: string): Promise<import("../../types").StartaResponse>;
|
|
16
16
|
}
|
|
@@ -11,7 +11,7 @@ class Products {
|
|
|
11
11
|
method: 'GET',
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
add(organizationLogin, { name, sku, category, categoryId, forSale,
|
|
14
|
+
add(organizationLogin, { name, sku, category, categoryId, forSale, conversions, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }) {
|
|
15
15
|
return this._requestRunner.performRequest({
|
|
16
16
|
url: `accounts/${organizationLogin}/products`,
|
|
17
17
|
method: 'POST',
|
|
@@ -21,8 +21,7 @@ class Products {
|
|
|
21
21
|
category,
|
|
22
22
|
categoryId,
|
|
23
23
|
forSale,
|
|
24
|
-
|
|
25
|
-
forDisposal,
|
|
24
|
+
conversions,
|
|
26
25
|
netWeight,
|
|
27
26
|
grossWeight,
|
|
28
27
|
sellPrice,
|
|
@@ -38,7 +37,7 @@ class Products {
|
|
|
38
37
|
},
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
|
-
update(organizationLogin, productId, { name, sku, category, categoryId, forSale,
|
|
40
|
+
update(organizationLogin, productId, { name, sku, category, categoryId, forSale, conversions, netWeight, grossWeight, sellPrice, costPrice, criticalStock, desiredStock, allowSell, allowPublicBooking, publicName, image, description, barcode, }) {
|
|
42
41
|
return this._requestRunner.performRequest({
|
|
43
42
|
url: `accounts/${organizationLogin}/products/${productId}`,
|
|
44
43
|
method: 'PUT',
|
|
@@ -48,8 +47,7 @@ class Products {
|
|
|
48
47
|
category,
|
|
49
48
|
categoryId,
|
|
50
49
|
forSale,
|
|
51
|
-
|
|
52
|
-
forDisposal,
|
|
50
|
+
conversions,
|
|
53
51
|
netWeight,
|
|
54
52
|
grossWeight,
|
|
55
53
|
sellPrice,
|
|
@@ -28,6 +28,7 @@ export default class Public {
|
|
|
28
28
|
skip: number;
|
|
29
29
|
limit: number;
|
|
30
30
|
}): Promise<import("../../types").StartaResponse>;
|
|
31
|
+
addPromocode(organizationLogin: string, promocode: string): Promise<import("../../types").StartaResponse>;
|
|
31
32
|
payForOrder(organizationLogin: string, orderId: string, certificateId: string): Promise<import("../../types").StartaResponse>;
|
|
32
33
|
createOrder(organizationLogin: any, { products, starttime, scheduleId, customerInfo, customerComment, codes, comment, }: {
|
|
33
34
|
products: Array<{
|
|
@@ -54,6 +55,5 @@ export default class Public {
|
|
|
54
55
|
}, referer?: string | null): Promise<import("../../types").StartaResponse>;
|
|
55
56
|
getOrder(organizationOrUserLogin: string, orderId: string): Promise<import("../../types").StartaResponse>;
|
|
56
57
|
getOrderPrepaymentDetails(organizationLogin: string, orderId: string): Promise<import("../../types").StartaResponse>;
|
|
57
|
-
findBonus(organizationLogin: string, code: string): Promise<import("../../types").StartaResponse>;
|
|
58
58
|
}
|
|
59
59
|
export {};
|
|
@@ -48,6 +48,13 @@ class Public {
|
|
|
48
48
|
method: 'GET',
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
+
addPromocode(organizationLogin, promocode) {
|
|
52
|
+
return this._requestRunner.performRequest({
|
|
53
|
+
url: `accounts/${organizationLogin}/public/promocodes`,
|
|
54
|
+
method: 'POST',
|
|
55
|
+
body: { promocode },
|
|
56
|
+
});
|
|
57
|
+
}
|
|
51
58
|
payForOrder(organizationLogin, orderId, certificateId) {
|
|
52
59
|
return this._requestRunner.performRequest({
|
|
53
60
|
url: `accounts/${organizationLogin}/public/orders/${orderId}/pay`,
|
|
@@ -87,11 +94,5 @@ class Public {
|
|
|
87
94
|
method: 'GET',
|
|
88
95
|
});
|
|
89
96
|
}
|
|
90
|
-
findBonus(organizationLogin, code) {
|
|
91
|
-
return this._requestRunner.performRequest({
|
|
92
|
-
url: `accounts/${organizationLogin}/public/bonuses/${code}`,
|
|
93
|
-
method: 'GET',
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
97
|
}
|
|
97
98
|
exports.default = Public;
|
package/lib/types.d.ts
CHANGED
|
@@ -126,8 +126,10 @@ export type Product = {
|
|
|
126
126
|
};
|
|
127
127
|
categoryId?: string;
|
|
128
128
|
forSale: MeasurementUnit;
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
conversions?: Array<{
|
|
130
|
+
equals: number;
|
|
131
|
+
forDisposal: MeasurementUnit;
|
|
132
|
+
}>;
|
|
131
133
|
netWeight?: number;
|
|
132
134
|
grossWeight?: number;
|
|
133
135
|
sellPrice: number;
|