@arrowsphere/api-client 3.248.0 → 3.248.2-rc.fdi.1
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,6 +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.248.2] - 2026.03.04
|
|
7
|
+
|
|
8
|
+
### Updated
|
|
9
|
+
- [Cart] Fix type of the add and update cart endpoint payload
|
|
10
|
+
|
|
11
|
+
## [3.248.1] - 2026.02.26
|
|
12
|
+
|
|
13
|
+
### Updated
|
|
14
|
+
- [Contact] Fix type of the get and patch contact endpoint payload
|
|
15
|
+
|
|
6
16
|
## [3.248.0] - 2026.02.26
|
|
7
17
|
|
|
8
18
|
### Added
|
|
@@ -24,7 +24,17 @@ export declare type ItemAdditionalDataRequestType = {
|
|
|
24
24
|
[ItemAdditionalDataRequestFields.NAME]: string;
|
|
25
25
|
[ItemAdditionalDataRequestFields.VALUE]: string;
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* Deprecated type, kept for backward compatibility. Use ItemAddRequestType instead which has the same structure
|
|
29
|
+
*/
|
|
27
30
|
export declare type ItemRequestType = {
|
|
31
|
+
[ItemRequestFields.ADDITIONAL_DATA]?: ItemAdditionalDataRequestType[];
|
|
32
|
+
[ItemRequestFields.OFFER_NAME]: string;
|
|
33
|
+
[ItemRequestFields.PRICE_BAND_ARROWSPHERE_SKU]: string;
|
|
34
|
+
[ItemRequestFields.QUANTITY]: number;
|
|
35
|
+
};
|
|
36
|
+
export declare type ItemAddRequestType = ItemRequestType;
|
|
37
|
+
export declare type ItemUpdateRequestType = {
|
|
28
38
|
[ItemFields.ADDITIONAL_DATA]?: ItemAdditionalDataRequestType[] | undefined;
|
|
29
39
|
[ItemFields.COTERM_PRICES]?: Record<'arrow' | 'partner' | 'endCustomer' | 'retail', number> | undefined;
|
|
30
40
|
[ItemFields.COTERM_PRICES_WITHOUT_PROMOTION]?: Record<'arrow' | 'partner' | 'endCustomer' | 'retail', number> | undefined;
|
|
@@ -39,8 +49,6 @@ export declare type ItemRequestType = {
|
|
|
39
49
|
[ItemFields.QUANTITY]: number;
|
|
40
50
|
[ItemFields.RULES]?: PricingRuleType | undefined;
|
|
41
51
|
};
|
|
42
|
-
export declare type ItemAddRequestType = ItemRequestType;
|
|
43
|
-
export declare type ItemUpdateRequestType = ItemRequestType;
|
|
44
52
|
export declare class CartClient extends AbstractRestfulClient {
|
|
45
53
|
protected basePath: string;
|
|
46
54
|
addItem(postData: ItemAddRequestType, parameters?: Parameters): Promise<GetResult<Item>>;
|
|
@@ -36,8 +36,8 @@ export declare class ContactClient extends AbstractRestfulClient {
|
|
|
36
36
|
protected basePath: string;
|
|
37
37
|
createContact(postData: ContactRequestType, parameters?: Parameters): Promise<GetResult<ContactCreate>>;
|
|
38
38
|
listContact(perPage?: number, page?: number, parameters?: Parameters): Promise<GetResult<ContactList>>;
|
|
39
|
-
getContact(
|
|
40
|
-
updateContact(
|
|
39
|
+
getContact(contactId: number, parameters?: Parameters): Promise<GetResult<Contact>>;
|
|
40
|
+
updateContact(contactId: number, patchData: ContactRequestType, parameters?: Parameters): Promise<GetResult<Contact>>;
|
|
41
41
|
lockContact(contactId: number, parameters?: Parameters): Promise<void>;
|
|
42
42
|
unlockContact(contactId: number, parameters?: Parameters): Promise<void>;
|
|
43
43
|
disableMfaContact(contactId: number, parameters?: Parameters): Promise<void>;
|
|
@@ -37,12 +37,12 @@ class ContactClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
37
37
|
this.setPage(page);
|
|
38
38
|
return new getResult_1.GetResult(contactList_1.ContactList, await this.get(parameters));
|
|
39
39
|
}
|
|
40
|
-
async getContact(
|
|
41
|
-
this.path = `/${
|
|
40
|
+
async getContact(contactId, parameters = {}) {
|
|
41
|
+
this.path = `/${contactId}`;
|
|
42
42
|
return new getResult_1.GetResult(contact_1.Contact, await this.get(parameters));
|
|
43
43
|
}
|
|
44
|
-
async updateContact(
|
|
45
|
-
this.path = `/${
|
|
44
|
+
async updateContact(contactId, patchData, parameters = {}) {
|
|
45
|
+
this.path = `/${contactId}`;
|
|
46
46
|
return new getResult_1.GetResult(contact_1.Contact, await this.patch(patchData, parameters));
|
|
47
47
|
}
|
|
48
48
|
async lockContact(contactId, parameters = {}) {
|
package/package.json
CHANGED