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