hcloud-sdk 15.0.0 → 17.0.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.
Files changed (108) hide show
  1. package/changelog.md +78 -33
  2. package/lib/Hcloud.d.ts +3 -0
  3. package/lib/Hcloud.js +7 -0
  4. package/lib/helper/ValidationHelper.d.ts +66 -0
  5. package/lib/helper/ValidationHelper.js +312 -0
  6. package/lib/interfaces/auditor/index.d.ts +10 -4
  7. package/lib/interfaces/auditor/index.js +4 -0
  8. package/lib/interfaces/friday/index.d.ts +3 -0
  9. package/lib/interfaces/friday/index.js +19 -0
  10. package/lib/interfaces/friday/space/database/document/index.d.ts +34 -0
  11. package/lib/interfaces/friday/space/database/document/index.js +13 -0
  12. package/lib/interfaces/friday/space/database/index.d.ts +12 -0
  13. package/lib/interfaces/friday/space/database/index.js +2 -0
  14. package/lib/interfaces/friday/space/index.d.ts +21 -0
  15. package/lib/interfaces/friday/space/index.js +11 -0
  16. package/lib/interfaces/frontend/config/index.d.ts +1 -0
  17. package/lib/interfaces/fuse/space/index.d.ts +1 -0
  18. package/lib/interfaces/global/Products.d.ts +3 -1
  19. package/lib/interfaces/global/Products.js +2 -0
  20. package/lib/interfaces/global/Views.d.ts +2 -1
  21. package/lib/interfaces/global/Views.js +1 -0
  22. package/lib/interfaces/high5/execution/index.d.ts +43 -0
  23. package/lib/interfaces/high5/execution/index.js +12 -0
  24. package/lib/interfaces/high5/index.d.ts +2 -2
  25. package/lib/interfaces/high5/index.js +2 -2
  26. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +1 -0
  27. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +22 -1
  28. package/lib/interfaces/high5/space/event/stream/node/index.js +6 -1
  29. package/lib/interfaces/high5/space/execution/index.d.ts +57 -1
  30. package/lib/interfaces/high5/space/execution/index.js +8 -0
  31. package/lib/interfaces/high5/space/index.d.ts +2 -0
  32. package/lib/interfaces/high5/space/pool/index.d.ts +28 -0
  33. package/lib/interfaces/high5/space/pool/index.js +2 -0
  34. package/lib/interfaces/high5/space/webhook/index.d.ts +3 -1
  35. package/lib/interfaces/high5/wave/index.d.ts +26 -4
  36. package/lib/interfaces/high5/wave/index.js +4 -0
  37. package/lib/interfaces/idp/index.d.ts +1 -0
  38. package/lib/interfaces/idp/index.js +1 -0
  39. package/lib/interfaces/idp/organization/license/index.d.ts +11 -0
  40. package/lib/interfaces/idp/organization/member/index.d.ts +3 -0
  41. package/lib/interfaces/idp/organization/service-accounts.d.ts +8 -0
  42. package/lib/interfaces/idp/organization/service-accounts.js +2 -0
  43. package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +1 -0
  44. package/lib/interfaces/idp/user/GeneralSettings.d.ts +1 -0
  45. package/lib/interfaces/idp/user/GeneralSettings.js +1 -0
  46. package/lib/interfaces/idp/user/Scopes.d.ts +15 -2
  47. package/lib/interfaces/idp/user/Scopes.js +39 -1
  48. package/lib/interfaces/idp/user/Totp.d.ts +4 -2
  49. package/lib/interfaces/idp/user/index.d.ts +1 -0
  50. package/lib/interfaces/nats/index.d.ts +92 -5
  51. package/lib/interfaces/nats/index.js +155 -11
  52. package/lib/service/agent/bundle/dev/index.d.ts +3 -0
  53. package/lib/service/agent/bundle/dev/index.js +16 -0
  54. package/lib/service/agent/context/index.d.ts +5 -0
  55. package/lib/service/agent/context/index.js +14 -0
  56. package/lib/service/dali/DaliAvatar.d.ts +22 -4
  57. package/lib/service/dali/DaliAvatar.js +32 -2
  58. package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +26 -0
  59. package/lib/service/dali/avatar/DaliCosmoSpace.js +58 -0
  60. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +1 -1
  61. package/lib/service/dali/avatar/DaliFuseSpace.js +3 -3
  62. package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +29 -0
  63. package/lib/service/dali/avatar/DaliHigh5Pool.js +61 -0
  64. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +1 -1
  65. package/lib/service/dali/avatar/DaliHigh5Space.js +3 -3
  66. package/lib/service/dali/avatar/DaliServiceAccount.d.ts +26 -0
  67. package/lib/service/dali/avatar/DaliServiceAccount.js +58 -0
  68. package/lib/service/friday/index.d.ts +13 -0
  69. package/lib/service/friday/index.js +35 -0
  70. package/lib/service/friday/space/database/document/index.d.ts +58 -0
  71. package/lib/service/friday/space/database/document/index.js +97 -0
  72. package/lib/service/friday/space/database/index.d.ts +55 -0
  73. package/lib/service/friday/space/database/index.js +101 -0
  74. package/lib/service/friday/space/index.d.ts +81 -0
  75. package/lib/service/friday/space/index.js +150 -0
  76. package/lib/service/high5/execution/index.d.ts +8 -0
  77. package/lib/service/high5/execution/index.js +21 -0
  78. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +1 -2
  79. package/lib/service/high5/space/event/stream/design/DesignOperations.js +5 -1
  80. package/lib/service/high5/space/execution/index.d.ts +31 -1
  81. package/lib/service/high5/space/execution/index.js +47 -2
  82. package/lib/service/high5/space/execution/status/index.d.ts +13 -6
  83. package/lib/service/high5/space/execution/status/index.js +20 -8
  84. package/lib/service/high5/space/index.d.ts +18 -6
  85. package/lib/service/high5/space/index.js +30 -7
  86. package/lib/service/high5/space/pool/index.d.ts +97 -0
  87. package/lib/service/high5/space/pool/index.js +171 -0
  88. package/lib/service/high5/wave/s3/index.d.ts +8 -1
  89. package/lib/service/high5/wave/s3/index.js +29 -8
  90. package/lib/service/idp/oauth/index.d.ts +2 -2
  91. package/lib/service/idp/oauth/index.js +12 -13
  92. package/lib/service/idp/organization/index.d.ts +6 -0
  93. package/lib/service/idp/organization/index.js +10 -0
  94. package/lib/service/idp/organization/member/index.d.ts +2 -1
  95. package/lib/service/idp/organization/member/index.js +2 -1
  96. package/lib/service/idp/organization/service-accounts/index.d.ts +64 -0
  97. package/lib/service/idp/organization/service-accounts/index.js +108 -0
  98. package/lib/service/idp/registration/index.d.ts +1 -1
  99. package/lib/service/idp/registration/index.js +2 -2
  100. package/lib/service/idp/user/index.d.ts +4 -0
  101. package/lib/service/idp/user/index.js +9 -0
  102. package/lib/service/idp/user/password/index.js +1 -1
  103. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +1 -1
  104. package/lib/service/idp/user/settings/twoFactor/totp/index.js +1 -1
  105. package/lib/service/mothership/index.js +0 -1
  106. package/lib/service/nats/index.js +2 -3
  107. package/lib/utils/bouncer/features/Provider.js +0 -3
  108. package/package.json +22 -24
@@ -3,9 +3,9 @@ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, p
3
3
  if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
4
4
  return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
5
5
  };
6
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
6
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.NatsSubject = exports.NatsObjectType = exports.NatsMessageType = exports.NatsSubjects = void 0;
8
+ exports.NatsSubjects = exports.NatsSubject = exports.NatsObjectType = exports.NatsMessageType = void 0;
9
9
  var NatsSubject;
10
10
  (function (NatsSubject) {
11
11
  NatsSubject["IDP_USER_GENERAL"] = "hcloud.idp.user.${userId}.general";
@@ -16,16 +16,22 @@ var NatsSubject;
16
16
  NatsSubject["IDP_USER_SECURITY_PATS"] = "hcloud.idp.user.${userId}.security.pats";
17
17
  NatsSubject["IDP_USER_SECURITY_GENERAL"] = "hcloud.idp.user.${userId}.security.general";
18
18
  NatsSubject["IDP_USER_LICENSE"] = "hcloud.idp.user.${userId}.license";
19
+ NatsSubject["IDP_USER_SETTINGS_OAUTH_REVOKE"] = "hcloud.idp.user.${userId}.settings.oauth.${oAuthAppId}.revoke";
20
+ NatsSubject["IDP_ORGANIZATION"] = "hcloud.idp.organization.${base64orgName}";
19
21
  NatsSubject["IDP_ORGANIZATION_INVITATIONS"] = "hcloud.idp.organization.${base64orgName}.invitations";
20
22
  NatsSubject["IDP_ORGANIZATION_MEMBERS"] = "hcloud.idp.organization.${base64orgName}.members";
21
23
  NatsSubject["IDP_ORGANIZATION_MEMBERS_EXECUTION_TARGET"] = "hcloud.idp.organization.${base64orgName}.members.${base64email}.executionTarget";
22
24
  NatsSubject["IDP_ORGANIZATION_TEAMS"] = "hcloud.idp.organization.${base64orgName}.teams";
23
25
  NatsSubject["IDP_ORGANIZATION_TEAM_MEMBERS"] = "hcloud.idp.organization.${base64orgName}.teams.${base64teamName}.members";
24
26
  NatsSubject["IDP_ORGANIZATION_LICENSE"] = "hcloud.idp.organization.${base64orgName}.license";
27
+ NatsSubject["IDP_ORGANIZATION_SETTINGS_OAUTHAPP"] = "hcloud.idp.organization.${base64orgName}.settings.oauthapp.${oAuthAppId}";
28
+ NatsSubject["IDP_ORGANIZATION_SERVICE_ACCOUNTS"] = "hcloud.idp.organization.${base64orgName}.serviceAccounts";
25
29
  NatsSubject["HIGH5_SPACES"] = "hcloud.high5.organization.${base64orgName}.spaces";
26
30
  NatsSubject["HIGH5_SPACE_PERMISSIONS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.permissions";
27
31
  NatsSubject["HIGH5_STREAM_EXECUTE"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}";
28
32
  NatsSubject["HIGH5_STREAM_CANCEL"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}";
33
+ NatsSubject["HIGH5_STREAM_DEBUG_STOPPED"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}.${executionId}.stopped";
34
+ NatsSubject["HIGH5_STREAM_DEBUG_COMMAND"] = "hcloud.high5.organization.${organizationId}.stream.execute.${base64email}.${executionSecret}.command";
29
35
  NatsSubject["HIGH5_EVENTS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events";
30
36
  NatsSubject["HIGH5_STREAMS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.streams";
31
37
  NatsSubject["HIGH5_EVENT_STREAMS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams";
@@ -36,12 +42,24 @@ var NatsSubject;
36
42
  NatsSubject["HIGH5_CATALOGS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.catalogs";
37
43
  NatsSubject["HIGH5_NODES"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.node";
38
44
  NatsSubject["High5_DESIGN"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.design";
45
+ NatsSubject["High5_DESIGN_DELTA"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.design.delta";
39
46
  NatsSubject["HIGH5_SNAPSHOTS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.events.${base64eventName}.streams.${streamId}.snapshots";
40
47
  NatsSubject["HIGH5_WAVE_ENGINE_LATEST"] = "hcloud.high5.wave.engine.latest";
48
+ NatsSubject["HIGH5_SPACES_POOLS"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.pools.>";
49
+ NatsSubject["HIGH5_SPACES_POOL"] = "hcloud.high5.organization.${base64orgName}.spaces.${base64spaceName}.pools.${base64poolName}";
41
50
  NatsSubject["FUSE_SPACES"] = "hcloud.fuse.organization.${base64orgName}.spaces";
42
51
  NatsSubject["FUSE_SPACE_PERMISSIONS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.permissions";
43
52
  NatsSubject["FUSE_JOBS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs";
44
53
  NatsSubject["FUSE_JOB_LOGS"] = "hcloud.fuse.organization.${base64orgName}.spaces.${base64spaceName}.jobs.${jobId}.logs";
54
+ NatsSubject["FRIDAY_SPACES"] = "hcloud.friday.organization.${base64orgName}.spaces";
55
+ NatsSubject["FRIDAY_SPACE_PERMISSIONS"] = "hcloud.friday.organization.${base64orgName}.spaces.${base64spaceName}.permissions";
56
+ NatsSubject["FRIDAY_DATABASES"] = "hcloud.friday.organization.${base64orgName}.spaces.${base64spaceName}.databases";
57
+ NatsSubject["FRIDAY_DOCUMENTS"] = "hcloud.friday.organization.${base64orgName}.spaces.${base64spaceName}.databases.${base64databaseName}.documents";
58
+ NatsSubject["COSMO_SPACES"] = "hcloud.cosmo.organization.${base64orgName}.spaces";
59
+ NatsSubject["COSMO_NAMESPACES"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces";
60
+ NatsSubject["COSMO_ASSETS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.assets";
61
+ NatsSubject["COSMO_COMMENTS"] = "hcloud.cosmo.organization.${base64orgName}.spaces.${base64spaceName}.namespaces.${base64namespaceName}.assets.${assetId}.comments";
62
+ NatsSubject["MOTHERSHIP_AGENT_CONNECTION"] = "hcloud.mothership.organization.${base64orgName}.agent.connection";
45
63
  NatsSubject["AUDITOR_LOGS"] = "hcloud.auditor.organization.${base64orgName}.logs";
46
64
  NatsSubject["DEBUG_NAMESPACE"] = "hcloud.debug.namespace.${product}";
47
65
  })(NatsSubject || (exports.NatsSubject = NatsSubject = {}));
@@ -78,11 +96,15 @@ var NatsObjectType;
78
96
  NatsObjectType["WEBHOOK_LOG"] = "WEBHOOK_LOG";
79
97
  NatsObjectType["SECRET"] = "SECRET";
80
98
  NatsObjectType["CATALOG"] = "CATALOG";
99
+ NatsObjectType["POOL"] = "POOL";
81
100
  NatsObjectType["AUDIT_LOG"] = "AUDIT_LOG";
82
101
  NatsObjectType["MAIL"] = "MAIL";
83
102
  NatsObjectType["CRONJOB"] = "CRONJOB";
84
103
  NatsObjectType["CRONJOB_ID"] = "CRONJOB_ID";
85
104
  NatsObjectType["CRONJOB_LOG"] = "CRONJOB_LOG";
105
+ NatsObjectType["DATABASE"] = "DATABASE";
106
+ NatsObjectType["DOCUMENT"] = "DOCUMENT";
107
+ NatsObjectType["AGENT"] = "AGENT";
86
108
  })(NatsObjectType || (exports.NatsObjectType = NatsObjectType = {}));
87
109
  /**
88
110
  * This helper class creates subject strings to be used with nats.subscribe and nats.publish
@@ -124,7 +146,19 @@ NatsSubjects.IDP = (_a = class {
124
146
  return NatsSubjects.replace(NatsSubject.IDP_USER_SECURITY_GENERAL, { userId });
125
147
  },
126
148
  _c),
149
+ _b.Settings = (userId) => {
150
+ return {
151
+ OAuth: {
152
+ REVOKE: (oAuthAppId) => {
153
+ return NatsSubjects.replace(NatsSubject.IDP_USER_SETTINGS_OAUTH_REVOKE, { userId, oAuthAppId });
154
+ },
155
+ },
156
+ };
157
+ },
127
158
  _b),
159
+ _a.ORGANIZATION = (organizationName) => {
160
+ return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION, { organizationName });
161
+ },
128
162
  _a.Organization = (_d = class {
129
163
  },
130
164
  __setFunctionName(_d, "Organization"),
@@ -157,6 +191,16 @@ NatsSubjects.IDP = (_a = class {
157
191
  _d.LICENSE = (organizationName) => {
158
192
  return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_LICENSE, { organizationName });
159
193
  },
194
+ _d.Settings = (organizationName) => {
195
+ return {
196
+ OAuthApp: (oAuthAppId) => {
197
+ return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_SETTINGS_OAUTHAPP, { organizationName, oAuthAppId });
198
+ },
199
+ };
200
+ },
201
+ _d.ServiceAccounts = (organizationName) => {
202
+ return NatsSubjects.replace(NatsSubject.IDP_ORGANIZATION_SERVICE_ACCOUNTS, { organizationName });
203
+ },
160
204
  _d),
161
205
  _a);
162
206
  NatsSubjects.Fuse = (_f = class {
@@ -195,6 +239,24 @@ NatsSubjects.High5 = (_j = class {
195
239
  _k.CANCEL = (organizationId, email) => {
196
240
  return NatsSubjects.replace(NatsSubject.HIGH5_STREAM_CANCEL, { organizationId, email });
197
241
  },
242
+ _k.DEBUG = (organizationId, email) => {
243
+ return {
244
+ STOPPED: function (executionId) {
245
+ return NatsSubjects.replace(NatsSubject.HIGH5_STREAM_DEBUG_STOPPED, {
246
+ organizationId,
247
+ email,
248
+ executionId,
249
+ });
250
+ },
251
+ COMMAND: function (executionSecret) {
252
+ return NatsSubjects.replace(NatsSubject.HIGH5_STREAM_DEBUG_COMMAND, {
253
+ organizationId,
254
+ email,
255
+ executionSecret,
256
+ });
257
+ },
258
+ };
259
+ },
198
260
  _k),
199
261
  _j.SPACES = (organizationName) => {
200
262
  return NatsSubjects.replace(NatsSubject.HIGH5_SPACES, { organizationName });
@@ -202,6 +264,12 @@ NatsSubjects.High5 = (_j = class {
202
264
  _j.Space = (_l = class {
203
265
  },
204
266
  __setFunctionName(_l, "Space"),
267
+ _l.POOLS = (organizationName, spaceName) => {
268
+ return NatsSubjects.replace(NatsSubject.HIGH5_SPACES_POOLS, { organizationName, spaceName });
269
+ },
270
+ _l.POOL = (organizationName, spaceName, poolName) => {
271
+ return NatsSubjects.replace(NatsSubject.HIGH5_SPACES_POOL, { organizationName, spaceName, poolName });
272
+ },
205
273
  _l.PERMISSIONS = (organizationName, spaceName) => {
206
274
  return NatsSubjects.replace(NatsSubject.HIGH5_SPACE_PERMISSIONS, { organizationName, spaceName });
207
275
  },
@@ -232,6 +300,14 @@ NatsSubjects.High5 = (_j = class {
232
300
  streamId,
233
301
  });
234
302
  },
303
+ _o.DESIGN_DELTA = (organizationName, spaceName, eventName, streamId) => {
304
+ return NatsSubjects.replace(NatsSubject.High5_DESIGN_DELTA, {
305
+ organizationName,
306
+ spaceName,
307
+ eventName,
308
+ streamId,
309
+ });
310
+ },
235
311
  _o.SNAPSHOTS = (organizationName, spaceName, eventName, streamId) => {
236
312
  return NatsSubjects.replace(NatsSubject.HIGH5_SNAPSHOTS, {
237
313
  organizationName,
@@ -279,31 +355,99 @@ NatsSubjects.High5 = (_j = class {
279
355
  _r),
280
356
  _q),
281
357
  _j);
282
- NatsSubjects.Auditor = (_s = class {
358
+ NatsSubjects.Friday = (_s = class {
283
359
  },
284
- __setFunctionName(_s, "Auditor"),
285
- _s.LOGS = (organizationName) => {
286
- return NatsSubjects.replace(NatsSubject.AUDITOR_LOGS, { organizationName });
360
+ __setFunctionName(_s, "Friday"),
361
+ _s.SPACES = (organizationName) => {
362
+ return NatsSubjects.replace(NatsSubject.FRIDAY_SPACES, { organizationName });
287
363
  },
364
+ _s.Space = (_t = class {
365
+ },
366
+ __setFunctionName(_t, "Space"),
367
+ _t.PERMISSIONS = (organizationName, spaceName) => {
368
+ return NatsSubjects.replace(NatsSubject.FRIDAY_SPACE_PERMISSIONS, { organizationName, spaceName });
369
+ },
370
+ _t.DATABASES = (organizationName, spaceName) => {
371
+ return NatsSubjects.replace(NatsSubject.FRIDAY_DATABASES, { organizationName, spaceName });
372
+ },
373
+ _t.Database = (_u = class {
374
+ },
375
+ __setFunctionName(_u, "Database"),
376
+ _u.DOCUMENTS = (organizationName, spaceName, databaseName) => {
377
+ return NatsSubjects.replace(NatsSubject.FRIDAY_DOCUMENTS, {
378
+ organizationName,
379
+ spaceName,
380
+ databaseName,
381
+ });
382
+ },
383
+ _u),
384
+ _t),
288
385
  _s);
386
+ NatsSubjects.Mothership = (_v = class {
387
+ },
388
+ __setFunctionName(_v, "Mothership"),
389
+ _v.CONNECTION = (organizationName) => {
390
+ return NatsSubjects.replace(NatsSubject.MOTHERSHIP_AGENT_CONNECTION, { organizationName });
391
+ },
392
+ _v);
393
+ NatsSubjects.Auditor = (_w = class {
394
+ },
395
+ __setFunctionName(_w, "Auditor"),
396
+ _w.LOGS = (organizationName) => {
397
+ return NatsSubjects.replace(NatsSubject.AUDITOR_LOGS, { organizationName });
398
+ },
399
+ _w);
289
400
  NatsSubjects.Logging = (product) => {
290
401
  return NatsSubjects.replace(NatsSubject.DEBUG_NAMESPACE, { product });
291
402
  };
403
+ NatsSubjects.Cosmo = (_x = class {
404
+ },
405
+ __setFunctionName(_x, "Cosmo"),
406
+ _x.SPACES = (organizationName) => {
407
+ return NatsSubjects.replace(NatsSubject.COSMO_SPACES, { organizationName });
408
+ },
409
+ _x.Space = (_y = class {
410
+ },
411
+ __setFunctionName(_y, "Space"),
412
+ _y.NAMESPACES = (organizationName, spaceName) => {
413
+ return NatsSubjects.replace(NatsSubject.COSMO_NAMESPACES, { organizationName, spaceName });
414
+ },
415
+ _y.Namespace = (_z = class {
416
+ },
417
+ __setFunctionName(_z, "Namespace"),
418
+ _z.COMMENTS = (organizationName, spaceName, namespaceName, assetId) => {
419
+ return NatsSubjects.replace(NatsSubject.COSMO_COMMENTS, { organizationName, spaceName, namespaceName, assetId });
420
+ },
421
+ _z),
422
+ _y.ASSETS = (organizationName, spaceName) => {
423
+ return NatsSubjects.replace(NatsSubject.COSMO_ASSETS, { organizationName, spaceName });
424
+ },
425
+ _y),
426
+ _x);
292
427
  // eslint-disable-next-line complexity
293
428
  NatsSubjects.replace = (subject, replacements) => {
294
429
  subject = subject.replace("${userId}", replacements.userId || "null");
295
- subject = subject.replace("${base64orgName}", replacements.organizationName ? base64Encode(replacements.organizationName) : "null");
430
+ subject = subject.replace("${base64orgName}", replacements.organizationName ? (replacements.organizationName === "*" ? "*" : base64Encode(replacements.organizationName)) : "null");
296
431
  subject = subject.replace("${organizationId}", replacements.organizationId || "null");
297
- subject = subject.replace("${base64spaceName}", replacements.spaceName ? base64Encode(replacements.spaceName) : "null");
298
- subject = subject.replace("${base64eventName}", replacements.eventName ? base64Encode(replacements.eventName) : "null");
432
+ subject = subject.replace("${base64spaceName}", replacements.spaceName ? (replacements.spaceName === "*" ? "*" : base64Encode(replacements.spaceName)) : "null");
433
+ subject = subject.replace("${base64namespaceName}", replacements.namespaceName ? (replacements.namespaceName === "*" ? "*" : base64Encode(replacements.namespaceName)) : "null");
434
+ subject = subject.replace("${spaceId}", replacements.spaceId || "null");
435
+ subject = subject.replace("${base64eventName}", replacements.eventName ? (replacements.eventName === "*" ? "*" : base64Encode(replacements.eventName)) : "null");
299
436
  subject = subject.replace("${streamId}", replacements.streamId || "null");
300
437
  subject = subject.replace("${designId}", replacements.designId || "null");
301
438
  subject = subject.replace("${nodeId}", replacements.nodeId || "null");
302
439
  subject = subject.replace("${product}", replacements.product || "null");
303
- subject = subject.replace("${base64email}", replacements.email ? base64Encode(replacements.email) : "null");
440
+ subject = subject.replace("${base64email}", replacements.email ? (replacements.email === "*" ? "*" : base64Encode(replacements.email)) : "null");
304
441
  subject = subject.replace("${webhookId}", replacements.webhookId || "null");
305
442
  subject = subject.replace("${jobId}", replacements.jobId || "null");
306
- subject = subject.replace("${base64teamName}", replacements.teamName ? base64Encode(replacements.teamName) : "null");
443
+ subject = subject.replace("${base64teamName}", replacements.teamName ? (replacements.teamName === "*" ? "*" : base64Encode(replacements.teamName)) : "null");
444
+ subject = subject.replace("${base64poolName}", replacements.poolName ? (replacements.poolName === "*" ? "*" : base64Encode(replacements.poolName)) : "null");
445
+ subject = subject.replace("${poolId}", replacements.poolId || "null");
446
+ subject = subject.replace("${poolName}", replacements.poolName || "null");
447
+ subject = subject.replace("${executionId}", replacements.executionId || "null");
448
+ subject = subject.replace("${executionSecret}", replacements.executionSecret || "null");
449
+ subject = subject.replace("${base64databaseName}", replacements.databaseName ? (replacements.databaseName === "*" ? "*" : base64Encode(replacements.databaseName)) : "null");
450
+ subject = subject.replace("${assetId}", replacements.assetId || "null");
307
451
  return subject;
308
452
  };
309
453
  const base64Encode = (str) => {
@@ -13,5 +13,8 @@ export declare class DevBundle extends Base {
13
13
  * @returns 204 - No content
14
14
  */
15
15
  updateDevBundleState(allowDev: boolean): Promise<void>;
16
+ getCurrentVersion(): Promise<string>;
17
+ setCurrentVersion(version: string): Promise<void>;
18
+ restart(): Promise<void>;
16
19
  protected getEndpoint(endpoint: string): string;
17
20
  }
@@ -37,6 +37,22 @@ class DevBundle extends Base_1.default {
37
37
  return resp.data;
38
38
  });
39
39
  }
40
+ getCurrentVersion() {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ const resp = yield this.axios.get(this.getEndpoint("/v1/bundle/version"));
43
+ return resp.data;
44
+ });
45
+ }
46
+ setCurrentVersion(version) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ yield this.axios.put(this.getEndpoint("/v1/bundle/version"), { version }, { headers: { "Content-Type": "application/x-www-form-urlencoded" } });
49
+ });
50
+ }
51
+ restart() {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ yield this.axios.post(this.getEndpoint("/v1/bundle/restart"));
54
+ });
55
+ }
40
56
  getEndpoint(endpoint) {
41
57
  return `${this.options.server}/api/agent${endpoint}`;
42
58
  }
@@ -11,6 +11,11 @@ export declare class AgentContext extends Base {
11
11
  * @returns The newly created context
12
12
  */
13
13
  addContext(server: string, email: string, token: string, enabled: boolean): Promise<Context>;
14
+ /**
15
+ * Add a new context by using a service accounts PAT token.
16
+ * @returns The newly created context
17
+ */
18
+ addServiceAccountContext(server: string, token: string, enabled: boolean): Promise<Context>;
14
19
  /**
15
20
  * Update an existing context.
16
21
  * @returns The updated context
@@ -37,6 +37,20 @@ class AgentContext extends Base_1.default {
37
37
  return resp.data;
38
38
  });
39
39
  }
40
+ /**
41
+ * Add a new context by using a service accounts PAT token.
42
+ * @returns The newly created context
43
+ */
44
+ addServiceAccountContext(server, token, enabled) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/context`), {
47
+ server,
48
+ token: token.toLowerCase().startsWith("bearer") ? token : `Bearer ${token}`,
49
+ enabled,
50
+ });
51
+ return resp.data;
52
+ });
53
+ }
40
54
  /**
41
55
  * Update an existing context.
42
56
  * @returns The updated context
@@ -1,8 +1,11 @@
1
1
  import Base from "../../Base";
2
- import { DaliFuse } from "./avatar/DaliFuseSpace";
3
- import { DaliHigh5 } from "./avatar/DaliHigh5Space";
2
+ import { DaliCosmoSpace } from "./avatar/DaliCosmoSpace";
3
+ import { DaliFuseSpace } from "./avatar/DaliFuseSpace";
4
+ import { DaliHigh5Pool } from "./avatar/DaliHigh5Pool";
5
+ import { DaliHigh5Space } from "./avatar/DaliHigh5Space";
4
6
  import { DaliOAuthApp } from "./avatar/DaliOAuthApp";
5
7
  import { DaliOrganization } from "./avatar/DaliOrganization";
8
+ import { DaliServiceAccount } from "./avatar/DaliServiceAccount";
6
9
  import { DaliTeam } from "./avatar/DaliTeam";
7
10
  import { DaliUser } from "./avatar/DaliUser";
8
11
  export declare class DaliAvatar extends Base {
@@ -16,6 +19,11 @@ export declare class DaliAvatar extends Base {
16
19
  */
17
20
  get team(): DaliTeam;
18
21
  private _team?;
22
+ /**
23
+ * Handles everything around service account avatars
24
+ */
25
+ get serviceAccount(): DaliServiceAccount;
26
+ private _serviceAccount?;
19
27
  /**
20
28
  * Handles everything around organization avatars
21
29
  */
@@ -24,13 +32,23 @@ export declare class DaliAvatar extends Base {
24
32
  /**
25
33
  * Handles everything around high5 spaces avatars
26
34
  */
27
- get high5Space(): DaliHigh5;
35
+ get high5Space(): DaliHigh5Space;
28
36
  private _high5Space?;
37
+ /**
38
+ * Handles everything around high5 pools avatars
39
+ */
40
+ get high5Pool(): DaliHigh5Pool;
41
+ private _high5Pool?;
29
42
  /**
30
43
  * Handles everything around fuse spaces avatars
31
44
  */
32
- get fuseSpace(): DaliFuse;
45
+ get fuseSpace(): DaliFuseSpace;
33
46
  private _fuseSpace?;
47
+ /**
48
+ * Handles everything around cosmo spaces avatars
49
+ */
50
+ get cosmoSpace(): DaliCosmoSpace;
51
+ private _cosmoSpace?;
34
52
  /**
35
53
  * Handles everything around OAuth applications avatars
36
54
  */
@@ -2,10 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DaliAvatar = void 0;
4
4
  const Base_1 = require("../../Base");
5
+ const DaliCosmoSpace_1 = require("./avatar/DaliCosmoSpace");
5
6
  const DaliFuseSpace_1 = require("./avatar/DaliFuseSpace");
7
+ const DaliHigh5Pool_1 = require("./avatar/DaliHigh5Pool");
6
8
  const DaliHigh5Space_1 = require("./avatar/DaliHigh5Space");
7
9
  const DaliOAuthApp_1 = require("./avatar/DaliOAuthApp");
8
10
  const DaliOrganization_1 = require("./avatar/DaliOrganization");
11
+ const DaliServiceAccount_1 = require("./avatar/DaliServiceAccount");
9
12
  const DaliTeam_1 = require("./avatar/DaliTeam");
10
13
  const DaliUser_1 = require("./avatar/DaliUser");
11
14
  class DaliAvatar extends Base_1.default {
@@ -27,6 +30,15 @@ class DaliAvatar extends Base_1.default {
27
30
  }
28
31
  return this._team;
29
32
  }
33
+ /**
34
+ * Handles everything around service account avatars
35
+ */
36
+ get serviceAccount() {
37
+ if (this._serviceAccount === undefined) {
38
+ this._serviceAccount = new DaliServiceAccount_1.DaliServiceAccount(this.options, this.axios);
39
+ }
40
+ return this._serviceAccount;
41
+ }
30
42
  /**
31
43
  * Handles everything around organization avatars
32
44
  */
@@ -41,19 +53,37 @@ class DaliAvatar extends Base_1.default {
41
53
  */
42
54
  get high5Space() {
43
55
  if (this._high5Space === undefined) {
44
- this._high5Space = new DaliHigh5Space_1.DaliHigh5(this.options, this.axios);
56
+ this._high5Space = new DaliHigh5Space_1.DaliHigh5Space(this.options, this.axios);
45
57
  }
46
58
  return this._high5Space;
47
59
  }
60
+ /**
61
+ * Handles everything around high5 pools avatars
62
+ */
63
+ get high5Pool() {
64
+ if (this._high5Pool === undefined) {
65
+ this._high5Pool = new DaliHigh5Pool_1.DaliHigh5Pool(this.options, this.axios);
66
+ }
67
+ return this._high5Pool;
68
+ }
48
69
  /**
49
70
  * Handles everything around fuse spaces avatars
50
71
  */
51
72
  get fuseSpace() {
52
73
  if (this._fuseSpace === undefined) {
53
- this._fuseSpace = new DaliFuseSpace_1.DaliFuse(this.options, this.axios);
74
+ this._fuseSpace = new DaliFuseSpace_1.DaliFuseSpace(this.options, this.axios);
54
75
  }
55
76
  return this._fuseSpace;
56
77
  }
78
+ /**
79
+ * Handles everything around cosmo spaces avatars
80
+ */
81
+ get cosmoSpace() {
82
+ if (this._cosmoSpace === undefined) {
83
+ this._cosmoSpace = new DaliCosmoSpace_1.DaliCosmoSpace(this.options, this.axios);
84
+ }
85
+ return this._cosmoSpace;
86
+ }
57
87
  /**
58
88
  * Handles everything around OAuth applications avatars
59
89
  */
@@ -0,0 +1,26 @@
1
+ import Base from "../../../Base";
2
+ import { AvatarCreated } from "../../../interfaces/dali";
3
+ export declare class DaliCosmoSpace extends Base {
4
+ /**
5
+ * Creates a default avatar for the specified Cosmo space.
6
+ * @param orgName Name of the organization
7
+ * @param spaceName Name of the space
8
+ * @returns Public URL of the created avatar
9
+ */
10
+ createAvatar(orgName: string, spaceName: string): Promise<AvatarCreated>;
11
+ /**
12
+ * Deletes the avatar of the Cosmo space from cloud storage. If you want to update it instead, use updateAvatar().
13
+ * @param orgName Name of the organization
14
+ * @param spaceName Name of the space
15
+ */
16
+ deleteAvatar(orgName: string, spaceName: string): Promise<void>;
17
+ /**
18
+ * Updates the avatar of the specified Cosmo space
19
+ * @param orgName Name of the organization
20
+ * @param spaceName Name of the space
21
+ * @param file Image as Javascript File
22
+ * @returns Public URL of the new avatar
23
+ */
24
+ updateAvatar(orgName: string, spaceName: string, file: File): Promise<AvatarCreated>;
25
+ protected getEndpoint(endpoint: string): string;
26
+ }
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DaliCosmoSpace = void 0;
13
+ const Base_1 = require("../../../Base");
14
+ class DaliCosmoSpace extends Base_1.default {
15
+ /**
16
+ * Creates a default avatar for the specified Cosmo space.
17
+ * @param orgName Name of the organization
18
+ * @param spaceName Name of the space
19
+ * @returns Public URL of the created avatar
20
+ */
21
+ createAvatar(orgName, spaceName) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/cosmo/${spaceName}`), {});
24
+ return resp.data;
25
+ });
26
+ }
27
+ /**
28
+ * Deletes the avatar of the Cosmo space from cloud storage. If you want to update it instead, use updateAvatar().
29
+ * @param orgName Name of the organization
30
+ * @param spaceName Name of the space
31
+ */
32
+ deleteAvatar(orgName, spaceName) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ yield this.axios.delete(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/cosmo/${spaceName}`));
35
+ });
36
+ }
37
+ /**
38
+ * Updates the avatar of the specified Cosmo space
39
+ * @param orgName Name of the organization
40
+ * @param spaceName Name of the space
41
+ * @param file Image as Javascript File
42
+ * @returns Public URL of the new avatar
43
+ */
44
+ updateAvatar(orgName, spaceName, file) {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ const data = new FormData();
47
+ data.append("avatar", file);
48
+ const resp = yield this.axios.put(this.getEndpoint(`/v1/avatar/org/${orgName}/spaces/cosmo/${spaceName}`), data, {
49
+ headers: { "Content-Type": "multipart/form-data" },
50
+ });
51
+ return resp.data;
52
+ });
53
+ }
54
+ getEndpoint(endpoint) {
55
+ return `${this.options.server}/api/dali${endpoint}`;
56
+ }
57
+ }
58
+ exports.DaliCosmoSpace = DaliCosmoSpace;
@@ -1,6 +1,6 @@
1
1
  import Base from "../../../Base";
2
2
  import { AvatarCreated } from "../../../interfaces/dali";
3
- export declare class DaliFuse extends Base {
3
+ export declare class DaliFuseSpace extends Base {
4
4
  /**
5
5
  * Creates a default avatar for the specified Fuse space.
6
6
  * @param orgName Name of the organization
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.DaliFuse = void 0;
12
+ exports.DaliFuseSpace = void 0;
13
13
  const Base_1 = require("../../../Base");
14
- class DaliFuse extends Base_1.default {
14
+ class DaliFuseSpace extends Base_1.default {
15
15
  /**
16
16
  * Creates a default avatar for the specified Fuse space.
17
17
  * @param orgName Name of the organization
@@ -55,4 +55,4 @@ class DaliFuse extends Base_1.default {
55
55
  return `${this.options.server}/api/dali${endpoint}`;
56
56
  }
57
57
  }
58
- exports.DaliFuse = DaliFuse;
58
+ exports.DaliFuseSpace = DaliFuseSpace;
@@ -0,0 +1,29 @@
1
+ import Base from "../../../Base";
2
+ import { AvatarCreated } from "../../../interfaces/dali";
3
+ export declare class DaliHigh5Pool extends Base {
4
+ /**
5
+ * Creates a default avatar for the specified High5 pool.
6
+ * @param orgName Name of the organization
7
+ * @param spaceName Name of the space
8
+ * @param poolName Name of the pool
9
+ * @returns Public URL of the created avatar
10
+ */
11
+ createAvatar(orgName: string, spaceName: string, poolName: string): Promise<AvatarCreated>;
12
+ /**
13
+ * Deletes the avatar of the High5 pool from cloud storage. If you want to update it instead, use updateAvatar().
14
+ * @param orgName Name of the organization
15
+ * @param spaceName Name of the space
16
+ * @param poolName Name of the pool
17
+ */
18
+ deleteAvatar(orgName: string, spaceName: string, poolName: string): Promise<void>;
19
+ /**
20
+ * Updates the avatar of the specified High5 pool
21
+ * @param orgName Name of the organization
22
+ * @param spaceName Name of the space
23
+ * @param poolName Name of the pool
24
+ * @param file Image as Javascript File
25
+ * @returns Public URL of the new avatar
26
+ */
27
+ updateAvatar(orgName: string, spaceName: string, poolName: string, file: File): Promise<AvatarCreated>;
28
+ protected getEndpoint(endpoint: string): string;
29
+ }