@thunderid/node 1.5.0 → 1.6.0

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/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import fetch, { Headers, Request, Response } from "cross-fetch";
2
- import { BackchannelLogoutConstants, InvalidLogoutTokenError, ThunderIDAPIError, ThunderIDAuthException, ThunderIDJavaScriptClient, ThunderIDRuntimeError, addGroupMembers, addRoleAssignments, createAgent, createGroup, createRole, createUser, deleteAgent, deleteGroup, deleteRole, deleteUser, getAgent, getAgentGroups, getAgentRoles, getAgentTypes, getAgents, getFlows, getGroup, getGroupMembers, getGroups, getRole, getRoleAssignments, getRoles, getUser, getUserGroups, getUserTypes, getUsers, getVendorPrefix, logger, removeGroupMembers, removeRoleAssignments, resolveResourceEndpoint, updateAgent, updateGroup, updateMeCredentials, updateRole, updateUser } from "@thunderid/javascript";
2
+ import { BackchannelLogoutConstants, InvalidLogoutTokenError, ThunderIDAPIError, ThunderIDAuthException, ThunderIDJavaScriptClient, ThunderIDRuntimeError, addGroupMembers, addRoleAssignments, applyGatewayConfiguration, createAction, createAgent, createAgentType, createApplication, createApplicationSharingPolicy, createConfigurationVersion, createConnection, createDesignTheme, createFlow, createGateway, createGatewaySecret, createGatewayVariable, createGroup, createLayout, createNotificationTemplate, createOrganizationUnit, createResource, createResourceServer, createRole, createSecret, createUser, createUserByPath, createUserSharingPolicy, createVariable, deleteAction, deleteAgent, deleteAgentType, deleteApplication, deleteApplicationSharingPolicy, deleteConnection, deleteDesignTheme, deleteFlow, deleteGateway, deleteGatewaySecret, deleteGatewayVariable, deleteGroup, deleteImportedConfiguration, deleteLayout, deleteNotificationTemplate, deleteOrganizationUnit, deleteOrganizationUnitByPath, deleteResource, deleteResourceServer, deleteRole, deleteSecret, deleteTranslation, deleteTranslations, deleteUser, deleteUserSharingPolicy, deleteVariable, exportConfiguration, getAction, getActions, getAgent, getAgentGroups, getAgentRoles, getAgentType, getAgentTypes, getAgents, getApplication, getApplicationOverlayRules, getApplicationSharingPolicies, getApplicationSharingPolicy, getApplications, getConfigurationVersion, getConfigurationVersions, getConnection, getConnectionUsages, getConnections, getConnectionsMeta, getDesignTheme, getDesignThemeUsages, getDesignThemes, getFlow, getFlowUsages, getFlowVersion, getFlowVersions, getFlows, getGateway, getGatewayAppliedConfiguration, getGatewayAppliedVersion, getGatewayConfigurationDiff, getGatewaySecret, getGatewaySecrets, getGatewayVariable, getGatewayVariables, getGateways, getGroup, getGroupMembers, getGroups, getLanguages, getLayout, getLayoutUsages, getLayouts, getNotificationTemplate, getNotificationTemplates, getOrganizationUnit, getOrganizationUnitByPath, getOrganizationUnitChildren, getOrganizationUnitGroups, getOrganizationUnitRoles, getOrganizationUnitUsers, getOrganizationUnits, getResource, getResourceServer, getResourceServers, getResources, getRole, getRoleAssignments, getRoles, getSecret, getSecrets, getServerConfig, getServerConfigs, getUser, getUserGroups, getUserOverlayRules, getUserSharingPolicies, getUserSharingPolicy, getUserTypes, getUsers, getUsersByPath, getVariable, getVariables, getVendorPrefix, importConfiguration, logger, previewCimdDocument, regenerateClientSecret, regenerateFlowSecret, removeGroupMembers, removeRoleAssignments, resolveDesign, resolveResourceEndpoint, resolveTranslation, resolveTranslations, restoreFlowVersion, revertGatewayConfiguration, setTranslation, setTranslations, suspendAgent, suspendApplication, suspendUser, unlockAgent, unlockUser, unsuspendAgent, unsuspendApplication, unsuspendUser, updateAction, updateAgent, updateAgentType, updateApplication, updateApplicationSharingPolicy, updateConnection, updateDesignTheme, updateFlow, updateGateway, updateGatewaySecret, updateGatewayVariable, updateGroup, updateLayout, updateMeCredentials, updateNotificationTemplate, updateOrganizationUnit, updateOrganizationUnitByPath, updateResource, updateResourceServer, updateRole, updateSecret, updateServerConfig, updateUser, updateUserSharingPolicy, updateVariable } from "@thunderid/javascript";
3
3
  import cache from "memory-cache";
4
4
  import base64url from "base64url";
5
5
  import sha256 from "fast-sha256";
@@ -55,11 +55,30 @@ const createManagementClient = (resolve) => {
55
55
  ...await resolve(key, url)
56
56
  });
57
57
  return {
58
- agentTypes: { list: async ({ limit, offset,...options } = {}) => getAgentTypes({
59
- limit,
60
- offset,
61
- ...await config("agentTypes", options)
62
- }) },
58
+ agentTypes: {
59
+ create: async (payload, options) => createAgentType({
60
+ payload,
61
+ ...await config("agentTypes", options)
62
+ }),
63
+ delete: async (agentTypeId, options) => deleteAgentType({
64
+ agentTypeId: requireId(agentTypeId, "deleteAgentType"),
65
+ ...await config("agentTypes", options)
66
+ }),
67
+ get: async (agentTypeId, options) => getAgentType({
68
+ agentTypeId: requireId(agentTypeId, "getAgentType"),
69
+ ...await config("agentTypes", options)
70
+ }),
71
+ list: async ({ limit, offset,...options } = {}) => getAgentTypes({
72
+ limit,
73
+ offset,
74
+ ...await config("agentTypes", options)
75
+ }),
76
+ update: async (agentTypeId, payload, options) => updateAgentType({
77
+ agentTypeId: requireId(agentTypeId, "updateAgentType"),
78
+ payload,
79
+ ...await config("agentTypes", options)
80
+ })
81
+ },
63
82
  agents: {
64
83
  create: async (payload, options) => createAgent({
65
84
  payload,
@@ -91,18 +110,379 @@ const createManagementClient = (resolve) => {
91
110
  offset,
92
111
  ...await config("agents", options)
93
112
  }),
113
+ suspend: async (agentId, { operatorNote,...options } = {}) => suspendAgent({
114
+ agentId: requireId(agentId, "suspendAgent"),
115
+ operatorNote,
116
+ ...await config("agents", options)
117
+ }),
118
+ unlock: async (agentId, { operatorNote,...options } = {}) => unlockAgent({
119
+ agentId: requireId(agentId, "unlockAgent"),
120
+ operatorNote,
121
+ ...await config("agents", options)
122
+ }),
123
+ unsuspend: async (agentId, { operatorNote,...options } = {}) => unsuspendAgent({
124
+ agentId: requireId(agentId, "unsuspendAgent"),
125
+ operatorNote,
126
+ ...await config("agents", options)
127
+ }),
94
128
  update: async (agentId, payload, options) => updateAgent({
95
129
  agentId: requireId(agentId, "updateAgent"),
96
130
  payload,
97
131
  ...await config("agents", options)
98
132
  })
99
133
  },
100
- flows: { list: async ({ flowType, limit, offset,...options } = {}) => getFlows({
101
- flowType,
102
- limit,
103
- offset,
104
- ...await config("flows", options)
105
- }) },
134
+ applications: {
135
+ create: async (payload, options) => createApplication({
136
+ payload,
137
+ ...await config("applications", options)
138
+ }),
139
+ createSharingPolicy: async (applicationId, payload, options) => createApplicationSharingPolicy({
140
+ applicationId: requireId(applicationId, "createApplicationSharingPolicy"),
141
+ payload,
142
+ ...await config("applications", options)
143
+ }),
144
+ delete: async (applicationId, { administrationMode,...options } = {}) => deleteApplication({
145
+ administrationMode,
146
+ applicationId: requireId(applicationId, "deleteApplication"),
147
+ ...await config("applications", options)
148
+ }),
149
+ deleteSharingPolicy: async (applicationId, policyId, options) => deleteApplicationSharingPolicy({
150
+ applicationId: requireId(applicationId, "deleteApplicationSharingPolicy"),
151
+ policyId: requireId(policyId, "deleteApplicationSharingPolicy"),
152
+ ...await config("applications", options)
153
+ }),
154
+ get: async (applicationId, options) => getApplication({
155
+ applicationId: requireId(applicationId, "getApplication"),
156
+ ...await config("applications", options)
157
+ }),
158
+ getOverlayRules: async (applicationId, ouId, options) => getApplicationOverlayRules({
159
+ applicationId: requireId(applicationId, "getApplicationOverlayRules"),
160
+ ouId: requireId(ouId, "getApplicationOverlayRules"),
161
+ ...await config("applications", options)
162
+ }),
163
+ getSharingPolicy: async (applicationId, policyId, options) => getApplicationSharingPolicy({
164
+ applicationId: requireId(applicationId, "getApplicationSharingPolicy"),
165
+ policyId: requireId(policyId, "getApplicationSharingPolicy"),
166
+ ...await config("applications", options)
167
+ }),
168
+ list: async ({ limit, offset,...options } = {}) => getApplications({
169
+ limit,
170
+ offset,
171
+ ...await config("applications", options)
172
+ }),
173
+ listSharingPolicies: async (applicationId, { limit, offset,...options } = {}) => getApplicationSharingPolicies({
174
+ applicationId: requireId(applicationId, "getApplicationSharingPolicies"),
175
+ limit,
176
+ offset,
177
+ ...await config("applications", options)
178
+ }),
179
+ previewCimdDocument: async (clientId, options) => previewCimdDocument({
180
+ clientId: requireId(clientId, "previewCimdDocument"),
181
+ ...await config("applications", options)
182
+ }),
183
+ regenerateClientSecret: async (applicationId, { administrationMode,...options } = {}) => regenerateClientSecret({
184
+ administrationMode,
185
+ applicationId: requireId(applicationId, "regenerateClientSecret"),
186
+ ...await config("applications", options)
187
+ }),
188
+ regenerateFlowSecret: async (applicationId, options) => regenerateFlowSecret({
189
+ applicationId: requireId(applicationId, "regenerateFlowSecret"),
190
+ ...await config("applications", options)
191
+ }),
192
+ suspend: async (applicationId, { operatorNote,...options } = {}) => suspendApplication({
193
+ applicationId: requireId(applicationId, "suspendApplication"),
194
+ operatorNote,
195
+ ...await config("applications", options)
196
+ }),
197
+ unsuspend: async (applicationId, { operatorNote,...options } = {}) => unsuspendApplication({
198
+ applicationId: requireId(applicationId, "unsuspendApplication"),
199
+ operatorNote,
200
+ ...await config("applications", options)
201
+ }),
202
+ update: async (applicationId, payload, options) => updateApplication({
203
+ applicationId: requireId(applicationId, "updateApplication"),
204
+ payload,
205
+ ...await config("applications", options)
206
+ }),
207
+ updateSharingPolicy: async (applicationId, policyId, payload, options) => updateApplicationSharingPolicy({
208
+ applicationId: requireId(applicationId, "updateApplicationSharingPolicy"),
209
+ payload,
210
+ policyId: requireId(policyId, "updateApplicationSharingPolicy"),
211
+ ...await config("applications", options)
212
+ })
213
+ },
214
+ configuration: {
215
+ captureVersion: async (payload, options) => createConfigurationVersion({
216
+ payload,
217
+ ...await config("configurationVersions", options)
218
+ }),
219
+ deleteImported: async (payload, options) => deleteImportedConfiguration({
220
+ payload,
221
+ ...await config("import", options)
222
+ }),
223
+ export: async (payload, options) => exportConfiguration({
224
+ payload,
225
+ ...await config("export", options)
226
+ }),
227
+ getVersion: async (version$1, options) => getConfigurationVersion({
228
+ version: requireId(version$1, "getConfigurationVersion"),
229
+ ...await config("configurationVersions", options)
230
+ }),
231
+ import: async (payload, options) => importConfiguration({
232
+ payload,
233
+ ...await config("import", options)
234
+ }),
235
+ listVersions: async (options) => getConfigurationVersions(await config("configurationVersions", options))
236
+ },
237
+ connections: {
238
+ create: async (type, payload, options) => createConnection({
239
+ payload,
240
+ type: requireId(type, "createConnection"),
241
+ ...await config("connections", options)
242
+ }),
243
+ delete: async (type, connectionId, options) => deleteConnection({
244
+ connectionId: requireId(connectionId, "deleteConnection"),
245
+ type: requireId(type, "deleteConnection"),
246
+ ...await config("connections", options)
247
+ }),
248
+ get: async (type, connectionId, options) => getConnection({
249
+ connectionId: requireId(connectionId, "getConnection"),
250
+ type: requireId(type, "getConnection"),
251
+ ...await config("connections", options)
252
+ }),
253
+ getMeta: async ({ vendor,...options } = {}) => getConnectionsMeta({
254
+ vendor,
255
+ ...await config("connections", options)
256
+ }),
257
+ list: async ({ category, limit, offset,...options } = {}) => getConnections({
258
+ category,
259
+ limit,
260
+ offset,
261
+ ...await config("connections", options)
262
+ }),
263
+ listByType: async (type, options) => getConnections({
264
+ type: requireId(type, "getConnections"),
265
+ ...await config("connections", options)
266
+ }),
267
+ listUsages: async (type, connectionId, options) => getConnectionUsages({
268
+ connectionId: requireId(connectionId, "getConnectionUsages"),
269
+ type: requireId(type, "getConnectionUsages"),
270
+ ...await config("connections", options)
271
+ }),
272
+ update: async (type, connectionId, payload, options) => updateConnection({
273
+ connectionId: requireId(connectionId, "updateConnection"),
274
+ payload,
275
+ type: requireId(type, "updateConnection"),
276
+ ...await config("connections", options)
277
+ })
278
+ },
279
+ design: {
280
+ createLayout: async (payload, options) => createLayout({
281
+ payload,
282
+ ...await config("design", options)
283
+ }),
284
+ createTheme: async (payload, options) => createDesignTheme({
285
+ payload,
286
+ ...await config("design", options)
287
+ }),
288
+ deleteLayout: async (layoutId, options) => deleteLayout({
289
+ layoutId: requireId(layoutId, "deleteLayout"),
290
+ ...await config("design", options)
291
+ }),
292
+ deleteTheme: async (themeId, options) => deleteDesignTheme({
293
+ themeId: requireId(themeId, "deleteDesignTheme"),
294
+ ...await config("design", options)
295
+ }),
296
+ getLayout: async (layoutId, options) => getLayout({
297
+ layoutId: requireId(layoutId, "getLayout"),
298
+ ...await config("design", options)
299
+ }),
300
+ getTheme: async (themeId, options) => getDesignTheme({
301
+ themeId: requireId(themeId, "getDesignTheme"),
302
+ ...await config("design", options)
303
+ }),
304
+ listLayoutUsages: async (layoutId, { limit, offset,...options } = {}) => getLayoutUsages({
305
+ layoutId: requireId(layoutId, "getLayoutUsages"),
306
+ limit,
307
+ offset,
308
+ ...await config("design", options)
309
+ }),
310
+ listLayouts: async ({ limit, offset,...options } = {}) => getLayouts({
311
+ limit,
312
+ offset,
313
+ ...await config("design", options)
314
+ }),
315
+ listThemeUsages: async (themeId, { limit, offset,...options } = {}) => getDesignThemeUsages({
316
+ limit,
317
+ offset,
318
+ themeId: requireId(themeId, "getDesignThemeUsages"),
319
+ ...await config("design", options)
320
+ }),
321
+ listThemes: async ({ limit, offset,...options } = {}) => getDesignThemes({
322
+ limit,
323
+ offset,
324
+ ...await config("design", options)
325
+ }),
326
+ resolve: async (type, id, options) => resolveDesign({
327
+ id: requireId(id, "resolveDesign"),
328
+ type,
329
+ ...await config("design", options)
330
+ }),
331
+ updateLayout: async (layoutId, payload, options) => updateLayout({
332
+ layoutId: requireId(layoutId, "updateLayout"),
333
+ payload,
334
+ ...await config("design", options)
335
+ }),
336
+ updateTheme: async (themeId, payload, options) => updateDesignTheme({
337
+ payload,
338
+ themeId: requireId(themeId, "updateDesignTheme"),
339
+ ...await config("design", options)
340
+ })
341
+ },
342
+ flows: {
343
+ create: async (payload, options) => createFlow({
344
+ payload,
345
+ ...await config("flows", options)
346
+ }),
347
+ delete: async (flowId, options) => deleteFlow({
348
+ flowId: requireId(flowId, "deleteFlow"),
349
+ ...await config("flows", options)
350
+ }),
351
+ get: async (flowId, options) => getFlow({
352
+ flowId: requireId(flowId, "getFlow"),
353
+ ...await config("flows", options)
354
+ }),
355
+ getVersion: async (flowId, version$1, options) => getFlowVersion({
356
+ flowId: requireId(flowId, "getFlowVersion"),
357
+ version: version$1,
358
+ ...await config("flows", options)
359
+ }),
360
+ list: async ({ flowType, limit, offset,...options } = {}) => getFlows({
361
+ flowType,
362
+ limit,
363
+ offset,
364
+ ...await config("flows", options)
365
+ }),
366
+ listUsages: async (flowId, options) => getFlowUsages({
367
+ flowId: requireId(flowId, "getFlowUsages"),
368
+ ...await config("flows", options)
369
+ }),
370
+ listVersions: async (flowId, options) => getFlowVersions({
371
+ flowId: requireId(flowId, "getFlowVersions"),
372
+ ...await config("flows", options)
373
+ }),
374
+ restoreVersion: async (flowId, version$1, options) => restoreFlowVersion({
375
+ flowId: requireId(flowId, "restoreFlowVersion"),
376
+ version: version$1,
377
+ ...await config("flows", options)
378
+ }),
379
+ update: async (flowId, payload, options) => updateFlow({
380
+ flowId: requireId(flowId, "updateFlow"),
381
+ payload,
382
+ ...await config("flows", options)
383
+ })
384
+ },
385
+ gateways: {
386
+ applyConfiguration: async (gatewayId, payload, options) => applyGatewayConfiguration({
387
+ gatewayId: requireId(gatewayId, "applyGatewayConfiguration"),
388
+ payload,
389
+ ...await config("gateways", options)
390
+ }),
391
+ create: async (payload, options) => createGateway({
392
+ payload,
393
+ ...await config("gateways", options)
394
+ }),
395
+ createSecret: async (gatewayId, payload, options) => createGatewaySecret({
396
+ gatewayId: requireId(gatewayId, "createGatewaySecret"),
397
+ payload,
398
+ ...await config("gateways", options)
399
+ }),
400
+ createVariable: async (gatewayId, payload, options) => createGatewayVariable({
401
+ gatewayId: requireId(gatewayId, "createGatewayVariable"),
402
+ payload,
403
+ ...await config("gateways", options)
404
+ }),
405
+ delete: async (gatewayId, options) => deleteGateway({
406
+ gatewayId: requireId(gatewayId, "deleteGateway"),
407
+ ...await config("gateways", options)
408
+ }),
409
+ deleteSecret: async (gatewayId, name, options) => deleteGatewaySecret({
410
+ gatewayId: requireId(gatewayId, "deleteGatewaySecret"),
411
+ name: requireId(name, "deleteGatewaySecret"),
412
+ ...await config("gateways", options)
413
+ }),
414
+ deleteVariable: async (gatewayId, name, options) => deleteGatewayVariable({
415
+ gatewayId: requireId(gatewayId, "deleteGatewayVariable"),
416
+ name: requireId(name, "deleteGatewayVariable"),
417
+ ...await config("gateways", options)
418
+ }),
419
+ get: async (gatewayId, options) => getGateway({
420
+ gatewayId: requireId(gatewayId, "getGateway"),
421
+ ...await config("gateways", options)
422
+ }),
423
+ getAppliedConfiguration: async (gatewayId, options) => getGatewayAppliedConfiguration({
424
+ gatewayId: requireId(gatewayId, "getGatewayAppliedConfiguration"),
425
+ ...await config("gateways", options)
426
+ }),
427
+ getAppliedVersion: async (gatewayId, options) => getGatewayAppliedVersion({
428
+ gatewayId: requireId(gatewayId, "getGatewayAppliedVersion"),
429
+ ...await config("gateways", options)
430
+ }),
431
+ getConfigurationDiff: async (gatewayId, { version: version$1,...options } = {}) => getGatewayConfigurationDiff({
432
+ gatewayId: requireId(gatewayId, "getGatewayConfigurationDiff"),
433
+ version: version$1,
434
+ ...await config("gateways", options)
435
+ }),
436
+ getSecret: async (gatewayId, name, options) => getGatewaySecret({
437
+ gatewayId: requireId(gatewayId, "getGatewaySecret"),
438
+ name: requireId(name, "getGatewaySecret"),
439
+ ...await config("gateways", options)
440
+ }),
441
+ getVariable: async (gatewayId, name, options) => getGatewayVariable({
442
+ gatewayId: requireId(gatewayId, "getGatewayVariable"),
443
+ name: requireId(name, "getGatewayVariable"),
444
+ ...await config("gateways", options)
445
+ }),
446
+ list: async (options) => getGateways(await config("gateways", options)),
447
+ listSecrets: async (gatewayId, { filter, limit, names, offset,...options } = {}) => getGatewaySecrets({
448
+ filter,
449
+ gatewayId: requireId(gatewayId, "getGatewaySecrets"),
450
+ limit,
451
+ names,
452
+ offset,
453
+ ...await config("gateways", options)
454
+ }),
455
+ listVariables: async (gatewayId, { filter, limit, names, offset,...options } = {}) => getGatewayVariables({
456
+ filter,
457
+ gatewayId: requireId(gatewayId, "getGatewayVariables"),
458
+ limit,
459
+ names,
460
+ offset,
461
+ ...await config("gateways", options)
462
+ }),
463
+ revertConfiguration: async (gatewayId, payload, options) => revertGatewayConfiguration({
464
+ gatewayId: requireId(gatewayId, "revertGatewayConfiguration"),
465
+ payload,
466
+ ...await config("gateways", options)
467
+ }),
468
+ update: async (gatewayId, payload, options) => updateGateway({
469
+ gatewayId: requireId(gatewayId, "updateGateway"),
470
+ payload,
471
+ ...await config("gateways", options)
472
+ }),
473
+ updateSecret: async (gatewayId, name, payload, options) => updateGatewaySecret({
474
+ gatewayId: requireId(gatewayId, "updateGatewaySecret"),
475
+ name: requireId(name, "updateGatewaySecret"),
476
+ payload,
477
+ ...await config("gateways", options)
478
+ }),
479
+ updateVariable: async (gatewayId, name, payload, options) => updateGatewayVariable({
480
+ gatewayId: requireId(gatewayId, "updateGatewayVariable"),
481
+ name: requireId(name, "updateGatewayVariable"),
482
+ payload,
483
+ ...await config("gateways", options)
484
+ })
485
+ },
106
486
  groups: {
107
487
  addMembers: async (groupId, members, options) => addGroupMembers({
108
488
  groupId: requireId(groupId, "addGroupMembers"),
@@ -143,6 +523,221 @@ const createManagementClient = (resolve) => {
143
523
  ...await config("groups", options)
144
524
  })
145
525
  },
526
+ i18n: {
527
+ deleteTranslation: async (language, namespace, key, options) => deleteTranslation({
528
+ key,
529
+ language,
530
+ namespace,
531
+ ...await config("i18n", options)
532
+ }),
533
+ deleteTranslations: async (language, options) => deleteTranslations({
534
+ language: requireId(language, "deleteTranslations"),
535
+ ...await config("i18n", options)
536
+ }),
537
+ listLanguages: async (options) => getLanguages(await config("i18n", options)),
538
+ resolveTranslation: async (language, namespace, key, options) => resolveTranslation({
539
+ key,
540
+ language,
541
+ namespace,
542
+ ...await config("i18n", options)
543
+ }),
544
+ resolveTranslations: async (language, { namespace,...options } = {}) => resolveTranslations({
545
+ language,
546
+ namespace,
547
+ ...await config("i18n", options)
548
+ }),
549
+ setTranslation: async (language, namespace, key, payload, options) => setTranslation({
550
+ key,
551
+ language,
552
+ namespace,
553
+ payload,
554
+ ...await config("i18n", options)
555
+ }),
556
+ setTranslations: async (language, payload, options) => setTranslations({
557
+ language,
558
+ payload,
559
+ ...await config("i18n", options)
560
+ })
561
+ },
562
+ notificationTemplates: {
563
+ create: async (channel, payload, options) => createNotificationTemplate({
564
+ channel: requireId(channel, "createNotificationTemplate"),
565
+ payload,
566
+ ...await config("notificationTemplates", options)
567
+ }),
568
+ delete: async (channel, templateId, options) => deleteNotificationTemplate({
569
+ channel: requireId(channel, "deleteNotificationTemplate"),
570
+ templateId: requireId(templateId, "deleteNotificationTemplate"),
571
+ ...await config("notificationTemplates", options)
572
+ }),
573
+ get: async (channel, templateId, options) => getNotificationTemplate({
574
+ channel: requireId(channel, "getNotificationTemplate"),
575
+ templateId: requireId(templateId, "getNotificationTemplate"),
576
+ ...await config("notificationTemplates", options)
577
+ }),
578
+ list: async (channel, { limit, offset,...options } = {}) => getNotificationTemplates({
579
+ channel: requireId(channel, "getNotificationTemplates"),
580
+ limit,
581
+ offset,
582
+ ...await config("notificationTemplates", options)
583
+ }),
584
+ update: async (channel, templateId, payload, options) => updateNotificationTemplate({
585
+ channel: requireId(channel, "updateNotificationTemplate"),
586
+ payload,
587
+ templateId: requireId(templateId, "updateNotificationTemplate"),
588
+ ...await config("notificationTemplates", options)
589
+ })
590
+ },
591
+ organizationUnits: {
592
+ create: async (payload, options) => createOrganizationUnit({
593
+ payload,
594
+ ...await config("organizationUnits", options)
595
+ }),
596
+ delete: async (ouId, options) => deleteOrganizationUnit({
597
+ ouId: requireId(ouId, "deleteOrganizationUnit"),
598
+ ...await config("organizationUnits", options)
599
+ }),
600
+ deleteByPath: async (path, options) => deleteOrganizationUnitByPath({
601
+ path,
602
+ ...await config("organizationUnits", options)
603
+ }),
604
+ get: async (ouId, options) => getOrganizationUnit({
605
+ ouId: requireId(ouId, "getOrganizationUnit"),
606
+ ...await config("organizationUnits", options)
607
+ }),
608
+ getByPath: async (path, options) => getOrganizationUnitByPath({
609
+ path,
610
+ ...await config("organizationUnits", options)
611
+ }),
612
+ list: async ({ filter, limit, offset,...options } = {}) => getOrganizationUnits({
613
+ filter,
614
+ limit,
615
+ offset,
616
+ ...await config("organizationUnits", options)
617
+ }),
618
+ listChildren: async (unit, { filter, limit, offset,...options } = {}) => getOrganizationUnitChildren({
619
+ filter,
620
+ limit,
621
+ offset,
622
+ ouId: unit?.ouId,
623
+ path: unit?.path,
624
+ ...await config("organizationUnits", options)
625
+ }),
626
+ listGroups: async (unit, { limit, offset,...options } = {}) => getOrganizationUnitGroups({
627
+ ...unit,
628
+ limit,
629
+ offset,
630
+ ...await config("organizationUnits", options)
631
+ }),
632
+ listRoles: async (unit, { limit, offset,...options } = {}) => getOrganizationUnitRoles({
633
+ ...unit,
634
+ limit,
635
+ offset,
636
+ ...await config("organizationUnits", options)
637
+ }),
638
+ listUsers: async (unit, { limit, offset,...options } = {}) => getOrganizationUnitUsers({
639
+ ...unit,
640
+ limit,
641
+ offset,
642
+ ...await config("organizationUnits", options)
643
+ }),
644
+ update: async (ouId, payload, options) => updateOrganizationUnit({
645
+ ouId: requireId(ouId, "updateOrganizationUnit"),
646
+ payload,
647
+ ...await config("organizationUnits", options)
648
+ }),
649
+ updateByPath: async (path, payload, options) => updateOrganizationUnitByPath({
650
+ path,
651
+ payload,
652
+ ...await config("organizationUnits", options)
653
+ })
654
+ },
655
+ resourceServers: {
656
+ create: async (payload, options) => createResourceServer({
657
+ payload,
658
+ ...await config("resourceServers", options)
659
+ }),
660
+ createAction: async (resourceServerId, payload, { resourceId,...options } = {}) => createAction({
661
+ payload,
662
+ resourceId,
663
+ resourceServerId: requireId(resourceServerId, "createAction"),
664
+ ...await config("resourceServers", options)
665
+ }),
666
+ createResource: async (resourceServerId, payload, options) => createResource({
667
+ payload,
668
+ resourceServerId: requireId(resourceServerId, "createResource"),
669
+ ...await config("resourceServers", options)
670
+ }),
671
+ delete: async (resourceServerId, options) => deleteResourceServer({
672
+ resourceServerId: requireId(resourceServerId, "deleteResourceServer"),
673
+ ...await config("resourceServers", options)
674
+ }),
675
+ deleteAction: async (resourceServerId, actionId, { administrationMode, resourceId,...options } = {}) => deleteAction({
676
+ actionId: requireId(actionId, "deleteAction"),
677
+ administrationMode,
678
+ resourceId,
679
+ resourceServerId: requireId(resourceServerId, "deleteAction"),
680
+ ...await config("resourceServers", options)
681
+ }),
682
+ deleteResource: async (resourceServerId, resourceId, options) => deleteResource({
683
+ resourceId: requireId(resourceId, "deleteResource"),
684
+ resourceServerId: requireId(resourceServerId, "deleteResource"),
685
+ ...await config("resourceServers", options)
686
+ }),
687
+ get: async (resourceServerId, options) => getResourceServer({
688
+ resourceServerId: requireId(resourceServerId, "getResourceServer"),
689
+ ...await config("resourceServers", options)
690
+ }),
691
+ getAction: async (resourceServerId, actionId, { resourceId,...options } = {}) => getAction({
692
+ actionId: requireId(actionId, "getAction"),
693
+ resourceId,
694
+ resourceServerId: requireId(resourceServerId, "getAction"),
695
+ ...await config("resourceServers", options)
696
+ }),
697
+ getResource: async (resourceServerId, resourceId, options) => getResource({
698
+ resourceId: requireId(resourceId, "getResource"),
699
+ resourceServerId: requireId(resourceServerId, "getResource"),
700
+ ...await config("resourceServers", options)
701
+ }),
702
+ list: async ({ limit, offset,...options } = {}) => getResourceServers({
703
+ limit,
704
+ offset,
705
+ ...await config("resourceServers", options)
706
+ }),
707
+ listActions: async (resourceServerId, { kind, limit, offset, resourceId,...options } = {}) => getActions({
708
+ kind,
709
+ limit,
710
+ offset,
711
+ resourceId,
712
+ resourceServerId: requireId(resourceServerId, "getActions"),
713
+ ...await config("resourceServers", options)
714
+ }),
715
+ listResources: async (resourceServerId, { limit, offset, parentId,...options } = {}) => getResources({
716
+ limit,
717
+ offset,
718
+ parentId,
719
+ resourceServerId: requireId(resourceServerId, "getResources"),
720
+ ...await config("resourceServers", options)
721
+ }),
722
+ update: async (resourceServerId, payload, options) => updateResourceServer({
723
+ payload,
724
+ resourceServerId: requireId(resourceServerId, "updateResourceServer"),
725
+ ...await config("resourceServers", options)
726
+ }),
727
+ updateAction: async (resourceServerId, actionId, payload, { resourceId,...options } = {}) => updateAction({
728
+ actionId: requireId(actionId, "updateAction"),
729
+ payload,
730
+ resourceId,
731
+ resourceServerId: requireId(resourceServerId, "updateAction"),
732
+ ...await config("resourceServers", options)
733
+ }),
734
+ updateResource: async (resourceServerId, resourceId, payload, options) => updateResource({
735
+ payload,
736
+ resourceId: requireId(resourceId, "updateResource"),
737
+ resourceServerId: requireId(resourceServerId, "updateResource"),
738
+ ...await config("resourceServers", options)
739
+ })
740
+ },
146
741
  roles: {
147
742
  addAssignments: async (roleId, assignments, options) => addRoleAssignments({
148
743
  assignments,
@@ -184,6 +779,44 @@ const createManagementClient = (resolve) => {
184
779
  ...await config("roles", options)
185
780
  })
186
781
  },
782
+ secrets: {
783
+ create: async (payload, options) => createSecret({
784
+ payload,
785
+ ...await config("secrets", options)
786
+ }),
787
+ delete: async (name, options) => deleteSecret({
788
+ name: requireId(name, "deleteSecret"),
789
+ ...await config("secrets", options)
790
+ }),
791
+ get: async (name, options) => getSecret({
792
+ name: requireId(name, "getSecret"),
793
+ ...await config("secrets", options)
794
+ }),
795
+ list: async ({ filter, limit, names, offset,...options } = {}) => getSecrets({
796
+ filter,
797
+ limit,
798
+ names,
799
+ offset,
800
+ ...await config("secrets", options)
801
+ }),
802
+ update: async (name, payload, options) => updateSecret({
803
+ name: requireId(name, "updateSecret"),
804
+ payload,
805
+ ...await config("secrets", options)
806
+ })
807
+ },
808
+ serverConfig: {
809
+ get: async (name, options) => getServerConfig({
810
+ name: requireId(name, "getServerConfig"),
811
+ ...await config("serverConfig", options)
812
+ }),
813
+ list: async (options) => getServerConfigs(await config("serverConfig", options)),
814
+ update: async (name, payload, options) => updateServerConfig({
815
+ name: requireId(name, "updateServerConfig"),
816
+ payload,
817
+ ...await config("serverConfig", options)
818
+ })
819
+ },
187
820
  userTypes: { list: async ({ limit, offset,...options } = {}) => getUserTypes({
188
821
  limit,
189
822
  offset,
@@ -194,30 +827,114 @@ const createManagementClient = (resolve) => {
194
827
  payload,
195
828
  ...await config("users", options)
196
829
  }),
830
+ createByPath: async (path, payload, options) => createUserByPath({
831
+ path,
832
+ payload,
833
+ ...await config("users", options)
834
+ }),
835
+ createSharingPolicy: async (userId, payload, options) => createUserSharingPolicy({
836
+ payload,
837
+ userId: requireId(userId, "createUserSharingPolicy"),
838
+ ...await config("users", options)
839
+ }),
197
840
  delete: async (userId, options) => deleteUser({
198
841
  userId: requireId(userId, "deleteUser"),
199
842
  ...await config("users", options)
200
843
  }),
844
+ deleteSharingPolicy: async (userId, policyId, options) => deleteUserSharingPolicy({
845
+ policyId: requireId(policyId, "deleteUserSharingPolicy"),
846
+ userId: requireId(userId, "deleteUserSharingPolicy"),
847
+ ...await config("users", options)
848
+ }),
201
849
  get: async (userId, options) => getUser({
202
850
  userId: requireId(userId, "getUser"),
203
851
  ...await config("users", options)
204
852
  }),
853
+ getOverlayRules: async (userId, ouId, options) => getUserOverlayRules({
854
+ ouId: requireId(ouId, "getUserOverlayRules"),
855
+ userId: requireId(userId, "getUserOverlayRules"),
856
+ ...await config("users", options)
857
+ }),
858
+ getSharingPolicy: async (userId, policyId, options) => getUserSharingPolicy({
859
+ policyId: requireId(policyId, "getUserSharingPolicy"),
860
+ userId: requireId(userId, "getUserSharingPolicy"),
861
+ ...await config("users", options)
862
+ }),
205
863
  list: async ({ filter, limit, offset,...options } = {}) => getUsers({
206
864
  filter,
207
865
  limit,
208
866
  offset,
209
867
  ...await config("users", options)
210
868
  }),
869
+ listByPath: async (path, { limit, offset,...options } = {}) => getUsersByPath({
870
+ limit,
871
+ offset,
872
+ path,
873
+ ...await config("users", options)
874
+ }),
211
875
  listGroups: async (userId, { limit, offset,...options } = {}) => getUserGroups({
212
876
  limit,
213
877
  offset,
214
878
  userId: requireId(userId, "getUserGroups"),
215
879
  ...await config("users", options)
216
880
  }),
881
+ listSharingPolicies: async (userId, { limit, offset,...options } = {}) => getUserSharingPolicies({
882
+ limit,
883
+ offset,
884
+ userId: requireId(userId, "getUserSharingPolicies"),
885
+ ...await config("users", options)
886
+ }),
887
+ suspend: async (userId, { operatorNote,...options } = {}) => suspendUser({
888
+ operatorNote,
889
+ userId: requireId(userId, "suspendUser"),
890
+ ...await config("users", options)
891
+ }),
892
+ unlock: async (userId, { operatorNote,...options } = {}) => unlockUser({
893
+ operatorNote,
894
+ userId: requireId(userId, "unlockUser"),
895
+ ...await config("users", options)
896
+ }),
897
+ unsuspend: async (userId, { operatorNote,...options } = {}) => unsuspendUser({
898
+ operatorNote,
899
+ userId: requireId(userId, "unsuspendUser"),
900
+ ...await config("users", options)
901
+ }),
217
902
  update: async (userId, payload, options) => updateUser({
218
903
  payload,
219
904
  userId: requireId(userId, "updateUser"),
220
905
  ...await config("users", options)
906
+ }),
907
+ updateSharingPolicy: async (userId, policyId, payload, options) => updateUserSharingPolicy({
908
+ payload,
909
+ policyId: requireId(policyId, "updateUserSharingPolicy"),
910
+ userId: requireId(userId, "updateUserSharingPolicy"),
911
+ ...await config("users", options)
912
+ })
913
+ },
914
+ variables: {
915
+ create: async (payload, options) => createVariable({
916
+ payload,
917
+ ...await config("variables", options)
918
+ }),
919
+ delete: async (name, options) => deleteVariable({
920
+ name: requireId(name, "deleteVariable"),
921
+ ...await config("variables", options)
922
+ }),
923
+ get: async (name, options) => getVariable({
924
+ name: requireId(name, "getVariable"),
925
+ ...await config("variables", options)
926
+ }),
927
+ list: async ({ filter, limit, names, offset,...options } = {}) => getVariables({
928
+ filter,
929
+ limit,
930
+ names,
931
+ offset,
932
+ ...await config("variables", options)
933
+ }),
934
+ update: async (name, payload, options) => updateVariable({
935
+ name: requireId(name, "updateVariable"),
936
+ payload,
937
+ ...await config("variables", options)
221
938
  })
222
939
  }
223
940
  };
@@ -933,10 +1650,25 @@ var generateSessionId_default = generateSessionId;
933
1650
  const MANAGEMENT_COLLECTIONS = {
934
1651
  agentTypes: "agent-types",
935
1652
  agents: "agents",
1653
+ applications: "applications",
1654
+ configurationVersions: "configuration-versions",
1655
+ connections: "connections",
1656
+ design: "design",
1657
+ export: "export",
1658
+ flows: "flows",
1659
+ gateways: "gateways",
936
1660
  groups: "groups",
1661
+ i18n: "i18n",
1662
+ import: "import",
1663
+ notificationTemplates: "notification-templates",
1664
+ organizationUnits: "organization-units",
1665
+ resourceServers: "resource-servers",
937
1666
  roles: "roles",
1667
+ secrets: "secrets",
1668
+ serverConfig: "server-config",
938
1669
  userTypes: "user-types",
939
- users: "users"
1670
+ users: "users",
1671
+ variables: "variables"
940
1672
  };
941
1673
  const MANAGEMENT_COLLECTION_KEYS = Object.keys(MANAGEMENT_COLLECTIONS);
942
1674
  /**