@gravity-rail/sdk 0.36.0 → 0.40.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 (57) hide show
  1. package/README.md +44 -21
  2. package/dist/agui.d.cts +1 -1
  3. package/dist/agui.d.ts +1 -1
  4. package/dist/audio.d.cts +1 -1
  5. package/dist/audio.d.ts +1 -1
  6. package/dist/{chat-interaction-Ck1oMOr5.d.ts → chat-interaction-BB3ap8_u.d.ts} +8920 -6212
  7. package/dist/{chat-interaction-DqQu8Ad1.d.cts → chat-interaction-Bj1pciwo.d.cts} +8920 -6212
  8. package/dist/{chunk-P2E6LU7I.js → chunk-67QXTQVL.js} +1 -26
  9. package/dist/chunk-67QXTQVL.js.map +1 -0
  10. package/dist/chunk-6KPGCPGW.js +48 -0
  11. package/dist/chunk-6KPGCPGW.js.map +1 -0
  12. package/dist/{chunk-HRUMZ46V.js → chunk-72SWNLVD.js} +2 -1
  13. package/dist/chunk-72SWNLVD.js.map +1 -0
  14. package/dist/{chunk-R3C63RZJ.js → chunk-ZTUOB4V2.js} +1278 -218
  15. package/dist/chunk-ZTUOB4V2.js.map +1 -0
  16. package/dist/helpers.cjs +47 -0
  17. package/dist/helpers.cjs.map +1 -1
  18. package/dist/helpers.d.cts +4 -3
  19. package/dist/helpers.d.ts +4 -3
  20. package/dist/helpers.js +7 -1
  21. package/dist/helpers.js.map +1 -1
  22. package/dist/index.cjs +1389 -350
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +13 -35
  25. package/dist/index.d.ts +13 -35
  26. package/dist/index.js +112 -122
  27. package/dist/index.js.map +1 -1
  28. package/dist/internal.cjs +1303 -252
  29. package/dist/internal.cjs.map +1 -1
  30. package/dist/internal.d.cts +338 -55
  31. package/dist/internal.d.ts +338 -55
  32. package/dist/internal.js +68 -21
  33. package/dist/internal.js.map +1 -1
  34. package/dist/member-import-D8fZr2Pd.d.cts +46 -0
  35. package/dist/member-import-YNk9MlEl.d.ts +46 -0
  36. package/dist/realtime.cjs +91 -20
  37. package/dist/realtime.cjs.map +1 -1
  38. package/dist/realtime.d.cts +34 -9
  39. package/dist/realtime.d.ts +34 -9
  40. package/dist/realtime.js +90 -20
  41. package/dist/realtime.js.map +1 -1
  42. package/dist/{revision-state-Tn2V0-zt.d.cts → revision-state-BaJTq3Or.d.ts} +271 -55
  43. package/dist/{revision-state-V5RIhte0.d.ts → revision-state-CL11FA-T.d.cts} +271 -55
  44. package/dist/schemas.cjs +58 -81
  45. package/dist/schemas.cjs.map +1 -1
  46. package/dist/schemas.d.cts +88 -225
  47. package/dist/schemas.d.ts +88 -225
  48. package/dist/schemas.js +58 -76
  49. package/dist/schemas.js.map +1 -1
  50. package/dist/{tasks-BH_i_pVb.d.cts → tasks-ByJCQ5BI.d.cts} +3003 -2508
  51. package/dist/{tasks-BH_i_pVb.d.ts → tasks-ByJCQ5BI.d.ts} +3003 -2508
  52. package/dist/{types-0c6_NGU4.d.cts → types-DlfADjPR.d.cts} +17 -2
  53. package/dist/{types-0c6_NGU4.d.ts → types-DlfADjPR.d.ts} +17 -2
  54. package/package.json +9 -7
  55. package/dist/chunk-HRUMZ46V.js.map +0 -1
  56. package/dist/chunk-P2E6LU7I.js.map +0 -1
  57. package/dist/chunk-R3C63RZJ.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ApiError,
3
3
  BaseApiClient
4
- } from "./chunk-P2E6LU7I.js";
4
+ } from "./chunk-67QXTQVL.js";
5
5
 
6
6
  // src/api/abilities.ts
7
7
  var AbilitiesApi = class extends BaseApiClient {
@@ -71,6 +71,299 @@ var AbilitiesApi = class extends BaseApiClient {
71
71
  }
72
72
  };
73
73
 
74
+ // src/api/resource-workflows.ts
75
+ function resourceWorkflowsPath(wid, ...segments) {
76
+ const tail = segments.map((segment) => encodeURIComponent(String(segment))).join("/");
77
+ const base = `w/${encodeURIComponent(wid)}/resource-workflows`;
78
+ return tail ? `${base}/${tail}` : base;
79
+ }
80
+ var ResourceWorkflowsApi = class extends BaseApiClient {
81
+ /** One Workflow's summary, for a viewer that can see it. */
82
+ async getResourceWorkflow(wid, workflowUuid) {
83
+ return this.fetch(resourceWorkflowsPath(wid, workflowUuid));
84
+ }
85
+ /**
86
+ * One published revision.
87
+ *
88
+ * The response is a union: the owner (or a `full` grantee) receives the
89
+ * complete `ResourceWorkflowGraphResponse`, while a bounded grantee receives
90
+ * the `ResourceWorkflowDisclosureResponse` envelope. Branch on `publishedAt`
91
+ * being present — never assume the full shape. A retained revision stays
92
+ * readable here after a `stop_updates` revocation.
93
+ */
94
+ async getResourceWorkflowRevision(wid, workflowUuid, revisionUuid) {
95
+ return this.fetch(
96
+ resourceWorkflowsPath(wid, workflowUuid, "revisions", revisionUuid)
97
+ );
98
+ }
99
+ /**
100
+ * List published Workflows owned by or shared with this workspace.
101
+ *
102
+ * The Bundle draft editor reads `publishedRevisionUuid` from each summary to
103
+ * pin a Workflow item; archived Workflows are excluded unless asked for.
104
+ */
105
+ async listResourceWorkflows(wid, params) {
106
+ const query = new URLSearchParams();
107
+ if (params?.page !== void 0) query.set("page", String(params.page));
108
+ if (params?.pageSize !== void 0) query.set("pageSize", String(params.pageSize));
109
+ if (params?.includeArchived !== void 0) {
110
+ query.set("includeArchived", String(params.includeArchived));
111
+ }
112
+ const qs = query.toString();
113
+ return this.fetch(
114
+ `w/${encodeURIComponent(wid)}/resource-workflows${qs ? `?${qs}` : ""}`
115
+ );
116
+ }
117
+ };
118
+
119
+ // src/api/bundles.ts
120
+ function bundlesPath(wid, ...segments) {
121
+ const tail = segments.map((segment) => encodeURIComponent(String(segment))).join("/");
122
+ const base = `w/${encodeURIComponent(wid)}/bundles`;
123
+ return tail ? `${base}/${tail}` : base;
124
+ }
125
+ function pageQuery(params) {
126
+ const query = new URLSearchParams();
127
+ if (params?.page !== void 0) query.set("page", String(params.page));
128
+ if (params?.pageSize !== void 0) query.set("pageSize", String(params.pageSize));
129
+ const qs = query.toString();
130
+ return qs ? `?${qs}` : "";
131
+ }
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)}`);
136
+ }
137
+ /** Read an authorized Bundle by UUID, including official solutions hidden from discovery. */
138
+ async getBundle(wid, bundleUuid) {
139
+ return this.fetch(bundlesPath(wid, bundleUuid));
140
+ }
141
+ async updateBundle(wid, bundleUuid, data) {
142
+ return this.fetch(
143
+ `w/${encodeURIComponent(wid)}/bundles/${encodeURIComponent(bundleUuid)}`,
144
+ {
145
+ method: "PATCH",
146
+ body: JSON.stringify(data)
147
+ }
148
+ );
149
+ }
150
+ async listBundleInstallations(wid, bundleUuid) {
151
+ return this.fetch(
152
+ `w/${encodeURIComponent(wid)}/bundles/${encodeURIComponent(bundleUuid)}/installations`
153
+ );
154
+ }
155
+ /**
156
+ * Bundles visible to this workspace through ownership, a live grant, or
157
+ * an administrator of the owning organization.
158
+ */
159
+ async listBundles(wid, params) {
160
+ return this.fetch(`${bundlesPath(wid)}${pageQuery(params)}`);
161
+ }
162
+ /**
163
+ * This workspace's Workflows for the Bundle picker. `eligible` pins
164
+ * `revisionUuid` (the active revision when published, else the newest
165
+ * published one); `unpublished` has nothing to pin. `dependenciesChecked` is
166
+ * false until a Bundle add has stored the revision's dependencies; that add
167
+ * surfaces any refusal as a 409 `workflow_not_shareable`. Requires
168
+ * `workflows:admin`.
169
+ */
170
+ async listBundleWorkflowCandidates(wid) {
171
+ return this.fetch(bundlesPath(wid, "workflow-candidates"));
172
+ }
173
+ /** Create an empty Bundle owned by this workspace. */
174
+ async createBundle(wid, data) {
175
+ return this.fetch(bundlesPath(wid), {
176
+ method: "POST",
177
+ body: JSON.stringify(data)
178
+ });
179
+ }
180
+ /**
181
+ * The unpublished draft for the owning workspace. A grantee is refused with
182
+ * 404: `version_detail` checks
183
+ * `root.workspace_uuid != viewer.workspace_uuid` for the null version
184
+ * (`lib/db/resources/bundles.py`), after the grantee-inclusive predicate has
185
+ * already admitted them to the Bundle itself.
186
+ *
187
+ * After publication, the next draft contains a copy of the published items.
188
+ * The owner receives it with 200; a grantee receives 404.
189
+ */
190
+ async getBundleDraft(wid, bundleUuid) {
191
+ return this.fetch(bundlesPath(wid, bundleUuid, "draft"));
192
+ }
193
+ /** Replace the whole draft item list. 409 when `expectedGeneration` is stale. */
194
+ async replaceBundleDraft(wid, bundleUuid, data) {
195
+ return this.fetch(bundlesPath(wid, bundleUuid, "draft"), {
196
+ method: "PUT",
197
+ body: JSON.stringify(data)
198
+ });
199
+ }
200
+ /** Cut a new immutable version from the draft. 409 when `expectedGeneration` is stale. */
201
+ async publishBundle(wid, bundleUuid, data) {
202
+ return this.fetch(bundlesPath(wid, bundleUuid, "publish"), {
203
+ method: "POST",
204
+ body: JSON.stringify(data)
205
+ });
206
+ }
207
+ /** Published versions, newest first. */
208
+ async listBundleVersions(wid, bundleUuid, params) {
209
+ return this.fetch(
210
+ `${bundlesPath(wid, bundleUuid, "versions")}${pageQuery(params)}`
211
+ );
212
+ }
213
+ /** One published version, with its items, declared settings and open slots. */
214
+ async getBundleVersion(wid, bundleUuid, version) {
215
+ return this.fetch(bundlesPath(wid, bundleUuid, "versions", version));
216
+ }
217
+ /** Who this Bundle is currently granted to. */
218
+ async listBundleGrants(wid, bundleUuid) {
219
+ return this.fetch(bundlesPath(wid, bundleUuid, "grants"));
220
+ }
221
+ /**
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.
225
+ */
226
+ async grantBundle(wid, bundleUuid, data) {
227
+ return this.fetch(bundlesPath(wid, bundleUuid, "grants"), {
228
+ method: "POST",
229
+ body: JSON.stringify(data)
230
+ });
231
+ }
232
+ /** Revoke one grant by id. */
233
+ async revokeBundleGrant(wid, bundleUuid, grantId) {
234
+ return this.fetch(bundlesPath(wid, bundleUuid, "grants", grantId), {
235
+ method: "DELETE"
236
+ });
237
+ }
238
+ };
239
+
240
+ // src/api/installations.ts
241
+ function installationsPath(wid, ...segments) {
242
+ const tail = segments.map((segment) => encodeURIComponent(String(segment))).join("/");
243
+ const base = `w/${encodeURIComponent(wid)}/installations`;
244
+ return tail ? `${base}/${tail}` : base;
245
+ }
246
+ var InstallationsApi = class extends BaseApiClient {
247
+ /** Inspect one published release and its selected example dependencies. */
248
+ async preflightBundleInstallation(wid, bundleUuid, data) {
249
+ return this.fetch(
250
+ `w/${encodeURIComponent(wid)}/bundles/${encodeURIComponent(bundleUuid)}/installation-preflight`,
251
+ { method: "POST", body: JSON.stringify(data) }
252
+ );
253
+ }
254
+ /**
255
+ * Install a published Bundle version into this workspace.
256
+ *
257
+ * A key in `bindings` that this version has no slot or Form item for is
258
+ * refused; a **missing** required slot is not.
259
+ */
260
+ async installBundle(wid, bundleUuid, data) {
261
+ return this.fetch(
262
+ `w/${encodeURIComponent(wid)}/bundles/${encodeURIComponent(bundleUuid)}/installations`,
263
+ { method: "POST", body: JSON.stringify(data) }
264
+ );
265
+ }
266
+ /** Every installation this workspace holds, oldest first. */
267
+ async listInstallations(wid) {
268
+ return this.fetch(installationsPath(wid));
269
+ }
270
+ async getInstallation(wid, installationUuid) {
271
+ return this.fetch(installationsPath(wid, installationUuid));
272
+ }
273
+ /**
274
+ * Open slots, bindings whose target no longer resolves, Forms that drifted
275
+ * from their recipe, missing or changed Workflow dependencies, and archived
276
+ * items. Computed on read, never stored.
277
+ */
278
+ async getInstallationReadiness(wid, installationUuid) {
279
+ return this.fetch(
280
+ installationsPath(wid, installationUuid, "readiness")
281
+ );
282
+ }
283
+ /**
284
+ * What moving to version `to` would change: per-item differences, the slots
285
+ * that would still be unbound, and the release notes of every version in
286
+ * between. `to` must be newer than the version the installation holds.
287
+ */
288
+ async previewInstallationUpgrade(wid, installationUuid, to) {
289
+ const query = new URLSearchParams({ to: String(to) });
290
+ return this.fetch(
291
+ `${installationsPath(wid, installationUuid, "upgrade-preview")}?${query.toString()}`
292
+ );
293
+ }
294
+ /**
295
+ * Move the installation onto a newer published version. The version it
296
+ * already holds, and any earlier one, are refused with 409.
297
+ */
298
+ async upgradeInstallation(wid, installationUuid, data) {
299
+ return this.fetch(installationsPath(wid, installationUuid, "upgrade"), {
300
+ method: "POST",
301
+ body: JSON.stringify(data)
302
+ });
303
+ }
304
+ /** Recreate one deleted Form from the version already installed. */
305
+ async restoreInstallationForm(wid, installationUuid, data) {
306
+ return this.fetch(
307
+ installationsPath(wid, installationUuid, "restore-form"),
308
+ {
309
+ method: "POST",
310
+ body: JSON.stringify(data)
311
+ }
312
+ );
313
+ }
314
+ /** Recreate missing dependency resources for an installed Workflow. */
315
+ async restoreInstallationWorkflowResources(wid, installationUuid, data) {
316
+ return this.fetch(
317
+ installationsPath(wid, installationUuid, "restore-workflow-resources"),
318
+ { method: "POST", body: JSON.stringify(data) }
319
+ );
320
+ }
321
+ /** `pinned` holds the installed version; `auto` follows each publication. */
322
+ async setInstallationPolicy(wid, installationUuid, data) {
323
+ return this.fetch(installationsPath(wid, installationUuid), {
324
+ method: "PATCH",
325
+ body: JSON.stringify(data)
326
+ });
327
+ }
328
+ /** Stop future Bundle updates while keeping the workspace's installed content. */
329
+ async unsubscribeInstallation(wid, installationUuid) {
330
+ return this.fetch(
331
+ installationsPath(wid, installationUuid, "unsubscribe"),
332
+ { method: "POST", body: JSON.stringify({}) }
333
+ );
334
+ }
335
+ /** Fill open slots. A slot that already carries a target is refused with 409. */
336
+ async bindInstallationSlots(wid, installationUuid, data) {
337
+ return this.fetch(
338
+ installationsPath(wid, installationUuid, "bindings"),
339
+ { method: "POST", body: JSON.stringify(data) }
340
+ );
341
+ }
342
+ /**
343
+ * Settle an installation left `pending` by an interrupted operation.
344
+ *
345
+ * The body is empty and required: a bodyless cookie-auth POST is forgeable
346
+ * by a cross-site form, so the route demands JSON.
347
+ */
348
+ async reconcileInstallation(wid, installationUuid) {
349
+ return this.fetch(
350
+ installationsPath(wid, installationUuid, "reconcile"),
351
+ { method: "POST", body: JSON.stringify({}) }
352
+ );
353
+ }
354
+ /**
355
+ * The settings a compiled theme declares, for labelling a Site item's slots
356
+ * before any Site exists. 404 for an unknown slug and for `source-site`,
357
+ * whose schema is a per-workspace build artifact rather than a catalog one.
358
+ * Requires `sites:read`; no Bundle installation authority is needed.
359
+ */
360
+ async getThemeSettingsSchema(wid, slug) {
361
+ return this.fetch(
362
+ `w/${encodeURIComponent(wid)}/themes/${encodeURIComponent(slug)}/settings-schema`
363
+ );
364
+ }
365
+ };
366
+
74
367
  // src/api/access-grants.ts
75
368
  var AccessGrantsApi = class extends BaseApiClient {
76
369
  /** List access grants received by the current member. */
@@ -203,7 +496,6 @@ var AgentsApi = class extends BaseApiClient {
203
496
  if (options.search) params.append("search", options.search);
204
497
  if (options.includeArchived)
205
498
  params.append("includeArchived", options.includeArchived.toString());
206
- if (options.owner) params.append("owner", options.owner);
207
499
  return this.fetch(
208
500
  `w/${wid}/agents${params.toString() ? `?${params.toString()}` : ""}`
209
501
  );
@@ -259,6 +551,18 @@ var AIModelsApi = class extends BaseApiClient {
259
551
  const url = queryString ? `ai-models/chat?${queryString}` : "ai-models/chat";
260
552
  return this.fetch(url);
261
553
  }
554
+ /**
555
+ * Get the models a member may pick for the Workspace Manager, in display
556
+ * order. Only models this deployment can serve are listed.
557
+ *
558
+ * `tokenMultiplier` is each model's input + output price per token relative
559
+ * to `baselineModelId`; `defaultModelId` is what the Manager runs with no
560
+ * pick. Send a pick on a Manager chat as `AppContext.managerModel` /
561
+ * `managerReasoningEffort`.
562
+ */
563
+ async getManagerModels() {
564
+ return this.fetch("ai-models/manager");
565
+ }
262
566
  /**
263
567
  * Get available realtime AI models
264
568
  */
@@ -710,6 +1014,19 @@ var AuthApi = class extends BaseApiClient {
710
1014
  body: JSON.stringify(request)
711
1015
  });
712
1016
  }
1017
+ /**
1018
+ * Mint a single-use, account-bound realtime login token (`gr_wst_`) with
1019
+ * this client's credential. Call once per realtime connect attempt; the
1020
+ * token is spent on first use and expires in seconds. Only the full browser
1021
+ * session may mint one — an API key is refused.
1022
+ */
1023
+ async createRealtimeLoginToken() {
1024
+ return this.fetch("auth/realtime/ws-token", {
1025
+ method: "POST",
1026
+ // The route requires a JSON body (its CSRF barrier); it reads nothing from it.
1027
+ body: JSON.stringify({})
1028
+ });
1029
+ }
713
1030
  /** Get the organization and workspace mapping for a custom domain. */
714
1031
  async getDomainMapping(customDomain) {
715
1032
  return this.fetch(`s/mapping/${customDomain}`);
@@ -1369,6 +1686,26 @@ var ChatsApi = class extends BaseApiClient {
1369
1686
  async getChat(wid, id) {
1370
1687
  return this.fetch(`w/${wid}/chats/${id}`);
1371
1688
  }
1689
+ /**
1690
+ * Get a single chat by UUID.
1691
+ *
1692
+ * The uuid-addressed twin of `getChat`: same access check (own chat,
1693
+ * otherwise `chats:read`), same body; a chat the caller may not read is a
1694
+ * 404. Activity events and org webhooks name a chat by `uuid` only.
1695
+ */
1696
+ async getChatByUuid(wid, uuid) {
1697
+ return this.fetch(`w/${wid}/chats/by-uuid/${uuid}`);
1698
+ }
1699
+ async saveChatBrowserStorage(wid, chatId) {
1700
+ await this.fetchRaw(`w/${wid}/chats/${chatId}/browser/storage/save`, {
1701
+ method: "POST",
1702
+ keepalive: true,
1703
+ body: JSON.stringify({})
1704
+ });
1705
+ }
1706
+ async clearChatBrowserStorage(wid, chatId) {
1707
+ await this.fetchRaw(`w/${wid}/chats/${chatId}/browser/storage`, { method: "DELETE" });
1708
+ }
1372
1709
  /**
1373
1710
  * Get a short-lived, interactive AgentCore browser view for this Chat.
1374
1711
  *
@@ -2049,6 +2386,26 @@ var DataTypesApi = class extends BaseApiClient {
2049
2386
  `w/${wid}/data-types/${dataTypeId}/records${params?.toString() ? `?${params.toString()}` : ""}`
2050
2387
  );
2051
2388
  }
2389
+ /**
2390
+ * List an anonymous Form's submissions, newest first. Requires
2391
+ * `anonymous_submissions:read`. Submissions are immutable: there is no
2392
+ * update or delete method.
2393
+ */
2394
+ async listAnonymousFormSubmissions(wid, dataTypeId, options) {
2395
+ const params = new URLSearchParams();
2396
+ if (options?.page) params.append("page", options.page.toString());
2397
+ if (options?.pageSize) params.append("page_size", options.pageSize.toString());
2398
+ const qs = params.toString();
2399
+ return this.fetch(
2400
+ `w/${wid}/data-types/${dataTypeId}/anonymous-submissions${qs ? `?${qs}` : ""}`
2401
+ );
2402
+ }
2403
+ /** Get one anonymous Form submission by its uuid. Requires `anonymous_submissions:read`. */
2404
+ async getAnonymousFormSubmission(wid, dataTypeId, submissionUuid) {
2405
+ return this.fetch(
2406
+ `w/${wid}/data-types/${dataTypeId}/anonymous-submissions/${encodeURIComponent(submissionUuid)}`
2407
+ );
2408
+ }
2052
2409
  // Data-record filter APIs (saved Query IR predicates per form)
2053
2410
  /** List saved data-record filters, optionally scoped to one DataType. */
2054
2411
  async getDataRecordFilters(wid, options) {
@@ -2091,6 +2448,15 @@ var DataTypesApi = class extends BaseApiClient {
2091
2448
  async getDataRecord(wid, recordId) {
2092
2449
  return this.fetch(`w/${wid}/data-types/records/${recordId}`);
2093
2450
  }
2451
+ /**
2452
+ * Get a single data record by UUID.
2453
+ *
2454
+ * The uuid-addressed twin of `getDataRecord`: same access check, same body.
2455
+ * Activity events and org webhooks name a record by `uuid` only.
2456
+ */
2457
+ async getDataRecordByUuid(wid, uuid) {
2458
+ return this.fetch(`w/${wid}/data-types/records/by-uuid/${uuid}`);
2459
+ }
2094
2460
  /** Create a new data record under the specified data type. */
2095
2461
  async createDataRecord(wid, dataTypeId, record) {
2096
2462
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/records`, {
@@ -2536,20 +2902,6 @@ var EventsApi = class extends BaseApiClient {
2536
2902
  body: JSON.stringify(request)
2537
2903
  });
2538
2904
  }
2539
- /**
2540
- * Preview which target-audience roles lack Workflow USE for the Workflows a
2541
- * draft Routine would start. Non-persisting, non-blocking authoring assist —
2542
- * returns warnings only (role/Workflow names + IDs; no Member data).
2543
- */
2544
- async previewRoutineWorkflowAccess(wid, request) {
2545
- return this.fetch(
2546
- `w/${wid}/routines/preview-workflow-access`,
2547
- {
2548
- method: "POST",
2549
- body: JSON.stringify(request)
2550
- }
2551
- );
2552
- }
2553
2905
  /**
2554
2906
  * Preview what would stop a draft Routine placing its scheduled outbound
2555
2907
  * calls — the Member voice opt-out, a missing member phone, or a
@@ -3143,6 +3495,19 @@ var FilesApi = class extends BaseApiClient {
3143
3495
  if (folderId != null) params.append("folderId", String(folderId));
3144
3496
  return this.fetch(`w/${wid}/files/resolve-path?${params.toString()}`);
3145
3497
  }
3498
+ /**
3499
+ * Download one file's bytes via GET ``.../files/{id}/contents/{filename}``.
3500
+ *
3501
+ * Uses this client's base URL (FastAPI on the app, same-origin ``/api/v2``
3502
+ * on scoped site sessions) so the payload does not transit the Next.js
3503
+ * ``/api/w/.../files/...`` Lambda proxy, which 500s above the 6MB sync cap.
3504
+ */
3505
+ async downloadFileContents(wid, id, filename) {
3506
+ const response = await this.fetchRaw(
3507
+ `w/${wid}/files/${id}/contents/${encodeURIComponent(filename)}`
3508
+ );
3509
+ return response.blob();
3510
+ }
3146
3511
  /**
3147
3512
  * Download the given files + folders (folders recursively) as a single ZIP.
3148
3513
  * Returns the raw archive bytes for the caller to save.
@@ -3894,7 +4259,21 @@ function throwMemberImportError(errorBody, fallback) {
3894
4259
  }
3895
4260
  throw new Error(typeof detail === "string" ? detail : fallback);
3896
4261
  }
4262
+ function memberImportUpload(file, roleId, options) {
4263
+ const body = new FormData();
4264
+ const filename = "name" in file && typeof file.name === "string" ? file.name : "members.csv";
4265
+ body.append("file", file, filename);
4266
+ if (options?.resolutions !== void 0) {
4267
+ body.append("resolutions", JSON.stringify(options.resolutions));
4268
+ }
4269
+ const params = new URLSearchParams({ new_member_role_id: String(roleId) });
4270
+ if (options?.autoPromoteUniqueContacts !== void 0) {
4271
+ params.set("auto_promote_unique_contacts", String(options.autoPromoteUniqueContacts));
4272
+ }
4273
+ return { body, params };
4274
+ }
3897
4275
  var MembersApi = class extends BaseApiClient {
4276
+ memberImportPlans = /* @__PURE__ */ new WeakMap();
3898
4277
  /** Get the currently authenticated member for a workspace. */
3899
4278
  async getCurrentMember(wid) {
3900
4279
  return this.fetch(`w/${wid}/me`);
@@ -3947,33 +4326,6 @@ var MembersApi = class extends BaseApiClient {
3947
4326
  `w/${wid}/me/records?${params.toString()}`
3948
4327
  );
3949
4328
  }
3950
- /**
3951
- * Get all members owned by the current member in this workspace.
3952
- * Returns the authenticated member plus any members they own (via owner_id).
3953
- * Used by the member switcher to show available identities.
3954
- */
3955
- async getOwnedMembers(wid) {
3956
- return this.fetch(`w/${wid}/members/owned`);
3957
- }
3958
- /**
3959
- * Switch to a different member identity owned by the current member.
3960
- * Sets the actingAsMemberUuid cookie for subsequent requests.
3961
- * Uses UUID (not ID) to prevent cross-workspace identity confusion.
3962
- */
3963
- async switchMember(wid, memberUuid) {
3964
- return this.fetch(`w/${wid}/members/switch`, {
3965
- method: "POST",
3966
- body: JSON.stringify({ memberUuid })
3967
- });
3968
- }
3969
- /**
3970
- * Clear the member switch and return to the authenticated member.
3971
- */
3972
- async clearMemberSwitch(wid) {
3973
- return this.fetch(`w/${wid}/members/switch`, {
3974
- method: "DELETE"
3975
- });
3976
- }
3977
4329
  /** Update the currently authenticated member's profile. */
3978
4330
  async updateCurrentMember(wid, member) {
3979
4331
  return this.fetch(`w/${wid}/me`, {
@@ -4013,6 +4365,16 @@ var MembersApi = class extends BaseApiClient {
4013
4365
  async getWorkspaceMember(wid, memberId) {
4014
4366
  return this.fetch(`w/${wid}/members/${memberId}`);
4015
4367
  }
4368
+ /**
4369
+ * Get a single workspace member by UUID.
4370
+ *
4371
+ * The uuid-addressed twin of `getWorkspaceMember`: same access check (self,
4372
+ * otherwise `members:read`), same body. Activity events and org webhooks
4373
+ * name a member by `uuid` only.
4374
+ */
4375
+ async getMemberByUuid(wid, uuid) {
4376
+ return this.fetch(`w/${wid}/members/by-uuid/${uuid}`);
4377
+ }
4016
4378
  /**
4017
4379
  * Get one member of an org's workspace, under `org:read`.
4018
4380
  *
@@ -4064,6 +4426,53 @@ var MembersApi = class extends BaseApiClient {
4064
4426
  method: "POST"
4065
4427
  });
4066
4428
  }
4429
+ /**
4430
+ * Update a workspace member addressed by its external id.
4431
+ *
4432
+ * The external-id twin of `updateMember`: for an integrator that keys on its
4433
+ * own `externalId` and never stores our numeric member id. Same authorization
4434
+ * (`members:write`) and same body as `updateMember`.
4435
+ */
4436
+ async updateMemberByExternalId(wid, externalId, data) {
4437
+ return this.fetch(
4438
+ `w/${wid}/members/by-external-id/${encodeURIComponent(externalId)}`,
4439
+ {
4440
+ method: "PUT",
4441
+ body: JSON.stringify(data)
4442
+ }
4443
+ );
4444
+ }
4445
+ /**
4446
+ * Archive a workspace member addressed by its external id.
4447
+ *
4448
+ * The external-id twin of `archiveMember`; same authorization
4449
+ * (`members:write` + `members:admin`) and same body.
4450
+ */
4451
+ async archiveMemberByExternalId(wid, externalId) {
4452
+ return this.fetch(
4453
+ `w/${wid}/members/by-external-id/${encodeURIComponent(externalId)}/archive`,
4454
+ {
4455
+ method: "POST",
4456
+ // Required empty JSON body is the route's CSRF barrier (GRA-6284).
4457
+ body: JSON.stringify({})
4458
+ }
4459
+ );
4460
+ }
4461
+ /**
4462
+ * Unarchive a workspace member addressed by its external id.
4463
+ *
4464
+ * The external-id twin of `unarchiveMember`; same authorization and body.
4465
+ */
4466
+ async unarchiveMemberByExternalId(wid, externalId) {
4467
+ return this.fetch(
4468
+ `w/${wid}/members/by-external-id/${encodeURIComponent(externalId)}/unarchive`,
4469
+ {
4470
+ method: "POST",
4471
+ // Required empty JSON body is the route's CSRF barrier (GRA-6284).
4472
+ body: JSON.stringify({})
4473
+ }
4474
+ );
4475
+ }
4067
4476
  /**
4068
4477
  * Send the member an SMS asking them to confirm their phone number. When they
4069
4478
  * reply, a trusted phone auth binding is created so they can use SMS as
@@ -4205,16 +4614,13 @@ var MembersApi = class extends BaseApiClient {
4205
4614
  * operator can decide whether to skip or explicitly overwrite before
4206
4615
  * committing. Requires MEMBERS_ADMIN and is bulk-PHI audited server-side.
4207
4616
  */
4208
- async previewImportMembers(wid, file, newMemberRoleId) {
4209
- const formData = new FormData();
4210
- formData.append("file", file);
4211
- const params = new URLSearchParams();
4212
- params.append("new_member_role_id", newMemberRoleId.toString());
4617
+ async previewImportMembers(wid, file, newMemberRoleId, options) {
4618
+ const { body, params } = memberImportUpload(file, newMemberRoleId, options);
4213
4619
  const response = await this.fetchRaw(
4214
4620
  `w/${wid}/members/import/preview?${params.toString()}`,
4215
4621
  {
4216
4622
  method: "POST",
4217
- body: formData
4623
+ body
4218
4624
  },
4219
4625
  [400, 413]
4220
4626
  );
@@ -4222,7 +4628,19 @@ var MembersApi = class extends BaseApiClient {
4222
4628
  const error = await response.json().catch(() => ({}));
4223
4629
  throwMemberImportError(error, "Import preview failed");
4224
4630
  }
4225
- return response.json();
4631
+ const preview = await response.json();
4632
+ if (preview.previewPlanToken) {
4633
+ this.memberImportPlans.set(file, {
4634
+ wid,
4635
+ role: newMemberRoleId,
4636
+ autoPromote: options?.autoPromoteUniqueContacts ?? true,
4637
+ token: preview.previewPlanToken,
4638
+ cachedAt: Date.now()
4639
+ });
4640
+ } else {
4641
+ this.memberImportPlans.delete(file);
4642
+ }
4643
+ return preview;
4226
4644
  }
4227
4645
  /**
4228
4646
  * Import members from a CSV file, streaming progress updates via callback.
@@ -4232,10 +4650,11 @@ var MembersApi = class extends BaseApiClient {
4232
4650
  * Send 'overwrite_identity_fields' only after the operator confirms a preview.
4233
4651
  */
4234
4652
  async importMembers(wid, file, newMemberRoleId, onProgress, options) {
4235
- const formData = new FormData();
4236
- formData.append("file", file);
4237
- const params = new URLSearchParams();
4238
- params.append("new_member_role_id", newMemberRoleId.toString());
4653
+ const { body, params } = memberImportUpload(file, newMemberRoleId, options);
4654
+ const cachedPlan = this.memberImportPlans.get(file);
4655
+ const autoPromote = options?.autoPromoteUniqueContacts ?? true;
4656
+ const previewPlanToken = options?.previewPlanToken ?? (cachedPlan?.wid === wid && cachedPlan.role === newMemberRoleId && cachedPlan.autoPromote === autoPromote && Date.now() - cachedPlan.cachedAt < 55 * 60 * 1e3 ? cachedPlan.token : (await this.previewImportMembers(wid, file, newMemberRoleId, options)).previewPlanToken);
4657
+ if (previewPlanToken) body.append("previewPlanToken", previewPlanToken);
4239
4658
  if (options?.identityConflictPolicy) {
4240
4659
  params.append("identity_conflict_policy", options.identityConflictPolicy);
4241
4660
  }
@@ -4243,7 +4662,7 @@ var MembersApi = class extends BaseApiClient {
4243
4662
  `w/${wid}/members/import?${params.toString()}`,
4244
4663
  {
4245
4664
  method: "POST",
4246
- body: formData
4665
+ body
4247
4666
  },
4248
4667
  [400, 413]
4249
4668
  );
@@ -4251,34 +4670,48 @@ var MembersApi = class extends BaseApiClient {
4251
4670
  const error = await response.json().catch(() => ({}));
4252
4671
  throwMemberImportError(error, "Import failed");
4253
4672
  }
4254
- if (onProgress && response.body) {
4255
- const reader = response.body.getReader();
4256
- const decoder = new TextDecoder();
4257
- let buffer = "";
4673
+ if (!response.body) throw new Error("Member import response has no progress stream");
4674
+ const reader = response.body.getReader();
4675
+ const decoder = new TextDecoder();
4676
+ let buffer = "";
4677
+ let result;
4678
+ let hadError = false;
4679
+ const consume = (line) => {
4680
+ if (!line.trim()) return;
4681
+ let event;
4682
+ try {
4683
+ event = JSON.parse(line);
4684
+ } catch {
4685
+ throw new Error("Invalid member import progress event");
4686
+ }
4687
+ if (event.type === "complete") result = event;
4688
+ if (event.type === "error") hadError = true;
4689
+ onProgress?.(event);
4690
+ };
4691
+ try {
4258
4692
  while (true) {
4259
4693
  const { done, value } = await reader.read();
4260
4694
  if (done) break;
4261
4695
  buffer += decoder.decode(value, { stream: true });
4262
4696
  const lines = buffer.split("\n");
4263
4697
  buffer = lines.pop() ?? "";
4264
- for (const line of lines) {
4265
- const trimmed = line.trim();
4266
- if (!trimmed) continue;
4267
- try {
4268
- onProgress(JSON.parse(trimmed));
4269
- } catch {
4270
- }
4271
- }
4272
- }
4273
- const tail = buffer.trim();
4274
- if (tail) {
4275
- try {
4276
- onProgress(JSON.parse(tail));
4277
- } catch {
4278
- }
4698
+ for (const line of lines) consume(line);
4279
4699
  }
4700
+ buffer += decoder.decode();
4701
+ consume(buffer);
4702
+ } catch (error) {
4703
+ await reader.cancel().catch(() => void 0);
4704
+ throw error;
4705
+ } finally {
4706
+ reader.releaseLock();
4707
+ }
4708
+ if (!result) {
4709
+ throw new Error("Member import ended before completion; inspect members before retrying");
4280
4710
  }
4281
- return { success: true };
4711
+ return {
4712
+ success: !hadError && (result.failed ?? 0) === 0 && (result.conflicted ?? 0) === 0,
4713
+ result
4714
+ };
4282
4715
  }
4283
4716
  /** Export members as a downloadable file with selected fields and data types. */
4284
4717
  async exportMembers(wid, selectedFields, selectedDataTypes, memberType) {
@@ -4506,6 +4939,18 @@ var MembersApi = class extends BaseApiClient {
4506
4939
  { method: "DELETE" }
4507
4940
  );
4508
4941
  }
4942
+ async listContactPermissions(wid, params) {
4943
+ return this.fetch(`w/${wid}/contact-permissions/history`, {
4944
+ method: "POST",
4945
+ body: JSON.stringify(params)
4946
+ });
4947
+ }
4948
+ async createContactPermission(wid, body) {
4949
+ return this.fetch(`w/${wid}/contact-permissions`, {
4950
+ method: "POST",
4951
+ body: JSON.stringify(body)
4952
+ });
4953
+ }
4509
4954
  };
4510
4955
 
4511
4956
  // src/api/monday.ts
@@ -4672,6 +5117,21 @@ var MondayIntegrationApi = class extends BaseApiClient {
4672
5117
  method: "POST"
4673
5118
  });
4674
5119
  }
5120
+ /**
5121
+ * Managed-rule execution history for this connection (`GET /sync/logs`):
5122
+ * the connection's managed EventRule executions, newest first, with the
5123
+ * shared cursor pagination. Requires `apps:read`; works while the
5124
+ * connection is parked for re-authorization.
5125
+ */
5126
+ async getMondaySyncLogs(wid, params) {
5127
+ const query = new URLSearchParams();
5128
+ if (params?.pageSize) query.set("pageSize", String(params.pageSize));
5129
+ if (params?.cursor) query.set("cursor", params.cursor);
5130
+ const qs = query.toString() ? `?${query.toString()}` : "";
5131
+ return this.fetch(
5132
+ `w/${wid}/app-connections/monday/sync/logs${qs}`
5133
+ );
5134
+ }
4675
5135
  };
4676
5136
 
4677
5137
  // src/api/notification-rules.ts
@@ -4791,6 +5251,10 @@ var OrgApi = class extends BaseApiClient {
4791
5251
  async getCurrentOrgMember(orgIdOrUuid) {
4792
5252
  return this.fetch(`o/${orgIdOrUuid}/me`);
4793
5253
  }
5254
+ /** Bundles this organization owns — read-only catalog for `/o/{uuid}/library`. */
5255
+ async listOrgBundles(orgIdOrUuid) {
5256
+ return this.fetch(`o/${orgIdOrUuid}/bundles`);
5257
+ }
4794
5258
  /**
4795
5259
  * Update the settings an org admin owns: name, slug and contact details.
4796
5260
  *
@@ -4832,6 +5296,12 @@ var OrgApi = class extends BaseApiClient {
4832
5296
  * `subscriptionId` is the org-scoped row — never pick the customer's
4833
5297
  * newest subscription from the list endpoint. One customer can bill many
4834
5298
  * organizations.
5299
+ *
5300
+ * Returns the generated `OrgBillingCustomerResponse` — the contract the
5301
+ * route actually emits, `audiences` included. The hand-written mirror that
5302
+ * used to live here listed four fields and silently dropped `audiences`,
5303
+ * so callers could not see the commercial roles they hold (GRA-8792).
5304
+ * Regenerate the shape (`yarn generate:types`) rather than re-declaring it.
4835
5305
  */
4836
5306
  async getOrgBillingCustomer(orgIdOrUuid) {
4837
5307
  return this.fetch(`o/${orgIdOrUuid}/billing-customer`);
@@ -4868,7 +5338,10 @@ var OrgApi = class extends BaseApiClient {
4868
5338
  return this.fetch(`o/${orgUuid}/members/check/${accountUuid}`);
4869
5339
  }
4870
5340
  /**
4871
- * Update an organization member's role.
5341
+ * Update an organization member's role and/or org-level display name.
5342
+ *
5343
+ * `name` is the org's own label for the member (the OrgMember row and the
5344
+ * linked OrgAccount); it does not change the person's global Account name.
4872
5345
  */
4873
5346
  async updateOrganizationMember(orgIdOrUuid, memberId, data) {
4874
5347
  return this.fetch(`o/${orgIdOrUuid}/members/${memberId}`, {
@@ -5243,12 +5716,6 @@ var OrgApi = class extends BaseApiClient {
5243
5716
  // ============================================================================
5244
5717
  // Organization A2P Brand Registration API
5245
5718
  // ============================================================================
5246
- /**
5247
- * Get the org's A2P brand registration status.
5248
- */
5249
- async getA2PStatus(orgUuid) {
5250
- return this.fetch(`o/${orgUuid}/phone-numbers/a2p/status`);
5251
- }
5252
5719
  /** Return fixed phone-number and outbound-messaging prices. */
5253
5720
  async getPhoneBillingPricing(orgUuid) {
5254
5721
  return this.fetch(`o/${orgUuid}/phone-numbers/pricing`);
@@ -5257,11 +5724,30 @@ var OrgApi = class extends BaseApiClient {
5257
5724
  * Start A2P brand registration under a legal entity. `legalEntityUuid`
5258
5725
  * is required — brands register per legal entity (Customer Profile);
5259
5726
  * there is no primary-entity fallback.
5727
+ *
5728
+ * `soleProprietorMobile` is the proprietor's own mobile number, the one the
5729
+ * carrier sends the A2P one-time-password verification to. Required when the
5730
+ * entity's registration shape is a sole proprietorship (see
5731
+ * `LegalEntitySummaryResponse.requiredBrandType`); ignored otherwise.
5732
+ *
5733
+ * Three constraints belong to the customer, so the caller must state them:
5734
+ * it has to be a US or Canadian **mobile**, it cannot be a number acquired
5735
+ * from a CPaaS provider (so never one we provisioned — the carrier rejects
5736
+ * it), and the carrier allows it a lifetime maximum of three uses across all
5737
+ * A2P brand registrations, counting those made through other vendors.
5738
+ *
5739
+ * It is forwarded to the registration workflow to reach the carrier as an
5740
+ * EndUser attribute and is never stored on our side.
5260
5741
  */
5261
- async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandUuid = null) {
5742
+ async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandUuid = null, soleProprietorMobile = null) {
5262
5743
  return this.fetch(`o/${orgUuid}/phone-numbers/a2p/start`, {
5263
5744
  method: "POST",
5264
- body: JSON.stringify({ legalEntityUuid, brandName, brandUuid })
5745
+ body: JSON.stringify({
5746
+ legalEntityUuid,
5747
+ brandName,
5748
+ brandUuid,
5749
+ soleProprietorMobile
5750
+ })
5265
5751
  });
5266
5752
  }
5267
5753
  /**
@@ -5289,6 +5775,25 @@ var OrgApi = class extends BaseApiClient {
5289
5775
  }
5290
5776
  );
5291
5777
  }
5778
+ /**
5779
+ * Which legal entity's voice trust products (CNAM, SHAKEN/STIR, Voice
5780
+ * Integrity) each of the org's numbers carries, read live from Twilio.
5781
+ */
5782
+ async getPhoneVoiceTrust(orgUuid) {
5783
+ return this.fetch(`o/${orgUuid}/phone-numbers/voice-trust`);
5784
+ }
5785
+ /**
5786
+ * Put a number on a legal entity's Customer Profile and approved voice
5787
+ * trust products, taking it off any other legal entity's first. The
5788
+ * entity's business profile must be approved (400 otherwise).
5789
+ */
5790
+ async attachPhoneVoiceTrust(orgUuid, providerPhoneUuid, legalEntityUuid) {
5791
+ const body = { providerPhoneUuid, legalEntityUuid };
5792
+ return this.fetch(`o/${orgUuid}/phone-numbers/voice-trust/attach`, {
5793
+ method: "POST",
5794
+ body: JSON.stringify(body)
5795
+ });
5796
+ }
5292
5797
  // ============================================================================
5293
5798
  // Organization Business Profile API (Twilio Trust Hub Secondary CP)
5294
5799
  // ============================================================================
@@ -5458,6 +5963,16 @@ var OrgApi = class extends BaseApiClient {
5458
5963
  }
5459
5964
  );
5460
5965
  }
5966
+ /**
5967
+ * Resubmit a campaign the carrier rejected, with the brand's current
5968
+ * campaign copy. Edits the campaign in place, so no second vetting fee.
5969
+ */
5970
+ async resubmitA2PCampaign(orgUuid, brandUuid) {
5971
+ return this.fetch(
5972
+ `o/${orgUuid}/a2p-brands/${brandUuid}/resubmit-campaign`,
5973
+ { method: "POST" }
5974
+ );
5975
+ }
5461
5976
  /**
5462
5977
  * Published Sites across the org's workspaces that can be linked as this
5463
5978
  * brand's enrollment (opt-in) surface. Org-authorized, so it works even when
@@ -5470,7 +5985,7 @@ var OrgApi = class extends BaseApiClient {
5470
5985
  }
5471
5986
  /**
5472
5987
  * Link the brand to a published enrollment Site (sets `site_uuid`). Returns
5473
- * the refreshed campaign config so the editor's link state updates inline.
5988
+ * the refreshed campaign config.
5474
5989
  */
5475
5990
  async linkA2PEnrollmentSite(orgUuid, brandUuid, data) {
5476
5991
  return this.fetch(
@@ -5483,9 +5998,9 @@ var OrgApi = class extends BaseApiClient {
5483
5998
  }
5484
5999
  /**
5485
6000
  * Provision (or reuse) a patient-enrollment Site for the brand and link it —
5486
- * the one-click path behind the SMS Consent tab. `workspaceUuid` is required
5487
- * only when the org has multiple workspaces. Returns the refreshed campaign
5488
- * config so the editor's link state updates inline. Idempotent.
6001
+ * the explicit counterpart to the automatic provisioning at brand
6002
+ * registration. `workspaceUuid` is required only when the org has multiple
6003
+ * workspaces. Returns the refreshed campaign config. Idempotent.
5489
6004
  */
5490
6005
  async provisionA2PEnrollmentSite(orgUuid, brandUuid, data = {}) {
5491
6006
  return this.fetch(
@@ -5504,34 +6019,42 @@ var OrgApi = class extends BaseApiClient {
5504
6019
  );
5505
6020
  }
5506
6021
  /**
5507
- * The brand's enrollment-form template URL (carries `?brand=…`, no
5508
- * credential). `url` is null until a Site is linked. Do not append a
5509
- * patient identifier to this URL — use {@link mintA2PBrandEnrollmentLink}
5510
- * to get a patient-ready link instead.
6022
+ * Stage one A2P opt-in evidence file: get a presigned POST to send the bytes
6023
+ * straight to storage. Nothing is recorded on the brand until
6024
+ * {@link registerA2PEvidenceUpload} reads the object back and normalizes it.
5511
6025
  */
5512
- async getA2PBrandEnrollmentUrl(orgUuid, brandUuid) {
6026
+ async createA2PEvidenceUploadUrl(orgUuid, brandUuid, data) {
5513
6027
  return this.fetch(
5514
- `o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`
6028
+ `o/${orgUuid}/a2p-brands/${brandUuid}/evidence-attachments/upload-url`,
6029
+ {
6030
+ method: "POST",
6031
+ body: JSON.stringify(data)
6032
+ }
5515
6033
  );
5516
6034
  }
5517
6035
  /**
5518
- * Mint a patient-ready enrollment link for one patient.
5519
- *
5520
- * The returned URL carries a fresh, expiring, single-use `?grant=…` bound to
5521
- * the member that `externalId` resolves to. `externalId` (the patient's
5522
- * CRM/EHR identifier) travels in the request body, never the query string,
5523
- * so it stays out of access logs. When it matches no member, the
5524
- * credential-free template URL is returned rather than an error.
6036
+ * Normalize a staged evidence upload and record it on the brand. Returns the
6037
+ * refreshed campaign config, so the editor's evidence list updates without a
6038
+ * second round trip.
5525
6039
  */
5526
- async mintA2PBrandEnrollmentLink(orgUuid, brandUuid, externalId) {
6040
+ async registerA2PEvidenceUpload(orgUuid, brandUuid, data) {
5527
6041
  return this.fetch(
5528
- `o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`,
6042
+ `o/${orgUuid}/a2p-brands/${brandUuid}/evidence-attachments`,
5529
6043
  {
5530
6044
  method: "POST",
5531
- body: JSON.stringify({ externalId })
6045
+ body: JSON.stringify(data)
5532
6046
  }
5533
6047
  );
5534
6048
  }
6049
+ /** Remove one uploaded evidence artifact. */
6050
+ async deleteA2PEvidenceUpload(orgUuid, brandUuid, attachmentUuid) {
6051
+ return this.fetch(
6052
+ `o/${orgUuid}/a2p-brands/${brandUuid}/evidence-attachments/${encodeURIComponent(
6053
+ attachmentUuid
6054
+ )}`,
6055
+ { method: "DELETE" }
6056
+ );
6057
+ }
5535
6058
  /**
5536
6059
  * List available member roles for a workspace in the organization.
5537
6060
  */
@@ -5556,6 +6079,9 @@ var OrgApi = class extends BaseApiClient {
5556
6079
  async listOrgWebhookEndpoints(orgIdOrUuid) {
5557
6080
  return this.fetch(`o/${orgIdOrUuid}/webhooks`);
5558
6081
  }
6082
+ async getOrgWebhookEndpoint(orgIdOrUuid, endpointUuid) {
6083
+ return this.fetch(`o/${orgIdOrUuid}/webhooks/${endpointUuid}`);
6084
+ }
5559
6085
  /**
5560
6086
  * The subscribable event-type vocabulary for the org UI's event-type
5561
6087
  * picker — exactly what the create/update validators accept, so the UI
@@ -5614,6 +6140,39 @@ var OrgApi = class extends BaseApiClient {
5614
6140
  }
5615
6141
  );
5616
6142
  }
6143
+ // =========================================================================
6144
+ // Organization API keys (GRA-9043)
6145
+ // =========================================================================
6146
+ /**
6147
+ * List every API key bound to this organization. Never carries the secret.
6148
+ *
6149
+ * Org-bound keys authenticate as an org-local principal, so one key reaches
6150
+ * every current workspace of the organization and every workspace created
6151
+ * later. Gated by `org:api_keys`, which `org:admin` holds transitively.
6152
+ */
6153
+ async listOrgApiKeys(orgIdOrUuid) {
6154
+ return this.fetch(`o/${orgIdOrUuid}/api-keys`);
6155
+ }
6156
+ /**
6157
+ * Mint an org-bound API key.
6158
+ *
6159
+ * The payload is the same client-only {@link ApiKeyFormData} the workspace
6160
+ * and account routes take — `{name, expiresInDays, scopes}`, no workspace
6161
+ * id: the mint location is what binds the key. The response carries `key`,
6162
+ * the plaintext secret, which is readable exactly once.
6163
+ */
6164
+ async createOrgApiKey(orgIdOrUuid, apiKey) {
6165
+ return this.fetch(`o/${orgIdOrUuid}/api-keys`, {
6166
+ method: "POST",
6167
+ body: JSON.stringify(apiKey)
6168
+ });
6169
+ }
6170
+ /** Revoke an org-bound API key by its id. */
6171
+ async revokeOrgApiKey(orgIdOrUuid, keyId) {
6172
+ return this.fetch(`o/${orgIdOrUuid}/api-keys/${keyId}`, {
6173
+ method: "DELETE"
6174
+ });
6175
+ }
5617
6176
  };
5618
6177
  function businessProfilePath(orgUuid, legalEntityUuid) {
5619
6178
  return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
@@ -6150,6 +6709,14 @@ var QualificationsApi = class extends BaseApiClient {
6150
6709
  });
6151
6710
  }
6152
6711
  // ===== Test chat runs =====
6712
+ /**
6713
+ * List a Workflow's test chat runs, newest first (default 50, max 500).
6714
+ *
6715
+ * `workflowRevisionId` narrows to that revision before the limit applies.
6716
+ * `includeEarlierRevisions` widens the window to earlier published
6717
+ * revisions and runs whose revision was deleted, and requires
6718
+ * `workflowRevisionId`. Omitting both keeps the unfiltered list.
6719
+ */
6153
6720
  async listTestChatRuns(wid, workflowId, params) {
6154
6721
  const query = new URLSearchParams();
6155
6722
  if (params?.scenarioId !== void 0) query.set("scenarioId", String(params.scenarioId));
@@ -6157,11 +6724,36 @@ var QualificationsApi = class extends BaseApiClient {
6157
6724
  query.set("assistantChatModelId", params.assistantChatModelId);
6158
6725
  }
6159
6726
  if (params?.limit !== void 0) query.set("limit", String(params.limit));
6727
+ if (params?.workflowRevisionId !== void 0) {
6728
+ query.set("workflow_revision_id", String(params.workflowRevisionId));
6729
+ }
6730
+ if (params?.includeEarlierRevisions !== void 0) {
6731
+ query.set("include_earlier_revisions", String(params.includeEarlierRevisions));
6732
+ }
6160
6733
  const qs = query.toString() ? `?${query.toString()}` : "";
6161
6734
  return this.fetch(
6162
6735
  `w/${wid}/qualifications/workflows/${workflowId}/test-chat-runs${qs}`
6163
6736
  );
6164
6737
  }
6738
+ /**
6739
+ * Exact scenario health for one revision of a Workflow: every active
6740
+ * scenario's server-decided state, caption, counts and per-revision pass
6741
+ * rates, plus the board headline. Scenarios arrive in board order.
6742
+ *
6743
+ * Omit `workflowRevisionId` for the server's current revision (the newest
6744
+ * with runs, the Draft counting as newest); the response names the
6745
+ * revision it describes and whether it is the current one.
6746
+ */
6747
+ async listScenarioHealthSummaries(wid, workflowId, params) {
6748
+ const query = new URLSearchParams();
6749
+ if (params?.workflowRevisionId !== void 0) {
6750
+ query.set("workflow_revision_id", String(params.workflowRevisionId));
6751
+ }
6752
+ const qs = query.toString() ? `?${query.toString()}` : "";
6753
+ return this.fetch(
6754
+ `w/${wid}/qualifications/workflows/${workflowId}/scenario-health-summaries${qs}`
6755
+ );
6756
+ }
6165
6757
  async getTestChatRun(wid, runId) {
6166
6758
  return this.fetch(`w/${wid}/qualifications/test-chat-runs/${runId}`);
6167
6759
  }
@@ -6257,6 +6849,96 @@ var ReportsApi = class extends BaseApiClient {
6257
6849
  }
6258
6850
  };
6259
6851
 
6852
+ // src/types/generated/communication.ts
6853
+ var RoutingActionType = {
6854
+ answer_ai: "answer_ai",
6855
+ answer_human: "answer_human",
6856
+ answer_owner: "answer_owner",
6857
+ voicemail: "voicemail",
6858
+ play_message: "play_message",
6859
+ ignore: "ignore",
6860
+ signup: "signup"
6861
+ };
6862
+ var RoutingAudience = {
6863
+ anyone: "anyone",
6864
+ anonymous: "anonymous",
6865
+ members: "members"
6866
+ };
6867
+ var RoutingChannel = {
6868
+ pstn: "pstn",
6869
+ messaging: "messaging",
6870
+ email: "email"
6871
+ };
6872
+ var RoutingTimeWindow = {
6873
+ always: "always",
6874
+ business_hours: "business_hours",
6875
+ non_business_hours: "non_business_hours",
6876
+ custom: "custom"
6877
+ };
6878
+
6879
+ // src/api/routing-rules.ts
6880
+ function appendFilters(params, filters) {
6881
+ if (!filters) return;
6882
+ if (filters.channel !== void 0) params.set("channel", filters.channel);
6883
+ if (filters.phoneNumberId !== void 0)
6884
+ params.set("phoneNumberId", String(filters.phoneNumberId));
6885
+ if (filters.inboxId !== void 0) params.set("inboxId", String(filters.inboxId));
6886
+ if (filters.page !== void 0) params.set("page", String(filters.page));
6887
+ if (filters.pageSize !== void 0) params.set("pageSize", String(filters.pageSize));
6888
+ }
6889
+ var RoutingRulesApi = class extends BaseApiClient {
6890
+ /** List one endpoint's rules. Requires the rule's endpoint read permission (`phones:read`, or `inboxes:read`). */
6891
+ async getRoutingRules(wid, filters) {
6892
+ const params = new URLSearchParams();
6893
+ appendFilters(params, filters);
6894
+ const query = params.toString();
6895
+ return this.fetch(
6896
+ `w/${wid}/routing${query ? `?${query}` : ""}`
6897
+ );
6898
+ }
6899
+ /** Read one rule. Requires the rule's endpoint read permission (`phones:read`, or `inboxes:read`). */
6900
+ async getRoutingRule(wid, ruleUuid) {
6901
+ return this.fetch(`w/${wid}/routing/${ruleUuid}`);
6902
+ }
6903
+ /** Create a rule. Requires the rule's endpoint write permission (`phones:write`, or `inboxes:write`). */
6904
+ async createRoutingRule(wid, data) {
6905
+ return this.fetch(`w/${wid}/routing`, {
6906
+ method: "POST",
6907
+ body: JSON.stringify(data)
6908
+ });
6909
+ }
6910
+ /** Update a rule. Requires the rule's endpoint write permission (`phones:write`, or `inboxes:write`). */
6911
+ async updateRoutingRule(wid, ruleUuid, data) {
6912
+ return this.fetch(`w/${wid}/routing/${ruleUuid}`, {
6913
+ method: "PATCH",
6914
+ body: JSON.stringify(data)
6915
+ });
6916
+ }
6917
+ /** Hard-delete a rule. Requires the rule's endpoint write permission (`phones:write`, or `inboxes:write`); the server audits deletion. */
6918
+ async deleteRoutingRule(wid, ruleUuid) {
6919
+ return this.fetch(`w/${wid}/routing/${ruleUuid}`, {
6920
+ method: "DELETE"
6921
+ });
6922
+ }
6923
+ /** Atomically reorder one endpoint/channel scope. Requires the rule's endpoint write permission (`phones:write`, or `inboxes:write`). */
6924
+ async reorderRoutingRules(wid, ruleUuids) {
6925
+ return this.fetch(`w/${wid}/routing/reorder`, {
6926
+ method: "POST",
6927
+ body: JSON.stringify({ ruleUuids })
6928
+ });
6929
+ }
6930
+ /**
6931
+ * Dry-run rule evaluation without placing or sending anything. Requires
6932
+ * the rule's endpoint read permission (`phones:read`, or `inboxes:read`); previewing a named Member also requires `members:read`.
6933
+ */
6934
+ async previewRoutingRule(wid, data) {
6935
+ return this.fetch(`w/${wid}/routing/preview`, {
6936
+ method: "POST",
6937
+ body: JSON.stringify(data)
6938
+ });
6939
+ }
6940
+ };
6941
+
6260
6942
  // src/api/salesforce.ts
6261
6943
  var SalesforceApi = class extends BaseApiClient {
6262
6944
  /**
@@ -6337,6 +7019,20 @@ var SalesforceApi = class extends BaseApiClient {
6337
7019
  body: JSON.stringify(data)
6338
7020
  });
6339
7021
  }
7022
+ /**
7023
+ * Start a durable run that links unlinked members by Salesforce Id / email
7024
+ * and hydrates them. One run per connection; a second start while one is
7025
+ * in flight is 409.
7026
+ */
7027
+ async linkUnlinkedSalesforceMembersByIdentity(wid) {
7028
+ return this.fetch(
7029
+ `w/${wid}/app-connections/salesforce/reconciliation/link-unlinked-by-identity`,
7030
+ {
7031
+ method: "POST",
7032
+ body: JSON.stringify({})
7033
+ }
7034
+ );
7035
+ }
6340
7036
  async unlinkMemberFromSalesforce(wid, memberId) {
6341
7037
  return this.fetch(`w/${wid}/app-connections/salesforce/reconciliation/unlink/${memberId}`, {
6342
7038
  method: "DELETE"
@@ -6418,6 +7114,21 @@ var SalesforceApi = class extends BaseApiClient {
6418
7114
  }
6419
7115
  );
6420
7116
  }
7117
+ /**
7118
+ * Managed-rule execution history for this connection (`GET /sync/logs`):
7119
+ * the connection's managed EventRule executions, newest first, with the
7120
+ * shared cursor pagination. Requires `apps:read`; works while the
7121
+ * connection is parked for re-authorization.
7122
+ */
7123
+ async getSalesforceSyncLogs(wid, params) {
7124
+ const query = new URLSearchParams();
7125
+ if (params?.pageSize) query.set("pageSize", String(params.pageSize));
7126
+ if (params?.cursor) query.set("cursor", params.cursor);
7127
+ const qs = query.toString() ? `?${query.toString()}` : "";
7128
+ return this.fetch(
7129
+ `w/${wid}/app-connections/salesforce/sync/logs${qs}`
7130
+ );
7131
+ }
6421
7132
  };
6422
7133
 
6423
7134
  // src/api/connection-sync.ts
@@ -6608,12 +7319,19 @@ var HubspotApi = class extends BaseApiClient {
6608
7319
  async getHubspotManagedRules(wid) {
6609
7320
  return this.fetch(`w/${wid}/app-connections/hubspot/managed-rules`);
6610
7321
  }
7322
+ /**
7323
+ * Managed-rule execution history for this connection (`GET /sync/logs`).
7324
+ * Rows are the shared rule-execution response (the same shape the Salesforce
7325
+ * and Monday twins return), with cursor pagination.
7326
+ */
6611
7327
  async getHubspotSyncLogs(wid, params) {
6612
7328
  const query = new URLSearchParams();
6613
7329
  if (params?.pageSize) query.set("pageSize", String(params.pageSize));
6614
7330
  if (params?.cursor) query.set("cursor", params.cursor);
6615
7331
  const qs = query.toString() ? `?${query.toString()}` : "";
6616
- return this.fetch(`w/${wid}/app-connections/hubspot/sync/logs${qs}`);
7332
+ return this.fetch(
7333
+ `w/${wid}/app-connections/hubspot/sync/logs${qs}`
7334
+ );
6617
7335
  }
6618
7336
  async getHubspotTransformPresets(wid) {
6619
7337
  return this.fetch(
@@ -7527,6 +8245,33 @@ var JourneysApi = class extends BaseApiClient {
7527
8245
  body: JSON.stringify(data)
7528
8246
  });
7529
8247
  }
8248
+ /**
8249
+ * Discard a saved editor draft, keeping the runnable definition.
8250
+ *
8251
+ * Body-less: a DELETE carries no document, only the resource to remove and
8252
+ * `expectedUpdatedAt` — the Journey's `updatedAt` as the caller loaded it —
8253
+ * proving they are removing the draft they were looking at. Encoded through
8254
+ * `URLSearchParams` because an ISO timestamp with a positive UTC offset
8255
+ * contains a `+`, which a raw template string would deliver to the server as
8256
+ * a space and turn into a revision conflict nobody can explain.
8257
+ *
8258
+ * Returns the AUTHORING projection (`Journey`) with `authoringDraft: null`
8259
+ * and the advanced `updatedAt`, so the caller can re-derive from the stored
8260
+ * definition without a second read.
8261
+ *
8262
+ * Refusals match the PUT's vocabulary: `journey_v2_definition_conflict`
8263
+ * (someone saved first — nothing was removed),
8264
+ * `journey_v2_structural_edit_not_allowed` (the Journey is live or archived)
8265
+ * and `journey_v2_execution_model_mismatch` (it is legacy). A Journey that
8266
+ * has no saved draft is a success, not an error — the state the caller asked
8267
+ * for is the state it is in.
8268
+ */
8269
+ async deleteJourneyDraft(wid, journeyId, expectedUpdatedAt) {
8270
+ const query = new URLSearchParams({ expectedUpdatedAt });
8271
+ return this.fetch(`w/${wid}/journeys/${journeyId}/draft?${query.toString()}`, {
8272
+ method: "DELETE"
8273
+ });
8274
+ }
7530
8275
  /**
7531
8276
  * List journeys, optionally including archived, paginated.
7532
8277
  *
@@ -8024,11 +8769,6 @@ var WorkflowsApi = class extends BaseApiClient {
8024
8769
  `w/${wid}/workflows/${workflowId}/tasks/${taskId}/chats?${params.toString()}`
8025
8770
  );
8026
8771
  }
8027
- async getWorkflowAccessValidation(wid, workflowId) {
8028
- return this.fetch(
8029
- `w/${wid}/workflows/${workflowId}/validate-access`
8030
- );
8031
- }
8032
8772
  async getWorkflowConfigValidation(wid, workflowId) {
8033
8773
  return this.fetch(
8034
8774
  `w/${wid}/workflows/${workflowId}/validate-config`
@@ -8296,21 +9036,6 @@ function encodePermissions(permissions) {
8296
9036
  if (permissions.delete) accessMode |= PERMISSION_DELETE;
8297
9037
  return accessMode;
8298
9038
  }
8299
- var WORKFLOW_IMPLICIT_USE_SCOPE = "workflows:admin";
8300
- function roleImplicitWorkflowUseScope(role) {
8301
- return (role.grantedScopes ?? []).includes(WORKFLOW_IMPLICIT_USE_SCOPE) ? WORKFLOW_IMPLICIT_USE_SCOPE : null;
8302
- }
8303
- function roleWorkflowAccess(role, workflowId) {
8304
- const viaScope = roleImplicitWorkflowUseScope(role);
8305
- if (viaScope) {
8306
- return { accessMode: PERMISSION_USE | PERMISSION_EDIT, viaScope };
8307
- }
8308
- const entry = (role.workflowAccess ?? []).find((wa) => wa.workflowId === workflowId);
8309
- return { accessMode: entry?.accessMode ?? PERMISSION_NONE, viaScope: null };
8310
- }
8311
- function roleCanUseWorkflow(role, workflowId) {
8312
- return (roleWorkflowAccess(role, workflowId).accessMode & PERMISSION_USE) !== 0;
8313
- }
8314
9039
  var Scope = /* @__PURE__ */ ((Scope2) => {
8315
9040
  Scope2["WORKSPACE_READ"] = "workspace:read";
8316
9041
  Scope2["WORKSPACE_WRITE"] = "workspace:write";
@@ -8379,6 +9104,7 @@ var Scope = /* @__PURE__ */ ((Scope2) => {
8379
9104
  Scope2["LABELS_READ"] = "labels:read";
8380
9105
  Scope2["LABELS_WRITE"] = "labels:write";
8381
9106
  Scope2["ANALYTICS_READ"] = "analytics:read";
9107
+ Scope2["ANONYMOUS_SUBMISSIONS_READ"] = "anonymous_submissions:read";
8382
9108
  Scope2["OPERATOR_READ"] = "operator:read";
8383
9109
  Scope2["OPERATOR_WRITE"] = "operator:write";
8384
9110
  Scope2["EXPORT_READ"] = "export:read";
@@ -8402,6 +9128,8 @@ var BulkMemberResultStatus = {
8402
9128
  skipped: "skipped"
8403
9129
  };
8404
9130
  var MemberImportMatchInfoMatchType = {
9131
+ id: "id",
9132
+ uuid: "uuid",
8405
9133
  external_id: "external_id",
8406
9134
  email: "email",
8407
9135
  phone: "phone",
@@ -8423,6 +9151,36 @@ var MergeMemberRolesRequestAccessStrategy = {
8423
9151
  target_only: "target_only"
8424
9152
  };
8425
9153
 
9154
+ // src/types/generated/member_contact_point.ts
9155
+ var CreateMemberContactPointRequestContactType = {
9156
+ phone: "phone",
9157
+ email: "email"
9158
+ };
9159
+ var CreateMemberContactPointRequestPurpose = {
9160
+ general: "general",
9161
+ notification: "notification",
9162
+ billing: "billing"
9163
+ };
9164
+ var CreateMemberContactPointRequestSharing = {
9165
+ shared: "shared",
9166
+ individual: "individual",
9167
+ unknown: "unknown"
9168
+ };
9169
+ var UpdateMemberContactPointRequestContactType = {
9170
+ phone: "phone",
9171
+ email: "email"
9172
+ };
9173
+ var UpdateMemberContactPointRequestPurpose = {
9174
+ general: "general",
9175
+ notification: "notification",
9176
+ billing: "billing"
9177
+ };
9178
+ var UpdateMemberContactPointRequestSharing = {
9179
+ shared: "shared",
9180
+ individual: "individual",
9181
+ unknown: "unknown"
9182
+ };
9183
+
8426
9184
  // src/types/member-types.ts
8427
9185
  var MemberType = /* @__PURE__ */ ((MemberType2) => {
8428
9186
  MemberType2["ANONYMOUS"] = "anonymous";
@@ -8508,6 +9266,8 @@ var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
8508
9266
  EventRuleEventType2["DATA_RECORD_CHANGED"] = "data_record:changed";
8509
9267
  EventRuleEventType2["CHAT_CREATED"] = "chat:created";
8510
9268
  EventRuleEventType2["CHAT_SUMMARY"] = "chat:summary";
9269
+ EventRuleEventType2["MESSAGE_CREATED"] = "message:created";
9270
+ EventRuleEventType2["LINK_CLICKED"] = "link:clicked";
8511
9271
  EventRuleEventType2["CHAT_CALLBACK"] = "chat:callback";
8512
9272
  EventRuleEventType2["MEMBER_UPDATED"] = "member:updated";
8513
9273
  EventRuleEventType2["ROUTINE_TRIGGERED"] = "routine:triggered";
@@ -8571,6 +9331,20 @@ function eventRuleActionParams(params) {
8571
9331
  }
8572
9332
  var MASKED_SECRET_SENTINEL = "__SECRET_SET__";
8573
9333
 
9334
+ // src/types/generated/credit_stop_service.ts
9335
+ var SendingNextStep = {
9336
+ add_credits: "add_credits",
9337
+ subscribe: "subscribe",
9338
+ contact_billing_owner: "contact_billing_owner"
9339
+ };
9340
+ var SendingStopState = {
9341
+ ok: "ok",
9342
+ credits_suspended: "credits_suspended",
9343
+ out_of_credits: "out_of_credits",
9344
+ operator_suspension: "operator_suspension",
9345
+ billing_unresolved: "billing_unresolved"
9346
+ };
9347
+
8574
9348
  // src/types/billing-types.ts
8575
9349
  var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
8576
9350
  WorkspaceFeature2["PHONE"] = "phone";
@@ -8586,7 +9360,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
8586
9360
  WorkspaceFeature2["WEB_SEARCH"] = "web_search";
8587
9361
  WorkspaceFeature2["CALENDAR"] = "calendar";
8588
9362
  WorkspaceFeature2["JOURNEY_V2_EDITOR"] = "journey_v2_editor";
8589
- WorkspaceFeature2["EXPERIMENTS"] = "experiments";
8590
9363
  WorkspaceFeature2["MAILBOX_USER_INPUT"] = "mailbox_user_input";
8591
9364
  WorkspaceFeature2["FORKED_TRAJECTORIES"] = "forked_trajectories";
8592
9365
  WorkspaceFeature2["GMAIL"] = "gmail";
@@ -8607,6 +9380,7 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
8607
9380
  WorkspaceFeature2["IMAGE_GENERATION"] = "image_generation";
8608
9381
  WorkspaceFeature2["CHARLESTON_NEPHROLOGY_PMD_PAGING"] = "charleston_nephrology_pmd_paging";
8609
9382
  WorkspaceFeature2["PATIENTSYNC_TRANSFER"] = "patientsync_transfer";
9383
+ WorkspaceFeature2["COSAN_PATHWAYS_SCHEDULING"] = "cosan_pathways_scheduling";
8610
9384
  return WorkspaceFeature2;
8611
9385
  })(WorkspaceFeature || {});
8612
9386
  var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
@@ -8708,10 +9482,10 @@ var ModelProvider = {
8708
9482
  google: "google",
8709
9483
  anthropic: "anthropic",
8710
9484
  aws: "aws",
8711
- elevenlabs: "elevenlabs",
8712
9485
  deepgram: "deepgram",
8713
9486
  xai: "xai",
8714
9487
  fireworks: "fireworks",
9488
+ vercel: "vercel",
8715
9489
  custom: "custom"
8716
9490
  };
8717
9491
  var ModelType = {
@@ -8734,9 +9508,7 @@ var STT_MODEL_DEEPGRAM_FLUX = "deepgram:stt:flux-general-en";
8734
9508
  var STT_MODEL_DEEPGRAM_FLUX_SELFHOST = "deepgram:stt:flux-general-en:selfhost";
8735
9509
  var STT_MODEL_DEEPGRAM_FLUX_MULTI = "deepgram:stt:flux-general-multi";
8736
9510
  var STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST = "deepgram:stt:flux-general-multi:selfhost";
8737
- var TTS_MODEL_ELEVENLABS_FLASH = "elevenlabs:tts:eleven_flash_v2_5";
8738
- var TTS_MODEL_ELEVENLABS_TURBO = "elevenlabs:tts:eleven_turbo_v2_5";
8739
- var TTS_MODEL_ELEVENLABS_MULTILINGUAL = "elevenlabs:tts:eleven_multilingual_v2";
9511
+ var TTS_MODEL_XAI_V1 = "xai:tts:v1";
8740
9512
  var TTS_MODEL_DEEPGRAM_AURA_2 = "deepgram:tts:aura-2";
8741
9513
  var TTS_MODEL_AWS_POLLY_GENERATIVE = "aws:tts:polly-generative";
8742
9514
  var TTS_MODEL_AWS_POLLY_NEURAL = "aws:tts:polly-neural";
@@ -8765,7 +9537,26 @@ var FhirClientType = /* @__PURE__ */ ((FhirClientType2) => {
8765
9537
  return FhirClientType2;
8766
9538
  })(FhirClientType || {});
8767
9539
 
9540
+ // src/types/app-connection-types.ts
9541
+ var CrmActivityKind = /* @__PURE__ */ ((CrmActivityKind2) => {
9542
+ CrmActivityKind2["MESSAGE"] = "message";
9543
+ CrmActivityKind2["SUMMARY"] = "summary";
9544
+ CrmActivityKind2["CHAT_STARTED"] = "chat_started";
9545
+ CrmActivityKind2["CALL_STARTED"] = "call_started";
9546
+ CrmActivityKind2["CALL_ENDED"] = "call_ended";
9547
+ return CrmActivityKind2;
9548
+ })(CrmActivityKind || {});
9549
+
8768
9550
  // src/types/generated/qualification.ts
9551
+ var RunHealthCategory = {
9552
+ passed: "passed",
9553
+ failed: "failed",
9554
+ running: "running",
9555
+ not_applicable: "not_applicable",
9556
+ awaiting_evaluation: "awaiting_evaluation",
9557
+ ungradeable: "ungradeable",
9558
+ incomplete: "incomplete"
9559
+ };
8769
9560
  var TestChatRunLane = {
8770
9561
  text: "text",
8771
9562
  web_realtime: "web_realtime",
@@ -8783,6 +9574,44 @@ var TestChatRunOutcome = {
8783
9574
  instrument_failure: "instrument_failure"
8784
9575
  };
8785
9576
 
9577
+ // src/types/generated/qualification_health_service.ts
9578
+ var ScenarioHealthCaption = {
9579
+ recent_passes: "recent_passes",
9580
+ pass_ratio: "pass_ratio",
9581
+ could_not_grade: "could_not_grade",
9582
+ awaiting_evaluation: "awaiting_evaluation",
9583
+ running: "running",
9584
+ not_run_since_test_change: "not_run_since_test_change",
9585
+ not_run_on_revision: "not_run_on_revision",
9586
+ never_run: "never_run"
9587
+ };
9588
+ var ScenarioHealthHeadline = {
9589
+ needs_attention: "needs_attention",
9590
+ no_results: "no_results",
9591
+ all_passing: "all_passing",
9592
+ no_scenarios: "no_scenarios"
9593
+ };
9594
+ var ScenarioHealthSampleNote = {
9595
+ low_sample: "low_sample"
9596
+ };
9597
+ var ScenarioHealthState = {
9598
+ failing: "failing",
9599
+ flaky: "flaky",
9600
+ no_results: "no_results",
9601
+ passing: "passing"
9602
+ };
9603
+
9604
+ // src/types/generated/qualification_health_summary.ts
9605
+ var RevisionHistorySegment = {
9606
+ before_test_change: "before_test_change"
9607
+ };
9608
+
9609
+ // src/types/generated/qualification_run_identity.ts
9610
+ var ScenarioRunBlocker = {
9611
+ missing_persona: "missing_persona",
9612
+ archived_persona: "archived_persona"
9613
+ };
9614
+
8786
9615
  // src/types/qualification-types.ts
8787
9616
  var CriterionType = /* @__PURE__ */ ((CriterionType2) => {
8788
9617
  CriterionType2["EXPRESSION"] = "expression";
@@ -9077,8 +9906,6 @@ var CONFIG_HEALTH_FACADE_CHECK_SLUGS = [
9077
9906
  "workflow.config",
9078
9907
  "journey.authoring",
9079
9908
  "journey.v2_validation",
9080
- "workflow.access",
9081
- "routine.workflow_access",
9082
9909
  "workspace.validation"
9083
9910
  ];
9084
9911
  function isConfigHealthFacadeCheckSlug(value) {
@@ -9770,17 +10597,17 @@ var WorkspacesApi = class extends BaseApiClient {
9770
10597
  body: JSON.stringify(payload)
9771
10598
  });
9772
10599
  }
9773
- /** List available themes for a workspace. */
10600
+ /**
10601
+ * List available themes for a workspace.
10602
+ *
10603
+ * Read-only: `…/themes` serves GET and nothing else. `Workspace.themes` is
10604
+ * an entitlement allowlist — which non-global themes this workspace may
10605
+ * select. There was never a `PUT …/themes` route; the
10606
+ * `updateWorkspaceThemes` method that targeted one always 405'd (GRA-8892).
10607
+ */
9774
10608
  async getWorkspaceThemes(wid) {
9775
10609
  return this.fetch(`w/${wid}/themes`);
9776
10610
  }
9777
- /** Update the active themes for a workspace. */
9778
- async updateWorkspaceThemes(wid, themes) {
9779
- return this.fetch(`w/${wid}/themes`, {
9780
- method: "PUT",
9781
- body: JSON.stringify({ themes })
9782
- });
9783
- }
9784
10611
  /**
9785
10612
  * Get all workspace-grantable scopes that can be assigned to member roles.
9786
10613
  *
@@ -9846,10 +10673,18 @@ var DashboardsApi = class extends BaseApiClient {
9846
10673
  `w/${wid}/dashboards/stats/channels${query ? `?${query}` : ""}`
9847
10674
  );
9848
10675
  }
9849
- /** Assignment status rollup per root workflow. */
9850
- async getDashboardWorkflowAssignmentStats(wid) {
10676
+ /**
10677
+ * Assignment status rollup per root workflow.
10678
+ *
10679
+ * `hours` windows the rollup to runs STARTED within the last N hours.
10680
+ * Omit it (or pass null) for the all-time rollup.
10681
+ */
10682
+ async getDashboardWorkflowAssignmentStats(wid, options) {
10683
+ const params = new URLSearchParams();
10684
+ if (options?.hours != null) params.append("hours", options.hours.toString());
10685
+ const query = params.toString();
9851
10686
  return this.fetch(
9852
- `w/${wid}/dashboards/stats/workflow-assignments`
10687
+ `w/${wid}/dashboards/stats/workflow-assignments${query ? `?${query}` : ""}`
9853
10688
  );
9854
10689
  }
9855
10690
  /**
@@ -10589,6 +11424,25 @@ var TrackedLinksApi = class extends BaseApiClient {
10589
11424
  }
10590
11425
  };
10591
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
+
10592
11446
  // src/app-context.ts
10593
11447
  function formatAppContextAsMarkdown(context) {
10594
11448
  if (!context) {
@@ -10665,6 +11519,8 @@ function createApiModules(apiKey, baseUrl, customFetch) {
10665
11519
  assignments: new AssignmentsApi(apiKey, baseUrl, customFetch),
10666
11520
  auth: new AuthApi(apiKey, baseUrl, customFetch),
10667
11521
  builders: new BuildersApi(apiKey, baseUrl, customFetch),
11522
+ bundles: new BundlesApi(apiKey, baseUrl, customFetch),
11523
+ installations: new InstallationsApi(apiKey, baseUrl, customFetch),
10668
11524
  calendars: new CalendarsApi(apiKey, baseUrl, customFetch),
10669
11525
  calls: new CallsApi(apiKey, baseUrl, customFetch),
10670
11526
  cel: new CELApi(apiKey, baseUrl, customFetch),
@@ -10713,6 +11569,8 @@ function createApiModules(apiKey, baseUrl, customFetch) {
10713
11569
  metrics: new MetricsApi(apiKey, baseUrl, customFetch),
10714
11570
  queries: new QueriesApi(apiKey, baseUrl, customFetch),
10715
11571
  reports: new ReportsApi(apiKey, baseUrl, customFetch),
11572
+ resourceWorkflows: new ResourceWorkflowsApi(apiKey, baseUrl, customFetch),
11573
+ routingRules: new RoutingRulesApi(apiKey, baseUrl, customFetch),
10716
11574
  salesforce: new SalesforceApi(apiKey, baseUrl, customFetch),
10717
11575
  sites: new SitesApi(apiKey, baseUrl, customFetch),
10718
11576
  subscriptions: new SubscriptionsApi(apiKey, baseUrl, customFetch),
@@ -10742,6 +11600,7 @@ var WORKSPACE_METHOD_NAMES = [
10742
11600
  "archiveDataType",
10743
11601
  "archiveJourney",
10744
11602
  "archiveMember",
11603
+ "archiveMemberByExternalId",
10745
11604
  "archiveMemberRelationship",
10746
11605
  "archivePersona",
10747
11606
  "archivePhoneNumber",
@@ -10768,7 +11627,6 @@ var WORKSPACE_METHOD_NAMES = [
10768
11627
  "checkSiteSlugAvailability",
10769
11628
  "claimDevicePairing",
10770
11629
  "clearConnectionMemberExclusion",
10771
- "clearMemberSwitch",
10772
11630
  "clearTrackedLinkDestinations",
10773
11631
  "clickWorkspaceSupportRequestResource",
10774
11632
  "cloneDataType",
@@ -10791,6 +11649,9 @@ var WORKSPACE_METHOD_NAMES = [
10791
11649
  "createAgent",
10792
11650
  "createApiKey",
10793
11651
  "createAssignment",
11652
+ "bindInstallationSlots",
11653
+ "restoreInstallationForm",
11654
+ "createBundle",
10794
11655
  "createCalendar",
10795
11656
  "createCalendarEvent",
10796
11657
  "createCalendarEventType",
@@ -10803,6 +11664,7 @@ var WORKSPACE_METHOD_NAMES = [
10803
11664
  "createChatLabel",
10804
11665
  "createClientWorkspace",
10805
11666
  "createConnection",
11667
+ "createContactPermission",
10806
11668
  "createCustomTool",
10807
11669
  "createCustomToolkit",
10808
11670
  "createDashboard",
@@ -10838,6 +11700,7 @@ var WORKSPACE_METHOD_NAMES = [
10838
11700
  "createPhoneNumber",
10839
11701
  "createProduct",
10840
11702
  "createRoutine",
11703
+ "createRoutingRule",
10841
11704
  "createScenario",
10842
11705
  "createSignup",
10843
11706
  "createSite",
@@ -10888,6 +11751,7 @@ var WORKSPACE_METHOD_NAMES = [
10888
11751
  "deleteGoal",
10889
11752
  "deleteHubspot",
10890
11753
  "deleteInbox",
11754
+ "deleteJourneyDraft",
10891
11755
  "deleteJourneyNote",
10892
11756
  "deleteMcpServer",
10893
11757
  "deleteMember",
@@ -10905,6 +11769,7 @@ var WORKSPACE_METHOD_NAMES = [
10905
11769
  "deletePlatformApp",
10906
11770
  "deleteProduct",
10907
11771
  "deleteRoutine",
11772
+ "deleteRoutingRule",
10908
11773
  "deleteSalesforce",
10909
11774
  "deleteScenario",
10910
11775
  "deleteSite",
@@ -10937,6 +11802,7 @@ var WORKSPACE_METHOD_NAMES = [
10937
11802
  "dismissAllNotifications",
10938
11803
  "dismissNotification",
10939
11804
  "downloadEmailAttachment",
11805
+ "downloadFileContents",
10940
11806
  "downloadFilesZip",
10941
11807
  "downloadSiteSourceZip",
10942
11808
  "editWorkflowRevisionAsDraft",
@@ -10999,6 +11865,7 @@ var WORKSPACE_METHOD_NAMES = [
10999
11865
  "getAgentTasks",
11000
11866
  "getAgents",
11001
11867
  "getAnonymousResolution",
11868
+ "getAnonymousFormSubmission",
11002
11869
  "getAnonymousResolutions",
11003
11870
  "getApiKeys",
11004
11871
  "getArchiveBlockers",
@@ -11012,6 +11879,12 @@ var WORKSPACE_METHOD_NAMES = [
11012
11879
  "getAvailableActions",
11013
11880
  "getAvailablePhoneNumbers",
11014
11881
  "getAvailableSlots",
11882
+ "getInstallation",
11883
+ "getInstallationReadiness",
11884
+ "getThemeSettingsSchema",
11885
+ "getBundleDraft",
11886
+ "getBundle",
11887
+ "getBundleVersion",
11015
11888
  "getBusinessHoursStatus",
11016
11889
  "getCalendar",
11017
11890
  "getCalendarEvent",
@@ -11024,8 +11897,11 @@ var WORKSPACE_METHOD_NAMES = [
11024
11897
  "getCelContext",
11025
11898
  "getCharlestonTestDeliveryRecipients",
11026
11899
  "getChat",
11900
+ "getChatByUuid",
11027
11901
  "getChatAssignmentTasks",
11028
11902
  "getChatBrowserLiveView",
11903
+ "saveChatBrowserStorage",
11904
+ "clearChatBrowserStorage",
11029
11905
  "getChatCallbacks",
11030
11906
  "getChatEhrWritebackOutcomes",
11031
11907
  "getChatEmails",
@@ -11071,6 +11947,7 @@ var WORKSPACE_METHOD_NAMES = [
11071
11947
  "getDashboardWorkflowAssignmentStats",
11072
11948
  "getDashboards",
11073
11949
  "getDataRecord",
11950
+ "getDataRecordByUuid",
11074
11951
  "getDataRecordChanges",
11075
11952
  "getDataRecordFilter",
11076
11953
  "getDataRecordFilterCount",
@@ -11188,6 +12065,7 @@ var WORKSPACE_METHOD_NAMES = [
11188
12065
  "getMcpServerResources",
11189
12066
  "getMcpServerTools",
11190
12067
  "getMcpServers",
12068
+ "getMemberByUuid",
11191
12069
  "getMemberExperiments",
11192
12070
  "getMemberFieldDefinitions",
11193
12071
  "getMemberFields",
@@ -11219,6 +12097,7 @@ var WORKSPACE_METHOD_NAMES = [
11219
12097
  "getMondayConnectionStatus",
11220
12098
  "getMondayReconciliationMatches",
11221
12099
  "getMondaySyncConfig",
12100
+ "getMondaySyncLogs",
11222
12101
  "getMyCredentials",
11223
12102
  "getMyGivenGrants",
11224
12103
  "getMyReceivedGrants",
@@ -11229,7 +12108,6 @@ var WORKSPACE_METHOD_NAMES = [
11229
12108
  "getOperatorGroup",
11230
12109
  "getOperatorGroups",
11231
12110
  "getOrCreateQualificationForWorkflow",
11232
- "getOwnedMembers",
11233
12111
  "getPage",
11234
12112
  "getPageBySlug",
11235
12113
  "getPersona",
@@ -11259,11 +12137,14 @@ var WORKSPACE_METHOD_NAMES = [
11259
12137
  "getRoutineConfigEvents",
11260
12138
  "getRoutineRuns",
11261
12139
  "getRoutines",
12140
+ "getRoutingRule",
12141
+ "getRoutingRules",
11262
12142
  "getRuleExecutions",
11263
12143
  "getSMSUsageReport",
11264
12144
  "getSalesforceReconciliationMatches",
11265
12145
  "getSalesforceStatus",
11266
12146
  "getSalesforceSyncConfig",
12147
+ "getSalesforceSyncLogs",
11267
12148
  "getScenario",
11268
12149
  "getSite",
11269
12150
  "getSiteByUuid",
@@ -11309,7 +12190,6 @@ var WORKSPACE_METHOD_NAMES = [
11309
12190
  "getWebhookLogs",
11310
12191
  "getWorkflow",
11311
12192
  "getWorkflowOpeningTurnConversionReport",
11312
- "getWorkflowAccessValidation",
11313
12193
  "getWorkflowActivity",
11314
12194
  "getWorkflowConfigValidation",
11315
12195
  "getWorkflowFeedback",
@@ -11340,6 +12220,8 @@ var WORKSPACE_METHOD_NAMES = [
11340
12220
  "getWorkspaceSubscriptions",
11341
12221
  "getWorkspaceSupportRequest",
11342
12222
  "getWorkspaceThemes",
12223
+ "installBundle",
12224
+ "grantBundle",
11343
12225
  "importFromBoard",
11344
12226
  "importHubspotMembers",
11345
12227
  "importMembers",
@@ -11362,12 +12244,23 @@ var WORKSPACE_METHOD_NAMES = [
11362
12244
  "linkMemberToMonday",
11363
12245
  "linkMemberToSalesforce",
11364
12246
  "linkPhoneNumber",
12247
+ "linkUnlinkedSalesforceMembersByIdentity",
11365
12248
  "listAbilities",
12249
+ "listAnonymousFormSubmissions",
11366
12250
  "listAppConnections",
11367
12251
  "listAvailableAppConnections",
12252
+ "listInstallations",
12253
+ "listBundleGrants",
12254
+ "listBundleVersions",
12255
+ "listBundles",
12256
+ "listBundleWorkflowCandidates",
12257
+ "updateBundle",
12258
+ "listBundleInstallations",
11368
12259
  "listConfluencePages",
11369
12260
  "listConfluenceSpaces",
11370
12261
  "listConnectionMemberFieldKeys",
12262
+ "listContactPermissions",
12263
+ "revokeBundleGrant",
11371
12264
  "rollbackSiteSource",
11372
12265
  "rotateDocumoFaxCredentials",
11373
12266
  "runQuery",
@@ -11388,7 +12281,11 @@ var WORKSPACE_METHOD_NAMES = [
11388
12281
  "getMetricSeries",
11389
12282
  "computeChatMetrics",
11390
12283
  "listPushSubscriptions",
12284
+ "listResourceWorkflows",
12285
+ "getResourceWorkflow",
12286
+ "getResourceWorkflowRevision",
11391
12287
  "listSalesforceObjects",
12288
+ "listScenarioHealthSummaries",
11392
12289
  "listScenarios",
11393
12290
  "listTestChatRuns",
11394
12291
  "listWidgetDomains",
@@ -11404,15 +12301,18 @@ var WORKSPACE_METHOD_NAMES = [
11404
12301
  "previewRenameFieldSlug",
11405
12302
  "previewImportWorkspace",
11406
12303
  "previewInboxEmail",
12304
+ "preflightBundleInstallation",
11407
12305
  "previewRoutineVoiceReadiness",
11408
- "previewRoutineWorkflowAccess",
11409
12306
  "previewSchedule",
12307
+ "previewRoutingRule",
11410
12308
  "previewTTS",
11411
12309
  "previewTemplate",
11412
12310
  "previewThinkingSound",
11413
12311
  "previewWorkspaceImport",
11414
12312
  "previewWorkspaceImportZip",
11415
12313
  "provisionClientWorkspace",
12314
+ "previewInstallationUpgrade",
12315
+ "publishBundle",
11416
12316
  "publishWorkflowRevision",
11417
12317
  "putJourneyDraft",
11418
12318
  "putJourneyV2Definition",
@@ -11424,11 +12324,16 @@ var WORKSPACE_METHOD_NAMES = [
11424
12324
  "registerPushSubscription",
11425
12325
  "reindexFolder",
11426
12326
  "releasePhoneNumber",
12327
+ "reorderRoutingRules",
11427
12328
  "removeFileRole",
11428
12329
  "removeFolderRole",
11429
12330
  "removeGroupMember",
11430
12331
  "reorderEventRules",
11431
12332
  "reorderMenuItems",
12333
+ "reconcileInstallation",
12334
+ "setInstallationPolicy",
12335
+ "upgradeInstallation",
12336
+ "replaceBundleDraft",
11432
12337
  "replyToEmail",
11433
12338
  "rotateDocumoFaxCredentials",
11434
12339
  "requestPhoneNumber",
@@ -11464,7 +12369,6 @@ var WORKSPACE_METHOD_NAMES = [
11464
12369
  "startSyncRun",
11465
12370
  "startTestChatRun",
11466
12371
  "summarizeChat",
11467
- "switchMember",
11468
12372
  "syncCalendarWithGoogle",
11469
12373
  "syncCalendarWithHealthie",
11470
12374
  "testFhirConnection",
@@ -11477,6 +12381,7 @@ var WORKSPACE_METHOD_NAMES = [
11477
12381
  "unarchiveChat",
11478
12382
  "unarchiveDataType",
11479
12383
  "unarchiveMember",
12384
+ "unarchiveMemberByExternalId",
11480
12385
  "unarchivePersona",
11481
12386
  "unarchiveStep",
11482
12387
  "unarchiveTask",
@@ -11534,6 +12439,7 @@ var WORKSPACE_METHOD_NAMES = [
11534
12439
  "updateJourneyNote",
11535
12440
  "updateMcpServer",
11536
12441
  "updateMember",
12442
+ "updateMemberByExternalId",
11537
12443
  "updateMemberField",
11538
12444
  "updateMemberFilter",
11539
12445
  "updateMemberLabel",
@@ -11550,6 +12456,7 @@ var WORKSPACE_METHOD_NAMES = [
11550
12456
  "updateProduct",
11551
12457
  "updateProject",
11552
12458
  "updateRoutine",
12459
+ "updateRoutingRule",
11553
12460
  "updateSalesforceSyncConfig",
11554
12461
  "resyncSalesforceLinkedMembers",
11555
12462
  "updateScenario",
@@ -11572,7 +12479,6 @@ var WORKSPACE_METHOD_NAMES = [
11572
12479
  "updateWorkspace",
11573
12480
  "updateWorkspaceDefaults",
11574
12481
  "updateWorkspaceInvitationAdmin",
11575
- "updateWorkspaceThemes",
11576
12482
  "upsertDataRecord",
11577
12483
  "upsertWidgetDomain",
11578
12484
  "validateCelExpression",
@@ -11663,6 +12569,9 @@ function bindChatsMethods(target, chats) {
11663
12569
  target.transitionChatInteractionSession = chats.transitionChatInteractionSession.bind(chats);
11664
12570
  target.getChats = chats.getChats.bind(chats);
11665
12571
  target.getChat = chats.getChat.bind(chats);
12572
+ target.getChatByUuid = chats.getChatByUuid.bind(chats);
12573
+ target.saveChatBrowserStorage = chats.saveChatBrowserStorage.bind(chats);
12574
+ target.clearChatBrowserStorage = chats.clearChatBrowserStorage.bind(chats);
11666
12575
  target.getChatBrowserLiveView = chats.getChatBrowserLiveView.bind(chats);
11667
12576
  target.getChatMachineResources = chats.getChatMachineResources.bind(chats);
11668
12577
  target.getCurrentSmsChat = chats.getCurrentSmsChat.bind(chats);
@@ -11799,7 +12708,10 @@ function bindDataTypesMethods(target, dataTypes) {
11799
12708
  target.unarchiveDataType = dataTypes.unarchiveDataType.bind(dataTypes);
11800
12709
  target.cloneDataType = dataTypes.cloneDataType.bind(dataTypes);
11801
12710
  target.getDataRecords = dataTypes.getDataRecords.bind(dataTypes);
12711
+ target.listAnonymousFormSubmissions = dataTypes.listAnonymousFormSubmissions.bind(dataTypes);
12712
+ target.getAnonymousFormSubmission = dataTypes.getAnonymousFormSubmission.bind(dataTypes);
11802
12713
  target.getDataRecord = dataTypes.getDataRecord.bind(dataTypes);
12714
+ target.getDataRecordByUuid = dataTypes.getDataRecordByUuid.bind(dataTypes);
11803
12715
  target.createDataRecord = dataTypes.createDataRecord.bind(dataTypes);
11804
12716
  target.updateDataRecord = dataTypes.updateDataRecord.bind(dataTypes);
11805
12717
  target.deleteDataRecord = dataTypes.deleteDataRecord.bind(dataTypes);
@@ -11838,18 +12750,19 @@ function bindMembersMethods(target, members) {
11838
12750
  target.previewMemberWorkflowVoice = members.previewMemberWorkflowVoice.bind(members);
11839
12751
  target.setMemberWorkflowVoice = members.setMemberWorkflowVoice.bind(members);
11840
12752
  target.clearMemberWorkflowVoice = members.clearMemberWorkflowVoice.bind(members);
11841
- target.getOwnedMembers = members.getOwnedMembers.bind(members);
11842
- target.switchMember = members.switchMember.bind(members);
11843
- target.clearMemberSwitch = members.clearMemberSwitch.bind(members);
11844
12753
  target.updateCurrentMember = members.updateCurrentMember.bind(members);
11845
12754
  target.getWorkspaceMembers = members.getWorkspaceMembers.bind(members);
11846
12755
  target.getWorkspaceMember = members.getWorkspaceMember.bind(members);
12756
+ target.getMemberByUuid = members.getMemberByUuid.bind(members);
11847
12757
  target.getOrgWorkspaceMember = members.getOrgWorkspaceMember.bind(members);
11848
12758
  target.createWorkspaceMember = members.createWorkspaceMember.bind(members);
11849
12759
  target.updateMember = members.updateMember.bind(members);
11850
12760
  target.deleteMember = members.deleteMember.bind(members);
11851
12761
  target.archiveMember = members.archiveMember.bind(members);
11852
12762
  target.unarchiveMember = members.unarchiveMember.bind(members);
12763
+ target.updateMemberByExternalId = members.updateMemberByExternalId.bind(members);
12764
+ target.archiveMemberByExternalId = members.archiveMemberByExternalId.bind(members);
12765
+ target.unarchiveMemberByExternalId = members.unarchiveMemberByExternalId.bind(members);
11853
12766
  target.sendMemberPhoneConfirmation = members.sendMemberPhoneConfirmation.bind(members);
11854
12767
  target.bulkCreateMembers = members.bulkCreateMembers.bind(members);
11855
12768
  target.previewImportMembers = members.previewImportMembers.bind(members);
@@ -11896,6 +12809,8 @@ function bindMembersMethods(target, members) {
11896
12809
  target.getMemberRelationships = members.getMemberRelationships.bind(members);
11897
12810
  target.createMemberRelationship = members.createMemberRelationship.bind(members);
11898
12811
  target.archiveMemberRelationship = members.archiveMemberRelationship.bind(members);
12812
+ target.listContactPermissions = members.listContactPermissions.bind(members);
12813
+ target.createContactPermission = members.createContactPermission.bind(members);
11899
12814
  }
11900
12815
 
11901
12816
  // src/client/bindings/workspaces.ts
@@ -11949,7 +12864,6 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
11949
12864
  target.rebuildImportSkippedRules = workspaces.rebuildImportSkippedRules.bind(workspaces);
11950
12865
  target.previewImportWorkspace = workspaces.previewImportWorkspace.bind(workspaces);
11951
12866
  target.getWorkspaceThemes = workspaces.getWorkspaceThemes.bind(workspaces);
11952
- target.updateWorkspaceThemes = workspaces.updateWorkspaceThemes.bind(workspaces);
11953
12867
  target.getWorkspaceBySlug = workspaces.getWorkspace.bind(workspaces);
11954
12868
  target.getWorkspaceScopes = workspaces.getWorkspaceScopes.bind(workspaces);
11955
12869
  target.getUsageDashboard = workspaces.getUsageDashboard.bind(workspaces);
@@ -11998,6 +12912,7 @@ function bindAuthMethods(target, auth, assignments) {
11998
12912
  target.logout = auth.logout.bind(auth);
11999
12913
  target.requestCrossDomainToken = auth.requestCrossDomainToken.bind(auth);
12000
12914
  target.exchangeToken = auth.exchangeToken.bind(auth);
12915
+ target.createRealtimeLoginToken = auth.createRealtimeLoginToken.bind(auth);
12001
12916
  target.getDomainMapping = auth.getDomainMapping.bind(auth);
12002
12917
  target.createSignup = auth.createSignup.bind(auth);
12003
12918
  target.createAccount = auth.emailPasswordSignup.bind(auth);
@@ -12087,6 +13002,7 @@ function bindSitesMethods(target, sites) {
12087
13002
  function bindFilesMethods(target, files) {
12088
13003
  target.getFiles = files.getFiles.bind(files);
12089
13004
  target.getFile = files.getFile.bind(files);
13005
+ target.downloadFileContents = files.downloadFileContents.bind(files);
12090
13006
  target.downloadFilesZip = files.downloadFilesZip.bind(files);
12091
13007
  target.createFile = files.createFile.bind(files);
12092
13008
  target.uploadFile = files.uploadFile.bind(files);
@@ -12159,7 +13075,6 @@ function bindEventsMethods(target, events) {
12159
13075
  target.resetRoutineRuns = events.resetRoutineRuns.bind(events);
12160
13076
  target.previewSchedule = events.previewSchedule.bind(events);
12161
13077
  target.previewRoutineVoiceReadiness = events.previewRoutineVoiceReadiness.bind(events);
12162
- target.previewRoutineWorkflowAccess = events.previewRoutineWorkflowAccess.bind(events);
12163
13078
  }
12164
13079
 
12165
13080
  // src/client/bindings/experiments.ts
@@ -12200,7 +13115,6 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
12200
13115
  target.createWorkflowFromTemplate = workflows.createWorkflowFromTemplate.bind(workflows);
12201
13116
  target.getWorkflowTaskAssignmentStats = workflows.getWorkflowTaskAssignmentStats.bind(workflows);
12202
13117
  target.getTaskChats = workflows.getTaskChats.bind(workflows);
12203
- target.getWorkflowAccessValidation = workflows.getWorkflowAccessValidation.bind(workflows);
12204
13118
  target.getWorkflowConfigValidation = workflows.getWorkflowConfigValidation.bind(workflows);
12205
13119
  target.getWorkflowNotes = workflowNotes.getWorkflowNotes.bind(workflowNotes);
12206
13120
  target.createWorkflowNote = workflowNotes.createWorkflowNote.bind(workflowNotes);
@@ -12321,6 +13235,7 @@ function bindToolkitsMethods(target, toolkits, templates, aiModels, customToolki
12321
13235
  target.previewTemplate = templates.previewTemplate.bind(templates);
12322
13236
  target.getVariableRegistry = templates.getVariableRegistry.bind(templates);
12323
13237
  target.getChatModels = aiModels.getChatModels.bind(aiModels);
13238
+ target.getManagerModels = aiModels.getManagerModels.bind(aiModels);
12324
13239
  target.getRealtimeModels = aiModels.getRealtimeModels.bind(aiModels);
12325
13240
  target.getSTTModels = aiModels.getSTTModels.bind(aiModels);
12326
13241
  target.getTTSModels = aiModels.getTTSModels.bind(aiModels);
@@ -12434,6 +13349,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
12434
13349
  target.getMondayConnectionBoardColumns = mondayIntegration.getMondayConnectionBoardColumns.bind(mondayIntegration);
12435
13350
  target.getMondayConnectionBoardGroups = mondayIntegration.getMondayConnectionBoardGroups.bind(mondayIntegration);
12436
13351
  target.getMondaySyncConfig = mondayIntegration.getMondaySyncConfig.bind(mondayIntegration);
13352
+ target.getMondaySyncLogs = mondayIntegration.getMondaySyncLogs.bind(mondayIntegration);
12437
13353
  target.updateMondaySyncConfig = mondayIntegration.updateMondaySyncConfig.bind(mondayIntegration);
12438
13354
  target.getLinkedMondayMembers = mondayIntegration.getLinkedMondayMembers.bind(mondayIntegration);
12439
13355
  target.getMondayReconciliationMatches = mondayIntegration.getMondayReconciliationMatches.bind(mondayIntegration);
@@ -12548,10 +13464,12 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
12548
13464
  target.deleteSalesforce = salesforce.deleteSalesforce.bind(salesforce);
12549
13465
  target.getSalesforceReconciliationMatches = salesforce.getSalesforceReconciliationMatches.bind(salesforce);
12550
13466
  target.linkMemberToSalesforce = salesforce.linkMemberToSalesforce.bind(salesforce);
13467
+ target.linkUnlinkedSalesforceMembersByIdentity = salesforce.linkUnlinkedSalesforceMembersByIdentity.bind(salesforce);
12551
13468
  target.bulkLinkMembersToSalesforce = salesforce.bulkLinkMembersToSalesforce.bind(salesforce);
12552
13469
  target.unlinkMemberFromSalesforce = salesforce.unlinkMemberFromSalesforce.bind(salesforce);
12553
13470
  target.getLinkedSalesforceMembers = salesforce.getLinkedSalesforceMembers.bind(salesforce);
12554
13471
  target.getSalesforceSyncConfig = salesforce.getSalesforceSyncConfig.bind(salesforce);
13472
+ target.getSalesforceSyncLogs = salesforce.getSalesforceSyncLogs.bind(salesforce);
12555
13473
  target.updateSalesforceSyncConfig = salesforce.updateSalesforceSyncConfig.bind(salesforce);
12556
13474
  target.resyncSalesforceLinkedMembers = salesforce.resyncSalesforceLinkedMembers.bind(salesforce);
12557
13475
  target.listSalesforceObjects = salesforce.listSalesforceObjects.bind(salesforce);
@@ -12641,10 +13559,15 @@ function bindOrgMethods(target, org) {
12641
13559
  target.getVoiceTrustProducts = org.getVoiceTrustProducts.bind(org);
12642
13560
  target.syncVoiceTrustProducts = org.syncVoiceTrustProducts.bind(org);
12643
13561
  target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
13562
+ target.getOrganizationWorkspace = org.getOrganizationWorkspace.bind(org);
13563
+ target.updateOrganizationWorkspace = org.updateOrganizationWorkspace.bind(org);
12644
13564
  target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
12645
13565
  target.getA2PCampaignConfig = org.getA2PCampaignConfig.bind(org);
12646
13566
  target.updateA2PCampaignConfig = org.updateA2PCampaignConfig.bind(org);
12647
13567
  target.getOrgWorkspaceUsage = org.getOrgWorkspaceUsage.bind(org);
13568
+ target.updateOrganizationMember = org.updateOrganizationMember.bind(org);
13569
+ target.listOrgWebhookEndpoints = org.listOrgWebhookEndpoints.bind(org);
13570
+ target.getOrgWebhookEndpoint = org.getOrgWebhookEndpoint.bind(org);
12648
13571
  }
12649
13572
 
12650
13573
  // src/client/bindings/pronunciations.ts
@@ -12664,12 +13587,58 @@ function bindPronunciationsMethods(target, pronunciations) {
12664
13587
  target.previewPronunciation = pronunciations.previewPronunciation.bind(pronunciations);
12665
13588
  }
12666
13589
 
13590
+ // src/client/bindings/resource-workflows.ts
13591
+ function bindResourceWorkflowsMethods(target, resourceWorkflows) {
13592
+ target.getResourceWorkflow = resourceWorkflows.getResourceWorkflow.bind(resourceWorkflows);
13593
+ target.getResourceWorkflowRevision = resourceWorkflows.getResourceWorkflowRevision.bind(resourceWorkflows);
13594
+ }
13595
+
13596
+ // src/client/bindings/bundles.ts
13597
+ function bindBundlesMethods(target, bundles, resourceWorkflows) {
13598
+ bindResourceWorkflowsMethods(target, resourceWorkflows);
13599
+ target.getSolutionRelease = bundles.getSolutionRelease.bind(bundles);
13600
+ target.updateBundle = bundles.updateBundle.bind(bundles);
13601
+ target.listBundleInstallations = bundles.listBundleInstallations.bind(bundles);
13602
+ target.listBundles = bundles.listBundles.bind(bundles);
13603
+ target.listBundleWorkflowCandidates = bundles.listBundleWorkflowCandidates.bind(bundles);
13604
+ target.createBundle = bundles.createBundle.bind(bundles);
13605
+ target.getBundleDraft = bundles.getBundleDraft.bind(bundles);
13606
+ target.replaceBundleDraft = bundles.replaceBundleDraft.bind(bundles);
13607
+ target.publishBundle = bundles.publishBundle.bind(bundles);
13608
+ target.listBundleVersions = bundles.listBundleVersions.bind(bundles);
13609
+ target.getBundle = bundles.getBundle.bind(bundles);
13610
+ target.getBundleVersion = bundles.getBundleVersion.bind(bundles);
13611
+ target.listBundleGrants = bundles.listBundleGrants.bind(bundles);
13612
+ target.grantBundle = bundles.grantBundle.bind(bundles);
13613
+ target.revokeBundleGrant = bundles.revokeBundleGrant.bind(bundles);
13614
+ target.listResourceWorkflows = resourceWorkflows.listResourceWorkflows.bind(resourceWorkflows);
13615
+ }
13616
+
13617
+ // src/client/bindings/installations.ts
13618
+ function bindInstallationsMethods(target, installations) {
13619
+ target.preflightBundleInstallation = installations.preflightBundleInstallation.bind(installations);
13620
+ target.installBundle = installations.installBundle.bind(installations);
13621
+ target.listInstallations = installations.listInstallations.bind(installations);
13622
+ target.getInstallation = installations.getInstallation.bind(installations);
13623
+ target.getInstallationReadiness = installations.getInstallationReadiness.bind(installations);
13624
+ target.previewInstallationUpgrade = installations.previewInstallationUpgrade.bind(installations);
13625
+ target.upgradeInstallation = installations.upgradeInstallation.bind(installations);
13626
+ target.setInstallationPolicy = installations.setInstallationPolicy.bind(installations);
13627
+ target.unsubscribeInstallation = installations.unsubscribeInstallation.bind(installations);
13628
+ target.restoreInstallationForm = installations.restoreInstallationForm.bind(installations);
13629
+ target.restoreInstallationWorkflowResources = installations.restoreInstallationWorkflowResources.bind(installations);
13630
+ target.bindInstallationSlots = installations.bindInstallationSlots.bind(installations);
13631
+ target.reconcileInstallation = installations.reconcileInstallation.bind(installations);
13632
+ target.getThemeSettingsSchema = installations.getThemeSettingsSchema.bind(installations);
13633
+ }
13634
+
12667
13635
  // src/client/bindings/journeys.ts
12668
13636
  function bindJourneysMethods(target, journeys) {
12669
13637
  target.getJourneys = journeys.getJourneys.bind(journeys);
12670
13638
  target.getJourney = journeys.getJourney.bind(journeys);
12671
13639
  target.getJourneyAuthoring = journeys.getJourneyAuthoring.bind(journeys);
12672
13640
  target.putJourneyDraft = journeys.putJourneyDraft.bind(journeys);
13641
+ target.deleteJourneyDraft = journeys.deleteJourneyDraft.bind(journeys);
12673
13642
  target.putJourneyV2Definition = journeys.putJourneyV2Definition.bind(journeys);
12674
13643
  target.getJourneyV2Validation = journeys.getJourneyV2Validation.bind(journeys);
12675
13644
  target.getJourneyFilterOptions = journeys.getJourneyFilterOptions.bind(journeys);
@@ -12717,6 +13686,7 @@ function bindQualificationsMethods(target, qualifications) {
12717
13686
  target.updateScenario = qualifications.updateScenario.bind(qualifications);
12718
13687
  target.deleteScenario = qualifications.deleteScenario.bind(qualifications);
12719
13688
  target.listTestChatRuns = qualifications.listTestChatRuns.bind(qualifications);
13689
+ target.listScenarioHealthSummaries = qualifications.listScenarioHealthSummaries.bind(qualifications);
12720
13690
  target.getTestChatRun = qualifications.getTestChatRun.bind(qualifications);
12721
13691
  target.startTestChatRun = qualifications.startTestChatRun.bind(qualifications);
12722
13692
  target.evaluateTestChatRun = qualifications.evaluateTestChatRun.bind(qualifications);
@@ -12805,6 +13775,17 @@ function bindSupportRequestMethods(target, supportRequests) {
12805
13775
  target.clickWorkspaceSupportRequestResource = supportRequests.clickWorkspaceSupportRequestResource.bind(supportRequests);
12806
13776
  }
12807
13777
 
13778
+ // src/client/bindings/routing-rules.ts
13779
+ function bindRoutingRulesMethods(target, routingRules) {
13780
+ target.getRoutingRules = routingRules.getRoutingRules.bind(routingRules);
13781
+ target.getRoutingRule = routingRules.getRoutingRule.bind(routingRules);
13782
+ target.createRoutingRule = routingRules.createRoutingRule.bind(routingRules);
13783
+ target.updateRoutingRule = routingRules.updateRoutingRule.bind(routingRules);
13784
+ target.deleteRoutingRule = routingRules.deleteRoutingRule.bind(routingRules);
13785
+ target.reorderRoutingRules = routingRules.reorderRoutingRules.bind(routingRules);
13786
+ target.previewRoutingRule = routingRules.previewRoutingRule.bind(routingRules);
13787
+ }
13788
+
12808
13789
  // src/client/client.ts
12809
13790
  var GravityRailClient = class {
12810
13791
  // WorkspaceInvitations is exposed publicly for backward compatibility
@@ -12830,6 +13811,9 @@ var GravityRailClient = class {
12830
13811
  // Chats API
12831
13812
  getChats;
12832
13813
  getChat;
13814
+ getChatByUuid;
13815
+ saveChatBrowserStorage;
13816
+ clearChatBrowserStorage;
12833
13817
  getChatBrowserLiveView;
12834
13818
  getChatMachineResources;
12835
13819
  getCurrentSmsChat;
@@ -12907,7 +13891,10 @@ var GravityRailClient = class {
12907
13891
  unarchiveDataType;
12908
13892
  cloneDataType;
12909
13893
  getDataRecords;
13894
+ listAnonymousFormSubmissions;
13895
+ getAnonymousFormSubmission;
12910
13896
  getDataRecord;
13897
+ getDataRecordByUuid;
12911
13898
  createDataRecord;
12912
13899
  updateDataRecord;
12913
13900
  deleteDataRecord;
@@ -12933,12 +13920,10 @@ var GravityRailClient = class {
12933
13920
  previewMemberWorkflowVoice;
12934
13921
  setMemberWorkflowVoice;
12935
13922
  clearMemberWorkflowVoice;
12936
- getOwnedMembers;
12937
- switchMember;
12938
- clearMemberSwitch;
12939
13923
  updateCurrentMember;
12940
13924
  getWorkspaceMembers;
12941
13925
  getWorkspaceMember;
13926
+ getMemberByUuid;
12942
13927
  // Org-scoped, so deliberately absent from WORKSPACE_METHOD_NAMES: that proxy
12943
13928
  // passes a workspace uuid as the first argument.
12944
13929
  getOrgWorkspaceMember;
@@ -12947,6 +13932,9 @@ var GravityRailClient = class {
12947
13932
  deleteMember;
12948
13933
  archiveMember;
12949
13934
  unarchiveMember;
13935
+ updateMemberByExternalId;
13936
+ archiveMemberByExternalId;
13937
+ unarchiveMemberByExternalId;
12950
13938
  sendMemberPhoneConfirmation;
12951
13939
  bulkCreateMembers;
12952
13940
  previewImportMembers;
@@ -12999,6 +13987,8 @@ var GravityRailClient = class {
12999
13987
  getMemberRelationships;
13000
13988
  createMemberRelationship;
13001
13989
  archiveMemberRelationship;
13990
+ listContactPermissions;
13991
+ createContactPermission;
13002
13992
  // Agent Tasks API (operator-facing async sub-agent inspection/cancel)
13003
13993
  getAgentTasks;
13004
13994
  getAgentTask;
@@ -13022,6 +14012,7 @@ var GravityRailClient = class {
13022
14012
  updateScenario;
13023
14013
  deleteScenario;
13024
14014
  listTestChatRuns;
14015
+ listScenarioHealthSummaries;
13025
14016
  getTestChatRun;
13026
14017
  startTestChatRun;
13027
14018
  evaluateTestChatRun;
@@ -13099,6 +14090,7 @@ var GravityRailClient = class {
13099
14090
  getJourney;
13100
14091
  getJourneyAuthoring;
13101
14092
  putJourneyDraft;
14093
+ deleteJourneyDraft;
13102
14094
  putJourneyV2Definition;
13103
14095
  getJourneyV2Validation;
13104
14096
  getJourneyFilterOptions;
@@ -13133,6 +14125,41 @@ var GravityRailClient = class {
13133
14125
  createJourneyNote;
13134
14126
  updateJourneyNote;
13135
14127
  deleteJourneyNote;
14128
+ updateBundle;
14129
+ listBundleInstallations;
14130
+ // Bundles API
14131
+ getSolutionRelease;
14132
+ listBundles;
14133
+ listBundleWorkflowCandidates;
14134
+ createBundle;
14135
+ getBundleDraft;
14136
+ replaceBundleDraft;
14137
+ publishBundle;
14138
+ listBundleVersions;
14139
+ getBundle;
14140
+ getBundleVersion;
14141
+ listBundleGrants;
14142
+ grantBundle;
14143
+ revokeBundleGrant;
14144
+ listResourceWorkflows;
14145
+ // Resource Workflows API — published Workflow catalog reads
14146
+ getResourceWorkflow;
14147
+ getResourceWorkflowRevision;
14148
+ // Installations API
14149
+ preflightBundleInstallation;
14150
+ installBundle;
14151
+ listInstallations;
14152
+ getInstallation;
14153
+ getInstallationReadiness;
14154
+ previewInstallationUpgrade;
14155
+ upgradeInstallation;
14156
+ setInstallationPolicy;
14157
+ unsubscribeInstallation;
14158
+ bindInstallationSlots;
14159
+ restoreInstallationForm;
14160
+ restoreInstallationWorkflowResources;
14161
+ reconcileInstallation;
14162
+ getThemeSettingsSchema;
13136
14163
  // Experiments API
13137
14164
  getExperiments;
13138
14165
  getExperiment;
@@ -13225,7 +14252,6 @@ var GravityRailClient = class {
13225
14252
  rebuildImportSkippedRules;
13226
14253
  previewImportWorkspace;
13227
14254
  getWorkspaceThemes;
13228
- updateWorkspaceThemes;
13229
14255
  getWorkspaceBySlug;
13230
14256
  getWorkspaceScopes;
13231
14257
  getUsageDashboard;
@@ -13264,10 +14290,15 @@ var GravityRailClient = class {
13264
14290
  getVoiceTrustProducts;
13265
14291
  syncVoiceTrustProducts;
13266
14292
  createOrganizationWorkspace;
14293
+ getOrganizationWorkspace;
14294
+ updateOrganizationWorkspace;
13267
14295
  getOrgBillingCustomer;
13268
14296
  getA2PCampaignConfig;
13269
14297
  updateA2PCampaignConfig;
13270
14298
  getOrgWorkspaceUsage;
14299
+ updateOrganizationMember;
14300
+ listOrgWebhookEndpoints;
14301
+ getOrgWebhookEndpoint;
13271
14302
  getVapidPublicKey;
13272
14303
  registerPushSubscription;
13273
14304
  unregisterPushSubscription;
@@ -13304,6 +14335,7 @@ var GravityRailClient = class {
13304
14335
  logout;
13305
14336
  requestCrossDomainToken;
13306
14337
  exchangeToken;
14338
+ createRealtimeLoginToken;
13307
14339
  getDomainMapping;
13308
14340
  createSignup;
13309
14341
  createAccount;
@@ -13393,6 +14425,7 @@ var GravityRailClient = class {
13393
14425
  updateProject;
13394
14426
  updatePlan;
13395
14427
  resolveFilePath;
14428
+ downloadFileContents;
13396
14429
  downloadFilesZip;
13397
14430
  createFile;
13398
14431
  uploadFile;
@@ -13453,7 +14486,6 @@ var GravityRailClient = class {
13453
14486
  resetRoutineRuns;
13454
14487
  previewSchedule;
13455
14488
  previewRoutineVoiceReadiness;
13456
- previewRoutineWorkflowAccess;
13457
14489
  // Workflows API
13458
14490
  getWorkflows;
13459
14491
  getWorkflow;
@@ -13474,7 +14506,6 @@ var GravityRailClient = class {
13474
14506
  createWorkflowFromTemplate;
13475
14507
  getWorkflowTaskAssignmentStats;
13476
14508
  getTaskChats;
13477
- getWorkflowAccessValidation;
13478
14509
  getWorkflowConfigValidation;
13479
14510
  getWorkflowNotes;
13480
14511
  createWorkflowNote;
@@ -13586,6 +14617,7 @@ var GravityRailClient = class {
13586
14617
  previewTemplate;
13587
14618
  getVariableRegistry;
13588
14619
  getChatModels;
14620
+ getManagerModels;
13589
14621
  getRealtimeModels;
13590
14622
  getSTTModels;
13591
14623
  getTTSModels;
@@ -13698,6 +14730,7 @@ var GravityRailClient = class {
13698
14730
  getMondayConnectionBoardColumns;
13699
14731
  getMondayConnectionBoardGroups;
13700
14732
  getMondaySyncConfig;
14733
+ getMondaySyncLogs;
13701
14734
  updateMondaySyncConfig;
13702
14735
  getLinkedMondayMembers;
13703
14736
  getMondayReconciliationMatches;
@@ -13819,10 +14852,12 @@ var GravityRailClient = class {
13819
14852
  deleteSalesforce;
13820
14853
  getSalesforceReconciliationMatches;
13821
14854
  linkMemberToSalesforce;
14855
+ linkUnlinkedSalesforceMembersByIdentity;
13822
14856
  bulkLinkMembersToSalesforce;
13823
14857
  unlinkMemberFromSalesforce;
13824
14858
  getLinkedSalesforceMembers;
13825
14859
  getSalesforceSyncConfig;
14860
+ getSalesforceSyncLogs;
13826
14861
  updateSalesforceSyncConfig;
13827
14862
  resyncSalesforceLinkedMembers;
13828
14863
  listSalesforceObjects;
@@ -13919,6 +14954,14 @@ var GravityRailClient = class {
13919
14954
  closeWorkspaceSupportRequest;
13920
14955
  reopenWorkspaceSupportRequest;
13921
14956
  clickWorkspaceSupportRequestResource;
14957
+ // Routing Rules API
14958
+ getRoutingRules;
14959
+ getRoutingRule;
14960
+ createRoutingRule;
14961
+ updateRoutingRule;
14962
+ deleteRoutingRule;
14963
+ reorderRoutingRules;
14964
+ previewRoutingRule;
13922
14965
  constructor(apiKey, baseUrl, customFetch) {
13923
14966
  const apis = createApiModules(apiKey, baseUrl, customFetch);
13924
14967
  this.apis = apis;
@@ -13940,6 +14983,8 @@ var GravityRailClient = class {
13940
14983
  bindMotdMethods(this, apis.motd);
13941
14984
  bindTrackedLinksMethods(this, apis.trackedLinks);
13942
14985
  bindJourneysMethods(this, apis.journeys);
14986
+ bindBundlesMethods(this, apis.bundles, apis.resourceWorkflows);
14987
+ bindInstallationsMethods(this, apis.installations);
13943
14988
  bindExperimentsMethods(this, apis.experiments);
13944
14989
  bindOperatorMethods(this, apis.operatorGroups);
13945
14990
  bindOrgMethods(this, apis.org);
@@ -13993,6 +15038,7 @@ var GravityRailClient = class {
13993
15038
  bindCustomersMethods(this, apis.customers);
13994
15039
  bindResellersMethods(this, apis.resellers);
13995
15040
  bindSupportRequestMethods(this, apis.supportRequests);
15041
+ bindRoutingRulesMethods(this, apis.routingRules);
13996
15042
  }
13997
15043
  /**
13998
15044
  * Return a workspace-scoped client facade.
@@ -14070,32 +15116,6 @@ var GravityRailClient = class {
14070
15116
  }
14071
15117
  });
14072
15118
  }
14073
- /**
14074
- * Set the acting member UUID for member identity switching.
14075
- * When set, all API requests will include the X-Acting-Member header.
14076
- * The backend will validate that the authenticated account owns this member
14077
- * and use it as the effective identity for the request.
14078
- * Propagates to all API modules.
14079
- */
14080
- setActingMember(memberUuid) {
14081
- Object.values(this.apis).forEach((api) => {
14082
- if (typeof api.setActingMember === "function") {
14083
- api.setActingMember(memberUuid);
14084
- }
14085
- });
14086
- }
14087
- /**
14088
- * Get the current acting member UUID.
14089
- * Returns undefined if no member switch is active.
14090
- */
14091
- getActingMember() {
14092
- for (const api of Object.values(this.apis)) {
14093
- if (typeof api.getActingMember === "function") {
14094
- return api.getActingMember();
14095
- }
14096
- }
14097
- return void 0;
14098
- }
14099
15119
  };
14100
15120
 
14101
15121
  // src/types/ability-types.ts
@@ -14115,13 +15135,14 @@ var AbilityTypeSlugs = {
14115
15135
  GOOGLE_DRIVE: "integration:google_drive",
14116
15136
  GOOGLE_SHEETS: "integration:google_sheets",
14117
15137
  CHARLESTON_PMD_PAGING: "integration:charleston_pmd_paging",
15138
+ COSAN_PATHWAYS_SCHEDULING: "integration:cosan_pathways_scheduling",
14118
15139
  // Communication
14119
15140
  PHONE_CALL_TOOLS: "communication:phone_call_tools",
14120
15141
  SEND_SMS: "communication:send_sms",
15142
+ SEND_EMAIL: "communication:send_email",
14121
15143
  SEND_WHATSAPP: "communication:send_whatsapp",
14122
15144
  MEMBER_ACCESS: "communication:member_access",
14123
15145
  AUDIO_PLAYBACK: "communication:audio_playback",
14124
- IMAGE_DISPLAY: "communication:image_display",
14125
15146
  // Oversight
14126
15147
  SUPERVISOR: "oversight:supervisor",
14127
15148
  SUPERVISOR_ACTIONS: "oversight:supervisor_actions",
@@ -14133,6 +15154,8 @@ var AbilityTypeSlugs = {
14133
15154
  MANAGE_WORKSPACE: "delegation:manage_workspace",
14134
15155
  // Workflow
14135
15156
  WORKFLOW_RUN: "workflow:run",
15157
+ // Access
15158
+ MEMBER_ROLE_GATE: "access:member_role_gate",
14136
15159
  // Commerce
14137
15160
  RESELLER: "commerce:reseller",
14138
15161
  // System (auto-injected, hidden from users)
@@ -14151,14 +15174,7 @@ function getTTSProvider(ttsModel) {
14151
15174
  if (!ttsModel || ttsModel === "native") return ttsModel ?? null;
14152
15175
  return ttsModel.split(":")[0] ?? null;
14153
15176
  }
14154
- var TTS_PREVIEW_PROVIDERS = [
14155
- "openai",
14156
- "elevenlabs",
14157
- "google",
14158
- "aws",
14159
- "deepgram",
14160
- "xai"
14161
- ];
15177
+ var TTS_PREVIEW_PROVIDERS = ["openai", "google", "aws", "deepgram", "xai"];
14162
15178
  function getVoiceModelId(entity) {
14163
15179
  const config = entity.realtimeModelConfig;
14164
15180
  return config?.voiceModel ?? null;
@@ -14343,12 +15359,6 @@ var AbilityConfigIssueSeverity = {
14343
15359
  warning: "warning",
14344
15360
  error: "error"
14345
15361
  };
14346
- var WorkflowAccessWarningResourceType = {
14347
- form: "form",
14348
- file: "file",
14349
- folder: "folder",
14350
- calendar: "calendar"
14351
- };
14352
15362
 
14353
15363
  // src/types/generated/workflow.ts
14354
15364
  var WorkflowRoutingMode = {
@@ -14373,12 +15383,21 @@ var ImportReadinessIssueCode = {
14373
15383
  phone_not_provisioned: "phone_not_provisioned",
14374
15384
  phone_missing_default_workflow: "phone_missing_default_workflow",
14375
15385
  inbox_missing_default_workflow: "inbox_missing_default_workflow",
14376
- workflow_missing_default_phone: "workflow_missing_default_phone"
15386
+ workflow_missing_default_phone: "workflow_missing_default_phone",
15387
+ workflow_missing_default_inbox: "workflow_missing_default_inbox",
15388
+ routine_webhook_handoff_unverified: "routine_webhook_handoff_unverified",
15389
+ app_connection_not_connected: "app_connection_not_connected",
15390
+ site_form_migration_pending: "site_form_migration_pending",
15391
+ site_form_binding_invalid: "site_form_binding_invalid",
15392
+ site_theme_setting_inherited: "site_theme_setting_inherited"
14377
15393
  };
14378
15394
  var ImportReadinessIssueResourceType = {
14379
15395
  phone: "phone",
14380
15396
  inbox: "inbox",
14381
- workflow: "workflow"
15397
+ workflow: "workflow",
15398
+ routine: "routine",
15399
+ app_connection: "app_connection",
15400
+ site: "site"
14382
15401
  };
14383
15402
  var ImportSkippedRuleResourceGroupResourceType = {
14384
15403
  phone: "phone",
@@ -14400,7 +15419,8 @@ var ImportSkippedRuleResponseParentKind = {
14400
15419
  var ImportSkippedRuleResponseReasonCode = {
14401
15420
  missing_binding: "missing_binding",
14402
15421
  invalid_event_rule_cel: "invalid_event_rule_cel",
14403
- unresolved_journey_scope: "unresolved_journey_scope"
15422
+ unresolved_journey_scope: "unresolved_journey_scope",
15423
+ missing_source_workflow: "missing_source_workflow"
14404
15424
  };
14405
15425
  var ImportSkippedRuleResponseStatus = {
14406
15426
  outstanding: "outstanding",
@@ -14532,15 +15552,15 @@ function isChatType(value) {
14532
15552
  }
14533
15553
 
14534
15554
  // src/constants/models.ts
14535
- var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
14536
- var DEFAULT_AGENT_CHAT_MODEL = "openai:chat:gpt-5.6-luna";
15555
+ var DEFAULT_CHAT_MODEL = "openai:chat:gpt-6-luna";
15556
+ var DEFAULT_AGENT_CHAT_MODEL = "openai:chat:gpt-6-luna";
14537
15557
  var DEFAULT_AGENT_REALTIME_MODEL = "xai:realtime:voice-agent-2";
14538
15558
  var DEFAULT_AGENT_REALTIME_MODEL_CONFIG = {
14539
15559
  ttsModel: "native",
14540
15560
  voiceModel: "xai:voice:cosmo"
14541
15561
  };
14542
- var DEFAULT_VOICE_INFERENCE_MODEL = "openai:chat:gpt-5.6-luna";
14543
- var DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
15562
+ var DEFAULT_VOICE_INFERENCE_MODEL = "openai:chat:gpt-6-luna";
15563
+ var DEFAULT_CUSTOM_VOICE_MODEL = "xai:voice:lux";
14544
15564
 
14545
15565
  // src/types/resource-metadata.ts
14546
15566
  var RESOURCE_METADATA = {
@@ -14671,6 +15691,14 @@ var ActivityWindowBasis = {
14671
15691
  absolute: "absolute",
14672
15692
  workspace_local: "workspace_local"
14673
15693
  };
15694
+ var FeedCursorRejection = {
15695
+ malformed: "malformed",
15696
+ signature: "signature",
15697
+ version: "version",
15698
+ expired: "expired",
15699
+ scope_mismatch: "scope_mismatch",
15700
+ query_mismatch: "query_mismatch"
15701
+ };
14674
15702
 
14675
15703
  // src/types/generated/family.ts
14676
15704
  var ActivityEventFamily = {
@@ -14719,6 +15747,7 @@ var ScopeCategory = /* @__PURE__ */ ((ScopeCategory2) => {
14719
15747
  ScopeCategory2["APPS"] = "apps";
14720
15748
  ScopeCategory2["LABELS"] = "labels";
14721
15749
  ScopeCategory2["ANALYTICS"] = "analytics";
15750
+ ScopeCategory2["ANONYMOUS_SUBMISSIONS"] = "anonymous_submissions";
14722
15751
  ScopeCategory2["OPERATOR"] = "operator";
14723
15752
  ScopeCategory2["EXPORT"] = "export";
14724
15753
  ScopeCategory2["ORG"] = "org";
@@ -15181,6 +16210,14 @@ var SCOPES = {
15181
16210
  description: "View analytics and reports"
15182
16211
  },
15183
16212
  // =========================================================================
16213
+ // ANONYMOUS FORM SUBMISSIONS (read-only: submissions are immutable)
16214
+ // =========================================================================
16215
+ "anonymous_submissions:read": {
16216
+ name: "anonymous_submissions:read",
16217
+ category: "anonymous_submissions" /* ANONYMOUS_SUBMISSIONS */,
16218
+ description: "View what anonymous visitors submitted on anonymous Forms"
16219
+ },
16220
+ // =========================================================================
15184
16221
  // EXPORT
15185
16222
  // =========================================================================
15186
16223
  "export:read": {
@@ -15372,6 +16409,9 @@ function getRevisionState(workflow, revision) {
15372
16409
 
15373
16410
  export {
15374
16411
  AbilitiesApi,
16412
+ ResourceWorkflowsApi,
16413
+ BundlesApi,
16414
+ InstallationsApi,
15375
16415
  AccessGrantsApi,
15376
16416
  AgentTasksApi,
15377
16417
  AgentsApi,
@@ -15416,6 +16456,10 @@ export {
15416
16456
  QueriesApi,
15417
16457
  QualificationsApi,
15418
16458
  ReportsApi,
16459
+ RoutingActionType,
16460
+ RoutingAudience,
16461
+ RoutingChannel,
16462
+ RoutingTimeWindow,
15419
16463
  SalesforceApi,
15420
16464
  ConnectionSyncApi,
15421
16465
  HubspotApi,
@@ -15445,15 +16489,17 @@ export {
15445
16489
  PERMISSION_DELETE,
15446
16490
  decodePermissions,
15447
16491
  encodePermissions,
15448
- WORKFLOW_IMPLICIT_USE_SCOPE,
15449
- roleImplicitWorkflowUseScope,
15450
- roleWorkflowAccess,
15451
- roleCanUseWorkflow,
15452
16492
  Scope,
15453
16493
  BulkMemberResultStatus,
15454
16494
  MemberImportMatchInfoMatchType,
15455
16495
  MemberImportPreviewRowAction,
15456
16496
  MergeMemberRolesRequestAccessStrategy,
16497
+ CreateMemberContactPointRequestContactType,
16498
+ CreateMemberContactPointRequestPurpose,
16499
+ CreateMemberContactPointRequestSharing,
16500
+ UpdateMemberContactPointRequestContactType,
16501
+ UpdateMemberContactPointRequestPurpose,
16502
+ UpdateMemberContactPointRequestSharing,
15457
16503
  MemberType,
15458
16504
  isMemberContactConflict,
15459
16505
  isAccountContactConflict,
@@ -15467,6 +16513,8 @@ export {
15467
16513
  EventRuleActionType,
15468
16514
  eventRuleActionParams,
15469
16515
  MASKED_SECRET_SENTINEL,
16516
+ SendingNextStep,
16517
+ SendingStopState,
15470
16518
  WorkspaceFeature,
15471
16519
  MemberFeature,
15472
16520
  OrgFeature,
@@ -15489,9 +16537,7 @@ export {
15489
16537
  STT_MODEL_DEEPGRAM_FLUX_SELFHOST,
15490
16538
  STT_MODEL_DEEPGRAM_FLUX_MULTI,
15491
16539
  STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST,
15492
- TTS_MODEL_ELEVENLABS_FLASH,
15493
- TTS_MODEL_ELEVENLABS_TURBO,
15494
- TTS_MODEL_ELEVENLABS_MULTILINGUAL,
16540
+ TTS_MODEL_XAI_V1,
15495
16541
  TTS_MODEL_DEEPGRAM_AURA_2,
15496
16542
  TTS_MODEL_AWS_POLLY_GENERATIVE,
15497
16543
  TTS_MODEL_AWS_POLLY_NEURAL,
@@ -15500,8 +16546,16 @@ export {
15500
16546
  FhirVendor,
15501
16547
  FhirConnectionState,
15502
16548
  FhirClientType,
16549
+ CrmActivityKind,
16550
+ RunHealthCategory,
15503
16551
  TestChatRunLane,
15504
16552
  TestChatRunOutcome,
16553
+ ScenarioHealthCaption,
16554
+ ScenarioHealthHeadline,
16555
+ ScenarioHealthSampleNote,
16556
+ ScenarioHealthState,
16557
+ RevisionHistorySegment,
16558
+ ScenarioRunBlocker,
15505
16559
  CriterionType,
15506
16560
  DriverMode,
15507
16561
  AccessGrantResourceType,
@@ -15522,6 +16576,9 @@ export {
15522
16576
  TERMINAL_TASK_STATES,
15523
16577
  WorkspaceInvitationsApi,
15524
16578
  WorkspacesApi,
16579
+ BundleGrantRequestGranteeType,
16580
+ FormBundleItemRecordScope,
16581
+ SolutionReleaseResponseSlug,
15525
16582
  formatAppContextAsMarkdown,
15526
16583
  createApiModules,
15527
16584
  createWorkspaceClient,
@@ -15556,6 +16613,8 @@ export {
15556
16613
  bindOperatorMethods,
15557
16614
  bindOrgMethods,
15558
16615
  bindPronunciationsMethods,
16616
+ bindBundlesMethods,
16617
+ bindInstallationsMethods,
15559
16618
  bindJourneysMethods,
15560
16619
  bindQualificationsMethods,
15561
16620
  bindPersonasMethods,
@@ -15565,6 +16624,7 @@ export {
15565
16624
  bindResellersMethods,
15566
16625
  bindPromptsMethods,
15567
16626
  bindSupportRequestMethods,
16627
+ bindRoutingRulesMethods,
15568
16628
  GravityRailClient,
15569
16629
  AbilityTypeSlugs,
15570
16630
  DEFAULT_THINKING_SPEECH_PHRASES,
@@ -15596,7 +16656,6 @@ export {
15596
16656
  MenuItemResponseItemType,
15597
16657
  AbilityConfigIssueCode,
15598
16658
  AbilityConfigIssueSeverity,
15599
- WorkflowAccessWarningResourceType,
15600
16659
  WorkflowRoutingMode,
15601
16660
  WIDGET_SLUGS,
15602
16661
  PromoCodeStatus,
@@ -15640,6 +16699,7 @@ export {
15640
16699
  ActivityGroupBy,
15641
16700
  ActivityOpenItemOrder,
15642
16701
  ActivityWindowBasis,
16702
+ FeedCursorRejection,
15643
16703
  ActivityEventFamily,
15644
16704
  ActivityOutcome,
15645
16705
  RefResolutionStatus,
@@ -15649,4 +16709,4 @@ export {
15649
16709
  SCOPE_PRESETS,
15650
16710
  getRevisionState
15651
16711
  };
15652
- //# sourceMappingURL=chunk-R3C63RZJ.js.map
16712
+ //# sourceMappingURL=chunk-ZTUOB4V2.js.map