@rockcarver/frodo-lib 2.0.0-2 → 2.0.0-4

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 (155) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/cjs/api/AgentApi.js +64 -16
  3. package/cjs/api/AgentApi.js.map +1 -1
  4. package/cjs/api/ApiTypes.js +0 -55
  5. package/cjs/api/ApiTypes.js.map +1 -1
  6. package/cjs/api/BaseApi.js +21 -11
  7. package/cjs/api/BaseApi.js.map +1 -1
  8. package/cjs/api/cloud/SecretsApi.js +7 -14
  9. package/cjs/api/cloud/SecretsApi.js.map +1 -1
  10. package/cjs/api/cloud/SecretsApi.test.js.map +1 -1
  11. package/cjs/index.js +6 -0
  12. package/cjs/index.js.map +1 -1
  13. package/cjs/ops/AdminOps.js +254 -60
  14. package/cjs/ops/AdminOps.js.map +1 -1
  15. package/cjs/ops/AgentOps.js +352 -108
  16. package/cjs/ops/AgentOps.js.map +1 -1
  17. package/cjs/ops/AuthenticateOps.js +262 -65
  18. package/cjs/ops/AuthenticateOps.js.map +1 -1
  19. package/cjs/ops/CirclesOfTrustOps.js +16 -4
  20. package/cjs/ops/CirclesOfTrustOps.js.map +1 -1
  21. package/cjs/ops/ConnectionProfileOps.js +163 -40
  22. package/cjs/ops/ConnectionProfileOps.js.map +1 -1
  23. package/cjs/ops/EmailTemplateOps.js +7 -1
  24. package/cjs/ops/EmailTemplateOps.js.map +1 -1
  25. package/cjs/ops/IdpOps.js +55 -12
  26. package/cjs/ops/IdpOps.js.map +1 -1
  27. package/cjs/ops/JourneyOps.js +645 -136
  28. package/cjs/ops/JourneyOps.js.map +1 -1
  29. package/cjs/ops/NodeOps.js +96 -24
  30. package/cjs/ops/NodeOps.js.map +1 -1
  31. package/cjs/ops/OAuth2ClientOps.js +45 -11
  32. package/cjs/ops/OAuth2ClientOps.js.map +1 -1
  33. package/cjs/ops/OpsTypes.js +0 -23
  34. package/cjs/ops/OpsTypes.js.map +1 -1
  35. package/cjs/ops/OrganizationOps.js +44 -10
  36. package/cjs/ops/OrganizationOps.js.map +1 -1
  37. package/cjs/ops/PolicyOps.js +86 -24
  38. package/cjs/ops/PolicyOps.js.map +1 -1
  39. package/cjs/ops/PolicySetOps.js +72 -18
  40. package/cjs/ops/PolicySetOps.js.map +1 -1
  41. package/cjs/ops/ResourceTypeOps.js +24 -6
  42. package/cjs/ops/ResourceTypeOps.js.map +1 -1
  43. package/cjs/ops/Saml2Ops.js +121 -42
  44. package/cjs/ops/Saml2Ops.js.map +1 -1
  45. package/cjs/ops/Saml2Ops.test.js.map +1 -1
  46. package/cjs/ops/ScriptOps.js +73 -17
  47. package/cjs/ops/ScriptOps.js.map +1 -1
  48. package/cjs/ops/ServiceOps.js +152 -35
  49. package/cjs/ops/ServiceOps.js.map +1 -1
  50. package/cjs/ops/ThemeOps.js +20 -5
  51. package/cjs/ops/ThemeOps.js.map +1 -1
  52. package/cjs/ops/cloud/FeatureOps.js +4 -1
  53. package/cjs/ops/cloud/FeatureOps.js.map +1 -1
  54. package/cjs/ops/cloud/SecretsOps.js.map +1 -1
  55. package/cjs/ops/cloud/ServiceAccountOps.js +24 -6
  56. package/cjs/ops/cloud/ServiceAccountOps.js.map +1 -1
  57. package/cjs/ops/cloud/StartupOps.js +55 -11
  58. package/cjs/ops/cloud/StartupOps.js.map +1 -1
  59. package/cjs/ops/utils/Console.js +47 -22
  60. package/cjs/ops/utils/Console.js.map +1 -1
  61. package/cjs/ops/utils/DataProtection.js +12 -5
  62. package/cjs/ops/utils/DataProtection.js.map +1 -1
  63. package/cjs/ops/utils/DataProtection.test.js.map +1 -1
  64. package/cjs/ops/utils/ExportImportUtils.js +15 -8
  65. package/cjs/ops/utils/ExportImportUtils.js.map +1 -1
  66. package/cjs/ops/utils/ScriptValidationUtils.js +33 -8
  67. package/cjs/ops/utils/ScriptValidationUtils.js.map +1 -1
  68. package/cjs/ops/utils/ScriptValidationUtils.test.js.map +1 -1
  69. package/cjs/utils/SetupPollyForFrodoLib.js +67 -19
  70. package/cjs/utils/SetupPollyForFrodoLib.js.map +1 -1
  71. package/esm/api/AgentApi.mjs +64 -16
  72. package/esm/api/ApiTypes.mjs +1 -50
  73. package/esm/api/BaseApi.mjs +21 -11
  74. package/esm/api/cloud/SecretsApi.mjs +0 -5
  75. package/esm/api/cloud/SecretsApi.test.mjs +3 -3
  76. package/esm/index.mjs +1 -1
  77. package/esm/ops/AdminOps.mjs +254 -60
  78. package/esm/ops/AgentOps.mjs +352 -104
  79. package/esm/ops/AuthenticateOps.mjs +262 -65
  80. package/esm/ops/CirclesOfTrustOps.mjs +16 -4
  81. package/esm/ops/ConnectionProfileOps.mjs +163 -40
  82. package/esm/ops/EmailTemplateOps.mjs +5 -0
  83. package/esm/ops/IdpOps.mjs +55 -12
  84. package/esm/ops/JourneyOps.mjs +639 -132
  85. package/esm/ops/NodeOps.mjs +90 -19
  86. package/esm/ops/OAuth2ClientOps.mjs +45 -11
  87. package/esm/ops/OpsTypes.mjs +1 -22
  88. package/esm/ops/OrganizationOps.mjs +44 -10
  89. package/esm/ops/PolicyOps.mjs +86 -24
  90. package/esm/ops/PolicySetOps.mjs +72 -18
  91. package/esm/ops/ResourceTypeOps.mjs +24 -6
  92. package/esm/ops/Saml2Ops.mjs +120 -39
  93. package/esm/ops/Saml2Ops.test.mjs +10 -11
  94. package/esm/ops/ScriptOps.mjs +73 -17
  95. package/esm/ops/ServiceOps.mjs +152 -35
  96. package/esm/ops/ThemeOps.mjs +20 -5
  97. package/esm/ops/cloud/FeatureOps.mjs +4 -1
  98. package/esm/ops/cloud/ServiceAccountOps.mjs +24 -6
  99. package/esm/ops/cloud/StartupOps.mjs +55 -11
  100. package/esm/ops/utils/Console.mjs +33 -9
  101. package/esm/ops/utils/DataProtection.mjs +9 -2
  102. package/esm/ops/utils/DataProtection.test.mjs +8 -2
  103. package/esm/ops/utils/ExportImportUtils.mjs +15 -8
  104. package/esm/ops/utils/ScriptValidationUtils.mjs +30 -8
  105. package/esm/ops/utils/ScriptValidationUtils.test.mjs +14 -3
  106. package/esm/utils/SetupPollyForFrodoLib.mjs +64 -18
  107. package/package.json +1 -1
  108. package/types/api/AgentApi.d.ts +6 -6
  109. package/types/api/AgentApi.d.ts.map +1 -1
  110. package/types/api/ApiTypes.d.ts +12 -49
  111. package/types/api/ApiTypes.d.ts.map +1 -1
  112. package/types/api/BaseApi.d.ts.map +1 -1
  113. package/types/api/cloud/SecretsApi.d.ts +1 -4
  114. package/types/api/cloud/SecretsApi.d.ts.map +1 -1
  115. package/types/index.d.ts +1 -1
  116. package/types/index.d.ts.map +1 -1
  117. package/types/ops/AdminOps.d.ts.map +1 -1
  118. package/types/ops/AgentOps.d.ts +3 -6
  119. package/types/ops/AgentOps.d.ts.map +1 -1
  120. package/types/ops/AuthenticateOps.d.ts.map +1 -1
  121. package/types/ops/CirclesOfTrustOps.d.ts.map +1 -1
  122. package/types/ops/ConnectionProfileOps.d.ts.map +1 -1
  123. package/types/ops/EmailTemplateOps.d.ts +4 -0
  124. package/types/ops/EmailTemplateOps.d.ts.map +1 -1
  125. package/types/ops/IdpOps.d.ts.map +1 -1
  126. package/types/ops/JourneyOps.d.ts +10 -5
  127. package/types/ops/JourneyOps.d.ts.map +1 -1
  128. package/types/ops/NodeOps.d.ts +10 -4
  129. package/types/ops/NodeOps.d.ts.map +1 -1
  130. package/types/ops/OAuth2ClientOps.d.ts.map +1 -1
  131. package/types/ops/OpsTypes.d.ts +2 -12
  132. package/types/ops/OpsTypes.d.ts.map +1 -1
  133. package/types/ops/OrganizationOps.d.ts.map +1 -1
  134. package/types/ops/PolicyOps.d.ts.map +1 -1
  135. package/types/ops/PolicySetOps.d.ts.map +1 -1
  136. package/types/ops/ResourceTypeOps.d.ts.map +1 -1
  137. package/types/ops/Saml2Ops.d.ts +0 -6
  138. package/types/ops/Saml2Ops.d.ts.map +1 -1
  139. package/types/ops/ScriptOps.d.ts.map +1 -1
  140. package/types/ops/ServiceOps.d.ts.map +1 -1
  141. package/types/ops/ThemeOps.d.ts.map +1 -1
  142. package/types/ops/cloud/FeatureOps.d.ts.map +1 -1
  143. package/types/ops/cloud/SecretsOps.d.ts +1 -1
  144. package/types/ops/cloud/SecretsOps.d.ts.map +1 -1
  145. package/types/ops/cloud/ServiceAccountOps.d.ts.map +1 -1
  146. package/types/ops/cloud/StartupOps.d.ts.map +1 -1
  147. package/types/ops/utils/Console.d.ts +34 -7
  148. package/types/ops/utils/Console.d.ts.map +1 -1
  149. package/types/ops/utils/DataProtection.d.ts +5 -1
  150. package/types/ops/utils/DataProtection.d.ts.map +1 -1
  151. package/types/ops/utils/ExportImportUtils.d.ts.map +1 -1
  152. package/types/ops/utils/ScriptValidationUtils.d.ts +14 -4
  153. package/types/ops/utils/ScriptValidationUtils.d.ts.map +1 -1
  154. package/types/utils/SetupPollyForFrodoLib.d.ts +5 -1
  155. package/types/utils/SetupPollyForFrodoLib.d.ts.map +1 -1
@@ -205,12 +205,18 @@ function _getListOfServices2() {
205
205
  globalConfig = false,
206
206
  state
207
207
  } = _ref;
208
- (0, _Console.debugMessage)("ServiceOps.getListOfServices: start");
208
+ (0, _Console.debugMessage)({
209
+ message: "ServiceOps.getListOfServices: start",
210
+ state
211
+ });
209
212
  var services = (yield (0, _ServiceApi.getListOfServices)({
210
213
  globalConfig,
211
214
  state
212
215
  })).result;
213
- (0, _Console.debugMessage)("ServiceOps.getListOfServices: end");
216
+ (0, _Console.debugMessage)({
217
+ message: "ServiceOps.getListOfServices: end",
218
+ state
219
+ });
214
220
  return services;
215
221
  });
216
222
  return _getListOfServices2.apply(this, arguments);
@@ -231,7 +237,10 @@ function _getFullServices() {
231
237
  globalConfig = false,
232
238
  state
233
239
  } = _ref2;
234
- (0, _Console.debugMessage)("ServiceOps.getFullServices: start, globalConfig=".concat(globalConfig));
240
+ (0, _Console.debugMessage)({
241
+ message: "ServiceOps.getFullServices: start, globalConfig=".concat(globalConfig),
242
+ state
243
+ });
235
244
  var serviceList = (yield (0, _ServiceApi.getListOfServices)({
236
245
  globalConfig,
237
246
  state
@@ -256,7 +265,11 @@ function _getFullServices() {
256
265
  if (!(((_error$response = error.response) === null || _error$response === void 0 ? void 0 : _error$response.status) === 403 && ((_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : _error$response2$data.message) === 'This operation is not available in ForgeRock Identity Cloud.')) {
257
266
  var _error$response3, _error$response3$data;
258
267
  var message = (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : _error$response3$data.message;
259
- (0, _Console.printMessage)("Unable to retrieve data for ".concat(listItem._id, " with error: ").concat(message), 'error');
268
+ (0, _Console.printMessage)({
269
+ message: "Unable to retrieve data for ".concat(listItem._id, " with error: ").concat(message),
270
+ type: 'error',
271
+ state
272
+ });
260
273
  }
261
274
  }
262
275
  });
@@ -264,7 +277,10 @@ function _getFullServices() {
264
277
  return _ref11.apply(this, arguments);
265
278
  };
266
279
  }()));
267
- (0, _Console.debugMessage)("ServiceOps.getFullServices: end");
280
+ (0, _Console.debugMessage)({
281
+ message: "ServiceOps.getFullServices: end",
282
+ state
283
+ });
268
284
  return fullServiceData.filter(data => !!data); // make sure to filter out any undefined objects
269
285
  });
270
286
  return _getFullServices.apply(this, arguments);
@@ -288,14 +304,20 @@ function _putFullService() {
288
304
  globalConfig = false,
289
305
  state
290
306
  } = _ref3;
291
- (0, _Console.debugMessage)("ServiceOps.putFullService: start, serviceId=".concat(serviceId, ", globalConfig=").concat(globalConfig));
307
+ (0, _Console.debugMessage)({
308
+ message: "ServiceOps.putFullService: start, serviceId=".concat(serviceId, ", globalConfig=").concat(globalConfig),
309
+ state
310
+ });
292
311
  var nextDescendents = fullServiceData.nextDescendents;
293
312
  delete fullServiceData.nextDescendents;
294
313
  delete fullServiceData._rev;
295
314
  delete fullServiceData.enabled;
296
315
  if (clean) {
297
316
  try {
298
- (0, _Console.debugMessage)("ServiceOps.putFullService: clean");
317
+ (0, _Console.debugMessage)({
318
+ message: "ServiceOps.putFullService: clean",
319
+ state
320
+ });
299
321
  yield deleteFullService({
300
322
  serviceId,
301
323
  globalConfig,
@@ -306,7 +328,11 @@ function _putFullService() {
306
328
  if (!(((_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : _error$response4.status) === 404 && ((_error$response5 = error.response) === null || _error$response5 === void 0 ? void 0 : (_error$response5$data = _error$response5.data) === null || _error$response5$data === void 0 ? void 0 : _error$response5$data.message) === 'Not Found')) {
307
329
  var _error$response6, _error$response6$data;
308
330
  var message = (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : _error$response6$data.message;
309
- (0, _Console.printMessage)("Error deleting service '".concat(serviceId, "' before import: ").concat(message), 'error');
331
+ (0, _Console.printMessage)({
332
+ message: "Error deleting service '".concat(serviceId, "' before import: ").concat(message),
333
+ type: 'error',
334
+ state
335
+ });
310
336
  }
311
337
  }
312
338
  }
@@ -321,7 +347,10 @@ function _putFullService() {
321
347
 
322
348
  // return fast if no next descendents supplied
323
349
  if (nextDescendents.length === 0) {
324
- (0, _Console.debugMessage)("ServiceOps.putFullService: end (w/o descendents)");
350
+ (0, _Console.debugMessage)({
351
+ message: "ServiceOps.putFullService: end (w/o descendents)",
352
+ state
353
+ });
325
354
  return result;
326
355
  }
327
356
 
@@ -330,7 +359,10 @@ function _putFullService() {
330
359
  var _ref12 = _asyncToGenerator(function* (descendent) {
331
360
  var type = descendent._type._id;
332
361
  var descendentId = descendent._id;
333
- (0, _Console.debugMessage)("ServiceOps.putFullService: descendentId=".concat(descendentId));
362
+ (0, _Console.debugMessage)({
363
+ message: "ServiceOps.putFullService: descendentId=".concat(descendentId),
364
+ state
365
+ });
334
366
  var result = undefined;
335
367
  try {
336
368
  result = yield (0, _ServiceApi.putServiceNextDescendent)({
@@ -344,7 +376,11 @@ function _putFullService() {
344
376
  } catch (error) {
345
377
  var _error$response7, _error$response7$data;
346
378
  var _message = (_error$response7 = error.response) === null || _error$response7 === void 0 ? void 0 : (_error$response7$data = _error$response7.data) === null || _error$response7$data === void 0 ? void 0 : _error$response7$data.message;
347
- (0, _Console.printMessage)("Put descendent '".concat(descendentId, "' of service '").concat(serviceId, "': ").concat(_message), 'error');
379
+ (0, _Console.printMessage)({
380
+ message: "Put descendent '".concat(descendentId, "' of service '").concat(serviceId, "': ").concat(_message),
381
+ type: 'error',
382
+ state
383
+ });
348
384
  }
349
385
  return result;
350
386
  });
@@ -352,7 +388,10 @@ function _putFullService() {
352
388
  return _ref12.apply(this, arguments);
353
389
  };
354
390
  }()));
355
- (0, _Console.debugMessage)("ServiceOps.putFullService: end (w/ descendents)");
391
+ (0, _Console.debugMessage)({
392
+ message: "ServiceOps.putFullService: end (w/ descendents)",
393
+ state
394
+ });
356
395
  });
357
396
  return _putFullService.apply(this, arguments);
358
397
  }
@@ -372,7 +411,10 @@ function _putFullServices() {
372
411
  globalConfig = false,
373
412
  state
374
413
  } = _ref4;
375
- (0, _Console.debugMessage)("ServiceOps.putFullServices: start, globalConfig=".concat(globalConfig));
414
+ (0, _Console.debugMessage)({
415
+ message: "ServiceOps.putFullServices: start, globalConfig=".concat(globalConfig),
416
+ state
417
+ });
376
418
  var results = [];
377
419
  for (var [id, data] of serviceEntries) {
378
420
  try {
@@ -384,18 +426,33 @@ function _putFullServices() {
384
426
  state
385
427
  });
386
428
  results.push(result);
387
- (0, _Console.printMessage)("Imported: ".concat(id), 'info');
429
+ (0, _Console.printMessage)({
430
+ message: "Imported: ".concat(id),
431
+ type: 'info',
432
+ state
433
+ });
388
434
  } catch (error) {
389
435
  var _error$response8, _error$response8$data, _error$response9, _error$response9$data;
390
436
  var message = (_error$response8 = error.response) === null || _error$response8 === void 0 ? void 0 : (_error$response8$data = _error$response8.data) === null || _error$response8$data === void 0 ? void 0 : _error$response8$data.message;
391
437
  var detail = (_error$response9 = error.response) === null || _error$response9 === void 0 ? void 0 : (_error$response9$data = _error$response9.data) === null || _error$response9$data === void 0 ? void 0 : _error$response9$data.detail;
392
- (0, _Console.printMessage)("Import service '".concat(id, "': ").concat(message), 'error');
438
+ (0, _Console.printMessage)({
439
+ message: "Import service '".concat(id, "': ").concat(message),
440
+ type: 'error',
441
+ state
442
+ });
393
443
  if (detail) {
394
- (0, _Console.printMessage)("Details: ".concat(JSON.stringify(detail)), 'error');
444
+ (0, _Console.printMessage)({
445
+ message: "Details: ".concat(JSON.stringify(detail)),
446
+ type: 'error',
447
+ state
448
+ });
395
449
  }
396
450
  }
397
451
  }
398
- (0, _Console.debugMessage)("ServiceOps.putFullServices: end");
452
+ (0, _Console.debugMessage)({
453
+ message: "ServiceOps.putFullServices: end",
454
+ state
455
+ });
399
456
  return results;
400
457
  });
401
458
  return _putFullServices.apply(this, arguments);
@@ -414,7 +471,10 @@ function _deleteFullService() {
414
471
  globalConfig = false,
415
472
  state
416
473
  } = _ref5;
417
- (0, _Console.debugMessage)("ServiceOps.deleteFullService: start, globalConfig=".concat(globalConfig));
474
+ (0, _Console.debugMessage)({
475
+ message: "ServiceOps.deleteFullService: start, globalConfig=".concat(globalConfig),
476
+ state
477
+ });
418
478
  var serviceNextDescendentData = yield (0, _ServiceApi.getServiceDescendents)({
419
479
  serviceId,
420
480
  globalConfig,
@@ -432,7 +492,10 @@ function _deleteFullService() {
432
492
  globalConfig,
433
493
  state
434
494
  });
435
- (0, _Console.debugMessage)("ServiceOps.deleteFullService: end");
495
+ (0, _Console.debugMessage)({
496
+ message: "ServiceOps.deleteFullService: end",
497
+ state
498
+ });
436
499
  });
437
500
  return _deleteFullService.apply(this, arguments);
438
501
  }
@@ -451,7 +514,10 @@ function _deleteFullServices() {
451
514
  globalConfig = false,
452
515
  state
453
516
  } = _ref6;
454
- (0, _Console.debugMessage)("ServiceOps.deleteFullServices: start, globalConfig=".concat(globalConfig));
517
+ (0, _Console.debugMessage)({
518
+ message: "ServiceOps.deleteFullServices: start, globalConfig=".concat(globalConfig),
519
+ state
520
+ });
455
521
  try {
456
522
  var serviceList = (yield (0, _ServiceApi.getListOfServices)({
457
523
  globalConfig,
@@ -470,7 +536,11 @@ function _deleteFullServices() {
470
536
  if (!(((_error$response10 = error.response) === null || _error$response10 === void 0 ? void 0 : _error$response10.status) === 403 && ((_error$response11 = error.response) === null || _error$response11 === void 0 ? void 0 : (_error$response11$dat = _error$response11.data) === null || _error$response11$dat === void 0 ? void 0 : _error$response11$dat.message) === 'This operation is not available in ForgeRock Identity Cloud.')) {
471
537
  var _error$response12, _error$response12$dat;
472
538
  var message = (_error$response12 = error.response) === null || _error$response12 === void 0 ? void 0 : (_error$response12$dat = _error$response12.data) === null || _error$response12$dat === void 0 ? void 0 : _error$response12$dat.message;
473
- (0, _Console.printMessage)("Delete service '".concat(serviceListItem._id, "': ").concat(message), 'error');
539
+ (0, _Console.printMessage)({
540
+ message: "Delete service '".concat(serviceListItem._id, "': ").concat(message),
541
+ state,
542
+ type: 'error'
543
+ });
474
544
  }
475
545
  }
476
546
  });
@@ -481,9 +551,16 @@ function _deleteFullServices() {
481
551
  } catch (error) {
482
552
  var _error$response13, _error$response13$dat;
483
553
  var message = (_error$response13 = error.response) === null || _error$response13 === void 0 ? void 0 : (_error$response13$dat = _error$response13.data) === null || _error$response13$dat === void 0 ? void 0 : _error$response13$dat.message;
484
- (0, _Console.printMessage)("Delete services: ".concat(message), 'error');
554
+ (0, _Console.printMessage)({
555
+ message: "Delete services: ".concat(message),
556
+ type: 'error',
557
+ state
558
+ });
485
559
  }
486
- (0, _Console.debugMessage)("ServiceOps.deleteFullServices: end");
560
+ (0, _Console.debugMessage)({
561
+ message: "ServiceOps.deleteFullServices: end",
562
+ state
563
+ });
487
564
  });
488
565
  return _deleteFullServices.apply(this, arguments);
489
566
  }
@@ -501,7 +578,10 @@ function _exportService() {
501
578
  globalConfig = false,
502
579
  state
503
580
  } = _ref7;
504
- (0, _Console.debugMessage)("ServiceOps.exportService: start, globalConfig=".concat(globalConfig));
581
+ (0, _Console.debugMessage)({
582
+ message: "ServiceOps.exportService: start, globalConfig=".concat(globalConfig),
583
+ state
584
+ });
505
585
  var exportData = createServiceExportTemplate();
506
586
  try {
507
587
  var service = yield (0, _ServiceApi.getService)({
@@ -518,9 +598,16 @@ function _exportService() {
518
598
  } catch (error) {
519
599
  var _error$response14, _error$response14$dat;
520
600
  var message = (_error$response14 = error.response) === null || _error$response14 === void 0 ? void 0 : (_error$response14$dat = _error$response14.data) === null || _error$response14$dat === void 0 ? void 0 : _error$response14$dat.message;
521
- (0, _Console.printMessage)("Export service '".concat(serviceId, "': ").concat(message), 'error');
601
+ (0, _Console.printMessage)({
602
+ message: "Export service '".concat(serviceId, "': ").concat(message),
603
+ type: 'error',
604
+ state
605
+ });
522
606
  }
523
- (0, _Console.debugMessage)("ServiceOps.exportService: end");
607
+ (0, _Console.debugMessage)({
608
+ message: "ServiceOps.exportService: end",
609
+ state
610
+ });
524
611
  return exportData;
525
612
  });
526
613
  return _exportService.apply(this, arguments);
@@ -542,7 +629,10 @@ function _exportServices() {
542
629
  globalConfig = false,
543
630
  state
544
631
  } = _ref8;
545
- (0, _Console.debugMessage)("ServiceOps.exportServices: start, globalConfig=".concat(globalConfig));
632
+ (0, _Console.debugMessage)({
633
+ message: "ServiceOps.exportServices: start, globalConfig=".concat(globalConfig),
634
+ state
635
+ });
546
636
  var exportData = createServiceExportTemplate();
547
637
  try {
548
638
  var services = yield getFullServices({
@@ -555,9 +645,16 @@ function _exportServices() {
555
645
  } catch (error) {
556
646
  var _error$response15, _error$response15$dat;
557
647
  var message = (_error$response15 = error.response) === null || _error$response15 === void 0 ? void 0 : (_error$response15$dat = _error$response15.data) === null || _error$response15$dat === void 0 ? void 0 : _error$response15$dat.message;
558
- (0, _Console.printMessage)("Export servics: ".concat(message), 'error');
648
+ (0, _Console.printMessage)({
649
+ message: "Export servics: ".concat(message),
650
+ type: 'error',
651
+ state
652
+ });
559
653
  }
560
- (0, _Console.debugMessage)("ServiceOps.exportServices: end");
654
+ (0, _Console.debugMessage)({
655
+ message: "ServiceOps.exportServices: end",
656
+ state
657
+ });
561
658
  return exportData;
562
659
  });
563
660
  return _exportServices.apply(this, arguments);
@@ -580,7 +677,10 @@ function _importService() {
580
677
  globalConfig = false,
581
678
  state
582
679
  } = _ref9;
583
- (0, _Console.debugMessage)("ServiceOps.importService: start, globalConfig=".concat(globalConfig));
680
+ (0, _Console.debugMessage)({
681
+ message: "ServiceOps.importService: start, globalConfig=".concat(globalConfig),
682
+ state
683
+ });
584
684
  var serviceData = importData.service[serviceId];
585
685
  var result = yield putFullService({
586
686
  serviceId,
@@ -589,7 +689,10 @@ function _importService() {
589
689
  globalConfig,
590
690
  state
591
691
  });
592
- (0, _Console.debugMessage)("ServiceOps.importService: end");
692
+ (0, _Console.debugMessage)({
693
+ message: "ServiceOps.importService: end",
694
+ state
695
+ });
593
696
  return result;
594
697
  });
595
698
  return _importService.apply(this, arguments);
@@ -605,7 +708,10 @@ function _importServices() {
605
708
  globalConfig = false,
606
709
  state
607
710
  } = _ref10;
608
- (0, _Console.debugMessage)("ServiceOps.importServices: start, globalConfig=".concat(globalConfig));
711
+ (0, _Console.debugMessage)({
712
+ message: "ServiceOps.importServices: start, globalConfig=".concat(globalConfig),
713
+ state
714
+ });
609
715
  try {
610
716
  var result = yield putFullServices({
611
717
  serviceEntries: Object.entries(importData.service),
@@ -613,15 +719,26 @@ function _importServices() {
613
719
  globalConfig,
614
720
  state
615
721
  });
616
- (0, _Console.debugMessage)("ServiceOps.importServices: end");
722
+ (0, _Console.debugMessage)({
723
+ message: "ServiceOps.importServices: end",
724
+ state
725
+ });
617
726
  return result;
618
727
  } catch (error) {
619
728
  var _error$response16, _error$response16$dat, _error$response17, _error$response17$dat;
620
729
  var message = (_error$response16 = error.response) === null || _error$response16 === void 0 ? void 0 : (_error$response16$dat = _error$response16.data) === null || _error$response16$dat === void 0 ? void 0 : _error$response16$dat.message;
621
730
  var detail = (_error$response17 = error.response) === null || _error$response17 === void 0 ? void 0 : (_error$response17$dat = _error$response17.data) === null || _error$response17$dat === void 0 ? void 0 : _error$response17$dat.detail;
622
- (0, _Console.printMessage)("Unable to import services: error: ".concat(message), 'error');
731
+ (0, _Console.printMessage)({
732
+ message: "Unable to import services: error: ".concat(message),
733
+ type: 'error',
734
+ state
735
+ });
623
736
  if (detail) {
624
- (0, _Console.printMessage)("Details: ".concat(JSON.stringify(detail)), 'error');
737
+ (0, _Console.printMessage)({
738
+ message: "Details: ".concat(JSON.stringify(detail)),
739
+ type: 'error',
740
+ state
741
+ });
625
742
  }
626
743
  throw error;
627
744
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ServiceOps.js","names":["_ServiceApi","require","_Console","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","asyncGeneratorStep","gen","resolve","reject","_next","_throw","info","error","done","Promise","then","_asyncToGenerator","fn","self","args","err","ServiceOps","constructor","state","createServiceExportTemplate","getListOfServices","_arguments","_this","globalConfig","getFullServices","_arguments2","_this2","deleteFullService","serviceId","_arguments3","_this3","deleteFullServices","_arguments4","_this4","exportService","_arguments5","_this5","exportServices","_arguments6","_this6","importService","importData","clean","_arguments7","_this7","importServices","_arguments8","_this8","exports","default","meta","service","_x","_getListOfServices2","_ref","debugMessage","services","_getListOfServices","result","_x2","_getFullServices","_ref2","concat","serviceList","fullServiceData","all","map","_ref11","listItem","nextDescendents","getService","_id","getServiceDescendents","_error$response","_error$response2","_error$response2$data","response","status","data","message","_error$response3","_error$response3$data","printMessage","_x11","putFullService","_x3","_putFullService","_ref3","_rev","enabled","_error$response4","_error$response5","_error$response5$data","_error$response6","_error$response6$data","putService","serviceData","_ref12","descendent","type","_type","descendentId","putServiceNextDescendent","serviceType","serviceNextDescendentId","serviceNextDescendentData","_error$response7","_error$response7$data","_x12","putFullServices","_x4","_putFullServices","_ref4","serviceEntries","results","id","_error$response8","_error$response8$data","_error$response9","_error$response9$data","detail","JSON","stringify","_x5","_deleteFullService","_ref5","nextDescendent","deleteServiceNextDescendent","deleteService","_x6","_deleteFullServices","_ref6","_ref13","serviceListItem","_error$response10","_error$response11","_error$response11$dat","_error$response12","_error$response12$dat","_x13","_error$response13","_error$response13$dat","_x7","_exportService","_ref7","exportData","_error$response14","_error$response14$dat","_x8","_exportServices","_ref8","_error$response15","_error$response15$dat","_x9","_importService","_ref9","_x10","_importServices","_ref10","entries","_error$response16","_error$response16$dat","_error$response17","_error$response17$dat"],"sources":["ops/ServiceOps.ts"],"sourcesContent":["import { AmServiceSkeleton } from '../api/ApiTypes';\nimport {\n deleteService,\n deleteServiceNextDescendent,\n getService,\n getListOfServices as _getListOfServices,\n getServiceDescendents,\n putService,\n putServiceNextDescendent,\n ServiceNextDescendent,\n} from '../api/ServiceApi';\nimport State from '../shared/State';\nimport { ServiceExportInterface } from './OpsTypes';\nimport { debugMessage, printMessage } from './utils/Console';\n\nexport default class ServiceOps {\n state: State;\n constructor(state: State) {\n this.state = state;\n }\n\n createServiceExportTemplate(): ServiceExportInterface {\n return createServiceExportTemplate();\n }\n\n /**\n * Get list of services\n * @param {boolean} globalConfig true if the list of global services is requested, false otherwise. Default: false.\n */\n async getListOfServices(globalConfig = false) {\n return getListOfServices({ globalConfig, state: this.state });\n }\n\n /**\n * Get all services including their descendents.\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns Promise resolving to an array of services with their descendants\n */\n async getFullServices(globalConfig = false): Promise<FullService[]> {\n return getFullServices({ globalConfig, state: this.state });\n }\n\n /**\n * Deletes the specified service\n * @param {string} serviceId The service to delete\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\n async deleteFullService(serviceId: string, globalConfig = false) {\n return deleteFullService({ serviceId, globalConfig, state: this.state });\n }\n\n /**\n * Deletes all services\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\n async deleteFullServices(globalConfig = false) {\n return deleteFullServices({ globalConfig, state: this.state });\n }\n\n /**\n * Export service. The response can be saved to file as is.\n * @param serviceId service id/name\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns {Promise<ServiceExportInterface>} Promise resolving to a ServiceExportInterface object.\n */\n async exportService(\n serviceId: string,\n globalConfig = false\n ): Promise<ServiceExportInterface> {\n return exportService({ serviceId, globalConfig, state: this.state });\n }\n\n /**\n * Export all services\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\n async exportServices(globalConfig = false): Promise<ServiceExportInterface> {\n return exportServices({ globalConfig, state: this.state });\n }\n\n /**\n * Imports a single service using a reference to the service and a file to read the data from. Optionally clean (remove) an existing service first\n * @param {string} serviceId The service id/name to add\n * @param {ServiceExportInterface} importData The service configuration export data to import\n * @param {boolean} clean Indicates whether to remove a possible existing service with the same id first.\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns Promise resolving when the service has been imported\n */\n async importService(\n serviceId: string,\n importData: ServiceExportInterface,\n clean: boolean,\n globalConfig = false\n ): Promise<AmServiceSkeleton> {\n return importService({\n serviceId,\n importData,\n clean,\n globalConfig,\n state: this.state,\n });\n }\n\n /**\n * Imports multiple services from the same file. Optionally clean (remove) existing services first\n * @param {ServiceExportInterface} importData The service configuration export data to import\n * @param {boolean} clean Indicates whether to remove possible existing services first\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\n async importServices(\n importData: ServiceExportInterface,\n clean: boolean,\n globalConfig = false\n ) {\n return importServices({\n importData,\n clean,\n globalConfig,\n state: this.state,\n });\n }\n}\n\ninterface FullService extends AmServiceSkeleton {\n nextDescendents?: ServiceNextDescendent[];\n}\n\n/**\n * Create an empty service export template\n * @returns {SingleTreeExportInterface} an empty service export template\n */\nexport function createServiceExportTemplate(): ServiceExportInterface {\n return {\n meta: {},\n service: {},\n } as ServiceExportInterface;\n}\n\n/**\n * Get list of services\n * @param {boolean} globalConfig true if the list of global services is requested, false otherwise. Default: false.\n */\nexport async function getListOfServices({\n globalConfig = false,\n state,\n}: {\n globalConfig: boolean;\n state: State;\n}) {\n debugMessage(`ServiceOps.getListOfServices: start`);\n const services = (await _getListOfServices({ globalConfig, state })).result;\n debugMessage(`ServiceOps.getListOfServices: end`);\n return services;\n}\n\n/**\n * Get all services including their descendents.\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns Promise resolving to an array of services with their descendants\n */\nexport async function getFullServices({\n globalConfig = false,\n state,\n}: {\n globalConfig: boolean;\n state: State;\n}): Promise<FullService[]> {\n debugMessage(\n `ServiceOps.getFullServices: start, globalConfig=${globalConfig}`\n );\n const serviceList = (await _getListOfServices({ globalConfig, state }))\n .result;\n\n const fullServiceData = await Promise.all(\n serviceList.map(async (listItem) => {\n try {\n const [service, nextDescendents] = await Promise.all([\n getService({ serviceId: listItem._id, globalConfig, state }),\n getServiceDescendents({\n serviceId: listItem._id,\n globalConfig,\n state,\n }),\n ]);\n\n return {\n ...service,\n nextDescendents,\n };\n } catch (error) {\n if (\n !(\n error.response?.status === 403 &&\n error.response?.data?.message ===\n 'This operation is not available in ForgeRock Identity Cloud.'\n )\n ) {\n const message = error.response?.data?.message;\n printMessage(\n `Unable to retrieve data for ${listItem._id} with error: ${message}`,\n 'error'\n );\n }\n }\n })\n );\n\n debugMessage(`ServiceOps.getFullServices: end`);\n return fullServiceData.filter((data) => !!data); // make sure to filter out any undefined objects\n}\n\n/**\n * Saves a service using the provide id and data, including descendents\n * @param {string} serviceId the service id / name\n * @param {string} fullServiceData service object including descendants\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns promise resolving to a service object\n */\nasync function putFullService({\n serviceId,\n fullServiceData,\n clean,\n globalConfig = false,\n state,\n}: {\n serviceId: string;\n fullServiceData: FullService;\n clean: boolean;\n globalConfig: boolean;\n state: State;\n}): Promise<AmServiceSkeleton> {\n debugMessage(\n `ServiceOps.putFullService: start, serviceId=${serviceId}, globalConfig=${globalConfig}`\n );\n const nextDescendents = fullServiceData.nextDescendents;\n\n delete fullServiceData.nextDescendents;\n delete fullServiceData._rev;\n delete fullServiceData.enabled;\n\n if (clean) {\n try {\n debugMessage(`ServiceOps.putFullService: clean`);\n await deleteFullService({ serviceId, globalConfig, state });\n } catch (error) {\n if (\n !(\n error.response?.status === 404 &&\n error.response?.data?.message === 'Not Found'\n )\n ) {\n const message = error.response?.data?.message;\n printMessage(\n `Error deleting service '${serviceId}' before import: ${message}`,\n 'error'\n );\n }\n }\n }\n\n // create service first\n const result = await putService({\n serviceId,\n serviceData: fullServiceData,\n globalConfig,\n state,\n });\n\n // return fast if no next descendents supplied\n if (nextDescendents.length === 0) {\n debugMessage(`ServiceOps.putFullService: end (w/o descendents)`);\n return result;\n }\n\n // now create next descendents\n await Promise.all(\n nextDescendents.map(async (descendent) => {\n const type = descendent._type._id;\n const descendentId = descendent._id;\n debugMessage(`ServiceOps.putFullService: descendentId=${descendentId}`);\n let result = undefined;\n try {\n result = await putServiceNextDescendent({\n serviceId,\n serviceType: type,\n serviceNextDescendentId: descendentId,\n serviceNextDescendentData: descendent,\n globalConfig,\n state,\n });\n } catch (error) {\n const message = error.response?.data?.message;\n printMessage(\n `Put descendent '${descendentId}' of service '${serviceId}': ${message}`,\n 'error'\n );\n }\n return result;\n })\n );\n debugMessage(`ServiceOps.putFullService: end (w/ descendents)`);\n}\n\n/**\n * Saves multiple services using the serviceEntries which contain both id and data with descendants\n * @param {[string, FullService][]} serviceEntries The services to add\n * @param {boolean} clean Indicates whether to remove possible existing services first\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns {Promise<AmService[]>} promise resolving to an array of service objects\n */\nasync function putFullServices({\n serviceEntries,\n clean,\n globalConfig = false,\n state,\n}: {\n serviceEntries: [string, FullService][];\n clean: boolean;\n globalConfig: boolean;\n state: State;\n}): Promise<AmServiceSkeleton[]> {\n debugMessage(\n `ServiceOps.putFullServices: start, globalConfig=${globalConfig}`\n );\n const results: AmServiceSkeleton[] = [];\n for (const [id, data] of serviceEntries) {\n try {\n const result = await putFullService({\n serviceId: id,\n fullServiceData: data,\n clean,\n globalConfig,\n state,\n });\n results.push(result);\n printMessage(`Imported: ${id}`, 'info');\n } catch (error) {\n const message = error.response?.data?.message;\n const detail = error.response?.data?.detail;\n printMessage(`Import service '${id}': ${message}`, 'error');\n if (detail) {\n printMessage(`Details: ${JSON.stringify(detail)}`, 'error');\n }\n }\n }\n debugMessage(`ServiceOps.putFullServices: end`);\n return results;\n}\n\n/**\n * Deletes the specified service\n * @param {string} serviceId The service to delete\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\nexport async function deleteFullService({\n serviceId,\n globalConfig = false,\n state,\n}: {\n serviceId: string;\n globalConfig: boolean;\n state: State;\n}) {\n debugMessage(\n `ServiceOps.deleteFullService: start, globalConfig=${globalConfig}`\n );\n const serviceNextDescendentData = await getServiceDescendents({\n serviceId,\n globalConfig,\n state,\n });\n\n await Promise.all(\n serviceNextDescendentData.map((nextDescendent) =>\n deleteServiceNextDescendent({\n serviceId,\n serviceType: nextDescendent._type._id,\n serviceNextDescendentId: nextDescendent._id,\n globalConfig,\n state,\n })\n )\n );\n\n await deleteService({ serviceId, globalConfig, state });\n debugMessage(`ServiceOps.deleteFullService: end`);\n}\n\n/**\n * Deletes all services\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\nexport async function deleteFullServices({\n globalConfig = false,\n state,\n}: {\n globalConfig: boolean;\n state: State;\n}) {\n debugMessage(\n `ServiceOps.deleteFullServices: start, globalConfig=${globalConfig}`\n );\n try {\n const serviceList = (await _getListOfServices({ globalConfig, state }))\n .result;\n\n await Promise.all(\n serviceList.map(async (serviceListItem) => {\n try {\n await deleteFullService({\n serviceId: serviceListItem._id,\n globalConfig,\n state,\n });\n } catch (error) {\n if (\n !(\n error.response?.status === 403 &&\n error.response?.data?.message ===\n 'This operation is not available in ForgeRock Identity Cloud.'\n )\n ) {\n const message = error.response?.data?.message;\n printMessage(\n `Delete service '${serviceListItem._id}': ${message}`,\n 'error'\n );\n }\n }\n })\n );\n } catch (error) {\n const message = error.response?.data?.message;\n printMessage(`Delete services: ${message}`, 'error');\n }\n debugMessage(`ServiceOps.deleteFullServices: end`);\n}\n\n/**\n * Export service. The response can be saved to file as is.\n * @param serviceId service id/name\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns {Promise<ServiceExportInterface>} Promise resolving to a ServiceExportInterface object.\n */\nexport async function exportService({\n serviceId,\n globalConfig = false,\n state,\n}: {\n serviceId: string;\n globalConfig: boolean;\n state: State;\n}): Promise<ServiceExportInterface> {\n debugMessage(`ServiceOps.exportService: start, globalConfig=${globalConfig}`);\n const exportData = createServiceExportTemplate();\n try {\n const service = await getService({ serviceId, globalConfig, state });\n service.nextDescendents = await getServiceDescendents({\n serviceId,\n globalConfig,\n state,\n });\n exportData.service[serviceId] = service;\n } catch (error) {\n const message = error.response?.data?.message;\n printMessage(`Export service '${serviceId}': ${message}`, 'error');\n }\n debugMessage(`ServiceOps.exportService: end`);\n return exportData;\n}\n\n/**\n * Export all services\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\nexport async function exportServices({\n globalConfig = false,\n state,\n}: {\n globalConfig: boolean;\n state: State;\n}): Promise<ServiceExportInterface> {\n debugMessage(\n `ServiceOps.exportServices: start, globalConfig=${globalConfig}`\n );\n const exportData = createServiceExportTemplate();\n try {\n const services = await getFullServices({ globalConfig, state });\n for (const service of services) {\n exportData.service[service._type._id] = service;\n }\n } catch (error) {\n const message = error.response?.data?.message;\n printMessage(`Export servics: ${message}`, 'error');\n }\n debugMessage(`ServiceOps.exportServices: end`);\n return exportData;\n}\n\n/**\n * Imports a single service using a reference to the service and a file to read the data from. Optionally clean (remove) an existing service first\n * @param {string} serviceId The service id/name to add\n * @param {ServiceExportInterface} importData The service configuration export data to import\n * @param {boolean} clean Indicates whether to remove a possible existing service with the same id first.\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns Promise resolving when the service has been imported\n */\nexport async function importService({\n serviceId,\n importData,\n clean,\n globalConfig = false,\n state,\n}: {\n serviceId: string;\n importData: ServiceExportInterface;\n clean: boolean;\n globalConfig: boolean;\n state: State;\n}): Promise<AmServiceSkeleton> {\n debugMessage(`ServiceOps.importService: start, globalConfig=${globalConfig}`);\n const serviceData = importData.service[serviceId];\n const result = await putFullService({\n serviceId,\n fullServiceData: serviceData,\n clean,\n globalConfig,\n state,\n });\n debugMessage(`ServiceOps.importService: end`);\n return result;\n}\n\n/**\n * Imports multiple services from the same file. Optionally clean (remove) existing services first\n * @param {ServiceExportInterface} importData The service configuration export data to import\n * @param {boolean} clean Indicates whether to remove possible existing services first\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\nexport async function importServices({\n importData,\n clean,\n globalConfig = false,\n state,\n}: {\n importData: ServiceExportInterface;\n clean: boolean;\n globalConfig: boolean;\n state: State;\n}) {\n debugMessage(\n `ServiceOps.importServices: start, globalConfig=${globalConfig}`\n );\n try {\n const result = await putFullServices({\n serviceEntries: Object.entries(importData.service),\n clean,\n globalConfig,\n state,\n });\n debugMessage(`ServiceOps.importServices: end`);\n return result;\n } catch (error) {\n const message = error.response?.data?.message;\n const detail = error.response?.data?.detail;\n printMessage(`Unable to import services: error: ${message}`, 'error');\n if (detail) {\n printMessage(`Details: ${JSON.stringify(detail)}`, 'error');\n }\n throw error;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAYA,IAAAC,QAAA,GAAAD,OAAA;AA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UJ;IAAA,IAVkC;MACnCrH,UAAU;MACVC,KAAK;MACLnB,YAAY,GAAG,KAAK;MACpBL;IAMF,CAAC,GAAA4I,MAAA;IACC,IAAAvG,qBAAY,oDAAAO,MAAA,CACwCvC,YAAY,CAChE,CAAC;IACD,IAAI;MACF,IAAMmC,MAAM,SAASmD,eAAe,CAAC;QACnCI,cAAc,EAAExJ,MAAM,CAACsM,OAAO,CAACtH,UAAU,CAACU,OAAO,CAAC;QAClDT,KAAK;QACLnB,YAAY;QACZL;MACF,CAAC,CAAC;MACF,IAAAqC,qBAAY,kCAAiC,CAAC;MAC9C,OAAOG,MAAM;IACf,CAAC,CAAC,OAAOnD,KAAK,EAAE;MAAA,IAAAyJ,iBAAA,EAAAC,qBAAA,EAAAC,iBAAA,EAAAC,qBAAA;MACd,IAAMpF,OAAO,IAAAiF,iBAAA,GAAGzJ,KAAK,CAACqE,QAAQ,cAAAoF,iBAAA,wBAAAC,qBAAA,GAAdD,iBAAA,CAAgBlF,IAAI,cAAAmF,qBAAA,uBAApBA,qBAAA,CAAsBlF,OAAO;MAC7C,IAAMyC,MAAM,IAAA0C,iBAAA,GAAG3J,KAAK,CAACqE,QAAQ,cAAAsF,iBAAA,wBAAAC,qBAAA,GAAdD,iBAAA,CAAgBpF,IAAI,cAAAqF,qBAAA,uBAApBA,qBAAA,CAAsB3C,MAAM;MAC3C,IAAAtC,qBAAY,uCAAApB,MAAA,CAAsCiB,OAAO,GAAI,OAAO,CAAC;MACrE,IAAIyC,MAAM,EAAE;QACV,IAAAtC,qBAAY,cAAApB,MAAA,CAAa2D,IAAI,CAACC,SAAS,CAACF,MAAM,CAAC,GAAI,OAAO,CAAC;MAC7D;MACA,MAAMjH,KAAK;IACb;EACF,CAAC;EAAA,OAAAsJ,eAAA,CAAA5L,KAAA,OAAAI,SAAA;AAAA"}
1
+ {"version":3,"file":"ServiceOps.js","names":["_ServiceApi","require","_Console","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","obj","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","asyncGeneratorStep","gen","resolve","reject","_next","_throw","info","error","done","Promise","then","_asyncToGenerator","fn","self","args","err","ServiceOps","constructor","state","createServiceExportTemplate","getListOfServices","_arguments","_this","globalConfig","getFullServices","_arguments2","_this2","deleteFullService","serviceId","_arguments3","_this3","deleteFullServices","_arguments4","_this4","exportService","_arguments5","_this5","exportServices","_arguments6","_this6","importService","importData","clean","_arguments7","_this7","importServices","_arguments8","_this8","exports","default","meta","service","_x","_getListOfServices2","_ref","debugMessage","message","services","_getListOfServices","result","_x2","_getFullServices","_ref2","concat","serviceList","fullServiceData","all","map","_ref11","listItem","nextDescendents","getService","_id","getServiceDescendents","_error$response","_error$response2","_error$response2$data","response","status","data","_error$response3","_error$response3$data","printMessage","type","_x11","putFullService","_x3","_putFullService","_ref3","_rev","enabled","_error$response4","_error$response5","_error$response5$data","_error$response6","_error$response6$data","putService","serviceData","_ref12","descendent","_type","descendentId","putServiceNextDescendent","serviceType","serviceNextDescendentId","serviceNextDescendentData","_error$response7","_error$response7$data","_x12","putFullServices","_x4","_putFullServices","_ref4","serviceEntries","results","id","_error$response8","_error$response8$data","_error$response9","_error$response9$data","detail","JSON","stringify","_x5","_deleteFullService","_ref5","nextDescendent","deleteServiceNextDescendent","deleteService","_x6","_deleteFullServices","_ref6","_ref13","serviceListItem","_error$response10","_error$response11","_error$response11$dat","_error$response12","_error$response12$dat","_x13","_error$response13","_error$response13$dat","_x7","_exportService","_ref7","exportData","_error$response14","_error$response14$dat","_x8","_exportServices","_ref8","_error$response15","_error$response15$dat","_x9","_importService","_ref9","_x10","_importServices","_ref10","entries","_error$response16","_error$response16$dat","_error$response17","_error$response17$dat"],"sources":["ops/ServiceOps.ts"],"sourcesContent":["import { AmServiceSkeleton } from '../api/ApiTypes';\nimport {\n deleteService,\n deleteServiceNextDescendent,\n getService,\n getListOfServices as _getListOfServices,\n getServiceDescendents,\n putService,\n putServiceNextDescendent,\n ServiceNextDescendent,\n} from '../api/ServiceApi';\nimport State from '../shared/State';\nimport { ServiceExportInterface } from './OpsTypes';\nimport { debugMessage, printMessage } from './utils/Console';\n\nexport default class ServiceOps {\n state: State;\n constructor(state: State) {\n this.state = state;\n }\n\n createServiceExportTemplate(): ServiceExportInterface {\n return createServiceExportTemplate();\n }\n\n /**\n * Get list of services\n * @param {boolean} globalConfig true if the list of global services is requested, false otherwise. Default: false.\n */\n async getListOfServices(globalConfig = false) {\n return getListOfServices({ globalConfig, state: this.state });\n }\n\n /**\n * Get all services including their descendents.\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns Promise resolving to an array of services with their descendants\n */\n async getFullServices(globalConfig = false): Promise<FullService[]> {\n return getFullServices({ globalConfig, state: this.state });\n }\n\n /**\n * Deletes the specified service\n * @param {string} serviceId The service to delete\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\n async deleteFullService(serviceId: string, globalConfig = false) {\n return deleteFullService({ serviceId, globalConfig, state: this.state });\n }\n\n /**\n * Deletes all services\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\n async deleteFullServices(globalConfig = false) {\n return deleteFullServices({ globalConfig, state: this.state });\n }\n\n /**\n * Export service. The response can be saved to file as is.\n * @param serviceId service id/name\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns {Promise<ServiceExportInterface>} Promise resolving to a ServiceExportInterface object.\n */\n async exportService(\n serviceId: string,\n globalConfig = false\n ): Promise<ServiceExportInterface> {\n return exportService({ serviceId, globalConfig, state: this.state });\n }\n\n /**\n * Export all services\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\n async exportServices(globalConfig = false): Promise<ServiceExportInterface> {\n return exportServices({ globalConfig, state: this.state });\n }\n\n /**\n * Imports a single service using a reference to the service and a file to read the data from. Optionally clean (remove) an existing service first\n * @param {string} serviceId The service id/name to add\n * @param {ServiceExportInterface} importData The service configuration export data to import\n * @param {boolean} clean Indicates whether to remove a possible existing service with the same id first.\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns Promise resolving when the service has been imported\n */\n async importService(\n serviceId: string,\n importData: ServiceExportInterface,\n clean: boolean,\n globalConfig = false\n ): Promise<AmServiceSkeleton> {\n return importService({\n serviceId,\n importData,\n clean,\n globalConfig,\n state: this.state,\n });\n }\n\n /**\n * Imports multiple services from the same file. Optionally clean (remove) existing services first\n * @param {ServiceExportInterface} importData The service configuration export data to import\n * @param {boolean} clean Indicates whether to remove possible existing services first\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\n async importServices(\n importData: ServiceExportInterface,\n clean: boolean,\n globalConfig = false\n ) {\n return importServices({\n importData,\n clean,\n globalConfig,\n state: this.state,\n });\n }\n}\n\ninterface FullService extends AmServiceSkeleton {\n nextDescendents?: ServiceNextDescendent[];\n}\n\n/**\n * Create an empty service export template\n * @returns {SingleTreeExportInterface} an empty service export template\n */\nexport function createServiceExportTemplate(): ServiceExportInterface {\n return {\n meta: {},\n service: {},\n } as ServiceExportInterface;\n}\n\n/**\n * Get list of services\n * @param {boolean} globalConfig true if the list of global services is requested, false otherwise. Default: false.\n */\nexport async function getListOfServices({\n globalConfig = false,\n state,\n}: {\n globalConfig: boolean;\n state: State;\n}) {\n debugMessage({ message: `ServiceOps.getListOfServices: start`, state });\n const services = (await _getListOfServices({ globalConfig, state })).result;\n debugMessage({ message: `ServiceOps.getListOfServices: end`, state });\n return services;\n}\n\n/**\n * Get all services including their descendents.\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns Promise resolving to an array of services with their descendants\n */\nexport async function getFullServices({\n globalConfig = false,\n state,\n}: {\n globalConfig: boolean;\n state: State;\n}): Promise<FullService[]> {\n debugMessage({\n message: `ServiceOps.getFullServices: start, globalConfig=${globalConfig}`,\n state,\n });\n const serviceList = (await _getListOfServices({ globalConfig, state }))\n .result;\n\n const fullServiceData = await Promise.all(\n serviceList.map(async (listItem) => {\n try {\n const [service, nextDescendents] = await Promise.all([\n getService({ serviceId: listItem._id, globalConfig, state }),\n getServiceDescendents({\n serviceId: listItem._id,\n globalConfig,\n state,\n }),\n ]);\n\n return {\n ...service,\n nextDescendents,\n };\n } catch (error) {\n if (\n !(\n error.response?.status === 403 &&\n error.response?.data?.message ===\n 'This operation is not available in ForgeRock Identity Cloud.'\n )\n ) {\n const message = error.response?.data?.message;\n printMessage({\n message: `Unable to retrieve data for ${listItem._id} with error: ${message}`,\n type: 'error',\n state,\n });\n }\n }\n })\n );\n\n debugMessage({ message: `ServiceOps.getFullServices: end`, state });\n return fullServiceData.filter((data) => !!data); // make sure to filter out any undefined objects\n}\n\n/**\n * Saves a service using the provide id and data, including descendents\n * @param {string} serviceId the service id / name\n * @param {string} fullServiceData service object including descendants\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns promise resolving to a service object\n */\nasync function putFullService({\n serviceId,\n fullServiceData,\n clean,\n globalConfig = false,\n state,\n}: {\n serviceId: string;\n fullServiceData: FullService;\n clean: boolean;\n globalConfig: boolean;\n state: State;\n}): Promise<AmServiceSkeleton> {\n debugMessage({\n message: `ServiceOps.putFullService: start, serviceId=${serviceId}, globalConfig=${globalConfig}`,\n state,\n });\n const nextDescendents = fullServiceData.nextDescendents;\n\n delete fullServiceData.nextDescendents;\n delete fullServiceData._rev;\n delete fullServiceData.enabled;\n\n if (clean) {\n try {\n debugMessage({ message: `ServiceOps.putFullService: clean`, state });\n await deleteFullService({ serviceId, globalConfig, state });\n } catch (error) {\n if (\n !(\n error.response?.status === 404 &&\n error.response?.data?.message === 'Not Found'\n )\n ) {\n const message = error.response?.data?.message;\n printMessage({\n message: `Error deleting service '${serviceId}' before import: ${message}`,\n type: 'error',\n state,\n });\n }\n }\n }\n\n // create service first\n const result = await putService({\n serviceId,\n serviceData: fullServiceData,\n globalConfig,\n state,\n });\n\n // return fast if no next descendents supplied\n if (nextDescendents.length === 0) {\n debugMessage({\n message: `ServiceOps.putFullService: end (w/o descendents)`,\n state,\n });\n return result;\n }\n\n // now create next descendents\n await Promise.all(\n nextDescendents.map(async (descendent) => {\n const type = descendent._type._id;\n const descendentId = descendent._id;\n debugMessage({\n message: `ServiceOps.putFullService: descendentId=${descendentId}`,\n state,\n });\n let result = undefined;\n try {\n result = await putServiceNextDescendent({\n serviceId,\n serviceType: type,\n serviceNextDescendentId: descendentId,\n serviceNextDescendentData: descendent,\n globalConfig,\n state,\n });\n } catch (error) {\n const message = error.response?.data?.message;\n printMessage({\n message: `Put descendent '${descendentId}' of service '${serviceId}': ${message}`,\n type: 'error',\n state,\n });\n }\n return result;\n })\n );\n debugMessage({\n message: `ServiceOps.putFullService: end (w/ descendents)`,\n state,\n });\n}\n\n/**\n * Saves multiple services using the serviceEntries which contain both id and data with descendants\n * @param {[string, FullService][]} serviceEntries The services to add\n * @param {boolean} clean Indicates whether to remove possible existing services first\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns {Promise<AmService[]>} promise resolving to an array of service objects\n */\nasync function putFullServices({\n serviceEntries,\n clean,\n globalConfig = false,\n state,\n}: {\n serviceEntries: [string, FullService][];\n clean: boolean;\n globalConfig: boolean;\n state: State;\n}): Promise<AmServiceSkeleton[]> {\n debugMessage({\n message: `ServiceOps.putFullServices: start, globalConfig=${globalConfig}`,\n state,\n });\n const results: AmServiceSkeleton[] = [];\n for (const [id, data] of serviceEntries) {\n try {\n const result = await putFullService({\n serviceId: id,\n fullServiceData: data,\n clean,\n globalConfig,\n state,\n });\n results.push(result);\n printMessage({ message: `Imported: ${id}`, type: 'info', state });\n } catch (error) {\n const message = error.response?.data?.message;\n const detail = error.response?.data?.detail;\n printMessage({\n message: `Import service '${id}': ${message}`,\n type: 'error',\n state,\n });\n if (detail) {\n printMessage({\n message: `Details: ${JSON.stringify(detail)}`,\n type: 'error',\n state,\n });\n }\n }\n }\n debugMessage({ message: `ServiceOps.putFullServices: end`, state });\n return results;\n}\n\n/**\n * Deletes the specified service\n * @param {string} serviceId The service to delete\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\nexport async function deleteFullService({\n serviceId,\n globalConfig = false,\n state,\n}: {\n serviceId: string;\n globalConfig: boolean;\n state: State;\n}) {\n debugMessage({\n message: `ServiceOps.deleteFullService: start, globalConfig=${globalConfig}`,\n state,\n });\n const serviceNextDescendentData = await getServiceDescendents({\n serviceId,\n globalConfig,\n state,\n });\n\n await Promise.all(\n serviceNextDescendentData.map((nextDescendent) =>\n deleteServiceNextDescendent({\n serviceId,\n serviceType: nextDescendent._type._id,\n serviceNextDescendentId: nextDescendent._id,\n globalConfig,\n state,\n })\n )\n );\n\n await deleteService({ serviceId, globalConfig, state });\n debugMessage({ message: `ServiceOps.deleteFullService: end`, state });\n}\n\n/**\n * Deletes all services\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\nexport async function deleteFullServices({\n globalConfig = false,\n state,\n}: {\n globalConfig: boolean;\n state: State;\n}) {\n debugMessage({\n message: `ServiceOps.deleteFullServices: start, globalConfig=${globalConfig}`,\n state,\n });\n try {\n const serviceList = (await _getListOfServices({ globalConfig, state }))\n .result;\n\n await Promise.all(\n serviceList.map(async (serviceListItem) => {\n try {\n await deleteFullService({\n serviceId: serviceListItem._id,\n globalConfig,\n state,\n });\n } catch (error) {\n if (\n !(\n error.response?.status === 403 &&\n error.response?.data?.message ===\n 'This operation is not available in ForgeRock Identity Cloud.'\n )\n ) {\n const message = error.response?.data?.message;\n printMessage({\n message: `Delete service '${serviceListItem._id}': ${message}`,\n state,\n type: 'error',\n });\n }\n }\n })\n );\n } catch (error) {\n const message = error.response?.data?.message;\n printMessage({\n message: `Delete services: ${message}`,\n type: 'error',\n state,\n });\n }\n debugMessage({ message: `ServiceOps.deleteFullServices: end`, state });\n}\n\n/**\n * Export service. The response can be saved to file as is.\n * @param serviceId service id/name\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns {Promise<ServiceExportInterface>} Promise resolving to a ServiceExportInterface object.\n */\nexport async function exportService({\n serviceId,\n globalConfig = false,\n state,\n}: {\n serviceId: string;\n globalConfig: boolean;\n state: State;\n}): Promise<ServiceExportInterface> {\n debugMessage({\n message: `ServiceOps.exportService: start, globalConfig=${globalConfig}`,\n state,\n });\n const exportData = createServiceExportTemplate();\n try {\n const service = await getService({ serviceId, globalConfig, state });\n service.nextDescendents = await getServiceDescendents({\n serviceId,\n globalConfig,\n state,\n });\n exportData.service[serviceId] = service;\n } catch (error) {\n const message = error.response?.data?.message;\n printMessage({\n message: `Export service '${serviceId}': ${message}`,\n type: 'error',\n state,\n });\n }\n debugMessage({ message: `ServiceOps.exportService: end`, state });\n return exportData;\n}\n\n/**\n * Export all services\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\nexport async function exportServices({\n globalConfig = false,\n state,\n}: {\n globalConfig: boolean;\n state: State;\n}): Promise<ServiceExportInterface> {\n debugMessage({\n message: `ServiceOps.exportServices: start, globalConfig=${globalConfig}`,\n state,\n });\n const exportData = createServiceExportTemplate();\n try {\n const services = await getFullServices({ globalConfig, state });\n for (const service of services) {\n exportData.service[service._type._id] = service;\n }\n } catch (error) {\n const message = error.response?.data?.message;\n printMessage({\n message: `Export servics: ${message}`,\n type: 'error',\n state,\n });\n }\n debugMessage({ message: `ServiceOps.exportServices: end`, state });\n return exportData;\n}\n\n/**\n * Imports a single service using a reference to the service and a file to read the data from. Optionally clean (remove) an existing service first\n * @param {string} serviceId The service id/name to add\n * @param {ServiceExportInterface} importData The service configuration export data to import\n * @param {boolean} clean Indicates whether to remove a possible existing service with the same id first.\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n * @returns Promise resolving when the service has been imported\n */\nexport async function importService({\n serviceId,\n importData,\n clean,\n globalConfig = false,\n state,\n}: {\n serviceId: string;\n importData: ServiceExportInterface;\n clean: boolean;\n globalConfig: boolean;\n state: State;\n}): Promise<AmServiceSkeleton> {\n debugMessage({\n message: `ServiceOps.importService: start, globalConfig=${globalConfig}`,\n state,\n });\n const serviceData = importData.service[serviceId];\n const result = await putFullService({\n serviceId,\n fullServiceData: serviceData,\n clean,\n globalConfig,\n state,\n });\n debugMessage({ message: `ServiceOps.importService: end`, state });\n return result;\n}\n\n/**\n * Imports multiple services from the same file. Optionally clean (remove) existing services first\n * @param {ServiceExportInterface} importData The service configuration export data to import\n * @param {boolean} clean Indicates whether to remove possible existing services first\n * @param {boolean} globalConfig true if the global service is the target of the operation, false otherwise. Default: false.\n */\nexport async function importServices({\n importData,\n clean,\n globalConfig = false,\n state,\n}: {\n importData: ServiceExportInterface;\n clean: boolean;\n globalConfig: boolean;\n state: State;\n}) {\n debugMessage({\n message: `ServiceOps.importServices: start, globalConfig=${globalConfig}`,\n state,\n });\n try {\n const result = await putFullServices({\n serviceEntries: Object.entries(importData.service),\n clean,\n globalConfig,\n state,\n });\n debugMessage({ message: `ServiceOps.importServices: end`, state });\n return result;\n } catch (error) {\n const message = error.response?.data?.message;\n const detail = error.response?.data?.detail;\n printMessage({\n message: `Unable to import services: error: ${message}`,\n type: 'error',\n state,\n });\n if (detail) {\n printMessage({\n message: `Details: ${JSON.stringify(detail)}`,\n type: 'error',\n state,\n });\n }\n throw error;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AACA,IAAAA,WAAA,GAAAC,OAAA;AAYA,IAAAC,QAAA,GAAAD,OAAA;AAA6D,SAAAE,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CA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rC,IAAI,EAAE,OAAO;UACbjE;QACF,CAAC,CAAC;MACJ;MACA,MAAMX,KAAK;IACb;EACF,CAAC;EAAA,OAAAsJ,eAAA,CAAA5L,KAAA,OAAAI,SAAA;AAAA"}
@@ -445,7 +445,10 @@ function _putThemes() {
445
445
  realm = null,
446
446
  state
447
447
  } = _ref7;
448
- (0, _Console.debugMessage)("ThemeApi.putThemes: start");
448
+ (0, _Console.debugMessage)({
449
+ message: "ThemeApi.putThemes: start",
450
+ state
451
+ });
449
452
  realm = realm ? realm : (0, _ApiUtils.getCurrentRealmName)(state);
450
453
  var themes = yield (0, _IdmConfigApi.getConfigEntity)({
451
454
  entityId: THEMEREALM_ID,
@@ -460,7 +463,10 @@ function _putThemes() {
460
463
  realm
461
464
  }).map(theme => {
462
465
  if (themeMap[theme._id]) {
463
- (0, _Console.debugMessage)("Update theme: ".concat(theme._id, " - ").concat(theme.name));
466
+ (0, _Console.debugMessage)({
467
+ message: "Update theme: ".concat(theme._id, " - ").concat(theme.name),
468
+ state
469
+ });
464
470
  existingThemeIDs.push(theme._id);
465
471
  // remember the id of the last default theme
466
472
  if (themeMap[theme._id].isDefault) defaultThemeId = theme._id;
@@ -471,7 +477,10 @@ function _putThemes() {
471
477
  var newThemeIDs = allThemeIDs.filter(id => !existingThemeIDs.includes(id));
472
478
  // add new themes
473
479
  newThemeIDs.forEach(themeId => {
474
- (0, _Console.debugMessage)("Add theme: ".concat(themeMap[themeId]._id, " - ").concat(themeMap[themeId].name));
480
+ (0, _Console.debugMessage)({
481
+ message: "Add theme: ".concat(themeMap[themeId]._id, " - ").concat(themeMap[themeId].name),
482
+ state
483
+ });
475
484
  // remember the id of the last default theme
476
485
  if (themeMap[themeId].isDefault) defaultThemeId = themeId;
477
486
  realmThemes.push(themeMap[themeId]);
@@ -492,8 +501,14 @@ function _putThemes() {
492
501
  }),
493
502
  realm
494
503
  }).map(theme => [theme._id, theme]));
495
- (0, _Console.debugMessage)(updatedThemes);
496
- (0, _Console.debugMessage)("ThemeApi.putThemes: finished");
504
+ (0, _Console.debugMessage)({
505
+ message: updatedThemes,
506
+ state
507
+ });
508
+ (0, _Console.debugMessage)({
509
+ message: "ThemeApi.putThemes: finished",
510
+ state
511
+ });
497
512
  return updatedThemes;
498
513
  });
499
514
  return _putThemes.apply(this, arguments);