@gravity-rail/sdk 0.36.1 → 0.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +46 -23
  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-DqjEfj7G.d.ts → chat-interaction-BBBeSKGl.d.cts} +9056 -6127
  7. package/dist/{chat-interaction-CbkSPz3m.d.cts → chat-interaction-C9dD0qbD.d.ts} +9056 -6127
  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-R6S5RXW5.js → chunk-JTOMGNUO.js} +1246 -212
  15. package/dist/chunk-JTOMGNUO.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 +1368 -341
  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 +117 -116
  27. package/dist/index.js.map +1 -1
  28. package/dist/internal.cjs +1277 -243
  29. package/dist/internal.cjs.map +1 -1
  30. package/dist/internal.d.cts +324 -79
  31. package/dist/internal.d.ts +324 -79
  32. package/dist/internal.js +61 -15
  33. package/dist/internal.js.map +1 -1
  34. package/dist/member-import-BXReoljG.d.cts +46 -0
  35. package/dist/member-import-jjfQHlWl.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-CSQ7J3ZU.d.cts → revision-state-Bp7WKk6z.d.cts} +270 -54
  43. package/dist/{revision-state-92LHz1jQ.d.ts → revision-state-QkNQXWJC.d.ts} +270 -54
  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-CrF1qC4G.d.cts → tasks-BsLI-h11.d.cts} +3259 -2507
  51. package/dist/{tasks-CrF1qC4G.d.ts → tasks-BsLI-h11.d.ts} +3259 -2507
  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-R6S5RXW5.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -48,6 +48,8 @@ __export(src_exports, {
48
48
  BaseApiClient: () => BaseApiClient,
49
49
  BuildersApi: () => BuildersApi,
50
50
  BulkMemberResultStatus: () => BulkMemberResultStatus,
51
+ BundleGrantRequestGranteeType: () => BundleGrantRequestGranteeType,
52
+ BundlesApi: () => BundlesApi,
51
53
  BusinessIndustry: () => BusinessIndustry,
52
54
  BusinessType: () => BusinessType,
53
55
  CELApi: () => CELApi,
@@ -64,7 +66,11 @@ __export(src_exports, {
64
66
  ChatInteractionController: () => ChatInteractionController,
65
67
  ChatMuteReason: () => ChatMuteReason,
66
68
  ConsentMethod: () => ConsentMethod,
69
+ CreateMemberContactPointRequestContactType: () => CreateMemberContactPointRequestContactType,
70
+ CreateMemberContactPointRequestPurpose: () => CreateMemberContactPointRequestPurpose,
71
+ CreateMemberContactPointRequestSharing: () => CreateMemberContactPointRequestSharing,
67
72
  CriterionType: () => CriterionType,
73
+ CrmActivityKind: () => CrmActivityKind,
68
74
  DEFAULT_AGENT_CHAT_MODEL: () => DEFAULT_AGENT_CHAT_MODEL,
69
75
  DEFAULT_AGENT_REALTIME_MODEL: () => DEFAULT_AGENT_REALTIME_MODEL,
70
76
  DEFAULT_AGENT_REALTIME_MODEL_CONFIG: () => DEFAULT_AGENT_REALTIME_MODEL_CONFIG,
@@ -87,10 +93,12 @@ __export(src_exports, {
87
93
  EventRuleObjectType: () => EventRuleObjectType,
88
94
  FeatureCategory: () => FeatureCategory,
89
95
  FeatureVisibility: () => FeatureVisibility,
96
+ FeedCursorRejection: () => FeedCursorRejection,
90
97
  FhirClientType: () => FhirClientType,
91
98
  FhirConnectionState: () => FhirConnectionState,
92
99
  FhirVendor: () => FhirVendor,
93
100
  FormBuilder: () => FormBuilder,
101
+ FormBundleItemRecordScope: () => FormBundleItemRecordScope,
94
102
  GravityRailClient: () => GravityRailClient,
95
103
  ImportSkippedRuleResourceGroupResourceType: () => ImportSkippedRuleResourceGroupResourceType,
96
104
  ImportSkippedRuleResponseNeededResourceTypesItem: () => ImportSkippedRuleResponseNeededResourceTypesItem,
@@ -99,6 +107,8 @@ __export(src_exports, {
99
107
  ImportSkippedRuleResponseStatus: () => ImportSkippedRuleResponseStatus,
100
108
  InboundFaxStatusValues: () => InboundFaxStatus,
101
109
  IndexStatus: () => IndexStatus,
110
+ InstallationItemChangeChange: () => InstallationItemChangeChange,
111
+ InstallationsApi: () => InstallationsApi,
102
112
  InvitationStatus: () => InvitationStatus,
103
113
  JobPosition: () => JobPosition,
104
114
  JourneyBuilder: () => JourneyBuilder,
@@ -149,13 +159,20 @@ __export(src_exports, {
149
159
  REALTIME_MODEL_OPENAI_2: () => REALTIME_MODEL_OPENAI_2,
150
160
  REALTIME_MODEL_OPENAI_MINI: () => REALTIME_MODEL_OPENAI_MINI,
151
161
  RefResolutionStatus: () => RefResolutionStatus,
162
+ ReferenceTargetInputKind: () => ReferenceTargetInputKind,
152
163
  Region: () => Region,
153
164
  RegistrationIdentifier: () => RegistrationIdentifier,
154
165
  RelatedMemberRole: () => RelatedMemberRole,
155
166
  RelationshipCardinality: () => RelationshipCardinality,
156
167
  Resource: () => Resource,
157
- RoleUpdate: () => RoleUpdate,
168
+ ResourceWorkflowsApi: () => ResourceWorkflowsApi,
169
+ RevisionHistorySegment: () => RevisionHistorySegment,
158
170
  RoutineBuilder: () => RoutineBuilder,
171
+ RoutingActionType: () => RoutingActionType,
172
+ RoutingAudience: () => RoutingAudience,
173
+ RoutingChannel: () => RoutingChannel,
174
+ RoutingTimeWindow: () => RoutingTimeWindow,
175
+ RunHealthCategory: () => RunHealthCategory,
159
176
  SCOPES: () => SCOPES,
160
177
  SCOPE_PRESETS: () => SCOPE_PRESETS,
161
178
  SMS_DELIVERY_FAILURE_STATUSES: () => SMS_DELIVERY_FAILURE_STATUSES,
@@ -163,9 +180,18 @@ __export(src_exports, {
163
180
  STT_MODEL_DEEPGRAM_FLUX_MULTI: () => STT_MODEL_DEEPGRAM_FLUX_MULTI,
164
181
  STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST: () => STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST,
165
182
  STT_MODEL_DEEPGRAM_FLUX_SELFHOST: () => STT_MODEL_DEEPGRAM_FLUX_SELFHOST,
183
+ ScalarTargetInputKind: () => ScalarTargetInputKind,
184
+ ScenarioHealthCaption: () => ScenarioHealthCaption,
185
+ ScenarioHealthHeadline: () => ScenarioHealthHeadline,
186
+ ScenarioHealthSampleNote: () => ScenarioHealthSampleNote,
187
+ ScenarioHealthState: () => ScenarioHealthState,
188
+ ScenarioRunBlocker: () => ScenarioRunBlocker,
166
189
  Scope: () => Scope,
167
190
  ScopeCategory: () => ScopeCategory,
168
191
  ScopeManager: () => ScopeManager,
192
+ SendingNextStep: () => SendingNextStep,
193
+ SendingStopState: () => SendingStopState,
194
+ SetInstallationPolicyRequestUpgradePolicy: () => SetInstallationPolicyRequestUpgradePolicy,
169
195
  SiteDnsRecordType: () => SiteDnsRecordType,
170
196
  SupervisorsApi: () => SupervisorsApi,
171
197
  TTS_MODEL_AWS_POLLY_GENERATIVE: () => TTS_MODEL_AWS_POLLY_GENERATIVE,
@@ -181,11 +207,11 @@ __export(src_exports, {
181
207
  UiPromptPresentedKindValues: () => UiPromptPresentedKind,
182
208
  UiPromptResponseKindValues: () => UiPromptResponseKind,
183
209
  UiPromptResponseStatusValues: () => UiPromptResponseStatus,
210
+ UpdateMemberContactPointRequestContactType: () => UpdateMemberContactPointRequestContactType,
211
+ UpdateMemberContactPointRequestPurpose: () => UpdateMemberContactPointRequestPurpose,
212
+ UpdateMemberContactPointRequestSharing: () => UpdateMemberContactPointRequestSharing,
184
213
  WIDGET_SLUGS: () => WIDGET_SLUGS,
185
- WORKFLOW_IMPLICIT_USE_SCOPE: () => WORKFLOW_IMPLICIT_USE_SCOPE,
186
- WorkflowAccessWarningResourceType: () => WorkflowAccessWarningResourceType,
187
214
  WorkflowBuilder: () => WorkflowBuilder,
188
- WorkflowResourceType: () => WorkflowAccessWarningResourceType,
189
215
  WorkflowRoutingMode: () => WorkflowRoutingMode,
190
216
  WorkspaceBuilder: () => WorkspaceBuilder,
191
217
  WorkspaceBuilderResource: () => WorkspaceBuilderResource,
@@ -225,10 +251,9 @@ __export(src_exports, {
225
251
  isSMSDeliveryFailureStatus: () => isSMSDeliveryFailureStatus,
226
252
  parseOrgAuthChallenge: () => parseOrgAuthChallenge,
227
253
  requiresAssistantParticipant: () => requiresAssistantParticipant,
228
- roleCanUseWorkflow: () => roleCanUseWorkflow,
229
- roleImplicitWorkflowUseScope: () => roleImplicitWorkflowUseScope,
230
- roleWorkflowAccess: () => roleWorkflowAccess,
231
254
  runWorkspaceScript: () => runWorkspaceScript,
255
+ toSafeMemberImportPreview: () => toSafeMemberImportPreview,
256
+ toSafeMemberImportSummary: () => toSafeMemberImportSummary,
232
257
  usesBuiltinAssistant: () => usesBuiltinAssistant,
233
258
  validateFeatureDependencies: () => validateFeatureDependencies
234
259
  });
@@ -327,7 +352,6 @@ var BaseApiClient = class {
327
352
  enhancedAuthInProgress = null;
328
353
  orgAuthHandler;
329
354
  orgAuthInProgress = null;
330
- actingMemberUuid;
331
355
  orgSession;
332
356
  /**
333
357
  * The org_uuid that issued the current org auth credential. Tracked so we can detect
@@ -367,21 +391,6 @@ var BaseApiClient = class {
367
391
  updateApiKey(newApiKey) {
368
392
  this.apiKey = newApiKey;
369
393
  }
370
- /**
371
- * Set the acting member UUID for member identity switching.
372
- * When set, all API requests will include the X-Acting-Member header.
373
- * The backend will validate that the authenticated account owns this member
374
- * and use it as the effective identity for the request.
375
- */
376
- setActingMember(memberUuid) {
377
- this.actingMemberUuid = memberUuid;
378
- }
379
- /**
380
- * Get the current acting member UUID.
381
- */
382
- getActingMember() {
383
- return this.actingMemberUuid;
384
- }
385
394
  /**
386
395
  * Set the opaque org session credential for cross-domain requests.
387
396
  * Opaque gr_sess_ values use X-Org-Session. Legacy orgToken JWE values still
@@ -419,9 +428,6 @@ var BaseApiClient = class {
419
428
  headers.set("Authorization", `Bearer ${requestToken}`);
420
429
  }
421
430
  }
422
- if (this.actingMemberUuid) {
423
- headers.set("X-Acting-Member", this.actingMemberUuid);
424
- }
425
431
  setOrgAuthHeader(headers, this.orgSession);
426
432
  const fullUrl = `${this.baseUrl}/api/v2/${endpoint}`;
427
433
  const response = await this.fetchFunction(fullUrl, {
@@ -573,9 +579,6 @@ ${formattedErrors}`, response.status);
573
579
  headers.set("Authorization", `Bearer ${requestToken}`);
574
580
  }
575
581
  }
576
- if (this.actingMemberUuid) {
577
- headers.set("X-Acting-Member", this.actingMemberUuid);
578
- }
579
582
  setOrgAuthHeader(headers, this.orgSession);
580
583
  const response = await this.fetchFunction(`${this.baseUrl}/api/v2/${endpoint}`, {
581
584
  ...options,
@@ -685,9 +688,6 @@ ${formattedErrors}`, response.status);
685
688
  headers.set("Authorization", `Bearer ${requestToken}`);
686
689
  }
687
690
  }
688
- if (this.actingMemberUuid) {
689
- headers.set("X-Acting-Member", this.actingMemberUuid);
690
- }
691
691
  setOrgAuthHeader(headers, this.orgSession);
692
692
  const fullUrl = `${this.baseUrl}/${path}`;
693
693
  const response = await this.fetchFunction(fullUrl, {
@@ -783,6 +783,303 @@ var AbilitiesApi = class extends BaseApiClient {
783
783
  }
784
784
  };
785
785
 
786
+ // src/api/resource-workflows.ts
787
+ function resourceWorkflowsPath(wid, ...segments) {
788
+ const tail = segments.map((segment) => encodeURIComponent(String(segment))).join("/");
789
+ const base = `w/${encodeURIComponent(wid)}/resource-workflows`;
790
+ return tail ? `${base}/${tail}` : base;
791
+ }
792
+ var ResourceWorkflowsApi = class extends BaseApiClient {
793
+ /** One Workflow's summary, for a viewer that can see it. */
794
+ async getResourceWorkflow(wid, workflowUuid) {
795
+ return this.fetch(resourceWorkflowsPath(wid, workflowUuid));
796
+ }
797
+ /**
798
+ * One published revision.
799
+ *
800
+ * The response is a union: the owner (or a `full` grantee) receives the
801
+ * complete `ResourceWorkflowGraphResponse`, while a bounded grantee receives
802
+ * the `ResourceWorkflowDisclosureResponse` envelope. Branch on `publishedAt`
803
+ * being present — never assume the full shape. A retained revision stays
804
+ * readable here after a `stop_updates` revocation.
805
+ */
806
+ async getResourceWorkflowRevision(wid, workflowUuid, revisionUuid) {
807
+ return this.fetch(
808
+ resourceWorkflowsPath(wid, workflowUuid, "revisions", revisionUuid)
809
+ );
810
+ }
811
+ /**
812
+ * List published Workflows owned by or shared with this workspace.
813
+ *
814
+ * The Bundle draft editor reads `publishedRevisionUuid` from each summary to
815
+ * pin a Workflow item; archived Workflows are excluded unless asked for.
816
+ */
817
+ async listResourceWorkflows(wid, params) {
818
+ const query = new URLSearchParams();
819
+ if (params?.page !== void 0) query.set("page", String(params.page));
820
+ if (params?.pageSize !== void 0) query.set("pageSize", String(params.pageSize));
821
+ if (params?.includeArchived !== void 0) {
822
+ query.set("includeArchived", String(params.includeArchived));
823
+ }
824
+ const qs = query.toString();
825
+ return this.fetch(
826
+ `w/${encodeURIComponent(wid)}/resource-workflows${qs ? `?${qs}` : ""}`
827
+ );
828
+ }
829
+ };
830
+
831
+ // src/api/bundles.ts
832
+ function bundlesPath(wid, ...segments) {
833
+ const tail = segments.map((segment) => encodeURIComponent(String(segment))).join("/");
834
+ const base = `w/${encodeURIComponent(wid)}/bundles`;
835
+ return tail ? `${base}/${tail}` : base;
836
+ }
837
+ function pageQuery(params) {
838
+ const query = new URLSearchParams();
839
+ if (params?.page !== void 0) query.set("page", String(params.page));
840
+ if (params?.pageSize !== void 0) query.set("pageSize", String(params.pageSize));
841
+ const qs = query.toString();
842
+ return qs ? `?${qs}` : "";
843
+ }
844
+ var BundlesApi = class extends BaseApiClient {
845
+ /** Bundles shared with everyone. Needs no session. */
846
+ async listPublicBundles(params) {
847
+ return this.fetch(`bundles/public${pageQuery(params)}`);
848
+ }
849
+ /** The outline of one Bundle shared with everyone. Needs no session; 404 otherwise. */
850
+ async getPublicBundle(bundleUuid) {
851
+ return this.fetch(`bundles/${encodeURIComponent(bundleUuid)}/public`);
852
+ }
853
+ /** Read an authorized Bundle by UUID. */
854
+ async getBundle(wid, bundleUuid) {
855
+ return this.fetch(bundlesPath(wid, bundleUuid));
856
+ }
857
+ async updateBundle(wid, bundleUuid, data) {
858
+ return this.fetch(
859
+ `w/${encodeURIComponent(wid)}/bundles/${encodeURIComponent(bundleUuid)}`,
860
+ {
861
+ method: "PATCH",
862
+ body: JSON.stringify(data)
863
+ }
864
+ );
865
+ }
866
+ async listBundleInstallations(wid, bundleUuid) {
867
+ return this.fetch(
868
+ `w/${encodeURIComponent(wid)}/bundles/${encodeURIComponent(bundleUuid)}/installations`
869
+ );
870
+ }
871
+ /**
872
+ * Bundles visible to this workspace through ownership, a live grant, or
873
+ * an administrator of the owning organization.
874
+ */
875
+ async listBundles(wid, params) {
876
+ return this.fetch(`${bundlesPath(wid)}${pageQuery(params)}`);
877
+ }
878
+ /**
879
+ * This workspace's Workflows for the Bundle picker. `eligible` pins
880
+ * `revisionUuid` (the active revision when published, else the newest
881
+ * published one); `unpublished` has nothing to pin. `dependenciesChecked` is
882
+ * false until a Bundle add has stored the revision's dependencies; that add
883
+ * surfaces any refusal as a 409 `workflow_not_shareable`. Requires
884
+ * `workflows:admin`.
885
+ */
886
+ async listBundleWorkflowCandidates(wid) {
887
+ return this.fetch(bundlesPath(wid, "workflow-candidates"));
888
+ }
889
+ /** Create an empty Bundle owned by this workspace. */
890
+ async createBundle(wid, data) {
891
+ return this.fetch(bundlesPath(wid), {
892
+ method: "POST",
893
+ body: JSON.stringify(data)
894
+ });
895
+ }
896
+ /**
897
+ * The unpublished draft for the owning workspace. A grantee is refused with
898
+ * 404: `version_detail` checks
899
+ * `root.workspace_uuid != viewer.workspace_uuid` for the null version
900
+ * (`lib/db/resources/bundles.py`), after the grantee-inclusive predicate has
901
+ * already admitted them to the Bundle itself.
902
+ *
903
+ * After publication, the next draft contains a copy of the published items.
904
+ * The owner receives it with 200; a grantee receives 404.
905
+ */
906
+ async getBundleDraft(wid, bundleUuid) {
907
+ return this.fetch(bundlesPath(wid, bundleUuid, "draft"));
908
+ }
909
+ /** Replace the whole draft item list. 409 when `expectedGeneration` is stale. */
910
+ async replaceBundleDraft(wid, bundleUuid, data) {
911
+ return this.fetch(bundlesPath(wid, bundleUuid, "draft"), {
912
+ method: "PUT",
913
+ body: JSON.stringify(data)
914
+ });
915
+ }
916
+ /** Cut a new immutable version from the draft. 409 when `expectedGeneration` is stale. */
917
+ async publishBundle(wid, bundleUuid, data) {
918
+ return this.fetch(bundlesPath(wid, bundleUuid, "publish"), {
919
+ method: "POST",
920
+ body: JSON.stringify(data)
921
+ });
922
+ }
923
+ /** Published versions, newest first. */
924
+ async listBundleVersions(wid, bundleUuid, params) {
925
+ return this.fetch(
926
+ `${bundlesPath(wid, bundleUuid, "versions")}${pageQuery(params)}`
927
+ );
928
+ }
929
+ /** One published version, with its items, declared settings and open slots. */
930
+ async getBundleVersion(wid, bundleUuid, version) {
931
+ return this.fetch(bundlesPath(wid, bundleUuid, "versions", version));
932
+ }
933
+ /** Who this Bundle is currently granted to. */
934
+ async listBundleGrants(wid, bundleUuid) {
935
+ return this.fetch(bundlesPath(wid, bundleUuid, "grants"));
936
+ }
937
+ /**
938
+ * Share throughout the publisher's organization with organization-admin authority,
939
+ * or with everyone (`granteeType: "global"`) as a superuser. Workspace-specific
940
+ * grants are refused.
941
+ */
942
+ async grantBundle(wid, bundleUuid, data) {
943
+ return this.fetch(bundlesPath(wid, bundleUuid, "grants"), {
944
+ method: "POST",
945
+ body: JSON.stringify(data)
946
+ });
947
+ }
948
+ /** Revoke one grant by id. */
949
+ async revokeBundleGrant(wid, bundleUuid, grantId) {
950
+ return this.fetch(bundlesPath(wid, bundleUuid, "grants", grantId), {
951
+ method: "DELETE"
952
+ });
953
+ }
954
+ };
955
+
956
+ // src/api/installations.ts
957
+ function installationsPath(wid, ...segments) {
958
+ const tail = segments.map((segment) => encodeURIComponent(String(segment))).join("/");
959
+ const base = `w/${encodeURIComponent(wid)}/installations`;
960
+ return tail ? `${base}/${tail}` : base;
961
+ }
962
+ var InstallationsApi = class extends BaseApiClient {
963
+ /** Inspect one published release and its selected example dependencies. */
964
+ async preflightBundleInstallation(wid, bundleUuid, data) {
965
+ return this.fetch(
966
+ `w/${encodeURIComponent(wid)}/bundles/${encodeURIComponent(bundleUuid)}/installation-preflight`,
967
+ { method: "POST", body: JSON.stringify(data) }
968
+ );
969
+ }
970
+ /**
971
+ * Install a published Bundle version into this workspace.
972
+ *
973
+ * A key in `bindings` that this version has no slot or Form item for is
974
+ * refused; a **missing** required slot is not.
975
+ */
976
+ async installBundle(wid, bundleUuid, data) {
977
+ return this.fetch(
978
+ `w/${encodeURIComponent(wid)}/bundles/${encodeURIComponent(bundleUuid)}/installations`,
979
+ { method: "POST", body: JSON.stringify(data) }
980
+ );
981
+ }
982
+ /** Every installation this workspace holds, oldest first. */
983
+ async listInstallations(wid) {
984
+ return this.fetch(installationsPath(wid));
985
+ }
986
+ async getInstallation(wid, installationUuid) {
987
+ return this.fetch(installationsPath(wid, installationUuid));
988
+ }
989
+ /**
990
+ * Open slots, bindings whose target no longer resolves, Forms that drifted
991
+ * from their recipe, missing or changed Workflow dependencies, and archived
992
+ * items. Computed on read, never stored.
993
+ */
994
+ async getInstallationReadiness(wid, installationUuid) {
995
+ return this.fetch(
996
+ installationsPath(wid, installationUuid, "readiness")
997
+ );
998
+ }
999
+ /**
1000
+ * What moving to version `to` would change: per-item differences, the slots
1001
+ * that would still be unbound, and the release notes of every version in
1002
+ * between. `to` must be newer than the version the installation holds.
1003
+ */
1004
+ async previewInstallationUpgrade(wid, installationUuid, to) {
1005
+ const query = new URLSearchParams({ to: String(to) });
1006
+ return this.fetch(
1007
+ `${installationsPath(wid, installationUuid, "upgrade-preview")}?${query.toString()}`
1008
+ );
1009
+ }
1010
+ /**
1011
+ * Move the installation onto a newer published version. The version it
1012
+ * already holds, and any earlier one, are refused with 409.
1013
+ */
1014
+ async upgradeInstallation(wid, installationUuid, data) {
1015
+ return this.fetch(installationsPath(wid, installationUuid, "upgrade"), {
1016
+ method: "POST",
1017
+ body: JSON.stringify(data)
1018
+ });
1019
+ }
1020
+ /** Recreate one deleted Form from the version already installed. */
1021
+ async restoreInstallationForm(wid, installationUuid, data) {
1022
+ return this.fetch(
1023
+ installationsPath(wid, installationUuid, "restore-form"),
1024
+ {
1025
+ method: "POST",
1026
+ body: JSON.stringify(data)
1027
+ }
1028
+ );
1029
+ }
1030
+ /** Recreate missing dependency resources for an installed Workflow. */
1031
+ async restoreInstallationWorkflowResources(wid, installationUuid, data) {
1032
+ return this.fetch(
1033
+ installationsPath(wid, installationUuid, "restore-workflow-resources"),
1034
+ { method: "POST", body: JSON.stringify(data) }
1035
+ );
1036
+ }
1037
+ /** `pinned` holds the installed version; `auto` follows each publication. */
1038
+ async setInstallationPolicy(wid, installationUuid, data) {
1039
+ return this.fetch(installationsPath(wid, installationUuid), {
1040
+ method: "PATCH",
1041
+ body: JSON.stringify(data)
1042
+ });
1043
+ }
1044
+ /** Stop future Bundle updates while keeping the workspace's installed content. */
1045
+ async unsubscribeInstallation(wid, installationUuid) {
1046
+ return this.fetch(
1047
+ installationsPath(wid, installationUuid, "unsubscribe"),
1048
+ { method: "POST", body: JSON.stringify({}) }
1049
+ );
1050
+ }
1051
+ /** Fill open slots. A slot that already carries a target is refused with 409. */
1052
+ async bindInstallationSlots(wid, installationUuid, data) {
1053
+ return this.fetch(
1054
+ installationsPath(wid, installationUuid, "bindings"),
1055
+ { method: "POST", body: JSON.stringify(data) }
1056
+ );
1057
+ }
1058
+ /**
1059
+ * Settle an installation left `pending` by an interrupted operation.
1060
+ *
1061
+ * The body is empty and required: a bodyless cookie-auth POST is forgeable
1062
+ * by a cross-site form, so the route demands JSON.
1063
+ */
1064
+ async reconcileInstallation(wid, installationUuid) {
1065
+ return this.fetch(
1066
+ installationsPath(wid, installationUuid, "reconcile"),
1067
+ { method: "POST", body: JSON.stringify({}) }
1068
+ );
1069
+ }
1070
+ /**
1071
+ * The settings a compiled theme declares, for labelling a Site item's slots
1072
+ * before any Site exists. 404 for an unknown slug and for `source-site`,
1073
+ * whose schema is a per-workspace build artifact rather than a catalog one.
1074
+ * Requires `sites:read`; no Bundle installation authority is needed.
1075
+ */
1076
+ async getThemeSettingsSchema(wid, slug) {
1077
+ return this.fetch(
1078
+ `w/${encodeURIComponent(wid)}/themes/${encodeURIComponent(slug)}/settings-schema`
1079
+ );
1080
+ }
1081
+ };
1082
+
786
1083
  // src/api/access-grants.ts
787
1084
  var AccessGrantsApi = class extends BaseApiClient {
788
1085
  /** List access grants received by the current member. */
@@ -915,7 +1212,6 @@ var AgentsApi = class extends BaseApiClient {
915
1212
  if (options.search) params.append("search", options.search);
916
1213
  if (options.includeArchived)
917
1214
  params.append("includeArchived", options.includeArchived.toString());
918
- if (options.owner) params.append("owner", options.owner);
919
1215
  return this.fetch(
920
1216
  `w/${wid}/agents${params.toString() ? `?${params.toString()}` : ""}`
921
1217
  );
@@ -971,6 +1267,18 @@ var AIModelsApi = class extends BaseApiClient {
971
1267
  const url = queryString ? `ai-models/chat?${queryString}` : "ai-models/chat";
972
1268
  return this.fetch(url);
973
1269
  }
1270
+ /**
1271
+ * Get the models a member may pick for the Workspace Manager, in display
1272
+ * order. Only models this deployment can serve are listed.
1273
+ *
1274
+ * `tokenMultiplier` is each model's input + output price per token relative
1275
+ * to `baselineModelId`; `defaultModelId` is what the Manager runs with no
1276
+ * pick. Send a pick on a Manager chat as `AppContext.managerModel` /
1277
+ * `managerReasoningEffort`.
1278
+ */
1279
+ async getManagerModels() {
1280
+ return this.fetch("ai-models/manager");
1281
+ }
974
1282
  /**
975
1283
  * Get available realtime AI models
976
1284
  */
@@ -1422,6 +1730,19 @@ var AuthApi = class extends BaseApiClient {
1422
1730
  body: JSON.stringify(request)
1423
1731
  });
1424
1732
  }
1733
+ /**
1734
+ * Mint a single-use, account-bound realtime login token (`gr_wst_`) with
1735
+ * this client's credential. Call once per realtime connect attempt; the
1736
+ * token is spent on first use and expires in seconds. Only the full browser
1737
+ * session may mint one — an API key is refused.
1738
+ */
1739
+ async createRealtimeLoginToken() {
1740
+ return this.fetch("auth/realtime/ws-token", {
1741
+ method: "POST",
1742
+ // The route requires a JSON body (its CSRF barrier); it reads nothing from it.
1743
+ body: JSON.stringify({})
1744
+ });
1745
+ }
1425
1746
  /** Get the organization and workspace mapping for a custom domain. */
1426
1747
  async getDomainMapping(customDomain) {
1427
1748
  return this.fetch(`s/mapping/${customDomain}`);
@@ -2081,6 +2402,26 @@ var ChatsApi = class extends BaseApiClient {
2081
2402
  async getChat(wid, id) {
2082
2403
  return this.fetch(`w/${wid}/chats/${id}`);
2083
2404
  }
2405
+ /**
2406
+ * Get a single chat by UUID.
2407
+ *
2408
+ * The uuid-addressed twin of `getChat`: same access check (own chat,
2409
+ * otherwise `chats:read`), same body; a chat the caller may not read is a
2410
+ * 404. Activity events and org webhooks name a chat by `uuid` only.
2411
+ */
2412
+ async getChatByUuid(wid, uuid) {
2413
+ return this.fetch(`w/${wid}/chats/by-uuid/${uuid}`);
2414
+ }
2415
+ async saveChatBrowserStorage(wid, chatId) {
2416
+ await this.fetchRaw(`w/${wid}/chats/${chatId}/browser/storage/save`, {
2417
+ method: "POST",
2418
+ keepalive: true,
2419
+ body: JSON.stringify({})
2420
+ });
2421
+ }
2422
+ async clearChatBrowserStorage(wid, chatId) {
2423
+ await this.fetchRaw(`w/${wid}/chats/${chatId}/browser/storage`, { method: "DELETE" });
2424
+ }
2084
2425
  /**
2085
2426
  * Get a short-lived, interactive AgentCore browser view for this Chat.
2086
2427
  *
@@ -2687,10 +3028,18 @@ var DashboardsApi = class extends BaseApiClient {
2687
3028
  `w/${wid}/dashboards/stats/channels${query ? `?${query}` : ""}`
2688
3029
  );
2689
3030
  }
2690
- /** Assignment status rollup per root workflow. */
2691
- async getDashboardWorkflowAssignmentStats(wid) {
3031
+ /**
3032
+ * Assignment status rollup per root workflow.
3033
+ *
3034
+ * `hours` windows the rollup to runs STARTED within the last N hours.
3035
+ * Omit it (or pass null) for the all-time rollup.
3036
+ */
3037
+ async getDashboardWorkflowAssignmentStats(wid, options) {
3038
+ const params = new URLSearchParams();
3039
+ if (options?.hours != null) params.append("hours", options.hours.toString());
3040
+ const query = params.toString();
2692
3041
  return this.fetch(
2693
- `w/${wid}/dashboards/stats/workflow-assignments`
3042
+ `w/${wid}/dashboards/stats/workflow-assignments${query ? `?${query}` : ""}`
2694
3043
  );
2695
3044
  }
2696
3045
  /**
@@ -2832,6 +3181,26 @@ var DataTypesApi = class extends BaseApiClient {
2832
3181
  `w/${wid}/data-types/${dataTypeId}/records${params?.toString() ? `?${params.toString()}` : ""}`
2833
3182
  );
2834
3183
  }
3184
+ /**
3185
+ * List an anonymous Form's submissions, newest first. Requires
3186
+ * `anonymous_submissions:read`. Submissions are immutable: there is no
3187
+ * update or delete method.
3188
+ */
3189
+ async listAnonymousFormSubmissions(wid, dataTypeId, options) {
3190
+ const params = new URLSearchParams();
3191
+ if (options?.page) params.append("page", options.page.toString());
3192
+ if (options?.pageSize) params.append("page_size", options.pageSize.toString());
3193
+ const qs = params.toString();
3194
+ return this.fetch(
3195
+ `w/${wid}/data-types/${dataTypeId}/anonymous-submissions${qs ? `?${qs}` : ""}`
3196
+ );
3197
+ }
3198
+ /** Get one anonymous Form submission by its uuid. Requires `anonymous_submissions:read`. */
3199
+ async getAnonymousFormSubmission(wid, dataTypeId, submissionUuid) {
3200
+ return this.fetch(
3201
+ `w/${wid}/data-types/${dataTypeId}/anonymous-submissions/${encodeURIComponent(submissionUuid)}`
3202
+ );
3203
+ }
2835
3204
  // Data-record filter APIs (saved Query IR predicates per form)
2836
3205
  /** List saved data-record filters, optionally scoped to one DataType. */
2837
3206
  async getDataRecordFilters(wid, options) {
@@ -2874,6 +3243,15 @@ var DataTypesApi = class extends BaseApiClient {
2874
3243
  async getDataRecord(wid, recordId) {
2875
3244
  return this.fetch(`w/${wid}/data-types/records/${recordId}`);
2876
3245
  }
3246
+ /**
3247
+ * Get a single data record by UUID.
3248
+ *
3249
+ * The uuid-addressed twin of `getDataRecord`: same access check, same body.
3250
+ * Activity events and org webhooks name a record by `uuid` only.
3251
+ */
3252
+ async getDataRecordByUuid(wid, uuid) {
3253
+ return this.fetch(`w/${wid}/data-types/records/by-uuid/${uuid}`);
3254
+ }
2877
3255
  /** Create a new data record under the specified data type. */
2878
3256
  async createDataRecord(wid, dataTypeId, record) {
2879
3257
  return this.fetch(`w/${wid}/data-types/${dataTypeId}/records`, {
@@ -3418,20 +3796,6 @@ var EventsApi = class extends BaseApiClient {
3418
3796
  body: JSON.stringify(request)
3419
3797
  });
3420
3798
  }
3421
- /**
3422
- * Preview which target-audience roles lack Workflow USE for the Workflows a
3423
- * draft Routine would start. Non-persisting, non-blocking authoring assist —
3424
- * returns warnings only (role/Workflow names + IDs; no Member data).
3425
- */
3426
- async previewRoutineWorkflowAccess(wid, request) {
3427
- return this.fetch(
3428
- `w/${wid}/routines/preview-workflow-access`,
3429
- {
3430
- method: "POST",
3431
- body: JSON.stringify(request)
3432
- }
3433
- );
3434
- }
3435
3799
  /**
3436
3800
  * Preview what would stop a draft Routine placing its scheduled outbound
3437
3801
  * calls — the Member voice opt-out, a missing member phone, or a
@@ -4137,6 +4501,19 @@ var FilesApi = class extends BaseApiClient {
4137
4501
  if (folderId != null) params.append("folderId", String(folderId));
4138
4502
  return this.fetch(`w/${wid}/files/resolve-path?${params.toString()}`);
4139
4503
  }
4504
+ /**
4505
+ * Download one file's bytes via GET ``.../files/{id}/contents/{filename}``.
4506
+ *
4507
+ * Uses this client's base URL (FastAPI on the app, same-origin ``/api/v2``
4508
+ * on scoped site sessions) so the payload does not transit the Next.js
4509
+ * ``/api/w/.../files/...`` Lambda proxy, which 500s above the 6MB sync cap.
4510
+ */
4511
+ async downloadFileContents(wid, id, filename) {
4512
+ const response = await this.fetchRaw(
4513
+ `w/${wid}/files/${id}/contents/${encodeURIComponent(filename)}`
4514
+ );
4515
+ return response.blob();
4516
+ }
4140
4517
  /**
4141
4518
  * Download the given files + folders (folders recursively) as a single ZIP.
4142
4519
  * Returns the raw archive bytes for the caller to save.
@@ -4888,7 +5265,21 @@ function throwMemberImportError(errorBody, fallback) {
4888
5265
  }
4889
5266
  throw new Error(typeof detail === "string" ? detail : fallback);
4890
5267
  }
5268
+ function memberImportUpload(file, roleId, options) {
5269
+ const body = new FormData();
5270
+ const filename = "name" in file && typeof file.name === "string" ? file.name : "members.csv";
5271
+ body.append("file", file, filename);
5272
+ if (options?.resolutions !== void 0) {
5273
+ body.append("resolutions", JSON.stringify(options.resolutions));
5274
+ }
5275
+ const params = new URLSearchParams({ new_member_role_id: String(roleId) });
5276
+ if (options?.autoPromoteUniqueContacts !== void 0) {
5277
+ params.set("auto_promote_unique_contacts", String(options.autoPromoteUniqueContacts));
5278
+ }
5279
+ return { body, params };
5280
+ }
4891
5281
  var MembersApi = class extends BaseApiClient {
5282
+ memberImportPlans = /* @__PURE__ */ new WeakMap();
4892
5283
  /** Get the currently authenticated member for a workspace. */
4893
5284
  async getCurrentMember(wid) {
4894
5285
  return this.fetch(`w/${wid}/me`);
@@ -4941,33 +5332,6 @@ var MembersApi = class extends BaseApiClient {
4941
5332
  `w/${wid}/me/records?${params.toString()}`
4942
5333
  );
4943
5334
  }
4944
- /**
4945
- * Get all members owned by the current member in this workspace.
4946
- * Returns the authenticated member plus any members they own (via owner_id).
4947
- * Used by the member switcher to show available identities.
4948
- */
4949
- async getOwnedMembers(wid) {
4950
- return this.fetch(`w/${wid}/members/owned`);
4951
- }
4952
- /**
4953
- * Switch to a different member identity owned by the current member.
4954
- * Sets the actingAsMemberUuid cookie for subsequent requests.
4955
- * Uses UUID (not ID) to prevent cross-workspace identity confusion.
4956
- */
4957
- async switchMember(wid, memberUuid) {
4958
- return this.fetch(`w/${wid}/members/switch`, {
4959
- method: "POST",
4960
- body: JSON.stringify({ memberUuid })
4961
- });
4962
- }
4963
- /**
4964
- * Clear the member switch and return to the authenticated member.
4965
- */
4966
- async clearMemberSwitch(wid) {
4967
- return this.fetch(`w/${wid}/members/switch`, {
4968
- method: "DELETE"
4969
- });
4970
- }
4971
5335
  /** Update the currently authenticated member's profile. */
4972
5336
  async updateCurrentMember(wid, member) {
4973
5337
  return this.fetch(`w/${wid}/me`, {
@@ -5007,6 +5371,16 @@ var MembersApi = class extends BaseApiClient {
5007
5371
  async getWorkspaceMember(wid, memberId) {
5008
5372
  return this.fetch(`w/${wid}/members/${memberId}`);
5009
5373
  }
5374
+ /**
5375
+ * Get a single workspace member by UUID.
5376
+ *
5377
+ * The uuid-addressed twin of `getWorkspaceMember`: same access check (self,
5378
+ * otherwise `members:read`), same body. Activity events and org webhooks
5379
+ * name a member by `uuid` only.
5380
+ */
5381
+ async getMemberByUuid(wid, uuid) {
5382
+ return this.fetch(`w/${wid}/members/by-uuid/${uuid}`);
5383
+ }
5010
5384
  /**
5011
5385
  * Get one member of an org's workspace, under `org:read`.
5012
5386
  *
@@ -5058,6 +5432,53 @@ var MembersApi = class extends BaseApiClient {
5058
5432
  method: "POST"
5059
5433
  });
5060
5434
  }
5435
+ /**
5436
+ * Update a workspace member addressed by its external id.
5437
+ *
5438
+ * The external-id twin of `updateMember`: for an integrator that keys on its
5439
+ * own `externalId` and never stores our numeric member id. Same authorization
5440
+ * (`members:write`) and same body as `updateMember`.
5441
+ */
5442
+ async updateMemberByExternalId(wid, externalId, data) {
5443
+ return this.fetch(
5444
+ `w/${wid}/members/by-external-id/${encodeURIComponent(externalId)}`,
5445
+ {
5446
+ method: "PUT",
5447
+ body: JSON.stringify(data)
5448
+ }
5449
+ );
5450
+ }
5451
+ /**
5452
+ * Archive a workspace member addressed by its external id.
5453
+ *
5454
+ * The external-id twin of `archiveMember`; same authorization
5455
+ * (`members:write` + `members:admin`) and same body.
5456
+ */
5457
+ async archiveMemberByExternalId(wid, externalId) {
5458
+ return this.fetch(
5459
+ `w/${wid}/members/by-external-id/${encodeURIComponent(externalId)}/archive`,
5460
+ {
5461
+ method: "POST",
5462
+ // Required empty JSON body is the route's CSRF barrier (GRA-6284).
5463
+ body: JSON.stringify({})
5464
+ }
5465
+ );
5466
+ }
5467
+ /**
5468
+ * Unarchive a workspace member addressed by its external id.
5469
+ *
5470
+ * The external-id twin of `unarchiveMember`; same authorization and body.
5471
+ */
5472
+ async unarchiveMemberByExternalId(wid, externalId) {
5473
+ return this.fetch(
5474
+ `w/${wid}/members/by-external-id/${encodeURIComponent(externalId)}/unarchive`,
5475
+ {
5476
+ method: "POST",
5477
+ // Required empty JSON body is the route's CSRF barrier (GRA-6284).
5478
+ body: JSON.stringify({})
5479
+ }
5480
+ );
5481
+ }
5061
5482
  /**
5062
5483
  * Send the member an SMS asking them to confirm their phone number. When they
5063
5484
  * reply, a trusted phone auth binding is created so they can use SMS as
@@ -5199,16 +5620,13 @@ var MembersApi = class extends BaseApiClient {
5199
5620
  * operator can decide whether to skip or explicitly overwrite before
5200
5621
  * committing. Requires MEMBERS_ADMIN and is bulk-PHI audited server-side.
5201
5622
  */
5202
- async previewImportMembers(wid, file, newMemberRoleId) {
5203
- const formData = new FormData();
5204
- formData.append("file", file);
5205
- const params = new URLSearchParams();
5206
- params.append("new_member_role_id", newMemberRoleId.toString());
5623
+ async previewImportMembers(wid, file, newMemberRoleId, options) {
5624
+ const { body, params } = memberImportUpload(file, newMemberRoleId, options);
5207
5625
  const response = await this.fetchRaw(
5208
5626
  `w/${wid}/members/import/preview?${params.toString()}`,
5209
5627
  {
5210
5628
  method: "POST",
5211
- body: formData
5629
+ body
5212
5630
  },
5213
5631
  [400, 413]
5214
5632
  );
@@ -5216,7 +5634,19 @@ var MembersApi = class extends BaseApiClient {
5216
5634
  const error = await response.json().catch(() => ({}));
5217
5635
  throwMemberImportError(error, "Import preview failed");
5218
5636
  }
5219
- return response.json();
5637
+ const preview = await response.json();
5638
+ if (preview.previewPlanToken) {
5639
+ this.memberImportPlans.set(file, {
5640
+ wid,
5641
+ role: newMemberRoleId,
5642
+ autoPromote: options?.autoPromoteUniqueContacts ?? true,
5643
+ token: preview.previewPlanToken,
5644
+ cachedAt: Date.now()
5645
+ });
5646
+ } else {
5647
+ this.memberImportPlans.delete(file);
5648
+ }
5649
+ return preview;
5220
5650
  }
5221
5651
  /**
5222
5652
  * Import members from a CSV file, streaming progress updates via callback.
@@ -5226,10 +5656,11 @@ var MembersApi = class extends BaseApiClient {
5226
5656
  * Send 'overwrite_identity_fields' only after the operator confirms a preview.
5227
5657
  */
5228
5658
  async importMembers(wid, file, newMemberRoleId, onProgress, options) {
5229
- const formData = new FormData();
5230
- formData.append("file", file);
5231
- const params = new URLSearchParams();
5232
- params.append("new_member_role_id", newMemberRoleId.toString());
5659
+ const { body, params } = memberImportUpload(file, newMemberRoleId, options);
5660
+ const cachedPlan = this.memberImportPlans.get(file);
5661
+ const autoPromote = options?.autoPromoteUniqueContacts ?? true;
5662
+ 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);
5663
+ if (previewPlanToken) body.append("previewPlanToken", previewPlanToken);
5233
5664
  if (options?.identityConflictPolicy) {
5234
5665
  params.append("identity_conflict_policy", options.identityConflictPolicy);
5235
5666
  }
@@ -5237,7 +5668,7 @@ var MembersApi = class extends BaseApiClient {
5237
5668
  `w/${wid}/members/import?${params.toString()}`,
5238
5669
  {
5239
5670
  method: "POST",
5240
- body: formData
5671
+ body
5241
5672
  },
5242
5673
  [400, 413]
5243
5674
  );
@@ -5245,34 +5676,48 @@ var MembersApi = class extends BaseApiClient {
5245
5676
  const error = await response.json().catch(() => ({}));
5246
5677
  throwMemberImportError(error, "Import failed");
5247
5678
  }
5248
- if (onProgress && response.body) {
5249
- const reader = response.body.getReader();
5250
- const decoder = new TextDecoder();
5251
- let buffer = "";
5679
+ if (!response.body) throw new Error("Member import response has no progress stream");
5680
+ const reader = response.body.getReader();
5681
+ const decoder = new TextDecoder();
5682
+ let buffer = "";
5683
+ let result;
5684
+ let hadError = false;
5685
+ const consume = (line) => {
5686
+ if (!line.trim()) return;
5687
+ let event;
5688
+ try {
5689
+ event = JSON.parse(line);
5690
+ } catch {
5691
+ throw new Error("Invalid member import progress event");
5692
+ }
5693
+ if (event.type === "complete") result = event;
5694
+ if (event.type === "error") hadError = true;
5695
+ onProgress?.(event);
5696
+ };
5697
+ try {
5252
5698
  while (true) {
5253
5699
  const { done, value } = await reader.read();
5254
5700
  if (done) break;
5255
5701
  buffer += decoder.decode(value, { stream: true });
5256
5702
  const lines = buffer.split("\n");
5257
5703
  buffer = lines.pop() ?? "";
5258
- for (const line of lines) {
5259
- const trimmed = line.trim();
5260
- if (!trimmed) continue;
5261
- try {
5262
- onProgress(JSON.parse(trimmed));
5263
- } catch {
5264
- }
5265
- }
5266
- }
5267
- const tail = buffer.trim();
5268
- if (tail) {
5269
- try {
5270
- onProgress(JSON.parse(tail));
5271
- } catch {
5272
- }
5704
+ for (const line of lines) consume(line);
5273
5705
  }
5706
+ buffer += decoder.decode();
5707
+ consume(buffer);
5708
+ } catch (error) {
5709
+ await reader.cancel().catch(() => void 0);
5710
+ throw error;
5711
+ } finally {
5712
+ reader.releaseLock();
5274
5713
  }
5275
- return { success: true };
5714
+ if (!result) {
5715
+ throw new Error("Member import ended before completion; inspect members before retrying");
5716
+ }
5717
+ return {
5718
+ success: !hadError && (result.failed ?? 0) === 0 && (result.conflicted ?? 0) === 0,
5719
+ result
5720
+ };
5276
5721
  }
5277
5722
  /** Export members as a downloadable file with selected fields and data types. */
5278
5723
  async exportMembers(wid, selectedFields, selectedDataTypes, memberType) {
@@ -5928,6 +6373,21 @@ var MondayIntegrationApi = class extends BaseApiClient {
5928
6373
  method: "POST"
5929
6374
  });
5930
6375
  }
6376
+ /**
6377
+ * Managed-rule execution history for this connection (`GET /sync/logs`):
6378
+ * the connection's managed EventRule executions, newest first, with the
6379
+ * shared cursor pagination. Requires `apps:read`; works while the
6380
+ * connection is parked for re-authorization.
6381
+ */
6382
+ async getMondaySyncLogs(wid, params) {
6383
+ const query = new URLSearchParams();
6384
+ if (params?.pageSize) query.set("pageSize", String(params.pageSize));
6385
+ if (params?.cursor) query.set("cursor", params.cursor);
6386
+ const qs = query.toString() ? `?${query.toString()}` : "";
6387
+ return this.fetch(
6388
+ `w/${wid}/app-connections/monday/sync/logs${qs}`
6389
+ );
6390
+ }
5931
6391
  };
5932
6392
 
5933
6393
  // src/api/intervention-requests.ts
@@ -6085,6 +6545,10 @@ var OrgApi = class extends BaseApiClient {
6085
6545
  async getCurrentOrgMember(orgIdOrUuid) {
6086
6546
  return this.fetch(`o/${orgIdOrUuid}/me`);
6087
6547
  }
6548
+ /** Bundles this organization owns — read-only catalog for `/o/{uuid}/library`. */
6549
+ async listOrgBundles(orgIdOrUuid) {
6550
+ return this.fetch(`o/${orgIdOrUuid}/bundles`);
6551
+ }
6088
6552
  /**
6089
6553
  * Update the settings an org admin owns: name, slug and contact details.
6090
6554
  *
@@ -6126,6 +6590,12 @@ var OrgApi = class extends BaseApiClient {
6126
6590
  * `subscriptionId` is the org-scoped row — never pick the customer's
6127
6591
  * newest subscription from the list endpoint. One customer can bill many
6128
6592
  * organizations.
6593
+ *
6594
+ * Returns the generated `OrgBillingCustomerResponse` — the contract the
6595
+ * route actually emits, `audiences` included. The hand-written mirror that
6596
+ * used to live here listed four fields and silently dropped `audiences`,
6597
+ * so callers could not see the commercial roles they hold (GRA-8792).
6598
+ * Regenerate the shape (`yarn generate:types`) rather than re-declaring it.
6129
6599
  */
6130
6600
  async getOrgBillingCustomer(orgIdOrUuid) {
6131
6601
  return this.fetch(`o/${orgIdOrUuid}/billing-customer`);
@@ -6162,7 +6632,10 @@ var OrgApi = class extends BaseApiClient {
6162
6632
  return this.fetch(`o/${orgUuid}/members/check/${accountUuid}`);
6163
6633
  }
6164
6634
  /**
6165
- * Update an organization member's role.
6635
+ * Update an organization member's role and/or org-level display name.
6636
+ *
6637
+ * `name` is the org's own label for the member (the OrgMember row and the
6638
+ * linked OrgAccount); it does not change the person's global Account name.
6166
6639
  */
6167
6640
  async updateOrganizationMember(orgIdOrUuid, memberId, data) {
6168
6641
  return this.fetch(`o/${orgIdOrUuid}/members/${memberId}`, {
@@ -6537,12 +7010,6 @@ var OrgApi = class extends BaseApiClient {
6537
7010
  // ============================================================================
6538
7011
  // Organization A2P Brand Registration API
6539
7012
  // ============================================================================
6540
- /**
6541
- * Get the org's A2P brand registration status.
6542
- */
6543
- async getA2PStatus(orgUuid) {
6544
- return this.fetch(`o/${orgUuid}/phone-numbers/a2p/status`);
6545
- }
6546
7013
  /** Return fixed phone-number and outbound-messaging prices. */
6547
7014
  async getPhoneBillingPricing(orgUuid) {
6548
7015
  return this.fetch(`o/${orgUuid}/phone-numbers/pricing`);
@@ -6551,11 +7018,30 @@ var OrgApi = class extends BaseApiClient {
6551
7018
  * Start A2P brand registration under a legal entity. `legalEntityUuid`
6552
7019
  * is required — brands register per legal entity (Customer Profile);
6553
7020
  * there is no primary-entity fallback.
7021
+ *
7022
+ * `soleProprietorMobile` is the proprietor's own mobile number, the one the
7023
+ * carrier sends the A2P one-time-password verification to. Required when the
7024
+ * entity's registration shape is a sole proprietorship (see
7025
+ * `LegalEntitySummaryResponse.requiredBrandType`); ignored otherwise.
7026
+ *
7027
+ * Three constraints belong to the customer, so the caller must state them:
7028
+ * it has to be a US or Canadian **mobile**, it cannot be a number acquired
7029
+ * from a CPaaS provider (so never one we provisioned — the carrier rejects
7030
+ * it), and the carrier allows it a lifetime maximum of three uses across all
7031
+ * A2P brand registrations, counting those made through other vendors.
7032
+ *
7033
+ * It is forwarded to the registration workflow to reach the carrier as an
7034
+ * EndUser attribute and is never stored on our side.
6554
7035
  */
6555
- async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandUuid = null) {
7036
+ async startA2PRegistration(orgUuid, legalEntityUuid, brandName, brandUuid = null, soleProprietorMobile = null) {
6556
7037
  return this.fetch(`o/${orgUuid}/phone-numbers/a2p/start`, {
6557
7038
  method: "POST",
6558
- body: JSON.stringify({ legalEntityUuid, brandName, brandUuid })
7039
+ body: JSON.stringify({
7040
+ legalEntityUuid,
7041
+ brandName,
7042
+ brandUuid,
7043
+ soleProprietorMobile
7044
+ })
6559
7045
  });
6560
7046
  }
6561
7047
  /**
@@ -6583,6 +7069,25 @@ var OrgApi = class extends BaseApiClient {
6583
7069
  }
6584
7070
  );
6585
7071
  }
7072
+ /**
7073
+ * Which legal entity's voice trust products (CNAM, SHAKEN/STIR, Voice
7074
+ * Integrity) each of the org's numbers carries, read live from Twilio.
7075
+ */
7076
+ async getPhoneVoiceTrust(orgUuid) {
7077
+ return this.fetch(`o/${orgUuid}/phone-numbers/voice-trust`);
7078
+ }
7079
+ /**
7080
+ * Put a number on a legal entity's Customer Profile and approved voice
7081
+ * trust products, taking it off any other legal entity's first. The
7082
+ * entity's business profile must be approved (400 otherwise).
7083
+ */
7084
+ async attachPhoneVoiceTrust(orgUuid, providerPhoneUuid, legalEntityUuid) {
7085
+ const body = { providerPhoneUuid, legalEntityUuid };
7086
+ return this.fetch(`o/${orgUuid}/phone-numbers/voice-trust/attach`, {
7087
+ method: "POST",
7088
+ body: JSON.stringify(body)
7089
+ });
7090
+ }
6586
7091
  // ============================================================================
6587
7092
  // Organization Business Profile API (Twilio Trust Hub Secondary CP)
6588
7093
  // ============================================================================
@@ -6752,6 +7257,16 @@ var OrgApi = class extends BaseApiClient {
6752
7257
  }
6753
7258
  );
6754
7259
  }
7260
+ /**
7261
+ * Resubmit a campaign the carrier rejected, with the brand's current
7262
+ * campaign copy. Edits the campaign in place, so no second vetting fee.
7263
+ */
7264
+ async resubmitA2PCampaign(orgUuid, brandUuid) {
7265
+ return this.fetch(
7266
+ `o/${orgUuid}/a2p-brands/${brandUuid}/resubmit-campaign`,
7267
+ { method: "POST" }
7268
+ );
7269
+ }
6755
7270
  /**
6756
7271
  * Published Sites across the org's workspaces that can be linked as this
6757
7272
  * brand's enrollment (opt-in) surface. Org-authorized, so it works even when
@@ -6764,7 +7279,7 @@ var OrgApi = class extends BaseApiClient {
6764
7279
  }
6765
7280
  /**
6766
7281
  * Link the brand to a published enrollment Site (sets `site_uuid`). Returns
6767
- * the refreshed campaign config so the editor's link state updates inline.
7282
+ * the refreshed campaign config.
6768
7283
  */
6769
7284
  async linkA2PEnrollmentSite(orgUuid, brandUuid, data) {
6770
7285
  return this.fetch(
@@ -6777,9 +7292,9 @@ var OrgApi = class extends BaseApiClient {
6777
7292
  }
6778
7293
  /**
6779
7294
  * Provision (or reuse) a patient-enrollment Site for the brand and link it —
6780
- * the one-click path behind the SMS Consent tab. `workspaceUuid` is required
6781
- * only when the org has multiple workspaces. Returns the refreshed campaign
6782
- * config so the editor's link state updates inline. Idempotent.
7295
+ * the explicit counterpart to the automatic provisioning at brand
7296
+ * registration. `workspaceUuid` is required only when the org has multiple
7297
+ * workspaces. Returns the refreshed campaign config. Idempotent.
6783
7298
  */
6784
7299
  async provisionA2PEnrollmentSite(orgUuid, brandUuid, data = {}) {
6785
7300
  return this.fetch(
@@ -6798,34 +7313,42 @@ var OrgApi = class extends BaseApiClient {
6798
7313
  );
6799
7314
  }
6800
7315
  /**
6801
- * The brand's enrollment-form template URL (carries `?brand=…`, no
6802
- * credential). `url` is null until a Site is linked. Do not append a
6803
- * patient identifier to this URL — use {@link mintA2PBrandEnrollmentLink}
6804
- * to get a patient-ready link instead.
7316
+ * Stage one A2P opt-in evidence file: get a presigned POST to send the bytes
7317
+ * straight to storage. Nothing is recorded on the brand until
7318
+ * {@link registerA2PEvidenceUpload} reads the object back and normalizes it.
6805
7319
  */
6806
- async getA2PBrandEnrollmentUrl(orgUuid, brandUuid) {
7320
+ async createA2PEvidenceUploadUrl(orgUuid, brandUuid, data) {
6807
7321
  return this.fetch(
6808
- `o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`
7322
+ `o/${orgUuid}/a2p-brands/${brandUuid}/evidence-attachments/upload-url`,
7323
+ {
7324
+ method: "POST",
7325
+ body: JSON.stringify(data)
7326
+ }
6809
7327
  );
6810
7328
  }
6811
7329
  /**
6812
- * Mint a patient-ready enrollment link for one patient.
6813
- *
6814
- * The returned URL carries a fresh, expiring, single-use `?grant=…` bound to
6815
- * the member that `externalId` resolves to. `externalId` (the patient's
6816
- * CRM/EHR identifier) travels in the request body, never the query string,
6817
- * so it stays out of access logs. When it matches no member, the
6818
- * credential-free template URL is returned rather than an error.
7330
+ * Normalize a staged evidence upload and record it on the brand. Returns the
7331
+ * refreshed campaign config, so the editor's evidence list updates without a
7332
+ * second round trip.
6819
7333
  */
6820
- async mintA2PBrandEnrollmentLink(orgUuid, brandUuid, externalId) {
7334
+ async registerA2PEvidenceUpload(orgUuid, brandUuid, data) {
6821
7335
  return this.fetch(
6822
- `o/${orgUuid}/a2p-brands/${brandUuid}/enrollment-url`,
7336
+ `o/${orgUuid}/a2p-brands/${brandUuid}/evidence-attachments`,
6823
7337
  {
6824
7338
  method: "POST",
6825
- body: JSON.stringify({ externalId })
7339
+ body: JSON.stringify(data)
6826
7340
  }
6827
7341
  );
6828
7342
  }
7343
+ /** Remove one uploaded evidence artifact. */
7344
+ async deleteA2PEvidenceUpload(orgUuid, brandUuid, attachmentUuid) {
7345
+ return this.fetch(
7346
+ `o/${orgUuid}/a2p-brands/${brandUuid}/evidence-attachments/${encodeURIComponent(
7347
+ attachmentUuid
7348
+ )}`,
7349
+ { method: "DELETE" }
7350
+ );
7351
+ }
6829
7352
  /**
6830
7353
  * List available member roles for a workspace in the organization.
6831
7354
  */
@@ -6850,6 +7373,9 @@ var OrgApi = class extends BaseApiClient {
6850
7373
  async listOrgWebhookEndpoints(orgIdOrUuid) {
6851
7374
  return this.fetch(`o/${orgIdOrUuid}/webhooks`);
6852
7375
  }
7376
+ async getOrgWebhookEndpoint(orgIdOrUuid, endpointUuid) {
7377
+ return this.fetch(`o/${orgIdOrUuid}/webhooks/${endpointUuid}`);
7378
+ }
6853
7379
  /**
6854
7380
  * The subscribable event-type vocabulary for the org UI's event-type
6855
7381
  * picker — exactly what the create/update validators accept, so the UI
@@ -6908,6 +7434,39 @@ var OrgApi = class extends BaseApiClient {
6908
7434
  }
6909
7435
  );
6910
7436
  }
7437
+ // =========================================================================
7438
+ // Organization API keys (GRA-9043)
7439
+ // =========================================================================
7440
+ /**
7441
+ * List every API key bound to this organization. Never carries the secret.
7442
+ *
7443
+ * Org-bound keys authenticate as an org-local principal, so one key reaches
7444
+ * every current workspace of the organization and every workspace created
7445
+ * later. Gated by `org:api_keys`, which `org:admin` holds transitively.
7446
+ */
7447
+ async listOrgApiKeys(orgIdOrUuid) {
7448
+ return this.fetch(`o/${orgIdOrUuid}/api-keys`);
7449
+ }
7450
+ /**
7451
+ * Mint an org-bound API key.
7452
+ *
7453
+ * The payload is the same client-only {@link ApiKeyFormData} the workspace
7454
+ * and account routes take — `{name, expiresInDays, scopes}`, no workspace
7455
+ * id: the mint location is what binds the key. The response carries `key`,
7456
+ * the plaintext secret, which is readable exactly once.
7457
+ */
7458
+ async createOrgApiKey(orgIdOrUuid, apiKey) {
7459
+ return this.fetch(`o/${orgIdOrUuid}/api-keys`, {
7460
+ method: "POST",
7461
+ body: JSON.stringify(apiKey)
7462
+ });
7463
+ }
7464
+ /** Revoke an org-bound API key by its id. */
7465
+ async revokeOrgApiKey(orgIdOrUuid, keyId) {
7466
+ return this.fetch(`o/${orgIdOrUuid}/api-keys/${keyId}`, {
7467
+ method: "DELETE"
7468
+ });
7469
+ }
6911
7470
  };
6912
7471
  function businessProfilePath(orgUuid, legalEntityUuid) {
6913
7472
  return legalEntityUuid ? `o/${orgUuid}/legal-entities/${legalEntityUuid}/business-profile` : `o/${orgUuid}/business-profile`;
@@ -7542,6 +8101,14 @@ var QualificationsApi = class extends BaseApiClient {
7542
8101
  });
7543
8102
  }
7544
8103
  // ===== Test chat runs =====
8104
+ /**
8105
+ * List a Workflow's test chat runs, newest first (default 50, max 500).
8106
+ *
8107
+ * `workflowRevisionId` narrows to that revision before the limit applies.
8108
+ * `includeEarlierRevisions` widens the window to earlier published
8109
+ * revisions and runs whose revision was deleted, and requires
8110
+ * `workflowRevisionId`. Omitting both keeps the unfiltered list.
8111
+ */
7545
8112
  async listTestChatRuns(wid, workflowId, params) {
7546
8113
  const query = new URLSearchParams();
7547
8114
  if (params?.scenarioId !== void 0) query.set("scenarioId", String(params.scenarioId));
@@ -7549,11 +8116,36 @@ var QualificationsApi = class extends BaseApiClient {
7549
8116
  query.set("assistantChatModelId", params.assistantChatModelId);
7550
8117
  }
7551
8118
  if (params?.limit !== void 0) query.set("limit", String(params.limit));
8119
+ if (params?.workflowRevisionId !== void 0) {
8120
+ query.set("workflow_revision_id", String(params.workflowRevisionId));
8121
+ }
8122
+ if (params?.includeEarlierRevisions !== void 0) {
8123
+ query.set("include_earlier_revisions", String(params.includeEarlierRevisions));
8124
+ }
7552
8125
  const qs = query.toString() ? `?${query.toString()}` : "";
7553
8126
  return this.fetch(
7554
8127
  `w/${wid}/qualifications/workflows/${workflowId}/test-chat-runs${qs}`
7555
8128
  );
7556
8129
  }
8130
+ /**
8131
+ * Exact scenario health for one revision of a Workflow: every active
8132
+ * scenario's server-decided state, caption, counts and per-revision pass
8133
+ * rates, plus the board headline. Scenarios arrive in board order.
8134
+ *
8135
+ * Omit `workflowRevisionId` for the server's current revision (the newest
8136
+ * with runs, the Draft counting as newest); the response names the
8137
+ * revision it describes and whether it is the current one.
8138
+ */
8139
+ async listScenarioHealthSummaries(wid, workflowId, params) {
8140
+ const query = new URLSearchParams();
8141
+ if (params?.workflowRevisionId !== void 0) {
8142
+ query.set("workflow_revision_id", String(params.workflowRevisionId));
8143
+ }
8144
+ const qs = query.toString() ? `?${query.toString()}` : "";
8145
+ return this.fetch(
8146
+ `w/${wid}/qualifications/workflows/${workflowId}/scenario-health-summaries${qs}`
8147
+ );
8148
+ }
7557
8149
  async getTestChatRun(wid, runId) {
7558
8150
  return this.fetch(`w/${wid}/qualifications/test-chat-runs/${runId}`);
7559
8151
  }
@@ -7649,6 +8241,96 @@ var ReportsApi = class extends BaseApiClient {
7649
8241
  }
7650
8242
  };
7651
8243
 
8244
+ // src/types/generated/communication.ts
8245
+ var RoutingActionType = {
8246
+ answer_ai: "answer_ai",
8247
+ answer_human: "answer_human",
8248
+ answer_owner: "answer_owner",
8249
+ voicemail: "voicemail",
8250
+ play_message: "play_message",
8251
+ ignore: "ignore",
8252
+ signup: "signup"
8253
+ };
8254
+ var RoutingAudience = {
8255
+ anyone: "anyone",
8256
+ anonymous: "anonymous",
8257
+ members: "members"
8258
+ };
8259
+ var RoutingChannel = {
8260
+ pstn: "pstn",
8261
+ messaging: "messaging",
8262
+ email: "email"
8263
+ };
8264
+ var RoutingTimeWindow = {
8265
+ always: "always",
8266
+ business_hours: "business_hours",
8267
+ non_business_hours: "non_business_hours",
8268
+ custom: "custom"
8269
+ };
8270
+
8271
+ // src/api/routing-rules.ts
8272
+ function appendFilters(params, filters) {
8273
+ if (!filters) return;
8274
+ if (filters.channel !== void 0) params.set("channel", filters.channel);
8275
+ if (filters.phoneNumberId !== void 0)
8276
+ params.set("phoneNumberId", String(filters.phoneNumberId));
8277
+ if (filters.inboxId !== void 0) params.set("inboxId", String(filters.inboxId));
8278
+ if (filters.page !== void 0) params.set("page", String(filters.page));
8279
+ if (filters.pageSize !== void 0) params.set("pageSize", String(filters.pageSize));
8280
+ }
8281
+ var RoutingRulesApi = class extends BaseApiClient {
8282
+ /** List one endpoint's rules. Requires the rule's endpoint read permission (`phones:read`, or `inboxes:read`). */
8283
+ async getRoutingRules(wid, filters) {
8284
+ const params = new URLSearchParams();
8285
+ appendFilters(params, filters);
8286
+ const query = params.toString();
8287
+ return this.fetch(
8288
+ `w/${wid}/routing${query ? `?${query}` : ""}`
8289
+ );
8290
+ }
8291
+ /** Read one rule. Requires the rule's endpoint read permission (`phones:read`, or `inboxes:read`). */
8292
+ async getRoutingRule(wid, ruleUuid) {
8293
+ return this.fetch(`w/${wid}/routing/${ruleUuid}`);
8294
+ }
8295
+ /** Create a rule. Requires the rule's endpoint write permission (`phones:write`, or `inboxes:write`). */
8296
+ async createRoutingRule(wid, data) {
8297
+ return this.fetch(`w/${wid}/routing`, {
8298
+ method: "POST",
8299
+ body: JSON.stringify(data)
8300
+ });
8301
+ }
8302
+ /** Update a rule. Requires the rule's endpoint write permission (`phones:write`, or `inboxes:write`). */
8303
+ async updateRoutingRule(wid, ruleUuid, data) {
8304
+ return this.fetch(`w/${wid}/routing/${ruleUuid}`, {
8305
+ method: "PATCH",
8306
+ body: JSON.stringify(data)
8307
+ });
8308
+ }
8309
+ /** Hard-delete a rule. Requires the rule's endpoint write permission (`phones:write`, or `inboxes:write`); the server audits deletion. */
8310
+ async deleteRoutingRule(wid, ruleUuid) {
8311
+ return this.fetch(`w/${wid}/routing/${ruleUuid}`, {
8312
+ method: "DELETE"
8313
+ });
8314
+ }
8315
+ /** Atomically reorder one endpoint/channel scope. Requires the rule's endpoint write permission (`phones:write`, or `inboxes:write`). */
8316
+ async reorderRoutingRules(wid, ruleUuids) {
8317
+ return this.fetch(`w/${wid}/routing/reorder`, {
8318
+ method: "POST",
8319
+ body: JSON.stringify({ ruleUuids })
8320
+ });
8321
+ }
8322
+ /**
8323
+ * Dry-run rule evaluation without placing or sending anything. Requires
8324
+ * the rule's endpoint read permission (`phones:read`, or `inboxes:read`); previewing a named Member also requires `members:read`.
8325
+ */
8326
+ async previewRoutingRule(wid, data) {
8327
+ return this.fetch(`w/${wid}/routing/preview`, {
8328
+ method: "POST",
8329
+ body: JSON.stringify(data)
8330
+ });
8331
+ }
8332
+ };
8333
+
7652
8334
  // src/api/salesforce.ts
7653
8335
  var SalesforceApi = class extends BaseApiClient {
7654
8336
  /**
@@ -7729,6 +8411,20 @@ var SalesforceApi = class extends BaseApiClient {
7729
8411
  body: JSON.stringify(data)
7730
8412
  });
7731
8413
  }
8414
+ /**
8415
+ * Start a durable run that links unlinked members by Salesforce Id / email
8416
+ * and hydrates them. One run per connection; a second start while one is
8417
+ * in flight is 409.
8418
+ */
8419
+ async linkUnlinkedSalesforceMembersByIdentity(wid) {
8420
+ return this.fetch(
8421
+ `w/${wid}/app-connections/salesforce/reconciliation/link-unlinked-by-identity`,
8422
+ {
8423
+ method: "POST",
8424
+ body: JSON.stringify({})
8425
+ }
8426
+ );
8427
+ }
7732
8428
  async unlinkMemberFromSalesforce(wid, memberId) {
7733
8429
  return this.fetch(`w/${wid}/app-connections/salesforce/reconciliation/unlink/${memberId}`, {
7734
8430
  method: "DELETE"
@@ -7810,6 +8506,21 @@ var SalesforceApi = class extends BaseApiClient {
7810
8506
  }
7811
8507
  );
7812
8508
  }
8509
+ /**
8510
+ * Managed-rule execution history for this connection (`GET /sync/logs`):
8511
+ * the connection's managed EventRule executions, newest first, with the
8512
+ * shared cursor pagination. Requires `apps:read`; works while the
8513
+ * connection is parked for re-authorization.
8514
+ */
8515
+ async getSalesforceSyncLogs(wid, params) {
8516
+ const query = new URLSearchParams();
8517
+ if (params?.pageSize) query.set("pageSize", String(params.pageSize));
8518
+ if (params?.cursor) query.set("cursor", params.cursor);
8519
+ const qs = query.toString() ? `?${query.toString()}` : "";
8520
+ return this.fetch(
8521
+ `w/${wid}/app-connections/salesforce/sync/logs${qs}`
8522
+ );
8523
+ }
7813
8524
  };
7814
8525
 
7815
8526
  // src/api/connection-sync.ts
@@ -8000,12 +8711,19 @@ var HubspotApi = class extends BaseApiClient {
8000
8711
  async getHubspotManagedRules(wid) {
8001
8712
  return this.fetch(`w/${wid}/app-connections/hubspot/managed-rules`);
8002
8713
  }
8714
+ /**
8715
+ * Managed-rule execution history for this connection (`GET /sync/logs`).
8716
+ * Rows are the shared rule-execution response (the same shape the Salesforce
8717
+ * and Monday twins return), with cursor pagination.
8718
+ */
8003
8719
  async getHubspotSyncLogs(wid, params) {
8004
8720
  const query = new URLSearchParams();
8005
8721
  if (params?.pageSize) query.set("pageSize", String(params.pageSize));
8006
8722
  if (params?.cursor) query.set("cursor", params.cursor);
8007
8723
  const qs = query.toString() ? `?${query.toString()}` : "";
8008
- return this.fetch(`w/${wid}/app-connections/hubspot/sync/logs${qs}`);
8724
+ return this.fetch(
8725
+ `w/${wid}/app-connections/hubspot/sync/logs${qs}`
8726
+ );
8009
8727
  }
8010
8728
  async getHubspotTransformPresets(wid) {
8011
8729
  return this.fetch(
@@ -9004,6 +9722,33 @@ var JourneysApi = class extends BaseApiClient {
9004
9722
  body: JSON.stringify(data)
9005
9723
  });
9006
9724
  }
9725
+ /**
9726
+ * Discard a saved editor draft, keeping the runnable definition.
9727
+ *
9728
+ * Body-less: a DELETE carries no document, only the resource to remove and
9729
+ * `expectedUpdatedAt` — the Journey's `updatedAt` as the caller loaded it —
9730
+ * proving they are removing the draft they were looking at. Encoded through
9731
+ * `URLSearchParams` because an ISO timestamp with a positive UTC offset
9732
+ * contains a `+`, which a raw template string would deliver to the server as
9733
+ * a space and turn into a revision conflict nobody can explain.
9734
+ *
9735
+ * Returns the AUTHORING projection (`Journey`) with `authoringDraft: null`
9736
+ * and the advanced `updatedAt`, so the caller can re-derive from the stored
9737
+ * definition without a second read.
9738
+ *
9739
+ * Refusals match the PUT's vocabulary: `journey_v2_definition_conflict`
9740
+ * (someone saved first — nothing was removed),
9741
+ * `journey_v2_structural_edit_not_allowed` (the Journey is live or archived)
9742
+ * and `journey_v2_execution_model_mismatch` (it is legacy). A Journey that
9743
+ * has no saved draft is a success, not an error — the state the caller asked
9744
+ * for is the state it is in.
9745
+ */
9746
+ async deleteJourneyDraft(wid, journeyId, expectedUpdatedAt) {
9747
+ const query = new URLSearchParams({ expectedUpdatedAt });
9748
+ return this.fetch(`w/${wid}/journeys/${journeyId}/draft?${query.toString()}`, {
9749
+ method: "DELETE"
9750
+ });
9751
+ }
9007
9752
  /**
9008
9753
  * List journeys, optionally including archived, paginated.
9009
9754
  *
@@ -9410,15 +10155,11 @@ var WorkflowsApi = class extends BaseApiClient {
9410
10155
  return this.fetch(`w/${wid}/workflows/${id}/diagram${query}`);
9411
10156
  }
9412
10157
  /**
9413
- * Get workflow thumbnail URL.
9414
- * For cross-domain setups, returns a same-origin proxy URL to ensure cookies are sent.
9415
- * For same-origin setups, returns the direct API URL.
10158
+ * The outline a Workflow's diagram is drawn from: its active Tasks, its
10159
+ * start Task, the moves between Tasks and its Ability types.
9416
10160
  */
9417
- getWorkflowThumbnailUrl(wid, id) {
9418
- if (this.isCrossDomain) {
9419
- return `/api/v2/w/${wid}/workflows/${id}/thumbnail`;
9420
- }
9421
- return `${this.baseUrl}/api/v2/w/${wid}/workflows/${id}/thumbnail`;
10161
+ async getWorkflowOutline(wid, id) {
10162
+ return this.fetch(`w/${wid}/workflows/${id}/outline`);
9422
10163
  }
9423
10164
  /** Create a new workflow in a workspace. */
9424
10165
  async createWorkflow(wid, workflow) {
@@ -9501,11 +10242,6 @@ var WorkflowsApi = class extends BaseApiClient {
9501
10242
  `w/${wid}/workflows/${workflowId}/tasks/${taskId}/chats?${params.toString()}`
9502
10243
  );
9503
10244
  }
9504
- async getWorkflowAccessValidation(wid, workflowId) {
9505
- return this.fetch(
9506
- `w/${wid}/workflows/${workflowId}/validate-access`
9507
- );
9508
- }
9509
10245
  async getWorkflowConfigValidation(wid, workflowId) {
9510
10246
  return this.fetch(
9511
10247
  `w/${wid}/workflows/${workflowId}/validate-config`
@@ -9773,21 +10509,6 @@ function encodePermissions(permissions) {
9773
10509
  if (permissions.delete) accessMode |= PERMISSION_DELETE;
9774
10510
  return accessMode;
9775
10511
  }
9776
- var WORKFLOW_IMPLICIT_USE_SCOPE = "workflows:admin";
9777
- function roleImplicitWorkflowUseScope(role) {
9778
- return (role.grantedScopes ?? []).includes(WORKFLOW_IMPLICIT_USE_SCOPE) ? WORKFLOW_IMPLICIT_USE_SCOPE : null;
9779
- }
9780
- function roleWorkflowAccess(role, workflowId) {
9781
- const viaScope = roleImplicitWorkflowUseScope(role);
9782
- if (viaScope) {
9783
- return { accessMode: PERMISSION_USE | PERMISSION_EDIT, viaScope };
9784
- }
9785
- const entry = (role.workflowAccess ?? []).find((wa) => wa.workflowId === workflowId);
9786
- return { accessMode: entry?.accessMode ?? PERMISSION_NONE, viaScope: null };
9787
- }
9788
- function roleCanUseWorkflow(role, workflowId) {
9789
- return (roleWorkflowAccess(role, workflowId).accessMode & PERMISSION_USE) !== 0;
9790
- }
9791
10512
  var Scope = /* @__PURE__ */ ((Scope2) => {
9792
10513
  Scope2["WORKSPACE_READ"] = "workspace:read";
9793
10514
  Scope2["WORKSPACE_WRITE"] = "workspace:write";
@@ -9856,6 +10577,7 @@ var Scope = /* @__PURE__ */ ((Scope2) => {
9856
10577
  Scope2["LABELS_READ"] = "labels:read";
9857
10578
  Scope2["LABELS_WRITE"] = "labels:write";
9858
10579
  Scope2["ANALYTICS_READ"] = "analytics:read";
10580
+ Scope2["ANONYMOUS_SUBMISSIONS_READ"] = "anonymous_submissions:read";
9859
10581
  Scope2["OPERATOR_READ"] = "operator:read";
9860
10582
  Scope2["OPERATOR_WRITE"] = "operator:write";
9861
10583
  Scope2["EXPORT_READ"] = "export:read";
@@ -9879,6 +10601,8 @@ var BulkMemberResultStatus = {
9879
10601
  skipped: "skipped"
9880
10602
  };
9881
10603
  var MemberImportMatchInfoMatchType = {
10604
+ id: "id",
10605
+ uuid: "uuid",
9882
10606
  external_id: "external_id",
9883
10607
  email: "email",
9884
10608
  phone: "phone",
@@ -9900,6 +10624,36 @@ var MergeMemberRolesRequestAccessStrategy = {
9900
10624
  target_only: "target_only"
9901
10625
  };
9902
10626
 
10627
+ // src/types/generated/member_contact_point.ts
10628
+ var CreateMemberContactPointRequestContactType = {
10629
+ phone: "phone",
10630
+ email: "email"
10631
+ };
10632
+ var CreateMemberContactPointRequestPurpose = {
10633
+ general: "general",
10634
+ notification: "notification",
10635
+ billing: "billing"
10636
+ };
10637
+ var CreateMemberContactPointRequestSharing = {
10638
+ shared: "shared",
10639
+ individual: "individual",
10640
+ unknown: "unknown"
10641
+ };
10642
+ var UpdateMemberContactPointRequestContactType = {
10643
+ phone: "phone",
10644
+ email: "email"
10645
+ };
10646
+ var UpdateMemberContactPointRequestPurpose = {
10647
+ general: "general",
10648
+ notification: "notification",
10649
+ billing: "billing"
10650
+ };
10651
+ var UpdateMemberContactPointRequestSharing = {
10652
+ shared: "shared",
10653
+ individual: "individual",
10654
+ unknown: "unknown"
10655
+ };
10656
+
9903
10657
  // src/types/member-types.ts
9904
10658
  var MemberType = /* @__PURE__ */ ((MemberType2) => {
9905
10659
  MemberType2["ANONYMOUS"] = "anonymous";
@@ -9986,6 +10740,7 @@ var EventRuleEventType = /* @__PURE__ */ ((EventRuleEventType2) => {
9986
10740
  EventRuleEventType2["CHAT_CREATED"] = "chat:created";
9987
10741
  EventRuleEventType2["CHAT_SUMMARY"] = "chat:summary";
9988
10742
  EventRuleEventType2["MESSAGE_CREATED"] = "message:created";
10743
+ EventRuleEventType2["LINK_CLICKED"] = "link:clicked";
9989
10744
  EventRuleEventType2["CHAT_CALLBACK"] = "chat:callback";
9990
10745
  EventRuleEventType2["MEMBER_UPDATED"] = "member:updated";
9991
10746
  EventRuleEventType2["ROUTINE_TRIGGERED"] = "routine:triggered";
@@ -10049,6 +10804,20 @@ function eventRuleActionParams(params) {
10049
10804
  }
10050
10805
  var MASKED_SECRET_SENTINEL = "__SECRET_SET__";
10051
10806
 
10807
+ // src/types/generated/credit_stop_service.ts
10808
+ var SendingNextStep = {
10809
+ add_credits: "add_credits",
10810
+ subscribe: "subscribe",
10811
+ contact_billing_owner: "contact_billing_owner"
10812
+ };
10813
+ var SendingStopState = {
10814
+ ok: "ok",
10815
+ credits_suspended: "credits_suspended",
10816
+ out_of_credits: "out_of_credits",
10817
+ operator_suspension: "operator_suspension",
10818
+ billing_unresolved: "billing_unresolved"
10819
+ };
10820
+
10052
10821
  // src/types/billing-types.ts
10053
10822
  var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
10054
10823
  WorkspaceFeature2["PHONE"] = "phone";
@@ -10064,7 +10833,6 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
10064
10833
  WorkspaceFeature2["WEB_SEARCH"] = "web_search";
10065
10834
  WorkspaceFeature2["CALENDAR"] = "calendar";
10066
10835
  WorkspaceFeature2["JOURNEY_V2_EDITOR"] = "journey_v2_editor";
10067
- WorkspaceFeature2["EXPERIMENTS"] = "experiments";
10068
10836
  WorkspaceFeature2["MAILBOX_USER_INPUT"] = "mailbox_user_input";
10069
10837
  WorkspaceFeature2["FORKED_TRAJECTORIES"] = "forked_trajectories";
10070
10838
  WorkspaceFeature2["GMAIL"] = "gmail";
@@ -10085,6 +10853,7 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
10085
10853
  WorkspaceFeature2["IMAGE_GENERATION"] = "image_generation";
10086
10854
  WorkspaceFeature2["CHARLESTON_NEPHROLOGY_PMD_PAGING"] = "charleston_nephrology_pmd_paging";
10087
10855
  WorkspaceFeature2["PATIENTSYNC_TRANSFER"] = "patientsync_transfer";
10856
+ WorkspaceFeature2["COSAN_PATHWAYS_SCHEDULING"] = "cosan_pathways_scheduling";
10088
10857
  return WorkspaceFeature2;
10089
10858
  })(WorkspaceFeature || {});
10090
10859
  var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
@@ -10195,6 +10964,7 @@ var IndexStatus = /* @__PURE__ */ ((IndexStatus2) => {
10195
10964
  var DataTypeRecordScope = /* @__PURE__ */ ((DataTypeRecordScope2) => {
10196
10965
  DataTypeRecordScope2["WORKSPACE"] = "workspace";
10197
10966
  DataTypeRecordScope2["MEMBER"] = "member";
10967
+ DataTypeRecordScope2["ANONYMOUS"] = "anonymous";
10198
10968
  return DataTypeRecordScope2;
10199
10969
  })(DataTypeRecordScope || {});
10200
10970
  var DataSensitivity = /* @__PURE__ */ ((DataSensitivity2) => {
@@ -10226,6 +10996,7 @@ var ModelProvider = {
10226
10996
  deepgram: "deepgram",
10227
10997
  xai: "xai",
10228
10998
  fireworks: "fireworks",
10999
+ vercel: "vercel",
10229
11000
  custom: "custom"
10230
11001
  };
10231
11002
  var ModelType = {
@@ -10326,7 +11097,26 @@ var FhirClientType = /* @__PURE__ */ ((FhirClientType2) => {
10326
11097
  return FhirClientType2;
10327
11098
  })(FhirClientType || {});
10328
11099
 
11100
+ // src/types/app-connection-types.ts
11101
+ var CrmActivityKind = /* @__PURE__ */ ((CrmActivityKind2) => {
11102
+ CrmActivityKind2["MESSAGE"] = "message";
11103
+ CrmActivityKind2["SUMMARY"] = "summary";
11104
+ CrmActivityKind2["CHAT_STARTED"] = "chat_started";
11105
+ CrmActivityKind2["CALL_STARTED"] = "call_started";
11106
+ CrmActivityKind2["CALL_ENDED"] = "call_ended";
11107
+ return CrmActivityKind2;
11108
+ })(CrmActivityKind || {});
11109
+
10329
11110
  // src/types/generated/qualification.ts
11111
+ var RunHealthCategory = {
11112
+ passed: "passed",
11113
+ failed: "failed",
11114
+ running: "running",
11115
+ not_applicable: "not_applicable",
11116
+ awaiting_evaluation: "awaiting_evaluation",
11117
+ ungradeable: "ungradeable",
11118
+ incomplete: "incomplete"
11119
+ };
10330
11120
  var TestChatRunLane = {
10331
11121
  text: "text",
10332
11122
  web_realtime: "web_realtime",
@@ -10344,6 +11134,44 @@ var TestChatRunOutcome = {
10344
11134
  instrument_failure: "instrument_failure"
10345
11135
  };
10346
11136
 
11137
+ // src/types/generated/qualification_health_service.ts
11138
+ var ScenarioHealthCaption = {
11139
+ recent_passes: "recent_passes",
11140
+ pass_ratio: "pass_ratio",
11141
+ could_not_grade: "could_not_grade",
11142
+ awaiting_evaluation: "awaiting_evaluation",
11143
+ running: "running",
11144
+ not_run_since_test_change: "not_run_since_test_change",
11145
+ not_run_on_revision: "not_run_on_revision",
11146
+ never_run: "never_run"
11147
+ };
11148
+ var ScenarioHealthHeadline = {
11149
+ needs_attention: "needs_attention",
11150
+ no_results: "no_results",
11151
+ all_passing: "all_passing",
11152
+ no_scenarios: "no_scenarios"
11153
+ };
11154
+ var ScenarioHealthSampleNote = {
11155
+ low_sample: "low_sample"
11156
+ };
11157
+ var ScenarioHealthState = {
11158
+ failing: "failing",
11159
+ flaky: "flaky",
11160
+ no_results: "no_results",
11161
+ passing: "passing"
11162
+ };
11163
+
11164
+ // src/types/generated/qualification_health_summary.ts
11165
+ var RevisionHistorySegment = {
11166
+ before_test_change: "before_test_change"
11167
+ };
11168
+
11169
+ // src/types/generated/qualification_run_identity.ts
11170
+ var ScenarioRunBlocker = {
11171
+ missing_persona: "missing_persona",
11172
+ archived_persona: "archived_persona"
11173
+ };
11174
+
10347
11175
  // src/types/qualification-types.ts
10348
11176
  var CriterionType = /* @__PURE__ */ ((CriterionType2) => {
10349
11177
  CriterionType2["EXPRESSION"] = "expression";
@@ -11305,17 +12133,17 @@ var WorkspacesApi = class extends BaseApiClient {
11305
12133
  body: JSON.stringify(payload)
11306
12134
  });
11307
12135
  }
11308
- /** List available themes for a workspace. */
12136
+ /**
12137
+ * List available themes for a workspace.
12138
+ *
12139
+ * Read-only: `…/themes` serves GET and nothing else. `Workspace.themes` is
12140
+ * an entitlement allowlist — which non-global themes this workspace may
12141
+ * select. There was never a `PUT …/themes` route; the
12142
+ * `updateWorkspaceThemes` method that targeted one always 405'd (GRA-8892).
12143
+ */
11309
12144
  async getWorkspaceThemes(wid) {
11310
12145
  return this.fetch(`w/${wid}/themes`);
11311
12146
  }
11312
- /** Update the active themes for a workspace. */
11313
- async updateWorkspaceThemes(wid, themes) {
11314
- return this.fetch(`w/${wid}/themes`, {
11315
- method: "PUT",
11316
- body: JSON.stringify({ themes })
11317
- });
11318
- }
11319
12147
  /**
11320
12148
  * Get all workspace-grantable scopes that can be assigned to member roles.
11321
12149
  *
@@ -11344,6 +12172,47 @@ var WorkspacesApi = class extends BaseApiClient {
11344
12172
  }
11345
12173
  };
11346
12174
 
12175
+ // src/types/generated/bundle_contract.ts
12176
+ var BundleGrantRequestGranteeType = {
12177
+ organization: "organization",
12178
+ global: "global"
12179
+ };
12180
+ var FormBundleItemRecordScope = {
12181
+ member: "member",
12182
+ workspace: "workspace",
12183
+ anonymous: "anonymous"
12184
+ };
12185
+
12186
+ // src/types/generated/installation_contract.ts
12187
+ var InstallationItemChangeChange = {
12188
+ added: "added",
12189
+ removed: "removed",
12190
+ revisionChanged: "revisionChanged",
12191
+ definitionChanged: "definitionChanged",
12192
+ unchanged: "unchanged"
12193
+ };
12194
+ var ReferenceTargetInputKind = {
12195
+ file: "file",
12196
+ file_folder: "file_folder",
12197
+ image: "image",
12198
+ phone_number: "phone_number",
12199
+ member_role: "member_role",
12200
+ page: "page"
12201
+ };
12202
+ var ScalarTargetInputKind = {
12203
+ text: "text",
12204
+ textarea: "textarea",
12205
+ url: "url",
12206
+ color: "color",
12207
+ number: "number",
12208
+ boolean: "boolean",
12209
+ select: "select"
12210
+ };
12211
+ var SetInstallationPolicyRequestUpgradePolicy = {
12212
+ pinned: "pinned",
12213
+ auto: "auto"
12214
+ };
12215
+
11347
12216
  // src/app-context.ts
11348
12217
  function formatAppContextAsMarkdown(context) {
11349
12218
  if (!context) {
@@ -11420,6 +12289,8 @@ function createApiModules(apiKey, baseUrl, customFetch) {
11420
12289
  assignments: new AssignmentsApi(apiKey, baseUrl, customFetch),
11421
12290
  auth: new AuthApi(apiKey, baseUrl, customFetch),
11422
12291
  builders: new BuildersApi(apiKey, baseUrl, customFetch),
12292
+ bundles: new BundlesApi(apiKey, baseUrl, customFetch),
12293
+ installations: new InstallationsApi(apiKey, baseUrl, customFetch),
11423
12294
  calendars: new CalendarsApi(apiKey, baseUrl, customFetch),
11424
12295
  calls: new CallsApi(apiKey, baseUrl, customFetch),
11425
12296
  cel: new CELApi(apiKey, baseUrl, customFetch),
@@ -11468,6 +12339,8 @@ function createApiModules(apiKey, baseUrl, customFetch) {
11468
12339
  metrics: new MetricsApi(apiKey, baseUrl, customFetch),
11469
12340
  queries: new QueriesApi(apiKey, baseUrl, customFetch),
11470
12341
  reports: new ReportsApi(apiKey, baseUrl, customFetch),
12342
+ resourceWorkflows: new ResourceWorkflowsApi(apiKey, baseUrl, customFetch),
12343
+ routingRules: new RoutingRulesApi(apiKey, baseUrl, customFetch),
11471
12344
  salesforce: new SalesforceApi(apiKey, baseUrl, customFetch),
11472
12345
  sites: new SitesApi(apiKey, baseUrl, customFetch),
11473
12346
  subscriptions: new SubscriptionsApi(apiKey, baseUrl, customFetch),
@@ -11497,6 +12370,7 @@ var WORKSPACE_METHOD_NAMES = [
11497
12370
  "archiveDataType",
11498
12371
  "archiveJourney",
11499
12372
  "archiveMember",
12373
+ "archiveMemberByExternalId",
11500
12374
  "archiveMemberRelationship",
11501
12375
  "archivePersona",
11502
12376
  "archivePhoneNumber",
@@ -11523,7 +12397,6 @@ var WORKSPACE_METHOD_NAMES = [
11523
12397
  "checkSiteSlugAvailability",
11524
12398
  "claimDevicePairing",
11525
12399
  "clearConnectionMemberExclusion",
11526
- "clearMemberSwitch",
11527
12400
  "clearTrackedLinkDestinations",
11528
12401
  "clickWorkspaceSupportRequestResource",
11529
12402
  "cloneDataType",
@@ -11546,6 +12419,9 @@ var WORKSPACE_METHOD_NAMES = [
11546
12419
  "createAgent",
11547
12420
  "createApiKey",
11548
12421
  "createAssignment",
12422
+ "bindInstallationSlots",
12423
+ "restoreInstallationForm",
12424
+ "createBundle",
11549
12425
  "createCalendar",
11550
12426
  "createCalendarEvent",
11551
12427
  "createCalendarEventType",
@@ -11594,6 +12470,7 @@ var WORKSPACE_METHOD_NAMES = [
11594
12470
  "createPhoneNumber",
11595
12471
  "createProduct",
11596
12472
  "createRoutine",
12473
+ "createRoutingRule",
11597
12474
  "createScenario",
11598
12475
  "createSignup",
11599
12476
  "createSite",
@@ -11644,6 +12521,7 @@ var WORKSPACE_METHOD_NAMES = [
11644
12521
  "deleteGoal",
11645
12522
  "deleteHubspot",
11646
12523
  "deleteInbox",
12524
+ "deleteJourneyDraft",
11647
12525
  "deleteJourneyNote",
11648
12526
  "deleteMcpServer",
11649
12527
  "deleteMember",
@@ -11661,6 +12539,7 @@ var WORKSPACE_METHOD_NAMES = [
11661
12539
  "deletePlatformApp",
11662
12540
  "deleteProduct",
11663
12541
  "deleteRoutine",
12542
+ "deleteRoutingRule",
11664
12543
  "deleteSalesforce",
11665
12544
  "deleteScenario",
11666
12545
  "deleteSite",
@@ -11693,6 +12572,7 @@ var WORKSPACE_METHOD_NAMES = [
11693
12572
  "dismissAllNotifications",
11694
12573
  "dismissNotification",
11695
12574
  "downloadEmailAttachment",
12575
+ "downloadFileContents",
11696
12576
  "downloadFilesZip",
11697
12577
  "downloadSiteSourceZip",
11698
12578
  "editWorkflowRevisionAsDraft",
@@ -11755,6 +12635,7 @@ var WORKSPACE_METHOD_NAMES = [
11755
12635
  "getAgentTasks",
11756
12636
  "getAgents",
11757
12637
  "getAnonymousResolution",
12638
+ "getAnonymousFormSubmission",
11758
12639
  "getAnonymousResolutions",
11759
12640
  "getApiKeys",
11760
12641
  "getArchiveBlockers",
@@ -11768,6 +12649,12 @@ var WORKSPACE_METHOD_NAMES = [
11768
12649
  "getAvailableActions",
11769
12650
  "getAvailablePhoneNumbers",
11770
12651
  "getAvailableSlots",
12652
+ "getInstallation",
12653
+ "getInstallationReadiness",
12654
+ "getThemeSettingsSchema",
12655
+ "getBundleDraft",
12656
+ "getBundle",
12657
+ "getBundleVersion",
11771
12658
  "getBusinessHoursStatus",
11772
12659
  "getCalendar",
11773
12660
  "getCalendarEvent",
@@ -11780,8 +12667,11 @@ var WORKSPACE_METHOD_NAMES = [
11780
12667
  "getCelContext",
11781
12668
  "getCharlestonTestDeliveryRecipients",
11782
12669
  "getChat",
12670
+ "getChatByUuid",
11783
12671
  "getChatAssignmentTasks",
11784
12672
  "getChatBrowserLiveView",
12673
+ "saveChatBrowserStorage",
12674
+ "clearChatBrowserStorage",
11785
12675
  "getChatCallbacks",
11786
12676
  "getChatEhrWritebackOutcomes",
11787
12677
  "getChatEmails",
@@ -11827,6 +12717,7 @@ var WORKSPACE_METHOD_NAMES = [
11827
12717
  "getDashboardWorkflowAssignmentStats",
11828
12718
  "getDashboards",
11829
12719
  "getDataRecord",
12720
+ "getDataRecordByUuid",
11830
12721
  "getDataRecordChanges",
11831
12722
  "getDataRecordFilter",
11832
12723
  "getDataRecordFilterCount",
@@ -11944,6 +12835,7 @@ var WORKSPACE_METHOD_NAMES = [
11944
12835
  "getMcpServerResources",
11945
12836
  "getMcpServerTools",
11946
12837
  "getMcpServers",
12838
+ "getMemberByUuid",
11947
12839
  "getMemberExperiments",
11948
12840
  "getMemberFieldDefinitions",
11949
12841
  "getMemberFields",
@@ -11975,6 +12867,7 @@ var WORKSPACE_METHOD_NAMES = [
11975
12867
  "getMondayConnectionStatus",
11976
12868
  "getMondayReconciliationMatches",
11977
12869
  "getMondaySyncConfig",
12870
+ "getMondaySyncLogs",
11978
12871
  "getMyCredentials",
11979
12872
  "getMyGivenGrants",
11980
12873
  "getMyReceivedGrants",
@@ -11985,7 +12878,6 @@ var WORKSPACE_METHOD_NAMES = [
11985
12878
  "getOperatorGroup",
11986
12879
  "getOperatorGroups",
11987
12880
  "getOrCreateQualificationForWorkflow",
11988
- "getOwnedMembers",
11989
12881
  "getPage",
11990
12882
  "getPageBySlug",
11991
12883
  "getPersona",
@@ -12015,11 +12907,14 @@ var WORKSPACE_METHOD_NAMES = [
12015
12907
  "getRoutineConfigEvents",
12016
12908
  "getRoutineRuns",
12017
12909
  "getRoutines",
12910
+ "getRoutingRule",
12911
+ "getRoutingRules",
12018
12912
  "getRuleExecutions",
12019
12913
  "getSMSUsageReport",
12020
12914
  "getSalesforceReconciliationMatches",
12021
12915
  "getSalesforceStatus",
12022
12916
  "getSalesforceSyncConfig",
12917
+ "getSalesforceSyncLogs",
12023
12918
  "getScenario",
12024
12919
  "getSite",
12025
12920
  "getSiteByUuid",
@@ -12065,7 +12960,6 @@ var WORKSPACE_METHOD_NAMES = [
12065
12960
  "getWebhookLogs",
12066
12961
  "getWorkflow",
12067
12962
  "getWorkflowOpeningTurnConversionReport",
12068
- "getWorkflowAccessValidation",
12069
12963
  "getWorkflowActivity",
12070
12964
  "getWorkflowConfigValidation",
12071
12965
  "getWorkflowFeedback",
@@ -12073,11 +12967,11 @@ var WORKSPACE_METHOD_NAMES = [
12073
12967
  "getWorkflowDeletionPreview",
12074
12968
  "getWorkflowDiagram",
12075
12969
  "getWorkflowNotes",
12970
+ "getWorkflowOutline",
12076
12971
  "getWorkflowRevision",
12077
12972
  "getWorkflowRevisions",
12078
12973
  "getWorkflowTaskAssignmentStats",
12079
12974
  "getWorkflowTemplates",
12080
- "getWorkflowThumbnailUrl",
12081
12975
  "getWorkflows",
12082
12976
  "getWorkflowsActivityBatch",
12083
12977
  "getWorkspace",
@@ -12096,6 +12990,8 @@ var WORKSPACE_METHOD_NAMES = [
12096
12990
  "getWorkspaceSubscriptions",
12097
12991
  "getWorkspaceSupportRequest",
12098
12992
  "getWorkspaceThemes",
12993
+ "installBundle",
12994
+ "grantBundle",
12099
12995
  "importFromBoard",
12100
12996
  "importHubspotMembers",
12101
12997
  "importMembers",
@@ -12118,13 +13014,23 @@ var WORKSPACE_METHOD_NAMES = [
12118
13014
  "linkMemberToMonday",
12119
13015
  "linkMemberToSalesforce",
12120
13016
  "linkPhoneNumber",
13017
+ "linkUnlinkedSalesforceMembersByIdentity",
12121
13018
  "listAbilities",
13019
+ "listAnonymousFormSubmissions",
12122
13020
  "listAppConnections",
12123
13021
  "listAvailableAppConnections",
13022
+ "listInstallations",
13023
+ "listBundleGrants",
13024
+ "listBundleVersions",
13025
+ "listBundles",
13026
+ "listBundleWorkflowCandidates",
13027
+ "updateBundle",
13028
+ "listBundleInstallations",
12124
13029
  "listConfluencePages",
12125
13030
  "listConfluenceSpaces",
12126
13031
  "listConnectionMemberFieldKeys",
12127
13032
  "listContactPermissions",
13033
+ "revokeBundleGrant",
12128
13034
  "rollbackSiteSource",
12129
13035
  "rotateDocumoFaxCredentials",
12130
13036
  "runQuery",
@@ -12145,7 +13051,11 @@ var WORKSPACE_METHOD_NAMES = [
12145
13051
  "getMetricSeries",
12146
13052
  "computeChatMetrics",
12147
13053
  "listPushSubscriptions",
13054
+ "listResourceWorkflows",
13055
+ "getResourceWorkflow",
13056
+ "getResourceWorkflowRevision",
12148
13057
  "listSalesforceObjects",
13058
+ "listScenarioHealthSummaries",
12149
13059
  "listScenarios",
12150
13060
  "listTestChatRuns",
12151
13061
  "listWidgetDomains",
@@ -12161,15 +13071,18 @@ var WORKSPACE_METHOD_NAMES = [
12161
13071
  "previewRenameFieldSlug",
12162
13072
  "previewImportWorkspace",
12163
13073
  "previewInboxEmail",
13074
+ "preflightBundleInstallation",
12164
13075
  "previewRoutineVoiceReadiness",
12165
- "previewRoutineWorkflowAccess",
12166
13076
  "previewSchedule",
13077
+ "previewRoutingRule",
12167
13078
  "previewTTS",
12168
13079
  "previewTemplate",
12169
13080
  "previewThinkingSound",
12170
13081
  "previewWorkspaceImport",
12171
13082
  "previewWorkspaceImportZip",
12172
13083
  "provisionClientWorkspace",
13084
+ "previewInstallationUpgrade",
13085
+ "publishBundle",
12173
13086
  "publishWorkflowRevision",
12174
13087
  "putJourneyDraft",
12175
13088
  "putJourneyV2Definition",
@@ -12181,11 +13094,16 @@ var WORKSPACE_METHOD_NAMES = [
12181
13094
  "registerPushSubscription",
12182
13095
  "reindexFolder",
12183
13096
  "releasePhoneNumber",
13097
+ "reorderRoutingRules",
12184
13098
  "removeFileRole",
12185
13099
  "removeFolderRole",
12186
13100
  "removeGroupMember",
12187
13101
  "reorderEventRules",
12188
13102
  "reorderMenuItems",
13103
+ "reconcileInstallation",
13104
+ "setInstallationPolicy",
13105
+ "upgradeInstallation",
13106
+ "replaceBundleDraft",
12189
13107
  "replyToEmail",
12190
13108
  "rotateDocumoFaxCredentials",
12191
13109
  "requestPhoneNumber",
@@ -12221,7 +13139,6 @@ var WORKSPACE_METHOD_NAMES = [
12221
13139
  "startSyncRun",
12222
13140
  "startTestChatRun",
12223
13141
  "summarizeChat",
12224
- "switchMember",
12225
13142
  "syncCalendarWithGoogle",
12226
13143
  "syncCalendarWithHealthie",
12227
13144
  "testFhirConnection",
@@ -12234,6 +13151,7 @@ var WORKSPACE_METHOD_NAMES = [
12234
13151
  "unarchiveChat",
12235
13152
  "unarchiveDataType",
12236
13153
  "unarchiveMember",
13154
+ "unarchiveMemberByExternalId",
12237
13155
  "unarchivePersona",
12238
13156
  "unarchiveStep",
12239
13157
  "unarchiveTask",
@@ -12291,6 +13209,7 @@ var WORKSPACE_METHOD_NAMES = [
12291
13209
  "updateJourneyNote",
12292
13210
  "updateMcpServer",
12293
13211
  "updateMember",
13212
+ "updateMemberByExternalId",
12294
13213
  "updateMemberField",
12295
13214
  "updateMemberFilter",
12296
13215
  "updateMemberLabel",
@@ -12307,6 +13226,7 @@ var WORKSPACE_METHOD_NAMES = [
12307
13226
  "updateProduct",
12308
13227
  "updateProject",
12309
13228
  "updateRoutine",
13229
+ "updateRoutingRule",
12310
13230
  "updateSalesforceSyncConfig",
12311
13231
  "resyncSalesforceLinkedMembers",
12312
13232
  "updateScenario",
@@ -12329,7 +13249,6 @@ var WORKSPACE_METHOD_NAMES = [
12329
13249
  "updateWorkspace",
12330
13250
  "updateWorkspaceDefaults",
12331
13251
  "updateWorkspaceInvitationAdmin",
12332
- "updateWorkspaceThemes",
12333
13252
  "upsertDataRecord",
12334
13253
  "upsertWidgetDomain",
12335
13254
  "validateCelExpression",
@@ -12420,6 +13339,9 @@ function bindChatsMethods(target, chats) {
12420
13339
  target.transitionChatInteractionSession = chats.transitionChatInteractionSession.bind(chats);
12421
13340
  target.getChats = chats.getChats.bind(chats);
12422
13341
  target.getChat = chats.getChat.bind(chats);
13342
+ target.getChatByUuid = chats.getChatByUuid.bind(chats);
13343
+ target.saveChatBrowserStorage = chats.saveChatBrowserStorage.bind(chats);
13344
+ target.clearChatBrowserStorage = chats.clearChatBrowserStorage.bind(chats);
12423
13345
  target.getChatBrowserLiveView = chats.getChatBrowserLiveView.bind(chats);
12424
13346
  target.getChatMachineResources = chats.getChatMachineResources.bind(chats);
12425
13347
  target.getCurrentSmsChat = chats.getCurrentSmsChat.bind(chats);
@@ -12556,7 +13478,10 @@ function bindDataTypesMethods(target, dataTypes) {
12556
13478
  target.unarchiveDataType = dataTypes.unarchiveDataType.bind(dataTypes);
12557
13479
  target.cloneDataType = dataTypes.cloneDataType.bind(dataTypes);
12558
13480
  target.getDataRecords = dataTypes.getDataRecords.bind(dataTypes);
13481
+ target.listAnonymousFormSubmissions = dataTypes.listAnonymousFormSubmissions.bind(dataTypes);
13482
+ target.getAnonymousFormSubmission = dataTypes.getAnonymousFormSubmission.bind(dataTypes);
12559
13483
  target.getDataRecord = dataTypes.getDataRecord.bind(dataTypes);
13484
+ target.getDataRecordByUuid = dataTypes.getDataRecordByUuid.bind(dataTypes);
12560
13485
  target.createDataRecord = dataTypes.createDataRecord.bind(dataTypes);
12561
13486
  target.updateDataRecord = dataTypes.updateDataRecord.bind(dataTypes);
12562
13487
  target.deleteDataRecord = dataTypes.deleteDataRecord.bind(dataTypes);
@@ -12595,18 +13520,19 @@ function bindMembersMethods(target, members) {
12595
13520
  target.previewMemberWorkflowVoice = members.previewMemberWorkflowVoice.bind(members);
12596
13521
  target.setMemberWorkflowVoice = members.setMemberWorkflowVoice.bind(members);
12597
13522
  target.clearMemberWorkflowVoice = members.clearMemberWorkflowVoice.bind(members);
12598
- target.getOwnedMembers = members.getOwnedMembers.bind(members);
12599
- target.switchMember = members.switchMember.bind(members);
12600
- target.clearMemberSwitch = members.clearMemberSwitch.bind(members);
12601
13523
  target.updateCurrentMember = members.updateCurrentMember.bind(members);
12602
13524
  target.getWorkspaceMembers = members.getWorkspaceMembers.bind(members);
12603
13525
  target.getWorkspaceMember = members.getWorkspaceMember.bind(members);
13526
+ target.getMemberByUuid = members.getMemberByUuid.bind(members);
12604
13527
  target.getOrgWorkspaceMember = members.getOrgWorkspaceMember.bind(members);
12605
13528
  target.createWorkspaceMember = members.createWorkspaceMember.bind(members);
12606
13529
  target.updateMember = members.updateMember.bind(members);
12607
13530
  target.deleteMember = members.deleteMember.bind(members);
12608
13531
  target.archiveMember = members.archiveMember.bind(members);
12609
13532
  target.unarchiveMember = members.unarchiveMember.bind(members);
13533
+ target.updateMemberByExternalId = members.updateMemberByExternalId.bind(members);
13534
+ target.archiveMemberByExternalId = members.archiveMemberByExternalId.bind(members);
13535
+ target.unarchiveMemberByExternalId = members.unarchiveMemberByExternalId.bind(members);
12610
13536
  target.sendMemberPhoneConfirmation = members.sendMemberPhoneConfirmation.bind(members);
12611
13537
  target.bulkCreateMembers = members.bulkCreateMembers.bind(members);
12612
13538
  target.previewImportMembers = members.previewImportMembers.bind(members);
@@ -12708,7 +13634,6 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
12708
13634
  target.rebuildImportSkippedRules = workspaces.rebuildImportSkippedRules.bind(workspaces);
12709
13635
  target.previewImportWorkspace = workspaces.previewImportWorkspace.bind(workspaces);
12710
13636
  target.getWorkspaceThemes = workspaces.getWorkspaceThemes.bind(workspaces);
12711
- target.updateWorkspaceThemes = workspaces.updateWorkspaceThemes.bind(workspaces);
12712
13637
  target.getWorkspaceBySlug = workspaces.getWorkspace.bind(workspaces);
12713
13638
  target.getWorkspaceScopes = workspaces.getWorkspaceScopes.bind(workspaces);
12714
13639
  target.getUsageDashboard = workspaces.getUsageDashboard.bind(workspaces);
@@ -12757,6 +13682,7 @@ function bindAuthMethods(target, auth, assignments) {
12757
13682
  target.logout = auth.logout.bind(auth);
12758
13683
  target.requestCrossDomainToken = auth.requestCrossDomainToken.bind(auth);
12759
13684
  target.exchangeToken = auth.exchangeToken.bind(auth);
13685
+ target.createRealtimeLoginToken = auth.createRealtimeLoginToken.bind(auth);
12760
13686
  target.getDomainMapping = auth.getDomainMapping.bind(auth);
12761
13687
  target.createSignup = auth.createSignup.bind(auth);
12762
13688
  target.createAccount = auth.emailPasswordSignup.bind(auth);
@@ -12846,6 +13772,7 @@ function bindSitesMethods(target, sites) {
12846
13772
  function bindFilesMethods(target, files) {
12847
13773
  target.getFiles = files.getFiles.bind(files);
12848
13774
  target.getFile = files.getFile.bind(files);
13775
+ target.downloadFileContents = files.downloadFileContents.bind(files);
12849
13776
  target.downloadFilesZip = files.downloadFilesZip.bind(files);
12850
13777
  target.createFile = files.createFile.bind(files);
12851
13778
  target.uploadFile = files.uploadFile.bind(files);
@@ -12918,7 +13845,6 @@ function bindEventsMethods(target, events) {
12918
13845
  target.resetRoutineRuns = events.resetRoutineRuns.bind(events);
12919
13846
  target.previewSchedule = events.previewSchedule.bind(events);
12920
13847
  target.previewRoutineVoiceReadiness = events.previewRoutineVoiceReadiness.bind(events);
12921
- target.previewRoutineWorkflowAccess = events.previewRoutineWorkflowAccess.bind(events);
12922
13848
  }
12923
13849
 
12924
13850
  // src/client/bindings/experiments.ts
@@ -12947,7 +13873,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
12947
13873
  target.getWorkflowActivity = workflows.getWorkflowActivity.bind(workflows);
12948
13874
  target.getWorkflowsActivityBatch = workflows.getWorkflowsActivityBatch.bind(workflows);
12949
13875
  target.getWorkflowDiagram = workflows.getWorkflowDiagram.bind(workflows);
12950
- target.getWorkflowThumbnailUrl = workflows.getWorkflowThumbnailUrl.bind(workflows);
13876
+ target.getWorkflowOutline = workflows.getWorkflowOutline.bind(workflows);
12951
13877
  target.createWorkflow = workflows.createWorkflow.bind(workflows);
12952
13878
  target.updateWorkflow = workflows.updateWorkflow.bind(workflows);
12953
13879
  target.getWorkflowDeletionPreview = workflows.getWorkflowDeletionPreview.bind(workflows);
@@ -12959,7 +13885,6 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
12959
13885
  target.createWorkflowFromTemplate = workflows.createWorkflowFromTemplate.bind(workflows);
12960
13886
  target.getWorkflowTaskAssignmentStats = workflows.getWorkflowTaskAssignmentStats.bind(workflows);
12961
13887
  target.getTaskChats = workflows.getTaskChats.bind(workflows);
12962
- target.getWorkflowAccessValidation = workflows.getWorkflowAccessValidation.bind(workflows);
12963
13888
  target.getWorkflowConfigValidation = workflows.getWorkflowConfigValidation.bind(workflows);
12964
13889
  target.getWorkflowNotes = workflowNotes.getWorkflowNotes.bind(workflowNotes);
12965
13890
  target.createWorkflowNote = workflowNotes.createWorkflowNote.bind(workflowNotes);
@@ -13080,6 +14005,7 @@ function bindToolkitsMethods(target, toolkits, templates, aiModels, customToolki
13080
14005
  target.previewTemplate = templates.previewTemplate.bind(templates);
13081
14006
  target.getVariableRegistry = templates.getVariableRegistry.bind(templates);
13082
14007
  target.getChatModels = aiModels.getChatModels.bind(aiModels);
14008
+ target.getManagerModels = aiModels.getManagerModels.bind(aiModels);
13083
14009
  target.getRealtimeModels = aiModels.getRealtimeModels.bind(aiModels);
13084
14010
  target.getSTTModels = aiModels.getSTTModels.bind(aiModels);
13085
14011
  target.getTTSModels = aiModels.getTTSModels.bind(aiModels);
@@ -13193,6 +14119,7 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
13193
14119
  target.getMondayConnectionBoardColumns = mondayIntegration.getMondayConnectionBoardColumns.bind(mondayIntegration);
13194
14120
  target.getMondayConnectionBoardGroups = mondayIntegration.getMondayConnectionBoardGroups.bind(mondayIntegration);
13195
14121
  target.getMondaySyncConfig = mondayIntegration.getMondaySyncConfig.bind(mondayIntegration);
14122
+ target.getMondaySyncLogs = mondayIntegration.getMondaySyncLogs.bind(mondayIntegration);
13196
14123
  target.updateMondaySyncConfig = mondayIntegration.updateMondaySyncConfig.bind(mondayIntegration);
13197
14124
  target.getLinkedMondayMembers = mondayIntegration.getLinkedMondayMembers.bind(mondayIntegration);
13198
14125
  target.getMondayReconciliationMatches = mondayIntegration.getMondayReconciliationMatches.bind(mondayIntegration);
@@ -13307,10 +14234,12 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
13307
14234
  target.deleteSalesforce = salesforce.deleteSalesforce.bind(salesforce);
13308
14235
  target.getSalesforceReconciliationMatches = salesforce.getSalesforceReconciliationMatches.bind(salesforce);
13309
14236
  target.linkMemberToSalesforce = salesforce.linkMemberToSalesforce.bind(salesforce);
14237
+ target.linkUnlinkedSalesforceMembersByIdentity = salesforce.linkUnlinkedSalesforceMembersByIdentity.bind(salesforce);
13310
14238
  target.bulkLinkMembersToSalesforce = salesforce.bulkLinkMembersToSalesforce.bind(salesforce);
13311
14239
  target.unlinkMemberFromSalesforce = salesforce.unlinkMemberFromSalesforce.bind(salesforce);
13312
14240
  target.getLinkedSalesforceMembers = salesforce.getLinkedSalesforceMembers.bind(salesforce);
13313
14241
  target.getSalesforceSyncConfig = salesforce.getSalesforceSyncConfig.bind(salesforce);
14242
+ target.getSalesforceSyncLogs = salesforce.getSalesforceSyncLogs.bind(salesforce);
13314
14243
  target.updateSalesforceSyncConfig = salesforce.updateSalesforceSyncConfig.bind(salesforce);
13315
14244
  target.resyncSalesforceLinkedMembers = salesforce.resyncSalesforceLinkedMembers.bind(salesforce);
13316
14245
  target.listSalesforceObjects = salesforce.listSalesforceObjects.bind(salesforce);
@@ -13400,10 +14329,15 @@ function bindOrgMethods(target, org) {
13400
14329
  target.getVoiceTrustProducts = org.getVoiceTrustProducts.bind(org);
13401
14330
  target.syncVoiceTrustProducts = org.syncVoiceTrustProducts.bind(org);
13402
14331
  target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
14332
+ target.getOrganizationWorkspace = org.getOrganizationWorkspace.bind(org);
14333
+ target.updateOrganizationWorkspace = org.updateOrganizationWorkspace.bind(org);
13403
14334
  target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
13404
14335
  target.getA2PCampaignConfig = org.getA2PCampaignConfig.bind(org);
13405
14336
  target.updateA2PCampaignConfig = org.updateA2PCampaignConfig.bind(org);
13406
14337
  target.getOrgWorkspaceUsage = org.getOrgWorkspaceUsage.bind(org);
14338
+ target.updateOrganizationMember = org.updateOrganizationMember.bind(org);
14339
+ target.listOrgWebhookEndpoints = org.listOrgWebhookEndpoints.bind(org);
14340
+ target.getOrgWebhookEndpoint = org.getOrgWebhookEndpoint.bind(org);
13407
14341
  }
13408
14342
 
13409
14343
  // src/client/bindings/pronunciations.ts
@@ -13423,12 +14357,59 @@ function bindPronunciationsMethods(target, pronunciations) {
13423
14357
  target.previewPronunciation = pronunciations.previewPronunciation.bind(pronunciations);
13424
14358
  }
13425
14359
 
14360
+ // src/client/bindings/resource-workflows.ts
14361
+ function bindResourceWorkflowsMethods(target, resourceWorkflows) {
14362
+ target.getResourceWorkflow = resourceWorkflows.getResourceWorkflow.bind(resourceWorkflows);
14363
+ target.getResourceWorkflowRevision = resourceWorkflows.getResourceWorkflowRevision.bind(resourceWorkflows);
14364
+ }
14365
+
14366
+ // src/client/bindings/bundles.ts
14367
+ function bindBundlesMethods(target, bundles, resourceWorkflows) {
14368
+ bindResourceWorkflowsMethods(target, resourceWorkflows);
14369
+ target.listPublicBundles = bundles.listPublicBundles.bind(bundles);
14370
+ target.getPublicBundle = bundles.getPublicBundle.bind(bundles);
14371
+ target.updateBundle = bundles.updateBundle.bind(bundles);
14372
+ target.listBundleInstallations = bundles.listBundleInstallations.bind(bundles);
14373
+ target.listBundles = bundles.listBundles.bind(bundles);
14374
+ target.listBundleWorkflowCandidates = bundles.listBundleWorkflowCandidates.bind(bundles);
14375
+ target.createBundle = bundles.createBundle.bind(bundles);
14376
+ target.getBundleDraft = bundles.getBundleDraft.bind(bundles);
14377
+ target.replaceBundleDraft = bundles.replaceBundleDraft.bind(bundles);
14378
+ target.publishBundle = bundles.publishBundle.bind(bundles);
14379
+ target.listBundleVersions = bundles.listBundleVersions.bind(bundles);
14380
+ target.getBundle = bundles.getBundle.bind(bundles);
14381
+ target.getBundleVersion = bundles.getBundleVersion.bind(bundles);
14382
+ target.listBundleGrants = bundles.listBundleGrants.bind(bundles);
14383
+ target.grantBundle = bundles.grantBundle.bind(bundles);
14384
+ target.revokeBundleGrant = bundles.revokeBundleGrant.bind(bundles);
14385
+ target.listResourceWorkflows = resourceWorkflows.listResourceWorkflows.bind(resourceWorkflows);
14386
+ }
14387
+
14388
+ // src/client/bindings/installations.ts
14389
+ function bindInstallationsMethods(target, installations) {
14390
+ target.preflightBundleInstallation = installations.preflightBundleInstallation.bind(installations);
14391
+ target.installBundle = installations.installBundle.bind(installations);
14392
+ target.listInstallations = installations.listInstallations.bind(installations);
14393
+ target.getInstallation = installations.getInstallation.bind(installations);
14394
+ target.getInstallationReadiness = installations.getInstallationReadiness.bind(installations);
14395
+ target.previewInstallationUpgrade = installations.previewInstallationUpgrade.bind(installations);
14396
+ target.upgradeInstallation = installations.upgradeInstallation.bind(installations);
14397
+ target.setInstallationPolicy = installations.setInstallationPolicy.bind(installations);
14398
+ target.unsubscribeInstallation = installations.unsubscribeInstallation.bind(installations);
14399
+ target.restoreInstallationForm = installations.restoreInstallationForm.bind(installations);
14400
+ target.restoreInstallationWorkflowResources = installations.restoreInstallationWorkflowResources.bind(installations);
14401
+ target.bindInstallationSlots = installations.bindInstallationSlots.bind(installations);
14402
+ target.reconcileInstallation = installations.reconcileInstallation.bind(installations);
14403
+ target.getThemeSettingsSchema = installations.getThemeSettingsSchema.bind(installations);
14404
+ }
14405
+
13426
14406
  // src/client/bindings/journeys.ts
13427
14407
  function bindJourneysMethods(target, journeys) {
13428
14408
  target.getJourneys = journeys.getJourneys.bind(journeys);
13429
14409
  target.getJourney = journeys.getJourney.bind(journeys);
13430
14410
  target.getJourneyAuthoring = journeys.getJourneyAuthoring.bind(journeys);
13431
14411
  target.putJourneyDraft = journeys.putJourneyDraft.bind(journeys);
14412
+ target.deleteJourneyDraft = journeys.deleteJourneyDraft.bind(journeys);
13432
14413
  target.putJourneyV2Definition = journeys.putJourneyV2Definition.bind(journeys);
13433
14414
  target.getJourneyV2Validation = journeys.getJourneyV2Validation.bind(journeys);
13434
14415
  target.getJourneyFilterOptions = journeys.getJourneyFilterOptions.bind(journeys);
@@ -13476,6 +14457,7 @@ function bindQualificationsMethods(target, qualifications) {
13476
14457
  target.updateScenario = qualifications.updateScenario.bind(qualifications);
13477
14458
  target.deleteScenario = qualifications.deleteScenario.bind(qualifications);
13478
14459
  target.listTestChatRuns = qualifications.listTestChatRuns.bind(qualifications);
14460
+ target.listScenarioHealthSummaries = qualifications.listScenarioHealthSummaries.bind(qualifications);
13479
14461
  target.getTestChatRun = qualifications.getTestChatRun.bind(qualifications);
13480
14462
  target.startTestChatRun = qualifications.startTestChatRun.bind(qualifications);
13481
14463
  target.evaluateTestChatRun = qualifications.evaluateTestChatRun.bind(qualifications);
@@ -13564,6 +14546,17 @@ function bindSupportRequestMethods(target, supportRequests) {
13564
14546
  target.clickWorkspaceSupportRequestResource = supportRequests.clickWorkspaceSupportRequestResource.bind(supportRequests);
13565
14547
  }
13566
14548
 
14549
+ // src/client/bindings/routing-rules.ts
14550
+ function bindRoutingRulesMethods(target, routingRules) {
14551
+ target.getRoutingRules = routingRules.getRoutingRules.bind(routingRules);
14552
+ target.getRoutingRule = routingRules.getRoutingRule.bind(routingRules);
14553
+ target.createRoutingRule = routingRules.createRoutingRule.bind(routingRules);
14554
+ target.updateRoutingRule = routingRules.updateRoutingRule.bind(routingRules);
14555
+ target.deleteRoutingRule = routingRules.deleteRoutingRule.bind(routingRules);
14556
+ target.reorderRoutingRules = routingRules.reorderRoutingRules.bind(routingRules);
14557
+ target.previewRoutingRule = routingRules.previewRoutingRule.bind(routingRules);
14558
+ }
14559
+
13567
14560
  // src/client/client.ts
13568
14561
  var GravityRailClient = class {
13569
14562
  // WorkspaceInvitations is exposed publicly for backward compatibility
@@ -13589,6 +14582,9 @@ var GravityRailClient = class {
13589
14582
  // Chats API
13590
14583
  getChats;
13591
14584
  getChat;
14585
+ getChatByUuid;
14586
+ saveChatBrowserStorage;
14587
+ clearChatBrowserStorage;
13592
14588
  getChatBrowserLiveView;
13593
14589
  getChatMachineResources;
13594
14590
  getCurrentSmsChat;
@@ -13666,7 +14662,10 @@ var GravityRailClient = class {
13666
14662
  unarchiveDataType;
13667
14663
  cloneDataType;
13668
14664
  getDataRecords;
14665
+ listAnonymousFormSubmissions;
14666
+ getAnonymousFormSubmission;
13669
14667
  getDataRecord;
14668
+ getDataRecordByUuid;
13670
14669
  createDataRecord;
13671
14670
  updateDataRecord;
13672
14671
  deleteDataRecord;
@@ -13692,12 +14691,10 @@ var GravityRailClient = class {
13692
14691
  previewMemberWorkflowVoice;
13693
14692
  setMemberWorkflowVoice;
13694
14693
  clearMemberWorkflowVoice;
13695
- getOwnedMembers;
13696
- switchMember;
13697
- clearMemberSwitch;
13698
14694
  updateCurrentMember;
13699
14695
  getWorkspaceMembers;
13700
14696
  getWorkspaceMember;
14697
+ getMemberByUuid;
13701
14698
  // Org-scoped, so deliberately absent from WORKSPACE_METHOD_NAMES: that proxy
13702
14699
  // passes a workspace uuid as the first argument.
13703
14700
  getOrgWorkspaceMember;
@@ -13706,6 +14703,9 @@ var GravityRailClient = class {
13706
14703
  deleteMember;
13707
14704
  archiveMember;
13708
14705
  unarchiveMember;
14706
+ updateMemberByExternalId;
14707
+ archiveMemberByExternalId;
14708
+ unarchiveMemberByExternalId;
13709
14709
  sendMemberPhoneConfirmation;
13710
14710
  bulkCreateMembers;
13711
14711
  previewImportMembers;
@@ -13783,6 +14783,7 @@ var GravityRailClient = class {
13783
14783
  updateScenario;
13784
14784
  deleteScenario;
13785
14785
  listTestChatRuns;
14786
+ listScenarioHealthSummaries;
13786
14787
  getTestChatRun;
13787
14788
  startTestChatRun;
13788
14789
  evaluateTestChatRun;
@@ -13860,6 +14861,7 @@ var GravityRailClient = class {
13860
14861
  getJourney;
13861
14862
  getJourneyAuthoring;
13862
14863
  putJourneyDraft;
14864
+ deleteJourneyDraft;
13863
14865
  putJourneyV2Definition;
13864
14866
  getJourneyV2Validation;
13865
14867
  getJourneyFilterOptions;
@@ -13894,6 +14896,42 @@ var GravityRailClient = class {
13894
14896
  createJourneyNote;
13895
14897
  updateJourneyNote;
13896
14898
  deleteJourneyNote;
14899
+ updateBundle;
14900
+ listBundleInstallations;
14901
+ // Bundles API
14902
+ listPublicBundles;
14903
+ getPublicBundle;
14904
+ listBundles;
14905
+ listBundleWorkflowCandidates;
14906
+ createBundle;
14907
+ getBundleDraft;
14908
+ replaceBundleDraft;
14909
+ publishBundle;
14910
+ listBundleVersions;
14911
+ getBundle;
14912
+ getBundleVersion;
14913
+ listBundleGrants;
14914
+ grantBundle;
14915
+ revokeBundleGrant;
14916
+ listResourceWorkflows;
14917
+ // Resource Workflows API — published Workflow catalog reads
14918
+ getResourceWorkflow;
14919
+ getResourceWorkflowRevision;
14920
+ // Installations API
14921
+ preflightBundleInstallation;
14922
+ installBundle;
14923
+ listInstallations;
14924
+ getInstallation;
14925
+ getInstallationReadiness;
14926
+ previewInstallationUpgrade;
14927
+ upgradeInstallation;
14928
+ setInstallationPolicy;
14929
+ unsubscribeInstallation;
14930
+ bindInstallationSlots;
14931
+ restoreInstallationForm;
14932
+ restoreInstallationWorkflowResources;
14933
+ reconcileInstallation;
14934
+ getThemeSettingsSchema;
13897
14935
  // Experiments API
13898
14936
  getExperiments;
13899
14937
  getExperiment;
@@ -13986,7 +15024,6 @@ var GravityRailClient = class {
13986
15024
  rebuildImportSkippedRules;
13987
15025
  previewImportWorkspace;
13988
15026
  getWorkspaceThemes;
13989
- updateWorkspaceThemes;
13990
15027
  getWorkspaceBySlug;
13991
15028
  getWorkspaceScopes;
13992
15029
  getUsageDashboard;
@@ -14025,10 +15062,15 @@ var GravityRailClient = class {
14025
15062
  getVoiceTrustProducts;
14026
15063
  syncVoiceTrustProducts;
14027
15064
  createOrganizationWorkspace;
15065
+ getOrganizationWorkspace;
15066
+ updateOrganizationWorkspace;
14028
15067
  getOrgBillingCustomer;
14029
15068
  getA2PCampaignConfig;
14030
15069
  updateA2PCampaignConfig;
14031
15070
  getOrgWorkspaceUsage;
15071
+ updateOrganizationMember;
15072
+ listOrgWebhookEndpoints;
15073
+ getOrgWebhookEndpoint;
14032
15074
  getVapidPublicKey;
14033
15075
  registerPushSubscription;
14034
15076
  unregisterPushSubscription;
@@ -14065,6 +15107,7 @@ var GravityRailClient = class {
14065
15107
  logout;
14066
15108
  requestCrossDomainToken;
14067
15109
  exchangeToken;
15110
+ createRealtimeLoginToken;
14068
15111
  getDomainMapping;
14069
15112
  createSignup;
14070
15113
  createAccount;
@@ -14154,6 +15197,7 @@ var GravityRailClient = class {
14154
15197
  updateProject;
14155
15198
  updatePlan;
14156
15199
  resolveFilePath;
15200
+ downloadFileContents;
14157
15201
  downloadFilesZip;
14158
15202
  createFile;
14159
15203
  uploadFile;
@@ -14214,7 +15258,6 @@ var GravityRailClient = class {
14214
15258
  resetRoutineRuns;
14215
15259
  previewSchedule;
14216
15260
  previewRoutineVoiceReadiness;
14217
- previewRoutineWorkflowAccess;
14218
15261
  // Workflows API
14219
15262
  getWorkflows;
14220
15263
  getWorkflow;
@@ -14223,7 +15266,7 @@ var GravityRailClient = class {
14223
15266
  getWorkflowActivity;
14224
15267
  getWorkflowsActivityBatch;
14225
15268
  getWorkflowDiagram;
14226
- getWorkflowThumbnailUrl;
15269
+ getWorkflowOutline;
14227
15270
  createWorkflow;
14228
15271
  updateWorkflow;
14229
15272
  getWorkflowDeletionPreview;
@@ -14235,7 +15278,6 @@ var GravityRailClient = class {
14235
15278
  createWorkflowFromTemplate;
14236
15279
  getWorkflowTaskAssignmentStats;
14237
15280
  getTaskChats;
14238
- getWorkflowAccessValidation;
14239
15281
  getWorkflowConfigValidation;
14240
15282
  getWorkflowNotes;
14241
15283
  createWorkflowNote;
@@ -14347,6 +15389,7 @@ var GravityRailClient = class {
14347
15389
  previewTemplate;
14348
15390
  getVariableRegistry;
14349
15391
  getChatModels;
15392
+ getManagerModels;
14350
15393
  getRealtimeModels;
14351
15394
  getSTTModels;
14352
15395
  getTTSModels;
@@ -14459,6 +15502,7 @@ var GravityRailClient = class {
14459
15502
  getMondayConnectionBoardColumns;
14460
15503
  getMondayConnectionBoardGroups;
14461
15504
  getMondaySyncConfig;
15505
+ getMondaySyncLogs;
14462
15506
  updateMondaySyncConfig;
14463
15507
  getLinkedMondayMembers;
14464
15508
  getMondayReconciliationMatches;
@@ -14580,10 +15624,12 @@ var GravityRailClient = class {
14580
15624
  deleteSalesforce;
14581
15625
  getSalesforceReconciliationMatches;
14582
15626
  linkMemberToSalesforce;
15627
+ linkUnlinkedSalesforceMembersByIdentity;
14583
15628
  bulkLinkMembersToSalesforce;
14584
15629
  unlinkMemberFromSalesforce;
14585
15630
  getLinkedSalesforceMembers;
14586
15631
  getSalesforceSyncConfig;
15632
+ getSalesforceSyncLogs;
14587
15633
  updateSalesforceSyncConfig;
14588
15634
  resyncSalesforceLinkedMembers;
14589
15635
  listSalesforceObjects;
@@ -14680,6 +15726,14 @@ var GravityRailClient = class {
14680
15726
  closeWorkspaceSupportRequest;
14681
15727
  reopenWorkspaceSupportRequest;
14682
15728
  clickWorkspaceSupportRequestResource;
15729
+ // Routing Rules API
15730
+ getRoutingRules;
15731
+ getRoutingRule;
15732
+ createRoutingRule;
15733
+ updateRoutingRule;
15734
+ deleteRoutingRule;
15735
+ reorderRoutingRules;
15736
+ previewRoutingRule;
14683
15737
  constructor(apiKey, baseUrl, customFetch) {
14684
15738
  const apis = createApiModules(apiKey, baseUrl, customFetch);
14685
15739
  this.apis = apis;
@@ -14701,6 +15755,8 @@ var GravityRailClient = class {
14701
15755
  bindMotdMethods(this, apis.motd);
14702
15756
  bindTrackedLinksMethods(this, apis.trackedLinks);
14703
15757
  bindJourneysMethods(this, apis.journeys);
15758
+ bindBundlesMethods(this, apis.bundles, apis.resourceWorkflows);
15759
+ bindInstallationsMethods(this, apis.installations);
14704
15760
  bindExperimentsMethods(this, apis.experiments);
14705
15761
  bindOperatorMethods(this, apis.operatorGroups);
14706
15762
  bindOrgMethods(this, apis.org);
@@ -14754,6 +15810,7 @@ var GravityRailClient = class {
14754
15810
  bindCustomersMethods(this, apis.customers);
14755
15811
  bindResellersMethods(this, apis.resellers);
14756
15812
  bindSupportRequestMethods(this, apis.supportRequests);
15813
+ bindRoutingRulesMethods(this, apis.routingRules);
14757
15814
  }
14758
15815
  /**
14759
15816
  * Return a workspace-scoped client facade.
@@ -14831,32 +15888,6 @@ var GravityRailClient = class {
14831
15888
  }
14832
15889
  });
14833
15890
  }
14834
- /**
14835
- * Set the acting member UUID for member identity switching.
14836
- * When set, all API requests will include the X-Acting-Member header.
14837
- * The backend will validate that the authenticated account owns this member
14838
- * and use it as the effective identity for the request.
14839
- * Propagates to all API modules.
14840
- */
14841
- setActingMember(memberUuid) {
14842
- Object.values(this.apis).forEach((api) => {
14843
- if (typeof api.setActingMember === "function") {
14844
- api.setActingMember(memberUuid);
14845
- }
14846
- });
14847
- }
14848
- /**
14849
- * Get the current acting member UUID.
14850
- * Returns undefined if no member switch is active.
14851
- */
14852
- getActingMember() {
14853
- for (const api of Object.values(this.apis)) {
14854
- if (typeof api.getActingMember === "function") {
14855
- return api.getActingMember();
14856
- }
14857
- }
14858
- return void 0;
14859
- }
14860
15891
  };
14861
15892
 
14862
15893
  // src/workspace-builder/resource.ts
@@ -15908,8 +16939,8 @@ var JourneyV2Builder = class extends WorkspaceBuilderResource {
15908
16939
  *
15909
16940
  * A different rule set from the legacy builder's on purpose. "No incoming
15910
16941
  * edge" has no meaning in a timeline — position is the order — and the v2
15911
- * failure modes are different ones: an action-less touch that is not an
15912
- * explicit wait, and an Ending with no condition.
16942
+ * checks here cover branch shape and Ending conditions. Steps without
16943
+ * actions pass through, with or without a wait.
15913
16944
  */
15914
16945
  validate() {
15915
16946
  const problems = [];
@@ -15918,19 +16949,6 @@ var JourneyV2Builder = class extends WorkspaceBuilderResource {
15918
16949
  `journey '${this.name}' has no touches \u2014 an empty timeline has nothing to execute.`
15919
16950
  );
15920
16951
  }
15921
- const armHeads = new Set(
15922
- this.allRoutes().map((route) => route.touches[0]).filter(Boolean)
15923
- );
15924
- this.allTouches().forEach((touch) => {
15925
- if (touch.hasOutreach) return;
15926
- const wait = touch.options.wait;
15927
- const isFirst = this.touches[0] === touch;
15928
- const isExplicitWait = !isFirst && !armHeads.has(touch) && (wait?.afterDays !== void 0 || !!wait?.when || wait?.filterId !== void 0);
15929
- if (isExplicitWait) return;
15930
- problems.push(
15931
- `touch '${touch.name}' has no JOURNEY_STEP_EXECUTE action \u2014 a member reaching it gets nothing. Add one, or give it a wait so it is an explicit grace period.`
15932
- );
15933
- });
15934
16952
  for (const touch of this.allTouches()) {
15935
16953
  const branch = touch._branch;
15936
16954
  if (!branch) continue;
@@ -15952,13 +16970,6 @@ var JourneyV2Builder = class extends WorkspaceBuilderResource {
15952
16970
  `the Otherwise route of the branch after touch '${touch.name}' is not last; it is taken immediately, so any route after it can never be reached.`
15953
16971
  );
15954
16972
  }
15955
- for (const route of branch.routes) {
15956
- if (!route.touches.length && !route.options.continueAt) {
15957
- problems.push(
15958
- `route '${route.name}' has no target \u2014 give it at least one touch, or a \`continueAt\` naming the touch it continues to.`
15959
- );
15960
- }
15961
- }
15962
16973
  }
15963
16974
  for (const ending of this.endings) {
15964
16975
  if (!ending.when?.trim() && ending.filterId === void 0) {
@@ -16343,34 +17354,6 @@ function buildV2Wait(wait, touchIndex) {
16343
17354
  return { kind: "none", ...extras };
16344
17355
  }
16345
17356
 
16346
- // src/workspace-builder/role-update.ts
16347
- var RoleUpdate = class extends WorkspaceBuilderResource {
16348
- constructor(roleId, workflowIds, dataTypeIds) {
16349
- super();
16350
- this.roleId = roleId;
16351
- this.workflowIds = workflowIds;
16352
- this.dataTypeIds = dataTypeIds;
16353
- }
16354
- roleId;
16355
- workflowIds;
16356
- dataTypeIds;
16357
- planLine() {
16358
- const parts = [];
16359
- if (this.workflowIds) parts.push(`workflows=${JSON.stringify(this.workflowIds)}`);
16360
- if (this.dataTypeIds) parts.push(`dataTypes=${JSON.stringify(this.dataTypeIds)}`);
16361
- return `RoleUpdate: roleId=${this.roleId}${parts.length ? ` (${parts.join(", ")})` : ""}`;
16362
- }
16363
- async apply(client) {
16364
- if (this._existed) return;
16365
- const payload = {};
16366
- if (this.workflowIds) payload.workflowIds = this.workflowIds;
16367
- if (this.dataTypeIds) payload.dataTypeIds = this.dataTypeIds;
16368
- if (Object.keys(payload).length) await client.updateMemberRole(this.roleId, payload);
16369
- this._id = this.roleId;
16370
- this._created = true;
16371
- }
16372
- };
16373
-
16374
17357
  // src/workspace-builder/workflows.ts
16375
17358
  var PERM_KEYS = {
16376
17359
  canRead: "canRead",
@@ -16623,7 +17606,6 @@ var PHASES = /* @__PURE__ */ new Map([
16623
17606
  [AgentBuilder, 1],
16624
17607
  [WorkflowBuilder, 2],
16625
17608
  [TaskBuilder, 3],
16626
- [RoleUpdate, 4],
16627
17609
  [MemberFilterBuilder, 5],
16628
17610
  [RoutineBuilder, 6],
16629
17611
  [NotificationRuleBuilder, 6],
@@ -16645,10 +17627,6 @@ async function collectPages(fetchPage) {
16645
17627
  }
16646
17628
  return all;
16647
17629
  }
16648
- function sameIdSet(left, right) {
16649
- const target = new Set(right);
16650
- return target.size === new Set(left).size && left.every((id) => target.has(id));
16651
- }
16652
17630
  function notificationRuleKey(noticeType, memberId, workflowId) {
16653
17631
  return JSON.stringify([noticeType, memberId, workflowId]);
16654
17632
  }
@@ -16727,11 +17705,6 @@ var WorkspaceBuilder = class {
16727
17705
  this.resources.push(rule);
16728
17706
  return rule;
16729
17707
  }
16730
- roleUpdate(roleId, workflowIds, dataTypeIds) {
16731
- const update = new RoleUpdate(roleId, workflowIds, dataTypeIds);
16732
- this.resources.push(update);
16733
- return update;
16734
- }
16735
17708
  plan() {
16736
17709
  const resources = this.sortedResources();
16737
17710
  writeLine(`
@@ -16992,45 +17965,9 @@ Done! Created ${count} resources.`);
16992
17965
  }
16993
17966
  }
16994
17967
  }
16995
- await this.resolveExistingRoleUpdates(resources);
16996
17968
  await this.resolveExistingWorkflows(resources, workflowNames);
16997
17969
  await this.resolveExistingNotificationRules(resources);
16998
17970
  }
16999
- /**
17000
- * Adopt a role update whose grants the server already has.
17001
- *
17002
- * A role update is a replace-semantics PUT, not a create, so its identity is
17003
- * the role id and "already applied" means the id sets match exactly. Subset
17004
- * would be wrong: `roleUpdate(7, [])` asks to *clear* the role's workflow
17005
- * access, and treating that as satisfied by a role that still has grants
17006
- * would silently skip a real change.
17007
- *
17008
- * Only the fields this update declares are compared — an update that passes
17009
- * `workflowIds` and omits `dataTypeIds` never touches data-type access, so
17010
- * that access cannot make it stale.
17011
- */
17012
- async resolveExistingRoleUpdates(resources) {
17013
- const updates = resources.filter(
17014
- (resource) => resource instanceof RoleUpdate
17015
- );
17016
- if (!updates.length) return;
17017
- const rolesById = new Map(
17018
- (await this.client.getMemberRoles()).map((role) => [role.id, role])
17019
- );
17020
- for (const update of updates) {
17021
- const role = rolesById.get(update.roleId);
17022
- if (!role) continue;
17023
- const workflowsSettled = update.workflowIds === void 0 || sameIdSet(
17024
- update.workflowIds,
17025
- (role.workflowAccess ?? []).map((access) => access.workflowId)
17026
- );
17027
- const dataTypesSettled = update.dataTypeIds === void 0 || sameIdSet(
17028
- update.dataTypeIds,
17029
- (role.dataTypeAccess ?? []).map((access) => access.dataTypeId)
17030
- );
17031
- if (workflowsSettled && dataTypesSettled) update.adopt(role);
17032
- }
17033
- }
17034
17971
  /**
17035
17972
  * Adopt notification rules the server already has.
17036
17973
  *
@@ -17320,7 +18257,6 @@ function assertUniqueJourneyNames(journeys) {
17320
18257
  }
17321
18258
  }
17322
18259
  function resourceKey(resource) {
17323
- if (resource instanceof RoleUpdate) return "roleUpdates";
17324
18260
  if (resource instanceof FormBuilder) return "forms";
17325
18261
  if (resource instanceof MemberLabelBuilder) return "labels";
17326
18262
  if (resource instanceof WorkflowBuilder) return "workflows";
@@ -17444,7 +18380,6 @@ function writeScopeForResource(resource) {
17444
18380
  if (resource instanceof JourneyBuilder || resource instanceof JourneyStepBuilder || resource instanceof JourneyV2Builder) {
17445
18381
  return "journeys:write";
17446
18382
  }
17447
- if (resource instanceof RoleUpdate) return "member_roles:write";
17448
18383
  return null;
17449
18384
  }
17450
18385
  function scopeRetryHint(resource) {
@@ -17523,9 +18458,11 @@ var AbilityTypeSlugs = {
17523
18458
  GOOGLE_DRIVE: "integration:google_drive",
17524
18459
  GOOGLE_SHEETS: "integration:google_sheets",
17525
18460
  CHARLESTON_PMD_PAGING: "integration:charleston_pmd_paging",
18461
+ COSAN_PATHWAYS_SCHEDULING: "integration:cosan_pathways_scheduling",
17526
18462
  // Communication
17527
18463
  PHONE_CALL_TOOLS: "communication:phone_call_tools",
17528
18464
  SEND_SMS: "communication:send_sms",
18465
+ SEND_EMAIL: "communication:send_email",
17529
18466
  SEND_WHATSAPP: "communication:send_whatsapp",
17530
18467
  MEMBER_ACCESS: "communication:member_access",
17531
18468
  AUDIO_PLAYBACK: "communication:audio_playback",
@@ -17540,6 +18477,8 @@ var AbilityTypeSlugs = {
17540
18477
  MANAGE_WORKSPACE: "delegation:manage_workspace",
17541
18478
  // Workflow
17542
18479
  WORKFLOW_RUN: "workflow:run",
18480
+ // Access
18481
+ MEMBER_ROLE_GATE: "access:member_role_gate",
17543
18482
  // Commerce
17544
18483
  RESELLER: "commerce:reseller",
17545
18484
  // System (auto-injected, hidden from users)
@@ -17738,12 +18677,6 @@ var AbilityConfigIssueSeverity = {
17738
18677
  warning: "warning",
17739
18678
  error: "error"
17740
18679
  };
17741
- var WorkflowAccessWarningResourceType = {
17742
- form: "form",
17743
- file: "file",
17744
- folder: "folder",
17745
- calendar: "calendar"
17746
- };
17747
18680
 
17748
18681
  // src/types/generated/workflow.ts
17749
18682
  var WorkflowRoutingMode = {
@@ -17784,7 +18717,8 @@ var ImportSkippedRuleResponseParentKind = {
17784
18717
  var ImportSkippedRuleResponseReasonCode = {
17785
18718
  missing_binding: "missing_binding",
17786
18719
  invalid_event_rule_cel: "invalid_event_rule_cel",
17787
- unresolved_journey_scope: "unresolved_journey_scope"
18720
+ unresolved_journey_scope: "unresolved_journey_scope",
18721
+ missing_source_workflow: "missing_source_workflow"
17788
18722
  };
17789
18723
  var ImportSkippedRuleResponseStatus = {
17790
18724
  outstanding: "outstanding",
@@ -17916,14 +18850,14 @@ function isChatType(value) {
17916
18850
  }
17917
18851
 
17918
18852
  // src/constants/models.ts
17919
- var DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
17920
- var DEFAULT_AGENT_CHAT_MODEL = "openai:chat:gpt-5.6-luna";
18853
+ var DEFAULT_CHAT_MODEL = "openai:chat:gpt-6-luna";
18854
+ var DEFAULT_AGENT_CHAT_MODEL = "openai:chat:gpt-6-luna";
17921
18855
  var DEFAULT_AGENT_REALTIME_MODEL = "xai:realtime:voice-agent-2";
17922
18856
  var DEFAULT_AGENT_REALTIME_MODEL_CONFIG = {
17923
18857
  ttsModel: "native",
17924
18858
  voiceModel: "xai:voice:cosmo"
17925
18859
  };
17926
- var DEFAULT_VOICE_INFERENCE_MODEL = "openai:chat:gpt-5.6-luna";
18860
+ var DEFAULT_VOICE_INFERENCE_MODEL = "openai:chat:gpt-6-luna";
17927
18861
  var DEFAULT_CUSTOM_VOICE_MODEL = "xai:voice:lux";
17928
18862
 
17929
18863
  // src/types/resource-metadata.ts
@@ -18055,6 +18989,14 @@ var ActivityWindowBasis = {
18055
18989
  absolute: "absolute",
18056
18990
  workspace_local: "workspace_local"
18057
18991
  };
18992
+ var FeedCursorRejection = {
18993
+ malformed: "malformed",
18994
+ signature: "signature",
18995
+ version: "version",
18996
+ expired: "expired",
18997
+ scope_mismatch: "scope_mismatch",
18998
+ query_mismatch: "query_mismatch"
18999
+ };
18058
19000
 
18059
19001
  // src/types/generated/family.ts
18060
19002
  var ActivityEventFamily = {
@@ -18087,6 +19029,7 @@ var ActivityCapability = {
18087
19029
  "operator:read": "operator:read",
18088
19030
  "org:read": "org:read",
18089
19031
  "phones:read": "phones:read",
19032
+ "records:read": "records:read",
18090
19033
  "workflows:read": "workflows:read",
18091
19034
  "workspace:read": "workspace:read"
18092
19035
  };
@@ -18109,16 +19052,19 @@ var ActivityEventType = {
18109
19052
  chatawaiting_human: "chat.awaiting_human",
18110
19053
  chathuman_replied: "chat.human_replied",
18111
19054
  chatcall_ended: "chat.call_ended",
19055
+ chatsummary: "chat.summary",
18112
19056
  escalationopened: "escalation.opened",
18113
19057
  escalationresolved: "escalation.resolved",
18114
19058
  callstarted: "call.started",
18115
19059
  callcompleted: "call.completed",
18116
19060
  callmissed: "call.missed",
19061
+ callsummary: "call.summary",
18117
19062
  presencewent_online: "presence.went_online",
18118
19063
  presencewent_offline: "presence.went_offline",
18119
19064
  operator_groupmember_added: "operator_group.member_added",
18120
19065
  operator_groupmember_removed: "operator_group.member_removed",
18121
19066
  voicemailreceived: "voicemail.received",
19067
+ voicemailtranscribed: "voicemail.transcribed",
18122
19068
  voicemaillistened: "voicemail.listened",
18123
19069
  routinestarted: "routine.started",
18124
19070
  routinecompleted: "routine.completed",
@@ -18134,7 +19080,9 @@ var ActivityEventType = {
18134
19080
  phone_numberarchived: "phone_number.archived",
18135
19081
  domainlinked: "domain.linked",
18136
19082
  domainverified: "domain.verified",
18137
- configupdated: "config.updated"
19083
+ configupdated: "config.updated",
19084
+ data_recordcreated: "data_record.created",
19085
+ data_recordupdated: "data_record.updated"
18138
19086
  };
18139
19087
  var ActivityVisibility = {
18140
19088
  workspace: "workspace",
@@ -18149,7 +19097,8 @@ var ActorKind = {
18149
19097
  connection: "connection",
18150
19098
  member: "member",
18151
19099
  org_account: "org_account",
18152
- system: "system"
19100
+ system: "system",
19101
+ unattributed: "unattributed"
18153
19102
  };
18154
19103
  var EntityKind = {
18155
19104
  account: "account",
@@ -18181,7 +19130,8 @@ var EntityKind = {
18181
19130
  purchase: "purchase",
18182
19131
  subscription: "subscription",
18183
19132
  data_type: "data_type",
18184
- workspace_config: "workspace_config"
19133
+ workspace_config: "workspace_config",
19134
+ data_record: "data_record"
18185
19135
  };
18186
19136
 
18187
19137
  // src/scopes.ts
@@ -18209,6 +19159,7 @@ var ScopeCategory = /* @__PURE__ */ ((ScopeCategory2) => {
18209
19159
  ScopeCategory2["APPS"] = "apps";
18210
19160
  ScopeCategory2["LABELS"] = "labels";
18211
19161
  ScopeCategory2["ANALYTICS"] = "analytics";
19162
+ ScopeCategory2["ANONYMOUS_SUBMISSIONS"] = "anonymous_submissions";
18212
19163
  ScopeCategory2["OPERATOR"] = "operator";
18213
19164
  ScopeCategory2["EXPORT"] = "export";
18214
19165
  ScopeCategory2["ORG"] = "org";
@@ -18671,6 +19622,14 @@ var SCOPES = {
18671
19622
  description: "View analytics and reports"
18672
19623
  },
18673
19624
  // =========================================================================
19625
+ // ANONYMOUS FORM SUBMISSIONS (read-only: submissions are immutable)
19626
+ // =========================================================================
19627
+ "anonymous_submissions:read": {
19628
+ name: "anonymous_submissions:read",
19629
+ category: "anonymous_submissions" /* ANONYMOUS_SUBMISSIONS */,
19630
+ description: "View what anonymous visitors submitted on anonymous Forms"
19631
+ },
19632
+ // =========================================================================
18674
19633
  // EXPORT
18675
19634
  // =========================================================================
18676
19635
  "export:read": {
@@ -18903,6 +19862,49 @@ var ChatInteractionController = class {
18903
19862
  this.pending = void 0;
18904
19863
  }
18905
19864
  };
19865
+
19866
+ // src/helpers/member-import.ts
19867
+ function toSafeMemberImportPreview(preview) {
19868
+ return {
19869
+ previewPlanToken: preview.previewPlanToken,
19870
+ totalRows: preview.totalRows,
19871
+ summary: preview.summary,
19872
+ rows: preview.rows.map((row) => ({
19873
+ row: row.row,
19874
+ action: row.action,
19875
+ memberId: row.match?.memberId,
19876
+ matchType: row.match?.matchType,
19877
+ conflict: row.conflict ? { code: row.conflict.code, fields: row.conflict.fields } : void 0,
19878
+ proposedChanges: row.proposedChanges,
19879
+ sharedContacts: row.sharedContacts
19880
+ }))
19881
+ };
19882
+ }
19883
+ function toSafeMemberImportSummary(event) {
19884
+ return {
19885
+ total: event.total,
19886
+ created: event.created,
19887
+ updated: event.updated,
19888
+ unchanged: event.unchanged,
19889
+ failed: event.failed,
19890
+ conflicted: event.conflicted,
19891
+ skipped: event.skipped,
19892
+ failedRows: event.failedRows,
19893
+ conflictRows: event.conflictRows,
19894
+ skippedRows: event.skippedRows,
19895
+ conflicts: event.conflicts?.map(({ row, code, fields, member_id }) => ({
19896
+ row,
19897
+ code,
19898
+ fields,
19899
+ memberId: member_id
19900
+ })),
19901
+ updatedMembers: event.updatedMembers?.map(({ row, memberId, changes }) => ({
19902
+ row,
19903
+ memberId,
19904
+ changes
19905
+ }))
19906
+ };
19907
+ }
18906
19908
  // Annotate the CommonJS export names for ESM import in node:
18907
19909
  0 && (module.exports = {
18908
19910
  AGENT_NOTE_ORIGINS,
@@ -18933,6 +19935,8 @@ var ChatInteractionController = class {
18933
19935
  BaseApiClient,
18934
19936
  BuildersApi,
18935
19937
  BulkMemberResultStatus,
19938
+ BundleGrantRequestGranteeType,
19939
+ BundlesApi,
18936
19940
  BusinessIndustry,
18937
19941
  BusinessType,
18938
19942
  CELApi,
@@ -18949,7 +19953,11 @@ var ChatInteractionController = class {
18949
19953
  ChatInteractionController,
18950
19954
  ChatMuteReason,
18951
19955
  ConsentMethod,
19956
+ CreateMemberContactPointRequestContactType,
19957
+ CreateMemberContactPointRequestPurpose,
19958
+ CreateMemberContactPointRequestSharing,
18952
19959
  CriterionType,
19960
+ CrmActivityKind,
18953
19961
  DEFAULT_AGENT_CHAT_MODEL,
18954
19962
  DEFAULT_AGENT_REALTIME_MODEL,
18955
19963
  DEFAULT_AGENT_REALTIME_MODEL_CONFIG,
@@ -18972,10 +19980,12 @@ var ChatInteractionController = class {
18972
19980
  EventRuleObjectType,
18973
19981
  FeatureCategory,
18974
19982
  FeatureVisibility,
19983
+ FeedCursorRejection,
18975
19984
  FhirClientType,
18976
19985
  FhirConnectionState,
18977
19986
  FhirVendor,
18978
19987
  FormBuilder,
19988
+ FormBundleItemRecordScope,
18979
19989
  GravityRailClient,
18980
19990
  ImportSkippedRuleResourceGroupResourceType,
18981
19991
  ImportSkippedRuleResponseNeededResourceTypesItem,
@@ -18984,6 +19994,8 @@ var ChatInteractionController = class {
18984
19994
  ImportSkippedRuleResponseStatus,
18985
19995
  InboundFaxStatusValues,
18986
19996
  IndexStatus,
19997
+ InstallationItemChangeChange,
19998
+ InstallationsApi,
18987
19999
  InvitationStatus,
18988
20000
  JobPosition,
18989
20001
  JourneyBuilder,
@@ -19034,13 +20046,20 @@ var ChatInteractionController = class {
19034
20046
  REALTIME_MODEL_OPENAI_2,
19035
20047
  REALTIME_MODEL_OPENAI_MINI,
19036
20048
  RefResolutionStatus,
20049
+ ReferenceTargetInputKind,
19037
20050
  Region,
19038
20051
  RegistrationIdentifier,
19039
20052
  RelatedMemberRole,
19040
20053
  RelationshipCardinality,
19041
20054
  Resource,
19042
- RoleUpdate,
20055
+ ResourceWorkflowsApi,
20056
+ RevisionHistorySegment,
19043
20057
  RoutineBuilder,
20058
+ RoutingActionType,
20059
+ RoutingAudience,
20060
+ RoutingChannel,
20061
+ RoutingTimeWindow,
20062
+ RunHealthCategory,
19044
20063
  SCOPES,
19045
20064
  SCOPE_PRESETS,
19046
20065
  SMS_DELIVERY_FAILURE_STATUSES,
@@ -19048,9 +20067,18 @@ var ChatInteractionController = class {
19048
20067
  STT_MODEL_DEEPGRAM_FLUX_MULTI,
19049
20068
  STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST,
19050
20069
  STT_MODEL_DEEPGRAM_FLUX_SELFHOST,
20070
+ ScalarTargetInputKind,
20071
+ ScenarioHealthCaption,
20072
+ ScenarioHealthHeadline,
20073
+ ScenarioHealthSampleNote,
20074
+ ScenarioHealthState,
20075
+ ScenarioRunBlocker,
19051
20076
  Scope,
19052
20077
  ScopeCategory,
19053
20078
  ScopeManager,
20079
+ SendingNextStep,
20080
+ SendingStopState,
20081
+ SetInstallationPolicyRequestUpgradePolicy,
19054
20082
  SiteDnsRecordType,
19055
20083
  SupervisorsApi,
19056
20084
  TTS_MODEL_AWS_POLLY_GENERATIVE,
@@ -19066,11 +20094,11 @@ var ChatInteractionController = class {
19066
20094
  UiPromptPresentedKindValues,
19067
20095
  UiPromptResponseKindValues,
19068
20096
  UiPromptResponseStatusValues,
20097
+ UpdateMemberContactPointRequestContactType,
20098
+ UpdateMemberContactPointRequestPurpose,
20099
+ UpdateMemberContactPointRequestSharing,
19069
20100
  WIDGET_SLUGS,
19070
- WORKFLOW_IMPLICIT_USE_SCOPE,
19071
- WorkflowAccessWarningResourceType,
19072
20101
  WorkflowBuilder,
19073
- WorkflowResourceType,
19074
20102
  WorkflowRoutingMode,
19075
20103
  WorkspaceBuilder,
19076
20104
  WorkspaceBuilderResource,
@@ -19110,10 +20138,9 @@ var ChatInteractionController = class {
19110
20138
  isSMSDeliveryFailureStatus,
19111
20139
  parseOrgAuthChallenge,
19112
20140
  requiresAssistantParticipant,
19113
- roleCanUseWorkflow,
19114
- roleImplicitWorkflowUseScope,
19115
- roleWorkflowAccess,
19116
20141
  runWorkspaceScript,
20142
+ toSafeMemberImportPreview,
20143
+ toSafeMemberImportSummary,
19117
20144
  usesBuiltinAssistant,
19118
20145
  validateFeatureDependencies
19119
20146
  });