@gravity-rail/sdk 0.40.0 → 0.42.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.
@@ -130,11 +130,15 @@ function pageQuery(params) {
130
130
  return qs ? `?${qs}` : "";
131
131
  }
132
132
  var BundlesApi = class extends BaseApiClient {
133
- /** Official solution metadata, independent of the default workspace Library. */
134
- async getSolutionRelease(slug) {
135
- return this.fetch(`solutions/${encodeURIComponent(slug)}`);
133
+ /** Bundles shared with everyone. Needs no session. */
134
+ async listPublicBundles(params) {
135
+ return this.fetch(`bundles/public${pageQuery(params)}`);
136
136
  }
137
- /** Read an authorized Bundle by UUID, including official solutions hidden from discovery. */
137
+ /** The outline of one Bundle shared with everyone. Needs no session; 404 otherwise. */
138
+ async getPublicBundle(bundleUuid) {
139
+ return this.fetch(`bundles/${encodeURIComponent(bundleUuid)}/public`);
140
+ }
141
+ /** Read an authorized Bundle by UUID. */
138
142
  async getBundle(wid, bundleUuid) {
139
143
  return this.fetch(bundlesPath(wid, bundleUuid));
140
144
  }
@@ -219,9 +223,9 @@ var BundlesApi = class extends BaseApiClient {
219
223
  return this.fetch(bundlesPath(wid, bundleUuid, "grants"));
220
224
  }
221
225
  /**
222
- * Share throughout the publisher's organization with organization-admin authority.
223
- * Workspace-specific and global author grants are refused. Official public
224
- * solutions use the separate staff approval API.
226
+ * Share throughout the publisher's organization with organization-admin authority,
227
+ * or with everyone (`granteeType: "global"`) as a superuser. Workspace-specific
228
+ * grants are refused.
225
229
  */
226
230
  async grantBundle(wid, bundleUuid, data) {
227
231
  return this.fetch(bundlesPath(wid, bundleUuid, "grants"), {
@@ -8678,15 +8682,11 @@ var WorkflowsApi = class extends BaseApiClient {
8678
8682
  return this.fetch(`w/${wid}/workflows/${id}/diagram${query}`);
8679
8683
  }
8680
8684
  /**
8681
- * Get workflow thumbnail URL.
8682
- * For cross-domain setups, returns a same-origin proxy URL to ensure cookies are sent.
8683
- * For same-origin setups, returns the direct API URL.
8685
+ * The outline a Workflow's diagram is drawn from: its active Tasks, its
8686
+ * start Task, the moves between Tasks and its Ability types.
8684
8687
  */
8685
- getWorkflowThumbnailUrl(wid, id) {
8686
- if (this.isCrossDomain) {
8687
- return `/api/v2/w/${wid}/workflows/${id}/thumbnail`;
8688
- }
8689
- return `${this.baseUrl}/api/v2/w/${wid}/workflows/${id}/thumbnail`;
8688
+ async getWorkflowOutline(wid, id) {
8689
+ return this.fetch(`w/${wid}/workflows/${id}/outline`);
8690
8690
  }
8691
8691
  /** Create a new workflow in a workspace. */
8692
8692
  async createWorkflow(wid, workflow) {
@@ -11424,25 +11424,6 @@ var TrackedLinksApi = class extends BaseApiClient {
11424
11424
  }
11425
11425
  };
11426
11426
 
11427
- // src/types/generated/bundle_contract.ts
11428
- var BundleGrantRequestGranteeType = {
11429
- organization: "organization",
11430
- global: "global"
11431
- };
11432
- var FormBundleItemRecordScope = {
11433
- member: "member",
11434
- workspace: "workspace",
11435
- anonymous: "anonymous"
11436
- };
11437
- var SolutionReleaseResponseSlug = {
11438
- "member-enrollment": "member-enrollment",
11439
- "member-reengagement": "member-reengagement",
11440
- "treatment-adherence": "treatment-adherence",
11441
- "heart-health": "heart-health",
11442
- "recovery-checkins": "recovery-checkins",
11443
- "care-coordination": "care-coordination"
11444
- };
11445
-
11446
11427
  // src/app-context.ts
11447
11428
  function formatAppContextAsMarkdown(context) {
11448
11429
  if (!context) {
@@ -12197,11 +12178,11 @@ var WORKSPACE_METHOD_NAMES = [
12197
12178
  "getWorkflowDeletionPreview",
12198
12179
  "getWorkflowDiagram",
12199
12180
  "getWorkflowNotes",
12181
+ "getWorkflowOutline",
12200
12182
  "getWorkflowRevision",
12201
12183
  "getWorkflowRevisions",
12202
12184
  "getWorkflowTaskAssignmentStats",
12203
12185
  "getWorkflowTemplates",
12204
- "getWorkflowThumbnailUrl",
12205
12186
  "getWorkflows",
12206
12187
  "getWorkflowsActivityBatch",
12207
12188
  "getWorkspace",
@@ -13103,7 +13084,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
13103
13084
  target.getWorkflowActivity = workflows.getWorkflowActivity.bind(workflows);
13104
13085
  target.getWorkflowsActivityBatch = workflows.getWorkflowsActivityBatch.bind(workflows);
13105
13086
  target.getWorkflowDiagram = workflows.getWorkflowDiagram.bind(workflows);
13106
- target.getWorkflowThumbnailUrl = workflows.getWorkflowThumbnailUrl.bind(workflows);
13087
+ target.getWorkflowOutline = workflows.getWorkflowOutline.bind(workflows);
13107
13088
  target.createWorkflow = workflows.createWorkflow.bind(workflows);
13108
13089
  target.updateWorkflow = workflows.updateWorkflow.bind(workflows);
13109
13090
  target.getWorkflowDeletionPreview = workflows.getWorkflowDeletionPreview.bind(workflows);
@@ -13596,7 +13577,8 @@ function bindResourceWorkflowsMethods(target, resourceWorkflows) {
13596
13577
  // src/client/bindings/bundles.ts
13597
13578
  function bindBundlesMethods(target, bundles, resourceWorkflows) {
13598
13579
  bindResourceWorkflowsMethods(target, resourceWorkflows);
13599
- target.getSolutionRelease = bundles.getSolutionRelease.bind(bundles);
13580
+ target.listPublicBundles = bundles.listPublicBundles.bind(bundles);
13581
+ target.getPublicBundle = bundles.getPublicBundle.bind(bundles);
13600
13582
  target.updateBundle = bundles.updateBundle.bind(bundles);
13601
13583
  target.listBundleInstallations = bundles.listBundleInstallations.bind(bundles);
13602
13584
  target.listBundles = bundles.listBundles.bind(bundles);
@@ -14128,7 +14110,8 @@ var GravityRailClient = class {
14128
14110
  updateBundle;
14129
14111
  listBundleInstallations;
14130
14112
  // Bundles API
14131
- getSolutionRelease;
14113
+ listPublicBundles;
14114
+ getPublicBundle;
14132
14115
  listBundles;
14133
14116
  listBundleWorkflowCandidates;
14134
14117
  createBundle;
@@ -14494,7 +14477,7 @@ var GravityRailClient = class {
14494
14477
  getWorkflowActivity;
14495
14478
  getWorkflowsActivityBatch;
14496
14479
  getWorkflowDiagram;
14497
- getWorkflowThumbnailUrl;
14480
+ getWorkflowOutline;
14498
14481
  createWorkflow;
14499
14482
  updateWorkflow;
14500
14483
  getWorkflowDeletionPreview;
@@ -16576,9 +16559,6 @@ export {
16576
16559
  TERMINAL_TASK_STATES,
16577
16560
  WorkspaceInvitationsApi,
16578
16561
  WorkspacesApi,
16579
- BundleGrantRequestGranteeType,
16580
- FormBundleItemRecordScope,
16581
- SolutionReleaseResponseSlug,
16582
16562
  formatAppContextAsMarkdown,
16583
16563
  createApiModules,
16584
16564
  createWorkspaceClient,
@@ -16709,4 +16689,4 @@ export {
16709
16689
  SCOPE_PRESETS,
16710
16690
  getRevisionState
16711
16691
  };
16712
- //# sourceMappingURL=chunk-ZTUOB4V2.js.map
16692
+ //# sourceMappingURL=chunk-JTOMGNUO.js.map