@elasticpath/js-sdk 15.1.2 → 16.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 +19 -7
- package/dist/index.d.ts +76 -31
- package/dist/index.esm.js +19 -7
- package/dist/index.js +19 -7
- 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 = "16.0.0";
|
|
534
534
|
|
|
535
535
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
536
536
|
function LocalStorageFactory() {
|
|
@@ -4696,7 +4696,9 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4696
4696
|
function MultiLocationInventories(endpoint) {
|
|
4697
4697
|
_classCallCheck(this, MultiLocationInventories);
|
|
4698
4698
|
var config = _objectSpread2({}, endpoint);
|
|
4699
|
-
config.headers
|
|
4699
|
+
config.headers = _objectSpread2(_objectSpread2({}, config.headers), {}, {
|
|
4700
|
+
'ep-inventories-multi-location': true
|
|
4701
|
+
});
|
|
4700
4702
|
this.request = new RequestFactory(config);
|
|
4701
4703
|
this.Locations = new InventoryLocationsEndpoint(config);
|
|
4702
4704
|
this.endpoint = 'inventories';
|
|
@@ -4715,21 +4717,31 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4715
4717
|
}
|
|
4716
4718
|
}, {
|
|
4717
4719
|
key: "Get",
|
|
4718
|
-
value: function Get(
|
|
4719
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
4720
|
+
value: function Get(inventoryId) {
|
|
4721
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'GET');
|
|
4720
4722
|
}
|
|
4721
4723
|
}, {
|
|
4722
4724
|
key: "Create",
|
|
4723
|
-
value: function Create(body) {
|
|
4725
|
+
value: function Create(body, productId) {
|
|
4724
4726
|
return this.request.send("".concat(this.endpoint, "}"), 'POST', {
|
|
4725
4727
|
type: 'stock',
|
|
4728
|
+
id: productId,
|
|
4729
|
+
attributes: body
|
|
4730
|
+
});
|
|
4731
|
+
}
|
|
4732
|
+
}, {
|
|
4733
|
+
key: "Update",
|
|
4734
|
+
value: function Update(inventoryId, body) {
|
|
4735
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'PUT', {
|
|
4736
|
+
type: 'stock',
|
|
4737
|
+
id: inventoryId,
|
|
4726
4738
|
attributes: body
|
|
4727
4739
|
});
|
|
4728
4740
|
}
|
|
4729
4741
|
}, {
|
|
4730
4742
|
key: "Delete",
|
|
4731
|
-
value: function Delete(
|
|
4732
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
4743
|
+
value: function Delete(inventoryId) {
|
|
4744
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'DELETE');
|
|
4733
4745
|
}
|
|
4734
4746
|
}, {
|
|
4735
4747
|
key: "Limit",
|
package/dist/index.d.ts
CHANGED
|
@@ -8600,50 +8600,81 @@ interface LocationsEndpoint {
|
|
|
8600
8600
|
*/
|
|
8601
8601
|
|
|
8602
8602
|
|
|
8603
|
-
|
|
8603
|
+
/**
|
|
8604
|
+
* Multi Location Inventory Types
|
|
8605
|
+
*/
|
|
8606
|
+
type InventoryResourceType = 'stock'
|
|
8604
8607
|
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
|
|
8609
|
-
|
|
8608
|
+
/**
|
|
8609
|
+
* Base Types
|
|
8610
|
+
*/
|
|
8611
|
+
interface Timestamps {
|
|
8612
|
+
created_at: string
|
|
8613
|
+
updated_at: string
|
|
8610
8614
|
}
|
|
8611
8615
|
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
|
|
8616
|
+
/**
|
|
8617
|
+
* Location-specific inventory quantities
|
|
8618
|
+
*/
|
|
8619
|
+
interface LocationQuantities {
|
|
8620
|
+
available: number
|
|
8621
|
+
allocated: number
|
|
8622
|
+
total: number
|
|
8623
|
+
}
|
|
8624
|
+
|
|
8625
|
+
/**
|
|
8626
|
+
* Create Operation Types
|
|
8627
|
+
*/
|
|
8628
|
+
interface LocationCreateQuantity {
|
|
8629
|
+
available: number
|
|
8630
|
+
}
|
|
8631
|
+
|
|
8632
|
+
interface StockCreate {
|
|
8633
|
+
available?: number
|
|
8634
|
+
locations?: {
|
|
8635
|
+
[locationId: string]: LocationCreateQuantity
|
|
8615
8636
|
}
|
|
8616
8637
|
}
|
|
8617
8638
|
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8639
|
+
/**
|
|
8640
|
+
* Update Operation Types
|
|
8641
|
+
*/
|
|
8642
|
+
interface LocationUpdateQuantity {
|
|
8643
|
+
allocated?: number
|
|
8644
|
+
available?: number
|
|
8621
8645
|
}
|
|
8622
8646
|
|
|
8623
|
-
interface
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
allocated: number
|
|
8627
|
-
total: number
|
|
8647
|
+
interface StockUpdate {
|
|
8648
|
+
locations?: {
|
|
8649
|
+
[locationId: string]: LocationUpdateQuantity | null
|
|
8628
8650
|
}
|
|
8629
8651
|
}
|
|
8630
|
-
|
|
8652
|
+
|
|
8653
|
+
/**
|
|
8654
|
+
* Response Types
|
|
8655
|
+
*/
|
|
8656
|
+
interface StockLocationsMap {
|
|
8657
|
+
[locationId: string]: LocationQuantities
|
|
8658
|
+
}
|
|
8659
|
+
|
|
8660
|
+
interface StockAttributes {
|
|
8631
8661
|
allocated: number
|
|
8662
|
+
available: number
|
|
8632
8663
|
total: number
|
|
8633
|
-
locations:
|
|
8664
|
+
locations: StockLocationsMap
|
|
8634
8665
|
}
|
|
8635
8666
|
|
|
8636
|
-
interface StockResponse extends Identifiable
|
|
8637
|
-
type:
|
|
8638
|
-
attributes:
|
|
8667
|
+
interface StockResponse extends Identifiable {
|
|
8668
|
+
type: InventoryResourceType
|
|
8669
|
+
attributes: StockAttributes
|
|
8670
|
+
timestamps: Timestamps
|
|
8639
8671
|
}
|
|
8640
8672
|
|
|
8641
8673
|
/**
|
|
8642
|
-
* Multi Location Inventories
|
|
8674
|
+
* Multi Location Inventories Endpoint Interface
|
|
8643
8675
|
*/
|
|
8644
8676
|
interface MultiLocationInventoriesEndpoint {
|
|
8645
8677
|
endpoint: 'inventory'
|
|
8646
|
-
|
|
8647
8678
|
Locations: LocationsEndpoint
|
|
8648
8679
|
|
|
8649
8680
|
/**
|
|
@@ -8653,21 +8684,35 @@ interface MultiLocationInventoriesEndpoint {
|
|
|
8653
8684
|
|
|
8654
8685
|
/**
|
|
8655
8686
|
* Get Stock for Product
|
|
8656
|
-
* @param
|
|
8687
|
+
* @param inventoryId - The inventory identifier
|
|
8657
8688
|
*/
|
|
8658
|
-
Get(
|
|
8689
|
+
Get(inventoryId: string): Promise<Resource<StockResponse>>
|
|
8659
8690
|
|
|
8660
8691
|
/**
|
|
8661
8692
|
* Create Stock for Product
|
|
8662
|
-
* @param
|
|
8693
|
+
* @param payload - Initial stock information with overall availability or per-location quantities
|
|
8694
|
+
* @param productId - Optional product identifier
|
|
8663
8695
|
*/
|
|
8664
|
-
Create(
|
|
8696
|
+
Create(
|
|
8697
|
+
payload: StockCreate,
|
|
8698
|
+
productId?: string
|
|
8699
|
+
): Promise<Resource<StockResponse>>
|
|
8700
|
+
|
|
8701
|
+
/**
|
|
8702
|
+
* Update Stock for Product
|
|
8703
|
+
* @param inventoryId - The inventory identifier
|
|
8704
|
+
* @param payload - Location-specific updates. Set location to null to remove it
|
|
8705
|
+
*/
|
|
8706
|
+
Update(
|
|
8707
|
+
inventoryId: string,
|
|
8708
|
+
payload: StockUpdate
|
|
8709
|
+
): Promise<Resource<StockResponse>>
|
|
8665
8710
|
|
|
8666
8711
|
/**
|
|
8667
8712
|
* Delete Stock for Product
|
|
8668
|
-
* @param
|
|
8713
|
+
* @param inventoryId - The inventory identifier
|
|
8669
8714
|
*/
|
|
8670
|
-
Delete(
|
|
8715
|
+
Delete(inventoryId: string): Promise<{}>
|
|
8671
8716
|
|
|
8672
8717
|
Limit(value: number): MultiLocationInventoriesEndpoint
|
|
8673
8718
|
|
|
@@ -8762,4 +8807,4 @@ declare namespace elasticpath {
|
|
|
8762
8807
|
}
|
|
8763
8808
|
}
|
|
8764
8809
|
|
|
8765
|
-
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, 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, RulePromotionFilter, RulePromotionMeta, RulePromotionsEndpoint, RuleUpdateBody, Settings, SettingsEndpoint, ShippingGroupBase, ShippingGroupResponse, ShippingIncluded, ShopperCatalogEndpoint, ShopperCatalogProductsEndpoint, ShopperCatalogReleaseBase, ShopperCatalogResource, ShopperCatalogResourceList, ShopperCatalogResourcePage, SimpleResourcePageResponse, 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 };
|
|
8810
|
+
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, 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, 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, RulePromotionFilter, 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 = "16.0.0";
|
|
523
523
|
|
|
524
524
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
525
525
|
function LocalStorageFactory() {
|
|
@@ -4685,7 +4685,9 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4685
4685
|
function MultiLocationInventories(endpoint) {
|
|
4686
4686
|
_classCallCheck(this, MultiLocationInventories);
|
|
4687
4687
|
var config = _objectSpread2({}, endpoint);
|
|
4688
|
-
config.headers
|
|
4688
|
+
config.headers = _objectSpread2(_objectSpread2({}, config.headers), {}, {
|
|
4689
|
+
'ep-inventories-multi-location': true
|
|
4690
|
+
});
|
|
4689
4691
|
this.request = new RequestFactory(config);
|
|
4690
4692
|
this.Locations = new InventoryLocationsEndpoint(config);
|
|
4691
4693
|
this.endpoint = 'inventories';
|
|
@@ -4704,21 +4706,31 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4704
4706
|
}
|
|
4705
4707
|
}, {
|
|
4706
4708
|
key: "Get",
|
|
4707
|
-
value: function Get(
|
|
4708
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
4709
|
+
value: function Get(inventoryId) {
|
|
4710
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'GET');
|
|
4709
4711
|
}
|
|
4710
4712
|
}, {
|
|
4711
4713
|
key: "Create",
|
|
4712
|
-
value: function Create(body) {
|
|
4714
|
+
value: function Create(body, productId) {
|
|
4713
4715
|
return this.request.send("".concat(this.endpoint, "}"), 'POST', {
|
|
4714
4716
|
type: 'stock',
|
|
4717
|
+
id: productId,
|
|
4718
|
+
attributes: body
|
|
4719
|
+
});
|
|
4720
|
+
}
|
|
4721
|
+
}, {
|
|
4722
|
+
key: "Update",
|
|
4723
|
+
value: function Update(inventoryId, body) {
|
|
4724
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'PUT', {
|
|
4725
|
+
type: 'stock',
|
|
4726
|
+
id: inventoryId,
|
|
4715
4727
|
attributes: body
|
|
4716
4728
|
});
|
|
4717
4729
|
}
|
|
4718
4730
|
}, {
|
|
4719
4731
|
key: "Delete",
|
|
4720
|
-
value: function Delete(
|
|
4721
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
4732
|
+
value: function Delete(inventoryId) {
|
|
4733
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'DELETE');
|
|
4722
4734
|
}
|
|
4723
4735
|
}, {
|
|
4724
4736
|
key: "Limit",
|
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 = "16.0.0";
|
|
1089
1089
|
|
|
1090
1090
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
1091
1091
|
function LocalStorageFactory() {
|
|
@@ -5857,7 +5857,9 @@
|
|
|
5857
5857
|
function MultiLocationInventories(endpoint) {
|
|
5858
5858
|
_classCallCheck(this, MultiLocationInventories);
|
|
5859
5859
|
var config = _objectSpread2({}, endpoint);
|
|
5860
|
-
config.headers
|
|
5860
|
+
config.headers = _objectSpread2(_objectSpread2({}, config.headers), {}, {
|
|
5861
|
+
'ep-inventories-multi-location': true
|
|
5862
|
+
});
|
|
5861
5863
|
this.request = new RequestFactory(config);
|
|
5862
5864
|
this.Locations = new InventoryLocationsEndpoint(config);
|
|
5863
5865
|
this.endpoint = 'inventories';
|
|
@@ -5876,21 +5878,31 @@
|
|
|
5876
5878
|
}
|
|
5877
5879
|
}, {
|
|
5878
5880
|
key: "Get",
|
|
5879
|
-
value: function Get(
|
|
5880
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
5881
|
+
value: function Get(inventoryId) {
|
|
5882
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'GET');
|
|
5881
5883
|
}
|
|
5882
5884
|
}, {
|
|
5883
5885
|
key: "Create",
|
|
5884
|
-
value: function Create(body) {
|
|
5886
|
+
value: function Create(body, productId) {
|
|
5885
5887
|
return this.request.send("".concat(this.endpoint, "}"), 'POST', {
|
|
5886
5888
|
type: 'stock',
|
|
5889
|
+
id: productId,
|
|
5890
|
+
attributes: body
|
|
5891
|
+
});
|
|
5892
|
+
}
|
|
5893
|
+
}, {
|
|
5894
|
+
key: "Update",
|
|
5895
|
+
value: function Update(inventoryId, body) {
|
|
5896
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'PUT', {
|
|
5897
|
+
type: 'stock',
|
|
5898
|
+
id: inventoryId,
|
|
5887
5899
|
attributes: body
|
|
5888
5900
|
});
|
|
5889
5901
|
}
|
|
5890
5902
|
}, {
|
|
5891
5903
|
key: "Delete",
|
|
5892
|
-
value: function Delete(
|
|
5893
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
5904
|
+
value: function Delete(inventoryId) {
|
|
5905
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'DELETE');
|
|
5894
5906
|
}
|
|
5895
5907
|
}, {
|
|
5896
5908
|
key: "Limit",
|
package/package.json
CHANGED