@elasticpath/js-sdk 26.0.0 → 28.0.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.cjs.js +130 -18
- package/dist/index.d.ts +96 -7
- package/dist/index.esm.js +130 -18
- package/dist/index.js +130 -18
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -530,7 +530,7 @@ if (!globalThis.fetch) {
|
|
|
530
530
|
globalThis.Response = fetch$1.Response;
|
|
531
531
|
}
|
|
532
532
|
|
|
533
|
-
var version = "
|
|
533
|
+
var version = "28.0.0";
|
|
534
534
|
|
|
535
535
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
536
536
|
function LocalStorageFactory() {
|
|
@@ -750,6 +750,7 @@ function formatQueryString(key, value) {
|
|
|
750
750
|
return "".concat(key, "=").concat(value);
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
+
var _excluded$1 = ["includes", "sort", "limit", "offset", "filter", "useTemplateSlugs", "total_method"];
|
|
753
754
|
function buildRelationshipData(type, ids) {
|
|
754
755
|
var typeModifier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : inflected.underscore;
|
|
755
756
|
var data = [];
|
|
@@ -819,14 +820,15 @@ function parseJSON(response) {
|
|
|
819
820
|
});
|
|
820
821
|
});
|
|
821
822
|
}
|
|
822
|
-
function buildQueryParams(
|
|
823
|
-
var includes =
|
|
824
|
-
sort =
|
|
825
|
-
limit =
|
|
826
|
-
offset =
|
|
827
|
-
filter =
|
|
828
|
-
useTemplateSlugs =
|
|
829
|
-
total_method =
|
|
823
|
+
function buildQueryParams(params) {
|
|
824
|
+
var includes = params.includes,
|
|
825
|
+
sort = params.sort,
|
|
826
|
+
limit = params.limit,
|
|
827
|
+
offset = params.offset,
|
|
828
|
+
filter = params.filter,
|
|
829
|
+
useTemplateSlugs = params.useTemplateSlugs,
|
|
830
|
+
total_method = params.total_method,
|
|
831
|
+
additionalParams = _objectWithoutProperties(params, _excluded$1);
|
|
830
832
|
var query = {};
|
|
831
833
|
if (includes) {
|
|
832
834
|
query.include = includes;
|
|
@@ -849,6 +851,13 @@ function buildQueryParams(_ref) {
|
|
|
849
851
|
if (total_method) {
|
|
850
852
|
query.total_method = total_method;
|
|
851
853
|
}
|
|
854
|
+
|
|
855
|
+
// Add any additional parameters with URI encoding
|
|
856
|
+
Object.keys(additionalParams).forEach(function (key) {
|
|
857
|
+
if (additionalParams[key] !== undefined && additionalParams[key] !== null) {
|
|
858
|
+
query[key] = additionalParams[key];
|
|
859
|
+
}
|
|
860
|
+
});
|
|
852
861
|
return Object.keys(query).map(function (k) {
|
|
853
862
|
return formatQueryString(k, query[k]);
|
|
854
863
|
}).join('&');
|
|
@@ -859,9 +868,15 @@ function formatQueryParams(query) {
|
|
|
859
868
|
}).join('&');
|
|
860
869
|
}
|
|
861
870
|
function buildURL(endpoint, params) {
|
|
862
|
-
|
|
871
|
+
// Check if any params are provided
|
|
872
|
+
var hasParams = Object.keys(params).some(function (key) {
|
|
873
|
+
return params[key] !== undefined && params[key] !== null;
|
|
874
|
+
});
|
|
875
|
+
if (hasParams) {
|
|
863
876
|
var paramsString = buildQueryParams(params);
|
|
864
|
-
|
|
877
|
+
if (paramsString) {
|
|
878
|
+
return "".concat(endpoint, "?").concat(paramsString);
|
|
879
|
+
}
|
|
865
880
|
}
|
|
866
881
|
return endpoint;
|
|
867
882
|
}
|
|
@@ -936,11 +951,11 @@ function getCredentials(storage, storageKey) {
|
|
|
936
951
|
function resolveCredentialsStorageKey(name) {
|
|
937
952
|
return name ? "".concat(name, "_ep_credentials") : DEFAULT_CREDENTIALS_KEY;
|
|
938
953
|
}
|
|
939
|
-
function tokenInvalid(
|
|
940
|
-
var storage =
|
|
941
|
-
client_id =
|
|
942
|
-
reauth =
|
|
943
|
-
name =
|
|
954
|
+
function tokenInvalid(_ref) {
|
|
955
|
+
var storage = _ref.storage,
|
|
956
|
+
client_id = _ref.client_id,
|
|
957
|
+
reauth = _ref.reauth,
|
|
958
|
+
name = _ref.name;
|
|
944
959
|
var credentials = getCredentials(storage, resolveCredentialsStorageKey(name));
|
|
945
960
|
var handleInvalid = function handleInvalid(message) {
|
|
946
961
|
/* eslint-disable no-console */
|
|
@@ -3662,6 +3677,41 @@ var HierarchiesEndpoint = /*#__PURE__*/function (_CRUDExtend) {
|
|
|
3662
3677
|
var token = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
3663
3678
|
return this.request.send("".concat(this.endpoint, "/").concat(hierarchyId, "/duplicate_job"), 'POST', body, token);
|
|
3664
3679
|
}
|
|
3680
|
+
}, {
|
|
3681
|
+
key: "GetNodesByIds",
|
|
3682
|
+
value: function GetNodesByIds(nodeIds) {
|
|
3683
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
3684
|
+
if (!nodeIds || nodeIds.length === 0) {
|
|
3685
|
+
return Promise.resolve({
|
|
3686
|
+
data: [],
|
|
3687
|
+
links: {},
|
|
3688
|
+
meta: {
|
|
3689
|
+
page: {
|
|
3690
|
+
current: 1,
|
|
3691
|
+
limit: 100,
|
|
3692
|
+
offset: 0,
|
|
3693
|
+
total: 0
|
|
3694
|
+
},
|
|
3695
|
+
results: {
|
|
3696
|
+
total: 0
|
|
3697
|
+
}
|
|
3698
|
+
}
|
|
3699
|
+
});
|
|
3700
|
+
}
|
|
3701
|
+
var filter = {
|
|
3702
|
+
or: nodeIds.map(function (id) {
|
|
3703
|
+
return {
|
|
3704
|
+
eq: {
|
|
3705
|
+
id: id
|
|
3706
|
+
}
|
|
3707
|
+
};
|
|
3708
|
+
})
|
|
3709
|
+
};
|
|
3710
|
+
return this.request.send(buildURL('hierarchies/nodes', {
|
|
3711
|
+
filter: filter,
|
|
3712
|
+
include_hierarchies: true
|
|
3713
|
+
}), 'GET', undefined, token);
|
|
3714
|
+
}
|
|
3665
3715
|
}]);
|
|
3666
3716
|
return HierarchiesEndpoint;
|
|
3667
3717
|
}(CRUDExtend);
|
|
@@ -3718,14 +3768,26 @@ var AccountsEndpoint = /*#__PURE__*/function (_CRUDExtend) {
|
|
|
3718
3768
|
var headers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3719
3769
|
var limit = this.limit,
|
|
3720
3770
|
offset = this.offset,
|
|
3721
|
-
filter = this.filter
|
|
3771
|
+
filter = this.filter,
|
|
3772
|
+
includes = this.includes;
|
|
3722
3773
|
this.call = this.request.send(buildURL(this.endpoint, {
|
|
3723
3774
|
limit: limit,
|
|
3724
3775
|
offset: offset,
|
|
3725
|
-
filter: filter
|
|
3776
|
+
filter: filter,
|
|
3777
|
+
includes: includes
|
|
3726
3778
|
}), 'GET', undefined, token, this, headers);
|
|
3727
3779
|
return this.call;
|
|
3728
3780
|
}
|
|
3781
|
+
}, {
|
|
3782
|
+
key: "AddAccountTags",
|
|
3783
|
+
value: function AddAccountTags(accountId, requestBody) {
|
|
3784
|
+
return this.request.send("".concat(this.endpoint, "/").concat(accountId, "/relationships/account-tags"), 'POST', requestBody);
|
|
3785
|
+
}
|
|
3786
|
+
}, {
|
|
3787
|
+
key: "DeleteAccountTags",
|
|
3788
|
+
value: function DeleteAccountTags(accountId, requestBody) {
|
|
3789
|
+
return this.request.send("".concat(this.endpoint, "/").concat(accountId, "/relationships/account-tags"), 'DELETE', requestBody);
|
|
3790
|
+
}
|
|
3729
3791
|
}]);
|
|
3730
3792
|
return AccountsEndpoint;
|
|
3731
3793
|
}(CRUDExtend);
|
|
@@ -4943,6 +5005,55 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4943
5005
|
return MultiLocationInventories;
|
|
4944
5006
|
}();
|
|
4945
5007
|
|
|
5008
|
+
var AccountTagsEndpoint = /*#__PURE__*/function (_BaseExtend) {
|
|
5009
|
+
_inherits(AccountTagsEndpoint, _BaseExtend);
|
|
5010
|
+
var _super = _createSuper(AccountTagsEndpoint);
|
|
5011
|
+
function AccountTagsEndpoint() {
|
|
5012
|
+
_classCallCheck(this, AccountTagsEndpoint);
|
|
5013
|
+
return _super.apply(this, arguments);
|
|
5014
|
+
}
|
|
5015
|
+
_createClass(AccountTagsEndpoint, [{
|
|
5016
|
+
key: "Create",
|
|
5017
|
+
value: function Create(body) {
|
|
5018
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
5019
|
+
return this.request.send("account-tags", 'POST', body, token, this);
|
|
5020
|
+
}
|
|
5021
|
+
}, {
|
|
5022
|
+
key: "All",
|
|
5023
|
+
value: function All() {
|
|
5024
|
+
var token = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
5025
|
+
var limit = this.limit,
|
|
5026
|
+
offset = this.offset,
|
|
5027
|
+
filter = this.filter;
|
|
5028
|
+
this.call = this.request.send(buildURL("account-tags", {
|
|
5029
|
+
limit: limit,
|
|
5030
|
+
offset: offset,
|
|
5031
|
+
filter: filter
|
|
5032
|
+
}), 'GET', undefined, token, this);
|
|
5033
|
+
return this.call;
|
|
5034
|
+
}
|
|
5035
|
+
}, {
|
|
5036
|
+
key: "Get",
|
|
5037
|
+
value: function Get(accountTagId) {
|
|
5038
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
5039
|
+
return this.request.send("account-tags/".concat(accountTagId), 'GET', undefined, token);
|
|
5040
|
+
}
|
|
5041
|
+
}, {
|
|
5042
|
+
key: "Update",
|
|
5043
|
+
value: function Update(accountTagId, body) {
|
|
5044
|
+
var token = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
5045
|
+
return this.request.send("account-tags/".concat(accountTagId), 'PUT', body, token);
|
|
5046
|
+
}
|
|
5047
|
+
}, {
|
|
5048
|
+
key: "Delete",
|
|
5049
|
+
value: function Delete(accountTagId) {
|
|
5050
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
5051
|
+
return this.request.send("account-tags/".concat(accountTagId), 'DELETE', undefined, token);
|
|
5052
|
+
}
|
|
5053
|
+
}]);
|
|
5054
|
+
return AccountTagsEndpoint;
|
|
5055
|
+
}(BaseExtend);
|
|
5056
|
+
|
|
4946
5057
|
var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
|
|
4947
5058
|
_inherits(Nodes, _CRUDExtend);
|
|
4948
5059
|
var _super = _createSuper(Nodes);
|
|
@@ -5903,6 +6014,7 @@ var ElasticPath = /*#__PURE__*/function () {
|
|
|
5903
6014
|
this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
|
|
5904
6015
|
this.CustomRelationships = new CustomRelationshipsEndpoint(config);
|
|
5905
6016
|
this.MultiLocationInventories = new MultiLocationInventories(config);
|
|
6017
|
+
this.AccountTags = new AccountTagsEndpoint(config);
|
|
5906
6018
|
}
|
|
5907
6019
|
|
|
5908
6020
|
// Expose `Cart` class on ElasticPath class
|
package/dist/index.d.ts
CHANGED
|
@@ -5182,7 +5182,7 @@ interface DuplicateHierarchyBody {
|
|
|
5182
5182
|
}
|
|
5183
5183
|
}
|
|
5184
5184
|
|
|
5185
|
-
type DuplicateHierarchyJob
|
|
5185
|
+
type DuplicateHierarchyJob = Identifiable & PcmJobBase
|
|
5186
5186
|
|
|
5187
5187
|
interface HierarchyFilter {
|
|
5188
5188
|
// TODO
|
|
@@ -5215,6 +5215,7 @@ interface HierarchiesEndpoint
|
|
|
5215
5215
|
body: DuplicateHierarchyBody,
|
|
5216
5216
|
token?: string
|
|
5217
5217
|
): Promise<Resource<DuplicateHierarchyJob>>
|
|
5218
|
+
GetNodesByIds(nodeIds: string[], token?: string): Promise<ResourcePage<Node>>
|
|
5218
5219
|
Limit(value: number): HierarchiesEndpoint
|
|
5219
5220
|
Offset(value: number): HierarchiesEndpoint
|
|
5220
5221
|
}
|
|
@@ -6195,6 +6196,54 @@ interface MerchantRealmMappingsEndpoint {
|
|
|
6195
6196
|
Get(id: string): Promise<Resource<MerchantRealmMappings>>
|
|
6196
6197
|
}
|
|
6197
6198
|
|
|
6199
|
+
interface AccountTagBase {
|
|
6200
|
+
type: string
|
|
6201
|
+
name: string
|
|
6202
|
+
description: string
|
|
6203
|
+
}
|
|
6204
|
+
|
|
6205
|
+
interface AccountTagMeta {
|
|
6206
|
+
timestamps: {
|
|
6207
|
+
created_at: string
|
|
6208
|
+
updated_at: string
|
|
6209
|
+
}
|
|
6210
|
+
}
|
|
6211
|
+
|
|
6212
|
+
interface AccountTag extends Identifiable, AccountTagBase {
|
|
6213
|
+
meta: AccountTagMeta
|
|
6214
|
+
}
|
|
6215
|
+
|
|
6216
|
+
interface AccountTagFilter {
|
|
6217
|
+
like?: {
|
|
6218
|
+
name?: string
|
|
6219
|
+
}
|
|
6220
|
+
}
|
|
6221
|
+
|
|
6222
|
+
interface AccountTagsEndpoint
|
|
6223
|
+
extends CrudQueryableResource<
|
|
6224
|
+
AccountTag,
|
|
6225
|
+
AccountTagBase,
|
|
6226
|
+
AccountTagBase,
|
|
6227
|
+
AccountTagFilter,
|
|
6228
|
+
never,
|
|
6229
|
+
never
|
|
6230
|
+
> {
|
|
6231
|
+
endpoint: 'account-tags'
|
|
6232
|
+
|
|
6233
|
+
Create(body: AccountTagBase): Promise<Resource<AccountTag>>
|
|
6234
|
+
|
|
6235
|
+
All(token?: string, headers?): Promise<ResourcePage<AccountTag>>
|
|
6236
|
+
|
|
6237
|
+
Get(accountTagId: string, token?: string): Promise<Resource<AccountTag>>
|
|
6238
|
+
|
|
6239
|
+
Update(
|
|
6240
|
+
accountTagId: string,
|
|
6241
|
+
body: AccountTagBase
|
|
6242
|
+
): Promise<Resource<AccountTag>>
|
|
6243
|
+
|
|
6244
|
+
Delete(accountTagId: string): Promise<{}>
|
|
6245
|
+
}
|
|
6246
|
+
|
|
6198
6247
|
/**
|
|
6199
6248
|
* Accounts
|
|
6200
6249
|
*/
|
|
@@ -6226,6 +6275,7 @@ interface Account extends AccountBase, Identifiable {
|
|
|
6226
6275
|
}
|
|
6227
6276
|
}
|
|
6228
6277
|
]
|
|
6278
|
+
account_tags: RelationshipToMany<'account_tag'>
|
|
6229
6279
|
}
|
|
6230
6280
|
}
|
|
6231
6281
|
|
|
@@ -6236,9 +6286,11 @@ interface AccountBase {
|
|
|
6236
6286
|
registration_id?: string
|
|
6237
6287
|
parent_id?: string
|
|
6238
6288
|
external_ref?: string
|
|
6289
|
+
relationships?: {
|
|
6290
|
+
account_tags: RelationshipToMany<'account_tag'>
|
|
6291
|
+
}
|
|
6239
6292
|
}
|
|
6240
6293
|
|
|
6241
|
-
|
|
6242
6294
|
/**
|
|
6243
6295
|
* filter for accounts
|
|
6244
6296
|
*/
|
|
@@ -6254,6 +6306,7 @@ interface AccountFilter {
|
|
|
6254
6306
|
legal_name?: string
|
|
6255
6307
|
registration_id?: string
|
|
6256
6308
|
external_ref?: string
|
|
6309
|
+
account_tags?: string[]
|
|
6257
6310
|
}
|
|
6258
6311
|
}
|
|
6259
6312
|
interface AccountUpdateBody extends Partial<AccountBase> {}
|
|
@@ -6269,7 +6322,7 @@ interface AccountEndpoint
|
|
|
6269
6322
|
AccountUpdateBody,
|
|
6270
6323
|
AccountFilter,
|
|
6271
6324
|
never,
|
|
6272
|
-
|
|
6325
|
+
'account_tags'
|
|
6273
6326
|
>,
|
|
6274
6327
|
'All' | 'Create' | 'Get' | 'Update'
|
|
6275
6328
|
> {
|
|
@@ -6281,7 +6334,17 @@ interface AccountEndpoint
|
|
|
6281
6334
|
* @param token - The Bearer token to grant access to the API.
|
|
6282
6335
|
* @param headers
|
|
6283
6336
|
*/
|
|
6284
|
-
All(
|
|
6337
|
+
All(
|
|
6338
|
+
token?: string,
|
|
6339
|
+
headers?: {}
|
|
6340
|
+
): Promise<
|
|
6341
|
+
ResourcePage<
|
|
6342
|
+
Account,
|
|
6343
|
+
{
|
|
6344
|
+
account_tags: AccountTag[]
|
|
6345
|
+
}
|
|
6346
|
+
>
|
|
6347
|
+
>
|
|
6285
6348
|
|
|
6286
6349
|
/**
|
|
6287
6350
|
* Get an Account by reference
|
|
@@ -6295,10 +6358,35 @@ interface AccountEndpoint
|
|
|
6295
6358
|
*/
|
|
6296
6359
|
Create(body: AccountBase): Promise<Resource<Account>>
|
|
6297
6360
|
|
|
6298
|
-
|
|
6361
|
+
/**
|
|
6299
6362
|
* Update an Account
|
|
6300
6363
|
*/
|
|
6301
|
-
Update(
|
|
6364
|
+
Update(
|
|
6365
|
+
accountId: string,
|
|
6366
|
+
body: Partial<AccountBase>
|
|
6367
|
+
): Promise<Resource<Account>>
|
|
6368
|
+
|
|
6369
|
+
/**
|
|
6370
|
+
* Add account tags to an Account
|
|
6371
|
+
*/
|
|
6372
|
+
AddAccountTags(
|
|
6373
|
+
accountId: string,
|
|
6374
|
+
requestBody: Array<{
|
|
6375
|
+
id: string
|
|
6376
|
+
type: 'account_tag'
|
|
6377
|
+
}>
|
|
6378
|
+
): Promise<void>
|
|
6379
|
+
|
|
6380
|
+
/**
|
|
6381
|
+
* Delete account tags from an Account
|
|
6382
|
+
*/
|
|
6383
|
+
DeleteAccountTags(
|
|
6384
|
+
accountId: string,
|
|
6385
|
+
requestBody: Array<{
|
|
6386
|
+
id: string
|
|
6387
|
+
type: 'account_tag'
|
|
6388
|
+
}>
|
|
6389
|
+
): Promise<void>
|
|
6302
6390
|
}
|
|
6303
6391
|
|
|
6304
6392
|
/**
|
|
@@ -9095,6 +9183,7 @@ declare class ElasticPath {
|
|
|
9095
9183
|
SubscriptionInvoices: SubscriptionInvoicesEndpoint
|
|
9096
9184
|
CustomRelationships: CustomRelationshipsEndpoint
|
|
9097
9185
|
MultiLocationInventories: MultiLocationInventoriesEndpoint
|
|
9186
|
+
AccountTags: AccountTagsEndpoint
|
|
9098
9187
|
|
|
9099
9188
|
Cart(id?: string): CartEndpoint // This optional cart id is super worrying when using the SDK in a node server :/
|
|
9100
9189
|
constructor(config: Config)
|
|
@@ -9113,4 +9202,4 @@ declare namespace elasticpath {
|
|
|
9113
9202
|
}
|
|
9114
9203
|
}
|
|
9115
9204
|
|
|
9116
|
-
export { Account, AccountAddress, AccountAddressBase, AccountAddressEdit, AccountAddressesEndpoint, AccountAssociationData, AccountAssociationResponse, AccountAuthenticationSettings, AccountAuthenticationSettingsBase, AccountAuthenticationSettingsEndpoint, AccountBase, AccountEndpoint, AccountFilter, AccountManagementAuthenticationTokenBody, AccountMember, AccountMemberBase, AccountMemberFilter, AccountMembersEndpoint, AccountMembership, AccountMembershipCreateBody, AccountMembershipOnAccountMember, AccountMembershipSettings, AccountMembershipSettingsBase, AccountMembershipSettingsEndpoint, AccountMembershipsEndpoint, AccountMembershipsFilter, AccountMembershipsInclude, AccountMembershipsIncludeAccounts, AccountMembershipsIncluded, AccountMembershipsIncludedAccounts, AccountMembershipsOnAccountMember, AccountMembershipsResponse, AccountTokenBase, AccountUpdateBody, Action, ActionCondition, ActionLimitation, Address, AddressBase, AdyenPayment, AndCondition, AnonymizeOrder, AnonymizeOrderResponse, ApplicationKey, ApplicationKeyBase, ApplicationKeyResponse, ApplicationKeysEndpoint, Attribute, Attributes, AttributesMeta, AuthenticateResponseBody, AuthenticationRealmEndpoint, AuthenticationSettings, AuthenticationSettingsBase, AuthenticationSettingsEndpoint, AuthorizeNetPayment, AuthorizePaymentMethod, BraintreePayment, Brand, BrandBase, BrandEndpoint, BrandFilter, BuildChildProductsJob, BuildRules, BuilderModifier, BuiltInRolePolicy, BulkAddOptions, BulkCustomDiscountOptions, BundleDiscountSchema, BundleGiftSchema, CapturePaymentMethod, CardConnectPayment, Cart, CartAdditionalHeaders, CartCustomDiscount, CartEndpoint, CartInclude, CartIncluded, CartItem, CartItemBase, CartItemObject, CartItemsResponse, CartSettings, CartShippingGroupBase, CartTaxItemObject, Catalog, CatalogBase, CatalogFilter, CatalogReleaseProductFilter, CatalogReleaseProductFilterAttributes, CatalogUpdateBody, CatalogsEndpoint, CatalogsNodesEndpoint, CatalogsProductVariation, CatalogsProductsEndpoint, CatalogsReleasesEndpoint, CatalogsRulesEndpoint, Category, CategoryBase, CategoryEndpoint, CategoryFilter, CheckoutCustomer, CheckoutCustomerObject, Collection, CollectionBase, CollectionEndpoint, CollectionFilter, Condition, Conditions, Config, ConfigOptions, ConfirmPaymentBody, ConfirmPaymentBodyWithOptions, ConfirmPaymentResponse, CreateCartObject, CreateChildrenSortOrderBody, CreateCustomRelationshipBody, CreateLocationBody, CrudQueryableResource, Currency, CurrencyAmount, CurrencyBase, CurrencyEndpoint, CurrencyPercentage, CustomApi, CustomApiBase, CustomApiField, CustomApiFieldBase, CustomApiRolePoliciesEndpoint, CustomApiRolePolicy, CustomApiRolePolicyBase, CustomApiRolePolicyRequestBody, CustomApisEndpoint, CustomAuthenticatorResponseBody, CustomDiscount, CustomDiscountResponse, CustomFieldValidation, CustomInputs, CustomInputsValidationRules, CustomRelationship, CustomRelationshipBase, CustomRelationshipBaseAttributes, CustomRelationshipEntry, CustomRelationshipsEndpoint, CustomRelationshipsFilter, CustomRelationshipsListResponse, Customer, CustomerAddress, CustomerAddressBase, CustomerAddressEdit, CustomerAddressesEndpoint, CustomerBase, CustomerFilter, CustomerInclude, CustomerToken, CustomersEndpoint, CyberSourcePayment, DataEntriesEndpoint, DataEntryRecord, DeletePromotionCodesBodyItem, DeleteRulePromotionCodes, DuplicateHierarchyBody, DuplicateHierarchyJob, ElasticPath, ElasticPathStripePayment, ErasureRequestRecord, ErasureRequestsEndpoint, Exclude$1 as Exclude, Extensions, Field, FieldBase, FieldsEndpoint, File, FileBase, FileEndpoint, FileFilter, FileHref, FixedDiscountSchema, Flow, FlowBase, FlowEndpoint, FlowFilter, FormattedPrice, Gateway, GatewayBase, GatewaysEndpoint, GeolocationDetails, GrantType, HierarchiesEndpoint, HierarchiesShopperCatalogEndpoint, Hierarchy, HierarchyBase, HierarchyFilter, HttpVerbs, Identifiable, Integration, IntegrationBase, IntegrationEndpoint, IntegrationFilter, IntegrationJob, IntegrationLog, IntegrationLogMeta, IntegrationLogsResponse, Inventory, InventoryActionTypes, InventoryBase, InventoryEndpoint, InventoryResourceType, InventoryResponse, InvoicingResult, ItemFixedDiscountSchema, ItemPercentDiscountSchema, ItemTaxObject, ItemTaxObjectResponse, Job, JobBase, JobEndpoint, LocalStorageFactory, Locales, Location, LocationAttributes, LocationBase, LocationCreateQuantity, LocationMeta, LocationQuantities, LocationUpdateQuantity, LocationsEndpoint, LogIntegration, ManualPayment, MatrixObject, MemoryStorageFactory, MerchantRealmMappings, MerchantRealmMappingsEndpoint, MergeCartOptions, MetricsBase, MetricsEndpoint, MetricsQuery, Modifier, ModifierResponse, ModifierType, ModifierTypeObj, MultiLocationInventoriesEndpoint, MultiLocationInventoryFilter, MultiLocationInventoryResponse, Node, NodeBase, NodeBaseResponse, NodeFilter, NodeProduct, NodeProductResponse, NodeRelationship, NodeRelationshipBase, NodeRelationshipParent, NodeRelationshipsEndpoint, NodesEndpoint, NodesResponse, NodesShopperCatalogEndpoint, NonAssociatedProductEntry, OidcProfileEndpoint, OnboardingLinkResponse, OneTimePasswordTokenRequestBody, OneTimePasswordTokenRequestEndpoint, Option, OptionResponse, Order, OrderAddressBase, OrderBase, OrderBillingAddress, OrderFilter, OrderInclude, OrderIncluded, OrderItem, OrderItemBase, OrderResponse, OrderShippingAddress, OrderSort, OrderSortAscend, OrderSortDescend, OrdersEndpoint, PCMVariation, PCMVariationBase, PCMVariationMetaOption, PCMVariationOption, PCMVariationOptionBase, PCMVariationsEndpoint, PartialPcmProductBase, PasswordProfile, PasswordProfileBody, PasswordProfileEndpoint, PasswordProfileListItem, PasswordProfileResponse, PayPalExpressCheckoutPayment, PaymentMethod, PaymentRequestBody, PcmCustomRelationshipEndpoint, PcmFileRelationship, PcmFileRelationshipEndpoint, PcmJob, PcmJobBase, PcmJobError, PcmJobsEndpoint, PcmMainImageRelationship, PcmMainImageRelationshipEndpoint, PcmProduct, PcmProductAttachmentBody, PcmProductAttachmentResponse, PcmProductBase, PcmProductEntry, PcmProductFilter, PcmProductInclude, PcmProductRelationships, PcmProductResponse, PcmProductUpdateBody, PcmProductsEndpoint, PcmProductsResponse, PcmTemplateRelationship, PcmTemplateRelationshipEndpoint, PcmVariationsRelationshipResource, PcmVariationsRelationships, PcmVariationsRelationshipsEndpoint, PercentDiscountSchema, PersonalDataEndpoint, PersonalDataRecord, Presentation, Price, PriceBook, PriceBookBase, PriceBookFilter, PriceBookPrice, PriceBookPriceBase, PriceBookPriceModifier, PriceBookPriceModifierBase, PriceBookPriceModifierEndpoint, PriceBookPricesCreateBody, PriceBookPricesEndpoint, PriceBookPricesUpdateBody, PriceBooksEndpoint, PriceBooksUpdateBody, PricesFilter, Product, ProductAssociationResponse, ProductBase, ProductComponentOption, ProductComponents, ProductFileRelationshipResource, ProductFilter, ProductResponse, ProductTemplateRelationshipResource, ProductsEndpoint, Profile, ProfileBase, ProfileCreateUpdateBody, ProfileListItem, ProfileResponse, ProfileResponseBody, Promotion, PromotionAttribute, PromotionAttributeValues, PromotionBase, PromotionCode, PromotionCodesJob, PromotionFilter, PromotionJob, PromotionMeta, PromotionSettings, PromotionsEndpoint, PurchasePaymentMethod, QueryableResource, Realm, RealmBase, RealmCreateBody, RealmUpdateBody, RefundPaymentMethod, Relationship, RelationshipToMany, RelationshipToOne, ReleaseBase, ReleaseBodyBase, ReleaseResponse, RequestFactory, Requirements, Resource, ResourceIncluded, ResourceList, ResourcePage, Rule, RuleBase, RuleFilter, RulePromotion, RulePromotionBase, RulePromotionCode, RulePromotionCodesJob, RulePromotionFilter, RulePromotionJob, RulePromotionMeta, RulePromotionsEndpoint, RuleUpdateBody, Settings, SettingsEndpoint, ShippingGroupBase, ShippingGroupResponse, ShippingIncluded, ShopperCatalogEndpoint, ShopperCatalogProductsEndpoint, ShopperCatalogReleaseBase, ShopperCatalogResource, ShopperCatalogResourceList, ShopperCatalogResourcePage, SimpleResourcePageResponse, StockAttributes, StockCreate, StockLocationsMap, StockResponse, StockUpdate, StorageFactory, StripeConnectPayment, StripeIntentsPayment, StripePayment, StripePaymentBase, StripePaymentOptionBase, Subscription, SubscriptionBase, SubscriptionCreate, SubscriptionDunningRules, SubscriptionDunningRulesBase, SubscriptionDunningRulesCreate, SubscriptionDunningRulesEndpoint, SubscriptionDunningRulesUpdate, SubscriptionFilter, SubscriptionInvoice, SubscriptionInvoiceBase, SubscriptionInvoiceFilter, SubscriptionInvoicePayment, SubscriptionInvoicePaymentBase, SubscriptionInvoicesEndpoint, SubscriptionJob, SubscriptionJobBase, SubscriptionJobCreate, SubscriptionJobsEndpoint, SubscriptionOffering, SubscriptionOfferingAttachPlanBody, SubscriptionOfferingAttachProductBody, SubscriptionOfferingAttachProrationPolicyBody, SubscriptionOfferingBase, SubscriptionOfferingBuildBody, SubscriptionOfferingBuildProduct, SubscriptionOfferingCreate, SubscriptionOfferingFilter, SubscriptionOfferingPlan, SubscriptionOfferingProduct, SubscriptionOfferingRelationships, SubscriptionOfferingUpdate, SubscriptionOfferingsEndpoint, SubscriptionPlan, SubscriptionPlanBase, SubscriptionPlanCreate, SubscriptionPlanUpdate, SubscriptionPlansEndpoint, SubscriptionProduct, SubscriptionProductBase, SubscriptionProductCreate, SubscriptionProductUpdate, SubscriptionProductsEndpoint, SubscriptionProrationPoliciesEndpoint, SubscriptionProrationPolicy, SubscriptionProrationPolicyBase, SubscriptionProrationPolicyCreate, SubscriptionProrationPolicyUpdate, SubscriptionSchedule, SubscriptionScheduleBase, SubscriptionScheduleCreate, SubscriptionScheduleUpdate, SubscriptionSchedulesEndpoint, SubscriptionSettings, SubscriptionSubscriber, SubscriptionSubscriberBase, SubscriptionSubscriberCreate, SubscriptionSubscriberUpdate, SubscriptionSubscribersEndpoint, SubscriptionUpdate, SubscriptionsEndpoint, SubscriptionsInclude, SubscriptionsIncluded, SubscriptionsStateAction, Subset, TargetCondition, Timestamps, Transaction, TransactionBase, TransactionEndpoint, TransactionsResponse, TtlSettings, UpdateCustomRelationshipBody, UpdateLocationBody, UpdateNodeBody, UpdateVariationBody, UpdateVariationOptionBody, UserAuthenticationInfo, UserAuthenticationInfoBody, UserAuthenticationInfoEndpoint, UserAuthenticationInfoFilter, UserAuthenticationInfoResponse, UserAuthenticationPasswordProfile, UserAuthenticationPasswordProfileBody, UserAuthenticationPasswordProfileEndpoint, UserAuthenticationPasswordProfileResponse, UserAuthenticationPasswordProfileUpdateBody, Validation, Variation, VariationBase, VariationsBuilderModifier, VariationsEndpoint, VariationsModifier, VariationsModifierResponse, VariationsModifierType, VariationsModifierTypeObj, XforAmountSchema, XforYSchema, createJob, elasticpath, gateway };
|
|
9205
|
+
export { Account, AccountAddress, AccountAddressBase, AccountAddressEdit, AccountAddressesEndpoint, AccountAssociationData, AccountAssociationResponse, AccountAuthenticationSettings, AccountAuthenticationSettingsBase, AccountAuthenticationSettingsEndpoint, AccountBase, AccountEndpoint, AccountFilter, AccountManagementAuthenticationTokenBody, AccountMember, AccountMemberBase, AccountMemberFilter, AccountMembersEndpoint, AccountMembership, AccountMembershipCreateBody, AccountMembershipOnAccountMember, AccountMembershipSettings, AccountMembershipSettingsBase, AccountMembershipSettingsEndpoint, AccountMembershipsEndpoint, AccountMembershipsFilter, AccountMembershipsInclude, AccountMembershipsIncludeAccounts, AccountMembershipsIncluded, AccountMembershipsIncludedAccounts, AccountMembershipsOnAccountMember, AccountMembershipsResponse, AccountTag, AccountTagBase, AccountTagFilter, AccountTagMeta, AccountTagsEndpoint, AccountTokenBase, AccountUpdateBody, Action, ActionCondition, ActionLimitation, Address, AddressBase, AdyenPayment, AndCondition, AnonymizeOrder, AnonymizeOrderResponse, ApplicationKey, ApplicationKeyBase, ApplicationKeyResponse, ApplicationKeysEndpoint, Attribute, Attributes, AttributesMeta, AuthenticateResponseBody, AuthenticationRealmEndpoint, AuthenticationSettings, AuthenticationSettingsBase, AuthenticationSettingsEndpoint, AuthorizeNetPayment, AuthorizePaymentMethod, BraintreePayment, Brand, BrandBase, BrandEndpoint, BrandFilter, BuildChildProductsJob, BuildRules, BuilderModifier, BuiltInRolePolicy, BulkAddOptions, BulkCustomDiscountOptions, BundleDiscountSchema, BundleGiftSchema, CapturePaymentMethod, CardConnectPayment, Cart, CartAdditionalHeaders, CartCustomDiscount, CartEndpoint, CartInclude, CartIncluded, CartItem, CartItemBase, CartItemObject, CartItemsResponse, CartSettings, CartShippingGroupBase, CartTaxItemObject, Catalog, CatalogBase, CatalogFilter, CatalogReleaseProductFilter, CatalogReleaseProductFilterAttributes, CatalogUpdateBody, CatalogsEndpoint, CatalogsNodesEndpoint, CatalogsProductVariation, CatalogsProductsEndpoint, CatalogsReleasesEndpoint, CatalogsRulesEndpoint, Category, CategoryBase, CategoryEndpoint, CategoryFilter, CheckoutCustomer, CheckoutCustomerObject, Collection, CollectionBase, CollectionEndpoint, CollectionFilter, Condition, Conditions, Config, ConfigOptions, ConfirmPaymentBody, ConfirmPaymentBodyWithOptions, ConfirmPaymentResponse, CreateCartObject, CreateChildrenSortOrderBody, CreateCustomRelationshipBody, CreateLocationBody, CrudQueryableResource, Currency, CurrencyAmount, CurrencyBase, CurrencyEndpoint, CurrencyPercentage, CustomApi, CustomApiBase, CustomApiField, CustomApiFieldBase, CustomApiRolePoliciesEndpoint, CustomApiRolePolicy, CustomApiRolePolicyBase, CustomApiRolePolicyRequestBody, CustomApisEndpoint, CustomAuthenticatorResponseBody, CustomDiscount, CustomDiscountResponse, CustomFieldValidation, CustomInputs, CustomInputsValidationRules, CustomRelationship, CustomRelationshipBase, CustomRelationshipBaseAttributes, CustomRelationshipEntry, CustomRelationshipsEndpoint, CustomRelationshipsFilter, CustomRelationshipsListResponse, Customer, CustomerAddress, CustomerAddressBase, CustomerAddressEdit, CustomerAddressesEndpoint, CustomerBase, CustomerFilter, CustomerInclude, CustomerToken, CustomersEndpoint, CyberSourcePayment, DataEntriesEndpoint, DataEntryRecord, DeletePromotionCodesBodyItem, DeleteRulePromotionCodes, DuplicateHierarchyBody, DuplicateHierarchyJob, ElasticPath, ElasticPathStripePayment, ErasureRequestRecord, ErasureRequestsEndpoint, Exclude$1 as Exclude, Extensions, Field, FieldBase, FieldsEndpoint, File, FileBase, FileEndpoint, FileFilter, FileHref, FixedDiscountSchema, Flow, FlowBase, FlowEndpoint, FlowFilter, FormattedPrice, Gateway, GatewayBase, GatewaysEndpoint, GeolocationDetails, GrantType, HierarchiesEndpoint, HierarchiesShopperCatalogEndpoint, Hierarchy, HierarchyBase, HierarchyFilter, HttpVerbs, Identifiable, Integration, IntegrationBase, IntegrationEndpoint, IntegrationFilter, IntegrationJob, IntegrationLog, IntegrationLogMeta, IntegrationLogsResponse, Inventory, InventoryActionTypes, InventoryBase, InventoryEndpoint, InventoryResourceType, InventoryResponse, InvoicingResult, ItemFixedDiscountSchema, ItemPercentDiscountSchema, ItemTaxObject, ItemTaxObjectResponse, Job, JobBase, JobEndpoint, LocalStorageFactory, Locales, Location, LocationAttributes, LocationBase, LocationCreateQuantity, LocationMeta, LocationQuantities, LocationUpdateQuantity, LocationsEndpoint, LogIntegration, ManualPayment, MatrixObject, MemoryStorageFactory, MerchantRealmMappings, MerchantRealmMappingsEndpoint, MergeCartOptions, MetricsBase, MetricsEndpoint, MetricsQuery, Modifier, ModifierResponse, ModifierType, ModifierTypeObj, MultiLocationInventoriesEndpoint, MultiLocationInventoryFilter, MultiLocationInventoryResponse, Node, NodeBase, NodeBaseResponse, NodeFilter, NodeProduct, NodeProductResponse, NodeRelationship, NodeRelationshipBase, NodeRelationshipParent, NodeRelationshipsEndpoint, NodesEndpoint, NodesResponse, NodesShopperCatalogEndpoint, NonAssociatedProductEntry, OidcProfileEndpoint, OnboardingLinkResponse, OneTimePasswordTokenRequestBody, OneTimePasswordTokenRequestEndpoint, Option, OptionResponse, Order, OrderAddressBase, OrderBase, OrderBillingAddress, OrderFilter, OrderInclude, OrderIncluded, OrderItem, OrderItemBase, OrderResponse, OrderShippingAddress, OrderSort, OrderSortAscend, OrderSortDescend, OrdersEndpoint, PCMVariation, PCMVariationBase, PCMVariationMetaOption, PCMVariationOption, PCMVariationOptionBase, PCMVariationsEndpoint, PartialPcmProductBase, PasswordProfile, PasswordProfileBody, PasswordProfileEndpoint, PasswordProfileListItem, PasswordProfileResponse, PayPalExpressCheckoutPayment, PaymentMethod, PaymentRequestBody, PcmCustomRelationshipEndpoint, PcmFileRelationship, PcmFileRelationshipEndpoint, PcmJob, PcmJobBase, PcmJobError, PcmJobsEndpoint, PcmMainImageRelationship, PcmMainImageRelationshipEndpoint, PcmProduct, PcmProductAttachmentBody, PcmProductAttachmentResponse, PcmProductBase, PcmProductEntry, PcmProductFilter, PcmProductInclude, PcmProductRelationships, PcmProductResponse, PcmProductUpdateBody, PcmProductsEndpoint, PcmProductsResponse, PcmTemplateRelationship, PcmTemplateRelationshipEndpoint, PcmVariationsRelationshipResource, PcmVariationsRelationships, PcmVariationsRelationshipsEndpoint, PercentDiscountSchema, PersonalDataEndpoint, PersonalDataRecord, Presentation, Price, PriceBook, PriceBookBase, PriceBookFilter, PriceBookPrice, PriceBookPriceBase, PriceBookPriceModifier, PriceBookPriceModifierBase, PriceBookPriceModifierEndpoint, PriceBookPricesCreateBody, PriceBookPricesEndpoint, PriceBookPricesUpdateBody, PriceBooksEndpoint, PriceBooksUpdateBody, PricesFilter, Product, ProductAssociationResponse, ProductBase, ProductComponentOption, ProductComponents, ProductFileRelationshipResource, ProductFilter, ProductResponse, ProductTemplateRelationshipResource, ProductsEndpoint, Profile, ProfileBase, ProfileCreateUpdateBody, ProfileListItem, ProfileResponse, ProfileResponseBody, Promotion, PromotionAttribute, PromotionAttributeValues, PromotionBase, PromotionCode, PromotionCodesJob, PromotionFilter, PromotionJob, PromotionMeta, PromotionSettings, PromotionsEndpoint, PurchasePaymentMethod, QueryableResource, Realm, RealmBase, RealmCreateBody, RealmUpdateBody, RefundPaymentMethod, Relationship, RelationshipToMany, RelationshipToOne, ReleaseBase, ReleaseBodyBase, ReleaseResponse, RequestFactory, Requirements, Resource, ResourceIncluded, ResourceList, ResourcePage, Rule, RuleBase, RuleFilter, RulePromotion, RulePromotionBase, RulePromotionCode, RulePromotionCodesJob, RulePromotionFilter, RulePromotionJob, RulePromotionMeta, RulePromotionsEndpoint, RuleUpdateBody, Settings, SettingsEndpoint, ShippingGroupBase, ShippingGroupResponse, ShippingIncluded, ShopperCatalogEndpoint, ShopperCatalogProductsEndpoint, ShopperCatalogReleaseBase, ShopperCatalogResource, ShopperCatalogResourceList, ShopperCatalogResourcePage, SimpleResourcePageResponse, StockAttributes, StockCreate, StockLocationsMap, StockResponse, StockUpdate, StorageFactory, StripeConnectPayment, StripeIntentsPayment, StripePayment, StripePaymentBase, StripePaymentOptionBase, Subscription, SubscriptionBase, SubscriptionCreate, SubscriptionDunningRules, SubscriptionDunningRulesBase, SubscriptionDunningRulesCreate, SubscriptionDunningRulesEndpoint, SubscriptionDunningRulesUpdate, SubscriptionFilter, SubscriptionInvoice, SubscriptionInvoiceBase, SubscriptionInvoiceFilter, SubscriptionInvoicePayment, SubscriptionInvoicePaymentBase, SubscriptionInvoicesEndpoint, SubscriptionJob, SubscriptionJobBase, SubscriptionJobCreate, SubscriptionJobsEndpoint, SubscriptionOffering, SubscriptionOfferingAttachPlanBody, SubscriptionOfferingAttachProductBody, SubscriptionOfferingAttachProrationPolicyBody, SubscriptionOfferingBase, SubscriptionOfferingBuildBody, SubscriptionOfferingBuildProduct, SubscriptionOfferingCreate, SubscriptionOfferingFilter, SubscriptionOfferingPlan, SubscriptionOfferingProduct, SubscriptionOfferingRelationships, SubscriptionOfferingUpdate, SubscriptionOfferingsEndpoint, SubscriptionPlan, SubscriptionPlanBase, SubscriptionPlanCreate, SubscriptionPlanUpdate, SubscriptionPlansEndpoint, SubscriptionProduct, SubscriptionProductBase, SubscriptionProductCreate, SubscriptionProductUpdate, SubscriptionProductsEndpoint, SubscriptionProrationPoliciesEndpoint, SubscriptionProrationPolicy, SubscriptionProrationPolicyBase, SubscriptionProrationPolicyCreate, SubscriptionProrationPolicyUpdate, SubscriptionSchedule, SubscriptionScheduleBase, SubscriptionScheduleCreate, SubscriptionScheduleUpdate, SubscriptionSchedulesEndpoint, SubscriptionSettings, SubscriptionSubscriber, SubscriptionSubscriberBase, SubscriptionSubscriberCreate, SubscriptionSubscriberUpdate, SubscriptionSubscribersEndpoint, SubscriptionUpdate, SubscriptionsEndpoint, SubscriptionsInclude, SubscriptionsIncluded, SubscriptionsStateAction, Subset, TargetCondition, Timestamps, Transaction, TransactionBase, TransactionEndpoint, TransactionsResponse, TtlSettings, UpdateCustomRelationshipBody, UpdateLocationBody, UpdateNodeBody, UpdateVariationBody, UpdateVariationOptionBody, UserAuthenticationInfo, UserAuthenticationInfoBody, UserAuthenticationInfoEndpoint, UserAuthenticationInfoFilter, UserAuthenticationInfoResponse, UserAuthenticationPasswordProfile, UserAuthenticationPasswordProfileBody, UserAuthenticationPasswordProfileEndpoint, UserAuthenticationPasswordProfileResponse, UserAuthenticationPasswordProfileUpdateBody, Validation, Variation, VariationBase, VariationsBuilderModifier, VariationsEndpoint, VariationsModifier, VariationsModifierResponse, VariationsModifierType, VariationsModifierTypeObj, XforAmountSchema, XforYSchema, createJob, elasticpath, gateway };
|
package/dist/index.esm.js
CHANGED
|
@@ -519,7 +519,7 @@ if (!globalThis.fetch) {
|
|
|
519
519
|
globalThis.Response = Response;
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
var version = "
|
|
522
|
+
var version = "28.0.0";
|
|
523
523
|
|
|
524
524
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
525
525
|
function LocalStorageFactory() {
|
|
@@ -739,6 +739,7 @@ function formatQueryString(key, value) {
|
|
|
739
739
|
return "".concat(key, "=").concat(value);
|
|
740
740
|
}
|
|
741
741
|
|
|
742
|
+
var _excluded$1 = ["includes", "sort", "limit", "offset", "filter", "useTemplateSlugs", "total_method"];
|
|
742
743
|
function buildRelationshipData(type, ids) {
|
|
743
744
|
var typeModifier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : underscore;
|
|
744
745
|
var data = [];
|
|
@@ -808,14 +809,15 @@ function parseJSON(response) {
|
|
|
808
809
|
});
|
|
809
810
|
});
|
|
810
811
|
}
|
|
811
|
-
function buildQueryParams(
|
|
812
|
-
var includes =
|
|
813
|
-
sort =
|
|
814
|
-
limit =
|
|
815
|
-
offset =
|
|
816
|
-
filter =
|
|
817
|
-
useTemplateSlugs =
|
|
818
|
-
total_method =
|
|
812
|
+
function buildQueryParams(params) {
|
|
813
|
+
var includes = params.includes,
|
|
814
|
+
sort = params.sort,
|
|
815
|
+
limit = params.limit,
|
|
816
|
+
offset = params.offset,
|
|
817
|
+
filter = params.filter,
|
|
818
|
+
useTemplateSlugs = params.useTemplateSlugs,
|
|
819
|
+
total_method = params.total_method,
|
|
820
|
+
additionalParams = _objectWithoutProperties(params, _excluded$1);
|
|
819
821
|
var query = {};
|
|
820
822
|
if (includes) {
|
|
821
823
|
query.include = includes;
|
|
@@ -838,6 +840,13 @@ function buildQueryParams(_ref) {
|
|
|
838
840
|
if (total_method) {
|
|
839
841
|
query.total_method = total_method;
|
|
840
842
|
}
|
|
843
|
+
|
|
844
|
+
// Add any additional parameters with URI encoding
|
|
845
|
+
Object.keys(additionalParams).forEach(function (key) {
|
|
846
|
+
if (additionalParams[key] !== undefined && additionalParams[key] !== null) {
|
|
847
|
+
query[key] = additionalParams[key];
|
|
848
|
+
}
|
|
849
|
+
});
|
|
841
850
|
return Object.keys(query).map(function (k) {
|
|
842
851
|
return formatQueryString(k, query[k]);
|
|
843
852
|
}).join('&');
|
|
@@ -848,9 +857,15 @@ function formatQueryParams(query) {
|
|
|
848
857
|
}).join('&');
|
|
849
858
|
}
|
|
850
859
|
function buildURL(endpoint, params) {
|
|
851
|
-
|
|
860
|
+
// Check if any params are provided
|
|
861
|
+
var hasParams = Object.keys(params).some(function (key) {
|
|
862
|
+
return params[key] !== undefined && params[key] !== null;
|
|
863
|
+
});
|
|
864
|
+
if (hasParams) {
|
|
852
865
|
var paramsString = buildQueryParams(params);
|
|
853
|
-
|
|
866
|
+
if (paramsString) {
|
|
867
|
+
return "".concat(endpoint, "?").concat(paramsString);
|
|
868
|
+
}
|
|
854
869
|
}
|
|
855
870
|
return endpoint;
|
|
856
871
|
}
|
|
@@ -925,11 +940,11 @@ function getCredentials(storage, storageKey) {
|
|
|
925
940
|
function resolveCredentialsStorageKey(name) {
|
|
926
941
|
return name ? "".concat(name, "_ep_credentials") : DEFAULT_CREDENTIALS_KEY;
|
|
927
942
|
}
|
|
928
|
-
function tokenInvalid(
|
|
929
|
-
var storage =
|
|
930
|
-
client_id =
|
|
931
|
-
reauth =
|
|
932
|
-
name =
|
|
943
|
+
function tokenInvalid(_ref) {
|
|
944
|
+
var storage = _ref.storage,
|
|
945
|
+
client_id = _ref.client_id,
|
|
946
|
+
reauth = _ref.reauth,
|
|
947
|
+
name = _ref.name;
|
|
933
948
|
var credentials = getCredentials(storage, resolveCredentialsStorageKey(name));
|
|
934
949
|
var handleInvalid = function handleInvalid(message) {
|
|
935
950
|
/* eslint-disable no-console */
|
|
@@ -3651,6 +3666,41 @@ var HierarchiesEndpoint = /*#__PURE__*/function (_CRUDExtend) {
|
|
|
3651
3666
|
var token = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
3652
3667
|
return this.request.send("".concat(this.endpoint, "/").concat(hierarchyId, "/duplicate_job"), 'POST', body, token);
|
|
3653
3668
|
}
|
|
3669
|
+
}, {
|
|
3670
|
+
key: "GetNodesByIds",
|
|
3671
|
+
value: function GetNodesByIds(nodeIds) {
|
|
3672
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
3673
|
+
if (!nodeIds || nodeIds.length === 0) {
|
|
3674
|
+
return Promise.resolve({
|
|
3675
|
+
data: [],
|
|
3676
|
+
links: {},
|
|
3677
|
+
meta: {
|
|
3678
|
+
page: {
|
|
3679
|
+
current: 1,
|
|
3680
|
+
limit: 100,
|
|
3681
|
+
offset: 0,
|
|
3682
|
+
total: 0
|
|
3683
|
+
},
|
|
3684
|
+
results: {
|
|
3685
|
+
total: 0
|
|
3686
|
+
}
|
|
3687
|
+
}
|
|
3688
|
+
});
|
|
3689
|
+
}
|
|
3690
|
+
var filter = {
|
|
3691
|
+
or: nodeIds.map(function (id) {
|
|
3692
|
+
return {
|
|
3693
|
+
eq: {
|
|
3694
|
+
id: id
|
|
3695
|
+
}
|
|
3696
|
+
};
|
|
3697
|
+
})
|
|
3698
|
+
};
|
|
3699
|
+
return this.request.send(buildURL('hierarchies/nodes', {
|
|
3700
|
+
filter: filter,
|
|
3701
|
+
include_hierarchies: true
|
|
3702
|
+
}), 'GET', undefined, token);
|
|
3703
|
+
}
|
|
3654
3704
|
}]);
|
|
3655
3705
|
return HierarchiesEndpoint;
|
|
3656
3706
|
}(CRUDExtend);
|
|
@@ -3707,14 +3757,26 @@ var AccountsEndpoint = /*#__PURE__*/function (_CRUDExtend) {
|
|
|
3707
3757
|
var headers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
3708
3758
|
var limit = this.limit,
|
|
3709
3759
|
offset = this.offset,
|
|
3710
|
-
filter = this.filter
|
|
3760
|
+
filter = this.filter,
|
|
3761
|
+
includes = this.includes;
|
|
3711
3762
|
this.call = this.request.send(buildURL(this.endpoint, {
|
|
3712
3763
|
limit: limit,
|
|
3713
3764
|
offset: offset,
|
|
3714
|
-
filter: filter
|
|
3765
|
+
filter: filter,
|
|
3766
|
+
includes: includes
|
|
3715
3767
|
}), 'GET', undefined, token, this, headers);
|
|
3716
3768
|
return this.call;
|
|
3717
3769
|
}
|
|
3770
|
+
}, {
|
|
3771
|
+
key: "AddAccountTags",
|
|
3772
|
+
value: function AddAccountTags(accountId, requestBody) {
|
|
3773
|
+
return this.request.send("".concat(this.endpoint, "/").concat(accountId, "/relationships/account-tags"), 'POST', requestBody);
|
|
3774
|
+
}
|
|
3775
|
+
}, {
|
|
3776
|
+
key: "DeleteAccountTags",
|
|
3777
|
+
value: function DeleteAccountTags(accountId, requestBody) {
|
|
3778
|
+
return this.request.send("".concat(this.endpoint, "/").concat(accountId, "/relationships/account-tags"), 'DELETE', requestBody);
|
|
3779
|
+
}
|
|
3718
3780
|
}]);
|
|
3719
3781
|
return AccountsEndpoint;
|
|
3720
3782
|
}(CRUDExtend);
|
|
@@ -4932,6 +4994,55 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4932
4994
|
return MultiLocationInventories;
|
|
4933
4995
|
}();
|
|
4934
4996
|
|
|
4997
|
+
var AccountTagsEndpoint = /*#__PURE__*/function (_BaseExtend) {
|
|
4998
|
+
_inherits(AccountTagsEndpoint, _BaseExtend);
|
|
4999
|
+
var _super = _createSuper(AccountTagsEndpoint);
|
|
5000
|
+
function AccountTagsEndpoint() {
|
|
5001
|
+
_classCallCheck(this, AccountTagsEndpoint);
|
|
5002
|
+
return _super.apply(this, arguments);
|
|
5003
|
+
}
|
|
5004
|
+
_createClass(AccountTagsEndpoint, [{
|
|
5005
|
+
key: "Create",
|
|
5006
|
+
value: function Create(body) {
|
|
5007
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
5008
|
+
return this.request.send("account-tags", 'POST', body, token, this);
|
|
5009
|
+
}
|
|
5010
|
+
}, {
|
|
5011
|
+
key: "All",
|
|
5012
|
+
value: function All() {
|
|
5013
|
+
var token = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
5014
|
+
var limit = this.limit,
|
|
5015
|
+
offset = this.offset,
|
|
5016
|
+
filter = this.filter;
|
|
5017
|
+
this.call = this.request.send(buildURL("account-tags", {
|
|
5018
|
+
limit: limit,
|
|
5019
|
+
offset: offset,
|
|
5020
|
+
filter: filter
|
|
5021
|
+
}), 'GET', undefined, token, this);
|
|
5022
|
+
return this.call;
|
|
5023
|
+
}
|
|
5024
|
+
}, {
|
|
5025
|
+
key: "Get",
|
|
5026
|
+
value: function Get(accountTagId) {
|
|
5027
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
5028
|
+
return this.request.send("account-tags/".concat(accountTagId), 'GET', undefined, token);
|
|
5029
|
+
}
|
|
5030
|
+
}, {
|
|
5031
|
+
key: "Update",
|
|
5032
|
+
value: function Update(accountTagId, body) {
|
|
5033
|
+
var token = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
5034
|
+
return this.request.send("account-tags/".concat(accountTagId), 'PUT', body, token);
|
|
5035
|
+
}
|
|
5036
|
+
}, {
|
|
5037
|
+
key: "Delete",
|
|
5038
|
+
value: function Delete(accountTagId) {
|
|
5039
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
5040
|
+
return this.request.send("account-tags/".concat(accountTagId), 'DELETE', undefined, token);
|
|
5041
|
+
}
|
|
5042
|
+
}]);
|
|
5043
|
+
return AccountTagsEndpoint;
|
|
5044
|
+
}(BaseExtend);
|
|
5045
|
+
|
|
4935
5046
|
var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
|
|
4936
5047
|
_inherits(Nodes, _CRUDExtend);
|
|
4937
5048
|
var _super = _createSuper(Nodes);
|
|
@@ -5892,6 +6003,7 @@ var ElasticPath = /*#__PURE__*/function () {
|
|
|
5892
6003
|
this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
|
|
5893
6004
|
this.CustomRelationships = new CustomRelationshipsEndpoint(config);
|
|
5894
6005
|
this.MultiLocationInventories = new MultiLocationInventories(config);
|
|
6006
|
+
this.AccountTags = new AccountTagsEndpoint(config);
|
|
5895
6007
|
}
|
|
5896
6008
|
|
|
5897
6009
|
// Expose `Cart` class on ElasticPath class
|
package/dist/index.js
CHANGED
|
@@ -1085,7 +1085,7 @@
|
|
|
1085
1085
|
globalThis.Response = browserPonyfill.exports.Response;
|
|
1086
1086
|
}
|
|
1087
1087
|
|
|
1088
|
-
var version = "
|
|
1088
|
+
var version = "28.0.0";
|
|
1089
1089
|
|
|
1090
1090
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
1091
1091
|
function LocalStorageFactory() {
|
|
@@ -1907,6 +1907,7 @@
|
|
|
1907
1907
|
return "".concat(key, "=").concat(value);
|
|
1908
1908
|
}
|
|
1909
1909
|
|
|
1910
|
+
var _excluded$1 = ["includes", "sort", "limit", "offset", "filter", "useTemplateSlugs", "total_method"];
|
|
1910
1911
|
function buildRelationshipData(type, ids) {
|
|
1911
1912
|
var typeModifier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : underscore;
|
|
1912
1913
|
var data = [];
|
|
@@ -1976,14 +1977,15 @@
|
|
|
1976
1977
|
});
|
|
1977
1978
|
});
|
|
1978
1979
|
}
|
|
1979
|
-
function buildQueryParams(
|
|
1980
|
-
var includes =
|
|
1981
|
-
sort =
|
|
1982
|
-
limit =
|
|
1983
|
-
offset =
|
|
1984
|
-
filter =
|
|
1985
|
-
useTemplateSlugs =
|
|
1986
|
-
total_method =
|
|
1980
|
+
function buildQueryParams(params) {
|
|
1981
|
+
var includes = params.includes,
|
|
1982
|
+
sort = params.sort,
|
|
1983
|
+
limit = params.limit,
|
|
1984
|
+
offset = params.offset,
|
|
1985
|
+
filter = params.filter,
|
|
1986
|
+
useTemplateSlugs = params.useTemplateSlugs,
|
|
1987
|
+
total_method = params.total_method,
|
|
1988
|
+
additionalParams = _objectWithoutProperties(params, _excluded$1);
|
|
1987
1989
|
var query = {};
|
|
1988
1990
|
if (includes) {
|
|
1989
1991
|
query.include = includes;
|
|
@@ -2006,6 +2008,13 @@
|
|
|
2006
2008
|
if (total_method) {
|
|
2007
2009
|
query.total_method = total_method;
|
|
2008
2010
|
}
|
|
2011
|
+
|
|
2012
|
+
// Add any additional parameters with URI encoding
|
|
2013
|
+
Object.keys(additionalParams).forEach(function (key) {
|
|
2014
|
+
if (additionalParams[key] !== undefined && additionalParams[key] !== null) {
|
|
2015
|
+
query[key] = additionalParams[key];
|
|
2016
|
+
}
|
|
2017
|
+
});
|
|
2009
2018
|
return Object.keys(query).map(function (k) {
|
|
2010
2019
|
return formatQueryString(k, query[k]);
|
|
2011
2020
|
}).join('&');
|
|
@@ -2016,9 +2025,15 @@
|
|
|
2016
2025
|
}).join('&');
|
|
2017
2026
|
}
|
|
2018
2027
|
function buildURL(endpoint, params) {
|
|
2019
|
-
|
|
2028
|
+
// Check if any params are provided
|
|
2029
|
+
var hasParams = Object.keys(params).some(function (key) {
|
|
2030
|
+
return params[key] !== undefined && params[key] !== null;
|
|
2031
|
+
});
|
|
2032
|
+
if (hasParams) {
|
|
2020
2033
|
var paramsString = buildQueryParams(params);
|
|
2021
|
-
|
|
2034
|
+
if (paramsString) {
|
|
2035
|
+
return "".concat(endpoint, "?").concat(paramsString);
|
|
2036
|
+
}
|
|
2022
2037
|
}
|
|
2023
2038
|
return endpoint;
|
|
2024
2039
|
}
|
|
@@ -2093,11 +2108,11 @@
|
|
|
2093
2108
|
function resolveCredentialsStorageKey(name) {
|
|
2094
2109
|
return name ? "".concat(name, "_ep_credentials") : DEFAULT_CREDENTIALS_KEY;
|
|
2095
2110
|
}
|
|
2096
|
-
function tokenInvalid(
|
|
2097
|
-
var storage =
|
|
2098
|
-
client_id =
|
|
2099
|
-
reauth =
|
|
2100
|
-
name =
|
|
2111
|
+
function tokenInvalid(_ref) {
|
|
2112
|
+
var storage = _ref.storage,
|
|
2113
|
+
client_id = _ref.client_id,
|
|
2114
|
+
reauth = _ref.reauth,
|
|
2115
|
+
name = _ref.name;
|
|
2101
2116
|
var credentials = getCredentials(storage, resolveCredentialsStorageKey(name));
|
|
2102
2117
|
var handleInvalid = function handleInvalid(message) {
|
|
2103
2118
|
/* eslint-disable no-console */
|
|
@@ -4823,6 +4838,41 @@
|
|
|
4823
4838
|
var token = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
4824
4839
|
return this.request.send("".concat(this.endpoint, "/").concat(hierarchyId, "/duplicate_job"), 'POST', body, token);
|
|
4825
4840
|
}
|
|
4841
|
+
}, {
|
|
4842
|
+
key: "GetNodesByIds",
|
|
4843
|
+
value: function GetNodesByIds(nodeIds) {
|
|
4844
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
4845
|
+
if (!nodeIds || nodeIds.length === 0) {
|
|
4846
|
+
return Promise.resolve({
|
|
4847
|
+
data: [],
|
|
4848
|
+
links: {},
|
|
4849
|
+
meta: {
|
|
4850
|
+
page: {
|
|
4851
|
+
current: 1,
|
|
4852
|
+
limit: 100,
|
|
4853
|
+
offset: 0,
|
|
4854
|
+
total: 0
|
|
4855
|
+
},
|
|
4856
|
+
results: {
|
|
4857
|
+
total: 0
|
|
4858
|
+
}
|
|
4859
|
+
}
|
|
4860
|
+
});
|
|
4861
|
+
}
|
|
4862
|
+
var filter = {
|
|
4863
|
+
or: nodeIds.map(function (id) {
|
|
4864
|
+
return {
|
|
4865
|
+
eq: {
|
|
4866
|
+
id: id
|
|
4867
|
+
}
|
|
4868
|
+
};
|
|
4869
|
+
})
|
|
4870
|
+
};
|
|
4871
|
+
return this.request.send(buildURL('hierarchies/nodes', {
|
|
4872
|
+
filter: filter,
|
|
4873
|
+
include_hierarchies: true
|
|
4874
|
+
}), 'GET', undefined, token);
|
|
4875
|
+
}
|
|
4826
4876
|
}]);
|
|
4827
4877
|
return HierarchiesEndpoint;
|
|
4828
4878
|
}(CRUDExtend);
|
|
@@ -4879,14 +4929,26 @@
|
|
|
4879
4929
|
var headers = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
4880
4930
|
var limit = this.limit,
|
|
4881
4931
|
offset = this.offset,
|
|
4882
|
-
filter = this.filter
|
|
4932
|
+
filter = this.filter,
|
|
4933
|
+
includes = this.includes;
|
|
4883
4934
|
this.call = this.request.send(buildURL(this.endpoint, {
|
|
4884
4935
|
limit: limit,
|
|
4885
4936
|
offset: offset,
|
|
4886
|
-
filter: filter
|
|
4937
|
+
filter: filter,
|
|
4938
|
+
includes: includes
|
|
4887
4939
|
}), 'GET', undefined, token, this, headers);
|
|
4888
4940
|
return this.call;
|
|
4889
4941
|
}
|
|
4942
|
+
}, {
|
|
4943
|
+
key: "AddAccountTags",
|
|
4944
|
+
value: function AddAccountTags(accountId, requestBody) {
|
|
4945
|
+
return this.request.send("".concat(this.endpoint, "/").concat(accountId, "/relationships/account-tags"), 'POST', requestBody);
|
|
4946
|
+
}
|
|
4947
|
+
}, {
|
|
4948
|
+
key: "DeleteAccountTags",
|
|
4949
|
+
value: function DeleteAccountTags(accountId, requestBody) {
|
|
4950
|
+
return this.request.send("".concat(this.endpoint, "/").concat(accountId, "/relationships/account-tags"), 'DELETE', requestBody);
|
|
4951
|
+
}
|
|
4890
4952
|
}]);
|
|
4891
4953
|
return AccountsEndpoint;
|
|
4892
4954
|
}(CRUDExtend);
|
|
@@ -6104,6 +6166,55 @@
|
|
|
6104
6166
|
return MultiLocationInventories;
|
|
6105
6167
|
}();
|
|
6106
6168
|
|
|
6169
|
+
var AccountTagsEndpoint = /*#__PURE__*/function (_BaseExtend) {
|
|
6170
|
+
_inherits(AccountTagsEndpoint, _BaseExtend);
|
|
6171
|
+
var _super = _createSuper(AccountTagsEndpoint);
|
|
6172
|
+
function AccountTagsEndpoint() {
|
|
6173
|
+
_classCallCheck(this, AccountTagsEndpoint);
|
|
6174
|
+
return _super.apply(this, arguments);
|
|
6175
|
+
}
|
|
6176
|
+
_createClass(AccountTagsEndpoint, [{
|
|
6177
|
+
key: "Create",
|
|
6178
|
+
value: function Create(body) {
|
|
6179
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
6180
|
+
return this.request.send("account-tags", 'POST', body, token, this);
|
|
6181
|
+
}
|
|
6182
|
+
}, {
|
|
6183
|
+
key: "All",
|
|
6184
|
+
value: function All() {
|
|
6185
|
+
var token = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
|
|
6186
|
+
var limit = this.limit,
|
|
6187
|
+
offset = this.offset,
|
|
6188
|
+
filter = this.filter;
|
|
6189
|
+
this.call = this.request.send(buildURL("account-tags", {
|
|
6190
|
+
limit: limit,
|
|
6191
|
+
offset: offset,
|
|
6192
|
+
filter: filter
|
|
6193
|
+
}), 'GET', undefined, token, this);
|
|
6194
|
+
return this.call;
|
|
6195
|
+
}
|
|
6196
|
+
}, {
|
|
6197
|
+
key: "Get",
|
|
6198
|
+
value: function Get(accountTagId) {
|
|
6199
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
6200
|
+
return this.request.send("account-tags/".concat(accountTagId), 'GET', undefined, token);
|
|
6201
|
+
}
|
|
6202
|
+
}, {
|
|
6203
|
+
key: "Update",
|
|
6204
|
+
value: function Update(accountTagId, body) {
|
|
6205
|
+
var token = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
6206
|
+
return this.request.send("account-tags/".concat(accountTagId), 'PUT', body, token);
|
|
6207
|
+
}
|
|
6208
|
+
}, {
|
|
6209
|
+
key: "Delete",
|
|
6210
|
+
value: function Delete(accountTagId) {
|
|
6211
|
+
var token = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
6212
|
+
return this.request.send("account-tags/".concat(accountTagId), 'DELETE', undefined, token);
|
|
6213
|
+
}
|
|
6214
|
+
}]);
|
|
6215
|
+
return AccountTagsEndpoint;
|
|
6216
|
+
}(BaseExtend);
|
|
6217
|
+
|
|
6107
6218
|
var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
|
|
6108
6219
|
_inherits(Nodes, _CRUDExtend);
|
|
6109
6220
|
var _super = _createSuper(Nodes);
|
|
@@ -7064,6 +7175,7 @@
|
|
|
7064
7175
|
this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
|
|
7065
7176
|
this.CustomRelationships = new CustomRelationshipsEndpoint(config);
|
|
7066
7177
|
this.MultiLocationInventories = new MultiLocationInventories(config);
|
|
7178
|
+
this.AccountTags = new AccountTagsEndpoint(config);
|
|
7067
7179
|
}
|
|
7068
7180
|
|
|
7069
7181
|
// Expose `Cart` class on ElasticPath class
|
package/package.json
CHANGED