epicenter-libs 3.34.2 → 3.35.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 (38) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +61 -86
  3. package/dist/browser/epicenter.js +1581 -226
  4. package/dist/browser/epicenter.js.map +1 -1
  5. package/dist/cjs/epicenter.js +1503 -141
  6. package/dist/cjs/epicenter.js.map +1 -1
  7. package/dist/epicenter.js +1587 -225
  8. package/dist/epicenter.js.map +1 -1
  9. package/dist/epicenter.min.js +1 -1
  10. package/dist/epicenter.min.js.map +1 -1
  11. package/dist/module/epicenter.js +1497 -142
  12. package/dist/module/epicenter.js.map +1 -1
  13. package/dist/types/adapters/docket.d.ts +80 -0
  14. package/dist/types/adapters/encyclopedia.d.ts +86 -0
  15. package/dist/types/adapters/file.d.ts +201 -0
  16. package/dist/types/adapters/git.d.ts +171 -0
  17. package/dist/types/adapters/index.d.ts +8 -1
  18. package/dist/types/adapters/pipeline.d.ts +88 -0
  19. package/dist/types/adapters/powerpoint.d.ts +130 -0
  20. package/dist/types/adapters/registration.d.ts +270 -0
  21. package/dist/types/adapters/task.d.ts +99 -37
  22. package/dist/types/epicenter.d.ts +2 -2
  23. package/dist/types/types.d.ts +6 -1
  24. package/dist/types/utils/router.d.ts +1 -0
  25. package/package.json +12 -7
  26. package/src/adapters/docket.ts +109 -0
  27. package/src/adapters/encyclopedia.ts +128 -0
  28. package/src/adapters/file.ts +332 -0
  29. package/src/adapters/git.ts +278 -0
  30. package/src/adapters/index.ts +14 -0
  31. package/src/adapters/pipeline.ts +145 -0
  32. package/src/adapters/powerpoint.ts +238 -0
  33. package/src/adapters/registration.ts +413 -0
  34. package/src/adapters/task.ts +170 -47
  35. package/src/epicenter.ts +10 -3
  36. package/src/globals.d.ts +6 -0
  37. package/src/types.ts +61 -0
  38. package/src/utils/router.ts +1 -0
@@ -53,7 +53,7 @@ function requireRuntime () {
53
53
  if (hasRequiredRuntime) return runtime.exports;
54
54
  hasRequiredRuntime = 1;
55
55
  (function (module) {
56
- var runtime = (function (exports$1) {
56
+ var runtime = (function (exports) {
57
57
 
58
58
  var Op = Object.prototype;
59
59
  var hasOwn = Op.hasOwnProperty;
@@ -94,7 +94,7 @@ function requireRuntime () {
94
94
 
95
95
  return generator;
96
96
  }
97
- exports$1.wrap = wrap;
97
+ exports.wrap = wrap;
98
98
 
99
99
  // Try/catch helper to minimize deoptimizations. Returns a completion
100
100
  // record like context.tryEntries[i].completion. This interface could
@@ -173,7 +173,7 @@ function requireRuntime () {
173
173
  });
174
174
  }
175
175
 
176
- exports$1.isGeneratorFunction = function(genFun) {
176
+ exports.isGeneratorFunction = function(genFun) {
177
177
  var ctor = typeof genFun === "function" && genFun.constructor;
178
178
  return ctor
179
179
  ? ctor === GeneratorFunction ||
@@ -183,7 +183,7 @@ function requireRuntime () {
183
183
  : false;
184
184
  };
185
185
 
186
- exports$1.mark = function(genFun) {
186
+ exports.mark = function(genFun) {
187
187
  if (Object.setPrototypeOf) {
188
188
  Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
189
189
  } else {
@@ -198,7 +198,7 @@ function requireRuntime () {
198
198
  // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
199
199
  // `hasOwn.call(value, "__await")` to determine if the yielded value is
200
200
  // meant to be awaited.
201
- exports$1.awrap = function(arg) {
201
+ exports.awrap = function(arg) {
202
202
  return { __await: arg };
203
203
  };
204
204
 
@@ -273,12 +273,12 @@ function requireRuntime () {
273
273
  define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
274
274
  return this;
275
275
  });
276
- exports$1.AsyncIterator = AsyncIterator;
276
+ exports.AsyncIterator = AsyncIterator;
277
277
 
278
278
  // Note that simple async functions are implemented on top of
279
279
  // AsyncIterator objects; they just return a Promise for the value of
280
280
  // the final result produced by the iterator.
281
- exports$1.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
281
+ exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
282
282
  if (PromiseImpl === void 0) PromiseImpl = Promise;
283
283
 
284
284
  var iter = new AsyncIterator(
@@ -286,7 +286,7 @@ function requireRuntime () {
286
286
  PromiseImpl
287
287
  );
288
288
 
289
- return exports$1.isGeneratorFunction(outerFn)
289
+ return exports.isGeneratorFunction(outerFn)
290
290
  ? iter // If outerFn is a generator, return the full iterator.
291
291
  : iter.next().then(function(result) {
292
292
  return result.done ? result.value : iter.next();
@@ -506,7 +506,7 @@ function requireRuntime () {
506
506
  this.reset(true);
507
507
  }
508
508
 
509
- exports$1.keys = function(val) {
509
+ exports.keys = function(val) {
510
510
  var object = Object(val);
511
511
  var keys = [];
512
512
  for (var key in object) {
@@ -567,7 +567,7 @@ function requireRuntime () {
567
567
 
568
568
  throw new TypeError(typeof iterable + " is not iterable");
569
569
  }
570
- exports$1.values = values;
570
+ exports.values = values;
571
571
 
572
572
  function doneResult() {
573
573
  return { value: undefined$1, done: true };
@@ -777,7 +777,7 @@ function requireRuntime () {
777
777
  // or not, return the runtime object so that we can declare the variable
778
778
  // regeneratorRuntime in the outer scope, which allows this module to be
779
779
  // injected easily by `bin/regenerator --include-runtime script.js`.
780
- return exports$1;
780
+ return exports;
781
781
 
782
782
  }(
783
783
  // If this script is executing as a CommonJS module, use module.exports
@@ -82457,7 +82457,7 @@ var hasRequiredNodePonyfill;
82457
82457
  function requireNodePonyfill () {
82458
82458
  if (hasRequiredNodePonyfill) return nodePonyfill.exports;
82459
82459
  hasRequiredNodePonyfill = 1;
82460
- (function (module, exports$1) {
82460
+ (function (module, exports) {
82461
82461
  const nodeFetch = require$$0;
82462
82462
  const realFetch = nodeFetch.default || nodeFetch;
82463
82463
 
@@ -82472,14 +82472,14 @@ function requireNodePonyfill () {
82472
82472
 
82473
82473
  fetch.ponyfill = true;
82474
82474
 
82475
- module.exports = exports$1 = fetch;
82476
- exports$1.fetch = fetch;
82477
- exports$1.Headers = nodeFetch.Headers;
82478
- exports$1.Request = nodeFetch.Request;
82479
- exports$1.Response = nodeFetch.Response;
82475
+ module.exports = exports = fetch;
82476
+ exports.fetch = fetch;
82477
+ exports.Headers = nodeFetch.Headers;
82478
+ exports.Request = nodeFetch.Request;
82479
+ exports.Response = nodeFetch.Response;
82480
82480
 
82481
82481
  // Needed for TypeScript consumers without esModuleInterop.
82482
- exports$1.default = fetch;
82482
+ exports.default = fetch;
82483
82483
  } (nodePonyfill, nodePonyfill.exports));
82484
82484
  return nodePonyfill.exports;
82485
82485
  }
@@ -84285,7 +84285,7 @@ async function channelsEnabled(optionals = {}) {
84285
84285
  * @param [optionals] Optional arguments; pass network call options overrides here.
84286
84286
  * @returns promise that resolves to the project object
84287
84287
  */
84288
- async function get$e(optionals = {}) {
84288
+ async function get$f(optionals = {}) {
84289
84289
  return await new Router().get('/project', optionals).then(({
84290
84290
  body
84291
84291
  }) => body);
@@ -84303,7 +84303,7 @@ async function get$e(optionals = {}) {
84303
84303
  * @param [optionals] Optional arguments; pass network call options overrides here.
84304
84304
  * @returns promise that resolves to an array of project objects
84305
84305
  */
84306
- async function list$4(accountShortName, optionals = {}) {
84306
+ async function list$5(accountShortName, optionals = {}) {
84307
84307
  return await new Router().withAccountShortName(accountShortName).withProjectShortName('manager').get('/project/in', optionals).then(({
84308
84308
  body
84309
84309
  }) => body);
@@ -84316,8 +84316,8 @@ var project = /*#__PURE__*/Object.freeze({
84316
84316
  PHYLOGENY: PHYLOGENY,
84317
84317
  WORKER_PARTITION: WORKER_PARTITION,
84318
84318
  channelsEnabled: channelsEnabled,
84319
- get: get$e,
84320
- list: list$4
84319
+ get: get$f,
84320
+ list: list$5
84321
84321
  });
84322
84322
 
84323
84323
  const AUTH_TOKEN_KEY = 'com.forio.epicenter.token';
@@ -84384,7 +84384,7 @@ class CometdAdapter {
84384
84384
  logLevel: 'warn'
84385
84385
  }) {
84386
84386
  var _project$channelProto;
84387
- const project = await get$e();
84387
+ const project = await get$f();
84388
84388
  if (!project.channelEnabled) throw new EpicenterError('Push Channels are not enabled on this project');
84389
84389
  const channelProtocol = ((_project$channelProto = project.channelProtocol) === null || _project$channelProto === void 0 ? void 0 : _project$channelProto.toLowerCase()) || DEFAULT_CHANNEL_PROTOCOL;
84390
84390
  const {
@@ -85204,7 +85204,7 @@ var authentication = /*#__PURE__*/Object.freeze({
85204
85204
  * @param [optionals.tokenAccessSeconds] How long the presigned URL is valid for in seconds
85205
85205
  * @returns promise that resolves to an asset ticket containing the presigned upload URL
85206
85206
  */
85207
- async function create$a(file, scope, optionals = {}) {
85207
+ async function create$c(file, scope, optionals = {}) {
85208
85208
  const {
85209
85209
  scopeBoundary,
85210
85210
  scopeKey,
@@ -85309,7 +85309,7 @@ async function update$6(file, scope, optionals = {}) {
85309
85309
  * @param [optionals] Optional arguments; pass network call options overrides here.
85310
85310
  * @returns promise that resolves when the asset is deleted
85311
85311
  */
85312
- async function remove$4(assetKey, optionals = {}) {
85312
+ async function remove$5(assetKey, optionals = {}) {
85313
85313
  return await new Router().delete(`/asset/${assetKey}`, optionals).then(({
85314
85314
  body
85315
85315
  }) => body);
@@ -85357,7 +85357,7 @@ async function removeFromScope(scope, optionals = {}) {
85357
85357
  * @param [optionals] Optional arguments; pass network call options overrides here.
85358
85358
  * @returns promise that resolves to the asset metadata
85359
85359
  */
85360
- async function get$d(assetKey, optionals = {}) {
85360
+ async function get$e(assetKey, optionals = {}) {
85361
85361
  const {
85362
85362
  server,
85363
85363
  accountShortName,
@@ -85393,7 +85393,7 @@ async function get$d(assetKey, optionals = {}) {
85393
85393
  * @param [optionals.filter] File pattern to filter assets (e.g., '*.pdf' for PDF files); defaults to '*' (all files)
85394
85394
  * @returns promise that resolves to a list of assets
85395
85395
  */
85396
- async function list$3(scope, optionals = {}) {
85396
+ async function list$4(scope, optionals = {}) {
85397
85397
  const {
85398
85398
  scopeBoundary,
85399
85399
  scopeKey,
@@ -85486,7 +85486,7 @@ async function getURLWithScope(file, scope, optionals = {}) {
85486
85486
  * @param [optionals.tokenAccessSeconds] How long the presigned URL is valid for in seconds
85487
85487
  * @returns promise that resolves when the download is complete
85488
85488
  */
85489
- async function download$1(assetKey, optionals = {}) {
85489
+ async function download$2(assetKey, optionals = {}) {
85490
85490
  const {
85491
85491
  tokenAccessSeconds,
85492
85492
  ...routingOptions
@@ -85574,7 +85574,7 @@ async function store(file, scope, optionals = {}) {
85574
85574
  const name = fileName !== null && fileName !== void 0 ? fileName : file.name;
85575
85575
  let presignedUrl = '';
85576
85576
  try {
85577
- const response = await create$a(name, scope, {
85577
+ const response = await create$c(name, scope, {
85578
85578
  inert: true,
85579
85579
  ...remaining
85580
85580
  });
@@ -85598,14 +85598,14 @@ async function store(file, scope, optionals = {}) {
85598
85598
 
85599
85599
  var asset = /*#__PURE__*/Object.freeze({
85600
85600
  __proto__: null,
85601
- create: create$a,
85602
- download: download$1,
85601
+ create: create$c,
85602
+ download: download$2,
85603
85603
  downloadWithScope: downloadWithScope,
85604
- get: get$d,
85604
+ get: get$e,
85605
85605
  getURL: getURL$1,
85606
85606
  getURLWithScope: getURLWithScope,
85607
- list: list$3,
85608
- remove: remove$4,
85607
+ list: list$4,
85608
+ remove: remove$5,
85609
85609
  removeFromScope: removeFromScope,
85610
85610
  store: store,
85611
85611
  update: update$6
@@ -85813,7 +85813,7 @@ var email = /*#__PURE__*/Object.freeze({
85813
85813
  * @param [optionals.category] Optional argument to allow for establishing episode hierarchies
85814
85814
  * @returns promise that resolves to the newly created episode
85815
85815
  */
85816
- async function create$9(name, groupName, optionals = {}) {
85816
+ async function create$b(name, groupName, optionals = {}) {
85817
85817
  const {
85818
85818
  draft,
85819
85819
  runLimit,
@@ -85845,7 +85845,7 @@ async function create$9(name, groupName, optionals = {}) {
85845
85845
  * @param [optionals] Optional arguments; pass network call options overrides here.
85846
85846
  * @returns promise that resolves to an episode
85847
85847
  */
85848
- async function get$c(episodeKey, optionals = {}) {
85848
+ async function get$d(episodeKey, optionals = {}) {
85849
85849
  return await new Router().get(`/episode/${episodeKey}`, optionals).then(({
85850
85850
  body
85851
85851
  }) => body);
@@ -85881,7 +85881,7 @@ async function get$c(episodeKey, optionals = {}) {
85881
85881
  * @param [optionals] Optional arguments; pass network call options overrides here.
85882
85882
  * @returns promise that resolves to a page of episodes
85883
85883
  */
85884
- async function query$4(searchOptions, optionals = {}) {
85884
+ async function query$5(searchOptions, optionals = {}) {
85885
85885
  const {
85886
85886
  filter,
85887
85887
  sort = [],
@@ -85955,7 +85955,7 @@ async function withName(name, optionals = {}) {
85955
85955
  * @param [optionals] Optional arguments; pass network call options overrides here.
85956
85956
  * @returns promise that resolves to undefined if successful
85957
85957
  */
85958
- async function remove$3(episodeKey, optionals = {}) {
85958
+ async function remove$4(episodeKey, optionals = {}) {
85959
85959
  return await new Router().delete(`/episode/${episodeKey}`, optionals).then(({
85960
85960
  body
85961
85961
  }) => body);
@@ -85963,11 +85963,11 @@ async function remove$3(episodeKey, optionals = {}) {
85963
85963
 
85964
85964
  var episode = /*#__PURE__*/Object.freeze({
85965
85965
  __proto__: null,
85966
- create: create$9,
85966
+ create: create$b,
85967
85967
  forGroup: forGroup$1,
85968
- get: get$c,
85969
- query: query$4,
85970
- remove: remove$3,
85968
+ get: get$d,
85969
+ query: query$5,
85970
+ remove: remove$4,
85971
85971
  withName: withName
85972
85972
  });
85973
85973
 
@@ -85990,7 +85990,7 @@ var episode = /*#__PURE__*/Object.freeze({
85990
85990
  * @param [optionals.groupKey] Group key; if omitted will attempt to use the group associated with the current session
85991
85991
  * @returns promise that resolves to a group
85992
85992
  */
85993
- async function get$b(optionals = {}) {
85993
+ async function get$c(optionals = {}) {
85994
85994
  const {
85995
85995
  groupKey,
85996
85996
  augment,
@@ -86140,7 +86140,7 @@ async function update$5(groupKey, update, optionals = {}) {
86140
86140
  * @param [optionals] Optional arguments; pass network call options overrides here.
86141
86141
  * @returns promise that resolves to the newly created group
86142
86142
  */
86143
- async function create$8(group, optionals = {}) {
86143
+ async function create$a(group, optionals = {}) {
86144
86144
  const {
86145
86145
  name,
86146
86146
  runLimit,
@@ -86207,7 +86207,7 @@ async function create$8(group, optionals = {}) {
86207
86207
  * @param [optionals] Optional arguments; pass network call options overrides here.
86208
86208
  * @returns promise that resolves to a page of groups
86209
86209
  */
86210
- async function query$3(searchOptions, optionals = {}) {
86210
+ async function query$4(searchOptions, optionals = {}) {
86211
86211
  const {
86212
86212
  filter,
86213
86213
  sort = [],
@@ -86246,7 +86246,7 @@ async function search(optionals = {}) {
86246
86246
  max,
86247
86247
  quantized
86248
86248
  };
86249
- return await query$3(searchOptions, routingOptions);
86249
+ return await query$4(searchOptions, routingOptions);
86250
86250
  }
86251
86251
 
86252
86252
  /**
@@ -86619,14 +86619,14 @@ async function statusUpdate(code, message, optionals = {}) {
86619
86619
  var group = /*#__PURE__*/Object.freeze({
86620
86620
  __proto__: null,
86621
86621
  addUser: addUser$1,
86622
- create: create$8,
86622
+ create: create$a,
86623
86623
  destroy: destroy$2,
86624
86624
  forUser: forUser,
86625
86625
  gather: gather,
86626
- get: get$b,
86626
+ get: get$c,
86627
86627
  getSessionGroups: getSessionGroups,
86628
86628
  getWhitelistedUsers: getWhitelistedUsers,
86629
- query: query$3,
86629
+ query: query$4,
86630
86630
  removeUser: removeUser,
86631
86631
  search: search,
86632
86632
  selfRegister: selfRegister,
@@ -86725,7 +86725,7 @@ async function update$4(collection, scope, scores, optionals = {}) {
86725
86725
  * @param [optionals] Optional arguments; pass network call options overrides here.
86726
86726
  * @returns promise that resolves to a list of leaderboard entries
86727
86727
  */
86728
- async function list$2(collection, scope, searchOptions, optionals = {}) {
86728
+ async function list$3(collection, scope, searchOptions, optionals = {}) {
86729
86729
  const {
86730
86730
  scopeBoundary,
86731
86731
  scopeKey
@@ -86746,9 +86746,9 @@ async function list$2(collection, scope, searchOptions, optionals = {}) {
86746
86746
  body
86747
86747
  }) => body);
86748
86748
  }
86749
- async function get$a(collection, scope, searchOptions, optionals = {}) {
86749
+ async function get$b(collection, scope, searchOptions, optionals = {}) {
86750
86750
  console.warn('DEPRECATION WARNING: leaderboardAdapter.get is deprecated and will be removed with the next release. Use leaderboardAdapter.list instead.');
86751
- return await list$2(collection, scope, searchOptions, optionals);
86751
+ return await list$3(collection, scope, searchOptions, optionals);
86752
86752
  }
86753
86753
 
86754
86754
  /**
@@ -86794,9 +86794,9 @@ async function getCount(collection, scope, searchOptions, optionals = {}) {
86794
86794
 
86795
86795
  var leaderboard = /*#__PURE__*/Object.freeze({
86796
86796
  __proto__: null,
86797
- get: get$a,
86797
+ get: get$b,
86798
86798
  getCount: getCount,
86799
- list: list$2,
86799
+ list: list$3,
86800
86800
  update: update$4
86801
86801
  });
86802
86802
 
@@ -86945,7 +86945,7 @@ let MORPHOLOGY = /*#__PURE__*/function (MORPHOLOGY) {
86945
86945
  * @param [optionals.allowChannel] Opt into push notifications for this resource. Applicable to projects with phylogeny >= SILENT
86946
86946
  * @returns promise that resolves to the newly created run
86947
86947
  */
86948
- async function create$7(model, scope, optionals = {}) {
86948
+ async function create$9(model, scope, optionals = {}) {
86949
86949
  const {
86950
86950
  scopeBoundary,
86951
86951
  scopeKey,
@@ -87236,7 +87236,7 @@ async function update$3(runKey, update, optionals = {}) {
87236
87236
  * @param [optionals] Optional arguments; pass network call options overrides here.
87237
87237
  * @returns promise that resolve to undefined if successful
87238
87238
  */
87239
- async function remove$2(runKey, optionals = {}) {
87239
+ async function remove$3(runKey, optionals = {}) {
87240
87240
  return await new Router().delete(`/run/${runKey}`, optionals).then(({
87241
87241
  body
87242
87242
  }) => body);
@@ -87254,7 +87254,7 @@ async function remove$2(runKey, optionals = {}) {
87254
87254
  * @param [optionals] Optional arguments; pass network call options overrides here.
87255
87255
  * @returns promise that resolves to the run
87256
87256
  */
87257
- async function get$9(runKey, optionals = {}) {
87257
+ async function get$a(runKey, optionals = {}) {
87258
87258
  return await new Router().get(`/run/${runKey}`, optionals).then(({
87259
87259
  body
87260
87260
  }) => body);
@@ -87296,7 +87296,7 @@ async function get$9(runKey, optionals = {}) {
87296
87296
  * @param [optionals] Optional arguments; pass network call options overrides here.
87297
87297
  * @returns promise that resolves to a page of runs
87298
87298
  */
87299
- async function query$2(model, searchOptions, optionals = {}) {
87299
+ async function query$3(model, searchOptions, optionals = {}) {
87300
87300
  const {
87301
87301
  filter,
87302
87302
  sort = [],
@@ -87853,15 +87853,15 @@ async function getWithStrategy(strategy, model, scope, optionals = {}) {
87853
87853
  };
87854
87854
  const {
87855
87855
  values: [lastRun]
87856
- } = await query$2(model, searchOptions);
87856
+ } = await query$3(model, searchOptions);
87857
87857
  if (!lastRun) {
87858
- const newRun = await create$7(model, scope, optionals);
87858
+ const newRun = await create$9(model, scope, optionals);
87859
87859
  // await serial(newRun.runKey, initOperations, optionals = {});
87860
87860
  return newRun;
87861
87861
  }
87862
87862
  return lastRun;
87863
87863
  } else if (strategy === 'reuse-never') {
87864
- const newRun = await create$7(model, scope, optionals);
87864
+ const newRun = await create$9(model, scope, optionals);
87865
87865
  // await serial(newRun.runKey, initOperations, optionals = {});
87866
87866
  return newRun;
87867
87867
  } else ;
@@ -87914,9 +87914,9 @@ var run = /*#__PURE__*/Object.freeze({
87914
87914
  MORPHOLOGY: MORPHOLOGY,
87915
87915
  action: action,
87916
87916
  clone: clone,
87917
- create: create$7,
87917
+ create: create$9,
87918
87918
  createSingular: createSingular,
87919
- get: get$9,
87919
+ get: get$a,
87920
87920
  getMetadata: getMetadata,
87921
87921
  getSingularRunKey: getSingularRunKey,
87922
87922
  getVariable: getVariable,
@@ -87926,8 +87926,8 @@ var run = /*#__PURE__*/Object.freeze({
87926
87926
  introspectWithRunKey: introspectWithRunKey,
87927
87927
  migrate: migrate,
87928
87928
  operation: operation,
87929
- query: query$2,
87930
- remove: remove$2,
87929
+ query: query$3,
87930
+ remove: remove$3,
87931
87931
  removeFromWorld: removeFromWorld,
87932
87932
  restore: restore,
87933
87933
  retrieveFromWorld: retrieveFromWorld,
@@ -88009,7 +88009,7 @@ async function createUser(view, optionals = {}) {
88009
88009
  * @param [optionals] Optional arguments; pass network call options overrides here.
88010
88010
  * @returns promise that resolves to a user
88011
88011
  */
88012
- async function get$8(userKey, optionals = {}) {
88012
+ async function get$9(userKey, optionals = {}) {
88013
88013
  return await new Router().get(`/user/${userKey}`, optionals).then(({
88014
88014
  body
88015
88015
  }) => body);
@@ -88042,7 +88042,7 @@ async function getWithHandle(handle, optionals = {}) {
88042
88042
  var user = /*#__PURE__*/Object.freeze({
88043
88043
  __proto__: null,
88044
88044
  createUser: createUser,
88045
- get: get$8,
88045
+ get: get$9,
88046
88046
  getWithHandle: getWithHandle,
88047
88047
  uploadCSV: uploadCSV
88048
88048
  });
@@ -88133,7 +88133,7 @@ const NOT_FOUND$4 = 404;
88133
88133
  * @param [optionals] Optional arguments; pass network call options overrides here.
88134
88134
  * @returns promise that resolves to the vault, or undefined if not found
88135
88135
  */
88136
- async function get$7(vaultKey, optionals = {}) {
88136
+ async function get$8(vaultKey, optionals = {}) {
88137
88137
  return await new Router().get(`/vault/${vaultKey}`, optionals).catch(error => {
88138
88138
  if (error.status === NOT_FOUND$4) return {
88139
88139
  body: undefined
@@ -88233,7 +88233,7 @@ async function byName$1(name, optionals = {}) {
88233
88233
  * @param [optionals.mutationKey] Mutation key for optimistic concurrency control
88234
88234
  * @returns promise that resolves to undefined when successful
88235
88235
  */
88236
- async function remove$1(vaultKey, optionals = {}) {
88236
+ async function remove$2(vaultKey, optionals = {}) {
88237
88237
  const {
88238
88238
  mutationKey,
88239
88239
  ...routingOptions
@@ -88348,7 +88348,7 @@ async function define(name, scope, optionals = {}) {
88348
88348
  * @param [optionals.mutationStrategy] Mutation strategy: ALLOW (upsert), DISALLOW (insert without update), ERROR (insert with conflict exception if exists)
88349
88349
  * @returns promise that resolves to the created vault
88350
88350
  */
88351
- async function create$6(name, scope, items, optionals = {}) {
88351
+ async function create$8(name, scope, items, optionals = {}) {
88352
88352
  console.warn('DEPRECATION WARNING: vaultAdapter.create is deprecated and will be removed with the next release. Use vaultAdapter.define instead.');
88353
88353
  return await define(name, scope, {
88354
88354
  items,
@@ -88380,7 +88380,7 @@ async function create$6(name, scope, items, optionals = {}) {
88380
88380
  * @param [optionals.groupName] Name of the group
88381
88381
  * @returns promise that resolves to an array of vaults that match the search options
88382
88382
  */
88383
- async function list$1(searchOptions, optionals = {}) {
88383
+ async function list$2(searchOptions, optionals = {}) {
88384
88384
  const {
88385
88385
  first,
88386
88386
  filter,
@@ -88445,11 +88445,11 @@ var vault = /*#__PURE__*/Object.freeze({
88445
88445
  __proto__: null,
88446
88446
  byName: byName$1,
88447
88447
  count: count,
88448
- create: create$6,
88448
+ create: create$8,
88449
88449
  define: define,
88450
- get: get$7,
88451
- list: list$1,
88452
- remove: remove$1,
88450
+ get: get$8,
88451
+ list: list$2,
88452
+ remove: remove$2,
88453
88453
  update: update$2,
88454
88454
  updateProperties: updateProperties,
88455
88455
  withScope: withScope$1
@@ -88774,7 +88774,7 @@ var video$1 = /*#__PURE__*/Object.freeze({
88774
88774
  * @param [optionals] Optional arguments; pass network call options overrides here.
88775
88775
  * @returns promise that resolves to undefined when successful
88776
88776
  */
88777
- async function remove(videoKey, optionals = {}) {
88777
+ async function remove$1(videoKey, optionals = {}) {
88778
88778
  return deleteVideoByKey(videoKey, optionals);
88779
88779
  }
88780
88780
 
@@ -88799,7 +88799,7 @@ async function remove(videoKey, optionals = {}) {
88799
88799
  * @param [optionals] Optional arguments; pass network call options overrides here.
88800
88800
  * @returns promise that resolves to a page of video objects
88801
88801
  */
88802
- async function query$1(searchOptions, optionals = {}) {
88802
+ async function query$2(searchOptions, optionals = {}) {
88803
88803
  const {
88804
88804
  filter,
88805
88805
  sort = [],
@@ -88989,7 +88989,7 @@ async function processVideo(videoKey, processors, optionals = {}) {
88989
88989
  * @param [optionals.videoKey] Key for the video object
88990
88990
  * @returns promise that resolves to undefined when download is complete
88991
88991
  */
88992
- async function download(file, optionals = {}) {
88992
+ async function download$1(file, optionals = {}) {
88993
88993
  const {
88994
88994
  scope,
88995
88995
  affiliate,
@@ -89008,12 +89008,12 @@ async function download(file, optionals = {}) {
89008
89008
 
89009
89009
  var video = /*#__PURE__*/Object.freeze({
89010
89010
  __proto__: null,
89011
- download: download,
89011
+ download: download$1,
89012
89012
  getDirectoryURL: getDirectoryURL,
89013
89013
  getURL: getURL,
89014
89014
  processVideo: processVideo,
89015
- query: query$1,
89016
- remove: remove
89015
+ query: query$2,
89016
+ remove: remove$1
89017
89017
  });
89018
89018
 
89019
89019
  /**
@@ -89360,7 +89360,7 @@ async function destroy$1(worldKey, optionals = {}) {
89360
89360
  * @param [optionals.allowChannel] Opt into push notifications for this resource. Applicable to projects with phylogeny >= SILENT
89361
89361
  * @returns promise that resolves to the newly created world
89362
89362
  */
89363
- async function create$5(optionals = {}) {
89363
+ async function create$7(optionals = {}) {
89364
89364
  const {
89365
89365
  name,
89366
89366
  displayName,
@@ -89402,7 +89402,7 @@ async function create$5(optionals = {}) {
89402
89402
  * @param [optionals.mine] Flag for indicating to get only the worlds the requesting user is in (based on session token)
89403
89403
  * @returns promise that resolves to a list of worlds
89404
89404
  */
89405
- async function get$6(optionals = {}) {
89405
+ async function get$7(optionals = {}) {
89406
89406
  const {
89407
89407
  groupName,
89408
89408
  episodeName,
@@ -89783,10 +89783,10 @@ var world = /*#__PURE__*/Object.freeze({
89783
89783
  WORLD_NAME_GENERATOR_TYPE: WORLD_NAME_GENERATOR_TYPE,
89784
89784
  assignRun: assignRun,
89785
89785
  autoAssignUsers: autoAssignUsers,
89786
- create: create$5,
89786
+ create: create$7,
89787
89787
  destroy: destroy$1,
89788
89788
  editAssignments: editAssignments,
89789
- get: get$6,
89789
+ get: get$7,
89790
89790
  getAssignments: getAssignments,
89791
89791
  getAssignmentsByKey: getAssignmentsByKey,
89792
89792
  getPersonas: getPersonas,
@@ -89811,7 +89811,7 @@ var world = /*#__PURE__*/Object.freeze({
89811
89811
  * @returns promise that resolves to the current server time in ISO 8601 format, or undefined if not found
89812
89812
  */
89813
89813
  const NOT_FOUND$3 = 404;
89814
- async function get$5(optionals = {}) {
89814
+ async function get$6(optionals = {}) {
89815
89815
  return await new Router().get('/time', optionals).catch(error => {
89816
89816
  if (error.status === NOT_FOUND$3) return {
89817
89817
  body: undefined
@@ -89824,15 +89824,13 @@ async function get$5(optionals = {}) {
89824
89824
 
89825
89825
  var time = /*#__PURE__*/Object.freeze({
89826
89826
  __proto__: null,
89827
- get: get$5
89827
+ get: get$6
89828
89828
  });
89829
89829
 
89830
89830
  let RETRY_POLICY = /*#__PURE__*/function (RETRY_POLICY) {
89831
89831
  RETRY_POLICY["DO_NOTHING"] = "DO_NOTHING";
89832
89832
  // If the task fails, do nothing (this is the default)
89833
- RETRY_POLICY["RESCHEDULE"] = "RESCHEDULE";
89834
- // If the task fails retry at the next scheduled time point
89835
- RETRY_POLICY["FIRE_ON_FAIL_SAFE"] = "FIRE_ON_FAIL_SAFE"; // Will re-execute the task after it fails; how long until this occurs is equal to ttlSeconds
89833
+ RETRY_POLICY["FIRE_ON_FAIL_SAFE"] = "FIRE_ON_FAIL_SAFE"; // Retry within the task's fail-safe execution window
89836
89834
  return RETRY_POLICY;
89837
89835
  }({});
89838
89836
 
@@ -89849,7 +89847,7 @@ let RETRY_POLICY = /*#__PURE__*/function (RETRY_POLICY) {
89849
89847
  // Task response structure
89850
89848
 
89851
89849
  /**
89852
- * Creates a task; requires support level authentication
89850
+ * Creates a task; requires facilitator (or higher) privileges
89853
89851
  * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/task`
89854
89852
  *
89855
89853
  * @example
@@ -89861,7 +89859,9 @@ let RETRY_POLICY = /*#__PURE__*/function (RETRY_POLICY) {
89861
89859
  * const name = 'task-1-send-emails';
89862
89860
  * const payload = {
89863
89861
  * method: 'POST',
89864
- * url: 'https://forio.com/app/forio-dev/test-project/send-out-emails',
89862
+ * url: '/send-out-emails',
89863
+ * target: 'PROXY', // fire at the project's proxy server; omit to fire at the app
89864
+ * body: {},
89865
89865
  * };
89866
89866
  * const trigger = {
89867
89867
  * value: '0 7 15 * * ?', // triggers on day 15 7am of each month
@@ -89874,11 +89874,13 @@ let RETRY_POLICY = /*#__PURE__*/function (RETRY_POLICY) {
89874
89874
  * @param scope.scopeKey Scope key, a unique identifier tied to the scope. E.g., if your `scopeBoundary` is `GROUP`, your `scopeKey` will be your `groupKey`; for `EPISODE`, `episodeKey`, etc.
89875
89875
  * @param [scope.userKey] Key associated with the user
89876
89876
  * @param name Name of the task
89877
- * @param payload An HTTP task object that will be executed when the task is triggered
89878
- * @param payload.method Type of method to use with the HTTP request (e.g., 'GET', 'POST', 'PATCH')
89879
- * @param payload.url The URL the HTTP request will be sent to
89880
- * @param [payload.body] The body of the HTTP request
89881
- * @param [payload.headers] Headers to send along with the HTTP request
89877
+ * @param payload An HTTP request or group-status change to execute when the task is triggered
89878
+ * @param payload.method Type of method to use with the HTTP request (e.g., 'GET', 'POST')
89879
+ * @param payload.url Relative URL the HTTP request will be sent to; the task runner builds the full URL as `{host}{targetPath}/{account}/{project}{url}`
89880
+ * @param [payload.target] Where the task fires: 'APPLICATION' (the project app, `/app`, the default) or 'PROXY' (the project's proxy server, `/proxy`)
89881
+ * @param payload.body The JSON body of the HTTP request
89882
+ * @param [payload.headers] Headers to send along with the HTTP request; must be non-empty when provided — omit rather than pass an empty object
89883
+ * @param [payload.timeoutSeconds] Request timeout in seconds (1–30)
89882
89884
  * @param trigger Object that determines when to run the task (cron, offset, or date)
89883
89885
  * @param [trigger.value] For cron: cron expression (e.g., '0 7 * * * ?'). For date: ISO-8601 date-time string
89884
89886
  * @param [trigger.objectType] Type of trigger: 'cron', 'offset', or 'date'
@@ -89889,23 +89891,24 @@ let RETRY_POLICY = /*#__PURE__*/function (RETRY_POLICY) {
89889
89891
  * @param [optionals.accountShortName] Name of account (by default will be the account associated with the session)
89890
89892
  * @param [optionals.projectShortName] Name of project (by default will be the project associated with the session)
89891
89893
  * @param [optionals.retryPolicy] Specifies what to do should the task fail; see RETRY_POLICY
89892
- * @param [optionals.failSafeTermination] The ISO-8601 date-time when the task will be deleted regardless of any triggers; defaults to null
89893
- * @param [optionals.ttlSeconds] Max life expectancy of the task; used to determine if retrying the task is necessary
89894
+ * @param [optionals.failSafeTermination] ISO-8601 deadline after which the task terminates; the server defaults and caps this at one year from creation
89895
+ * @param [optionals.ttlSeconds] Execution fail-safe window in seconds; the server applies its configured minimum
89894
89896
  * @returns promise that resolves to the task object including the taskKey
89895
89897
  */
89896
- async function create$4(scope, name, payload, trigger, optionals = {}) {
89898
+ async function create$6(scope, name, payload, trigger, optionals = {}) {
89897
89899
  const {
89898
89900
  retryPolicy,
89899
89901
  failSafeTermination,
89900
89902
  ttlSeconds,
89901
89903
  ...routingOptions
89902
89904
  } = optionals;
89905
+ const normalizedPayload = payload.objectType === 'groupStatus' ? payload : {
89906
+ ...payload,
89907
+ objectType: 'http'
89908
+ };
89903
89909
  return await new Router().post('/task', {
89904
89910
  body: {
89905
- payload: {
89906
- objectType: 'http',
89907
- ...payload
89908
- },
89911
+ payload: normalizedPayload,
89909
89912
  trigger,
89910
89913
  retryPolicy,
89911
89914
  failSafeTermination,
@@ -89920,7 +89923,7 @@ async function create$4(scope, name, payload, trigger, optionals = {}) {
89920
89923
  }
89921
89924
 
89922
89925
  /**
89923
- * Deletes a task (changes status to cancelled); requires support level authentication
89926
+ * Deletes a task (changes status to cancelled); requires facilitator (or higher) privileges
89924
89927
  * Base URL: DELETE `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/task/{TASK_KEY}`
89925
89928
  *
89926
89929
  * @example
@@ -89929,7 +89932,7 @@ async function create$4(scope, name, payload, trigger, optionals = {}) {
89929
89932
  * await taskAdapter.destroy(taskKey);
89930
89933
  *
89931
89934
  * @param taskKey Unique key associated with a task
89932
- * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
89935
+ * @param [optionals] Optional arguments; pass network call options overrides here.
89933
89936
  * @param [optionals.accountShortName] Name of account (by default will be the account associated with the session)
89934
89937
  * @param [optionals.projectShortName] Name of project (by default will be the project associated with the session)
89935
89938
  * @returns promise that resolves to undefined when successful
@@ -89941,7 +89944,7 @@ async function destroy(taskKey, optionals = {}) {
89941
89944
  }
89942
89945
 
89943
89946
  /**
89944
- * Gets a task by taskKey; requires support level authentication
89947
+ * Gets a task by taskKey; requires facilitator (or higher) privileges
89945
89948
  * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/task/{TASK_KEY}`
89946
89949
  *
89947
89950
  * @example
@@ -89950,19 +89953,19 @@ async function destroy(taskKey, optionals = {}) {
89950
89953
  * const task = await taskAdapter.get(taskKey);
89951
89954
  *
89952
89955
  * @param taskKey Unique key associated with a task
89953
- * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
89956
+ * @param [optionals] Optional arguments; pass network call options overrides here.
89954
89957
  * @param [optionals.accountShortName] Name of account (by default will be the account associated with the session)
89955
89958
  * @param [optionals.projectShortName] Name of project (by default will be the project associated with the session)
89956
89959
  * @returns promise that resolves to the task object
89957
89960
  */
89958
- async function get$4(taskKey, optionals = {}) {
89961
+ async function get$5(taskKey, optionals = {}) {
89959
89962
  return await new Router().get(`/task/${taskKey}`, optionals).then(({
89960
89963
  body
89961
89964
  }) => body);
89962
89965
  }
89963
89966
 
89964
89967
  /**
89965
- * Gets the history (100 most recent times it has triggered) of a task by taskKey; requires support level authentication
89968
+ * Gets the history (100 most recent times it has triggered) of a task by taskKey; requires facilitator (or higher) privileges
89966
89969
  * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/task/history/{TASK_KEY}`
89967
89970
  *
89968
89971
  * @example
@@ -89971,19 +89974,32 @@ async function get$4(taskKey, optionals = {}) {
89971
89974
  * const history = await taskAdapter.getHistory(taskKey);
89972
89975
  *
89973
89976
  * @param taskKey Unique key associated with a task
89974
- * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
89977
+ * @param [optionals] Pagination and network options
89978
+ * @param [optionals.first] Zero-based index of the first history record; defaults to 0
89979
+ * @param [optionals.max] Maximum history records to return; defaults to 100 and cannot exceed 100
89975
89980
  * @param [optionals.accountShortName] Name of account (by default will be the account associated with the session)
89976
89981
  * @param [optionals.projectShortName] Name of project (by default will be the project associated with the session)
89977
- * @returns promise that resolves to an array of task history objects
89982
+ * @returns promise that resolves to a page of task history objects
89978
89983
  */
89979
89984
  async function getHistory(taskKey, optionals = {}) {
89980
- return await new Router().get(`/task/history/${taskKey}`, optionals).then(({
89985
+ const {
89986
+ first,
89987
+ max,
89988
+ ...routingOptions
89989
+ } = optionals;
89990
+ return await new Router().withSearchParams({
89991
+ first,
89992
+ max
89993
+ }).get(`/task/history/${taskKey}`, {
89994
+ paginated: true,
89995
+ ...routingOptions
89996
+ }).then(({
89981
89997
  body
89982
89998
  }) => body);
89983
89999
  }
89984
90000
 
89985
90001
  /**
89986
- * Gets most recent 100 tasks related to the selected scope; requires support level authentication
90002
+ * Gets most recent 100 tasks related to the selected scope; requires facilitator (or higher) privileges
89987
90003
  * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/task/in/{SCOPE_BOUNDARY}/{SCOPE_KEY}` or GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/task/in/{SCOPE_BOUNDARY}/{SCOPE_KEY}/{USER_KEY}`
89988
90004
  *
89989
90005
  * Note: Will retrieve all tasks that were CREATED in the specified scope. If something was created with episode scope, it will not be retrievable through group scoping.
@@ -90000,10 +90016,13 @@ async function getHistory(taskKey, optionals = {}) {
90000
90016
  * @param scope.scopeBoundary Scope boundary, defines the type of scope; See [scope boundary](#SCOPE_BOUNDARY) for all types
90001
90017
  * @param scope.scopeKey Scope key, a unique identifier tied to the scope. E.g., if your `scopeBoundary` is `GROUP`, your `scopeKey` will be your `groupKey`; for `EPISODE`, `episodeKey`, etc.
90002
90018
  * @param [scope.userKey] Key associated with the user; will retrieve tasks in the scope that were made by the specified user
90003
- * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
90019
+ * @param [optionals] Pagination, sorting, and network options
90020
+ * @param [optionals.sort] Task fields to sort by
90021
+ * @param [optionals.first] Zero-based index of the first task; defaults to 0
90022
+ * @param [optionals.max] Maximum tasks to return; defaults to 100 and cannot exceed 100
90004
90023
  * @param [optionals.accountShortName] Name of account (by default will be the account associated with the session)
90005
90024
  * @param [optionals.projectShortName] Name of project (by default will be the project associated with the session)
90006
- * @returns promise that resolves to an array of task objects
90025
+ * @returns promise that resolves to a page of task objects
90007
90026
  */
90008
90027
  async function getTaskIn(scope, optionals = {}) {
90009
90028
  const {
@@ -90011,7 +90030,70 @@ async function getTaskIn(scope, optionals = {}) {
90011
90030
  scopeKey,
90012
90031
  userKey
90013
90032
  } = scope;
90014
- return await new Router().get(`/task/in/${scopeBoundary}/${scopeKey}${userKey ? `/${userKey}` : ''}`, optionals).then(({
90033
+ const {
90034
+ sort = [],
90035
+ first,
90036
+ max,
90037
+ ...routingOptions
90038
+ } = optionals;
90039
+ return await new Router().withSearchParams({
90040
+ sort: sort.join(';') || undefined,
90041
+ first,
90042
+ max
90043
+ }).get(`/task/in/${scopeBoundary}/${scopeKey}${userKey ? `/${userKey}` : ''}`, {
90044
+ paginated: true,
90045
+ ...routingOptions
90046
+ }).then(({
90047
+ body
90048
+ }) => body);
90049
+ }
90050
+
90051
+ /**
90052
+ * Queries for tasks
90053
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/task/search`
90054
+ *
90055
+ * No authentication is required; results use facilitator-level row visibility.
90056
+ * Filterable/sortable fields include
90057
+ * `task.taskKey`, `task.name`, `task.status`, `task.scopeBoundary`, `task.scopeKey`,
90058
+ * `task.userKey`, `task.groupName`, `task.episodeName`, `task.nextExecution`,
90059
+ * `task.failSafeExecution`, and `task.created`.
90060
+ *
90061
+ * @example
90062
+ * import { taskAdapter } from 'epicenter-libs';
90063
+ * const page = await taskAdapter.query({
90064
+ * filter: [
90065
+ * 'task.scopeKey=0000017dd3bf540e5ada5b1e058f08f20461', // tasks scoped to this group
90066
+ * 'task.status=INITIALIZED', // that have not yet fired
90067
+ * ],
90068
+ * sort: ['-task.created'], // newest first
90069
+ * max: 10, // page should only include the first 10 items
90070
+ * });
90071
+ *
90072
+ * @param searchOptions Search options for the query
90073
+ * @param [searchOptions.filter] Filters for searching
90074
+ * @param [searchOptions.sort] Sorting criteria
90075
+ * @param [searchOptions.first] The starting index of the page returned
90076
+ * @param [searchOptions.max] The number of entries per page
90077
+ * @param [optionals] Optional arguments; pass network call options overrides here.
90078
+ * @returns promise that resolves to a page of tasks
90079
+ */
90080
+ async function query$1(searchOptions, optionals = {}) {
90081
+ const {
90082
+ filter,
90083
+ sort = [],
90084
+ first,
90085
+ max
90086
+ } = searchOptions;
90087
+ const searchParams = {
90088
+ filter: parseFilterInput(filter),
90089
+ sort: sort.join(';') || undefined,
90090
+ first,
90091
+ max
90092
+ };
90093
+ return await new Router().withSearchParams(searchParams).get('/task/search', {
90094
+ paginated: true,
90095
+ ...optionals
90096
+ }).then(({
90015
90097
  body
90016
90098
  }) => body);
90017
90099
  }
@@ -90019,11 +90101,12 @@ async function getTaskIn(scope, optionals = {}) {
90019
90101
  var task = /*#__PURE__*/Object.freeze({
90020
90102
  __proto__: null,
90021
90103
  RETRY_POLICY: RETRY_POLICY,
90022
- create: create$4,
90104
+ create: create$6,
90023
90105
  destroy: destroy,
90024
- get: get$4,
90106
+ get: get$5,
90025
90107
  getHistory: getHistory,
90026
- getTaskIn: getTaskIn
90108
+ getTaskIn: getTaskIn,
90109
+ query: query$1
90027
90110
  });
90028
90111
 
90029
90112
  /**
@@ -90075,7 +90158,7 @@ async function updatePermit(chatKey, permit, optionals = {}) {
90075
90158
  * @param [optionals] Optional arguments; pass network call options overrides here.
90076
90159
  * @returns promise that resolves to the newly created chat
90077
90160
  */
90078
- async function create$3(room, scope, permit, optionals = {}) {
90161
+ async function create$5(room, scope, permit, optionals = {}) {
90079
90162
  return new Router().post('/chat', {
90080
90163
  body: {
90081
90164
  scope: {
@@ -90103,7 +90186,7 @@ async function create$3(room, scope, permit, optionals = {}) {
90103
90186
  * @param [optionals] Optional arguments; pass network call options overrides here.
90104
90187
  * @returns promise that resolves to the chat
90105
90188
  */
90106
- async function get$3(chatKey, optionals = {}) {
90189
+ async function get$4(chatKey, optionals = {}) {
90107
90190
  return new Router().get(`/chat/${chatKey}`, optionals).then(({
90108
90191
  body
90109
90192
  }) => body);
@@ -90319,8 +90402,8 @@ async function sendMessageAdmin(chatKey, message, optionals = {}) {
90319
90402
 
90320
90403
  var chat = /*#__PURE__*/Object.freeze({
90321
90404
  __proto__: null,
90322
- create: create$3,
90323
- get: get$3,
90405
+ create: create$5,
90406
+ get: get$4,
90324
90407
  getMessages: getMessages,
90325
90408
  getMessagesAdmin: getMessagesAdmin,
90326
90409
  getMessagesForUser: getMessagesForUser,
@@ -90363,7 +90446,7 @@ var chat = /*#__PURE__*/Object.freeze({
90363
90446
  * @param [optionals.allowChannel] Opt into push notifications for this resource. Applicable to projects with phylogeny >= SILENT
90364
90447
  * @returns promise that resolves to the newly created consensus barrier
90365
90448
  */
90366
- async function create$2(worldKey, name, stage, expectedRoles, defaultActions, optionals = {}) {
90449
+ async function create$4(worldKey, name, stage, expectedRoles, defaultActions, optionals = {}) {
90367
90450
  const {
90368
90451
  ttlSeconds,
90369
90452
  transparent = false,
@@ -90417,7 +90500,7 @@ async function load(worldKey, name, stage, optionals = {}) {
90417
90500
  * @param [optionals] Optional arguments; pass network call options overrides here.
90418
90501
  * @returns promise that resolves to a list of consensus barriers
90419
90502
  */
90420
- async function list(worldKey, name, optionals = {}) {
90503
+ async function list$1(worldKey, name, optionals = {}) {
90421
90504
  return await new Router().get(`/consensus/${worldKey}/${name}`, optionals).then(({
90422
90505
  body
90423
90506
  }) => body);
@@ -90810,11 +90893,11 @@ async function collectInGroup(barrierMap, groupName, optionals = {}) {
90810
90893
  var consensus = /*#__PURE__*/Object.freeze({
90811
90894
  __proto__: null,
90812
90895
  collectInGroup: collectInGroup,
90813
- create: create$2,
90896
+ create: create$4,
90814
90897
  deleteAll: deleteAll,
90815
90898
  deleteBarrier: deleteBarrier,
90816
90899
  forceClose: forceClose,
90817
- list: list,
90900
+ list: list$1,
90818
90901
  load: load,
90819
90902
  pause: pause,
90820
90903
  removeRoleExpectationFor: removeRoleExpectationFor,
@@ -90852,7 +90935,7 @@ var consensus = /*#__PURE__*/Object.freeze({
90852
90935
  * @returns promise that resolves to the newly created somebody object
90853
90936
  */
90854
90937
 
90855
- async function create$1(email, scope, optionals = {}) {
90938
+ async function create$3(email, scope, optionals = {}) {
90856
90939
  const {
90857
90940
  givenName,
90858
90941
  familyName,
@@ -90885,7 +90968,7 @@ async function create$1(email, scope, optionals = {}) {
90885
90968
  * @returns promise that resolves to the somebody object, or undefined if not found
90886
90969
  */
90887
90970
  const NOT_FOUND$2 = 404;
90888
- async function get$2(somebodyKey, optionals = {}) {
90971
+ async function get$3(somebodyKey, optionals = {}) {
90889
90972
  return await new Router().get(`/somebody/${somebodyKey}`, optionals).catch(error => {
90890
90973
  if (error.status === NOT_FOUND$2) return {
90891
90974
  body: undefined
@@ -90980,8 +91063,8 @@ async function byEmail(email, scope, optionals = {}) {
90980
91063
  var somebody = /*#__PURE__*/Object.freeze({
90981
91064
  __proto__: null,
90982
91065
  byEmail: byEmail,
90983
- create: create$1,
90984
- get: get$2,
91066
+ create: create$3,
91067
+ get: get$3,
90985
91068
  inScope: inScope
90986
91069
  });
90987
91070
 
@@ -91004,7 +91087,7 @@ var somebody = /*#__PURE__*/Object.freeze({
91004
91087
  * @param [optionals] Optional arguments; pass network call options overrides here.
91005
91088
  * @returns promise that resolves to the matchmaker list object
91006
91089
  */
91007
- async function create(name, partners, scope, optionals = {}) {
91090
+ async function create$2(name, partners, scope, optionals = {}) {
91008
91091
  const {
91009
91092
  accountShortName,
91010
91093
  projectShortName,
@@ -91087,7 +91170,7 @@ const NOT_FOUND$1 = 404;
91087
91170
  * @param [optionals] Optional arguments; pass network call options overrides here.
91088
91171
  * @returns promise that resolves to the matchmaker list object, or undefined if not found
91089
91172
  */
91090
- async function get$1(udomeKey, optionals = {}) {
91173
+ async function get$2(udomeKey, optionals = {}) {
91091
91174
  const {
91092
91175
  accountShortName,
91093
91176
  projectShortName,
@@ -91145,9 +91228,9 @@ var matchmaker = /*#__PURE__*/Object.freeze({
91145
91228
  __proto__: null,
91146
91229
  addUser: addUser,
91147
91230
  byName: byName,
91148
- create: create,
91231
+ create: create$2,
91149
91232
  edit: edit,
91150
- get: get$1
91233
+ get: get$2
91151
91234
  });
91152
91235
 
91153
91236
  const sleep = ms => new Promise(r => setTimeout(r, ms));
@@ -91451,7 +91534,7 @@ const NOT_FOUND = 404;
91451
91534
  * @param [optionals] Optional arguments; pass network call options overrides here.
91452
91535
  * @returns promise that resolves to the wallet
91453
91536
  */
91454
- async function get(scope, optionals = {}) {
91537
+ async function get$1(scope, optionals = {}) {
91455
91538
  const {
91456
91539
  scopeBoundary,
91457
91540
  scopeKey
@@ -91518,11 +91601,922 @@ async function withScope(scope, optionals = {}) {
91518
91601
 
91519
91602
  var wallet = /*#__PURE__*/Object.freeze({
91520
91603
  __proto__: null,
91521
- get: get,
91604
+ get: get$1,
91522
91605
  update: update,
91523
91606
  withScope: withScope
91524
91607
  });
91525
91608
 
91609
+ /**
91610
+ * Builds the NPM Docker images used by pipeline NPM operations.
91611
+ * Requires `system` (admin) authorization.
91612
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/pipeline/npm/images`
91613
+ *
91614
+ * @example
91615
+ * import { pipelineAdapter } from 'epicenter-libs';
91616
+ * const built = await pipelineAdapter.buildImages();
91617
+ *
91618
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91619
+ * @returns promise that resolves to `true` when the images were built successfully
91620
+ */
91621
+ async function buildImages(optionals = {}) {
91622
+ return await new Router().get('/pipeline/npm/images', optionals).then(({
91623
+ body
91624
+ }) => body);
91625
+ }
91626
+
91627
+ /**
91628
+ * Executes a stored pipeline configuration. The operations to run are read server-side from the
91629
+ * named config file; only step inputs (such as credentials) are supplied here via `attributes`.
91630
+ * The execution runs asynchronously — the returned audit record starts in its `RUNNING` state and
91631
+ * is updated by the worker on completion (poll `getExecution` to observe progress).
91632
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/pipeline/{configName}`
91633
+ *
91634
+ * @example
91635
+ * import { pipelineAdapter } from 'epicenter-libs';
91636
+ * // Pass the git credential the config's git step will consume, keyed by operation type
91637
+ * const audit = await pipelineAdapter.execute('deploy', { git: 'my-git-token' });
91638
+ *
91639
+ * @param configName Name of the stored pipeline config to execute
91640
+ * @param [attributes] Step inputs keyed by operation type (e.g. `{ git: '<token>' }`)
91641
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91642
+ * @returns promise that resolves to the newly created audit record in its initial RUNNING state
91643
+ */
91644
+ async function execute(configName, attributes = {}, optionals = {}) {
91645
+ return await new Router().post(`/pipeline/${encodeURIComponent(configName)}`, {
91646
+ body: {
91647
+ attributes
91648
+ },
91649
+ ...optionals
91650
+ }).then(({
91651
+ body
91652
+ }) => body);
91653
+ }
91654
+
91655
+ /**
91656
+ * Retrieves a single pipeline audit record by its execution key.
91657
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/pipeline/{executionKey}`
91658
+ *
91659
+ * @example
91660
+ * import { pipelineAdapter } from 'epicenter-libs';
91661
+ * const audit = await pipelineAdapter.getExecution('<executionKey>');
91662
+ *
91663
+ * @param executionKey Execution key of the audit record to retrieve
91664
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91665
+ * @returns promise that resolves to the audit record
91666
+ */
91667
+ async function getExecution(executionKey, optionals = {}) {
91668
+ return await new Router().get(`/pipeline/${encodeURIComponent(executionKey)}`, optionals).then(({
91669
+ body
91670
+ }) => body);
91671
+ }
91672
+
91673
+ /**
91674
+ * Lists the audit history for a stored pipeline config.
91675
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/pipeline/with/{configName}`
91676
+ *
91677
+ * @example
91678
+ * import { pipelineAdapter } from 'epicenter-libs';
91679
+ * const page = await pipelineAdapter.listAudits('deploy', { first: 0, max: 20 });
91680
+ *
91681
+ * @param configName Name of the stored pipeline config
91682
+ * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
91683
+ * @param [optionals.first] Index of the first record to return (for pagination)
91684
+ * @param [optionals.max] Maximum number of records to return (for pagination)
91685
+ * @returns promise that resolves to a page of audit records
91686
+ */
91687
+ async function listAudits(configName, optionals = {}) {
91688
+ const {
91689
+ first = 0,
91690
+ max,
91691
+ ...routingOptions
91692
+ } = optionals;
91693
+ return await new Router().withSearchParams({
91694
+ first,
91695
+ max
91696
+ }).get(`/pipeline/with/${encodeURIComponent(configName)}`, {
91697
+ paginated: true,
91698
+ ...routingOptions
91699
+ }).then(({
91700
+ body
91701
+ }) => body);
91702
+ }
91703
+
91704
+ /**
91705
+ * Deletes a pipeline audit record by its execution key.
91706
+ * Requires `system` (admin) authorization.
91707
+ * Base URL: DELETE `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/pipeline/{executionKey}`
91708
+ *
91709
+ * @example
91710
+ * import { pipelineAdapter } from 'epicenter-libs';
91711
+ * await pipelineAdapter.deleteAudit('<executionKey>');
91712
+ *
91713
+ * @param executionKey Execution key of the audit record to delete
91714
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91715
+ * @returns promise that resolves to `true` when the audit record was deleted
91716
+ */
91717
+ async function deleteAudit(executionKey, optionals = {}) {
91718
+ return await new Router().delete(`/pipeline/${encodeURIComponent(executionKey)}`, optionals).then(({
91719
+ body
91720
+ }) => body);
91721
+ }
91722
+
91723
+ var pipeline = /*#__PURE__*/Object.freeze({
91724
+ __proto__: null,
91725
+ buildImages: buildImages,
91726
+ deleteAudit: deleteAudit,
91727
+ execute: execute,
91728
+ getExecution: getExecution,
91729
+ listAudits: listAudits
91730
+ });
91731
+
91732
+ /**
91733
+ * Lists the known API services available for the given encyclopedia version.
91734
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/encyclopedia/v{version}`
91735
+ *
91736
+ * @example
91737
+ * import { encyclopediaAdapter } from 'epicenter-libs';
91738
+ * const services = await encyclopediaAdapter.listServices(3);
91739
+ *
91740
+ * @param version Encyclopedia version number
91741
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91742
+ * @returns promise that resolves to an array of known service descriptors
91743
+ */
91744
+ async function listServices(version, optionals = {}) {
91745
+ return await new Router().get(`/encyclopedia/v${version}`, optionals).then(({
91746
+ body
91747
+ }) => body);
91748
+ }
91749
+
91750
+ /**
91751
+ * Retrieves the documented resource (API documentation) for a specific service and encyclopedia version.
91752
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/encyclopedia/v{version}/{api}`
91753
+ *
91754
+ * @example
91755
+ * import { encyclopediaAdapter } from 'epicenter-libs';
91756
+ * const resource = await encyclopediaAdapter.getResource(3, 'run');
91757
+ *
91758
+ * @param version Encyclopedia version number
91759
+ * @param api Name of the API service to retrieve documentation for
91760
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91761
+ * @returns promise that resolves to the documented resource containing endpoints and definitions
91762
+ */
91763
+ async function getResource(version, api, optionals = {}) {
91764
+ return await new Router().get(`/encyclopedia/v${version}/${api}`, optionals).then(({
91765
+ body
91766
+ }) => body);
91767
+ }
91768
+
91769
+ /**
91770
+ * Retrieves a translated representation of the API documentation for a specific service and encyclopedia version.
91771
+ * Supported translators are ASCIIDOC, ASCIIDOC_TO_HTML, and OPENAPI.
91772
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/encyclopedia/as/{translator}/v{version}/{api}`
91773
+ *
91774
+ * NOTE: The backend returns the translated content with a translator-specific content-type
91775
+ * (e.g. `text/asciidoc`, `text/html`, `application/json`). The shared Router throws when the
91776
+ * response content-type is not `application/json`, so only the OPENAPI translator works here.
91777
+ * For ASCIIDOC and ASCIIDOC_TO_HTML, use the underlying fetch API directly against the
91778
+ * constructed URL.
91779
+ *
91780
+ * @example
91781
+ * import { encyclopediaAdapter } from 'epicenter-libs';
91782
+ * const openApiDoc = await encyclopediaAdapter.translate('OPENAPI', 3, 'run');
91783
+ *
91784
+ * @param translator Output format for the documentation; one of 'ASCIIDOC', 'ASCIIDOC_TO_HTML', or 'OPENAPI'
91785
+ * @param version Encyclopedia version number
91786
+ * @param api Name of the API service to translate documentation for
91787
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91788
+ * @returns promise that resolves to the translated documentation (only when translator is 'OPENAPI')
91789
+ */
91790
+ async function translate(translator, version, api, optionals = {}) {
91791
+ return await new Router().get(`/encyclopedia/as/${translator}/v${version}/${api}`, optionals).then(({
91792
+ body
91793
+ }) => body);
91794
+ }
91795
+
91796
+ var encyclopedia = /*#__PURE__*/Object.freeze({
91797
+ __proto__: null,
91798
+ getResource: getResource,
91799
+ listServices: listServices,
91800
+ translate: translate
91801
+ });
91802
+
91803
+ /* File paths are free-form, user-authored strings that may contain spaces or URL-reserved
91804
+ * characters. Encode each segment while preserving the '/' separators that the backend's
91805
+ * `{filePath:.*}` routes expect. */
91806
+ const encodePath = filePath => filePath.split('/').map(encodeURIComponent).join('/');
91807
+
91808
+ /**
91809
+ * Lists files and directories at the project root or at a specific path.
91810
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file[/{filePath}]`
91811
+ *
91812
+ * @example
91813
+ * import { fileAdapter } from 'epicenter-libs';
91814
+ * // List all files at root
91815
+ * const entries = await fileAdapter.list();
91816
+ * // List contents of a specific directory up to 2 levels deep
91817
+ * const entries = await fileAdapter.list('src', { depth: 2 });
91818
+ *
91819
+ * @param [filePath] Path to a file or directory; omit to list the project root
91820
+ * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
91821
+ * @param [optionals.depth] Maximum depth of directory traversal to include in the response
91822
+ * @returns promise that resolves to an array of file and directory entries
91823
+ */
91824
+ async function list(filePath, optionals = {}) {
91825
+ const {
91826
+ depth,
91827
+ ...routingOptions
91828
+ } = optionals;
91829
+ const uriComponent = filePath ? `/${encodePath(filePath)}` : '';
91830
+ return await new Router().withSearchParams({
91831
+ depth
91832
+ }).get(`/file${uriComponent}`, routingOptions).then(({
91833
+ body
91834
+ }) => body);
91835
+ }
91836
+
91837
+ /**
91838
+ * Uploads and replaces files at the project root or at a specific path using multipart/form-data (PUT).
91839
+ * Use this when you want to overwrite existing files. For creating new files, use `create`.
91840
+ * Base URL: PUT `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file[/{filePath}]`
91841
+ *
91842
+ * NOTE: This is browser-only. The `FormData` body is only serialized as multipart/form-data when
91843
+ * running in a browser environment; in Node it will not be sent correctly.
91844
+ *
91845
+ * @example
91846
+ * import { fileAdapter } from 'epicenter-libs';
91847
+ * const formData = new FormData();
91848
+ * formData.append('file', myFile);
91849
+ * const uploaded = await fileAdapter.upload(formData, 'models/model.py');
91850
+ *
91851
+ * @param formData Multipart form data containing the file(s) to upload
91852
+ * @param [filePath] Destination path for the file(s); omit to upload to the project root
91853
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91854
+ * @returns promise that resolves to an array of the uploaded file entries
91855
+ */
91856
+ async function upload(formData, filePath, optionals = {}) {
91857
+ const uriComponent = filePath ? `/${encodePath(filePath)}` : '';
91858
+ return await new Router().put(`/file${uriComponent}`, {
91859
+ body: formData,
91860
+ ...optionals
91861
+ }).then(({
91862
+ body
91863
+ }) => body);
91864
+ }
91865
+
91866
+ /**
91867
+ * Creates new files at the project root or at a specific path using multipart/form-data (POST).
91868
+ * Use this when creating new files. For overwriting existing files, use `upload`.
91869
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file[/{filePath}]`
91870
+ *
91871
+ * NOTE: This is browser-only. The `FormData` body is only serialized as multipart/form-data when
91872
+ * running in a browser environment; in Node it will not be sent correctly.
91873
+ *
91874
+ * @example
91875
+ * import { fileAdapter } from 'epicenter-libs';
91876
+ * const formData = new FormData();
91877
+ * formData.append('file', myFile);
91878
+ * const created = await fileAdapter.create(formData, 'models/model.py');
91879
+ *
91880
+ * @param formData Multipart form data containing the file(s) to create
91881
+ * @param [filePath] Destination path for the file(s); omit to create at the project root
91882
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91883
+ * @returns promise that resolves to an array of the created file entries
91884
+ */
91885
+ async function create$1(formData, filePath, optionals = {}) {
91886
+ const uriComponent = filePath ? `/${encodePath(filePath)}` : '';
91887
+ return await new Router().post(`/file${uriComponent}`, {
91888
+ body: formData,
91889
+ ...optionals
91890
+ }).then(({
91891
+ body
91892
+ }) => body);
91893
+ }
91894
+
91895
+ /**
91896
+ * Deletes a file or directory at the project root or at a specific path.
91897
+ * Base URL: DELETE `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file[/{filePath}]`
91898
+ *
91899
+ * @example
91900
+ * import { fileAdapter } from 'epicenter-libs';
91901
+ * // Delete a specific file
91902
+ * await fileAdapter.remove('models/old-model.py');
91903
+ * // Delete all files at the project root
91904
+ * await fileAdapter.remove();
91905
+ *
91906
+ * @param [filePath] Path of the file or directory to delete; omit to delete all files at the project root
91907
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91908
+ * @returns promise that resolves when the deletion is complete
91909
+ */
91910
+ async function remove(filePath, optionals = {}) {
91911
+ const uriComponent = filePath ? `/${encodePath(filePath)}` : '';
91912
+ return await new Router().delete(`/file${uriComponent}`, optionals).then(({
91913
+ body
91914
+ }) => body);
91915
+ }
91916
+
91917
+ /**
91918
+ * Downloads the raw content of a file at the specified path.
91919
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file/download/{filePath}`
91920
+ *
91921
+ * NOTE: The backend streams the file with its detected content type (e.g. `application/zip`,
91922
+ * `text/plain`, `application/octet-stream`). The shared Router throws when the response
91923
+ * content-type is not `application/json`, so this call only succeeds for JSON files. To download
91924
+ * other file types, use the underlying fetch API directly against the constructed URL.
91925
+ *
91926
+ * @example
91927
+ * import { fileAdapter } from 'epicenter-libs';
91928
+ * const content = await fileAdapter.download('config.json');
91929
+ *
91930
+ * @param filePath Path to the file to download
91931
+ * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
91932
+ * @param [optionals.depth] Currently unused on the backend; reserved for future expansion.
91933
+ * @returns promise that resolves to the raw file content
91934
+ */
91935
+ async function download(filePath, optionals = {}) {
91936
+ const {
91937
+ depth,
91938
+ ...routingOptions
91939
+ } = optionals;
91940
+ return await new Router().withSearchParams({
91941
+ depth
91942
+ }).get(`/file/download/${encodePath(filePath)}`, routingOptions).then(({
91943
+ body
91944
+ }) => body);
91945
+ }
91946
+
91947
+ /**
91948
+ * Lists files and directories matching a glob filter pattern, optionally scoped to a specific path.
91949
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file/filter/{filter}[/{filePath}]`
91950
+ *
91951
+ * @example
91952
+ * import { fileAdapter } from 'epicenter-libs';
91953
+ * // List all Python files in the project
91954
+ * const pyFiles = await fileAdapter.listByFilter('*.py');
91955
+ * // List all Python files within the 'models' directory
91956
+ * const pyFiles = await fileAdapter.listByFilter('*.py', 'models');
91957
+ *
91958
+ * @param filter Glob pattern to filter files by (e.g., '*.py', '*.json')
91959
+ * @param [filePath] Directory path to scope the filter to; omit to search the entire project
91960
+ * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
91961
+ * @param [optionals.depth] Maximum depth of directory traversal to include in the response
91962
+ * @returns promise that resolves to an array of matching file and directory entries
91963
+ */
91964
+ async function listByFilter(filter, filePath, optionals = {}) {
91965
+ const {
91966
+ depth,
91967
+ ...routingOptions
91968
+ } = optionals;
91969
+ const uriComponent = filePath ? `/${encodePath(filePath)}` : '';
91970
+ return await new Router().withSearchParams({
91971
+ depth
91972
+ }).get(`/file/filter/${encodeURIComponent(filter)}${uriComponent}`, routingOptions).then(({
91973
+ body
91974
+ }) => body);
91975
+ }
91976
+
91977
+ /**
91978
+ * Compresses files into a ZIP archive at the project root or at a specific path.
91979
+ * Base URL: PATCH `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file/compress[/{filePath}]`
91980
+ *
91981
+ * NOTE: The backend streams the resulting archive with content-type `application/zip`. The
91982
+ * shared Router throws when the response content-type is not `application/json`, so this call
91983
+ * will not return the archive bytes through the normal flow. To retrieve the archive, use the
91984
+ * underlying fetch API directly against the constructed URL.
91985
+ *
91986
+ * @example
91987
+ * import { fileAdapter } from 'epicenter-libs';
91988
+ * // Compress a specific file or directory
91989
+ * await fileAdapter.compress('models');
91990
+ * // Compress at root
91991
+ * await fileAdapter.compress();
91992
+ *
91993
+ * @param [filePath] Path of the file or directory to compress; omit to compress at the project root
91994
+ * @param [optionals] Optional arguments; pass network call options overrides here.
91995
+ * @returns promise that resolves to the compression result
91996
+ */
91997
+ async function compress(filePath, optionals = {}) {
91998
+ const uriComponent = filePath ? `/${encodePath(filePath)}` : '';
91999
+ return await new Router().patch(`/file/compress${uriComponent}`, optionals).then(({
92000
+ body
92001
+ }) => body);
92002
+ }
92003
+
92004
+ /**
92005
+ * Extracts (explodes) a ZIP archive at the project root or at a specific path in place,
92006
+ * deleting the archive after extraction.
92007
+ * Base URL: PATCH `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file/explode[/{filePath}]`
92008
+ *
92009
+ * @example
92010
+ * import { fileAdapter } from 'epicenter-libs';
92011
+ * // Extract a specific archive
92012
+ * await fileAdapter.explode('archive.zip');
92013
+ * // Explode at root
92014
+ * await fileAdapter.explode();
92015
+ *
92016
+ * @param [filePath] Path of the archive to extract; omit to extract at the project root
92017
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92018
+ * @returns promise that resolves when the extraction is complete
92019
+ */
92020
+ async function explode(filePath, optionals = {}) {
92021
+ const uriComponent = filePath ? `/${encodePath(filePath)}` : '';
92022
+ return await new Router().patch(`/file/explode${uriComponent}`, optionals).then(({
92023
+ body
92024
+ }) => body);
92025
+ }
92026
+
92027
+ /**
92028
+ * Moves a file or directory from one path to another within the project.
92029
+ * Base URL: PATCH `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file/move`
92030
+ *
92031
+ * @example
92032
+ * import { fileAdapter } from 'epicenter-libs';
92033
+ * await fileAdapter.move('models/old-name.py', 'models/new-name.py');
92034
+ * // Move and include the origin directory itself
92035
+ * await fileAdapter.move('old-dir', 'new-dir', { includeOrigin: true });
92036
+ *
92037
+ * @param origin Origin path of the file or directory to move
92038
+ * @param destination Destination path to move the file or directory to
92039
+ * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
92040
+ * @param [optionals.includeOrigin] Whether to include the origin directory itself in the move
92041
+ * @returns promise that resolves when the move is complete
92042
+ */
92043
+ async function move(origin, destination, optionals = {}) {
92044
+ const {
92045
+ includeOrigin,
92046
+ ...routingOptions
92047
+ } = optionals;
92048
+ return await new Router().patch('/file/move', {
92049
+ body: {
92050
+ origin,
92051
+ destination,
92052
+ includeOrigin
92053
+ },
92054
+ ...routingOptions
92055
+ }).then(({
92056
+ body
92057
+ }) => body);
92058
+ }
92059
+
92060
+ /**
92061
+ * Creates a new directory at the specified path.
92062
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/file/directory/{filePath}`
92063
+ *
92064
+ * @example
92065
+ * import { fileAdapter } from 'epicenter-libs';
92066
+ * const dir = await fileAdapter.createDirectory('models/new-folder');
92067
+ *
92068
+ * @param filePath Path at which to create the new directory
92069
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92070
+ * @returns promise that resolves to the created directory entry
92071
+ */
92072
+ async function createDirectory(filePath, optionals = {}) {
92073
+ return await new Router().post(`/file/directory/${encodePath(filePath)}`, optionals).then(({
92074
+ body
92075
+ }) => body);
92076
+ }
92077
+
92078
+ var file = /*#__PURE__*/Object.freeze({
92079
+ __proto__: null,
92080
+ compress: compress,
92081
+ create: create$1,
92082
+ createDirectory: createDirectory,
92083
+ download: download,
92084
+ explode: explode,
92085
+ list: list,
92086
+ listByFilter: listByFilter,
92087
+ move: move,
92088
+ remove: remove,
92089
+ upload: upload
92090
+ });
92091
+
92092
+ /**
92093
+ * Currently the API only supports `SAML`. This type is intentionally narrow so that adding new
92094
+ * protocols on the backend requires an explicit type update here.
92095
+ */
92096
+
92097
+ /**
92098
+ * Gets registration info for a self-registration token.
92099
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/self/{token}`
92100
+ *
92101
+ * @example
92102
+ * import { registrationAdapter } from 'epicenter-libs';
92103
+ * const info = await registrationAdapter.getSelfRegistrationInfo('my-token');
92104
+ *
92105
+ * @param token Self-registration token
92106
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92107
+ * @returns promise that resolves to registration info
92108
+ */
92109
+ async function getSelfRegistrationInfo(token, optionals = {}) {
92110
+ return await new Router().get(`/registration/self/${token}`, optionals).then(({
92111
+ body
92112
+ }) => body);
92113
+ }
92114
+
92115
+ /**
92116
+ * Completes a self-registration using a token.
92117
+ * Base URL: PATCH `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/self/{token}`
92118
+ *
92119
+ * @example
92120
+ * import { registrationAdapter } from 'epicenter-libs';
92121
+ * const result = await registrationAdapter.completeSelfRegistration('my-token', 'secret123', {
92122
+ * displayName: 'John Doe',
92123
+ * handle: 'johnd',
92124
+ * });
92125
+ *
92126
+ * @param token Self-registration token
92127
+ * @param password Password for the new account
92128
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92129
+ * @param [optionals.displayName] Display name for the new user
92130
+ * @param [optionals.givenName] Given name for the new user
92131
+ * @param [optionals.familyName] Family name for the new user
92132
+ * @param [optionals.handle] Handle for the new user
92133
+ * @returns promise that resolves to the registration result including session info
92134
+ */
92135
+ async function completeSelfRegistration(token, password, optionals = {}) {
92136
+ const {
92137
+ displayName,
92138
+ givenName,
92139
+ familyName,
92140
+ handle,
92141
+ ...routingOptions
92142
+ } = optionals;
92143
+ return await new Router().patch(`/registration/self/${token}`, {
92144
+ body: {
92145
+ password,
92146
+ displayName,
92147
+ givenName,
92148
+ familyName,
92149
+ handle
92150
+ },
92151
+ ...routingOptions
92152
+ }).then(({
92153
+ body
92154
+ }) => body);
92155
+ }
92156
+
92157
+ /**
92158
+ * Sends a self-registration invite email to a user. Pass an `Accept-Language` header via
92159
+ * `optionals.headers` to localize the email.
92160
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/self/{groupKey}`
92161
+ *
92162
+ * @example
92163
+ * import { registrationAdapter } from 'epicenter-libs';
92164
+ * await registrationAdapter.sendSelfRegistrationInvite('group-key', 'user@example.com', {
92165
+ * linkDestination: 'DASHBOARD',
92166
+ * redirectUrl: 'https://app.example.com',
92167
+ * headers: { 'Accept-Language': 'fr-FR' },
92168
+ * });
92169
+ *
92170
+ * @param groupKey Group key to register the user into
92171
+ * @param email Email address of the user to invite
92172
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92173
+ * @param [optionals.linkDestination] Destination for the registration link ('DASHBOARD' or 'MANAGER')
92174
+ * @param [optionals.modality] Registration modality
92175
+ * @param [optionals.redirectUrl] URL to redirect to after registration
92176
+ * @param [optionals.subject] Subject line for the invite email
92177
+ * @param [optionals.givenName] Pre-populate given name in the registration form
92178
+ * @param [optionals.familyName] Pre-populate family name in the registration form
92179
+ * @param [optionals.linkUrl] Custom URL to use for the registration link
92180
+ * @param [optionals.confirmation] Whether to send a confirmation email
92181
+ * @returns promise that resolves to undefined if successful
92182
+ */
92183
+ async function sendSelfRegistrationInvite(groupKey, email, optionals = {}) {
92184
+ const {
92185
+ linkDestination,
92186
+ modality,
92187
+ redirectUrl,
92188
+ subject,
92189
+ givenName,
92190
+ familyName,
92191
+ linkUrl,
92192
+ confirmation,
92193
+ ...routingOptions
92194
+ } = optionals;
92195
+ return await new Router().post(`/registration/self/${groupKey}`, {
92196
+ body: {
92197
+ email,
92198
+ linkDestination,
92199
+ modality,
92200
+ redirectUrl,
92201
+ subject,
92202
+ givenName,
92203
+ familyName,
92204
+ linkUrl,
92205
+ confirmation
92206
+ },
92207
+ ...routingOptions
92208
+ }).then(({
92209
+ body
92210
+ }) => body);
92211
+ }
92212
+
92213
+ /**
92214
+ * Gets registration info for an invite token.
92215
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/invite/{token}`
92216
+ *
92217
+ * @example
92218
+ * import { registrationAdapter } from 'epicenter-libs';
92219
+ * const info = await registrationAdapter.getInviteRegistrationInfo('invite-token');
92220
+ *
92221
+ * @param token Invite registration token
92222
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92223
+ * @returns promise that resolves to registration info
92224
+ */
92225
+ async function getInviteRegistrationInfo(token, optionals = {}) {
92226
+ return await new Router().get(`/registration/invite/${token}`, optionals).then(({
92227
+ body
92228
+ }) => body);
92229
+ }
92230
+
92231
+ /**
92232
+ * Completes an invite registration using a token.
92233
+ * Base URL: PATCH `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/invite/{token}`
92234
+ *
92235
+ * @example
92236
+ * import { registrationAdapter } from 'epicenter-libs';
92237
+ * const result = await registrationAdapter.completeInviteRegistration('invite-token', 'pass456', {
92238
+ * displayName: 'Jane Doe',
92239
+ * });
92240
+ *
92241
+ * @param token Invite registration token
92242
+ * @param password Password for the new account
92243
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92244
+ * @param [optionals.displayName] Display name for the new user
92245
+ * @param [optionals.givenName] Given name for the new user
92246
+ * @param [optionals.familyName] Family name for the new user
92247
+ * @param [optionals.handle] Handle for the new user
92248
+ * @returns promise that resolves to the registration result including session info
92249
+ */
92250
+ async function completeInviteRegistration(token, password, optionals = {}) {
92251
+ const {
92252
+ displayName,
92253
+ givenName,
92254
+ familyName,
92255
+ handle,
92256
+ ...routingOptions
92257
+ } = optionals;
92258
+ return await new Router().patch(`/registration/invite/${token}`, {
92259
+ body: {
92260
+ password,
92261
+ displayName,
92262
+ givenName,
92263
+ familyName,
92264
+ handle
92265
+ },
92266
+ ...routingOptions
92267
+ }).then(({
92268
+ body
92269
+ }) => body);
92270
+ }
92271
+
92272
+ /**
92273
+ * Sends an invite registration email to a user. Pass an `Accept-Language` header via
92274
+ * `optionals.headers` to localize the email.
92275
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/invite/{groupKey}`
92276
+ *
92277
+ * @example
92278
+ * import { registrationAdapter } from 'epicenter-libs';
92279
+ * await registrationAdapter.sendInvite('group-key', 'invited@example.com', {
92280
+ * givenName: 'New',
92281
+ * familyName: 'User',
92282
+ * redirectUrl: 'https://app.example.com',
92283
+ * });
92284
+ *
92285
+ * @param groupKey Group key to invite the user into
92286
+ * @param email Email address of the user to invite
92287
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92288
+ * @param [optionals.linkDestination] Destination for the registration link ('DASHBOARD' or 'MANAGER')
92289
+ * @param [optionals.modality] Registration modality
92290
+ * @param [optionals.redirectUrl] URL to redirect to after registration
92291
+ * @param [optionals.subject] Subject line for the invite email
92292
+ * @param [optionals.givenName] Pre-populate given name in the registration form
92293
+ * @param [optionals.familyName] Pre-populate family name in the registration form
92294
+ * @param [optionals.linkUrl] Custom URL to use for the registration link
92295
+ * @param [optionals.confirmation] Whether to send a confirmation email
92296
+ * @returns promise that resolves to undefined if successful
92297
+ */
92298
+ async function sendInvite(groupKey, email, optionals = {}) {
92299
+ const {
92300
+ linkDestination,
92301
+ modality,
92302
+ redirectUrl,
92303
+ subject,
92304
+ givenName,
92305
+ familyName,
92306
+ linkUrl,
92307
+ confirmation,
92308
+ ...routingOptions
92309
+ } = optionals;
92310
+ return await new Router().post(`/registration/invite/${groupKey}`, {
92311
+ body: {
92312
+ email,
92313
+ linkDestination,
92314
+ modality,
92315
+ redirectUrl,
92316
+ subject,
92317
+ givenName,
92318
+ familyName,
92319
+ linkUrl,
92320
+ confirmation
92321
+ },
92322
+ ...routingOptions
92323
+ }).then(({
92324
+ body
92325
+ }) => body);
92326
+ }
92327
+
92328
+ /**
92329
+ * Gets registration info for a team invite token.
92330
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/team/{token}`
92331
+ *
92332
+ * @example
92333
+ * import { registrationAdapter } from 'epicenter-libs';
92334
+ * const info = await registrationAdapter.getTeamRegistrationInfo('team-token');
92335
+ *
92336
+ * @param token Team invite token
92337
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92338
+ * @returns promise that resolves to team registration info
92339
+ */
92340
+ async function getTeamRegistrationInfo(token, optionals = {}) {
92341
+ return await new Router().get(`/registration/team/${token}`, optionals).then(({
92342
+ body
92343
+ }) => body);
92344
+ }
92345
+
92346
+ /**
92347
+ * Sends a team invite email. Pass an `Accept-Language` header via `optionals.headers` to
92348
+ * localize the email.
92349
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/team`
92350
+ *
92351
+ * @example
92352
+ * import { registrationAdapter } from 'epicenter-libs';
92353
+ * await registrationAdapter.sendTeamInvite(
92354
+ * 'Jane Author',
92355
+ * 'AUTHOR',
92356
+ * 'https://app.example.com',
92357
+ * 'newteammate@example.com',
92358
+ * { subject: 'Welcome to the team!' },
92359
+ * );
92360
+ *
92361
+ * @param invitingAuthor Name or identifier of the person sending the invite
92362
+ * @param role Role to assign to the invited user
92363
+ * @param redirectUrl URL to redirect to after accepting the invite
92364
+ * @param email Email address of the user to invite
92365
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92366
+ * @param [optionals.subject] Subject line for the invite email
92367
+ * @param [optionals.givenName] Pre-populate given name for the invited user
92368
+ * @param [optionals.familyName] Pre-populate family name for the invited user
92369
+ * @returns promise that resolves to undefined if successful
92370
+ */
92371
+ async function sendTeamInvite(invitingAuthor, role, redirectUrl, email, optionals = {}) {
92372
+ const {
92373
+ subject,
92374
+ givenName,
92375
+ familyName,
92376
+ ...routingOptions
92377
+ } = optionals;
92378
+ return await new Router().post('/registration/team', {
92379
+ body: {
92380
+ invitingAuthor,
92381
+ role,
92382
+ redirectUrl,
92383
+ email,
92384
+ subject,
92385
+ givenName,
92386
+ familyName
92387
+ },
92388
+ ...routingOptions
92389
+ }).then(({
92390
+ body
92391
+ }) => body);
92392
+ }
92393
+
92394
+ /**
92395
+ * @deprecated Use getSsoAdminRegistration or getSsoUserRegistration instead.
92396
+ * Gets SSO registration info for a given SSO protocol.
92397
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/sso/{ssoProtocol}`
92398
+ *
92399
+ * @example
92400
+ * import { registrationAdapter } from 'epicenter-libs';
92401
+ * const info = await registrationAdapter.getSsoRegistration('SAML');
92402
+ *
92403
+ * @param ssoProtocol The SSO protocol (e.g. 'SAML')
92404
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92405
+ * @returns promise that resolves to SSO registration data
92406
+ */
92407
+ async function getSsoRegistration(ssoProtocol, optionals = {}) {
92408
+ console.warn('DEPRECATION WARNING: registrationAdapter.getSsoRegistration is deprecated and will be removed with the next release. Use registrationAdapter.getSsoAdminRegistration or registrationAdapter.getSsoUserRegistration instead.');
92409
+ return await new Router().get(`/registration/sso/${ssoProtocol}`, optionals).then(({
92410
+ body
92411
+ }) => body);
92412
+ }
92413
+
92414
+ /**
92415
+ * Gets admin SSO registration info for a given SSO protocol.
92416
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/sso/admin/{ssoProtocol}`
92417
+ *
92418
+ * @example
92419
+ * import { registrationAdapter } from 'epicenter-libs';
92420
+ * const info = await registrationAdapter.getSsoAdminRegistration('SAML');
92421
+ *
92422
+ * @param ssoProtocol The SSO protocol (e.g. 'SAML')
92423
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92424
+ * @returns promise that resolves to SSO admin registration data
92425
+ */
92426
+ async function getSsoAdminRegistration(ssoProtocol, optionals = {}) {
92427
+ return await new Router().get(`/registration/sso/admin/${ssoProtocol}`, optionals).then(({
92428
+ body
92429
+ }) => body);
92430
+ }
92431
+
92432
+ /**
92433
+ * Gets user SSO registration info for a given SSO protocol.
92434
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/registration/sso/user/{ssoProtocol}`
92435
+ *
92436
+ * @example
92437
+ * import { registrationAdapter } from 'epicenter-libs';
92438
+ * const info = await registrationAdapter.getSsoUserRegistration('SAML');
92439
+ *
92440
+ * @param ssoProtocol The SSO protocol (e.g. 'SAML')
92441
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92442
+ * @returns promise that resolves to SSO user registration data
92443
+ */
92444
+ async function getSsoUserRegistration(ssoProtocol, optionals = {}) {
92445
+ return await new Router().get(`/registration/sso/user/${ssoProtocol}`, optionals).then(({
92446
+ body
92447
+ }) => body);
92448
+ }
92449
+
92450
+ var registration = /*#__PURE__*/Object.freeze({
92451
+ __proto__: null,
92452
+ completeInviteRegistration: completeInviteRegistration,
92453
+ completeSelfRegistration: completeSelfRegistration,
92454
+ getInviteRegistrationInfo: getInviteRegistrationInfo,
92455
+ getSelfRegistrationInfo: getSelfRegistrationInfo,
92456
+ getSsoAdminRegistration: getSsoAdminRegistration,
92457
+ getSsoRegistration: getSsoRegistration,
92458
+ getSsoUserRegistration: getSsoUserRegistration,
92459
+ getTeamRegistrationInfo: getTeamRegistrationInfo,
92460
+ sendInvite: sendInvite,
92461
+ sendSelfRegistrationInvite: sendSelfRegistrationInvite,
92462
+ sendTeamInvite: sendTeamInvite
92463
+ });
92464
+
92465
+ /**
92466
+ * Creates a new docket entry, scheduling a deferred operation for later execution.
92467
+ * Requires `support` level authorization.
92468
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/docket`
92469
+ *
92470
+ * @example
92471
+ * import { docketAdapter } from 'epicenter-libs';
92472
+ * const docket = await docketAdapter.create(
92473
+ * {
92474
+ * objectType: 'scale',
92475
+ * operatingSystem: 'LINUX',
92476
+ * workerShape: 'GS',
92477
+ * scale: {
92478
+ * active: true,
92479
+ * initialWorkerCount: 1,
92480
+ * additionalWorkerLimit: 4,
92481
+ * flavors: ['DOCKER'],
92482
+ * },
92483
+ * },
92484
+ * { objectType: 'date', value: '2026-06-01T00:00:00Z' },
92485
+ * '2026-05-20T00:00:00Z',
92486
+ * { ttlMinutes: 60 },
92487
+ * );
92488
+ *
92489
+ * @param payload Docket payload describing the operation to schedule
92490
+ * @param trigger Trigger describing when the operation should fire
92491
+ * (cron, date, or offset)
92492
+ * @param date ISO-8601 date string indicating when the docket is scheduled
92493
+ * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
92494
+ * @param [optionals.ttlMinutes] Time-to-live in minutes for the docket entry (minimum 2)
92495
+ * @returns promise that resolves to the newly created docket
92496
+ */
92497
+ async function create(payload, trigger, date, optionals = {}) {
92498
+ const {
92499
+ ttlMinutes,
92500
+ ...routingOptions
92501
+ } = optionals;
92502
+ return await new Router().post('/docket', {
92503
+ body: {
92504
+ payload,
92505
+ trigger,
92506
+ date,
92507
+ ttlMinutes
92508
+ },
92509
+ ...routingOptions
92510
+ }).then(({
92511
+ body
92512
+ }) => body);
92513
+ }
92514
+
92515
+ var docket = /*#__PURE__*/Object.freeze({
92516
+ __proto__: null,
92517
+ create: create
92518
+ });
92519
+
91526
92520
  // Generic type for push channel message custom data
91527
92521
 
91528
92522
  // Base structure for channel push messages
@@ -91713,6 +92707,367 @@ class Channel {
91713
92707
  }
91714
92708
  }
91715
92709
 
92710
+ // ──────────────────────────────────────────────
92711
+ // Types
92712
+ // ──────────────────────────────────────────────
92713
+
92714
+ // ──────────────────────────────────────────────
92715
+ // Functions
92716
+ // ──────────────────────────────────────────────
92717
+
92718
+ /**
92719
+ * Retrieves the git integration configuration for the project.
92720
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/git`
92721
+ *
92722
+ * @example
92723
+ * import { gitAdapter } from 'epicenter-libs';
92724
+ * const integration = await gitAdapter.get();
92725
+ *
92726
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92727
+ * @returns promise that resolves to the git integration configuration
92728
+ */
92729
+ async function get(optionals = {}) {
92730
+ return new Router().get('/git', optionals).then(({
92731
+ body
92732
+ }) => body);
92733
+ }
92734
+
92735
+ /**
92736
+ * Retrieves the current git status for the project.
92737
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/git/status`
92738
+ *
92739
+ * @example
92740
+ * import { gitAdapter } from 'epicenter-libs';
92741
+ * const status = await gitAdapter.getStatus();
92742
+ * console.log(status.currentBranch);
92743
+ *
92744
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92745
+ * @returns promise that resolves to the git status, including the current branch
92746
+ */
92747
+ async function getStatus(optionals = {}) {
92748
+ return new Router().get('/git/status', optionals).then(({
92749
+ body
92750
+ }) => body);
92751
+ }
92752
+
92753
+ /**
92754
+ * Checks out a branch in the project's git repository.
92755
+ * Base URL: GET `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/git/checkout/{branch}`
92756
+ *
92757
+ * @example
92758
+ * import { gitAdapter } from 'epicenter-libs';
92759
+ * await gitAdapter.checkout('main');
92760
+ *
92761
+ * @param branch Name of the branch to check out
92762
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92763
+ * @returns promise that resolves when the checkout is complete
92764
+ */
92765
+ async function checkout(branch, optionals = {}) {
92766
+ return new Router().get(`/git/checkout/${branch}`, optionals).then(({
92767
+ body
92768
+ }) => body);
92769
+ }
92770
+
92771
+ /**
92772
+ * Resets the project's git repository, optionally to a specific branch.
92773
+ * Base URL: DELETE `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/git/reset[/{branch}]`
92774
+ *
92775
+ * @example
92776
+ * import { gitAdapter } from 'epicenter-libs';
92777
+ * await gitAdapter.reset(); // reset current branch
92778
+ * await gitAdapter.reset({ branch: 'main' }); // reset to 'main'
92779
+ *
92780
+ * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
92781
+ * @param [optionals.branch] Branch to reset to; if omitted, resets the current branch
92782
+ * @returns promise that resolves when the reset is complete
92783
+ */
92784
+ async function reset(optionals = {}) {
92785
+ const {
92786
+ branch,
92787
+ ...routingOptions
92788
+ } = optionals;
92789
+ return new Router().delete(`/git/reset${branch ? `/${branch}` : ''}`, routingOptions).then(({
92790
+ body
92791
+ }) => body);
92792
+ }
92793
+
92794
+ /**
92795
+ * Creates a git integration for the project.
92796
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/git/integration`
92797
+ *
92798
+ * @example
92799
+ * import { gitAdapter } from 'epicenter-libs';
92800
+ * const integration = await gitAdapter.createIntegration({
92801
+ * uri: 'git@github.com:myorg/myrepo.git',
92802
+ * publicKey: '...',
92803
+ * privateKey: '...',
92804
+ * publicKeySpec: 'openssh',
92805
+ * privateKeySpec: 'pkcs8',
92806
+ * algorithm: 'ed25519',
92807
+ * });
92808
+ *
92809
+ * @param integration Git integration configuration to create
92810
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92811
+ * @returns promise that resolves to the created git integration
92812
+ */
92813
+ async function createIntegration(integration, optionals = {}) {
92814
+ return new Router().post('/git/integration', {
92815
+ body: integration,
92816
+ ...optionals
92817
+ }).then(({
92818
+ body
92819
+ }) => body);
92820
+ }
92821
+
92822
+ /**
92823
+ * Updates the git integration for the project.
92824
+ * Base URL: PATCH `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/git/integration`
92825
+ *
92826
+ * @example
92827
+ * import { gitAdapter } from 'epicenter-libs';
92828
+ * const integration = await gitAdapter.updateIntegration({
92829
+ * uri: 'git@github.com:myorg/newrepo.git',
92830
+ * publicKeySpec: 'openssh',
92831
+ * privateKeySpec: 'pkcs8',
92832
+ * algorithm: 'ed25519',
92833
+ * });
92834
+ *
92835
+ * @param integration Fields to update on the git integration
92836
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92837
+ * @returns promise that resolves to the updated git integration
92838
+ */
92839
+ async function updateIntegration(integration, optionals = {}) {
92840
+ return new Router().patch('/git/integration', {
92841
+ body: integration,
92842
+ ...optionals
92843
+ }).then(({
92844
+ body
92845
+ }) => body);
92846
+ }
92847
+
92848
+ /**
92849
+ * Removes the git integration for the project.
92850
+ * Base URL: DELETE `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/git/integration`
92851
+ *
92852
+ * @example
92853
+ * import { gitAdapter } from 'epicenter-libs';
92854
+ * await gitAdapter.removeIntegration();
92855
+ *
92856
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92857
+ * @returns promise that resolves when the integration is removed
92858
+ */
92859
+ async function removeIntegration(optionals = {}) {
92860
+ return new Router().delete('/git/integration', optionals).then(({
92861
+ body
92862
+ }) => body);
92863
+ }
92864
+
92865
+ /**
92866
+ * Pushes local commits to the remote git repository.
92867
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/git/push`
92868
+ *
92869
+ * @example
92870
+ * import { gitAdapter } from 'epicenter-libs';
92871
+ * await gitAdapter.push({ message: 'Update simulation data' });
92872
+ *
92873
+ * @param optionals Arguments object; also accepts network call option overrides.
92874
+ * @param optionals.message Commit message (required)
92875
+ * @param [optionals.password] Password for authentication
92876
+ * @param [optionals.force] Force-push, bypassing non-fast-forward checks
92877
+ * @returns promise that resolves when the push is complete
92878
+ */
92879
+ async function push(optionals) {
92880
+ const {
92881
+ message,
92882
+ password,
92883
+ force,
92884
+ ...routingOptions
92885
+ } = optionals;
92886
+ return new Router().withSearchParams({
92887
+ force
92888
+ }).post('/git/push', {
92889
+ body: {
92890
+ message,
92891
+ password
92892
+ },
92893
+ ...routingOptions
92894
+ }).then(({
92895
+ body
92896
+ }) => body);
92897
+ }
92898
+
92899
+ /**
92900
+ * Pulls changes from the remote git repository into the project.
92901
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/git/pull`
92902
+ *
92903
+ * @example
92904
+ * import { gitAdapter } from 'epicenter-libs';
92905
+ * await gitAdapter.pull({ force: true, confirm: true });
92906
+ *
92907
+ * @param [optionals] Optional arguments; pass network call options overrides here. Special arguments specific to this method are listed below if they exist.
92908
+ * @param [optionals.password] Password for authentication
92909
+ * @param [optionals.force] Force the pull, overwriting local changes
92910
+ * @param [optionals.confirm] Set the `X-Forio-Confirmation` header to confirm an overwrite
92911
+ * @returns promise that resolves when the pull is complete
92912
+ */
92913
+ async function pull(optionals = {}) {
92914
+ const {
92915
+ password,
92916
+ force,
92917
+ confirm,
92918
+ headers: headersOverride,
92919
+ ...routingOptions
92920
+ } = optionals;
92921
+ const headers = Object.assign({}, headersOverride, confirm ? {
92922
+ 'X-Forio-Confirmation': true
92923
+ } : {});
92924
+ return new Router().withSearchParams({
92925
+ force
92926
+ }).post('/git/pull', {
92927
+ body: {
92928
+ password
92929
+ },
92930
+ headers,
92931
+ ...routingOptions
92932
+ }).then(({
92933
+ body
92934
+ }) => body);
92935
+ }
92936
+
92937
+ var git = /*#__PURE__*/Object.freeze({
92938
+ __proto__: null,
92939
+ checkout: checkout,
92940
+ createIntegration: createIntegration,
92941
+ get: get,
92942
+ getStatus: getStatus,
92943
+ pull: pull,
92944
+ push: push,
92945
+ removeIntegration: removeIntegration,
92946
+ reset: reset,
92947
+ updateIntegration: updateIntegration
92948
+ });
92949
+
92950
+ // ──────────────────────────────────────────────
92951
+ // Data Points
92952
+ // ──────────────────────────────────────────────
92953
+
92954
+ // ──────────────────────────────────────────────
92955
+ // Chart Series
92956
+ // ──────────────────────────────────────────────
92957
+
92958
+ // ──────────────────────────────────────────────
92959
+ // Chart, Table, Picture
92960
+ // ──────────────────────────────────────────────
92961
+
92962
+ // ──────────────────────────────────────────────
92963
+ // Binary Data
92964
+ // ──────────────────────────────────────────────
92965
+
92966
+ // ──────────────────────────────────────────────
92967
+ // Environment, Slide, Document
92968
+ // ──────────────────────────────────────────────
92969
+
92970
+ /**
92971
+ * Generates a PowerPoint file from a template and returns it as binary data (JSON-encoded)
92972
+ * Base URL: PUT `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/powerpoint/{TEMPLATE_DIRECTORY}/{TEMPLATE_PATH}`
92973
+ *
92974
+ * @example
92975
+ * import { powerpointAdapter } from 'epicenter-libs';
92976
+ * const binaryData = await powerpointAdapter.generate('MODEL', 'en-US-debrief-template.pptx', {
92977
+ * output: 'debrief-slides.pptx',
92978
+ * environment: {},
92979
+ * slides: [
92980
+ * {
92981
+ * number: 1,
92982
+ * environment: {
92983
+ * tables: [{ name: 'Leaderboard', data: [['Rank', 'Name', 'Score']] }],
92984
+ * },
92985
+ * },
92986
+ * ],
92987
+ * });
92988
+ *
92989
+ * @param templateDirectory Directory where the template is stored: 'DATA' or 'MODEL'
92990
+ * @param templatePath Path to the template file within the directory
92991
+ * @param document Document shadow defining the output filename, environment, and slides
92992
+ * @param [optionals] Optional arguments; pass network call options overrides here.
92993
+ * @returns promise that resolves to the generated PowerPoint as BinaryData
92994
+ */
92995
+ async function generate(templateDirectory, templatePath, document, optionals = {}) {
92996
+ return new Router().put(`/powerpoint/${templateDirectory}/${templatePath}`, {
92997
+ body: document,
92998
+ ...optionals
92999
+ }).then(({
93000
+ body
93001
+ }) => body);
93002
+ }
93003
+
93004
+ /**
93005
+ * Generates a PowerPoint file from a template and returns it as a streaming response.
93006
+ * Useful for downloading the generated file directly.
93007
+ * Base URL: POST `https://forio.com/api/v3/{ACCOUNT}/{PROJECT}/powerpoint/{TEMPLATE_DIRECTORY}/{TEMPLATE_PATH}`
93008
+ *
93009
+ * @example
93010
+ * import { powerpointAdapter } from 'epicenter-libs';
93011
+ * const response = await powerpointAdapter.stream('MODEL', 'en-US-debrief-template.pptx', {
93012
+ * output: 'debrief-slides.pptx',
93013
+ * environment: {},
93014
+ * slides: [],
93015
+ * });
93016
+ * const blob = await response.blob();
93017
+ *
93018
+ * @param templateDirectory Directory where the template is stored: 'DATA' or 'MODEL'
93019
+ * @param templatePath Path to the template file within the directory
93020
+ * @param document Document shadow defining the output filename, environment, and slides
93021
+ * @param [optionals] Optional arguments; pass network call options overrides here.
93022
+ * @returns promise that resolves to the raw Response for streaming/blob handling
93023
+ */
93024
+ async function stream(templateDirectory, templatePath, document, optionals = {}) {
93025
+ const {
93026
+ server,
93027
+ accountShortName,
93028
+ projectShortName,
93029
+ useProjectProxy,
93030
+ query,
93031
+ headers: headersOverride,
93032
+ authorization,
93033
+ includeAuthorization
93034
+ } = optionals;
93035
+ const url = new Router().getURL(`/powerpoint/${templateDirectory}/${templatePath}`, {
93036
+ server,
93037
+ accountShortName,
93038
+ projectShortName,
93039
+ useProjectProxy,
93040
+ query
93041
+ });
93042
+ const headers = {
93043
+ 'Content-type': 'application/json; charset=UTF-8',
93044
+ ...headersOverride
93045
+ };
93046
+ if (includeAuthorization !== false) {
93047
+ const {
93048
+ session
93049
+ } = identification;
93050
+ if (!headers.Authorization) {
93051
+ if (session) headers.Authorization = `Bearer ${session.token}`;
93052
+ if (authorization) headers.Authorization = authorization;
93053
+ if (config.authOverride) headers.Authorization = config.authOverride;
93054
+ }
93055
+ }
93056
+ return fetch(url.toString(), {
93057
+ method: 'POST',
93058
+ cache: 'no-cache',
93059
+ redirect: 'follow',
93060
+ headers,
93061
+ body: JSON.stringify(document)
93062
+ });
93063
+ }
93064
+
93065
+ var powerpoint = /*#__PURE__*/Object.freeze({
93066
+ __proto__: null,
93067
+ generate: generate,
93068
+ stream: stream
93069
+ });
93070
+
91716
93071
  const proxy = async (resource, options) => {
91717
93072
  const {
91718
93073
  accountShortName,
@@ -91730,9 +93085,9 @@ var utilities = /*#__PURE__*/Object.freeze({
91730
93085
  proxy: proxy
91731
93086
  });
91732
93087
 
91733
- /* yes, this string template literal is weird;
91734
- * it's cause rollup does not recogize 3.34.2 as an individual token otherwise */
91735
- const version = `Epicenter (v${'3.34.2'}) for Module | Build Date: 2026-04-01T19:37:08.284Z`;
93088
+ /* "3.35.0", "Module" and "2026-07-21T22:45:13.866Z" are injected at build time — by
93089
+ * @rollup/plugin-replace for the shipped bundles and by Vite's `define` for tests */
93090
+ const version = `Epicenter (v${"3.35.0"}) for ${"Module"} | Build Date: ${"2026-07-21T22:45:13.866Z"}`;
91736
93091
  const UNAUTHORIZED = 401;
91737
93092
  const FORBIDDEN = 403;
91738
93093
  const DEFAULT_ERROR_HANDLERS = {};
@@ -91781,5 +93136,5 @@ DEFAULT_ERROR_HANDLERS.authInvalidated = errorManager.registerHandler(error => e
91781
93136
  });
91782
93137
  Object.freeze(DEFAULT_ERROR_HANDLERS);
91783
93138
 
91784
- export { Channel, DEFAULT_ERROR_HANDLERS, Fault, PUSH_CATEGORY, RITUAL, ROLE, Router, SCOPE_BOUNDARY, account as accountAdapter, admin as adminAdapter, asset as assetAdapter, authentication as authAdapter, chat as chatAdapter, cometdAdapter, config, consensus as consensusAdapter, daily as dailyAdapter, email as emailAdapter, episode as episodeAdapter, errorManager, group as groupAdapter, leaderboard as leaderboardAdapter, matchmaker as matchmakerAdapter, presence as presenceAdapter, project as projectAdapter, recaptcha as recaptchaAdapter, run as runAdapter, somebody as somebodyAdapter, task as taskAdapter, time as timeAdapter, user as userAdapter, utilities as utils, vault as vaultAdapter, version, video$1 as videoAPI, video as videoAdapter, vonage$1 as vonageAPI, vonage as vonageAdapter, wallet as walletAdapter, world as worldAdapter };
93139
+ export { Channel, DEFAULT_ERROR_HANDLERS, Fault, PUSH_CATEGORY, RITUAL, ROLE, Router, SCOPE_BOUNDARY, account as accountAdapter, admin as adminAdapter, asset as assetAdapter, authentication as authAdapter, chat as chatAdapter, cometdAdapter, config, consensus as consensusAdapter, daily as dailyAdapter, docket as docketAdapter, email as emailAdapter, encyclopedia as encyclopediaAdapter, episode as episodeAdapter, errorManager, file as fileAdapter, git as gitAdapter, group as groupAdapter, leaderboard as leaderboardAdapter, matchmaker as matchmakerAdapter, pipeline as pipelineAdapter, powerpoint as powerpointAdapter, presence as presenceAdapter, project as projectAdapter, recaptcha as recaptchaAdapter, registration as registrationAdapter, run as runAdapter, somebody as somebodyAdapter, task as taskAdapter, time as timeAdapter, user as userAdapter, utilities as utils, vault as vaultAdapter, version, video$1 as videoAPI, video as videoAdapter, vonage$1 as vonageAPI, vonage as vonageAdapter, wallet as walletAdapter, world as worldAdapter };
91785
93140
  //# sourceMappingURL=epicenter.js.map