@extrahorizon/javascript-sdk 8.10.0 → 8.11.0-dev-168-bf985ec

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 +8 -0
  2. package/build/index.cjs.js +38 -1
  3. package/build/index.mjs +38 -1
  4. package/build/mockType.d.ts +36 -0
  5. package/build/services/auth/applications/types.d.ts +17 -0
  6. package/build/services/auth/oauth1/types.d.ts +9 -0
  7. package/build/services/auth/oauth2/types.d.ts +9 -0
  8. package/build/services/events/types.d.ts +16 -19
  9. package/build/services/files/types.d.ts +16 -7
  10. package/build/services/helpers.d.ts +1 -1
  11. package/build/services/localizations/types.d.ts +19 -18
  12. package/build/services/mails/types.d.ts +18 -15
  13. package/build/services/users/activationRequests/types.d.ts +8 -0
  14. package/build/services/users/forgotPasswordRequests/types.d.ts +8 -0
  15. package/build/services/users/types.d.ts +17 -0
  16. package/build/types/mockType.d.ts +36 -0
  17. package/build/types/services/auth/applications/types.d.ts +17 -0
  18. package/build/types/services/auth/oauth1/types.d.ts +9 -0
  19. package/build/types/services/auth/oauth2/types.d.ts +9 -0
  20. package/build/types/services/events/types.d.ts +16 -19
  21. package/build/types/services/files/types.d.ts +16 -7
  22. package/build/types/services/helpers.d.ts +1 -1
  23. package/build/types/services/localizations/types.d.ts +19 -18
  24. package/build/types/services/mails/types.d.ts +18 -15
  25. package/build/types/services/users/activationRequests/types.d.ts +8 -0
  26. package/build/types/services/users/forgotPasswordRequests/types.d.ts +8 -0
  27. package/build/types/services/users/types.d.ts +17 -0
  28. package/build/types/version.d.ts +1 -1
  29. package/build/version.d.ts +1 -1
  30. package/package.json +2 -2
@@ -32,21 +32,22 @@ export interface EventsService {
32
32
  * Permission | Scope | Effect
33
33
  * - | - | -
34
34
  * `VIEW_EVENTS` | `global` | **Required** for this endpoint
35
- * @param rql Add filters to the requested list.
36
- * @returns PagedResult<Event>
37
35
  */
38
36
  find(options?: OptionsWithRql): Promise<PagedResult<Event>>;
37
+ /**
38
+ * Returns a list of events
39
+ *
40
+ * Permission | Scope | Effect
41
+ * - | - | -
42
+ * `VIEW_EVENTS` | `global` | **Required** for this endpoint
43
+ */
44
+ findAll(options?: OptionsWithRql): Promise<Event[]>;
39
45
  /**
40
46
  * Find By Id
41
- * @param id the Id to search for
42
- * @param rql an optional rql string
43
- * @returns the first element found
44
47
  */
45
48
  findById(id: ObjectId, options?: OptionsWithRql): Promise<Event | undefined>;
46
49
  /**
47
50
  * Find First
48
- * @param rql an optional rql string
49
- * @returns the first element found
50
51
  */
51
52
  findFirst(options?: OptionsWithRql): Promise<Event | undefined>;
52
53
  /**
@@ -58,13 +59,10 @@ export interface EventsService {
58
59
  * Permission | Scope | Effect
59
60
  * - | - | -
60
61
  * `CREATE_EVENTS` | `global` | **Required** for this endpoint
61
- * @param requestBody
62
- * @returns Event
63
62
  */
64
63
  create(requestBody: CreateEvent, options?: CreateEventOptions): Promise<Event>;
65
64
  /**
66
65
  * Perform a health check
67
- * @returns {boolean} success
68
66
  */
69
67
  health(): Promise<boolean>;
70
68
  }
@@ -75,21 +73,22 @@ export interface SubscriptionsService {
75
73
  * Permission | Scope | Effect
76
74
  * - | - | -
77
75
  * `VIEW_SUBSCRIPTIONS` | `global` | **Required** for this endpoint
78
- * @param rql Add filters to the requested list.
79
- * @returns PagedResult<Subscription>
80
76
  */
81
77
  find(options?: OptionsWithRql): Promise<PagedResult<Subscription>>;
78
+ /**
79
+ * Returns a list of event subscriptions
80
+ *
81
+ * Permission | Scope | Effect
82
+ * - | - | -
83
+ * `VIEW_SUBSCRIPTIONS` | `global` | **Required** for this endpoint
84
+ */
85
+ findAll(options?: OptionsWithRql): Promise<Subscription[]>;
82
86
  /**
83
87
  * Find By Id
84
- * @param id the Id to search for
85
- * @param rql an optional rql string
86
- * @returns the first element found
87
88
  */
88
89
  findById(id: ObjectId, options?: OptionsWithRql): Promise<Subscription | undefined>;
89
90
  /**
90
91
  * Find First
91
- * @param rql an optional rql string
92
- * @returns the first element found
93
92
  */
94
93
  findFirst(options?: OptionsWithRql): Promise<Subscription | undefined>;
95
94
  /**
@@ -100,8 +99,6 @@ export interface SubscriptionsService {
100
99
  * Permission | Scope | Effect
101
100
  * - | - | -
102
101
  * `CREATE_SUBSCRIPTIONS` | `global` | **Required** for this endpoint
103
- * @param requestBody
104
- * @returns Subscription
105
102
  */
106
103
  create(requestBody: CreateSubscription, options?: OptionsBase): Promise<Subscription>;
107
104
  }
@@ -45,21 +45,30 @@ export interface FilesService {
45
45
  * Permission | Scope | Effect
46
46
  * - | - | -
47
47
  * `VIEW_FILES` | `global` | **Required** for this endpoint
48
- * @param rql Add filters to the requested list.
49
- * @returns PagedResult<FileDetails>
50
48
  */
51
49
  find(options?: OptionsWithRql): Promise<PagedResult<FileDetails>>;
50
+ /**
51
+ * List all files
52
+ *
53
+ * Permission | Scope | Effect
54
+ * - | - | -
55
+ * `VIEW_FILES` | `global` | **Required** for this endpoint
56
+ */
57
+ findAll(options?: OptionsWithRql): Promise<FileDetails[]>;
52
58
  /**
53
59
  * Find By Name
54
- * @param name the name to search for
55
- * @param rql an optional rql string
56
- * @returns the first element found
60
+ *
61
+ * Permission | Scope | Effect
62
+ * - | - | -
63
+ * `VIEW_FILES` | `global` | **Required** for this endpoint
57
64
  */
58
65
  findByName(name: string, options?: OptionsWithRql): Promise<FileDetails | undefined>;
59
66
  /**
60
67
  * Find First
61
- * @param rql an optional rql string
62
- * @returns the first element found
68
+ *
69
+ * Permission | Scope | Effect
70
+ * - | - | -
71
+ * `VIEW_FILES` | `global` | **Required** for this endpoint
63
72
  */
64
73
  findFirst(options?: OptionsWithRql): Promise<FileDetails | undefined>;
65
74
  /**
@@ -2,6 +2,6 @@ import { HttpInstance, HttpRequestConfig } from '../http/types';
2
2
  import { OptionsWithRql, PagedResult, PagedResultWithPager } from './types';
3
3
  export declare type FindAllIterator<T> = AsyncGenerator<PagedResult<T>, Record<string, never>, void>;
4
4
  export declare function findAllIterator<T>(find: (options: OptionsWithRql) => PagedResult<T> | Promise<PagedResult<T>>, options: OptionsWithRql): FindAllIterator<T>;
5
- export declare function findAllGeneric<T>(find: (options: OptionsWithRql) => PagedResult<T> | Promise<PagedResult<T>>, options: OptionsWithRql, level?: number): Promise<T[]>;
5
+ export declare function findAllGeneric<T>(find: (options: OptionsWithRql) => PagedResult<T> | Promise<PagedResult<T>>, options: OptionsWithRql | undefined, level?: number): Promise<T[]>;
6
6
  export declare function addPagersFn<T>(find: (options: OptionsWithRql) => PagedResult<T> | Promise<PagedResult<T>>, options: OptionsWithRql, pagedResult: PagedResult<T>): PagedResultWithPager<T>;
7
7
  export declare function setCustomKeysConfigurationInRequestConfig(httpInstance: HttpInstance, requestOptions?: HttpRequestConfig): HttpRequestConfig;
@@ -49,7 +49,6 @@ export interface CountriesService {
49
49
  * Permission | Scope | Effect
50
50
  * - | - | -
51
51
  * none | | Everyone can use this endpoint
52
- * @returns PagedResult<string>
53
52
  */
54
53
  getCountries(options?: OptionsBase): Promise<string[]>;
55
54
  /**
@@ -58,8 +57,8 @@ export interface CountriesService {
58
57
  * Permission | Scope | Effect
59
58
  * - | - | -
60
59
  * none | | Everyone can use this endpoint
60
+ *
61
61
  * @param country The country code (as defined in ISO 3166-1)
62
- * @returns PagedResult<string>
63
62
  * @throws {ResourceUnknownError}
64
63
  */
65
64
  getRegions(country: string, options?: OptionsBase): Promise<string[]>;
@@ -71,7 +70,6 @@ export interface LanguagesService {
71
70
  * Permission | Scope | Effect
72
71
  * - | - | -
73
72
  * none | | Everyone can use this endpoint
74
- * @returns PagedResult<SupportedLanguageCodes>
75
73
  */
76
74
  getLanguages(options?: OptionsBase): Promise<string[]>;
77
75
  }
@@ -82,21 +80,30 @@ export interface LocalizationsService {
82
80
  * Permission | Scope | Effect
83
81
  * - | - | -
84
82
  * none | | Everyone can use this endpoint
85
- * @param rql Add filters to the requested list.
86
- * @returns PagedResult<Localization>
87
83
  */
88
84
  find(options?: OptionsWithRql): Promise<PagedResult<Localization>>;
85
+ /**
86
+ * Returns all possible localizations stored in this service
87
+ *
88
+ * Permission | Scope | Effect
89
+ * - | - | -
90
+ * none | | Everyone can use this endpoint
91
+ */
92
+ findAll(options?: OptionsWithRql): Promise<Localization[]>;
89
93
  /**
90
94
  * Find By Key
91
- * @param key the key to search for
92
- * @param rql an optional rql string
93
- * @returns the first element found
95
+ *
96
+ * Permission | Scope | Effect
97
+ * - | - | -
98
+ * none | | Everyone can use this endpoint
94
99
  */
95
100
  findByKey(key: string, options?: OptionsWithRql): Promise<Localization | undefined>;
96
101
  /**
97
102
  * Find First
98
- * @param rql an optional rql string
99
- * @returns the first element found
103
+ *
104
+ * Permission | Scope | Effect
105
+ * - | - | -
106
+ * none | | Everyone can use this endpoint
100
107
  */
101
108
  findFirst(options?: OptionsWithRql): Promise<Localization | undefined>;
102
109
  /**
@@ -105,8 +112,7 @@ export interface LocalizationsService {
105
112
  * Permission | Scope | Effect
106
113
  * - | - | -
107
114
  * `CREATE_LOCALIZATIONS` | global | **Required** for this endpoint
108
- * @param requestBody BulkLocalization
109
- * @returns BulkCreationResponse
115
+ *
110
116
  * @throws {DefaultLocalizationMissingError}
111
117
  */
112
118
  create(requestBody: BulkLocalization, options?: OptionsBase): Promise<BulkCreationResponse>;
@@ -116,8 +122,6 @@ export interface LocalizationsService {
116
122
  * Permission | Scope | Effect
117
123
  * - | - | -
118
124
  * `UPDATE_LOCALIZATIONS` | global | **Required** for this endpoint
119
- * @param requestBody BulkLocalization
120
- * @returns BulkUpdateResponse
121
125
  */
122
126
  update(requestBody: BulkLocalization, options?: OptionsBase): Promise<BulkUpdateResponse>;
123
127
  /**
@@ -126,8 +130,8 @@ export interface LocalizationsService {
126
130
  * Permission | Scope | Effect
127
131
  * - | - | -
128
132
  * `DELETE_LOCALIZATIONS` | global | **Required** for this endpoint
133
+ *
129
134
  * @param rql Add filters to the requested list, **required**.
130
- * @returns AffectedRecords
131
135
  */
132
136
  remove(rql: RQLString, options?: OptionsBase): Promise<AffectedRecords>;
133
137
  /**
@@ -137,13 +141,10 @@ export interface LocalizationsService {
137
141
  * Permission | Scope | Effect
138
142
  * - | - | -
139
143
  * none | | Everyone can use this endpoint
140
- * @param requestBody LocalizationRequest
141
- * @returns Record<string, MappedText>
142
144
  */
143
145
  getByKeys(requestBody: LocalizationRequest, options?: OptionsBase): Promise<Record<string, MappedText>>;
144
146
  /**
145
147
  * Perform a health check
146
- * @returns {boolean} success
147
148
  */
148
149
  health(): Promise<boolean>;
149
150
  }
@@ -96,21 +96,30 @@ export interface MailsService {
96
96
  * Permission | Scope | Effect
97
97
  * - | - | -
98
98
  * `VIEW_MAILS` | `global` | **Required** for this endpoint
99
- * @param rql Add filters to the requested list.
100
- * @returns PagedResult<Mail>
101
99
  */
102
- find: (options?: OptionsWithRql) => Promise<PagedResult<Mail>>;
100
+ find(options?: OptionsWithRql): Promise<PagedResult<Mail>>;
101
+ /**
102
+ * Retrieve a list of mails
103
+ *
104
+ * Permission | Scope | Effect
105
+ * - | - | -
106
+ * `VIEW_MAILS` | `global` | **Required** for this endpoint
107
+ */
108
+ findAll(options?: OptionsWithRql): Promise<Mail[]>;
103
109
  /**
104
110
  * Find By Id
105
- * @param id the Id to search for
106
- * @param rql an optional rql string
107
- * @returns the first element found
111
+ *
112
+ * Permission | Scope | Effect
113
+ * - | - | -
114
+ * `VIEW_MAILS` | `global` | **Required** for this endpoint
108
115
  */
109
- findById: (id: ObjectId, options?: OptionsWithRql) => Promise<Mail | undefined>;
116
+ findById(id: ObjectId, options?: OptionsWithRql): Promise<Mail | undefined>;
110
117
  /**
111
118
  * Find First
112
- * @param rql an optional rql string
113
- * @returns the first element found
119
+ *
120
+ * Permission | Scope | Effect
121
+ * - | - | -
122
+ * `VIEW_MAILS` | `global` | **Required** for this endpoint
114
123
  */
115
124
  findFirst(options?: OptionsWithRql): Promise<Mail | undefined>;
116
125
  /**
@@ -121,8 +130,6 @@ export interface MailsService {
121
130
  * none | | Send mails to your own email address
122
131
  * none | `staff enlistment` | Send any mail to your patients or send a template mail based on pre-configured allowed templates to any email address.
123
132
  * `SEND_MAILS` | `global` | Send mails to any email address
124
- * @param requestBody mail creation data
125
- * @returns Mail
126
133
  * @throws {NotActivatedError}
127
134
  */
128
135
  send(requestBody: PlainMailCreation | TemplateBasedMailCreation, options?: OptionsBase): Promise<Mail>;
@@ -132,8 +139,6 @@ export interface MailsService {
132
139
  * Permission | Scope | Effect
133
140
  * - | - | -
134
141
  * none | | Everyone can use this endpoint
135
- * @param trackingHash
136
- * @returns AffectedRecords
137
142
  */
138
143
  track(trackingHash: string, options?: OptionsBase): Promise<AffectedRecords>;
139
144
  /**
@@ -142,8 +147,6 @@ export interface MailsService {
142
147
  * Permission | Scope | Effect
143
148
  * - | - | -
144
149
  * `VIEW_MAILS` | `global` | **Required** for this endpoint
145
- * @param rql Add filters to the requested list.
146
- * @returns PagedResult<QueuedMail>
147
150
  */
148
151
  findOutbound(options?: OptionsWithRql): Promise<PagedResult<QueuedMail>>;
149
152
  }
@@ -8,6 +8,14 @@ export interface ActivationRequestsService {
8
8
  * `VIEW_ACTIVATION_REQUESTS` | global | **Required** for this endpoint
9
9
  */
10
10
  find(options?: OptionsWithRql): Promise<PagedResult<ActivationRequest>>;
11
+ /**
12
+ * Retrieve a list of activation requests
13
+ *
14
+ * Permission | Scope | Effect
15
+ * - | - | -
16
+ * `VIEW_ACTIVATION_REQUESTS` | global | **Required** for this endpoint
17
+ */
18
+ findAll(options?: OptionsWithRql): Promise<ActivationRequest[]>;
11
19
  /**
12
20
  * Find an activation request
13
21
  *
@@ -8,6 +8,14 @@ export interface ForgotPasswordRequestsService {
8
8
  * `VIEW_FORGOT_PASSWORD_REQUESTS` | global | **Required** for this endpoint
9
9
  */
10
10
  find(options?: OptionsWithRql): Promise<PagedResult<ForgotPasswordRequest>>;
11
+ /**
12
+ * Retrieve a list of forgot password requests
13
+ *
14
+ * Permission | Scope | Effect
15
+ * - | - | -
16
+ * `VIEW_FORGOT_PASSWORD_REQUESTS` | global | **Required** for this endpoint
17
+ */
18
+ findAll(options?: OptionsWithRql): Promise<ForgotPasswordRequest[]>;
11
19
  /**
12
20
  * Find a forgot password request
13
21
  *
@@ -506,6 +506,14 @@ export interface UsersGlobalRolesService {
506
506
  * `VIEW_ROLE` | `global` | **Required** for this endpoint
507
507
  */
508
508
  find(options?: OptionsWithRql): Promise<PagedResult<Role>>;
509
+ /**
510
+ * Retrieve a list of roles
511
+ *
512
+ * Permission | Scope | Effect
513
+ * - | - | -
514
+ * `VIEW_ROLE` | `global` | **Required** for this endpoint
515
+ */
516
+ findAll(options?: OptionsWithRql): Promise<Role[]>;
509
517
  /**
510
518
  * Returns the first role found
511
519
  *
@@ -637,6 +645,15 @@ export interface UsersGroupRolesService {
637
645
  * `VIEW_GROUP` | `global` | View any group its roles
638
646
  */
639
647
  find(groupId: ObjectId, options?: OptionsWithRql): Promise<PagedResult<GroupRole>>;
648
+ /**
649
+ * Retrieve a list of group roles
650
+ *
651
+ * Permission | Scope | Effect
652
+ * - | - | -
653
+ * none | `staff enlistment` | View the roles for the group
654
+ * `VIEW_GROUP` | `global` | View any group its roles
655
+ */
656
+ findAll(groupId: ObjectId, options?: OptionsWithRql): Promise<GroupRole[]>;
640
657
  /**
641
658
  * Returns the first group role found
642
659
  *
@@ -1 +1 @@
1
- export declare const version = "8.10.0";
1
+ export declare const version = "8.11.0-dev-168-bf985ec";
@@ -1 +1 @@
1
- export declare const version = "8.10.0";
1
+ export declare const version = "8.11.0-dev-168-bf985ec";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@extrahorizon/javascript-sdk",
3
- "version": "8.10.0",
3
+ "version": "8.11.0-dev-168-bf985ec",
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",
@@ -32,7 +32,7 @@
32
32
  "build"
33
33
  ],
34
34
  "dependencies": {
35
- "axios": "0.31.0",
35
+ "axios": "0.32.0",
36
36
  "buffer": "6.0.3",
37
37
  "fflate": "0.8.2",
38
38
  "form-data": "4.0.4",