@elasticpath/js-sdk 4.0.0 → 6.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 CHANGED
@@ -530,7 +530,7 @@ if (!globalThis.fetch) {
530
530
  globalThis.Response = fetch$1.Response;
531
531
  }
532
532
 
533
- var version = "4.0.0";
533
+ var version = "6.0.0";
534
534
 
535
535
  var LocalStorageFactory = /*#__PURE__*/function () {
536
536
  function LocalStorageFactory() {
@@ -4490,6 +4490,72 @@ var SubscriptionInvoicesEndpoint = /*#__PURE__*/function () {
4490
4490
  return SubscriptionInvoicesEndpoint;
4491
4491
  }();
4492
4492
 
4493
+ var CustomRelationshipsEndpoint = /*#__PURE__*/function () {
4494
+ function CustomRelationshipsEndpoint(endpoint) {
4495
+ _classCallCheck(this, CustomRelationshipsEndpoint);
4496
+ var config = _objectSpread2({}, endpoint);
4497
+ config.version = 'pcm';
4498
+ this.request = new RequestFactory(config);
4499
+ this.endpoint = 'custom_relationships';
4500
+ }
4501
+ _createClass(CustomRelationshipsEndpoint, [{
4502
+ key: "All",
4503
+ value: function All() {
4504
+ var filter = this.filter,
4505
+ limit = this.limit,
4506
+ offset = this.offset;
4507
+ return this.request.send(buildURL(this.endpoint, {
4508
+ filter: filter,
4509
+ limit: limit,
4510
+ offset: offset
4511
+ }), 'GET');
4512
+ }
4513
+ }, {
4514
+ key: "Get",
4515
+ value: function Get(slug) {
4516
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'GET');
4517
+ }
4518
+ }, {
4519
+ key: "Create",
4520
+ value: function Create(body) {
4521
+ return this.request.send(this.endpoint, 'POST', _objectSpread2(_objectSpread2({}, body), {}, {
4522
+ type: 'custom-relationship'
4523
+ }));
4524
+ }
4525
+ }, {
4526
+ key: "Update",
4527
+ value: function Update(slug, body) {
4528
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'PUT', _objectSpread2(_objectSpread2({}, body), {}, {
4529
+ type: 'custom-relationship'
4530
+ }));
4531
+ }
4532
+ }, {
4533
+ key: "Delete",
4534
+ value: function Delete(slug) {
4535
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'DELETE');
4536
+ }
4537
+ }, {
4538
+ key: "Filter",
4539
+ value: function Filter(filter) {
4540
+ this.filter = filter;
4541
+ return this;
4542
+ }
4543
+ }, {
4544
+ key: "Limit",
4545
+ value: function Limit(value) {
4546
+ this.limit = value;
4547
+ return this;
4548
+ }
4549
+ }, {
4550
+ key: "Offset",
4551
+ value: function Offset(value) {
4552
+ this.offset = value;
4553
+ return this;
4554
+ }
4555
+ }]);
4556
+ return CustomRelationshipsEndpoint;
4557
+ }();
4558
+
4493
4559
  var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
4494
4560
  _inherits(Nodes, _CRUDExtend);
4495
4561
  var _super = _createSuper(Nodes);
@@ -5380,6 +5446,7 @@ var ElasticPath = /*#__PURE__*/function () {
5380
5446
  this.SubscriptionDunningRules = new SubscriptionDunningRulesEndpoint(config);
5381
5447
  this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
5382
5448
  this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
5449
+ this.CustomRelationships = new CustomRelationshipsEndpoint(config);
5383
5450
  }
5384
5451
 
5385
5452
  // Expose `Cart` class on ElasticPath class
package/dist/index.d.ts CHANGED
@@ -7762,6 +7762,8 @@ interface SubscriptionsEndpoint
7762
7762
  automatic?: boolean
7763
7763
  start: string
7764
7764
  end: string
7765
+ stackable: boolean
7766
+ priority?: number | null | undefined
7765
7767
  rule_set: {
7766
7768
  currencies: string[]
7767
7769
  catalog_ids: string[]
@@ -8224,6 +8226,107 @@ interface SubscriptionProrationPoliciesEndpoint
8224
8226
  endpoint: 'proration-policies'
8225
8227
  }
8226
8228
 
8229
+ /**
8230
+ * Custom Relationships
8231
+ * Description: Custom Relationships
8232
+ */
8233
+
8234
+
8235
+ interface CustomRelationshipBaseAttributes {
8236
+ name: string
8237
+ description?: string
8238
+ slug: string
8239
+ }
8240
+
8241
+ interface CustomRelationshipBase {
8242
+ type: 'custom-relationship'
8243
+ attributes: CustomRelationshipBaseAttributes
8244
+ meta: {
8245
+ owner: 'organization' | 'store'
8246
+ timestamps: {
8247
+ created_at: string
8248
+ updated_at: string
8249
+ }
8250
+ }
8251
+ }
8252
+
8253
+ interface CustomRelationship
8254
+ extends Identifiable,
8255
+ CustomRelationshipBase {}
8256
+
8257
+ interface CreateCustomRelationshipBody
8258
+ extends Pick<CustomRelationshipBase, 'attributes'> {}
8259
+
8260
+ interface UpdateCustomRelationshipBody
8261
+ extends Identifiable,
8262
+ Pick<CustomRelationshipBase, 'attributes'> {}
8263
+
8264
+ interface CustomRelationshipsFilter {
8265
+ eq?: {
8266
+ owner?: 'organization' | 'store'
8267
+ }
8268
+ }
8269
+
8270
+ interface CustomRelationshipsListResponse
8271
+ extends ResourceList<CustomRelationship> {
8272
+ links?: { [key: string]: string | null } | {}
8273
+ meta: {
8274
+ results: {
8275
+ total: number
8276
+ }
8277
+ }
8278
+ }
8279
+
8280
+ interface CustomRelationshipsEndpoint {
8281
+ endpoint: 'custom_relationships'
8282
+ /**
8283
+ * List Custom Relationships
8284
+ */
8285
+ All(): Promise<CustomRelationshipsListResponse>
8286
+
8287
+ /**
8288
+ * Get Custom Relationship
8289
+ * @param slug - The slug of the Custom Relationship. It should always be prefixed with 'CRP_'
8290
+ */
8291
+ Get(slug: string): Promise<Resource<CustomRelationship>>
8292
+
8293
+ /**
8294
+ * Create Custom Relationship
8295
+ * @param body - The base attributes of the Custom Relationships
8296
+ */
8297
+ Create(
8298
+ body: CreateCustomRelationshipBody
8299
+ ): Promise<Resource<CustomRelationship>>
8300
+
8301
+ /**
8302
+ * Update Custom Relationship
8303
+ * @param slug - The slug of the Custom Relationship. It should always be prefixed with 'CRP_'
8304
+ * @param body - The base attributes of the Custom Relationships.
8305
+ * The Slug attribute cannot be updated and the slug within this object should match this function's first argument.
8306
+ */
8307
+ Update(
8308
+ slug: string,
8309
+ body: UpdateCustomRelationshipBody
8310
+ ): Promise<Resource<CustomRelationship>>
8311
+
8312
+ /**
8313
+ * Delete Custom Relationship
8314
+ * @param slug - The slug of the Custom Relationship. It should always be prefixed with 'CRP_'
8315
+ */
8316
+ Delete(slug: string): Promise<{}>
8317
+
8318
+ /**
8319
+ * Custom Relationship filtering
8320
+ * @param filter - The filter object.
8321
+ * Currently supports the 'eq' filter operator for the 'owner' field of the Custom Relationship.
8322
+ */
8323
+ Filter(filter: CustomRelationshipsFilter): CustomRelationshipsEndpoint
8324
+
8325
+ Limit(value: number): CustomRelationshipsEndpoint
8326
+
8327
+ Offset(value: number): CustomRelationshipsEndpoint
8328
+ }
8329
+
8227
8330
  // Type definitions for @elasticpath/js-sdk
8228
8331
 
8229
8332
 
@@ -8292,6 +8395,7 @@ declare class ElasticPath {
8292
8395
  SubscriptionDunningRules: SubscriptionDunningRulesEndpoint
8293
8396
  SubscriptionProrationPolicies: SubscriptionProrationPoliciesEndpoint
8294
8397
  SubscriptionInvoices: SubscriptionInvoicesEndpoint
8398
+ CustomRelationships: CustomRelationshipsEndpoint
8295
8399
 
8296
8400
  Cart(id?: string): CartEndpoint // This optional cart id is super worrying when using the SDK in a node server :/
8297
8401
  constructor(config: Config)
@@ -8310,4 +8414,4 @@ declare namespace elasticpath {
8310
8414
  }
8311
8415
  }
8312
8416
 
8313
- 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, CrudQueryableResource, Currency, CurrencyAmount, CurrencyBase, CurrencyEndpoint, CurrencyPercentage, CustomApi, CustomApiBase, CustomApiField, CustomApiFieldBase, CustomApisEndpoint, CustomAuthenticatorResponseBody, CustomDiscount, CustomDiscountResponse, CustomFieldValidation, CustomInputs, CustomInputsValidationRules, 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, 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, PcmFileRelationship, PcmFileRelationshipEndpoint, PcmJob, PcmJobBase, PcmJobError, PcmJobsEndpoint, PcmMainImageRelationship, PcmMainImageRelationshipEndpoint, PcmProduct, PcmProductAttachmentBody, PcmProductAttachmentResponse, PcmProductBase, PcmProductFilter, PcmProductInclude, PcmProductRelationships, PcmProductResponse, PcmProductUpdateBody, PcmProductsEndpoint, PcmProductsResponse, PcmTemplateRelationship, PcmTemplateRelationshipEndpoint, PcmVariationsRelationshipResource, PcmVariationsRelationships, PcmVariationsRelationshipsEndpoint, PercentDiscountSchema, PersonalDataEndpoint, PersonalDataRecord, Price, PriceBook, PriceBookBase, PriceBookFilter, PriceBookPrice, PriceBookPriceBase, PriceBookPriceModifier, PriceBookPriceModifierBase, PriceBookPriceModifierEndpoint, PriceBookPricesCreateBody, PriceBookPricesEndpoint, PriceBookPricesUpdateBody, PriceBooksEndpoint, PriceBooksUpdateBody, PricesFilter, Product, 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, 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, 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 };
8417
+ 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, 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, 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, PcmFileRelationship, PcmFileRelationshipEndpoint, PcmJob, PcmJobBase, PcmJobError, PcmJobsEndpoint, PcmMainImageRelationship, PcmMainImageRelationshipEndpoint, PcmProduct, PcmProductAttachmentBody, PcmProductAttachmentResponse, PcmProductBase, PcmProductFilter, PcmProductInclude, PcmProductRelationships, PcmProductResponse, PcmProductUpdateBody, PcmProductsEndpoint, PcmProductsResponse, PcmTemplateRelationship, PcmTemplateRelationshipEndpoint, PcmVariationsRelationshipResource, PcmVariationsRelationships, PcmVariationsRelationshipsEndpoint, PercentDiscountSchema, PersonalDataEndpoint, PersonalDataRecord, Price, PriceBook, PriceBookBase, PriceBookFilter, PriceBookPrice, PriceBookPriceBase, PriceBookPriceModifier, PriceBookPriceModifierBase, PriceBookPriceModifierEndpoint, PriceBookPricesCreateBody, PriceBookPricesEndpoint, PriceBookPricesUpdateBody, PriceBooksEndpoint, PriceBooksUpdateBody, PricesFilter, Product, 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, 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 };
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 = "4.0.0";
522
+ var version = "6.0.0";
523
523
 
524
524
  var LocalStorageFactory = /*#__PURE__*/function () {
525
525
  function LocalStorageFactory() {
@@ -4479,6 +4479,72 @@ var SubscriptionInvoicesEndpoint = /*#__PURE__*/function () {
4479
4479
  return SubscriptionInvoicesEndpoint;
4480
4480
  }();
4481
4481
 
4482
+ var CustomRelationshipsEndpoint = /*#__PURE__*/function () {
4483
+ function CustomRelationshipsEndpoint(endpoint) {
4484
+ _classCallCheck(this, CustomRelationshipsEndpoint);
4485
+ var config = _objectSpread2({}, endpoint);
4486
+ config.version = 'pcm';
4487
+ this.request = new RequestFactory(config);
4488
+ this.endpoint = 'custom_relationships';
4489
+ }
4490
+ _createClass(CustomRelationshipsEndpoint, [{
4491
+ key: "All",
4492
+ value: function All() {
4493
+ var filter = this.filter,
4494
+ limit = this.limit,
4495
+ offset = this.offset;
4496
+ return this.request.send(buildURL(this.endpoint, {
4497
+ filter: filter,
4498
+ limit: limit,
4499
+ offset: offset
4500
+ }), 'GET');
4501
+ }
4502
+ }, {
4503
+ key: "Get",
4504
+ value: function Get(slug) {
4505
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'GET');
4506
+ }
4507
+ }, {
4508
+ key: "Create",
4509
+ value: function Create(body) {
4510
+ return this.request.send(this.endpoint, 'POST', _objectSpread2(_objectSpread2({}, body), {}, {
4511
+ type: 'custom-relationship'
4512
+ }));
4513
+ }
4514
+ }, {
4515
+ key: "Update",
4516
+ value: function Update(slug, body) {
4517
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'PUT', _objectSpread2(_objectSpread2({}, body), {}, {
4518
+ type: 'custom-relationship'
4519
+ }));
4520
+ }
4521
+ }, {
4522
+ key: "Delete",
4523
+ value: function Delete(slug) {
4524
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'DELETE');
4525
+ }
4526
+ }, {
4527
+ key: "Filter",
4528
+ value: function Filter(filter) {
4529
+ this.filter = filter;
4530
+ return this;
4531
+ }
4532
+ }, {
4533
+ key: "Limit",
4534
+ value: function Limit(value) {
4535
+ this.limit = value;
4536
+ return this;
4537
+ }
4538
+ }, {
4539
+ key: "Offset",
4540
+ value: function Offset(value) {
4541
+ this.offset = value;
4542
+ return this;
4543
+ }
4544
+ }]);
4545
+ return CustomRelationshipsEndpoint;
4546
+ }();
4547
+
4482
4548
  var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
4483
4549
  _inherits(Nodes, _CRUDExtend);
4484
4550
  var _super = _createSuper(Nodes);
@@ -5369,6 +5435,7 @@ var ElasticPath = /*#__PURE__*/function () {
5369
5435
  this.SubscriptionDunningRules = new SubscriptionDunningRulesEndpoint(config);
5370
5436
  this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
5371
5437
  this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
5438
+ this.CustomRelationships = new CustomRelationshipsEndpoint(config);
5372
5439
  }
5373
5440
 
5374
5441
  // 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 = "4.0.0";
1088
+ var version = "6.0.0";
1089
1089
 
1090
1090
  var LocalStorageFactory = /*#__PURE__*/function () {
1091
1091
  function LocalStorageFactory() {
@@ -5651,6 +5651,72 @@
5651
5651
  return SubscriptionInvoicesEndpoint;
5652
5652
  }();
5653
5653
 
5654
+ var CustomRelationshipsEndpoint = /*#__PURE__*/function () {
5655
+ function CustomRelationshipsEndpoint(endpoint) {
5656
+ _classCallCheck(this, CustomRelationshipsEndpoint);
5657
+ var config = _objectSpread2({}, endpoint);
5658
+ config.version = 'pcm';
5659
+ this.request = new RequestFactory(config);
5660
+ this.endpoint = 'custom_relationships';
5661
+ }
5662
+ _createClass(CustomRelationshipsEndpoint, [{
5663
+ key: "All",
5664
+ value: function All() {
5665
+ var filter = this.filter,
5666
+ limit = this.limit,
5667
+ offset = this.offset;
5668
+ return this.request.send(buildURL(this.endpoint, {
5669
+ filter: filter,
5670
+ limit: limit,
5671
+ offset: offset
5672
+ }), 'GET');
5673
+ }
5674
+ }, {
5675
+ key: "Get",
5676
+ value: function Get(slug) {
5677
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'GET');
5678
+ }
5679
+ }, {
5680
+ key: "Create",
5681
+ value: function Create(body) {
5682
+ return this.request.send(this.endpoint, 'POST', _objectSpread2(_objectSpread2({}, body), {}, {
5683
+ type: 'custom-relationship'
5684
+ }));
5685
+ }
5686
+ }, {
5687
+ key: "Update",
5688
+ value: function Update(slug, body) {
5689
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'PUT', _objectSpread2(_objectSpread2({}, body), {}, {
5690
+ type: 'custom-relationship'
5691
+ }));
5692
+ }
5693
+ }, {
5694
+ key: "Delete",
5695
+ value: function Delete(slug) {
5696
+ return this.request.send("".concat(this.endpoint, "/").concat(slug), 'DELETE');
5697
+ }
5698
+ }, {
5699
+ key: "Filter",
5700
+ value: function Filter(filter) {
5701
+ this.filter = filter;
5702
+ return this;
5703
+ }
5704
+ }, {
5705
+ key: "Limit",
5706
+ value: function Limit(value) {
5707
+ this.limit = value;
5708
+ return this;
5709
+ }
5710
+ }, {
5711
+ key: "Offset",
5712
+ value: function Offset(value) {
5713
+ this.offset = value;
5714
+ return this;
5715
+ }
5716
+ }]);
5717
+ return CustomRelationshipsEndpoint;
5718
+ }();
5719
+
5654
5720
  var Nodes$1 = /*#__PURE__*/function (_CRUDExtend) {
5655
5721
  _inherits(Nodes, _CRUDExtend);
5656
5722
  var _super = _createSuper(Nodes);
@@ -6541,6 +6607,7 @@
6541
6607
  this.SubscriptionDunningRules = new SubscriptionDunningRulesEndpoint(config);
6542
6608
  this.SubscriptionProrationPolicies = new SubscriptionProrationPoliciesEndpoint(config);
6543
6609
  this.SubscriptionInvoices = new SubscriptionInvoicesEndpoint(config);
6610
+ this.CustomRelationships = new CustomRelationshipsEndpoint(config);
6544
6611
  }
6545
6612
 
6546
6613
  // 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": "4.0.0",
4
+ "version": "6.0.0",
5
5
  "homepage": "https://github.com/elasticpath/js-sdk",
6
6
  "author": "Elastic Path (https://elasticpath.com/)",
7
7
  "files": [