@extrahorizon/javascript-sdk 8.4.1 → 8.5.0-dev-71-b217382
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/build/index.cjs.js +12 -5
- package/build/index.mjs +12 -5
- package/build/types/mockType.d.ts +6 -0
- package/build/types/rql/types.d.ts +23 -17
- package/build/types/services/data/types.d.ts +64 -5
- package/build/types/services/templates/types.d.ts +3 -6
- package/build/types/services/users/types.d.ts +1 -2
- package/build/types/version.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [8.5.0]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Corrected `functioName` field to `functionName` in the `TransitionActionTask` type
|
|
12
|
+
- `exh.templates.findFirst`, `findById` and `findByName` now correctly state `undefined` can be returned
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- Added `exh.data.documents.unlinkAllUsers` and `unlinkAllGroups` methods to unlink all users or groups from a document
|
|
16
|
+
- Added `priority` field to the `TransitionActionTask` type
|
|
17
|
+
- Added `TransitionActionTask` to the `AfterActions`
|
|
18
|
+
- Added `TRANSITION_DOCUMENTS` permission to the `GlobalPermissionName` enum
|
|
19
|
+
- Added `TRANSITION_DOCUMENTS` permission to the documentation of the transition document function
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
- RQL `contains` and `excludes` now have their different variations better separated in the type definitions
|
|
23
|
+
- `exh.data.documents.unlinkUsers` and `unlinkGroups` now also accept an array of user or group ids directly rather than nested in a request body object
|
|
24
|
+
- Thanks to `tran-simon` for the pointing out the initially incorrect `unlinkUsers` type definition!
|
|
25
|
+
|
|
26
|
+
### Deprecated
|
|
27
|
+
- `exh.data.documents.unlinkUsers` usage with an object is deprecated in favor of an array of ids directly or `unlinkAllUsers` for unlinking all users
|
|
28
|
+
- `exh.data.documents.unlinkGroups` usage with an object is deprecated in favor of an array of ids directly or `unlinkAllGroups` for unlinking all groups
|
|
29
|
+
|
|
8
30
|
## [8.4.1]
|
|
9
31
|
|
|
10
32
|
### Fixed
|
package/build/index.cjs.js
CHANGED
|
@@ -1070,6 +1070,7 @@ exports.GlobalPermissionName = void 0;
|
|
|
1070
1070
|
GlobalPermissionName["SEND_MAILS"] = "SEND_MAILS";
|
|
1071
1071
|
GlobalPermissionName["SYNC_PROFILE_GROUPS"] = "SYNC_PROFILE_GROUPS";
|
|
1072
1072
|
GlobalPermissionName["TRANSFER_PERIOD"] = "TRANSFER_PERIOD";
|
|
1073
|
+
GlobalPermissionName["TRANSITION_DOCUMENTS"] = "TRANSITION_DOCUMENTS";
|
|
1073
1074
|
GlobalPermissionName["TRIGGER_APP_STORE_SUBSCRIPTION_REEVALUATION"] = "TRIGGER_APP_STORE_SUBSCRIPTION_REEVALUATION";
|
|
1074
1075
|
GlobalPermissionName["TRIGGER_PLAY_STORE_SUBSCRIPTION_REEVALUATION"] = "TRIGGER_PLAY_STORE_SUBSCRIPTION_REEVALUATION";
|
|
1075
1076
|
GlobalPermissionName["UNLINK_USER_FROM_OIDC"] = "UNLINK_USER_FROM_OIDC";
|
|
@@ -1207,8 +1208,6 @@ exports.GlobalPermissionName = void 0;
|
|
|
1207
1208
|
/** @deprecated Not in use any longer */
|
|
1208
1209
|
GlobalPermissionName["MANAGE_SERVICE_ALERTS"] = "MANAGE_SERVICE_ALERTS";
|
|
1209
1210
|
/** @deprecated Not in use any longer */
|
|
1210
|
-
GlobalPermissionName["TRANSITION_DOCUMENTS"] = "TRANSITION_DOCUMENTS";
|
|
1211
|
-
/** @deprecated Not in use any longer */
|
|
1212
1211
|
GlobalPermissionName["VIEW_AWS_SES_STATISTICS"] = "VIEW_AWS_SES_STATISTICS";
|
|
1213
1212
|
/** @deprecated Not in use any longer */
|
|
1214
1213
|
GlobalPermissionName["CREATE_USER_PERIODS"] = "CREATE_USER_PERIODS";
|
|
@@ -3603,15 +3602,23 @@ var documents = (client, httpAuth) => {
|
|
|
3603
3602
|
async linkGroups(schemaIdOrName, documentId, requestBody, options) {
|
|
3604
3603
|
return (await client.post(httpAuth, `/${schemaIdOrName}/documents/${documentId}/linkGroups`, requestBody, options)).data;
|
|
3605
3604
|
},
|
|
3606
|
-
async unlinkGroups(schemaIdOrName, documentId,
|
|
3605
|
+
async unlinkGroups(schemaIdOrName, documentId, data, options) {
|
|
3606
|
+
const requestBody = Array.isArray(data) ? { groupIds: data } : data;
|
|
3607
3607
|
return (await client.post(httpAuth, `/${schemaIdOrName}/documents/${documentId}/unlinkGroups`, requestBody, options)).data;
|
|
3608
3608
|
},
|
|
3609
|
+
async unlinkAllGroups(schemaIdOrName, documentId, options) {
|
|
3610
|
+
return await this.unlinkGroups(schemaIdOrName, documentId, {}, options); // Empty object to remove all groups
|
|
3611
|
+
},
|
|
3609
3612
|
async linkUsers(schemaIdOrName, documentId, requestBody, options) {
|
|
3610
3613
|
return (await client.post(httpAuth, `/${schemaIdOrName}/documents/${documentId}/linkUsers`, requestBody, options)).data;
|
|
3611
3614
|
},
|
|
3612
|
-
async unlinkUsers(schemaIdOrName, documentId,
|
|
3615
|
+
async unlinkUsers(schemaIdOrName, documentId, data, options) {
|
|
3616
|
+
const requestBody = Array.isArray(data) ? { userIds: data } : data;
|
|
3613
3617
|
return (await client.post(httpAuth, `/${schemaIdOrName}/documents/${documentId}/unlinkUsers`, requestBody, options)).data;
|
|
3614
3618
|
},
|
|
3619
|
+
async unlinkAllUsers(schemaIdOrName, documentId, options) {
|
|
3620
|
+
return await this.unlinkUsers(schemaIdOrName, documentId, {}, options); // Empty object to remove all users
|
|
3621
|
+
},
|
|
3615
3622
|
};
|
|
3616
3623
|
};
|
|
3617
3624
|
|
|
@@ -5368,7 +5375,7 @@ const logsService = (httpWithAuth) => {
|
|
|
5368
5375
|
};
|
|
5369
5376
|
};
|
|
5370
5377
|
|
|
5371
|
-
const version = '8.
|
|
5378
|
+
const version = '8.5.0-dev-71-b217382';
|
|
5372
5379
|
|
|
5373
5380
|
/**
|
|
5374
5381
|
* Create ExtraHorizon client.
|
package/build/index.mjs
CHANGED
|
@@ -1040,6 +1040,7 @@ var GlobalPermissionName;
|
|
|
1040
1040
|
GlobalPermissionName["SEND_MAILS"] = "SEND_MAILS";
|
|
1041
1041
|
GlobalPermissionName["SYNC_PROFILE_GROUPS"] = "SYNC_PROFILE_GROUPS";
|
|
1042
1042
|
GlobalPermissionName["TRANSFER_PERIOD"] = "TRANSFER_PERIOD";
|
|
1043
|
+
GlobalPermissionName["TRANSITION_DOCUMENTS"] = "TRANSITION_DOCUMENTS";
|
|
1043
1044
|
GlobalPermissionName["TRIGGER_APP_STORE_SUBSCRIPTION_REEVALUATION"] = "TRIGGER_APP_STORE_SUBSCRIPTION_REEVALUATION";
|
|
1044
1045
|
GlobalPermissionName["TRIGGER_PLAY_STORE_SUBSCRIPTION_REEVALUATION"] = "TRIGGER_PLAY_STORE_SUBSCRIPTION_REEVALUATION";
|
|
1045
1046
|
GlobalPermissionName["UNLINK_USER_FROM_OIDC"] = "UNLINK_USER_FROM_OIDC";
|
|
@@ -1177,8 +1178,6 @@ var GlobalPermissionName;
|
|
|
1177
1178
|
/** @deprecated Not in use any longer */
|
|
1178
1179
|
GlobalPermissionName["MANAGE_SERVICE_ALERTS"] = "MANAGE_SERVICE_ALERTS";
|
|
1179
1180
|
/** @deprecated Not in use any longer */
|
|
1180
|
-
GlobalPermissionName["TRANSITION_DOCUMENTS"] = "TRANSITION_DOCUMENTS";
|
|
1181
|
-
/** @deprecated Not in use any longer */
|
|
1182
1181
|
GlobalPermissionName["VIEW_AWS_SES_STATISTICS"] = "VIEW_AWS_SES_STATISTICS";
|
|
1183
1182
|
/** @deprecated Not in use any longer */
|
|
1184
1183
|
GlobalPermissionName["CREATE_USER_PERIODS"] = "CREATE_USER_PERIODS";
|
|
@@ -3573,15 +3572,23 @@ var documents = (client, httpAuth) => {
|
|
|
3573
3572
|
async linkGroups(schemaIdOrName, documentId, requestBody, options) {
|
|
3574
3573
|
return (await client.post(httpAuth, `/${schemaIdOrName}/documents/${documentId}/linkGroups`, requestBody, options)).data;
|
|
3575
3574
|
},
|
|
3576
|
-
async unlinkGroups(schemaIdOrName, documentId,
|
|
3575
|
+
async unlinkGroups(schemaIdOrName, documentId, data, options) {
|
|
3576
|
+
const requestBody = Array.isArray(data) ? { groupIds: data } : data;
|
|
3577
3577
|
return (await client.post(httpAuth, `/${schemaIdOrName}/documents/${documentId}/unlinkGroups`, requestBody, options)).data;
|
|
3578
3578
|
},
|
|
3579
|
+
async unlinkAllGroups(schemaIdOrName, documentId, options) {
|
|
3580
|
+
return await this.unlinkGroups(schemaIdOrName, documentId, {}, options); // Empty object to remove all groups
|
|
3581
|
+
},
|
|
3579
3582
|
async linkUsers(schemaIdOrName, documentId, requestBody, options) {
|
|
3580
3583
|
return (await client.post(httpAuth, `/${schemaIdOrName}/documents/${documentId}/linkUsers`, requestBody, options)).data;
|
|
3581
3584
|
},
|
|
3582
|
-
async unlinkUsers(schemaIdOrName, documentId,
|
|
3585
|
+
async unlinkUsers(schemaIdOrName, documentId, data, options) {
|
|
3586
|
+
const requestBody = Array.isArray(data) ? { userIds: data } : data;
|
|
3583
3587
|
return (await client.post(httpAuth, `/${schemaIdOrName}/documents/${documentId}/unlinkUsers`, requestBody, options)).data;
|
|
3584
3588
|
},
|
|
3589
|
+
async unlinkAllUsers(schemaIdOrName, documentId, options) {
|
|
3590
|
+
return await this.unlinkUsers(schemaIdOrName, documentId, {}, options); // Empty object to remove all users
|
|
3591
|
+
},
|
|
3585
3592
|
};
|
|
3586
3593
|
};
|
|
3587
3594
|
|
|
@@ -5338,7 +5345,7 @@ const logsService = (httpWithAuth) => {
|
|
|
5338
5345
|
};
|
|
5339
5346
|
};
|
|
5340
5347
|
|
|
5341
|
-
const version = '8.
|
|
5348
|
+
const version = '8.5.0-dev-71-b217382';
|
|
5342
5349
|
|
|
5343
5350
|
/**
|
|
5344
5351
|
* Create ExtraHorizon client.
|
|
@@ -132,8 +132,10 @@ export declare type MockClientOAuth1<MockFn> = {
|
|
|
132
132
|
transition: MockFn;
|
|
133
133
|
linkGroups: MockFn;
|
|
134
134
|
unlinkGroups: MockFn;
|
|
135
|
+
unlinkAllGroups: MockFn;
|
|
135
136
|
linkUsers: MockFn;
|
|
136
137
|
unlinkUsers: MockFn;
|
|
138
|
+
unlinkAllUsers: MockFn;
|
|
137
139
|
};
|
|
138
140
|
transitions: {
|
|
139
141
|
updateCreation: MockFn;
|
|
@@ -661,8 +663,10 @@ export declare type MockClientOAuth2<MockFn> = {
|
|
|
661
663
|
transition: MockFn;
|
|
662
664
|
linkGroups: MockFn;
|
|
663
665
|
unlinkGroups: MockFn;
|
|
666
|
+
unlinkAllGroups: MockFn;
|
|
664
667
|
linkUsers: MockFn;
|
|
665
668
|
unlinkUsers: MockFn;
|
|
669
|
+
unlinkAllUsers: MockFn;
|
|
666
670
|
};
|
|
667
671
|
transitions: {
|
|
668
672
|
updateCreation: MockFn;
|
|
@@ -1190,8 +1194,10 @@ export declare type MockClientProxy<MockFn> = {
|
|
|
1190
1194
|
transition: MockFn;
|
|
1191
1195
|
linkGroups: MockFn;
|
|
1192
1196
|
unlinkGroups: MockFn;
|
|
1197
|
+
unlinkAllGroups: MockFn;
|
|
1193
1198
|
linkUsers: MockFn;
|
|
1194
1199
|
unlinkUsers: MockFn;
|
|
1200
|
+
unlinkAllUsers: MockFn;
|
|
1195
1201
|
};
|
|
1196
1202
|
transitions: {
|
|
1197
1203
|
updateCreation: MockFn;
|
|
@@ -95,14 +95,15 @@ export interface RQLBuilder {
|
|
|
95
95
|
*/
|
|
96
96
|
or: (...conditions: RQLString[]) => RQLBuilder;
|
|
97
97
|
/**
|
|
98
|
-
* @description
|
|
98
|
+
* @description Only returns records having this field as property
|
|
99
99
|
* @example
|
|
100
|
-
* await exh.data.documents.find(
|
|
101
|
-
*
|
|
102
|
-
* { rql: rqlBuilder().contains('data.indicator').build()
|
|
100
|
+
* await exh.data.documents.find(schemaId, {
|
|
101
|
+
* rql: rqlBuilder().contains('data.indicator').build()
|
|
103
102
|
* });
|
|
104
103
|
* @returns returns documents containing the `data.indicator` field
|
|
105
|
-
|
|
104
|
+
*/
|
|
105
|
+
contains(field: string): RQLBuilder;
|
|
106
|
+
/**
|
|
106
107
|
* @description Filters for objects where the specified property's value is an array and the array contains
|
|
107
108
|
* any value that equals the provided value or satisfies the provided condition.
|
|
108
109
|
* `contains(field, itemField > 30)` only returns records having a property `field` which have a prop `itemField` for which the condition is valid
|
|
@@ -113,34 +114,39 @@ export interface RQLBuilder {
|
|
|
113
114
|
* .contains(
|
|
114
115
|
* "data",
|
|
115
116
|
* rqlBuilder().gt("heartrate", "60").intermediate(),
|
|
116
|
-
*
|
|
117
|
+
* rqlBuilder().lt("heartrate", "90").intermediate()
|
|
117
118
|
* )
|
|
118
|
-
* .build()
|
|
119
|
+
* .build(),
|
|
119
120
|
* });
|
|
120
121
|
* @return Only returns documents with a data object containing `heartrate > 60` and `heartrate > 90`
|
|
121
122
|
*/
|
|
122
|
-
contains
|
|
123
|
+
contains(field: string, ...conditions: RQLString[]): RQLBuilder;
|
|
123
124
|
/**
|
|
124
|
-
* @description
|
|
125
|
+
* @description Only returns records not having this field as property
|
|
125
126
|
* @example
|
|
126
|
-
* await exh.data.documents.find(
|
|
127
|
-
*
|
|
128
|
-
* { rql: rqlBuilder().excludes('data.indicator').build()
|
|
127
|
+
* await exh.data.documents.find(schemaId, {
|
|
128
|
+
* rql: rqlBuilder().excludes('data.indicator').build()
|
|
129
129
|
* });
|
|
130
130
|
* @returns returns documents not containing the `data.indicator` field
|
|
131
|
-
|
|
131
|
+
*/
|
|
132
|
+
excludes(field: string): RQLBuilder;
|
|
133
|
+
/**
|
|
132
134
|
* @description Filters for objects where the specified property's value is an array and the array excludes
|
|
133
135
|
* any value that equals the provided value or satisfies the provided condition.
|
|
134
136
|
* `excludes(field, itemField > 30)` only returns records having a property `field` which have a prop `itemField` for which the condition is invalid
|
|
135
137
|
* @example
|
|
136
138
|
* await exh.data.documents.find(schemaId, {
|
|
137
139
|
* rql: rqlBuilder()
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
+
* .excludes(
|
|
141
|
+
* "data",
|
|
142
|
+
* rqlBuilder().gt("heartrate", "60").intermediate(),
|
|
143
|
+
* rqlBuilder().lt("heartrate", "90").intermediate()
|
|
144
|
+
* )
|
|
145
|
+
* .build(),
|
|
140
146
|
* });
|
|
141
|
-
* @return Only returns documents excluding documents where `
|
|
147
|
+
* @return Only returns documents excluding documents where `heartrate > 60` and `heartrate > 90`
|
|
142
148
|
*/
|
|
143
|
-
excludes
|
|
149
|
+
excludes(field: string, ...conditions: RQLString[]): RQLBuilder;
|
|
144
150
|
/**
|
|
145
151
|
* @description skipCount() Skips the record counting step of a request to increase performance.
|
|
146
152
|
*
|
|
@@ -133,7 +133,8 @@ export interface TransitionActionRemoveItems {
|
|
|
133
133
|
}
|
|
134
134
|
export interface TransitionActionTask {
|
|
135
135
|
type: 'task';
|
|
136
|
-
|
|
136
|
+
functionName: string;
|
|
137
|
+
priority?: number;
|
|
137
138
|
data: Record<string, unknown>;
|
|
138
139
|
}
|
|
139
140
|
export interface TransitionActionLinkCreator {
|
|
@@ -155,15 +156,22 @@ export interface TransitionActionDelay {
|
|
|
155
156
|
type: 'delay';
|
|
156
157
|
time: number;
|
|
157
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* @deprecated Legacy action, should not be used in new projects
|
|
161
|
+
*/
|
|
158
162
|
export interface TransitionActionMeasurementReviewedNotification {
|
|
159
163
|
type: 'measurementReviewedNotification';
|
|
160
164
|
}
|
|
161
|
-
|
|
162
|
-
|
|
165
|
+
/**
|
|
166
|
+
* @deprecated Legacy action, the AlgoQueueManager does not exist anymore
|
|
167
|
+
*/
|
|
168
|
+
export interface TransitionActionNotifyAlgoQueueManager {
|
|
163
169
|
type: 'notifyAlgoQueueManager';
|
|
164
170
|
id: string;
|
|
165
171
|
version: string;
|
|
166
172
|
}
|
|
173
|
+
export declare type TransitionAction = TransitionActionSet | TransitionActionUnset | TransitionActionAddItems | TransitionActionRemoveItems | TransitionActionTask | TransitionActionLinkCreator | TransitionActionLinkEnlistedGroups | TransitionActionLinkUserFromData | TransitionActionLinkGroupFromData | TransitionActionDelay | TransitionActionMeasurementReviewedNotification;
|
|
174
|
+
export declare type TransitionAfterAction = TransitionActionNotifyAlgoQueueManager | TransitionActionTask;
|
|
167
175
|
export interface CreationTransition {
|
|
168
176
|
toStatus: string;
|
|
169
177
|
type: CreationTransitionType;
|
|
@@ -534,7 +542,10 @@ export interface DataDocumentsService {
|
|
|
534
542
|
* - | - | -
|
|
535
543
|
* none | | Update your own documents
|
|
536
544
|
* none | `staff enlistment` | Update all the documents belonging to the group
|
|
537
|
-
* `UPDATE_DOCUMENTS` | `global` |
|
|
545
|
+
* `UPDATE_DOCUMENTS` | `global` | Transition all the documents
|
|
546
|
+
* `TRANSITION_DOCUMENTS` | `global` | Transition all the documents
|
|
547
|
+
* `TRANSITION_DOCUMENTS:{SCHEMA_NAME}` | `global` | Transition all the documents of the specified schema
|
|
548
|
+
* `TRANSITION_DOCUMENTS:{SCHEMA_NAME}:{TRANSITION_NAME}` | `global` | Transition all the documents of the specified schema with the specified transition name
|
|
538
549
|
* @param schemaIdOrName The id or name of the targeted schema.
|
|
539
550
|
* @param documentId The id of the targeted document.
|
|
540
551
|
* @param requestBody
|
|
@@ -563,6 +574,8 @@ export interface DataDocumentsService {
|
|
|
563
574
|
groupIds: Array<ObjectId>;
|
|
564
575
|
}, options?: OptionsBase): Promise<AffectedRecords>;
|
|
565
576
|
/**
|
|
577
|
+
* @deprecated Use `unlinkGroups(schemaIdOrName, documentId, groupIds)` or `unlinkAllGroups(schemaIdOrName, documentId)` instead.
|
|
578
|
+
*
|
|
566
579
|
* Unlink groups from a document
|
|
567
580
|
*
|
|
568
581
|
* Unlink the specified groups from a document
|
|
@@ -582,6 +595,26 @@ export interface DataDocumentsService {
|
|
|
582
595
|
unlinkGroups(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
|
|
583
596
|
groupIds?: Array<ObjectId>;
|
|
584
597
|
}, options?: OptionsBase): Promise<AffectedRecords>;
|
|
598
|
+
/**
|
|
599
|
+
* Unlink groups from a document
|
|
600
|
+
*
|
|
601
|
+
* Unlink the specified groups from a document
|
|
602
|
+
*
|
|
603
|
+
* Specifying an **empty** `groupIds` array will have **no effect** on the document.
|
|
604
|
+
*
|
|
605
|
+
* Permission | Scope | Effect
|
|
606
|
+
* - | - | -
|
|
607
|
+
* `UPDATE_ACCESS_TO_DOCUMENT` | `global` | **Required** for this endpoint
|
|
608
|
+
*/
|
|
609
|
+
unlinkGroups(schemaIdOrName: ObjectId | string, documentId: ObjectId, groupIds: Array<ObjectId>, options?: OptionsBase): Promise<AffectedRecords>;
|
|
610
|
+
/**
|
|
611
|
+
* Unlink all groups from a document
|
|
612
|
+
*
|
|
613
|
+
* Permission | Scope | Effect
|
|
614
|
+
* - | - | -
|
|
615
|
+
* `UPDATE_ACCESS_TO_DOCUMENT` | `global` | **Required** for this endpoint
|
|
616
|
+
*/
|
|
617
|
+
unlinkAllGroups(schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
|
|
585
618
|
/**
|
|
586
619
|
* Link users to a document
|
|
587
620
|
*
|
|
@@ -601,6 +634,8 @@ export interface DataDocumentsService {
|
|
|
601
634
|
userIds: Array<ObjectId>;
|
|
602
635
|
}, options?: OptionsBase): Promise<AffectedRecords>;
|
|
603
636
|
/**
|
|
637
|
+
* @deprecated Use `unlinkUsers(schemaIdOrName, documentId, userIds)` or `unlinkAllUsers(schemaIdOrName, documentId)` instead.
|
|
638
|
+
*
|
|
604
639
|
* Unlink users from a document
|
|
605
640
|
*
|
|
606
641
|
* Unlink the specified users from a document.
|
|
@@ -620,8 +655,32 @@ export interface DataDocumentsService {
|
|
|
620
655
|
* @returns AffectedRecords
|
|
621
656
|
*/
|
|
622
657
|
unlinkUsers(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
|
|
623
|
-
userIds
|
|
658
|
+
userIds?: Array<ObjectId>;
|
|
624
659
|
}, options?: OptionsBase): Promise<AffectedRecords>;
|
|
660
|
+
/**
|
|
661
|
+
* Unlink users from a document
|
|
662
|
+
*
|
|
663
|
+
* Unlink the specified users from a document.
|
|
664
|
+
*
|
|
665
|
+
* Specifying an **empty** `userIds` array will have **no effect** on the document.
|
|
666
|
+
*
|
|
667
|
+
* Permission | Scope | Effect
|
|
668
|
+
* - | - | -
|
|
669
|
+
* `UPDATE_ACCESS_TO_DOCUMENT` | `global` | **Required** for this endpoint
|
|
670
|
+
*
|
|
671
|
+
* Note: When GroupSyncMode.LINKED_USERS_PATIENT_ENLISTMENT is set for a document, all the groups where the specified user is enlisted as patient will also be removed from the document.
|
|
672
|
+
*/
|
|
673
|
+
unlinkUsers(schemaIdOrName: ObjectId | string, documentId: ObjectId, userIds: Array<ObjectId>, options?: OptionsBase): Promise<AffectedRecords>;
|
|
674
|
+
/**
|
|
675
|
+
* Unlink all users from a document
|
|
676
|
+
*
|
|
677
|
+
* Permission | Scope | Effect
|
|
678
|
+
* - | - | -
|
|
679
|
+
* `UPDATE_ACCESS_TO_DOCUMENT` | `global` | **Required** for this endpoint
|
|
680
|
+
*
|
|
681
|
+
* Note: When GroupSyncMode.LINKED_USERS_PATIENT_ENLISTMENT is set for a document, all the groups where the specified user is enlisted as patient will also be removed from the document.
|
|
682
|
+
*/
|
|
683
|
+
unlinkAllUsers(schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
|
|
625
684
|
}
|
|
626
685
|
export interface DataIndexesService {
|
|
627
686
|
/**
|
|
@@ -89,23 +89,20 @@ export interface TemplatesService {
|
|
|
89
89
|
/**
|
|
90
90
|
* Find By Id
|
|
91
91
|
* @param id the Id to search for
|
|
92
|
-
* @param rql an optional rql string
|
|
93
92
|
* @returns the first element found
|
|
94
93
|
*/
|
|
95
|
-
findById(id: ObjectId, options?: OptionsWithRql): Promise<TemplateOut>;
|
|
94
|
+
findById(id: ObjectId, options?: OptionsWithRql): Promise<TemplateOut | undefined>;
|
|
96
95
|
/**
|
|
97
96
|
* Find By Name
|
|
98
97
|
* @param name the name to search for
|
|
99
|
-
* @param rql an optional rql string
|
|
100
98
|
* @returns the first element found
|
|
101
99
|
*/
|
|
102
|
-
findByName(name: string, options?: OptionsWithRql): Promise<TemplateOut>;
|
|
100
|
+
findByName(name: string, options?: OptionsWithRql): Promise<TemplateOut | undefined>;
|
|
103
101
|
/**
|
|
104
102
|
* Find First
|
|
105
|
-
* @param rql an optional rql string
|
|
106
103
|
* @returns the first element found
|
|
107
104
|
*/
|
|
108
|
-
findFirst(options?: OptionsWithRql): Promise<TemplateOut>;
|
|
105
|
+
findFirst(options?: OptionsWithRql): Promise<TemplateOut | undefined>;
|
|
109
106
|
/**
|
|
110
107
|
* Create a new template
|
|
111
108
|
*
|
|
@@ -210,6 +210,7 @@ export declare enum GlobalPermissionName {
|
|
|
210
210
|
SEND_MAILS = "SEND_MAILS",
|
|
211
211
|
SYNC_PROFILE_GROUPS = "SYNC_PROFILE_GROUPS",
|
|
212
212
|
TRANSFER_PERIOD = "TRANSFER_PERIOD",
|
|
213
|
+
TRANSITION_DOCUMENTS = "TRANSITION_DOCUMENTS",
|
|
213
214
|
TRIGGER_APP_STORE_SUBSCRIPTION_REEVALUATION = "TRIGGER_APP_STORE_SUBSCRIPTION_REEVALUATION",
|
|
214
215
|
TRIGGER_PLAY_STORE_SUBSCRIPTION_REEVALUATION = "TRIGGER_PLAY_STORE_SUBSCRIPTION_REEVALUATION",
|
|
215
216
|
UNLINK_USER_FROM_OIDC = "UNLINK_USER_FROM_OIDC",
|
|
@@ -347,8 +348,6 @@ export declare enum GlobalPermissionName {
|
|
|
347
348
|
/** @deprecated Not in use any longer */
|
|
348
349
|
MANAGE_SERVICE_ALERTS = "MANAGE_SERVICE_ALERTS",
|
|
349
350
|
/** @deprecated Not in use any longer */
|
|
350
|
-
TRANSITION_DOCUMENTS = "TRANSITION_DOCUMENTS",
|
|
351
|
-
/** @deprecated Not in use any longer */
|
|
352
351
|
VIEW_AWS_SES_STATISTICS = "VIEW_AWS_SES_STATISTICS",
|
|
353
352
|
/** @deprecated Not in use any longer */
|
|
354
353
|
CREATE_USER_PERIODS = "CREATE_USER_PERIODS",
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.
|
|
1
|
+
export declare const version = "8.5.0-dev-71-b217382";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0-dev-71-b217382",
|
|
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",
|