@elasticpath/js-sdk 10.0.0 → 10.2.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 +119 -1
- package/dist/index.d.ts +197 -6
- package/dist/index.esm.js +119 -1
- package/dist/index.js +119 -1
- 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 = "10.
|
|
533
|
+
var version = "10.2.0";
|
|
534
534
|
|
|
535
535
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
536
536
|
function LocalStorageFactory() {
|
|
@@ -4631,6 +4631,123 @@ var CustomRelationshipsEndpoint = /*#__PURE__*/function () {
|
|
|
4631
4631
|
return CustomRelationshipsEndpoint;
|
|
4632
4632
|
}();
|
|
4633
4633
|
|
|
4634
|
+
var InventoryLocationsEndpoint = /*#__PURE__*/function () {
|
|
4635
|
+
function InventoryLocationsEndpoint(endpoint) {
|
|
4636
|
+
_classCallCheck(this, InventoryLocationsEndpoint);
|
|
4637
|
+
this.request = new RequestFactory(endpoint);
|
|
4638
|
+
this.endpoint = 'inventories/locations';
|
|
4639
|
+
}
|
|
4640
|
+
_createClass(InventoryLocationsEndpoint, [{
|
|
4641
|
+
key: "All",
|
|
4642
|
+
value: function All() {
|
|
4643
|
+
var filter = this.filter,
|
|
4644
|
+
limit = this.limit,
|
|
4645
|
+
offset = this.offset;
|
|
4646
|
+
return this.request.send(buildURL(this.endpoint, {
|
|
4647
|
+
filter: filter,
|
|
4648
|
+
limit: limit,
|
|
4649
|
+
offset: offset
|
|
4650
|
+
}), 'GET');
|
|
4651
|
+
}
|
|
4652
|
+
}, {
|
|
4653
|
+
key: "Get",
|
|
4654
|
+
value: function Get(locationId) {
|
|
4655
|
+
return this.request.send("".concat(this.endpoint, "/").concat(locationId), 'GET');
|
|
4656
|
+
}
|
|
4657
|
+
}, {
|
|
4658
|
+
key: "Create",
|
|
4659
|
+
value: function Create(body) {
|
|
4660
|
+
return this.request.send(this.endpoint, 'POST', {
|
|
4661
|
+
type: 'inventory_location',
|
|
4662
|
+
attributes: body
|
|
4663
|
+
});
|
|
4664
|
+
}
|
|
4665
|
+
}, {
|
|
4666
|
+
key: "Update",
|
|
4667
|
+
value: function Update(locationId, body) {
|
|
4668
|
+
return this.request.send("".concat(this.endpoint, "/").concat(locationId), 'PUT', {
|
|
4669
|
+
type: 'inventory_location',
|
|
4670
|
+
attributes: body
|
|
4671
|
+
});
|
|
4672
|
+
}
|
|
4673
|
+
}, {
|
|
4674
|
+
key: "Delete",
|
|
4675
|
+
value: function Delete(locationId) {
|
|
4676
|
+
return this.request.send("".concat(this.endpoint, "/").concat(locationId), 'DELETE');
|
|
4677
|
+
}
|
|
4678
|
+
}, {
|
|
4679
|
+
key: "Limit",
|
|
4680
|
+
value: function Limit(value) {
|
|
4681
|
+
this.limit = value;
|
|
4682
|
+
return this;
|
|
4683
|
+
}
|
|
4684
|
+
}, {
|
|
4685
|
+
key: "Offset",
|
|
4686
|
+
value: function Offset(value) {
|
|
4687
|
+
this.offset = value;
|
|
4688
|
+
return this;
|
|
4689
|
+
}
|
|
4690
|
+
}]);
|
|
4691
|
+
return InventoryLocationsEndpoint;
|
|
4692
|
+
}();
|
|
4693
|
+
|
|
4694
|
+
var MultiLocationInventories = /*#__PURE__*/function () {
|
|
4695
|
+
function MultiLocationInventories(endpoint) {
|
|
4696
|
+
_classCallCheck(this, MultiLocationInventories);
|
|
4697
|
+
var config = _objectSpread2({}, endpoint);
|
|
4698
|
+
config.headers = _objectSpread2(_objectSpread2({}, config.headers), {}, {
|
|
4699
|
+
'ep-inventories-multi-location': true
|
|
4700
|
+
});
|
|
4701
|
+
this.request = new RequestFactory(endpoint);
|
|
4702
|
+
this.Locations = new InventoryLocationsEndpoint(config);
|
|
4703
|
+
this.endpoint = 'inventories';
|
|
4704
|
+
}
|
|
4705
|
+
_createClass(MultiLocationInventories, [{
|
|
4706
|
+
key: "All",
|
|
4707
|
+
value: function All() {
|
|
4708
|
+
var filter = this.filter,
|
|
4709
|
+
limit = this.limit,
|
|
4710
|
+
offset = this.offset;
|
|
4711
|
+
return this.request.send(buildURL(this.endpoint, {
|
|
4712
|
+
filter: filter,
|
|
4713
|
+
limit: limit,
|
|
4714
|
+
offset: offset
|
|
4715
|
+
}), 'GET');
|
|
4716
|
+
}
|
|
4717
|
+
}, {
|
|
4718
|
+
key: "Get",
|
|
4719
|
+
value: function Get(productId) {
|
|
4720
|
+
return this.request.send("".concat(this.endpoint, "/").concat(productId), 'GET');
|
|
4721
|
+
}
|
|
4722
|
+
}, {
|
|
4723
|
+
key: "Create",
|
|
4724
|
+
value: function Create(body) {
|
|
4725
|
+
return this.request.send("".concat(this.endpoint, "}"), 'POST', {
|
|
4726
|
+
type: 'stock',
|
|
4727
|
+
attributes: body
|
|
4728
|
+
});
|
|
4729
|
+
}
|
|
4730
|
+
}, {
|
|
4731
|
+
key: "Delete",
|
|
4732
|
+
value: function Delete(productId) {
|
|
4733
|
+
return this.request.send("".concat(this.endpoint, "/").concat(productId), 'DELETE');
|
|
4734
|
+
}
|
|
4735
|
+
}, {
|
|
4736
|
+
key: "Limit",
|
|
4737
|
+
value: function Limit(value) {
|
|
4738
|
+
this.limit = value;
|
|
4739
|
+
return this;
|
|
4740
|
+
}
|
|
4741
|
+
}, {
|
|
4742
|
+
key: "Offset",
|
|
4743
|
+
value: function Offset(value) {
|
|
4744
|
+
this.offset = value;
|
|
4745
|
+
return this;
|
|
4746
|
+
}
|
|
4747
|
+
}]);
|
|
4748
|
+
return MultiLocationInventories;
|
|
4749
|
+
}();
|
|
4750
|
+
|
|
4634
4751
|
var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
|
|
4635
4752
|
_inherits(Nodes, _CRUDExtend);
|
|
4636
4753
|
var _super = _createSuper(Nodes);
|
|
@@ -5522,6 +5639,7 @@ var ElasticPath = /*#__PURE__*/function () {
|
|
|
5522
5639
|
this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
|
|
5523
5640
|
this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
|
|
5524
5641
|
this.CustomRelationships = new CustomRelationshipsEndpoint(config);
|
|
5642
|
+
this.MultiLocationInventories = new MultiLocationInventories(config);
|
|
5525
5643
|
}
|
|
5526
5644
|
|
|
5527
5645
|
// Expose `Cart` class on ElasticPath class
|
package/dist/index.d.ts
CHANGED
|
@@ -8247,6 +8247,7 @@ interface CustomApiBase {
|
|
|
8247
8247
|
api_type: string
|
|
8248
8248
|
type: string
|
|
8249
8249
|
slug: string
|
|
8250
|
+
allow_upserts: boolean
|
|
8250
8251
|
}
|
|
8251
8252
|
|
|
8252
8253
|
interface CustomApi extends Identifiable, CustomApiBase {
|
|
@@ -8262,10 +8263,35 @@ interface CustomApi extends Identifiable, CustomApiBase {
|
|
|
8262
8263
|
}
|
|
8263
8264
|
|
|
8264
8265
|
type CustomFieldValidation =
|
|
8265
|
-
| { string: {
|
|
8266
|
-
|
|
8267
|
-
|
|
8268
|
-
|
|
8266
|
+
| { string: {
|
|
8267
|
+
min_length?: number | null,
|
|
8268
|
+
max_length?: number | null,
|
|
8269
|
+
regex?: string | null,
|
|
8270
|
+
allow_null_values?: boolean,
|
|
8271
|
+
immutable?: boolean,
|
|
8272
|
+
unique: "yes" | "no",
|
|
8273
|
+
unique_case_insensitivity?: boolean
|
|
8274
|
+
}
|
|
8275
|
+
}
|
|
8276
|
+
| { integer: {
|
|
8277
|
+
min_value?: number | null,
|
|
8278
|
+
max_value?: number | null,
|
|
8279
|
+
allow_null_values?: boolean,
|
|
8280
|
+
immutable?: boolean
|
|
8281
|
+
}
|
|
8282
|
+
}
|
|
8283
|
+
| { float: {
|
|
8284
|
+
min_value?: number | null,
|
|
8285
|
+
max_value?: number | null,
|
|
8286
|
+
allow_null_values?: boolean,
|
|
8287
|
+
immutable?: boolean
|
|
8288
|
+
}
|
|
8289
|
+
}
|
|
8290
|
+
| { boolean: {
|
|
8291
|
+
allow_null_values?: boolean,
|
|
8292
|
+
immutable?: boolean
|
|
8293
|
+
}
|
|
8294
|
+
}
|
|
8269
8295
|
|
|
8270
8296
|
interface CustomApiFieldBase {
|
|
8271
8297
|
name: string
|
|
@@ -8273,7 +8299,8 @@ interface CustomApiFieldBase {
|
|
|
8273
8299
|
field_type: string
|
|
8274
8300
|
type: string
|
|
8275
8301
|
slug: string
|
|
8276
|
-
validation?: CustomFieldValidation
|
|
8302
|
+
validation?: CustomFieldValidation,
|
|
8303
|
+
use_as_url_slug: boolean
|
|
8277
8304
|
}
|
|
8278
8305
|
|
|
8279
8306
|
interface CustomApiField extends Identifiable, CustomApiFieldBase {
|
|
@@ -8454,6 +8481,169 @@ interface SubscriptionProrationPoliciesEndpoint
|
|
|
8454
8481
|
endpoint: 'proration-policies'
|
|
8455
8482
|
}
|
|
8456
8483
|
|
|
8484
|
+
/**
|
|
8485
|
+
* Inventory Locations
|
|
8486
|
+
*/
|
|
8487
|
+
|
|
8488
|
+
|
|
8489
|
+
type InventoryLocationType = 'inventory_location'
|
|
8490
|
+
|
|
8491
|
+
interface GeolocationDetails {
|
|
8492
|
+
lat: number
|
|
8493
|
+
lon: number
|
|
8494
|
+
}
|
|
8495
|
+
interface LocationAttributes {
|
|
8496
|
+
name: string
|
|
8497
|
+
external_ref?: string
|
|
8498
|
+
description?: string
|
|
8499
|
+
address: string[]
|
|
8500
|
+
geolocation: GeolocationDetails
|
|
8501
|
+
}
|
|
8502
|
+
interface LocationMeta {
|
|
8503
|
+
timestamps: {
|
|
8504
|
+
created_at: string
|
|
8505
|
+
updated_at: string
|
|
8506
|
+
}
|
|
8507
|
+
}
|
|
8508
|
+
|
|
8509
|
+
/**
|
|
8510
|
+
* Core Location Base Interface
|
|
8511
|
+
*/
|
|
8512
|
+
interface LocationBase {
|
|
8513
|
+
type: InventoryLocationType
|
|
8514
|
+
attributes: LocationAttributes
|
|
8515
|
+
meta: LocationMeta
|
|
8516
|
+
}
|
|
8517
|
+
|
|
8518
|
+
interface Location extends Identifiable, LocationBase {}
|
|
8519
|
+
|
|
8520
|
+
interface CreateLocationBody extends LocationAttributes {}
|
|
8521
|
+
|
|
8522
|
+
interface UpdateLocationBody extends Identifiable, LocationAttributes {}
|
|
8523
|
+
|
|
8524
|
+
/**
|
|
8525
|
+
* Location Endpoints
|
|
8526
|
+
*/
|
|
8527
|
+
interface LocationsEndpoint {
|
|
8528
|
+
endpoint: 'inventory/locations'
|
|
8529
|
+
|
|
8530
|
+
/**
|
|
8531
|
+
* List All Locations
|
|
8532
|
+
*/
|
|
8533
|
+
All(): Promise<ResourcePage<Location>>
|
|
8534
|
+
|
|
8535
|
+
/**
|
|
8536
|
+
* Get Location
|
|
8537
|
+
* @param locationId - The ID of the Location.
|
|
8538
|
+
*/
|
|
8539
|
+
Get(locationId: string): Promise<Resource<Location>>
|
|
8540
|
+
|
|
8541
|
+
/**
|
|
8542
|
+
* Create Location
|
|
8543
|
+
* @param body - The base attributes of the Locations
|
|
8544
|
+
*/
|
|
8545
|
+
Create(body: CreateLocationBody): Promise<Resource<Location>>
|
|
8546
|
+
|
|
8547
|
+
/**
|
|
8548
|
+
* Update Location
|
|
8549
|
+
* @param locationId - The ID of the Location.
|
|
8550
|
+
* @param body - The base attributes of the Locations.
|
|
8551
|
+
*/
|
|
8552
|
+
Update(
|
|
8553
|
+
locationId: string,
|
|
8554
|
+
body: UpdateLocationBody
|
|
8555
|
+
): Promise<Resource<Location>>
|
|
8556
|
+
|
|
8557
|
+
/**
|
|
8558
|
+
* Delete Location
|
|
8559
|
+
* @param locationId - The ID of the Location.
|
|
8560
|
+
*/
|
|
8561
|
+
Delete(locationId: string): Promise<{}>
|
|
8562
|
+
|
|
8563
|
+
Limit(value: number): LocationsEndpoint
|
|
8564
|
+
|
|
8565
|
+
Offset(value: number): LocationsEndpoint
|
|
8566
|
+
}
|
|
8567
|
+
|
|
8568
|
+
/**
|
|
8569
|
+
* Multi Location Inventory
|
|
8570
|
+
*/
|
|
8571
|
+
|
|
8572
|
+
|
|
8573
|
+
type StockType = 'stock'
|
|
8574
|
+
|
|
8575
|
+
interface StockMeta {
|
|
8576
|
+
timestamps: {
|
|
8577
|
+
created_at: string
|
|
8578
|
+
updated_at: string
|
|
8579
|
+
}
|
|
8580
|
+
}
|
|
8581
|
+
|
|
8582
|
+
interface StockBaseLocations {
|
|
8583
|
+
[key: string]: {
|
|
8584
|
+
available: number
|
|
8585
|
+
}
|
|
8586
|
+
}
|
|
8587
|
+
|
|
8588
|
+
interface StockBaseAttributes {
|
|
8589
|
+
product_id: string
|
|
8590
|
+
locations: StockBaseLocations
|
|
8591
|
+
}
|
|
8592
|
+
|
|
8593
|
+
interface StockResponseLocations {
|
|
8594
|
+
[key: string]: {
|
|
8595
|
+
available: number
|
|
8596
|
+
allocated: number
|
|
8597
|
+
total: number
|
|
8598
|
+
}
|
|
8599
|
+
}
|
|
8600
|
+
interface StockResponseAttributes extends StockBaseAttributes {
|
|
8601
|
+
allocated: number
|
|
8602
|
+
total: number
|
|
8603
|
+
locations: StockResponseLocations
|
|
8604
|
+
}
|
|
8605
|
+
|
|
8606
|
+
interface StockResponse extends Identifiable, StockMeta {
|
|
8607
|
+
type: StockType
|
|
8608
|
+
attributes: StockResponseAttributes
|
|
8609
|
+
}
|
|
8610
|
+
|
|
8611
|
+
/**
|
|
8612
|
+
* Multi Location Inventories Endpoints
|
|
8613
|
+
*/
|
|
8614
|
+
interface MultiLocationInventoriesEndpoint {
|
|
8615
|
+
endpoint: 'inventory'
|
|
8616
|
+
|
|
8617
|
+
Locations: LocationsEndpoint
|
|
8618
|
+
|
|
8619
|
+
/**
|
|
8620
|
+
* Get Stock for all Products
|
|
8621
|
+
*/
|
|
8622
|
+
All(): Promise<ResourcePage<StockResponse>>
|
|
8623
|
+
|
|
8624
|
+
/**
|
|
8625
|
+
* Get Stock for Product
|
|
8626
|
+
* @param productId The ID of the product.
|
|
8627
|
+
*/
|
|
8628
|
+
Get(productId: string): Promise<Resource<StockResponse>>
|
|
8629
|
+
|
|
8630
|
+
/**
|
|
8631
|
+
* Create Stock for Product
|
|
8632
|
+
* @param body - The base attributes of the inventory stock.
|
|
8633
|
+
*/
|
|
8634
|
+
Create(body: StockBaseAttributes): Promise<Resource<StockResponse>>
|
|
8635
|
+
|
|
8636
|
+
/**
|
|
8637
|
+
* Delete Stock for Product
|
|
8638
|
+
* @param productId The ID of the product.
|
|
8639
|
+
*/
|
|
8640
|
+
Delete(productId: string): Promise<{}>
|
|
8641
|
+
|
|
8642
|
+
Limit(value: number): MultiLocationInventoriesEndpoint
|
|
8643
|
+
|
|
8644
|
+
Offset(value: number): MultiLocationInventoriesEndpoint
|
|
8645
|
+
}
|
|
8646
|
+
|
|
8457
8647
|
// Type definitions for @elasticpath/js-sdk
|
|
8458
8648
|
|
|
8459
8649
|
|
|
@@ -8523,6 +8713,7 @@ declare class ElasticPath {
|
|
|
8523
8713
|
SubscriptionProrationPolicies: SubscriptionProrationPoliciesEndpoint
|
|
8524
8714
|
SubscriptionInvoices: SubscriptionInvoicesEndpoint
|
|
8525
8715
|
CustomRelationships: CustomRelationshipsEndpoint
|
|
8716
|
+
MultiLocationInventories: MultiLocationInventoriesEndpoint
|
|
8526
8717
|
|
|
8527
8718
|
Cart(id?: string): CartEndpoint // This optional cart id is super worrying when using the SDK in a node server :/
|
|
8528
8719
|
constructor(config: Config)
|
|
@@ -8541,4 +8732,4 @@ declare namespace elasticpath {
|
|
|
8541
8732
|
}
|
|
8542
8733
|
}
|
|
8543
8734
|
|
|
8544
|
-
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, 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, CodeFileHref, Collection, CollectionBase, CollectionEndpoint, CollectionFilter, Condition, Conditions, Config, ConfigOptions, ConfirmPaymentBody, ConfirmPaymentBodyWithOptions, ConfirmPaymentResponse, CreateCartObject, CreateChildrenSortOrderBody, CreateCustomRelationshipBody, CrudQueryableResource, Currency, CurrencyAmount, CurrencyBase, CurrencyEndpoint, CurrencyPercentage, CustomApi, CustomApiBase, CustomApiField, CustomApiFieldBase, 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, GrantType, HierarchiesEndpoint, HierarchiesShopperCatalogEndpoint, Hierarchy, HierarchyBase, HierarchyFilter, HttpVerbs, Identifiable, Integration, IntegrationBase, IntegrationEndpoint, IntegrationFilter, IntegrationJob, IntegrationLog, IntegrationLogMeta, IntegrationLogsResponse, Inventory, InventoryActionTypes, InventoryBase, InventoryEndpoint, InventoryResponse, InvoicingResult, ItemFixedDiscountSchema, ItemPercentDiscountSchema, ItemTaxObject, ItemTaxObjectResponse, Job, JobBase, JobEndpoint, LocalStorageFactory, Locales, LogIntegration, ManualPayment, MatrixObject, MemoryStorageFactory, MerchantRealmMappings, MerchantRealmMappingsEndpoint, MergeCartOptions, MetricsBase, MetricsEndpoint, MetricsQuery, Modifier, ModifierResponse, ModifierType, ModifierTypeObj, 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, PcmRelatedProductResponse, PcmTemplateRelationship, PcmTemplateRelationshipEndpoint, PcmVariationsRelationshipResource, PcmVariationsRelationships, PcmVariationsRelationshipsEndpoint, PercentDiscountSchema, PersonalDataEndpoint, PersonalDataRecord, 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, RulePromotionFilter, RulePromotionMeta, RulePromotionsEndpoint, RuleUpdateBody, Settings, SettingsEndpoint, ShippingGroupBase, ShippingGroupResponse, ShippingIncluded, ShopperCatalogEndpoint, ShopperCatalogProductsEndpoint, ShopperCatalogReleaseBase, ShopperCatalogResource, ShopperCatalogResourceList, ShopperCatalogResourcePage, 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, Transaction, TransactionBase, TransactionEndpoint, TransactionsResponse, TtlSettings, UpdateCustomRelationshipBody, 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 };
|
|
8735
|
+
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, 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, CodeFileHref, 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, 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, InventoryResponse, InvoicingResult, ItemFixedDiscountSchema, ItemPercentDiscountSchema, ItemTaxObject, ItemTaxObjectResponse, Job, JobBase, JobEndpoint, LocalStorageFactory, Locales, Location, LocationAttributes, LocationBase, LocationMeta, LocationsEndpoint, LogIntegration, ManualPayment, MatrixObject, MemoryStorageFactory, MerchantRealmMappings, MerchantRealmMappingsEndpoint, MergeCartOptions, MetricsBase, MetricsEndpoint, MetricsQuery, Modifier, ModifierResponse, ModifierType, ModifierTypeObj, MultiLocationInventoriesEndpoint, 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, PcmRelatedProductResponse, PcmTemplateRelationship, PcmTemplateRelationshipEndpoint, PcmVariationsRelationshipResource, PcmVariationsRelationships, PcmVariationsRelationshipsEndpoint, PercentDiscountSchema, PersonalDataEndpoint, PersonalDataRecord, 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, RulePromotionFilter, RulePromotionMeta, RulePromotionsEndpoint, RuleUpdateBody, Settings, SettingsEndpoint, ShippingGroupBase, ShippingGroupResponse, ShippingIncluded, ShopperCatalogEndpoint, ShopperCatalogProductsEndpoint, ShopperCatalogReleaseBase, ShopperCatalogResource, ShopperCatalogResourceList, ShopperCatalogResourcePage, StockBaseAttributes, StockBaseLocations, StockMeta, StockResponse, StockResponseAttributes, StockResponseLocations, 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, 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 = "10.
|
|
522
|
+
var version = "10.2.0";
|
|
523
523
|
|
|
524
524
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
525
525
|
function LocalStorageFactory() {
|
|
@@ -4620,6 +4620,123 @@ var CustomRelationshipsEndpoint = /*#__PURE__*/function () {
|
|
|
4620
4620
|
return CustomRelationshipsEndpoint;
|
|
4621
4621
|
}();
|
|
4622
4622
|
|
|
4623
|
+
var InventoryLocationsEndpoint = /*#__PURE__*/function () {
|
|
4624
|
+
function InventoryLocationsEndpoint(endpoint) {
|
|
4625
|
+
_classCallCheck(this, InventoryLocationsEndpoint);
|
|
4626
|
+
this.request = new RequestFactory(endpoint);
|
|
4627
|
+
this.endpoint = 'inventories/locations';
|
|
4628
|
+
}
|
|
4629
|
+
_createClass(InventoryLocationsEndpoint, [{
|
|
4630
|
+
key: "All",
|
|
4631
|
+
value: function All() {
|
|
4632
|
+
var filter = this.filter,
|
|
4633
|
+
limit = this.limit,
|
|
4634
|
+
offset = this.offset;
|
|
4635
|
+
return this.request.send(buildURL(this.endpoint, {
|
|
4636
|
+
filter: filter,
|
|
4637
|
+
limit: limit,
|
|
4638
|
+
offset: offset
|
|
4639
|
+
}), 'GET');
|
|
4640
|
+
}
|
|
4641
|
+
}, {
|
|
4642
|
+
key: "Get",
|
|
4643
|
+
value: function Get(locationId) {
|
|
4644
|
+
return this.request.send("".concat(this.endpoint, "/").concat(locationId), 'GET');
|
|
4645
|
+
}
|
|
4646
|
+
}, {
|
|
4647
|
+
key: "Create",
|
|
4648
|
+
value: function Create(body) {
|
|
4649
|
+
return this.request.send(this.endpoint, 'POST', {
|
|
4650
|
+
type: 'inventory_location',
|
|
4651
|
+
attributes: body
|
|
4652
|
+
});
|
|
4653
|
+
}
|
|
4654
|
+
}, {
|
|
4655
|
+
key: "Update",
|
|
4656
|
+
value: function Update(locationId, body) {
|
|
4657
|
+
return this.request.send("".concat(this.endpoint, "/").concat(locationId), 'PUT', {
|
|
4658
|
+
type: 'inventory_location',
|
|
4659
|
+
attributes: body
|
|
4660
|
+
});
|
|
4661
|
+
}
|
|
4662
|
+
}, {
|
|
4663
|
+
key: "Delete",
|
|
4664
|
+
value: function Delete(locationId) {
|
|
4665
|
+
return this.request.send("".concat(this.endpoint, "/").concat(locationId), 'DELETE');
|
|
4666
|
+
}
|
|
4667
|
+
}, {
|
|
4668
|
+
key: "Limit",
|
|
4669
|
+
value: function Limit(value) {
|
|
4670
|
+
this.limit = value;
|
|
4671
|
+
return this;
|
|
4672
|
+
}
|
|
4673
|
+
}, {
|
|
4674
|
+
key: "Offset",
|
|
4675
|
+
value: function Offset(value) {
|
|
4676
|
+
this.offset = value;
|
|
4677
|
+
return this;
|
|
4678
|
+
}
|
|
4679
|
+
}]);
|
|
4680
|
+
return InventoryLocationsEndpoint;
|
|
4681
|
+
}();
|
|
4682
|
+
|
|
4683
|
+
var MultiLocationInventories = /*#__PURE__*/function () {
|
|
4684
|
+
function MultiLocationInventories(endpoint) {
|
|
4685
|
+
_classCallCheck(this, MultiLocationInventories);
|
|
4686
|
+
var config = _objectSpread2({}, endpoint);
|
|
4687
|
+
config.headers = _objectSpread2(_objectSpread2({}, config.headers), {}, {
|
|
4688
|
+
'ep-inventories-multi-location': true
|
|
4689
|
+
});
|
|
4690
|
+
this.request = new RequestFactory(endpoint);
|
|
4691
|
+
this.Locations = new InventoryLocationsEndpoint(config);
|
|
4692
|
+
this.endpoint = 'inventories';
|
|
4693
|
+
}
|
|
4694
|
+
_createClass(MultiLocationInventories, [{
|
|
4695
|
+
key: "All",
|
|
4696
|
+
value: function All() {
|
|
4697
|
+
var filter = this.filter,
|
|
4698
|
+
limit = this.limit,
|
|
4699
|
+
offset = this.offset;
|
|
4700
|
+
return this.request.send(buildURL(this.endpoint, {
|
|
4701
|
+
filter: filter,
|
|
4702
|
+
limit: limit,
|
|
4703
|
+
offset: offset
|
|
4704
|
+
}), 'GET');
|
|
4705
|
+
}
|
|
4706
|
+
}, {
|
|
4707
|
+
key: "Get",
|
|
4708
|
+
value: function Get(productId) {
|
|
4709
|
+
return this.request.send("".concat(this.endpoint, "/").concat(productId), 'GET');
|
|
4710
|
+
}
|
|
4711
|
+
}, {
|
|
4712
|
+
key: "Create",
|
|
4713
|
+
value: function Create(body) {
|
|
4714
|
+
return this.request.send("".concat(this.endpoint, "}"), 'POST', {
|
|
4715
|
+
type: 'stock',
|
|
4716
|
+
attributes: body
|
|
4717
|
+
});
|
|
4718
|
+
}
|
|
4719
|
+
}, {
|
|
4720
|
+
key: "Delete",
|
|
4721
|
+
value: function Delete(productId) {
|
|
4722
|
+
return this.request.send("".concat(this.endpoint, "/").concat(productId), 'DELETE');
|
|
4723
|
+
}
|
|
4724
|
+
}, {
|
|
4725
|
+
key: "Limit",
|
|
4726
|
+
value: function Limit(value) {
|
|
4727
|
+
this.limit = value;
|
|
4728
|
+
return this;
|
|
4729
|
+
}
|
|
4730
|
+
}, {
|
|
4731
|
+
key: "Offset",
|
|
4732
|
+
value: function Offset(value) {
|
|
4733
|
+
this.offset = value;
|
|
4734
|
+
return this;
|
|
4735
|
+
}
|
|
4736
|
+
}]);
|
|
4737
|
+
return MultiLocationInventories;
|
|
4738
|
+
}();
|
|
4739
|
+
|
|
4623
4740
|
var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
|
|
4624
4741
|
_inherits(Nodes, _CRUDExtend);
|
|
4625
4742
|
var _super = _createSuper(Nodes);
|
|
@@ -5511,6 +5628,7 @@ var ElasticPath = /*#__PURE__*/function () {
|
|
|
5511
5628
|
this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
|
|
5512
5629
|
this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
|
|
5513
5630
|
this.CustomRelationships = new CustomRelationshipsEndpoint(config);
|
|
5631
|
+
this.MultiLocationInventories = new MultiLocationInventories(config);
|
|
5514
5632
|
}
|
|
5515
5633
|
|
|
5516
5634
|
// 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 = "10.
|
|
1088
|
+
var version = "10.2.0";
|
|
1089
1089
|
|
|
1090
1090
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
1091
1091
|
function LocalStorageFactory() {
|
|
@@ -5792,6 +5792,123 @@
|
|
|
5792
5792
|
return CustomRelationshipsEndpoint;
|
|
5793
5793
|
}();
|
|
5794
5794
|
|
|
5795
|
+
var InventoryLocationsEndpoint = /*#__PURE__*/function () {
|
|
5796
|
+
function InventoryLocationsEndpoint(endpoint) {
|
|
5797
|
+
_classCallCheck(this, InventoryLocationsEndpoint);
|
|
5798
|
+
this.request = new RequestFactory(endpoint);
|
|
5799
|
+
this.endpoint = 'inventories/locations';
|
|
5800
|
+
}
|
|
5801
|
+
_createClass(InventoryLocationsEndpoint, [{
|
|
5802
|
+
key: "All",
|
|
5803
|
+
value: function All() {
|
|
5804
|
+
var filter = this.filter,
|
|
5805
|
+
limit = this.limit,
|
|
5806
|
+
offset = this.offset;
|
|
5807
|
+
return this.request.send(buildURL(this.endpoint, {
|
|
5808
|
+
filter: filter,
|
|
5809
|
+
limit: limit,
|
|
5810
|
+
offset: offset
|
|
5811
|
+
}), 'GET');
|
|
5812
|
+
}
|
|
5813
|
+
}, {
|
|
5814
|
+
key: "Get",
|
|
5815
|
+
value: function Get(locationId) {
|
|
5816
|
+
return this.request.send("".concat(this.endpoint, "/").concat(locationId), 'GET');
|
|
5817
|
+
}
|
|
5818
|
+
}, {
|
|
5819
|
+
key: "Create",
|
|
5820
|
+
value: function Create(body) {
|
|
5821
|
+
return this.request.send(this.endpoint, 'POST', {
|
|
5822
|
+
type: 'inventory_location',
|
|
5823
|
+
attributes: body
|
|
5824
|
+
});
|
|
5825
|
+
}
|
|
5826
|
+
}, {
|
|
5827
|
+
key: "Update",
|
|
5828
|
+
value: function Update(locationId, body) {
|
|
5829
|
+
return this.request.send("".concat(this.endpoint, "/").concat(locationId), 'PUT', {
|
|
5830
|
+
type: 'inventory_location',
|
|
5831
|
+
attributes: body
|
|
5832
|
+
});
|
|
5833
|
+
}
|
|
5834
|
+
}, {
|
|
5835
|
+
key: "Delete",
|
|
5836
|
+
value: function Delete(locationId) {
|
|
5837
|
+
return this.request.send("".concat(this.endpoint, "/").concat(locationId), 'DELETE');
|
|
5838
|
+
}
|
|
5839
|
+
}, {
|
|
5840
|
+
key: "Limit",
|
|
5841
|
+
value: function Limit(value) {
|
|
5842
|
+
this.limit = value;
|
|
5843
|
+
return this;
|
|
5844
|
+
}
|
|
5845
|
+
}, {
|
|
5846
|
+
key: "Offset",
|
|
5847
|
+
value: function Offset(value) {
|
|
5848
|
+
this.offset = value;
|
|
5849
|
+
return this;
|
|
5850
|
+
}
|
|
5851
|
+
}]);
|
|
5852
|
+
return InventoryLocationsEndpoint;
|
|
5853
|
+
}();
|
|
5854
|
+
|
|
5855
|
+
var MultiLocationInventories = /*#__PURE__*/function () {
|
|
5856
|
+
function MultiLocationInventories(endpoint) {
|
|
5857
|
+
_classCallCheck(this, MultiLocationInventories);
|
|
5858
|
+
var config = _objectSpread2({}, endpoint);
|
|
5859
|
+
config.headers = _objectSpread2(_objectSpread2({}, config.headers), {}, {
|
|
5860
|
+
'ep-inventories-multi-location': true
|
|
5861
|
+
});
|
|
5862
|
+
this.request = new RequestFactory(endpoint);
|
|
5863
|
+
this.Locations = new InventoryLocationsEndpoint(config);
|
|
5864
|
+
this.endpoint = 'inventories';
|
|
5865
|
+
}
|
|
5866
|
+
_createClass(MultiLocationInventories, [{
|
|
5867
|
+
key: "All",
|
|
5868
|
+
value: function All() {
|
|
5869
|
+
var filter = this.filter,
|
|
5870
|
+
limit = this.limit,
|
|
5871
|
+
offset = this.offset;
|
|
5872
|
+
return this.request.send(buildURL(this.endpoint, {
|
|
5873
|
+
filter: filter,
|
|
5874
|
+
limit: limit,
|
|
5875
|
+
offset: offset
|
|
5876
|
+
}), 'GET');
|
|
5877
|
+
}
|
|
5878
|
+
}, {
|
|
5879
|
+
key: "Get",
|
|
5880
|
+
value: function Get(productId) {
|
|
5881
|
+
return this.request.send("".concat(this.endpoint, "/").concat(productId), 'GET');
|
|
5882
|
+
}
|
|
5883
|
+
}, {
|
|
5884
|
+
key: "Create",
|
|
5885
|
+
value: function Create(body) {
|
|
5886
|
+
return this.request.send("".concat(this.endpoint, "}"), 'POST', {
|
|
5887
|
+
type: 'stock',
|
|
5888
|
+
attributes: body
|
|
5889
|
+
});
|
|
5890
|
+
}
|
|
5891
|
+
}, {
|
|
5892
|
+
key: "Delete",
|
|
5893
|
+
value: function Delete(productId) {
|
|
5894
|
+
return this.request.send("".concat(this.endpoint, "/").concat(productId), 'DELETE');
|
|
5895
|
+
}
|
|
5896
|
+
}, {
|
|
5897
|
+
key: "Limit",
|
|
5898
|
+
value: function Limit(value) {
|
|
5899
|
+
this.limit = value;
|
|
5900
|
+
return this;
|
|
5901
|
+
}
|
|
5902
|
+
}, {
|
|
5903
|
+
key: "Offset",
|
|
5904
|
+
value: function Offset(value) {
|
|
5905
|
+
this.offset = value;
|
|
5906
|
+
return this;
|
|
5907
|
+
}
|
|
5908
|
+
}]);
|
|
5909
|
+
return MultiLocationInventories;
|
|
5910
|
+
}();
|
|
5911
|
+
|
|
5795
5912
|
var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
|
|
5796
5913
|
_inherits(Nodes, _CRUDExtend);
|
|
5797
5914
|
var _super = _createSuper(Nodes);
|
|
@@ -6683,6 +6800,7 @@
|
|
|
6683
6800
|
this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
|
|
6684
6801
|
this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
|
|
6685
6802
|
this.CustomRelationships = new CustomRelationshipsEndpoint(config);
|
|
6803
|
+
this.MultiLocationInventories = new MultiLocationInventories(config);
|
|
6686
6804
|
}
|
|
6687
6805
|
|
|
6688
6806
|
// Expose `Cart` class on ElasticPath class
|
package/package.json
CHANGED