@elasticpath/js-sdk 4.0.0 → 5.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 = "5.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
@@ -8224,6 +8224,107 @@ interface SubscriptionProrationPoliciesEndpoint
8224
8224
  endpoint: 'proration-policies'
8225
8225
  }
8226
8226
 
8227
+ /**
8228
+ * Custom Relationships
8229
+ * Description: Custom Relationships
8230
+ */
8231
+
8232
+
8233
+ interface CustomRelationshipBaseAttributes {
8234
+ name: string
8235
+ description?: string
8236
+ slug: string
8237
+ }
8238
+
8239
+ interface CustomRelationshipBase {
8240
+ type: 'custom-relationship'
8241
+ attributes: CustomRelationshipBaseAttributes
8242
+ meta: {
8243
+ owner: 'organization' | 'store'
8244
+ timestamps: {
8245
+ created_at: string
8246
+ updated_at: string
8247
+ }
8248
+ }
8249
+ }
8250
+
8251
+ interface CustomRelationship
8252
+ extends Identifiable,
8253
+ CustomRelationshipBase {}
8254
+
8255
+ interface CreateCustomRelationshipBody
8256
+ extends Pick<CustomRelationshipBase, 'attributes'> {}
8257
+
8258
+ interface UpdateCustomRelationshipBody
8259
+ extends Identifiable,
8260
+ Pick<CustomRelationshipBase, 'attributes'> {}
8261
+
8262
+ interface CustomRelationshipsFilter {
8263
+ eq?: {
8264
+ owner?: 'organization' | 'store'
8265
+ }
8266
+ }
8267
+
8268
+ interface CustomRelationshipsListResponse
8269
+ extends ResourceList<CustomRelationship> {
8270
+ links?: { [key: string]: string | null } | {}
8271
+ meta: {
8272
+ results: {
8273
+ total: number
8274
+ }
8275
+ }
8276
+ }
8277
+
8278
+ interface CustomRelationshipsEndpoint {
8279
+ endpoint: 'custom_relationships'
8280
+ /**
8281
+ * List Custom Relationships
8282
+ */
8283
+ All(): Promise<CustomRelationshipsListResponse>
8284
+
8285
+ /**
8286
+ * Get Custom Relationship
8287
+ * @param slug - The slug of the Custom Relationship. It should always be prefixed with 'CRP_'
8288
+ */
8289
+ Get(slug: string): Promise<Resource<CustomRelationship>>
8290
+
8291
+ /**
8292
+ * Create Custom Relationship
8293
+ * @param body - The base attributes of the Custom Relationships
8294
+ */
8295
+ Create(
8296
+ body: CreateCustomRelationshipBody
8297
+ ): Promise<Resource<CustomRelationship>>
8298
+
8299
+ /**
8300
+ * Update Custom Relationship
8301
+ * @param slug - The slug of the Custom Relationship. It should always be prefixed with 'CRP_'
8302
+ * @param body - The base attributes of the Custom Relationships.
8303
+ * The Slug attribute cannot be updated and the slug within this object should match this function's first argument.
8304
+ */
8305
+ Update(
8306
+ slug: string,
8307
+ body: UpdateCustomRelationshipBody
8308
+ ): Promise<Resource<CustomRelationship>>
8309
+
8310
+ /**
8311
+ * Delete Custom Relationship
8312
+ * @param slug - The slug of the Custom Relationship. It should always be prefixed with 'CRP_'
8313
+ */
8314
+ Delete(slug: string): Promise<{}>
8315
+
8316
+ /**
8317
+ * Custom Relationship filtering
8318
+ * @param filter - The filter object.
8319
+ * Currently supports the 'eq' filter operator for the 'owner' field of the Custom Relationship.
8320
+ */
8321
+ Filter(filter: CustomRelationshipsFilter): CustomRelationshipsEndpoint
8322
+
8323
+ Limit(value: number): CustomRelationshipsEndpoint
8324
+
8325
+ Offset(value: number): CustomRelationshipsEndpoint
8326
+ }
8327
+
8227
8328
  // Type definitions for @elasticpath/js-sdk
8228
8329
 
8229
8330
 
@@ -8292,6 +8393,7 @@ declare class ElasticPath {
8292
8393
  SubscriptionDunningRules: SubscriptionDunningRulesEndpoint
8293
8394
  SubscriptionProrationPolicies: SubscriptionProrationPoliciesEndpoint
8294
8395
  SubscriptionInvoices: SubscriptionInvoicesEndpoint
8396
+ CustomRelationships: CustomRelationshipsEndpoint
8295
8397
 
8296
8398
  Cart(id?: string): CartEndpoint // This optional cart id is super worrying when using the SDK in a node server :/
8297
8399
  constructor(config: Config)
@@ -8310,4 +8412,4 @@ declare namespace elasticpath {
8310
8412
  }
8311
8413
  }
8312
8414
 
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 };
8415
+ 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 = "5.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 = "5.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": "5.0.0",
5
5
  "homepage": "https://github.com/elasticpath/js-sdk",
6
6
  "author": "Elastic Path (https://elasticpath.com/)",
7
7
  "files": [