@elasticpath/js-sdk 10.0.0 → 10.1.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 CHANGED
@@ -530,7 +530,7 @@ if (!globalThis.fetch) {
530
530
  globalThis.Response = fetch$1.Response;
531
531
  }
532
532
 
533
- var version = "10.0.0";
533
+ var version = "10.1.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
@@ -8454,6 +8454,169 @@ interface SubscriptionProrationPoliciesEndpoint
8454
8454
  endpoint: 'proration-policies'
8455
8455
  }
8456
8456
 
8457
+ /**
8458
+ * Inventory Locations
8459
+ */
8460
+
8461
+
8462
+ type InventoryLocationType = 'inventory_location'
8463
+
8464
+ interface GeolocationDetails {
8465
+ lat: number
8466
+ lon: number
8467
+ }
8468
+ interface LocationAttributes {
8469
+ name: string
8470
+ external_ref?: string
8471
+ description?: string
8472
+ address: string[]
8473
+ geolocation: GeolocationDetails
8474
+ }
8475
+ interface LocationMeta {
8476
+ timestamps: {
8477
+ created_at: string
8478
+ updated_at: string
8479
+ }
8480
+ }
8481
+
8482
+ /**
8483
+ * Core Location Base Interface
8484
+ */
8485
+ interface LocationBase {
8486
+ type: InventoryLocationType
8487
+ attributes: LocationAttributes
8488
+ meta: LocationMeta
8489
+ }
8490
+
8491
+ interface Location extends Identifiable, LocationBase {}
8492
+
8493
+ interface CreateLocationBody extends LocationAttributes {}
8494
+
8495
+ interface UpdateLocationBody extends Identifiable, LocationAttributes {}
8496
+
8497
+ /**
8498
+ * Location Endpoints
8499
+ */
8500
+ interface LocationsEndpoint {
8501
+ endpoint: 'inventory/locations'
8502
+
8503
+ /**
8504
+ * List All Locations
8505
+ */
8506
+ All(): Promise<ResourcePage<Location>>
8507
+
8508
+ /**
8509
+ * Get Location
8510
+ * @param locationId - The ID of the Location.
8511
+ */
8512
+ Get(locationId: string): Promise<Resource<Location>>
8513
+
8514
+ /**
8515
+ * Create Location
8516
+ * @param body - The base attributes of the Locations
8517
+ */
8518
+ Create(body: CreateLocationBody): Promise<Resource<Location>>
8519
+
8520
+ /**
8521
+ * Update Location
8522
+ * @param locationId - The ID of the Location.
8523
+ * @param body - The base attributes of the Locations.
8524
+ */
8525
+ Update(
8526
+ locationId: string,
8527
+ body: UpdateLocationBody
8528
+ ): Promise<Resource<Location>>
8529
+
8530
+ /**
8531
+ * Delete Location
8532
+ * @param locationId - The ID of the Location.
8533
+ */
8534
+ Delete(locationId: string): Promise<{}>
8535
+
8536
+ Limit(value: number): LocationsEndpoint
8537
+
8538
+ Offset(value: number): LocationsEndpoint
8539
+ }
8540
+
8541
+ /**
8542
+ * Multi Location Inventory
8543
+ */
8544
+
8545
+
8546
+ type StockType = 'stock'
8547
+
8548
+ interface StockMeta {
8549
+ timestamps: {
8550
+ created_at: string
8551
+ updated_at: string
8552
+ }
8553
+ }
8554
+
8555
+ interface StockBaseLocations {
8556
+ [key: string]: {
8557
+ available: number
8558
+ }
8559
+ }
8560
+
8561
+ interface StockBaseAttributes {
8562
+ product_id: string
8563
+ locations: StockBaseLocations
8564
+ }
8565
+
8566
+ interface StockResponseLocations {
8567
+ [key: string]: {
8568
+ available: number
8569
+ allocated: number
8570
+ total: number
8571
+ }
8572
+ }
8573
+ interface StockResponseAttributes extends StockBaseAttributes {
8574
+ allocated: number
8575
+ total: number
8576
+ locations: StockResponseLocations
8577
+ }
8578
+
8579
+ interface StockResponse extends Identifiable, StockMeta {
8580
+ type: StockType
8581
+ attributes: StockResponseAttributes
8582
+ }
8583
+
8584
+ /**
8585
+ * Multi Location Inventories Endpoints
8586
+ */
8587
+ interface MultiLocationInventoriesEndpoint {
8588
+ endpoint: 'inventory'
8589
+
8590
+ Locations: LocationsEndpoint
8591
+
8592
+ /**
8593
+ * Get Stock for all Products
8594
+ */
8595
+ All(): Promise<ResourcePage<StockResponse>>
8596
+
8597
+ /**
8598
+ * Get Stock for Product
8599
+ * @param productId The ID of the product.
8600
+ */
8601
+ Get(productId: string): Promise<Resource<StockResponse>>
8602
+
8603
+ /**
8604
+ * Create Stock for Product
8605
+ * @param body - The base attributes of the inventory stock.
8606
+ */
8607
+ Create(body: StockBaseAttributes): Promise<Resource<StockResponse>>
8608
+
8609
+ /**
8610
+ * Delete Stock for Product
8611
+ * @param productId The ID of the product.
8612
+ */
8613
+ Delete(productId: string): Promise<{}>
8614
+
8615
+ Limit(value: number): MultiLocationInventoriesEndpoint
8616
+
8617
+ Offset(value: number): MultiLocationInventoriesEndpoint
8618
+ }
8619
+
8457
8620
  // Type definitions for @elasticpath/js-sdk
8458
8621
 
8459
8622
 
@@ -8523,6 +8686,7 @@ declare class ElasticPath {
8523
8686
  SubscriptionProrationPolicies: SubscriptionProrationPoliciesEndpoint
8524
8687
  SubscriptionInvoices: SubscriptionInvoicesEndpoint
8525
8688
  CustomRelationships: CustomRelationshipsEndpoint
8689
+ MultiLocationInventories: MultiLocationInventoriesEndpoint
8526
8690
 
8527
8691
  Cart(id?: string): CartEndpoint // This optional cart id is super worrying when using the SDK in a node server :/
8528
8692
  constructor(config: Config)
@@ -8541,4 +8705,4 @@ declare namespace elasticpath {
8541
8705
  }
8542
8706
  }
8543
8707
 
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 };
8708
+ 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.0.0";
522
+ var version = "10.1.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.0.0";
1088
+ var version = "10.1.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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elasticpath/js-sdk",
3
3
  "description": "SDK for the Elastic Path eCommerce API",
4
- "version": "10.0.0",
4
+ "version": "10.1.0",
5
5
  "homepage": "https://github.com/elasticpath/js-sdk",
6
6
  "author": "Elastic Path (https://elasticpath.com/)",
7
7
  "files": [