@elasticpath/js-sdk 19.0.1 → 21.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 = "19.0.1";
533
+ var version = "21.0.0";
534
534
 
535
535
  var LocalStorageFactory = /*#__PURE__*/function () {
536
536
  function LocalStorageFactory() {
@@ -3355,9 +3355,11 @@ var UserAuthenticationPasswordProfileEndpoint = /*#__PURE__*/function (_CRUDExte
3355
3355
  }
3356
3356
  }, {
3357
3357
  key: "Update",
3358
- value: function Update(realmId, userAuthenticationInfoId, userAuthenticationPasswordProfileId, body) {
3359
- var token = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
3360
- return this.request.send("".concat(this.endpoint.replace('{{realmId}}', realmId).replace('{{userAuthenticationInfoId}}', userAuthenticationInfoId), "/").concat(userAuthenticationPasswordProfileId), 'PUT', body.data, token);
3358
+ value: function Update(realmId, userAuthenticationInfoId, userAuthenticationPasswordProfileId, body, accountManagementAuthenticationToken) {
3359
+ var token = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
3360
+ return this.request.send("".concat(this.endpoint.replace('{{realmId}}', realmId).replace('{{userAuthenticationInfoId}}', userAuthenticationInfoId), "/").concat(userAuthenticationPasswordProfileId), 'PUT', body.data, token, this, true, 'v2', {
3361
+ 'EP-Account-Management-Authentication-Token': accountManagementAuthenticationToken
3362
+ });
3361
3363
  }
3362
3364
  }, {
3363
3365
  key: "Delete",
@@ -4377,6 +4379,11 @@ var RulePromotionsEndpoint = /*#__PURE__*/function (_CRUDExtend) {
4377
4379
  filter: filter
4378
4380
  }), 'GET', undefined, undefined, this);
4379
4381
  }
4382
+ }, {
4383
+ key: "CancelJob",
4384
+ value: function CancelJob(promotionId, jobId) {
4385
+ return this.request.send("".concat(this.endpoint, "/").concat(promotionId, "/jobs/").concat(jobId, "/cancel"), 'POST');
4386
+ }
4380
4387
  }, {
4381
4388
  key: "AddCodes",
4382
4389
  value: function AddCodes(promotionId, codes) {
package/dist/index.d.ts CHANGED
@@ -7083,33 +7083,36 @@ interface PCMVariationsEndpoint
7083
7083
  */
7084
7084
 
7085
7085
  interface UserAuthenticationPasswordProfileBody {
7086
- type: string
7087
- password_profile_id: string
7088
- username: string
7089
- password : string
7086
+ type: string
7087
+ password_profile_id: string
7088
+ username: string
7089
+ password: string
7090
7090
  }
7091
7091
 
7092
7092
  interface UserAuthenticationPasswordProfileUpdateBody {
7093
- type: string
7094
- username: string
7095
- password : string
7093
+ type: string
7094
+ username: string
7095
+ password: string
7096
7096
  }
7097
7097
 
7098
- interface UserAuthenticationPasswordProfile extends UserAuthenticationPasswordProfileBody, Identifiable {
7099
- meta: {
7100
- timestamps: {
7101
- created_at: string
7102
- updated_at: string
7103
- }
7098
+ interface UserAuthenticationPasswordProfile
7099
+ extends UserAuthenticationPasswordProfileBody,
7100
+ Identifiable {
7101
+ meta: {
7102
+ timestamps: {
7103
+ created_at: string
7104
+ updated_at: string
7104
7105
  }
7105
- links: {}
7106
- relationships: {}
7106
+ }
7107
+ links: {}
7108
+ relationships: {}
7107
7109
  }
7108
7110
 
7109
- interface UserAuthenticationPasswordProfileResponse extends Resource<UserAuthenticationPasswordProfile> {
7110
- links: {
7111
- self: string
7112
- }
7111
+ interface UserAuthenticationPasswordProfileResponse
7112
+ extends Resource<UserAuthenticationPasswordProfile> {
7113
+ links: {
7114
+ self: string
7115
+ }
7113
7116
  }
7114
7117
 
7115
7118
  /**
@@ -7117,49 +7120,76 @@ interface UserAuthenticationPasswordProfileResponse extends Resource<UserAuthent
7117
7120
  * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/user-authentication-password-profiles/index.html
7118
7121
  */
7119
7122
  interface UserAuthenticationPasswordProfileEndpoint {
7120
- /**
7121
- * Read All User Authentication Password Info Profile
7122
- * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/user-authentication-password-profiles/get-all-user-authentication-password-profile.html
7123
- * @param realmId - The ID for the authentication-realm.
7124
- * @param userAuthenticationInfoId - The ID for the user authentication info.
7125
- */
7126
- All(realmId: string, userAuthenticationInfoId: string, token?: string, headers?): Promise<ResourceList<UserAuthenticationPasswordProfile>>
7127
- /**
7128
- * Get a User Authentication Password Info Profile
7129
- * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/user-authentication-password-profiles/get-a-user-authentication-password-profile.html
7130
- * @param realmId - The ID for the authentication-realm.
7131
- * @param userAuthenticationInfoId - The ID for the user authentication info.
7132
- * @param userAuthenticationPasswordProfileId - The ID for the user authentication password profile info.
7133
- */
7134
- Get(realmId: string, userAuthenticationInfoId: string, userAuthenticationPasswordProfileId: string, token?: string): Promise<UserAuthenticationPasswordProfileResponse>
7123
+ /**
7124
+ * Read All User Authentication Password Info Profile
7125
+ * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/user-authentication-password-profiles/get-all-user-authentication-password-profile.html
7126
+ * @param realmId - The ID for the authentication-realm.
7127
+ * @param userAuthenticationInfoId - The ID for the user authentication info.
7128
+ */
7129
+ All(
7130
+ realmId: string,
7131
+ userAuthenticationInfoId: string,
7132
+ token?: string,
7133
+ headers?
7134
+ ): Promise<ResourceList<UserAuthenticationPasswordProfile>>
7135
+ /**
7136
+ * Get a User Authentication Password Info Profile
7137
+ * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/user-authentication-password-profiles/get-a-user-authentication-password-profile.html
7138
+ * @param realmId - The ID for the authentication-realm.
7139
+ * @param userAuthenticationInfoId - The ID for the user authentication info.
7140
+ * @param userAuthenticationPasswordProfileId - The ID for the user authentication password profile info.
7141
+ */
7142
+ Get(
7143
+ realmId: string,
7144
+ userAuthenticationInfoId: string,
7145
+ userAuthenticationPasswordProfileId: string,
7146
+ token?: string
7147
+ ): Promise<UserAuthenticationPasswordProfileResponse>
7135
7148
 
7136
- /**
7137
- * Create an User Authentication Password Info Profile
7138
- * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/user-authentication-password-profiles/create-a-user-authentication-password-profile.html
7139
- * @param realmId - The ID for the authentication-realm.
7140
- * @param userAuthenticationInfoId - The ID for the user authentication info.
7141
- * @param body - The User Authentication Password Profile Info object
7142
- */
7143
- Create(realmId: string, userAuthenticationInfoId: string, body: { data: UserAuthenticationPasswordProfileBody }, token?: string): Promise<UserAuthenticationPasswordProfileResponse>
7149
+ /**
7150
+ * Create an User Authentication Password Info Profile
7151
+ * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/user-authentication-password-profiles/create-a-user-authentication-password-profile.html
7152
+ * @param realmId - The ID for the authentication-realm.
7153
+ * @param userAuthenticationInfoId - The ID for the user authentication info.
7154
+ * @param body - The User Authentication Password Profile Info object
7155
+ */
7156
+ Create(
7157
+ realmId: string,
7158
+ userAuthenticationInfoId: string,
7159
+ body: { data: UserAuthenticationPasswordProfileBody },
7160
+ token?: string
7161
+ ): Promise<UserAuthenticationPasswordProfileResponse>
7144
7162
 
7145
- /**
7146
- * Update an User Authentication Password Profile Info
7147
- * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/user-authentication-password-profiles/update-a-user-authentication-password-profile.html
7148
- * @param realmId - The ID for the authentication-realm.
7149
- * @param userAuthenticationInfoId - The ID for the user authentication info.
7150
- * @param userAuthenticationPasswordProfileId - The ID for the user authentication password profile info.
7151
- * @param body - The User Authentication Password Profile Info object
7152
- */
7153
- Update(realmId: string, userAuthenticationInfoId: string,userAuthenticationPasswordProfileId: string, body: { data: UserAuthenticationPasswordProfileUpdateBody }, token?: string): Promise<UserAuthenticationPasswordProfileResponse>
7163
+ /**
7164
+ * Update an User Authentication Password Profile Info
7165
+ * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/user-authentication-password-profiles/update-a-user-authentication-password-profile.html
7166
+ * @param realmId - The ID for the authentication-realm.
7167
+ * @param userAuthenticationInfoId - The ID for the user authentication info.
7168
+ * @param userAuthenticationPasswordProfileId - The ID for the user authentication password profile info.
7169
+ * @param body - The User Authentication Password Profile Info object
7170
+ */
7171
+ Update(
7172
+ realmId: string,
7173
+ userAuthenticationInfoId: string,
7174
+ userAuthenticationPasswordProfileId: string,
7175
+ body: { data: UserAuthenticationPasswordProfileUpdateBody },
7176
+ accountManagementAuthenticationToken: string,
7177
+ token?: string
7178
+ ): Promise<UserAuthenticationPasswordProfileResponse>
7154
7179
 
7155
- /**
7156
- * Delete an User Authentication Password Profile Info
7157
- * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/password-profiles/delete-a-user-authentication-password-profile.html
7158
- * @param realmId - The ID for the authentication-realm containing the Password profiles.
7159
- * @param userAuthenticationInfoId - The ID for the user authentication info.
7160
- * @param userAuthenticationPasswordProfileId - The ID for the user authentication password profile info.
7161
- */
7162
- Delete(realmId: string, userAuthenticationInfoId: string, userAuthenticationPasswordProfileId: string, token?: string)
7180
+ /**
7181
+ * Delete an User Authentication Password Profile Info
7182
+ * DOCS: https://documentation.elasticpath.com/commerce-cloud/docs/api/single-sign-on/password-profiles/delete-a-user-authentication-password-profile.html
7183
+ * @param realmId - The ID for the authentication-realm containing the Password profiles.
7184
+ * @param userAuthenticationInfoId - The ID for the user authentication info.
7185
+ * @param userAuthenticationPasswordProfileId - The ID for the user authentication password profile info.
7186
+ */
7187
+ Delete(
7188
+ realmId: string,
7189
+ userAuthenticationInfoId: string,
7190
+ userAuthenticationPasswordProfileId: string,
7191
+ token?: string
7192
+ )
7163
7193
  }
7164
7194
 
7165
7195
  interface MetricsBase {
@@ -8110,6 +8140,8 @@ interface RulePromotionsEndpoint
8110
8140
  body: RulePromotionCodesJob
8111
8141
  ): Promise<Resource<RulePromotionJob>>
8112
8142
 
8143
+ CancelJob(promotionId: string, jobId: string): Promise<{}>
8144
+
8113
8145
  DeleteCode(promotionId: string, codeId: string): Promise<{}>
8114
8146
 
8115
8147
  DeleteCodes(
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 = "19.0.1";
522
+ var version = "21.0.0";
523
523
 
524
524
  var LocalStorageFactory = /*#__PURE__*/function () {
525
525
  function LocalStorageFactory() {
@@ -3344,9 +3344,11 @@ var UserAuthenticationPasswordProfileEndpoint = /*#__PURE__*/function (_CRUDExte
3344
3344
  }
3345
3345
  }, {
3346
3346
  key: "Update",
3347
- value: function Update(realmId, userAuthenticationInfoId, userAuthenticationPasswordProfileId, body) {
3348
- var token = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
3349
- return this.request.send("".concat(this.endpoint.replace('{{realmId}}', realmId).replace('{{userAuthenticationInfoId}}', userAuthenticationInfoId), "/").concat(userAuthenticationPasswordProfileId), 'PUT', body.data, token);
3347
+ value: function Update(realmId, userAuthenticationInfoId, userAuthenticationPasswordProfileId, body, accountManagementAuthenticationToken) {
3348
+ var token = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
3349
+ return this.request.send("".concat(this.endpoint.replace('{{realmId}}', realmId).replace('{{userAuthenticationInfoId}}', userAuthenticationInfoId), "/").concat(userAuthenticationPasswordProfileId), 'PUT', body.data, token, this, true, 'v2', {
3350
+ 'EP-Account-Management-Authentication-Token': accountManagementAuthenticationToken
3351
+ });
3350
3352
  }
3351
3353
  }, {
3352
3354
  key: "Delete",
@@ -4366,6 +4368,11 @@ var RulePromotionsEndpoint = /*#__PURE__*/function (_CRUDExtend) {
4366
4368
  filter: filter
4367
4369
  }), 'GET', undefined, undefined, this);
4368
4370
  }
4371
+ }, {
4372
+ key: "CancelJob",
4373
+ value: function CancelJob(promotionId, jobId) {
4374
+ return this.request.send("".concat(this.endpoint, "/").concat(promotionId, "/jobs/").concat(jobId, "/cancel"), 'POST');
4375
+ }
4369
4376
  }, {
4370
4377
  key: "AddCodes",
4371
4378
  value: function AddCodes(promotionId, codes) {
package/dist/index.js CHANGED
@@ -1085,7 +1085,7 @@
1085
1085
  globalThis.Response = browserPonyfill.exports.Response;
1086
1086
  }
1087
1087
 
1088
- var version = "19.0.1";
1088
+ var version = "21.0.0";
1089
1089
 
1090
1090
  var LocalStorageFactory = /*#__PURE__*/function () {
1091
1091
  function LocalStorageFactory() {
@@ -4516,9 +4516,11 @@
4516
4516
  }
4517
4517
  }, {
4518
4518
  key: "Update",
4519
- value: function Update(realmId, userAuthenticationInfoId, userAuthenticationPasswordProfileId, body) {
4520
- var token = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
4521
- return this.request.send("".concat(this.endpoint.replace('{{realmId}}', realmId).replace('{{userAuthenticationInfoId}}', userAuthenticationInfoId), "/").concat(userAuthenticationPasswordProfileId), 'PUT', body.data, token);
4519
+ value: function Update(realmId, userAuthenticationInfoId, userAuthenticationPasswordProfileId, body, accountManagementAuthenticationToken) {
4520
+ var token = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;
4521
+ return this.request.send("".concat(this.endpoint.replace('{{realmId}}', realmId).replace('{{userAuthenticationInfoId}}', userAuthenticationInfoId), "/").concat(userAuthenticationPasswordProfileId), 'PUT', body.data, token, this, true, 'v2', {
4522
+ 'EP-Account-Management-Authentication-Token': accountManagementAuthenticationToken
4523
+ });
4522
4524
  }
4523
4525
  }, {
4524
4526
  key: "Delete",
@@ -5538,6 +5540,11 @@
5538
5540
  filter: filter
5539
5541
  }), 'GET', undefined, undefined, this);
5540
5542
  }
5543
+ }, {
5544
+ key: "CancelJob",
5545
+ value: function CancelJob(promotionId, jobId) {
5546
+ return this.request.send("".concat(this.endpoint, "/").concat(promotionId, "/jobs/").concat(jobId, "/cancel"), 'POST');
5547
+ }
5541
5548
  }, {
5542
5549
  key: "AddCodes",
5543
5550
  value: function AddCodes(promotionId, codes) {
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": "19.0.1",
4
+ "version": "21.0.0",
5
5
  "homepage": "https://github.com/elasticpath/js-sdk",
6
6
  "author": "Elastic Path (https://elasticpath.com/)",
7
7
  "files": [