@elasticpath/js-sdk 15.1.3 → 16.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 +23 -7
- package/dist/index.d.ts +84 -31
- package/dist/index.esm.js +23 -7
- package/dist/index.js +23 -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.1.0";
|
|
534
534
|
|
|
535
535
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
536
536
|
function LocalStorageFactory() {
|
|
@@ -4717,21 +4717,31 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4717
4717
|
}
|
|
4718
4718
|
}, {
|
|
4719
4719
|
key: "Get",
|
|
4720
|
-
value: function Get(
|
|
4721
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
4720
|
+
value: function Get(inventoryId) {
|
|
4721
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'GET');
|
|
4722
4722
|
}
|
|
4723
4723
|
}, {
|
|
4724
4724
|
key: "Create",
|
|
4725
|
-
value: function Create(body) {
|
|
4726
|
-
return this.request.send("".concat(this.endpoint
|
|
4725
|
+
value: function Create(body, productId) {
|
|
4726
|
+
return this.request.send("".concat(this.endpoint), 'POST', {
|
|
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', {
|
|
4727
4736
|
type: 'stock',
|
|
4737
|
+
id: inventoryId,
|
|
4728
4738
|
attributes: body
|
|
4729
4739
|
});
|
|
4730
4740
|
}
|
|
4731
4741
|
}, {
|
|
4732
4742
|
key: "Delete",
|
|
4733
|
-
value: function Delete(
|
|
4734
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
4743
|
+
value: function Delete(inventoryId) {
|
|
4744
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'DELETE');
|
|
4735
4745
|
}
|
|
4736
4746
|
}, {
|
|
4737
4747
|
key: "Limit",
|
|
@@ -4745,6 +4755,12 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4745
4755
|
this.offset = value;
|
|
4746
4756
|
return this;
|
|
4747
4757
|
}
|
|
4758
|
+
}, {
|
|
4759
|
+
key: "Filter",
|
|
4760
|
+
value: function Filter(filter) {
|
|
4761
|
+
this.filter = filter;
|
|
4762
|
+
return this;
|
|
4763
|
+
}
|
|
4748
4764
|
}]);
|
|
4749
4765
|
return MultiLocationInventories;
|
|
4750
4766
|
}();
|
package/dist/index.d.ts
CHANGED
|
@@ -8600,50 +8600,87 @@ 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
|
|
8671
|
+
}
|
|
8672
|
+
|
|
8673
|
+
interface MultiLocationInventoryFilter {
|
|
8674
|
+
eq?: {
|
|
8675
|
+
locations?: string
|
|
8676
|
+
}
|
|
8639
8677
|
}
|
|
8640
8678
|
|
|
8641
8679
|
/**
|
|
8642
|
-
* Multi Location Inventories
|
|
8680
|
+
* Multi Location Inventories Endpoint Interface
|
|
8643
8681
|
*/
|
|
8644
8682
|
interface MultiLocationInventoriesEndpoint {
|
|
8645
8683
|
endpoint: 'inventory'
|
|
8646
|
-
|
|
8647
8684
|
Locations: LocationsEndpoint
|
|
8648
8685
|
|
|
8649
8686
|
/**
|
|
@@ -8653,25 +8690,41 @@ interface MultiLocationInventoriesEndpoint {
|
|
|
8653
8690
|
|
|
8654
8691
|
/**
|
|
8655
8692
|
* Get Stock for Product
|
|
8656
|
-
* @param
|
|
8693
|
+
* @param inventoryId - The inventory identifier
|
|
8657
8694
|
*/
|
|
8658
|
-
Get(
|
|
8695
|
+
Get(inventoryId: string): Promise<Resource<StockResponse>>
|
|
8659
8696
|
|
|
8660
8697
|
/**
|
|
8661
8698
|
* Create Stock for Product
|
|
8662
|
-
* @param
|
|
8699
|
+
* @param payload - Initial stock information with overall availability or per-location quantities
|
|
8700
|
+
* @param productId - Optional product identifier
|
|
8663
8701
|
*/
|
|
8664
|
-
Create(
|
|
8702
|
+
Create(
|
|
8703
|
+
payload: StockCreate,
|
|
8704
|
+
productId?: string
|
|
8705
|
+
): Promise<Resource<StockResponse>>
|
|
8706
|
+
|
|
8707
|
+
/**
|
|
8708
|
+
* Update Stock for Product
|
|
8709
|
+
* @param inventoryId - The inventory identifier
|
|
8710
|
+
* @param payload - Location-specific updates. Set location to null to remove it
|
|
8711
|
+
*/
|
|
8712
|
+
Update(
|
|
8713
|
+
inventoryId: string,
|
|
8714
|
+
payload: StockUpdate
|
|
8715
|
+
): Promise<Resource<StockResponse>>
|
|
8665
8716
|
|
|
8666
8717
|
/**
|
|
8667
8718
|
* Delete Stock for Product
|
|
8668
|
-
* @param
|
|
8719
|
+
* @param inventoryId - The inventory identifier
|
|
8669
8720
|
*/
|
|
8670
|
-
Delete(
|
|
8721
|
+
Delete(inventoryId: string): Promise<{}>
|
|
8671
8722
|
|
|
8672
8723
|
Limit(value: number): MultiLocationInventoriesEndpoint
|
|
8673
8724
|
|
|
8674
8725
|
Offset(value: number): MultiLocationInventoriesEndpoint
|
|
8726
|
+
|
|
8727
|
+
Filter(filter: MultiLocationInventoryFilter): MultiLocationInventoriesEndpoint
|
|
8675
8728
|
}
|
|
8676
8729
|
|
|
8677
8730
|
// Type definitions for @elasticpath/js-sdk
|
|
@@ -8762,4 +8815,4 @@ declare namespace elasticpath {
|
|
|
8762
8815
|
}
|
|
8763
8816
|
}
|
|
8764
8817
|
|
|
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 };
|
|
8818
|
+
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, MultiLocationInventoryFilter, 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.1.0";
|
|
523
523
|
|
|
524
524
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
525
525
|
function LocalStorageFactory() {
|
|
@@ -4706,21 +4706,31 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4706
4706
|
}
|
|
4707
4707
|
}, {
|
|
4708
4708
|
key: "Get",
|
|
4709
|
-
value: function Get(
|
|
4710
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
4709
|
+
value: function Get(inventoryId) {
|
|
4710
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'GET');
|
|
4711
4711
|
}
|
|
4712
4712
|
}, {
|
|
4713
4713
|
key: "Create",
|
|
4714
|
-
value: function Create(body) {
|
|
4715
|
-
return this.request.send("".concat(this.endpoint
|
|
4714
|
+
value: function Create(body, productId) {
|
|
4715
|
+
return this.request.send("".concat(this.endpoint), 'POST', {
|
|
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', {
|
|
4716
4725
|
type: 'stock',
|
|
4726
|
+
id: inventoryId,
|
|
4717
4727
|
attributes: body
|
|
4718
4728
|
});
|
|
4719
4729
|
}
|
|
4720
4730
|
}, {
|
|
4721
4731
|
key: "Delete",
|
|
4722
|
-
value: function Delete(
|
|
4723
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
4732
|
+
value: function Delete(inventoryId) {
|
|
4733
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'DELETE');
|
|
4724
4734
|
}
|
|
4725
4735
|
}, {
|
|
4726
4736
|
key: "Limit",
|
|
@@ -4734,6 +4744,12 @@ var MultiLocationInventories = /*#__PURE__*/function () {
|
|
|
4734
4744
|
this.offset = value;
|
|
4735
4745
|
return this;
|
|
4736
4746
|
}
|
|
4747
|
+
}, {
|
|
4748
|
+
key: "Filter",
|
|
4749
|
+
value: function Filter(filter) {
|
|
4750
|
+
this.filter = filter;
|
|
4751
|
+
return this;
|
|
4752
|
+
}
|
|
4737
4753
|
}]);
|
|
4738
4754
|
return MultiLocationInventories;
|
|
4739
4755
|
}();
|
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.1.0";
|
|
1089
1089
|
|
|
1090
1090
|
var LocalStorageFactory = /*#__PURE__*/function () {
|
|
1091
1091
|
function LocalStorageFactory() {
|
|
@@ -5878,21 +5878,31 @@
|
|
|
5878
5878
|
}
|
|
5879
5879
|
}, {
|
|
5880
5880
|
key: "Get",
|
|
5881
|
-
value: function Get(
|
|
5882
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
5881
|
+
value: function Get(inventoryId) {
|
|
5882
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'GET');
|
|
5883
5883
|
}
|
|
5884
5884
|
}, {
|
|
5885
5885
|
key: "Create",
|
|
5886
|
-
value: function Create(body) {
|
|
5887
|
-
return this.request.send("".concat(this.endpoint
|
|
5886
|
+
value: function Create(body, productId) {
|
|
5887
|
+
return this.request.send("".concat(this.endpoint), 'POST', {
|
|
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', {
|
|
5888
5897
|
type: 'stock',
|
|
5898
|
+
id: inventoryId,
|
|
5889
5899
|
attributes: body
|
|
5890
5900
|
});
|
|
5891
5901
|
}
|
|
5892
5902
|
}, {
|
|
5893
5903
|
key: "Delete",
|
|
5894
|
-
value: function Delete(
|
|
5895
|
-
return this.request.send("".concat(this.endpoint, "/").concat(
|
|
5904
|
+
value: function Delete(inventoryId) {
|
|
5905
|
+
return this.request.send("".concat(this.endpoint, "/").concat(inventoryId), 'DELETE');
|
|
5896
5906
|
}
|
|
5897
5907
|
}, {
|
|
5898
5908
|
key: "Limit",
|
|
@@ -5906,6 +5916,12 @@
|
|
|
5906
5916
|
this.offset = value;
|
|
5907
5917
|
return this;
|
|
5908
5918
|
}
|
|
5919
|
+
}, {
|
|
5920
|
+
key: "Filter",
|
|
5921
|
+
value: function Filter(filter) {
|
|
5922
|
+
this.filter = filter;
|
|
5923
|
+
return this;
|
|
5924
|
+
}
|
|
5909
5925
|
}]);
|
|
5910
5926
|
return MultiLocationInventories;
|
|
5911
5927
|
}();
|
package/package.json
CHANGED