@arrowsphere/api-client 3.433.0-rc-mms-1 → 3.433.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/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,16 @@
|
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
4
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
5
|
|
|
6
|
-
## [3.433.0
|
|
6
|
+
## [3.433.0] - 2026.12.04
|
|
7
7
|
### Added
|
|
8
|
-
- [
|
|
8
|
+
- [Orders] Add `createdByFirstName` and `createdByLastName` to `CommentOrder`
|
|
9
|
+
|
|
10
|
+
## [3.432.1] - 2026.12.02
|
|
11
|
+
### Security
|
|
12
|
+
- Upgrade `axios` to 1.21.1 and `joi` to 17.13.9, and update transitive dev dependencies, to fix the known vulnerabilities reported by `yarn audit`
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
- Declare runtime dependencies with caret ranges so that projects using the client get their patch and minor updates
|
|
9
16
|
|
|
10
17
|
## [3.432.0] - 2026.11.27
|
|
11
18
|
### Added
|
|
@@ -59,33 +59,13 @@ export declare type ItemUpdateRequestType = {
|
|
|
59
59
|
[ItemRequestFields.QUANTITY]: number;
|
|
60
60
|
[ItemRequestFields.ADDITIONAL_DATA]?: ItemAdditionalDataRequestType[];
|
|
61
61
|
};
|
|
62
|
-
/**
|
|
63
|
-
* One base offer of a bundle in an update snapshot, identified by the item id of its cart line
|
|
64
|
-
*/
|
|
65
|
-
export declare type ItemBundleBasePriceBandUpdateRequestType = {
|
|
66
|
-
[ItemRequestFields.ITEM_ID]: string;
|
|
67
|
-
[ItemRequestFields.PRICE_BAND_ARROWSPHERE_SKU]: string;
|
|
68
|
-
[ItemRequestFields.QUANTITY]: number;
|
|
69
|
-
[ItemRequestFields.ADDITIONAL_DATA]?: ItemAdditionalDataRequestType[];
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* Full snapshot of the base offers of a bundle, sent to update the bundle parent line.
|
|
73
|
-
* It must contain each base offer of the bundle exactly once.
|
|
74
|
-
*/
|
|
75
|
-
export declare type ItemBundleUpdateRequestType = {
|
|
76
|
-
[ItemRequestFields.BASE_PRICE_BANDS]: ItemBundleBasePriceBandUpdateRequestType[];
|
|
77
|
-
};
|
|
78
62
|
export declare class CartClient extends AbstractRestfulClient {
|
|
79
63
|
protected basePath: string;
|
|
80
64
|
addItem(postData: ItemAddRequestType, parameters?: Parameters): Promise<GetResult<Item>>;
|
|
81
65
|
changeCustomer(postData: ChangeCustomerRequestType, parameters?: Parameters): Promise<CartItemListResult>;
|
|
82
66
|
checkPromotion(parameters?: Parameters): Promise<GetResult<GetPromotionCartListResult>>;
|
|
83
67
|
checkPrerequisites(itemId: string, parameters?: Parameters): Promise<GetResult<GetPrerequisitesListResult>>;
|
|
84
|
-
|
|
85
|
-
* Update a cart item.
|
|
86
|
-
* For a bundle, use the item id of the bundle parent line and send the full snapshot of its base offers.
|
|
87
|
-
*/
|
|
88
|
-
updateItem(itemId: string, postData: ItemUpdateRequestType | ItemBundleUpdateRequestType, parameters?: Parameters): Promise<GetResult<Item>>;
|
|
68
|
+
updateItem(itemId: string, postData: ItemUpdateRequestType, parameters?: Parameters): Promise<GetResult<Item>>;
|
|
89
69
|
removeItem(itemId: string, parameters?: Parameters): Promise<void>;
|
|
90
70
|
removeItems(parameters?: Parameters): Promise<void>;
|
|
91
71
|
listItems(perPage?: number, page?: number, parameters?: Parameters): Promise<CartItemListResult>;
|
package/build/cart/cartClient.js
CHANGED
|
@@ -54,10 +54,6 @@ class CartClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
54
54
|
this.path = `/${itemId}/prerequisites`;
|
|
55
55
|
return new getResult_1.GetResult(prerequisiteList_1.GetPrerequisitesListResult, await this.get(parameters));
|
|
56
56
|
}
|
|
57
|
-
/**
|
|
58
|
-
* Update a cart item.
|
|
59
|
-
* For a bundle, use the item id of the bundle parent line and send the full snapshot of its base offers.
|
|
60
|
-
*/
|
|
61
57
|
async updateItem(itemId, postData, parameters = {}) {
|
|
62
58
|
this.path = `/${itemId}`;
|
|
63
59
|
return new getResult_1.GetResult(entities_1.Item, await this.patch(postData, parameters));
|
|
@@ -2,11 +2,15 @@ import { AbstractEntity } from '../../../abstractEntity';
|
|
|
2
2
|
export declare enum CommentOrderFields {
|
|
3
3
|
COLUMN_CREATED_AT = "createdAt",
|
|
4
4
|
COLUMN_CREATED_BY = "createdBy",
|
|
5
|
+
COLUMN_CREATED_BY_FIRST_NAME = "createdByFirstName",
|
|
6
|
+
COLUMN_CREATED_BY_LAST_NAME = "createdByLastName",
|
|
5
7
|
COLUMN_VALUE = "value"
|
|
6
8
|
}
|
|
7
9
|
export declare type CommentOrderType = {
|
|
8
10
|
[CommentOrderFields.COLUMN_CREATED_AT]: string;
|
|
9
11
|
[CommentOrderFields.COLUMN_CREATED_BY]: string;
|
|
12
|
+
[CommentOrderFields.COLUMN_CREATED_BY_FIRST_NAME]?: string | null;
|
|
13
|
+
[CommentOrderFields.COLUMN_CREATED_BY_LAST_NAME]?: string | null;
|
|
10
14
|
[CommentOrderFields.COLUMN_VALUE]: string;
|
|
11
15
|
};
|
|
12
16
|
export declare class CommentOrder extends AbstractEntity<CommentOrderType> {
|
|
@@ -14,6 +18,8 @@ export declare class CommentOrder extends AbstractEntity<CommentOrderType> {
|
|
|
14
18
|
constructor(getCommentDataInput: CommentOrderType);
|
|
15
19
|
get createdAt(): string;
|
|
16
20
|
get createdBy(): string;
|
|
21
|
+
get createdByFirstName(): string | null | undefined;
|
|
22
|
+
get createdByLastName(): string | null | undefined;
|
|
17
23
|
get value(): string;
|
|
18
24
|
toJSON(): CommentOrderType;
|
|
19
25
|
}
|
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
11
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
12
|
};
|
|
13
|
-
var _CommentOrder_createdAt, _CommentOrder_createdBy, _CommentOrder_value;
|
|
13
|
+
var _CommentOrder_createdAt, _CommentOrder_createdBy, _CommentOrder_createdByFirstName, _CommentOrder_createdByLastName, _CommentOrder_value;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.CommentOrder = exports.CommentOrderFields = void 0;
|
|
16
16
|
const abstractEntity_1 = require("../../../abstractEntity");
|
|
@@ -18,6 +18,8 @@ var CommentOrderFields;
|
|
|
18
18
|
(function (CommentOrderFields) {
|
|
19
19
|
CommentOrderFields["COLUMN_CREATED_AT"] = "createdAt";
|
|
20
20
|
CommentOrderFields["COLUMN_CREATED_BY"] = "createdBy";
|
|
21
|
+
CommentOrderFields["COLUMN_CREATED_BY_FIRST_NAME"] = "createdByFirstName";
|
|
22
|
+
CommentOrderFields["COLUMN_CREATED_BY_LAST_NAME"] = "createdByLastName";
|
|
21
23
|
CommentOrderFields["COLUMN_VALUE"] = "value";
|
|
22
24
|
})(CommentOrderFields = exports.CommentOrderFields || (exports.CommentOrderFields = {}));
|
|
23
25
|
class CommentOrder extends abstractEntity_1.AbstractEntity {
|
|
@@ -25,9 +27,13 @@ class CommentOrder extends abstractEntity_1.AbstractEntity {
|
|
|
25
27
|
super(getCommentDataInput);
|
|
26
28
|
_CommentOrder_createdAt.set(this, void 0);
|
|
27
29
|
_CommentOrder_createdBy.set(this, void 0);
|
|
30
|
+
_CommentOrder_createdByFirstName.set(this, void 0);
|
|
31
|
+
_CommentOrder_createdByLastName.set(this, void 0);
|
|
28
32
|
_CommentOrder_value.set(this, void 0);
|
|
29
33
|
__classPrivateFieldSet(this, _CommentOrder_createdAt, getCommentDataInput[CommentOrderFields.COLUMN_CREATED_AT], "f");
|
|
30
34
|
__classPrivateFieldSet(this, _CommentOrder_createdBy, getCommentDataInput[CommentOrderFields.COLUMN_CREATED_BY], "f");
|
|
35
|
+
__classPrivateFieldSet(this, _CommentOrder_createdByFirstName, getCommentDataInput[CommentOrderFields.COLUMN_CREATED_BY_FIRST_NAME], "f");
|
|
36
|
+
__classPrivateFieldSet(this, _CommentOrder_createdByLastName, getCommentDataInput[CommentOrderFields.COLUMN_CREATED_BY_LAST_NAME], "f");
|
|
31
37
|
__classPrivateFieldSet(this, _CommentOrder_value, getCommentDataInput[CommentOrderFields.COLUMN_VALUE], "f");
|
|
32
38
|
}
|
|
33
39
|
get createdAt() {
|
|
@@ -36,6 +42,12 @@ class CommentOrder extends abstractEntity_1.AbstractEntity {
|
|
|
36
42
|
get createdBy() {
|
|
37
43
|
return __classPrivateFieldGet(this, _CommentOrder_createdBy, "f");
|
|
38
44
|
}
|
|
45
|
+
get createdByFirstName() {
|
|
46
|
+
return __classPrivateFieldGet(this, _CommentOrder_createdByFirstName, "f");
|
|
47
|
+
}
|
|
48
|
+
get createdByLastName() {
|
|
49
|
+
return __classPrivateFieldGet(this, _CommentOrder_createdByLastName, "f");
|
|
50
|
+
}
|
|
39
51
|
get value() {
|
|
40
52
|
return __classPrivateFieldGet(this, _CommentOrder_value, "f");
|
|
41
53
|
}
|
|
@@ -43,10 +55,18 @@ class CommentOrder extends abstractEntity_1.AbstractEntity {
|
|
|
43
55
|
return {
|
|
44
56
|
[CommentOrderFields.COLUMN_CREATED_AT]: this.createdAt,
|
|
45
57
|
[CommentOrderFields.COLUMN_CREATED_BY]: this.createdBy,
|
|
58
|
+
...(this.createdByFirstName !== undefined && {
|
|
59
|
+
[CommentOrderFields.COLUMN_CREATED_BY_FIRST_NAME]: this
|
|
60
|
+
.createdByFirstName,
|
|
61
|
+
}),
|
|
62
|
+
...(this.createdByLastName !== undefined && {
|
|
63
|
+
[CommentOrderFields.COLUMN_CREATED_BY_LAST_NAME]: this
|
|
64
|
+
.createdByLastName,
|
|
65
|
+
}),
|
|
46
66
|
[CommentOrderFields.COLUMN_VALUE]: this.value,
|
|
47
67
|
};
|
|
48
68
|
}
|
|
49
69
|
}
|
|
50
70
|
exports.CommentOrder = CommentOrder;
|
|
51
|
-
_CommentOrder_createdAt = new WeakMap(), _CommentOrder_createdBy = new WeakMap(), _CommentOrder_value = new WeakMap();
|
|
71
|
+
_CommentOrder_createdAt = new WeakMap(), _CommentOrder_createdBy = new WeakMap(), _CommentOrder_createdByFirstName = new WeakMap(), _CommentOrder_createdByLastName = new WeakMap(), _CommentOrder_value = new WeakMap();
|
|
52
72
|
//# sourceMappingURL=comment.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "https://github.com/ArrowSphere/nodejs-api-client.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "3.433.0
|
|
7
|
+
"version": "3.433.0",
|
|
8
8
|
"description": "Node.js client for ArrowSphere's public API",
|
|
9
9
|
"main": "build/index.js",
|
|
10
10
|
"types": "build/index.d.ts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@types/node": "18.19.9",
|
|
39
39
|
"@types/sinon": "9.0.10",
|
|
40
40
|
"@types/sinon-chai": "3.2.5",
|
|
41
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
42
|
-
"@typescript-eslint/parser": "8.
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "8.74.0",
|
|
42
|
+
"@typescript-eslint/parser": "8.74.0",
|
|
43
43
|
"chai": "4.3.0",
|
|
44
44
|
"chai-as-promised": "7.1.1",
|
|
45
45
|
"eslint": "8.57.1",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"eslint-plugin-prettier": "3.3.1",
|
|
48
48
|
"eslint-plugin-tsdoc": "0.5.2",
|
|
49
49
|
"husky": "^9.1.7",
|
|
50
|
-
"joi": "17.13.
|
|
50
|
+
"joi": "17.13.9",
|
|
51
51
|
"lint-staged": "16.4.0",
|
|
52
52
|
"mocha": "11.7.6",
|
|
53
53
|
"mocha-suppress-logs": "0.6.0",
|
|
@@ -61,7 +61,13 @@
|
|
|
61
61
|
},
|
|
62
62
|
"resolutions": {
|
|
63
63
|
"mocha/diff": "^8.0.3",
|
|
64
|
-
"mocha/serialize-javascript": "^7.0.5"
|
|
64
|
+
"mocha/serialize-javascript": "^7.0.5",
|
|
65
|
+
"mocha/glob": "^14.0.6",
|
|
66
|
+
"mocha/minimatch": "^11.0.8",
|
|
67
|
+
"nyc/glob": "^14.0.6",
|
|
68
|
+
"nyc/test-exclude/glob": "^14.0.6",
|
|
69
|
+
"nyc/test-exclude/minimatch": "^11.0.8",
|
|
70
|
+
"eslint-plugin-tsdoc/**/minimatch": "^11.0.8"
|
|
65
71
|
},
|
|
66
72
|
"husky": {
|
|
67
73
|
"hooks": {
|
|
@@ -82,11 +88,11 @@
|
|
|
82
88
|
"test": "tests"
|
|
83
89
|
},
|
|
84
90
|
"dependencies": {
|
|
85
|
-
"axios": "1.
|
|
86
|
-
"graphql": "16.8.1",
|
|
87
|
-
"graphql-request": "7.3.5",
|
|
88
|
-
"json-to-graphql-query": "2.3.0",
|
|
89
|
-
"type-fest": "2.19.0",
|
|
90
|
-
"validatorjs": "3.22.1"
|
|
91
|
+
"axios": "^1.21.1",
|
|
92
|
+
"graphql": "^16.8.1",
|
|
93
|
+
"graphql-request": "^7.3.5",
|
|
94
|
+
"json-to-graphql-query": "^2.3.0",
|
|
95
|
+
"type-fest": "^2.19.0",
|
|
96
|
+
"validatorjs": "^3.22.1"
|
|
91
97
|
}
|
|
92
98
|
}
|