@extrahorizon/javascript-sdk 8.2.0-test

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 (153) hide show
  1. package/CHANGELOG.md +1161 -0
  2. package/LICENSE +21 -0
  3. package/README.md +119 -0
  4. package/build/index.cjs.js +1 -0
  5. package/build/index.mjs +1 -0
  6. package/build/types/btoa.d.ts +6 -0
  7. package/build/types/client.d.ts +136 -0
  8. package/build/types/constants.d.ts +15 -0
  9. package/build/types/errorHandler.d.ts +2 -0
  10. package/build/types/errors.d.ts +332 -0
  11. package/build/types/http/client.d.ts +2 -0
  12. package/build/types/http/index.d.ts +4 -0
  13. package/build/types/http/interceptors.d.ts +9 -0
  14. package/build/types/http/oAuth1Signature.d.ts +14 -0
  15. package/build/types/http/oauth1.d.ts +3 -0
  16. package/build/types/http/oauth2.d.ts +3 -0
  17. package/build/types/http/proxy.d.ts +3 -0
  18. package/build/types/http/types.d.ts +331 -0
  19. package/build/types/http/utils.d.ts +21 -0
  20. package/build/types/index.d.ts +9 -0
  21. package/build/types/mock.d.ts +43 -0
  22. package/build/types/mockType.d.ts +1511 -0
  23. package/build/types/parseStoredCredentials.d.ts +11 -0
  24. package/build/types/rql/index.d.ts +16 -0
  25. package/build/types/rql/parser.d.ts +1 -0
  26. package/build/types/rql/types.d.ts +168 -0
  27. package/build/types/services/auth/applications/index.d.ts +5 -0
  28. package/build/types/services/auth/applications/types.d.ts +190 -0
  29. package/build/types/services/auth/index.d.ts +3 -0
  30. package/build/types/services/auth/oauth1/index.d.ts +5 -0
  31. package/build/types/services/auth/oauth1/types.d.ts +63 -0
  32. package/build/types/services/auth/oauth2/index.d.ts +5 -0
  33. package/build/types/services/auth/oauth2/types.d.ts +52 -0
  34. package/build/types/services/auth/oidc/index.d.ts +5 -0
  35. package/build/types/services/auth/oidc/loginAttempts/index.d.ts +5 -0
  36. package/build/types/services/auth/oidc/loginAttempts/types.d.ts +67 -0
  37. package/build/types/services/auth/oidc/providers/index.d.ts +5 -0
  38. package/build/types/services/auth/oidc/providers/types.d.ts +144 -0
  39. package/build/types/services/auth/oidc/types.d.ts +40 -0
  40. package/build/types/services/auth/types.d.ts +39 -0
  41. package/build/types/services/auth/users/index.d.ts +5 -0
  42. package/build/types/services/auth/users/types.d.ts +121 -0
  43. package/build/types/services/configurations/general.d.ts +5 -0
  44. package/build/types/services/configurations/groups.d.ts +5 -0
  45. package/build/types/services/configurations/index.d.ts +10 -0
  46. package/build/types/services/configurations/patients.d.ts +5 -0
  47. package/build/types/services/configurations/staff.d.ts +5 -0
  48. package/build/types/services/configurations/types.d.ts +222 -0
  49. package/build/types/services/configurations/users.d.ts +5 -0
  50. package/build/types/services/data/comments.d.ts +5 -0
  51. package/build/types/services/data/documents.d.ts +5 -0
  52. package/build/types/services/data/index.d.ts +13 -0
  53. package/build/types/services/data/indexes.d.ts +5 -0
  54. package/build/types/services/data/infrastructure.d.ts +10 -0
  55. package/build/types/services/data/json-schema.d.ts +121 -0
  56. package/build/types/services/data/properties.d.ts +5 -0
  57. package/build/types/services/data/schemas.d.ts +5 -0
  58. package/build/types/services/data/statuses.d.ts +5 -0
  59. package/build/types/services/data/transitions.d.ts +5 -0
  60. package/build/types/services/data/types.d.ts +899 -0
  61. package/build/types/services/dispatchers/actions/index.d.ts +5 -0
  62. package/build/types/services/dispatchers/actions/types.d.ts +78 -0
  63. package/build/types/services/dispatchers/dispatchers/index.d.ts +5 -0
  64. package/build/types/services/dispatchers/dispatchers/types.d.ts +111 -0
  65. package/build/types/services/dispatchers/index.d.ts +7 -0
  66. package/build/types/services/dispatchers/types.d.ts +2 -0
  67. package/build/types/services/events/events.d.ts +5 -0
  68. package/build/types/services/events/health.d.ts +9 -0
  69. package/build/types/services/events/index.d.ts +6 -0
  70. package/build/types/services/events/subscriptions.d.ts +5 -0
  71. package/build/types/services/events/types.d.ts +90 -0
  72. package/build/types/services/files/files.d.ts +5 -0
  73. package/build/types/services/files/formHelpers.d.ts +3 -0
  74. package/build/types/services/files/index.d.ts +6 -0
  75. package/build/types/services/files/settings/index.d.ts +5 -0
  76. package/build/types/services/files/settings/types.d.ts +38 -0
  77. package/build/types/services/files/tokens.d.ts +5 -0
  78. package/build/types/services/files/types.d.ts +185 -0
  79. package/build/types/services/helpers.d.ts +7 -0
  80. package/build/types/services/http-client.d.ts +22 -0
  81. package/build/types/services/index.d.ts +15 -0
  82. package/build/types/services/localizations/countries.d.ts +5 -0
  83. package/build/types/services/localizations/health.d.ts +9 -0
  84. package/build/types/services/localizations/index.d.ts +4 -0
  85. package/build/types/services/localizations/languages.d.ts +5 -0
  86. package/build/types/services/localizations/localizations.d.ts +5 -0
  87. package/build/types/services/localizations/types.d.ts +145 -0
  88. package/build/types/services/logs/access/index.d.ts +5 -0
  89. package/build/types/services/logs/access/types.d.ts +41 -0
  90. package/build/types/services/logs/index.d.ts +3 -0
  91. package/build/types/services/logs/types.d.ts +4 -0
  92. package/build/types/services/mails/index.d.ts +3 -0
  93. package/build/types/services/mails/mails.d.ts +5 -0
  94. package/build/types/services/mails/types.d.ts +141 -0
  95. package/build/types/services/notifications/health.d.ts +9 -0
  96. package/build/types/services/notifications/index.d.ts +7 -0
  97. package/build/types/services/notifications/notifications.d.ts +5 -0
  98. package/build/types/services/notifications/settings.d.ts +5 -0
  99. package/build/types/services/notifications/types.d.ts +222 -0
  100. package/build/types/services/payments/appStore.d.ts +5 -0
  101. package/build/types/services/payments/appStoreSubscriptions.d.ts +5 -0
  102. package/build/types/services/payments/health.d.ts +9 -0
  103. package/build/types/services/payments/index.d.ts +15 -0
  104. package/build/types/services/payments/orders.d.ts +5 -0
  105. package/build/types/services/payments/playStore.d.ts +5 -0
  106. package/build/types/services/payments/playStoreHistory.d.ts +5 -0
  107. package/build/types/services/payments/playStoreSubscriptions.d.ts +5 -0
  108. package/build/types/services/payments/products.d.ts +5 -0
  109. package/build/types/services/payments/stripe.d.ts +5 -0
  110. package/build/types/services/payments/subscriptions.d.ts +5 -0
  111. package/build/types/services/payments/types.d.ts +1189 -0
  112. package/build/types/services/profiles/groups.d.ts +5 -0
  113. package/build/types/services/profiles/health.d.ts +9 -0
  114. package/build/types/services/profiles/index.d.ts +9 -0
  115. package/build/types/services/profiles/logs.d.ts +5 -0
  116. package/build/types/services/profiles/profiles.d.ts +5 -0
  117. package/build/types/services/profiles/types.d.ts +369 -0
  118. package/build/types/services/tasks/api/index.d.ts +5 -0
  119. package/build/types/services/tasks/api/types.d.ts +146 -0
  120. package/build/types/services/tasks/apiRequests/index.d.ts +5 -0
  121. package/build/types/services/tasks/apiRequests/logs/index.d.ts +5 -0
  122. package/build/types/services/tasks/apiRequests/logs/types.d.ts +25 -0
  123. package/build/types/services/tasks/apiRequests/types.d.ts +83 -0
  124. package/build/types/services/tasks/functions/index.d.ts +5 -0
  125. package/build/types/services/tasks/functions/types.d.ts +27 -0
  126. package/build/types/services/tasks/index.d.ts +15 -0
  127. package/build/types/services/tasks/logs/index.d.ts +5 -0
  128. package/build/types/services/tasks/logs/types.d.ts +28 -0
  129. package/build/types/services/tasks/schedules/index.d.ts +5 -0
  130. package/build/types/services/tasks/schedules/types.d.ts +88 -0
  131. package/build/types/services/tasks/tasks.d.ts +5 -0
  132. package/build/types/services/tasks/types.d.ts +107 -0
  133. package/build/types/services/templates/index.d.ts +3 -0
  134. package/build/types/services/templates/templates.d.ts +5 -0
  135. package/build/types/services/templates/types.d.ts +202 -0
  136. package/build/types/services/types.d.ts +77 -0
  137. package/build/types/services/users/activationRequests/index.d.ts +4 -0
  138. package/build/types/services/users/activationRequests/types.d.ts +70 -0
  139. package/build/types/services/users/forgotPasswordRequests/index.d.ts +4 -0
  140. package/build/types/services/users/forgotPasswordRequests/types.d.ts +70 -0
  141. package/build/types/services/users/globalRoles.d.ts +5 -0
  142. package/build/types/services/users/groupRoles.d.ts +5 -0
  143. package/build/types/services/users/health.d.ts +9 -0
  144. package/build/types/services/users/index.d.ts +16 -0
  145. package/build/types/services/users/settings/index.d.ts +4 -0
  146. package/build/types/services/users/settings/types.d.ts +47 -0
  147. package/build/types/services/users/types.d.ts +1055 -0
  148. package/build/types/services/users/users.d.ts +5 -0
  149. package/build/types/sha1.d.ts +11 -0
  150. package/build/types/types.d.ts +102 -0
  151. package/build/types/utils.d.ts +4 -0
  152. package/build/types/version.d.ts +1 -0
  153. package/package.json +57 -0
@@ -0,0 +1,899 @@
1
+ import { FindAllIterator } from '../../services/helpers';
2
+ import type { AffectedRecords, ObjectId, OptionsBase, OptionsWithRql, PagedResult, PagedResultWithPager } from '../types';
3
+ import type { JSONSchema7 } from './json-schema';
4
+ export declare enum JSONSchemaType {
5
+ OBJECT = "object",
6
+ ARRAY = "array",
7
+ STRING = "string",
8
+ NUMBER = "number",
9
+ BOOLEAN = "boolean"
10
+ }
11
+ export declare type JSONSchema = JSONSchemaObject | JSONSchemaArray | JSONSchemaString | JSONSchemaNumber | JSONSchemaBoolean;
12
+ export declare type JSONSchemaObject = Pick<JSONSchema7, 'required'> & {
13
+ type: JSONSchemaType.OBJECT;
14
+ properties?: {
15
+ [key: string]: JSONSchema;
16
+ };
17
+ additionalProperties?: JSONSchema;
18
+ };
19
+ export declare type JSONSchemaArray = Pick<JSONSchema7, 'minItems' | 'maxItems'> & {
20
+ type: JSONSchemaType.ARRAY;
21
+ items: JSONSchema | JSONSchema[];
22
+ contains: JSONSchema;
23
+ };
24
+ export declare type JSONSchemaString = Pick<JSONSchema7, 'minLength' | 'maxLength' | 'pattern' | 'enum'> & {
25
+ type: JSONSchemaType.STRING;
26
+ const: string;
27
+ format: 'date-time';
28
+ };
29
+ export declare type JSONSchemaNumber = Pick<JSONSchema7, 'type' | 'minimum' | 'maximum' | 'enum'> & {
30
+ type: JSONSchemaType.NUMBER;
31
+ const: number;
32
+ };
33
+ export declare type JSONSchemaBoolean = {
34
+ type: JSONSchemaType.BOOLEAN;
35
+ enum: boolean[];
36
+ const: boolean;
37
+ };
38
+ /**
39
+ * Specifies the conditions to be met in order to be able to create a document for a schema
40
+ */
41
+ export declare type CreateMode = 'default' | 'permissionRequired';
42
+ /**
43
+ * Specifies the conditions to be met in order to be able to view a document for a schema
44
+ */
45
+ export declare type ReadMode = 'allUsers' | 'default' | 'enlistedInLinkedGroups';
46
+ /**
47
+ * Specifies the conditions to be met in order to be able to update a document for a schema
48
+ */
49
+ export declare type UpdateMode = 'default' | 'creatorOnly' | 'disabled' | 'linkedGroupsStaffOnly';
50
+ /**
51
+ * Specifies the conditions to be met in order to be able to delete a document for a schema
52
+ */
53
+ export declare type DeleteMode = 'permissionRequired' | 'linkedUsersOnly';
54
+ export declare type GroupSyncMode = 'disabled' | 'creatorPatientEnlistments' | 'linkedUsersPatientEnlistments';
55
+ interface BaseConfiguration {
56
+ queryable?: boolean;
57
+ }
58
+ export interface ArrayConfiguration extends BaseConfiguration {
59
+ type?: 'array';
60
+ items?: TypeConfiguration;
61
+ minItems?: number;
62
+ maxItems?: number;
63
+ contains?: TypeConfiguration;
64
+ }
65
+ export interface ObjectConfiguration extends BaseConfiguration {
66
+ type?: 'object';
67
+ properties?: Record<string, TypeConfiguration>;
68
+ required?: string[];
69
+ }
70
+ export interface StringConfiguration extends BaseConfiguration {
71
+ type?: 'string';
72
+ minLength?: number;
73
+ maxLength?: number;
74
+ enum?: string[];
75
+ pattern?: string;
76
+ format?: 'date-time';
77
+ }
78
+ export interface NumberConfiguration extends BaseConfiguration {
79
+ type?: 'number';
80
+ minimum?: number;
81
+ maximum?: number;
82
+ enum?: number[];
83
+ }
84
+ export interface BooleanConfiguration extends BaseConfiguration {
85
+ type?: 'boolean';
86
+ }
87
+ export declare type TypeConfiguration = ObjectConfiguration | ArrayConfiguration | StringConfiguration | NumberConfiguration | BooleanConfiguration;
88
+ export interface DocumentCondition {
89
+ type?: 'document';
90
+ configuration?: TypeConfiguration;
91
+ }
92
+ export interface InputCondition {
93
+ type?: 'input';
94
+ configuration?: TypeConfiguration;
95
+ }
96
+ export interface InitiatorHasRelationToUserInDataCondition {
97
+ type?: 'initiatorHasRelationToUserInData';
98
+ userIdField?: ObjectId;
99
+ relation?: 'isStaffOfTargetPatient';
100
+ }
101
+ export declare type InitiatorHasRelationToGroupInDataConditionRelation = 'staff' | 'patient';
102
+ export interface InitiatorHasRelationToGroupInDataCondition {
103
+ type?: 'initiatorHasRelationToGroupInData';
104
+ groupIdField?: ObjectId;
105
+ relation?: InitiatorHasRelationToGroupInDataConditionRelation;
106
+ requiredPermission?: string;
107
+ }
108
+ export declare type Condition = InputCondition | DocumentCondition | InitiatorHasRelationToUserInDataCondition | InitiatorHasRelationToGroupInDataCondition;
109
+ export declare type CreationTransitionType = 'manual' | 'automatic';
110
+ export interface TransitionActionSet {
111
+ type: 'set';
112
+ field: string;
113
+ value: unknown;
114
+ }
115
+ export interface TransitionActionUnset {
116
+ type: 'unset';
117
+ field: string[];
118
+ }
119
+ export interface TransitionActionAddItems {
120
+ type: 'addItems';
121
+ field: string;
122
+ values: string[];
123
+ }
124
+ export interface TransitionActionRemoveItems {
125
+ type: 'removeItems';
126
+ field: string;
127
+ values: string[];
128
+ }
129
+ export interface TransitionActionTask {
130
+ type: 'task';
131
+ functioName: string;
132
+ data: Record<string, unknown>;
133
+ }
134
+ export interface TransitionActionLinkCreator {
135
+ type: 'linkCreator';
136
+ }
137
+ export interface TransitionActionLinkEnlistedGroups {
138
+ type: 'linkEnlistedGroups';
139
+ onlyActive: boolean;
140
+ }
141
+ export interface TransitionActionLinkUserFromData {
142
+ type: 'linkGroupFromData';
143
+ userIdField: string;
144
+ }
145
+ export interface TransitionActionLinkGroupFromData {
146
+ type: 'linkUserFromData';
147
+ groupIdField: string;
148
+ }
149
+ export interface TransitionActionDelay {
150
+ type: 'delay';
151
+ time: number;
152
+ }
153
+ export interface TransitionActionMeasurementReviewedNotification {
154
+ type: 'measurementReviewedNotification';
155
+ }
156
+ export declare type TransitionAction = TransitionActionSet | TransitionActionUnset | TransitionActionAddItems | TransitionActionRemoveItems | TransitionActionTask | TransitionActionLinkCreator | TransitionActionLinkEnlistedGroups | TransitionActionLinkUserFromData | TransitionActionLinkGroupFromData | TransitionActionDelay | TransitionActionMeasurementReviewedNotification;
157
+ export interface TransitionAfterAction {
158
+ type: 'notifyAlgoQueueManager';
159
+ id: string;
160
+ version: string;
161
+ }
162
+ export interface CreationTransition {
163
+ toStatus: string;
164
+ type: CreationTransitionType;
165
+ conditions?: Condition[];
166
+ actions?: TransitionAction[];
167
+ afterActions?: TransitionAfterAction[];
168
+ }
169
+ export declare type StatusData = Record<string, string>;
170
+ export declare type TransitionInput = CreationTransition & {
171
+ id?: ObjectId;
172
+ name: string;
173
+ fromStatuses: string[];
174
+ };
175
+ export declare type Transition = TransitionInput & Required<Pick<TransitionInput, 'id'>>;
176
+ export interface Schema {
177
+ id: ObjectId;
178
+ name: string;
179
+ description: string;
180
+ properties: Record<string, any>;
181
+ indexes: Index[];
182
+ statuses: Record<string, Record<string, string>>;
183
+ creationTransition: CreationTransition;
184
+ transitions: Transition[];
185
+ createMode: CreateMode;
186
+ readMode: ReadMode;
187
+ updateMode: UpdateMode;
188
+ deleteMode: DeleteMode;
189
+ groupSyncMode: GroupSyncMode;
190
+ defaultLimit?: number;
191
+ maximumLimit?: number;
192
+ updateTimestamp: Date;
193
+ creationTimestamp: Date;
194
+ findTransitionIdByName?: (name: string) => ObjectId | undefined;
195
+ transitionsByName?: Record<string, Transition>;
196
+ }
197
+ export interface SchemaInput {
198
+ name: string;
199
+ description: string;
200
+ createMode?: CreateMode;
201
+ readMode?: ReadMode;
202
+ updateMode?: UpdateMode;
203
+ deleteMode?: DeleteMode;
204
+ groupSyncMode?: GroupSyncMode;
205
+ defaultLimit?: number;
206
+ maximumLimit?: number;
207
+ }
208
+ export declare type UpdateSchemaInput = Pick<Partial<SchemaInput>, 'name' | 'description' | 'defaultLimit' | 'maximumLimit'>;
209
+ export declare type IndexFieldsName = string;
210
+ export declare type IndexFieldsType = 'asc' | 'desc' | 'text';
211
+ export interface IndexOptions {
212
+ unique?: boolean;
213
+ sparse?: boolean;
214
+ }
215
+ export interface Index {
216
+ id: ObjectId;
217
+ name: string;
218
+ fields: {
219
+ name: IndexFieldsName;
220
+ type: IndexFieldsType;
221
+ }[];
222
+ options?: IndexOptions;
223
+ system?: boolean;
224
+ }
225
+ export declare type IndexInput = Pick<Index, 'fields' | 'options'>;
226
+ export interface Document<CustomData = null, CustomStatus = null> {
227
+ id: ObjectId;
228
+ userIds: ObjectId[];
229
+ groupIds: ObjectId[];
230
+ status: CustomStatus extends null ? string : CustomStatus;
231
+ data: CustomData extends null ? Record<string, unknown> : CustomData;
232
+ transitionLock?: {
233
+ timestamp?: Date;
234
+ };
235
+ commentCount?: number;
236
+ updateTimestamp: Date;
237
+ creationTimestamp: Date;
238
+ statusChangedTimestamp: Date;
239
+ creatorId: ObjectId;
240
+ }
241
+ export declare type CommentText = string;
242
+ export interface Comment {
243
+ id: ObjectId;
244
+ schemaId: ObjectId;
245
+ documentId: ObjectId;
246
+ creatorId: ObjectId;
247
+ text: CommentText;
248
+ commentedTimestamp?: Date;
249
+ updateTimestamp: Date;
250
+ creationTimestamp: Date;
251
+ }
252
+ export interface DataCommentsService {
253
+ /**
254
+ * Create a comment
255
+ *
256
+ * Comment on the specified document.
257
+ *
258
+ * Permission | Scope | Effect
259
+ * - | - | -
260
+ * none | | Comment on your own documents
261
+ * `CREATE_DOCUMENT_COMMENTS` | `staff enlistment` | Comment on any document belonging to the group
262
+ * `CREATE_DOCUMENT_COMMENTS` | `global` | Comment on any document
263
+ * @param schemaIdOrName The id or name of the targeted schema.
264
+ * @param documentId The id of the targeted document.
265
+ * @param requestBody
266
+ * @returns {Promise<Comment>}
267
+ * @throws {LockedDocumentError}
268
+ */
269
+ create(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
270
+ text: CommentText;
271
+ }, options?: OptionsBase): Promise<Comment>;
272
+ /**
273
+ * Request a list of comments
274
+ *
275
+ * List the comments for the specified document.
276
+ *
277
+ * Permission | Scope | Effect
278
+ * - | - | -
279
+ * none | | View comments for your own documents
280
+ * `VIEW_DOCUMENT_COMMENTS` | `staff enlistment` | View comments for any document belonging to the group
281
+ * `VIEW_DOCUMENT_COMMENTS` | `global` | View the comments for any document
282
+ * @param schemaIdOrName The id or name of the targeted schema.
283
+ * @param documentId The id of the targeted document.
284
+ * @returns {Promise<PagedResult<Comment>>}
285
+ */
286
+ find(schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsWithRql): Promise<PagedResult<Comment>>;
287
+ /**
288
+ * Find By Id
289
+ * @param id the Id to search for
290
+ * @param schemaIdOrName The id or name of the targeted schema.
291
+ * @param documentId The id of the targeted document.
292
+ * @returns the first element found
293
+ */
294
+ findById(id: ObjectId, schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsWithRql): Promise<Comment>;
295
+ /**
296
+ * Find First
297
+ * @param schemaIdOrName The id or name of the targeted schema.
298
+ * @param documentId The id of the targeted document.
299
+ * @returns the first element found
300
+ */
301
+ findFirst(schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsWithRql): Promise<Comment>;
302
+ /**
303
+ * Update a comment
304
+ *
305
+ * Update a comment you made.
306
+ *
307
+ * Permission | Scope | Effect
308
+ * - | - | -
309
+ * none | | Update your comments
310
+ * `UPDATE_DOCUMENT_COMMENTS` | `global` | Update comments
311
+ * @param commentId The id of the targeted comment.
312
+ * @param schemaIdOrName The id or name of the targeted schema.
313
+ * @param documentId The id of the targeted document.
314
+ * @returns {Promise<AffectedRecords>}
315
+ */
316
+ update(commentId: ObjectId, schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
317
+ text: CommentText;
318
+ }, options?: OptionsBase): Promise<AffectedRecords>;
319
+ /**
320
+ * Delete a comment
321
+ *
322
+ * Delete a comments from the specified measurement.
323
+ *
324
+ * Permission | Scope | Effect
325
+ * - | - | -
326
+ * none | | Delete your comments
327
+ * `UPDATE_DOCUMENT_COMMENTS` | `staff enlistment` | Delete comments for any document belonging to the group
328
+ * `UPDATE_DOCUMENT_COMMENTS` | `global` | Delete the comments for any document
329
+ * @param commentId The id of the targeted comment.
330
+ * @param schemaIdOrName The id or name of the targeted schema.
331
+ * @param documentId The id of the targeted document.
332
+ * @returns {Promise<AffectedRecords>}
333
+ */
334
+ remove(commentId: ObjectId, schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
335
+ }
336
+ export interface DataDocumentsService {
337
+ /**
338
+ * Check if the document is not in a locked state
339
+ *
340
+ * Actions cannot be performed if the document has a transitionLock
341
+ *
342
+ * @param schemaIdOrName The id or name of the targeted schema.
343
+ * @param documentId The id of the targeted document.
344
+ * @returns boolean success
345
+ * @throws {Error} If the document is in a locked state after the specified tries
346
+ */
347
+ assertNonLockedState(schemaIdOrName: ObjectId | string, documentId: ObjectId, tries: number, retryTimeInMs: number, options?: OptionsBase): Promise<boolean>;
348
+ /**
349
+ * Create a document
350
+ *
351
+ * Permission | Scope | Effect
352
+ * - | - | -
353
+ * none | | Everyone can use this endpoint
354
+ *
355
+ * `CREATE_DOCUMENTS` | `global` | When the schema.createMode is set to permissionRequired then this permission is required to make a group
356
+ * @param schemaIdOrName The id or name of the targeted schema.
357
+ * @param requestBody
358
+ * @returns {Document} document
359
+ * @throws {IllegalArgumentError}
360
+ */
361
+ create<InputData = Record<string, any>, OutputData = null, CustomStatus = null>(schemaIdOrName: ObjectId | string, requestBody: InputData, options?: OptionsWithRql & {
362
+ gzip?: boolean;
363
+ }): Promise<Document<OutputData, CustomStatus>>;
364
+ /**
365
+ * Request a list of documents
366
+ *
367
+ * ReadMode on schema is set to 'default' (or the property is not set at all on the schema):
368
+ *
369
+ * Permission | Scope | Effect
370
+ * - | - | -
371
+ * none | | See your own documents
372
+ * none | `staff enlistment` | See the documents belonging to the group (and your own documents)
373
+ * `VIEW_DOCUMENTS` | `global` | See any document
374
+ *
375
+ * ReadMode on schema is set to 'allUsers':
376
+ *
377
+ * Permission | Scope | Effect
378
+ * - | - | -
379
+ * none | | See any document
380
+ *
381
+ * ReadMode on schema is set to 'enlistedInLinkedGroups':
382
+ *
383
+ * Permission | Scope | Effect
384
+ * - | - | -
385
+ * none | `patient enlistment` | See the documents belonging to the group
386
+ * none | `staff enlistment` | See the documents belonging to the group
387
+ * `VIEW_DOCUMENTS` | `global` | See any document
388
+ * @param schemaIdOrName The id or name of the targeted schema.
389
+ * @returns PagedResultWithPager<Document>
390
+ */
391
+ find<CustomData = null, CustomStatus = null>(schemaIdOrName: ObjectId | string, options?: OptionsWithRql): Promise<PagedResultWithPager<Document<CustomData, CustomStatus>>>;
392
+ /**
393
+ * Request a list of all documents
394
+ *
395
+ * Do not pass in an rql with limit operator!
396
+ *
397
+ * ReadMode on schema is set to 'default' (or the property is not set at all on the schema):
398
+ *
399
+ * Permission | Scope | Effect
400
+ * - | - | -
401
+ * none | | See your own documents
402
+ * none | `staff enlistment` | See the documents belonging to the group (and your own documents)
403
+ * `VIEW_DOCUMENTS` | `global` | See any document
404
+ *
405
+ * ReadMode on schema is set to 'allUsers':
406
+ *
407
+ * Permission | Scope | Effect
408
+ * - | - | -
409
+ * none | | See any document
410
+ *
411
+ * ReadMode on schema is set to 'enlistedInLinkedGroups':
412
+ *
413
+ * Permission | Scope | Effect
414
+ * - | - | -
415
+ * none | `patient enlistment` | See the documents belonging to the group
416
+ * none | `staff enlistment` | See the documents belonging to the group
417
+ * `VIEW_DOCUMENTS` | `global` | See any document
418
+ * @param schemaIdOrName The id or name of the targeted schema.
419
+ * @returns Document[]
420
+ */
421
+ findAll<CustomData = null, CustomStatus = null>(schemaIdOrName: ObjectId | string, options?: OptionsWithRql): Promise<Document<CustomData, CustomStatus>[]>;
422
+ /**
423
+ * Request a list of all documents and return a generator
424
+ *
425
+ * ReadMode on schema is set to 'default' (or the property is not set at all on the schema):
426
+ *
427
+ * Permission | Scope | Effect
428
+ * - | - | -
429
+ * none | | See your own documents
430
+ * none | `staff enlistment` | See the documents belonging to the group (and your own documents)
431
+ * `VIEW_DOCUMENTS` | `global` | See any document
432
+ *
433
+ * ReadMode on schema is set to 'allUsers':
434
+ *
435
+ * Permission | Scope | Effect
436
+ * - | - | -
437
+ * none | | See any document
438
+ *
439
+ * ReadMode on schema is set to 'enlistedInLinkedGroups':
440
+ *
441
+ * Permission | Scope | Effect
442
+ * - | - | -
443
+ * none | `patient enlistment` | See the documents belonging to the group
444
+ * none | `staff enlistment` | See the documents belonging to the group
445
+ * `VIEW_DOCUMENTS` | `global` | See any document
446
+ * @param schemaIdOrName The id or name of the targeted schema.
447
+ * @returns Document[]
448
+ */
449
+ findAllIterator<CustomData = null, CustomStatus = null>(schemaIdOrName: ObjectId | string, options?: OptionsWithRql): FindAllIterator<Document<CustomData, CustomStatus>>;
450
+ /**
451
+ * Shortcut method to find a document by id
452
+ *
453
+ * Same Permissions as the find() method
454
+ *
455
+ * @param schemaIdOrName The id or name of the targeted schema.
456
+ * @param documentId the Id to search for
457
+ * @returns {Document} document
458
+ */
459
+ findById<CustomData = null, CustomStatus = null>(schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsWithRql): Promise<Document<CustomData, CustomStatus>>;
460
+ /**
461
+ * Returns the first document that is found with the applied filter
462
+ *
463
+ * Same Permissions as the find() method
464
+ * @param schemaIdOrName The id or name of the targeted schema.
465
+ * @returns {Document} document
466
+ */
467
+ findFirst<CustomData = null, CustomStatus = null>(schemaIdOrName: ObjectId | string, options?: OptionsWithRql): Promise<Document<CustomData, CustomStatus>>;
468
+ /**
469
+ * Update a document
470
+ *
471
+ * **Partially** update the selected document. Use a `null` value to clear a field.
472
+ *
473
+ * Permission | Scope | Effect
474
+ * - | - | -
475
+ * none | | Update your own documents
476
+ * none | `staff enlistment` | Update all the documents belonging to the group
477
+ * `UPDATE_DOCUMENTS` | `global` | Update all the documents
478
+ * @param schemaIdOrName The id or name of the targeted schema.
479
+ * @param documentId The id of the targeted document.
480
+ * @param requestBody Record<string, any>
481
+ * @returns AffectedRecords
482
+ */
483
+ update<UpdateData = Record<string, any>>(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: UpdateData, options?: OptionsWithRql): Promise<AffectedRecords>;
484
+ /**
485
+ * Delete a document
486
+ *
487
+ * DeleteMode on schema is set to 'permissionRequired':
488
+ *
489
+ * Permission | Scope | Effect
490
+ * - | - | -
491
+ * `DELETE_DOCUMENTS` | `global` | **Required** for this endpoint
492
+ *
493
+ * DeleteMode on schema is set to 'linkedUsersOnly':
494
+ *
495
+ * Permission | Scope | Effect
496
+ * - | - | -
497
+ * none | | Delete the document if the userId is linked to the document
498
+ * none | `staff enlistment` | Delete the document if the groupId is linked
499
+ * `DELETE_DOCUMENTS` | `global` | Delete the document
500
+ * @param schemaIdOrName The id or name of the targeted schema.
501
+ * @param documentId The id of the targeted document.
502
+ * @returns AffectedRecords
503
+ */
504
+ remove(schemaIdOrName: ObjectId | string, documentId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
505
+ /**
506
+ * Delete fields from a document
507
+ *
508
+ * Delete the specified fields from the selected document.
509
+ *
510
+ * Permission | Scope | Effect
511
+ * - | - | -
512
+ * none | | Update your own documents
513
+ * none | `staff enlistment` | Update all the documents belonging to the group
514
+ * `UPDATE_DOCUMENTS` | `global` | Update all the documents
515
+ * @param schemaIdOrName The id or name of the targeted schema.
516
+ * @param documentId The id of the targeted document.
517
+ * @param requestBody list of fields
518
+ * @returns AffectedRecords
519
+ */
520
+ removeFields(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
521
+ fields: Array<string>;
522
+ }, options?: OptionsWithRql): Promise<AffectedRecords>;
523
+ /**
524
+ * Transition a document
525
+ *
526
+ * Start a transition manually for the selected document where the conditions of a manual transition are met.
527
+ *
528
+ * Permission | Scope | Effect
529
+ * - | - | -
530
+ * none | | Update your own documents
531
+ * none | `staff enlistment` | Update all the documents belonging to the group
532
+ * `UPDATE_DOCUMENTS` | `global` | Update all the documents
533
+ * @param schemaIdOrName The id or name of the targeted schema.
534
+ * @param documentId The id of the targeted document.
535
+ * @param requestBody
536
+ * @returns AffectedRecords
537
+ * @throws {IllegalArgumentError}
538
+ * @throws {ResourceUnknownError}
539
+ */
540
+ transition(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
541
+ id: ObjectId;
542
+ data?: Record<string, any>;
543
+ }, options?: OptionsWithRql): Promise<AffectedRecords>;
544
+ /**
545
+ * Link groups to a document
546
+ *
547
+ * Link the specified groups to a document.
548
+ *
549
+ * Permission | Scope | Effect
550
+ * - | - | -
551
+ * `UPDATE_ACCESS_TO_DOCUMENT` | `global` | **Required** for this endpoint
552
+ * @param schemaIdOrName The id or name of the targeted schema.
553
+ * @param documentId The id of the targeted document.
554
+ * @param requestBody list of groupIds
555
+ * @returns AffectedRecords
556
+ */
557
+ linkGroups(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
558
+ groupIds: Array<ObjectId>;
559
+ }, options?: OptionsBase): Promise<AffectedRecords>;
560
+ /**
561
+ * Unlink groups from a document
562
+ *
563
+ * Unlink the specified groups from a document
564
+ *
565
+ * Specifying an **empty** `groupIds` array will have **no effect** on the document.
566
+ *
567
+ * **Not** specifying the `groupIds` array will **unlink all** groups from the document.
568
+ *
569
+ * Permission | Scope | Effect
570
+ * - | - | -
571
+ * `UPDATE_ACCESS_TO_DOCUMENT` | `global` | **Required** for this endpoint
572
+ * @param schemaIdOrName The id or name of the targeted schema.
573
+ * @param documentId The id of the targeted document.
574
+ * @param requestBody list of groupIds
575
+ * @returns AffectedRecords
576
+ */
577
+ unlinkGroups(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
578
+ groupIds?: Array<ObjectId>;
579
+ }, options?: OptionsBase): Promise<AffectedRecords>;
580
+ /**
581
+ * Link users to a document
582
+ *
583
+ * Link the specified users to a document.
584
+ *
585
+ * Permission | Scope | Effect
586
+ * - | - | -
587
+ * `UPDATE_ACCESS_TO_DOCUMENT` | `global` | **Required** for this endpoint
588
+ *
589
+ * 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 added to the document.
590
+ * @param schemaIdOrName The id or name of the targeted schema.
591
+ * @param documentId The id of the targeted document.
592
+ * @param requestBody list of userIds
593
+ * @returns AffectedRecords
594
+ */
595
+ linkUsers(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
596
+ userIds: Array<ObjectId>;
597
+ }, options?: OptionsBase): Promise<AffectedRecords>;
598
+ /**
599
+ * Unlink users from a document
600
+ *
601
+ * Unlink the specified users from a document.
602
+ *
603
+ * Specifying an **empty** `userIds` array will have **no effect** on the document.
604
+ *
605
+ * **Not** specifying the `userIds` array will **unlink all** users from the document.
606
+ *
607
+ * Permission | Scope | Effect
608
+ * - | - | -
609
+ * `UPDATE_ACCESS_TO_DOCUMENT` | `global` | **Required** for this endpoint
610
+ *
611
+ * 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.
612
+ * @param schemaIdOrName The id or name of the targeted schema.
613
+ * @param documentId The id of the targeted document.
614
+ * @param requestBody list of userIds
615
+ * @returns AffectedRecords
616
+ */
617
+ unlinkUsers(schemaIdOrName: ObjectId | string, documentId: ObjectId, requestBody: {
618
+ userIds: Array<ObjectId>;
619
+ }, options?: OptionsBase): Promise<AffectedRecords>;
620
+ }
621
+ export interface DataIndexesService {
622
+ /**
623
+ * Create an index
624
+ *
625
+ * Set an index on a specific property in a schema.
626
+ *
627
+ * Permission | Scope | Effect
628
+ * - | - | -
629
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint: Create an index
630
+ * @param schemaIdOrName The id or name of the targeted schema.
631
+ * @param requestBody
632
+ * @returns Index Success
633
+ * @throws {ResourceAlreadyExistsError}
634
+ * @throws {IllegalArgumentError}
635
+ * @throws {IllegalStateError}
636
+ */
637
+ create(schemaIdOrName: ObjectId | string, requestBody: IndexInput, options?: OptionsBase): Promise<Index>;
638
+ /**
639
+ * Delete an existing index
640
+ *
641
+ * Delete an index for a specific property in a schema.
642
+ *
643
+ * Permission | Scope | Effect
644
+ * - | - | -
645
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint: Delete an index
646
+ * @param indexId The id of the targeted index.
647
+ * @param schemaIdOrName The id or name of the targeted schema.
648
+ * @returns AffectedRecords
649
+ * @throws {NoPermissionError}
650
+ * @throws {ResourceUnknownError}
651
+ */
652
+ remove(indexId: ObjectId, schemaIdOrName: ObjectId | string, options?: OptionsBase): Promise<AffectedRecords>;
653
+ }
654
+ export interface DataPropertiesService {
655
+ /**
656
+ * Create a property
657
+ *
658
+ * Permission | Scope | Effect
659
+ * - | - | -
660
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
661
+ * @param schemaIdOrName The id or name of the targeted schema.
662
+ * @param requestBody The name and configuration
663
+ * @returns AffectedRecords
664
+ * @throws {ResourceAlreadyExistsError}
665
+ * @throws {IllegalArgumentError}
666
+ * @throws {IllegalStateException}
667
+ * @throws {ResourceUnknownException}
668
+ */
669
+ create(schemaIdOrName: ObjectId | string, requestBody: {
670
+ name: string;
671
+ configuration: TypeConfiguration;
672
+ }, options?: OptionsBase): Promise<AffectedRecords>;
673
+ /**
674
+ * Delete a property
675
+ *
676
+ * Permission | Scope | Effect
677
+ * - | - | -
678
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
679
+ * @param schemaIdOrName The id or name of the targeted schema.
680
+ * @param propertyPath The path to the property
681
+ * @returns AffectedRecords
682
+ * @throws {IllegalArgumentError}
683
+ * @throws {ResourceUnknownError}
684
+ */
685
+ remove(schemaIdOrName: ObjectId | string, propertyPath: string, options?: OptionsBase): Promise<AffectedRecords>;
686
+ /**
687
+ * Update a property
688
+ *
689
+ * Permission | Scope | Effect
690
+ * - | - | -
691
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
692
+ * @param schemaIdOrName The id or name of the targeted schema.
693
+ * @param propertyPath The path to the property
694
+ * @param requestBody The configuration
695
+ * @returns AffectedRecords
696
+ * @throws {IllegalArgumentError}
697
+ * @throws {ResourceUnknownError}
698
+ */
699
+ update(schemaIdOrName: ObjectId | string, propertyPath: string, requestBody: TypeConfiguration, options?: OptionsBase): Promise<AffectedRecords>;
700
+ }
701
+ export interface DataSchemasService {
702
+ /**
703
+ * Create a schema
704
+ *
705
+ * Permission | Scope | Effect
706
+ * - | - | -
707
+ * `CREATE_SCHEMAS` | `global` | **Required** for this endpoint
708
+ * @param requestBody
709
+ * @returns Schema successful operation
710
+ */
711
+ create(requestBody: SchemaInput, options?: OptionsBase): Promise<Schema>;
712
+ /**
713
+ * Request a list of schemas
714
+ *
715
+ * Permission | Scope | Effect
716
+ * - | - | -
717
+ * none | | Every one can use this endpoint
718
+ * `DISABLE_SCHEMAS` | `global` | Includes disabled schemas in the response
719
+ * @returns PagedResultWithPager<Schema>
720
+ */
721
+ find(options?: OptionsWithRql): Promise<PagedResultWithPager<Schema>>;
722
+ /**
723
+ * Request a list of all schemas
724
+ *
725
+ * Do not pass in an rql with limit operator!
726
+ *
727
+ * Permission | Scope | Effect
728
+ * - | - | -
729
+ * none | | Every one can use this endpoint
730
+ * `DISABLE_SCHEMAS` | `global` | Includes disabled schemas in the response
731
+ * @returns Schema[]
732
+ */
733
+ findAll(options?: OptionsWithRql): Promise<Schema[]>;
734
+ /**
735
+ * Request a list of all schemas and returns a generator
736
+ *
737
+ * Permission | Scope | Effect
738
+ * - | - | -
739
+ * none | | Every one can use this endpoint
740
+ * `DISABLE_SCHEMAS` | `global` | Includes disabled schemas in the response
741
+ * @returns Schema[]
742
+ */
743
+ findAllIterator(options?: OptionsWithRql): FindAllIterator<Schema>;
744
+ /**
745
+ * Find By Id
746
+ * @param id the Id to search for
747
+ * @returns the first element found
748
+ */
749
+ findById(id: ObjectId, options?: OptionsWithRql): Promise<Schema>;
750
+ /**
751
+ * Find By Name
752
+ * @param name the name to search for
753
+ * @returns the first element found
754
+ */
755
+ findByName(name: string, options?: OptionsWithRql): Promise<Schema>;
756
+ /**
757
+ * Find First
758
+ * @returns the first element found
759
+ */
760
+ findFirst(options?: OptionsWithRql): Promise<Schema>;
761
+ /**
762
+ * Update a schema
763
+ *
764
+ * Permission | Scope | Effect
765
+ * - | - | -
766
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
767
+ * @param schemaIdOrName The id or name of the targeted schema.
768
+ * @param requestBody The schema input
769
+ * @returns AffectedRecords
770
+ */
771
+ update(schemaIdOrName: ObjectId | string, requestBody: UpdateSchemaInput, options?: OptionsWithRql): Promise<AffectedRecords>;
772
+ /**
773
+ * Delete a schema
774
+ *
775
+ * Permission | Scope | Effect
776
+ * - | - | -
777
+ * `DELETE_SCHEMAS` | `global` | **Required** for this endpoint
778
+ * @param schemaIdOrName The id or name of the targeted schema.
779
+ * @returns AffectedRecords
780
+ * @throws {IllegalStateError}
781
+ */
782
+ remove(schemaIdOrName: ObjectId | string, options?: OptionsBase): Promise<AffectedRecords>;
783
+ /**
784
+ * Disable a schema
785
+ *
786
+ * Permission | Scope | Effect
787
+ * - | - | -
788
+ * `DISABLE_SCHEMAS` | `global` | **Required** for this endpoint
789
+ * @param schemaIdOrName The id or name of the targeted schema.
790
+ * @returns AffectedRecords
791
+ */
792
+ disable(schemaIdOrName: ObjectId | string, options?: OptionsBase): Promise<AffectedRecords>;
793
+ /**
794
+ * Enable a schema
795
+ *
796
+ * Permission | Scope | Effect
797
+ * - | - | -
798
+ * `DISABLE_SCHEMAS` | `global` | **Required** for this endpoint
799
+ * @param schemaIdOrName The id or name of the targeted schema.
800
+ * @returns AffectedRecords
801
+ */
802
+ enable(schemaIdOrName: ObjectId | string, options?: OptionsBase): Promise<AffectedRecords>;
803
+ }
804
+ export interface DataStatusesService {
805
+ /**
806
+ * Create a status
807
+ *
808
+ * Permission | Scope | Effect
809
+ * - | - | -
810
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
811
+ * @param schemaIdOrName The id or name of the targeted schema.
812
+ * @param requestBody The name and status data
813
+ * @returns AffectedRecords
814
+ * @throws {ResourceAlreadyExistsError}
815
+ */
816
+ create(schemaIdOrName: ObjectId | string, requestBody: {
817
+ name: string;
818
+ data?: StatusData;
819
+ }, options?: OptionsBase): Promise<AffectedRecords>;
820
+ /**
821
+ * Update a status
822
+ *
823
+ * Permission | Scope | Effect
824
+ * - | - | -
825
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
826
+ * @param schemaIdOrName The id or name of the targeted schema.
827
+ * @param name The name of the targeted status.
828
+ * @param requestBody The status data
829
+ * @returns AffectedRecords
830
+ * @throws {ResourceUnknownError}
831
+ */
832
+ update(schemaIdOrName: ObjectId | string, name: string, requestBody: StatusData, options?: OptionsBase): Promise<AffectedRecords>;
833
+ /**
834
+ * Delete a status
835
+ *
836
+ * Permission | Scope | Effect
837
+ * - | - | -
838
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
839
+ * @param schemaIdOrName The id or name of the targeted schema.
840
+ * @param name The name of the targeted status.
841
+ * @returns AffectedRecords
842
+ * @throws {StatusInUseError}
843
+ * @throws {ResourceUnknownError}
844
+ */
845
+ remove(schemaIdOrName: ObjectId | string, name: string, options?: OptionsBase): Promise<AffectedRecords>;
846
+ }
847
+ export interface DataTransitionsService {
848
+ /**
849
+ * Update the creation transition
850
+ *
851
+ * Permission | Scope | Effect
852
+ * - | - | -
853
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
854
+ * @param schemaIdOrName The id or name of the targeted schema.
855
+ * @param requestBody
856
+ * @returns {Promise<AffectedRecords>}
857
+ * @throws {IllegalArgumentError}
858
+ */
859
+ updateCreation(schemaIdOrName: ObjectId | string, requestBody: CreationTransition, options?: OptionsBase): Promise<AffectedRecords>;
860
+ /**
861
+ * Create a transition
862
+ *
863
+ * Permission | Scope | Effect
864
+ * - | - | -
865
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
866
+ * @param schemaIdOrName The id or name of the targeted schema.
867
+ * @param requestBody TransitionInput
868
+ * @returns {Promise<AffectedRecords>}
869
+ * @throws {IllegalArgumentError}
870
+ */
871
+ create(schemaIdOrName: ObjectId | string, requestBody: TransitionInput, options?: OptionsBase): Promise<AffectedRecords>;
872
+ /**
873
+ * Update a transition
874
+ *
875
+ * Permission | Scope | Effect
876
+ * - | - | -
877
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
878
+ * @param schemaIdOrName The id or name of the targeted schema.
879
+ * @param transitionId The id of the targeted transition.
880
+ * @param requestBody
881
+ * @returns {Promise<AffectedRecords>}
882
+ * @throws {IllegalArgumentError}
883
+ * @throws {ResourceUnknownError}
884
+ */
885
+ update(schemaIdOrName: ObjectId | string, transitionId: ObjectId, requestBody: TransitionInput, options?: OptionsBase): Promise<AffectedRecords>;
886
+ /**
887
+ * Delete a transition
888
+ *
889
+ * Permission | Scope | Effect
890
+ * - | - | -
891
+ * `UPDATE_SCHEMAS` | `global` | **Required** for this endpoint
892
+ * @param schemaIdOrName The id or name of the targeted schema.
893
+ * @param transitionId The id of the targeted transition.
894
+ * @returns {Promise<AffectedRecords>}
895
+ * @throws {ResourceUnknownError}
896
+ */
897
+ remove(schemaIdOrName: ObjectId | string, transitionId: ObjectId, options?: OptionsBase): Promise<AffectedRecords>;
898
+ }
899
+ export {};