@extrahorizon/javascript-sdk 8.9.0-dev-137-14a5300 → 8.9.0-dev-138-3022f93

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.
Files changed (30) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/index.cjs.js +38 -88
  3. package/build/index.mjs +38 -88
  4. package/build/types/mockType.d.ts +27 -21
  5. package/build/types/services/auth/oidc/providers/types.d.ts +4 -0
  6. package/build/types/services/events/index.d.ts +1 -2
  7. package/build/types/services/events/types.d.ts +5 -0
  8. package/build/types/services/localizations/index.d.ts +1 -2
  9. package/build/types/services/localizations/types.d.ts +5 -0
  10. package/build/types/services/notifications/index.d.ts +1 -2
  11. package/build/types/services/notifications/types.d.ts +5 -0
  12. package/build/types/services/notificationsV2/index.d.ts +1 -2
  13. package/build/types/services/notificationsV2/types.d.ts +5 -0
  14. package/build/types/services/profiles/index.d.ts +1 -2
  15. package/build/types/services/profiles/types.d.ts +5 -0
  16. package/build/types/services/tasks/schedules/types.d.ts +4 -0
  17. package/build/types/services/tasks/types.d.ts +11 -0
  18. package/build/types/services/templatesV2/index.d.ts +1 -2
  19. package/build/types/services/templatesV2/types.d.ts +5 -0
  20. package/build/types/services/users/index.d.ts +2 -4
  21. package/build/types/services/users/types.d.ts +5 -0
  22. package/build/types/version.d.ts +1 -1
  23. package/package.json +1 -1
  24. package/build/types/services/events/health.d.ts +0 -9
  25. package/build/types/services/localizations/health.d.ts +0 -9
  26. package/build/types/services/notifications/health.d.ts +0 -9
  27. package/build/types/services/notificationsV2/health.d.ts +0 -9
  28. package/build/types/services/profiles/health.d.ts +0 -9
  29. package/build/types/services/templatesV2/health.d.ts +0 -9
  30. package/build/types/services/users/health.d.ts +0 -9
package/CHANGELOG.md CHANGED
@@ -10,6 +10,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
  ### Added
11
11
  - Added the `exh.tasks.functions` methods `find`, `getByName`, `update`, `enable`, `disable` and `remove`
12
12
  - Added a `exh.users.findByEmail` method to find a user by their email address.
13
+ - Completed the `Task` type for changes made in TaskService 1.3.0 a while ago:
14
+ - Added the `retriedByTaskId`, `retryForTaskIds`, and `error` properties.
15
+ - Added the `retried` status.
16
+
17
+ ### Deprecated
18
+ - `exh.tasks.schedules.delete` is deprecated in favor of `exh.tasks.schedules.remove`
19
+ - `exh.auth.oidc.providers.delete` is deprecated in favor of `exh.auth.oidc.providers.remove`
13
20
 
14
21
  ### Fixed
15
22
  - Corrected the types for the `findFirst` (based) methods to indicate they may return `undefined` when no results are found.
@@ -1015,6 +1015,7 @@ exports.TaskStatus = void 0;
1015
1015
  TaskStatus["IN_PROGRESS"] = "inProgress";
1016
1016
  TaskStatus["COMPLETE"] = "complete";
1017
1017
  TaskStatus["FAILED"] = "failed";
1018
+ TaskStatus["RETRIED"] = "retried";
1018
1019
  TaskStatus["CANCELED"] = "canceled";
1019
1020
  })(exports.TaskStatus || (exports.TaskStatus = {}));
1020
1021
 
@@ -3474,10 +3475,13 @@ var providers = (oidcClient, httpWithAuth) => {
3474
3475
  const { data } = await oidcClient.post(httpWithAuth, `/oidc/providers/${providerId}/disable`, {});
3475
3476
  return data;
3476
3477
  },
3477
- async delete(providerId) {
3478
+ async remove(providerId) {
3478
3479
  const { data } = await oidcClient.delete(httpWithAuth, `/oidc/providers/${providerId}`);
3479
3480
  return data;
3480
3481
  },
3482
+ delete(providerId) {
3483
+ return this.remove(providerId);
3484
+ },
3481
3485
  };
3482
3486
  };
3483
3487
 
@@ -4097,10 +4101,13 @@ var schedules = (client, httpAuth) => {
4097
4101
  });
4098
4102
  return data;
4099
4103
  },
4100
- async delete(scheduleId, options) {
4104
+ async remove(scheduleId, options) {
4101
4105
  const { data } = await client.delete(httpAuth, `/schedules/${scheduleId}`, options);
4102
4106
  return data;
4103
4107
  },
4108
+ delete(scheduleId, options) {
4109
+ return this.remove(scheduleId, options);
4110
+ },
4104
4111
  async find(options) {
4105
4112
  const result = await query(options);
4106
4113
  return addPagersFn(query, options, result);
@@ -4308,17 +4315,6 @@ var groupRoles = (client, httpWithAuth) => ({
4308
4315
  },
4309
4316
  });
4310
4317
 
4311
- var health$7 = (userClient, http) => ({
4312
- /**
4313
- * Perform a health check
4314
- * @returns {boolean} success
4315
- */
4316
- async health() {
4317
- const result = await userClient.get(http, '/health');
4318
- return result.status === exports.Results.Success;
4319
- },
4320
- });
4321
-
4322
4318
  const settingsService = (client, httpWithAuth) => ({
4323
4319
  async getVerificationSettings(options) {
4324
4320
  const response = await client.get(httpWithAuth, '/settings/verification', options);
@@ -4501,6 +4497,10 @@ var users$1 = (userClient, httpWithAuth, http) => {
4501
4497
  const { data } = await userClient.put(httpWithAuth, '/email_templates', templates);
4502
4498
  return data;
4503
4499
  },
4500
+ async health() {
4501
+ const result = await userClient.get(http, '/health');
4502
+ return result.status === 200;
4503
+ },
4504
4504
  };
4505
4505
  };
4506
4506
 
@@ -4509,7 +4509,6 @@ const usersService = (httpWithAuth, http) => {
4509
4509
  basePath: USER_BASE,
4510
4510
  transformRequestData: decamelizeRequestData,
4511
4511
  });
4512
- const healthMethods = health$7(userClient, httpWithAuth);
4513
4512
  const usersMethods = users$1(userClient, httpWithAuth, http);
4514
4513
  const groupRolesMethods = groupRoles(userClient, httpWithAuth);
4515
4514
  const globalRolesMethods = globalRoles(userClient, httpWithAuth);
@@ -4517,7 +4516,6 @@ const usersService = (httpWithAuth, http) => {
4517
4516
  const forgotPasswordRequestsMethods = forgotPasswordRequestsService(userClient, httpWithAuth);
4518
4517
  const settingsMethods = settingsService(userClient, httpWithAuth);
4519
4518
  return {
4520
- ...healthMethods,
4521
4519
  ...usersMethods,
4522
4520
  groupRoles: groupRolesMethods,
4523
4521
  globalRoles: globalRolesMethods,
@@ -4899,7 +4897,7 @@ var appStoreSubscriptions = (client, httpAuth) => ({
4899
4897
  },
4900
4898
  });
4901
4899
 
4902
- var health$6 = (client, httpAuth) => ({
4900
+ var health = (client, httpAuth) => ({
4903
4901
  /**
4904
4902
  * Check if the service is available
4905
4903
  * @returns true if service is up and running
@@ -5103,7 +5101,7 @@ const paymentsService = (httpWithAuth) => {
5103
5101
  basePath: PAYMENTS_BASE,
5104
5102
  });
5105
5103
  return {
5106
- ...health$6(client, httpWithAuth),
5104
+ ...health(client, httpWithAuth),
5107
5105
  products: products(client, httpWithAuth),
5108
5106
  orders: orders(client, httpWithAuth),
5109
5107
  subscriptions: subscriptions$1(client, httpWithAuth),
@@ -5125,17 +5123,6 @@ var countries = (client, httpAuth) => ({
5125
5123
  },
5126
5124
  });
5127
5125
 
5128
- var health$5 = (client, http) => ({
5129
- /**
5130
- * Perform a health check
5131
- * @returns {boolean} success
5132
- */
5133
- async health() {
5134
- const result = await client.get(http, '/health');
5135
- return result.status === exports.Results.Success;
5136
- },
5137
- });
5138
-
5139
5126
  var languages = (client, httpAuth) => ({
5140
5127
  async getLanguages(options) {
5141
5128
  return (await client.get(httpAuth, '/languages', options)).data.data;
@@ -5169,6 +5156,10 @@ var localizations = (client, httpAuth) => ({
5169
5156
  customResponseKeys: ['*'],
5170
5157
  })).data;
5171
5158
  },
5159
+ async health() {
5160
+ const result = await client.get(httpAuth, '/health');
5161
+ return result.status === 200;
5162
+ },
5172
5163
  });
5173
5164
 
5174
5165
  const localizationsService = (httpWithAuth) => {
@@ -5177,7 +5168,6 @@ const localizationsService = (httpWithAuth) => {
5177
5168
  basePath: LOCALIZATIONS_BASE,
5178
5169
  });
5179
5170
  return {
5180
- ...health$5(client, httpWithAuth),
5181
5171
  ...localizations(client, httpWithAuth),
5182
5172
  ...countries(client, httpWithAuth),
5183
5173
  ...languages(client, httpWithAuth),
@@ -5202,17 +5192,6 @@ var groups = (client, httpAuth) => ({
5202
5192
  },
5203
5193
  });
5204
5194
 
5205
- var health$4 = (client, httpAuth) => ({
5206
- /**
5207
- * Perform a health check for profiles service
5208
- * @returns {boolean} success
5209
- */
5210
- async health() {
5211
- const result = await client.get(httpAuth, '/health');
5212
- return result.status === exports.Results.Success;
5213
- },
5214
- });
5215
-
5216
5195
  var logs = (client, httpAuth) => {
5217
5196
  function partialApplyFind(profileId, groupId) {
5218
5197
  return async (options) => (await client.get(httpAuth, `/${profileId}/groups/${groupId}/logs/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
@@ -5283,6 +5262,10 @@ var profiles = (client, httpAuth) => ({
5283
5262
  async getImpediments(options) {
5284
5263
  return (await client.get(httpAuth, '/impediments', options)).data;
5285
5264
  },
5265
+ async health() {
5266
+ const result = await client.get(httpAuth, '/health');
5267
+ return result.status === 200;
5268
+ },
5286
5269
  });
5287
5270
 
5288
5271
  const profilesService = (httpWithAuth) => {
@@ -5291,24 +5274,12 @@ const profilesService = (httpWithAuth) => {
5291
5274
  basePath: PROFILES_BASE,
5292
5275
  });
5293
5276
  return {
5294
- ...health$4(client, httpWithAuth),
5295
5277
  ...profiles(client, httpWithAuth),
5296
5278
  groups: groups(client, httpWithAuth),
5297
5279
  logs: logs(client, httpWithAuth),
5298
5280
  };
5299
5281
  };
5300
5282
 
5301
- var health$3 = (client, http) => ({
5302
- /**
5303
- * Perform a health check
5304
- * @returns {boolean} success
5305
- */
5306
- async health() {
5307
- const result = await client.get(http, '/health');
5308
- return result.status === exports.Results.Success;
5309
- },
5310
- });
5311
-
5312
5283
  var notifications = (client, httpAuth) => {
5313
5284
  async function find(options) {
5314
5285
  return (await client.get(httpAuth, `/notifications${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
@@ -5354,6 +5325,10 @@ var notifications = (client, httpAuth) => {
5354
5325
  async getTypes(options) {
5355
5326
  return (await client.get(httpAuth, '/types', options)).data;
5356
5327
  },
5328
+ async health() {
5329
+ const result = await client.get(httpAuth, '/health');
5330
+ return result.status === 200;
5331
+ },
5357
5332
  };
5358
5333
  };
5359
5334
 
@@ -5383,23 +5358,11 @@ const notificationsService = (httpWithAuth) => {
5383
5358
  transformRequestData: decamelizeRequestData,
5384
5359
  });
5385
5360
  return {
5386
- ...health$3(client, httpWithAuth),
5387
5361
  ...notifications(client, httpWithAuth),
5388
5362
  settings: settings(client, httpWithAuth),
5389
5363
  };
5390
5364
  };
5391
5365
 
5392
- var health$2 = (client, http) => ({
5393
- /**
5394
- * Perform a health check
5395
- * @returns {boolean} success
5396
- */
5397
- async health() {
5398
- const result = await client.get(http, '/health');
5399
- return result.status === exports.Results.Success;
5400
- },
5401
- });
5402
-
5403
5366
  var notificationsV2 = (client, httpWithAuth) => {
5404
5367
  async function find(options) {
5405
5368
  const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
@@ -5436,6 +5399,10 @@ var notificationsV2 = (client, httpWithAuth) => {
5436
5399
  const rqlWithNotificationId = rqlBuilder().eq('id', notificationId).build();
5437
5400
  return await this.findFirst({ ...options, rql: rqlWithNotificationId });
5438
5401
  },
5402
+ async health() {
5403
+ const result = await client.get(httpWithAuth, '/health');
5404
+ return result.status === 200;
5405
+ },
5439
5406
  };
5440
5407
  };
5441
5408
 
@@ -5484,7 +5451,6 @@ const notificationsV2Service = (httpWithAuth) => {
5484
5451
  basePath: NOTIFICATIONS_V2_BASE,
5485
5452
  });
5486
5453
  return {
5487
- ...health$2(client, httpWithAuth),
5488
5454
  ...notificationsV2(client, httpWithAuth),
5489
5455
  userSettings: notificationV2UserSettings(client, httpWithAuth),
5490
5456
  };
@@ -5510,16 +5476,9 @@ var events = (client, httpAuth) => ({
5510
5476
  }
5511
5477
  return (await client.post(httpAuth, '/', requestBody, requestOptions)).data;
5512
5478
  },
5513
- });
5514
-
5515
- var health$1 = (client, http) => ({
5516
- /**
5517
- * Perform a health check
5518
- * @returns {boolean} success
5519
- */
5520
5479
  async health() {
5521
- const result = await client.get(http, '/health');
5522
- return result.status === exports.Results.Success;
5480
+ const result = await client.get(httpAuth, '/health');
5481
+ return result.status === 200;
5523
5482
  },
5524
5483
  });
5525
5484
 
@@ -5548,7 +5507,6 @@ const eventsService = (httpWithAuth) => {
5548
5507
  transformRequestData: decamelizeRequestData,
5549
5508
  });
5550
5509
  return {
5551
- ...health$1(client, httpWithAuth),
5552
5510
  ...events(client, httpWithAuth),
5553
5511
  subscriptions: subscriptions(client, httpWithAuth),
5554
5512
  };
@@ -5580,17 +5538,6 @@ const logsService = (httpWithAuth) => {
5580
5538
  };
5581
5539
  };
5582
5540
 
5583
- var health = (client, http) => ({
5584
- /**
5585
- * Perform a health check
5586
- * @returns {boolean} success
5587
- */
5588
- async health() {
5589
- const result = await client.get(http, '/health');
5590
- return result.status === exports.Results.Success;
5591
- },
5592
- });
5593
-
5594
5541
  var templatesV2 = (client, httpWithAuth) => {
5595
5542
  async function find(options) {
5596
5543
  const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
@@ -5647,6 +5594,10 @@ var templatesV2 = (client, httpWithAuth) => {
5647
5594
  const result = await find(options);
5648
5595
  return result.data[0];
5649
5596
  },
5597
+ async health() {
5598
+ const result = await client.get(httpWithAuth, '/health');
5599
+ return result.status === 200;
5600
+ },
5650
5601
  };
5651
5602
  };
5652
5603
 
@@ -5655,12 +5606,11 @@ const templatesV2Service = (httpWithAuth) => {
5655
5606
  basePath: TEMPLATES_V2_BASE,
5656
5607
  });
5657
5608
  return {
5658
- ...health(client, httpWithAuth),
5659
5609
  ...templatesV2(client, httpWithAuth),
5660
5610
  };
5661
5611
  };
5662
5612
 
5663
- const version = '8.9.0-dev-137-14a5300';
5613
+ const version = '8.9.0-dev-138-3022f93';
5664
5614
 
5665
5615
  /**
5666
5616
  * Create ExtraHorizon client.
package/build/index.mjs CHANGED
@@ -985,6 +985,7 @@ var TaskStatus;
985
985
  TaskStatus["IN_PROGRESS"] = "inProgress";
986
986
  TaskStatus["COMPLETE"] = "complete";
987
987
  TaskStatus["FAILED"] = "failed";
988
+ TaskStatus["RETRIED"] = "retried";
988
989
  TaskStatus["CANCELED"] = "canceled";
989
990
  })(TaskStatus || (TaskStatus = {}));
990
991
 
@@ -3444,10 +3445,13 @@ var providers = (oidcClient, httpWithAuth) => {
3444
3445
  const { data } = await oidcClient.post(httpWithAuth, `/oidc/providers/${providerId}/disable`, {});
3445
3446
  return data;
3446
3447
  },
3447
- async delete(providerId) {
3448
+ async remove(providerId) {
3448
3449
  const { data } = await oidcClient.delete(httpWithAuth, `/oidc/providers/${providerId}`);
3449
3450
  return data;
3450
3451
  },
3452
+ delete(providerId) {
3453
+ return this.remove(providerId);
3454
+ },
3451
3455
  };
3452
3456
  };
3453
3457
 
@@ -4067,10 +4071,13 @@ var schedules = (client, httpAuth) => {
4067
4071
  });
4068
4072
  return data;
4069
4073
  },
4070
- async delete(scheduleId, options) {
4074
+ async remove(scheduleId, options) {
4071
4075
  const { data } = await client.delete(httpAuth, `/schedules/${scheduleId}`, options);
4072
4076
  return data;
4073
4077
  },
4078
+ delete(scheduleId, options) {
4079
+ return this.remove(scheduleId, options);
4080
+ },
4074
4081
  async find(options) {
4075
4082
  const result = await query(options);
4076
4083
  return addPagersFn(query, options, result);
@@ -4278,17 +4285,6 @@ var groupRoles = (client, httpWithAuth) => ({
4278
4285
  },
4279
4286
  });
4280
4287
 
4281
- var health$7 = (userClient, http) => ({
4282
- /**
4283
- * Perform a health check
4284
- * @returns {boolean} success
4285
- */
4286
- async health() {
4287
- const result = await userClient.get(http, '/health');
4288
- return result.status === Results.Success;
4289
- },
4290
- });
4291
-
4292
4288
  const settingsService = (client, httpWithAuth) => ({
4293
4289
  async getVerificationSettings(options) {
4294
4290
  const response = await client.get(httpWithAuth, '/settings/verification', options);
@@ -4471,6 +4467,10 @@ var users$1 = (userClient, httpWithAuth, http) => {
4471
4467
  const { data } = await userClient.put(httpWithAuth, '/email_templates', templates);
4472
4468
  return data;
4473
4469
  },
4470
+ async health() {
4471
+ const result = await userClient.get(http, '/health');
4472
+ return result.status === 200;
4473
+ },
4474
4474
  };
4475
4475
  };
4476
4476
 
@@ -4479,7 +4479,6 @@ const usersService = (httpWithAuth, http) => {
4479
4479
  basePath: USER_BASE,
4480
4480
  transformRequestData: decamelizeRequestData,
4481
4481
  });
4482
- const healthMethods = health$7(userClient, httpWithAuth);
4483
4482
  const usersMethods = users$1(userClient, httpWithAuth, http);
4484
4483
  const groupRolesMethods = groupRoles(userClient, httpWithAuth);
4485
4484
  const globalRolesMethods = globalRoles(userClient, httpWithAuth);
@@ -4487,7 +4486,6 @@ const usersService = (httpWithAuth, http) => {
4487
4486
  const forgotPasswordRequestsMethods = forgotPasswordRequestsService(userClient, httpWithAuth);
4488
4487
  const settingsMethods = settingsService(userClient, httpWithAuth);
4489
4488
  return {
4490
- ...healthMethods,
4491
4489
  ...usersMethods,
4492
4490
  groupRoles: groupRolesMethods,
4493
4491
  globalRoles: globalRolesMethods,
@@ -4869,7 +4867,7 @@ var appStoreSubscriptions = (client, httpAuth) => ({
4869
4867
  },
4870
4868
  });
4871
4869
 
4872
- var health$6 = (client, httpAuth) => ({
4870
+ var health = (client, httpAuth) => ({
4873
4871
  /**
4874
4872
  * Check if the service is available
4875
4873
  * @returns true if service is up and running
@@ -5073,7 +5071,7 @@ const paymentsService = (httpWithAuth) => {
5073
5071
  basePath: PAYMENTS_BASE,
5074
5072
  });
5075
5073
  return {
5076
- ...health$6(client, httpWithAuth),
5074
+ ...health(client, httpWithAuth),
5077
5075
  products: products(client, httpWithAuth),
5078
5076
  orders: orders(client, httpWithAuth),
5079
5077
  subscriptions: subscriptions$1(client, httpWithAuth),
@@ -5095,17 +5093,6 @@ var countries = (client, httpAuth) => ({
5095
5093
  },
5096
5094
  });
5097
5095
 
5098
- var health$5 = (client, http) => ({
5099
- /**
5100
- * Perform a health check
5101
- * @returns {boolean} success
5102
- */
5103
- async health() {
5104
- const result = await client.get(http, '/health');
5105
- return result.status === Results.Success;
5106
- },
5107
- });
5108
-
5109
5096
  var languages = (client, httpAuth) => ({
5110
5097
  async getLanguages(options) {
5111
5098
  return (await client.get(httpAuth, '/languages', options)).data.data;
@@ -5139,6 +5126,10 @@ var localizations = (client, httpAuth) => ({
5139
5126
  customResponseKeys: ['*'],
5140
5127
  })).data;
5141
5128
  },
5129
+ async health() {
5130
+ const result = await client.get(httpAuth, '/health');
5131
+ return result.status === 200;
5132
+ },
5142
5133
  });
5143
5134
 
5144
5135
  const localizationsService = (httpWithAuth) => {
@@ -5147,7 +5138,6 @@ const localizationsService = (httpWithAuth) => {
5147
5138
  basePath: LOCALIZATIONS_BASE,
5148
5139
  });
5149
5140
  return {
5150
- ...health$5(client, httpWithAuth),
5151
5141
  ...localizations(client, httpWithAuth),
5152
5142
  ...countries(client, httpWithAuth),
5153
5143
  ...languages(client, httpWithAuth),
@@ -5172,17 +5162,6 @@ var groups = (client, httpAuth) => ({
5172
5162
  },
5173
5163
  });
5174
5164
 
5175
- var health$4 = (client, httpAuth) => ({
5176
- /**
5177
- * Perform a health check for profiles service
5178
- * @returns {boolean} success
5179
- */
5180
- async health() {
5181
- const result = await client.get(httpAuth, '/health');
5182
- return result.status === Results.Success;
5183
- },
5184
- });
5185
-
5186
5165
  var logs = (client, httpAuth) => {
5187
5166
  function partialApplyFind(profileId, groupId) {
5188
5167
  return async (options) => (await client.get(httpAuth, `/${profileId}/groups/${groupId}/logs/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
@@ -5253,6 +5232,10 @@ var profiles = (client, httpAuth) => ({
5253
5232
  async getImpediments(options) {
5254
5233
  return (await client.get(httpAuth, '/impediments', options)).data;
5255
5234
  },
5235
+ async health() {
5236
+ const result = await client.get(httpAuth, '/health');
5237
+ return result.status === 200;
5238
+ },
5256
5239
  });
5257
5240
 
5258
5241
  const profilesService = (httpWithAuth) => {
@@ -5261,24 +5244,12 @@ const profilesService = (httpWithAuth) => {
5261
5244
  basePath: PROFILES_BASE,
5262
5245
  });
5263
5246
  return {
5264
- ...health$4(client, httpWithAuth),
5265
5247
  ...profiles(client, httpWithAuth),
5266
5248
  groups: groups(client, httpWithAuth),
5267
5249
  logs: logs(client, httpWithAuth),
5268
5250
  };
5269
5251
  };
5270
5252
 
5271
- var health$3 = (client, http) => ({
5272
- /**
5273
- * Perform a health check
5274
- * @returns {boolean} success
5275
- */
5276
- async health() {
5277
- const result = await client.get(http, '/health');
5278
- return result.status === Results.Success;
5279
- },
5280
- });
5281
-
5282
5253
  var notifications = (client, httpAuth) => {
5283
5254
  async function find(options) {
5284
5255
  return (await client.get(httpAuth, `/notifications${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, options)).data;
@@ -5324,6 +5295,10 @@ var notifications = (client, httpAuth) => {
5324
5295
  async getTypes(options) {
5325
5296
  return (await client.get(httpAuth, '/types', options)).data;
5326
5297
  },
5298
+ async health() {
5299
+ const result = await client.get(httpAuth, '/health');
5300
+ return result.status === 200;
5301
+ },
5327
5302
  };
5328
5303
  };
5329
5304
 
@@ -5353,23 +5328,11 @@ const notificationsService = (httpWithAuth) => {
5353
5328
  transformRequestData: decamelizeRequestData,
5354
5329
  });
5355
5330
  return {
5356
- ...health$3(client, httpWithAuth),
5357
5331
  ...notifications(client, httpWithAuth),
5358
5332
  settings: settings(client, httpWithAuth),
5359
5333
  };
5360
5334
  };
5361
5335
 
5362
- var health$2 = (client, http) => ({
5363
- /**
5364
- * Perform a health check
5365
- * @returns {boolean} success
5366
- */
5367
- async health() {
5368
- const result = await client.get(http, '/health');
5369
- return result.status === Results.Success;
5370
- },
5371
- });
5372
-
5373
5336
  var notificationsV2 = (client, httpWithAuth) => {
5374
5337
  async function find(options) {
5375
5338
  const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
@@ -5406,6 +5369,10 @@ var notificationsV2 = (client, httpWithAuth) => {
5406
5369
  const rqlWithNotificationId = rqlBuilder().eq('id', notificationId).build();
5407
5370
  return await this.findFirst({ ...options, rql: rqlWithNotificationId });
5408
5371
  },
5372
+ async health() {
5373
+ const result = await client.get(httpWithAuth, '/health');
5374
+ return result.status === 200;
5375
+ },
5409
5376
  };
5410
5377
  };
5411
5378
 
@@ -5454,7 +5421,6 @@ const notificationsV2Service = (httpWithAuth) => {
5454
5421
  basePath: NOTIFICATIONS_V2_BASE,
5455
5422
  });
5456
5423
  return {
5457
- ...health$2(client, httpWithAuth),
5458
5424
  ...notificationsV2(client, httpWithAuth),
5459
5425
  userSettings: notificationV2UserSettings(client, httpWithAuth),
5460
5426
  };
@@ -5480,16 +5446,9 @@ var events = (client, httpAuth) => ({
5480
5446
  }
5481
5447
  return (await client.post(httpAuth, '/', requestBody, requestOptions)).data;
5482
5448
  },
5483
- });
5484
-
5485
- var health$1 = (client, http) => ({
5486
- /**
5487
- * Perform a health check
5488
- * @returns {boolean} success
5489
- */
5490
5449
  async health() {
5491
- const result = await client.get(http, '/health');
5492
- return result.status === Results.Success;
5450
+ const result = await client.get(httpAuth, '/health');
5451
+ return result.status === 200;
5493
5452
  },
5494
5453
  });
5495
5454
 
@@ -5518,7 +5477,6 @@ const eventsService = (httpWithAuth) => {
5518
5477
  transformRequestData: decamelizeRequestData,
5519
5478
  });
5520
5479
  return {
5521
- ...health$1(client, httpWithAuth),
5522
5480
  ...events(client, httpWithAuth),
5523
5481
  subscriptions: subscriptions(client, httpWithAuth),
5524
5482
  };
@@ -5550,17 +5508,6 @@ const logsService = (httpWithAuth) => {
5550
5508
  };
5551
5509
  };
5552
5510
 
5553
- var health = (client, http) => ({
5554
- /**
5555
- * Perform a health check
5556
- * @returns {boolean} success
5557
- */
5558
- async health() {
5559
- const result = await client.get(http, '/health');
5560
- return result.status === Results.Success;
5561
- },
5562
- });
5563
-
5564
5511
  var templatesV2 = (client, httpWithAuth) => {
5565
5512
  async function find(options) {
5566
5513
  const result = await client.get(httpWithAuth, `/${(options === null || options === void 0 ? void 0 : options.rql) || ''}`, {
@@ -5617,6 +5564,10 @@ var templatesV2 = (client, httpWithAuth) => {
5617
5564
  const result = await find(options);
5618
5565
  return result.data[0];
5619
5566
  },
5567
+ async health() {
5568
+ const result = await client.get(httpWithAuth, '/health');
5569
+ return result.status === 200;
5570
+ },
5620
5571
  };
5621
5572
  };
5622
5573
 
@@ -5625,12 +5576,11 @@ const templatesV2Service = (httpWithAuth) => {
5625
5576
  basePath: TEMPLATES_V2_BASE,
5626
5577
  });
5627
5578
  return {
5628
- ...health(client, httpWithAuth),
5629
5579
  ...templatesV2(client, httpWithAuth),
5630
5580
  };
5631
5581
  };
5632
5582
 
5633
- const version = '8.9.0-dev-137-14a5300';
5583
+ const version = '8.9.0-dev-138-3022f93';
5634
5584
 
5635
5585
  /**
5636
5586
  * Create ExtraHorizon client.
@@ -1,6 +1,5 @@
1
1
  export declare type MockClientOAuth1<MockFn> = {
2
2
  users: {
3
- health: MockFn;
4
3
  me: MockFn;
5
4
  findById: MockFn;
6
5
  update: MockFn;
@@ -31,6 +30,7 @@ export declare type MockClientOAuth1<MockFn> = {
31
30
  updatePasswordPolicy: MockFn;
32
31
  getEmailTemplates: MockFn;
33
32
  setEmailTemplates: MockFn;
33
+ health: MockFn;
34
34
  groupRoles: {
35
35
  getPermissions: MockFn;
36
36
  find: MockFn;
@@ -175,6 +175,7 @@ export declare type MockClientOAuth1<MockFn> = {
175
175
  cancel: MockFn;
176
176
  schedules: {
177
177
  create: MockFn;
178
+ remove: MockFn;
178
179
  delete: MockFn;
179
180
  find: MockFn;
180
181
  findAll: MockFn;
@@ -230,7 +231,6 @@ export declare type MockClientOAuth1<MockFn> = {
230
231
  resolveAsJsonUsingCode: MockFn;
231
232
  };
232
233
  templatesV2: {
233
- health: MockFn;
234
234
  create: MockFn;
235
235
  update: MockFn;
236
236
  remove: MockFn;
@@ -240,6 +240,7 @@ export declare type MockClientOAuth1<MockFn> = {
240
240
  findById: MockFn;
241
241
  findByName: MockFn;
242
242
  findFirst: MockFn;
243
+ health: MockFn;
243
244
  };
244
245
  mails: {
245
246
  health: MockFn;
@@ -389,7 +390,6 @@ export declare type MockClientOAuth1<MockFn> = {
389
390
  };
390
391
  };
391
392
  localizations: {
392
- health: MockFn;
393
393
  find: MockFn;
394
394
  findByKey: MockFn;
395
395
  findFirst: MockFn;
@@ -397,12 +397,12 @@ export declare type MockClientOAuth1<MockFn> = {
397
397
  update: MockFn;
398
398
  remove: MockFn;
399
399
  getByKeys: MockFn;
400
+ health: MockFn;
400
401
  getCountries: MockFn;
401
402
  getRegions: MockFn;
402
403
  getLanguages: MockFn;
403
404
  };
404
405
  profiles: {
405
- health: MockFn;
406
406
  find: MockFn;
407
407
  findAll: MockFn;
408
408
  findAllIterator: MockFn;
@@ -413,6 +413,7 @@ export declare type MockClientOAuth1<MockFn> = {
413
413
  removeFields: MockFn;
414
414
  getComorbidities: MockFn;
415
415
  getImpediments: MockFn;
416
+ health: MockFn;
416
417
  groups: {
417
418
  create: MockFn;
418
419
  update: MockFn;
@@ -429,7 +430,6 @@ export declare type MockClientOAuth1<MockFn> = {
429
430
  };
430
431
  };
431
432
  notifications: {
432
- health: MockFn;
433
433
  create: MockFn;
434
434
  find: MockFn;
435
435
  findAll: MockFn;
@@ -439,6 +439,7 @@ export declare type MockClientOAuth1<MockFn> = {
439
439
  remove: MockFn;
440
440
  markAsViewed: MockFn;
441
441
  getTypes: MockFn;
442
+ health: MockFn;
442
443
  settings: {
443
444
  find: MockFn;
444
445
  findById: MockFn;
@@ -448,13 +449,13 @@ export declare type MockClientOAuth1<MockFn> = {
448
449
  };
449
450
  };
450
451
  notificationsV2: {
451
- health: MockFn;
452
452
  create: MockFn;
453
453
  find: MockFn;
454
454
  findAll: MockFn;
455
455
  findByTargetUserId: MockFn;
456
456
  findFirst: MockFn;
457
457
  findById: MockFn;
458
+ health: MockFn;
458
459
  userSettings: {
459
460
  getById: MockFn;
460
461
  update: MockFn;
@@ -467,11 +468,11 @@ export declare type MockClientOAuth1<MockFn> = {
467
468
  };
468
469
  };
469
470
  events: {
470
- health: MockFn;
471
471
  find: MockFn;
472
472
  findById: MockFn;
473
473
  findFirst: MockFn;
474
474
  create: MockFn;
475
+ health: MockFn;
475
476
  subscriptions: {
476
477
  find: MockFn;
477
478
  findById: MockFn;
@@ -541,6 +542,7 @@ export declare type MockClientOAuth1<MockFn> = {
541
542
  update: MockFn;
542
543
  enable: MockFn;
543
544
  disable: MockFn;
545
+ remove: MockFn;
544
546
  delete: MockFn;
545
547
  };
546
548
  loginAttempts: {
@@ -573,7 +575,6 @@ export declare type MockClientOAuth1<MockFn> = {
573
575
  };
574
576
  export declare type MockClientOAuth2<MockFn> = {
575
577
  users: {
576
- health: MockFn;
577
578
  me: MockFn;
578
579
  findById: MockFn;
579
580
  update: MockFn;
@@ -604,6 +605,7 @@ export declare type MockClientOAuth2<MockFn> = {
604
605
  updatePasswordPolicy: MockFn;
605
606
  getEmailTemplates: MockFn;
606
607
  setEmailTemplates: MockFn;
608
+ health: MockFn;
607
609
  groupRoles: {
608
610
  getPermissions: MockFn;
609
611
  find: MockFn;
@@ -748,6 +750,7 @@ export declare type MockClientOAuth2<MockFn> = {
748
750
  cancel: MockFn;
749
751
  schedules: {
750
752
  create: MockFn;
753
+ remove: MockFn;
751
754
  delete: MockFn;
752
755
  find: MockFn;
753
756
  findAll: MockFn;
@@ -803,7 +806,6 @@ export declare type MockClientOAuth2<MockFn> = {
803
806
  resolveAsJsonUsingCode: MockFn;
804
807
  };
805
808
  templatesV2: {
806
- health: MockFn;
807
809
  create: MockFn;
808
810
  update: MockFn;
809
811
  remove: MockFn;
@@ -813,6 +815,7 @@ export declare type MockClientOAuth2<MockFn> = {
813
815
  findById: MockFn;
814
816
  findByName: MockFn;
815
817
  findFirst: MockFn;
818
+ health: MockFn;
816
819
  };
817
820
  mails: {
818
821
  health: MockFn;
@@ -962,7 +965,6 @@ export declare type MockClientOAuth2<MockFn> = {
962
965
  };
963
966
  };
964
967
  localizations: {
965
- health: MockFn;
966
968
  find: MockFn;
967
969
  findByKey: MockFn;
968
970
  findFirst: MockFn;
@@ -970,12 +972,12 @@ export declare type MockClientOAuth2<MockFn> = {
970
972
  update: MockFn;
971
973
  remove: MockFn;
972
974
  getByKeys: MockFn;
975
+ health: MockFn;
973
976
  getCountries: MockFn;
974
977
  getRegions: MockFn;
975
978
  getLanguages: MockFn;
976
979
  };
977
980
  profiles: {
978
- health: MockFn;
979
981
  find: MockFn;
980
982
  findAll: MockFn;
981
983
  findAllIterator: MockFn;
@@ -986,6 +988,7 @@ export declare type MockClientOAuth2<MockFn> = {
986
988
  removeFields: MockFn;
987
989
  getComorbidities: MockFn;
988
990
  getImpediments: MockFn;
991
+ health: MockFn;
989
992
  groups: {
990
993
  create: MockFn;
991
994
  update: MockFn;
@@ -1002,7 +1005,6 @@ export declare type MockClientOAuth2<MockFn> = {
1002
1005
  };
1003
1006
  };
1004
1007
  notifications: {
1005
- health: MockFn;
1006
1008
  create: MockFn;
1007
1009
  find: MockFn;
1008
1010
  findAll: MockFn;
@@ -1012,6 +1014,7 @@ export declare type MockClientOAuth2<MockFn> = {
1012
1014
  remove: MockFn;
1013
1015
  markAsViewed: MockFn;
1014
1016
  getTypes: MockFn;
1017
+ health: MockFn;
1015
1018
  settings: {
1016
1019
  find: MockFn;
1017
1020
  findById: MockFn;
@@ -1021,13 +1024,13 @@ export declare type MockClientOAuth2<MockFn> = {
1021
1024
  };
1022
1025
  };
1023
1026
  notificationsV2: {
1024
- health: MockFn;
1025
1027
  create: MockFn;
1026
1028
  find: MockFn;
1027
1029
  findAll: MockFn;
1028
1030
  findByTargetUserId: MockFn;
1029
1031
  findFirst: MockFn;
1030
1032
  findById: MockFn;
1033
+ health: MockFn;
1031
1034
  userSettings: {
1032
1035
  getById: MockFn;
1033
1036
  update: MockFn;
@@ -1040,11 +1043,11 @@ export declare type MockClientOAuth2<MockFn> = {
1040
1043
  };
1041
1044
  };
1042
1045
  events: {
1043
- health: MockFn;
1044
1046
  find: MockFn;
1045
1047
  findById: MockFn;
1046
1048
  findFirst: MockFn;
1047
1049
  create: MockFn;
1050
+ health: MockFn;
1048
1051
  subscriptions: {
1049
1052
  find: MockFn;
1050
1053
  findById: MockFn;
@@ -1114,6 +1117,7 @@ export declare type MockClientOAuth2<MockFn> = {
1114
1117
  update: MockFn;
1115
1118
  enable: MockFn;
1116
1119
  disable: MockFn;
1120
+ remove: MockFn;
1117
1121
  delete: MockFn;
1118
1122
  };
1119
1123
  loginAttempts: {
@@ -1146,7 +1150,6 @@ export declare type MockClientOAuth2<MockFn> = {
1146
1150
  };
1147
1151
  export declare type MockClientProxy<MockFn> = {
1148
1152
  users: {
1149
- health: MockFn;
1150
1153
  me: MockFn;
1151
1154
  findById: MockFn;
1152
1155
  update: MockFn;
@@ -1177,6 +1180,7 @@ export declare type MockClientProxy<MockFn> = {
1177
1180
  updatePasswordPolicy: MockFn;
1178
1181
  getEmailTemplates: MockFn;
1179
1182
  setEmailTemplates: MockFn;
1183
+ health: MockFn;
1180
1184
  groupRoles: {
1181
1185
  getPermissions: MockFn;
1182
1186
  find: MockFn;
@@ -1321,6 +1325,7 @@ export declare type MockClientProxy<MockFn> = {
1321
1325
  cancel: MockFn;
1322
1326
  schedules: {
1323
1327
  create: MockFn;
1328
+ remove: MockFn;
1324
1329
  delete: MockFn;
1325
1330
  find: MockFn;
1326
1331
  findAll: MockFn;
@@ -1376,7 +1381,6 @@ export declare type MockClientProxy<MockFn> = {
1376
1381
  resolveAsJsonUsingCode: MockFn;
1377
1382
  };
1378
1383
  templatesV2: {
1379
- health: MockFn;
1380
1384
  create: MockFn;
1381
1385
  update: MockFn;
1382
1386
  remove: MockFn;
@@ -1386,6 +1390,7 @@ export declare type MockClientProxy<MockFn> = {
1386
1390
  findById: MockFn;
1387
1391
  findByName: MockFn;
1388
1392
  findFirst: MockFn;
1393
+ health: MockFn;
1389
1394
  };
1390
1395
  mails: {
1391
1396
  health: MockFn;
@@ -1535,7 +1540,6 @@ export declare type MockClientProxy<MockFn> = {
1535
1540
  };
1536
1541
  };
1537
1542
  localizations: {
1538
- health: MockFn;
1539
1543
  find: MockFn;
1540
1544
  findByKey: MockFn;
1541
1545
  findFirst: MockFn;
@@ -1543,12 +1547,12 @@ export declare type MockClientProxy<MockFn> = {
1543
1547
  update: MockFn;
1544
1548
  remove: MockFn;
1545
1549
  getByKeys: MockFn;
1550
+ health: MockFn;
1546
1551
  getCountries: MockFn;
1547
1552
  getRegions: MockFn;
1548
1553
  getLanguages: MockFn;
1549
1554
  };
1550
1555
  profiles: {
1551
- health: MockFn;
1552
1556
  find: MockFn;
1553
1557
  findAll: MockFn;
1554
1558
  findAllIterator: MockFn;
@@ -1559,6 +1563,7 @@ export declare type MockClientProxy<MockFn> = {
1559
1563
  removeFields: MockFn;
1560
1564
  getComorbidities: MockFn;
1561
1565
  getImpediments: MockFn;
1566
+ health: MockFn;
1562
1567
  groups: {
1563
1568
  create: MockFn;
1564
1569
  update: MockFn;
@@ -1575,7 +1580,6 @@ export declare type MockClientProxy<MockFn> = {
1575
1580
  };
1576
1581
  };
1577
1582
  notifications: {
1578
- health: MockFn;
1579
1583
  create: MockFn;
1580
1584
  find: MockFn;
1581
1585
  findAll: MockFn;
@@ -1585,6 +1589,7 @@ export declare type MockClientProxy<MockFn> = {
1585
1589
  remove: MockFn;
1586
1590
  markAsViewed: MockFn;
1587
1591
  getTypes: MockFn;
1592
+ health: MockFn;
1588
1593
  settings: {
1589
1594
  find: MockFn;
1590
1595
  findById: MockFn;
@@ -1594,13 +1599,13 @@ export declare type MockClientProxy<MockFn> = {
1594
1599
  };
1595
1600
  };
1596
1601
  notificationsV2: {
1597
- health: MockFn;
1598
1602
  create: MockFn;
1599
1603
  find: MockFn;
1600
1604
  findAll: MockFn;
1601
1605
  findByTargetUserId: MockFn;
1602
1606
  findFirst: MockFn;
1603
1607
  findById: MockFn;
1608
+ health: MockFn;
1604
1609
  userSettings: {
1605
1610
  getById: MockFn;
1606
1611
  update: MockFn;
@@ -1613,11 +1618,11 @@ export declare type MockClientProxy<MockFn> = {
1613
1618
  };
1614
1619
  };
1615
1620
  events: {
1616
- health: MockFn;
1617
1621
  find: MockFn;
1618
1622
  findById: MockFn;
1619
1623
  findFirst: MockFn;
1620
1624
  create: MockFn;
1625
+ health: MockFn;
1621
1626
  subscriptions: {
1622
1627
  find: MockFn;
1623
1628
  findById: MockFn;
@@ -1687,6 +1692,7 @@ export declare type MockClientProxy<MockFn> = {
1687
1692
  update: MockFn;
1688
1693
  enable: MockFn;
1689
1694
  disable: MockFn;
1695
+ remove: MockFn;
1690
1696
  delete: MockFn;
1691
1697
  };
1692
1698
  loginAttempts: {
@@ -83,6 +83,10 @@ export interface OidcProviderService {
83
83
  * @throws {@link ResourceUnknownError} when no provider is found for the specified providerId.
84
84
  * @throws {@link IllegalStateError} when the provider is enabled (Only disabled providers can be removed) or when there are still users linked to this provider.
85
85
  */
86
+ remove(providerId: string): Promise<AffectedRecords>;
87
+ /**
88
+ * @deprecated Use `remove` instead.
89
+ */
86
90
  delete(providerId: string): Promise<AffectedRecords>;
87
91
  /**
88
92
  * ## Enable an OpenID Connect provider
@@ -1,6 +1,5 @@
1
1
  import type { EventsService, HttpInstance, SubscriptionsService } from '../../types';
2
- import health from './health';
3
2
  import subscriptions from './subscriptions';
4
- export declare const eventsService: (httpWithAuth: HttpInstance) => ReturnType<typeof health> & EventsService & {
3
+ export declare const eventsService: (httpWithAuth: HttpInstance) => EventsService & {
5
4
  subscriptions: SubscriptionsService;
6
5
  };
@@ -62,6 +62,11 @@ export interface EventsService {
62
62
  * @returns Event
63
63
  */
64
64
  create(requestBody: CreateEvent, options?: CreateEventOptions): Promise<Event>;
65
+ /**
66
+ * Perform a health check
67
+ * @returns {boolean} success
68
+ */
69
+ health(): Promise<boolean>;
65
70
  }
66
71
  export interface SubscriptionsService {
67
72
  /**
@@ -1,4 +1,3 @@
1
1
  import type { HttpInstance } from '../../types';
2
- import health from './health';
3
2
  import { CountriesService, LanguagesService, LocalizationsService } from './types';
4
- export declare const localizationsService: (httpWithAuth: HttpInstance) => ReturnType<typeof health> & LocalizationsService & CountriesService & LanguagesService;
3
+ export declare const localizationsService: (httpWithAuth: HttpInstance) => LocalizationsService & CountriesService & LanguagesService;
@@ -141,5 +141,10 @@ export interface LocalizationsService {
141
141
  * @returns Record<string, MappedText>
142
142
  */
143
143
  getByKeys(requestBody: LocalizationRequest, options?: OptionsBase): Promise<Record<string, MappedText>>;
144
+ /**
145
+ * Perform a health check
146
+ * @returns {boolean} success
147
+ */
148
+ health(): Promise<boolean>;
144
149
  }
145
150
  export {};
@@ -1,7 +1,6 @@
1
1
  import type { AuthHttpClient } from '../../types';
2
- import health from './health';
3
2
  import settings from './settings';
4
3
  import { NotificationSettingsServices, NotificationsService } from './types';
5
- export declare const notificationsService: (httpWithAuth: AuthHttpClient) => NotificationsService & ReturnType<typeof health> & {
4
+ export declare const notificationsService: (httpWithAuth: AuthHttpClient) => NotificationsService & {
6
5
  settings: NotificationSettingsServices;
7
6
  };
@@ -178,6 +178,11 @@ export interface NotificationsService {
178
178
  * @returns PagedResult<NotifTypeDef>
179
179
  */
180
180
  getTypes(options?: OptionsBase): Promise<PagedResult<NotifTypeDef>>;
181
+ /**
182
+ * Perform a health check
183
+ * @returns {boolean} success
184
+ */
185
+ health(): Promise<boolean>;
181
186
  }
182
187
  export interface NotificationSettingsServices {
183
188
  /**
@@ -1,7 +1,6 @@
1
1
  import { AuthHttpClient } from '../../types';
2
- import health from './health';
3
2
  import { NotificationV2Service } from './types';
4
3
  import { NotificationV2UserSettingsService } from './userSettings/types';
5
- export declare const notificationsV2Service: (httpWithAuth: AuthHttpClient) => ReturnType<typeof health> & NotificationV2Service & {
4
+ export declare const notificationsV2Service: (httpWithAuth: AuthHttpClient) => NotificationV2Service & {
6
5
  userSettings: NotificationV2UserSettingsService;
7
6
  };
@@ -158,4 +158,9 @@ export interface NotificationV2Service {
158
158
  * @returns NotificationV2<T> | undefined
159
159
  */
160
160
  findById<T extends Record<string, string>>(notificationId: ObjectId, options?: OptionsBase): Promise<NotificationV2<T> | undefined>;
161
+ /**
162
+ * Perform a health check
163
+ * @returns {boolean} success
164
+ */
165
+ health(): Promise<boolean>;
161
166
  }
@@ -1,9 +1,8 @@
1
1
  import type { HttpInstance } from '../../types';
2
2
  import groups from './groups';
3
- import health from './health';
4
3
  import logs from './logs';
5
4
  import { ProfilesGroupsService, ProfilesLogsService, ProfilesService } from './types';
6
- export declare const profilesService: (httpWithAuth: HttpInstance) => ReturnType<typeof health> & ProfilesService & {
5
+ export declare const profilesService: (httpWithAuth: HttpInstance) => ProfilesService & {
7
6
  groups: ProfilesGroupsService;
8
7
  logs: ProfilesLogsService;
9
8
  };
@@ -367,4 +367,9 @@ export interface ProfilesService {
367
367
  * @returns PagedResult<Impediments>
368
368
  */
369
369
  getImpediments(options?: OptionsBase): Promise<PagedResult<Impediments>>;
370
+ /**
371
+ * Perform a health check for profiles service
372
+ * @returns {boolean} success
373
+ */
374
+ health(): Promise<boolean>;
370
375
  }
@@ -20,6 +20,10 @@ export interface SchedulesService {
20
20
  * @param scheduleId - The id of the schedule to delete
21
21
  * @param options - Additional options for the request
22
22
  */
23
+ remove(scheduleId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
24
+ /**
25
+ * @deprecated Use `remove` instead.
26
+ */
23
27
  delete(scheduleId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
24
28
  /**
25
29
  * ## Retrieve a paged list of schedules
@@ -10,6 +10,7 @@ export declare enum TaskStatus {
10
10
  IN_PROGRESS = "inProgress",
11
11
  COMPLETE = "complete",
12
12
  FAILED = "failed",
13
+ RETRIED = "retried",
13
14
  CANCELED = "canceled"
14
15
  }
15
16
  export interface Task<DataType = any> {
@@ -33,6 +34,16 @@ export interface Task<DataType = any> {
33
34
  createdByApplicationId?: ObjectId;
34
35
  /** The Extra Horizon document id for the user who made the request */
35
36
  createdByUserId?: ObjectId;
37
+ /** Set for tasks in the `retried` status */
38
+ retriedByTaskId?: ObjectId;
39
+ /** Set for tasks that are being retried for other tasks */
40
+ retryForTaskIds?: ObjectId[];
41
+ /** Set for tasks in the `failed` status */
42
+ error?: {
43
+ type: 'runtime' | 'invocation';
44
+ name?: string;
45
+ message: string;
46
+ };
36
47
  }
37
48
  export declare type TaskInput = Pick<Task, 'functionName' | 'data' | 'startTimestamp' | 'priority' | 'tags'>;
38
49
  export interface TasksService {
@@ -1,4 +1,3 @@
1
1
  import { AuthHttpClient } from '../../types';
2
- import health from './health';
3
2
  import { TemplatesV2Service } from './types';
4
- export declare const templatesV2Service: (httpWithAuth: AuthHttpClient) => ReturnType<typeof health> & TemplatesV2Service;
3
+ export declare const templatesV2Service: (httpWithAuth: AuthHttpClient) => TemplatesV2Service;
@@ -142,4 +142,9 @@ export interface TemplatesV2Service {
142
142
  * @throws {ResourceUnknownError}
143
143
  */
144
144
  resolve<InputData = Record<string, any>, Outputs = Record<string, string>>(templateIdOrName: string, requestBody: TemplateV2ResolveIn<InputData>, options?: OptionsBase): Promise<Outputs>;
145
+ /**
146
+ * Perform a health check
147
+ * @returns {boolean} success
148
+ */
149
+ health(): Promise<boolean>;
145
150
  }
@@ -1,13 +1,11 @@
1
- import type { HttpInstance } from '../../types';
1
+ import type { HttpInstance, UsersService } from '../../types';
2
2
  import { ActivationRequestsService } from './activationRequests/types';
3
3
  import { ForgotPasswordRequestsService } from './forgotPasswordRequests/types';
4
4
  import globalRoles from './globalRoles';
5
5
  import groupRoles from './groupRoles';
6
- import health from './health';
7
6
  import { SettingsService } from './settings/types';
8
7
  import { UsersGlobalRolesService, UsersGroupRolesService } from './types';
9
- import users from './users';
10
- export declare const usersService: (httpWithAuth: HttpInstance, http: HttpInstance) => ReturnType<typeof users> & ReturnType<typeof health> & {
8
+ export declare const usersService: (httpWithAuth: HttpInstance, http: HttpInstance) => UsersService & {
11
9
  globalRoles: UsersGlobalRolesService;
12
10
  groupRoles: UsersGroupRolesService;
13
11
  activationRequests: ActivationRequestsService;
@@ -1216,4 +1216,9 @@ export interface UsersService {
1216
1216
  * @returns A list of email templates {@link EmailTemplates}
1217
1217
  */
1218
1218
  setEmailTemplates(templates: Partial<EmailTemplates>): Promise<EmailTemplates>;
1219
+ /**
1220
+ * Perform a health check
1221
+ * @returns {boolean} success
1222
+ */
1223
+ health(): Promise<boolean>;
1219
1224
  }
@@ -1 +1 @@
1
- export declare const version = "8.9.0-dev-137-14a5300";
1
+ export declare const version = "8.9.0-dev-138-3022f93";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrahorizon/javascript-sdk",
3
- "version": "8.9.0-dev-137-14a5300",
3
+ "version": "8.9.0-dev-138-3022f93",
4
4
  "description": "This package serves as a JavaScript wrapper around all Extra Horizon cloud services.",
5
5
  "main": "build/index.cjs.js",
6
6
  "types": "build/types/index.d.ts",
@@ -1,9 +0,0 @@
1
- import type { HttpInstance } from '../../types';
2
- declare const _default: (client: any, http: HttpInstance) => {
3
- /**
4
- * Perform a health check
5
- * @returns {boolean} success
6
- */
7
- health(): Promise<boolean>;
8
- };
9
- export default _default;
@@ -1,9 +0,0 @@
1
- import type { HttpInstance } from '../../types';
2
- declare const _default: (client: any, http: HttpInstance) => {
3
- /**
4
- * Perform a health check
5
- * @returns {boolean} success
6
- */
7
- health(): Promise<boolean>;
8
- };
9
- export default _default;
@@ -1,9 +0,0 @@
1
- import type { HttpInstance } from '../../types';
2
- declare const _default: (client: any, http: HttpInstance) => {
3
- /**
4
- * Perform a health check
5
- * @returns {boolean} success
6
- */
7
- health(): Promise<boolean>;
8
- };
9
- export default _default;
@@ -1,9 +0,0 @@
1
- import type { HttpInstance } from '../../types';
2
- declare const _default: (client: any, http: HttpInstance) => {
3
- /**
4
- * Perform a health check
5
- * @returns {boolean} success
6
- */
7
- health(): Promise<boolean>;
8
- };
9
- export default _default;
@@ -1,9 +0,0 @@
1
- import type { HttpInstance } from '../../types';
2
- declare const _default: (client: any, httpAuth: HttpInstance) => {
3
- /**
4
- * Perform a health check for profiles service
5
- * @returns {boolean} success
6
- */
7
- health(): Promise<boolean>;
8
- };
9
- export default _default;
@@ -1,9 +0,0 @@
1
- import type { HttpInstance } from '../../types';
2
- declare const _default: (client: any, http: HttpInstance) => {
3
- /**
4
- * Perform a health check
5
- * @returns {boolean} success
6
- */
7
- health(): Promise<boolean>;
8
- };
9
- export default _default;
@@ -1,9 +0,0 @@
1
- import type { HttpInstance } from '../../types';
2
- declare const _default: (userClient: any, http: HttpInstance) => {
3
- /**
4
- * Perform a health check
5
- * @returns {boolean} success
6
- */
7
- health(): Promise<boolean>;
8
- };
9
- export default _default;