@extrahorizon/javascript-sdk 8.9.0-dev-137-14a5300 → 8.9.0-dev-139-729209a

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 (32) 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/templates/types.d.ts +12 -10
  19. package/build/types/services/templatesV2/index.d.ts +1 -2
  20. package/build/types/services/templatesV2/types.d.ts +5 -0
  21. package/build/types/services/users/index.d.ts +2 -4
  22. package/build/types/services/users/types.d.ts +5 -0
  23. package/build/types/types.d.ts +1 -0
  24. package/build/types/version.d.ts +1 -1
  25. package/package.json +1 -1
  26. package/build/types/services/events/health.d.ts +0 -9
  27. package/build/types/services/localizations/health.d.ts +0 -9
  28. package/build/types/services/notifications/health.d.ts +0 -9
  29. package/build/types/services/notificationsV2/health.d.ts +0 -9
  30. package/build/types/services/profiles/health.d.ts +0 -9
  31. package/build/types/services/templatesV2/health.d.ts +0 -9
  32. package/build/types/services/users/health.d.ts +0 -9
@@ -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,7 +1,9 @@
1
1
  /// <reference types="node" />
2
2
  import { FindAllIterator } from '../../services/helpers';
3
3
  import { ObjectId, LanguageCode, TimeZone, PagedResult, AffectedRecords, OptionsWithRql, OptionsBase } from '../types';
4
- export interface TemplateOut {
4
+ export declare type TemplateOut = Template;
5
+ export declare type TemplateIn = TemplateCreation;
6
+ export interface Template {
5
7
  id: ObjectId;
6
8
  name: string;
7
9
  description: string;
@@ -10,7 +12,7 @@ export interface TemplateOut {
10
12
  creationTimestamp: Date;
11
13
  updateTimestamp: Date;
12
14
  }
13
- export interface TemplateIn {
15
+ export interface TemplateCreation {
14
16
  name: string;
15
17
  description: string;
16
18
  schema: TemplateObjectConfiguration;
@@ -97,7 +99,7 @@ export interface TemplatesService {
97
99
  * @param rql Add filters to the requested list.
98
100
  * @returns PagedResult<TemplateOut>
99
101
  */
100
- find(options?: OptionsWithRql): Promise<PagedResult<TemplateOut>>;
102
+ find(options?: OptionsWithRql): Promise<PagedResult<Template>>;
101
103
  /**
102
104
  * Request a list of all templates
103
105
  *
@@ -109,7 +111,7 @@ export interface TemplatesService {
109
111
  * @param rql Add filters to the requested list.
110
112
  * @returns TemplateOut[]
111
113
  */
112
- findAll(options?: OptionsWithRql): Promise<TemplateOut[]>;
114
+ findAll(options?: OptionsWithRql): Promise<Template[]>;
113
115
  /**
114
116
  * Request a list of all templates
115
117
  *
@@ -119,24 +121,24 @@ export interface TemplatesService {
119
121
  * @param rql Add filters to the requested list.
120
122
  * @returns TemplateOut[]
121
123
  */
122
- findAllIterator(options?: OptionsWithRql): FindAllIterator<TemplateOut>;
124
+ findAllIterator(options?: OptionsWithRql): FindAllIterator<Template>;
123
125
  /**
124
126
  * Find By Id
125
127
  * @param id the Id to search for
126
128
  * @returns the first element found
127
129
  */
128
- findById(id: ObjectId, options?: OptionsWithRql): Promise<TemplateOut | undefined>;
130
+ findById(id: ObjectId, options?: OptionsWithRql): Promise<Template | undefined>;
129
131
  /**
130
132
  * Find By Name
131
133
  * @param name the name to search for
132
134
  * @returns the first element found
133
135
  */
134
- findByName(name: string, options?: OptionsWithRql): Promise<TemplateOut | undefined>;
136
+ findByName(name: string, options?: OptionsWithRql): Promise<Template | undefined>;
135
137
  /**
136
138
  * Find First
137
139
  * @returns the first element found
138
140
  */
139
- findFirst(options?: OptionsWithRql): Promise<TemplateOut | undefined>;
141
+ findFirst(options?: OptionsWithRql): Promise<Template | undefined>;
140
142
  /**
141
143
  * Create a new template
142
144
  *
@@ -146,7 +148,7 @@ export interface TemplatesService {
146
148
  * @param requestBody TemplateIn
147
149
  * @returns TemplateOut
148
150
  */
149
- create(requestBody: TemplateIn, options?: OptionsBase): Promise<TemplateOut>;
151
+ create(requestBody: TemplateCreation, options?: OptionsBase): Promise<Template>;
150
152
  /**
151
153
  * Update an existing template
152
154
  *
@@ -158,7 +160,7 @@ export interface TemplatesService {
158
160
  * @returns TemplateOut
159
161
  * @throws {ResourceUnknownError}
160
162
  */
161
- update(templateId: string, requestBody: TemplateIn, options?: OptionsBase): Promise<TemplateOut>;
163
+ update(templateId: string, requestBody: TemplateCreation, options?: OptionsBase): Promise<Template>;
162
164
  /**
163
165
  * Delete a template
164
166
  *
@@ -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
  }
@@ -9,6 +9,7 @@ export * from './services/tasks/types';
9
9
  export * from './services/users/types';
10
10
  export * from './services/mails/types';
11
11
  export * from './services/templates/types';
12
+ export * from './services/templatesV2/types';
12
13
  export * from './services/configurations/types';
13
14
  export * from './services/dispatchers/types';
14
15
  export * from './services/payments/types';
@@ -1 +1 @@
1
- export declare const version = "8.9.0-dev-137-14a5300";
1
+ export declare const version = "8.9.0-dev-139-729209a";
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-139-729209a",
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;