@gravity-rail/sdk 0.16.0 → 0.17.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 (36) hide show
  1. package/dist/{chunk-4B7T6MBH.js → chunk-CEFOCGYO.js} +300 -64
  2. package/dist/chunk-CEFOCGYO.js.map +1 -0
  3. package/dist/{chunk-GP6ICMWF.js → chunk-PJFEGUHM.js} +8 -1
  4. package/dist/chunk-PJFEGUHM.js.map +1 -0
  5. package/dist/{client-3xYGmF3t.d.ts → client-8xakCsVs.d.cts} +1030 -179
  6. package/dist/{client-BhO_UFFz.d.cts → client-ASnNEN1U.d.ts} +1030 -179
  7. package/dist/helpers.cjs +7 -0
  8. package/dist/helpers.cjs.map +1 -1
  9. package/dist/helpers.d.cts +2 -2
  10. package/dist/helpers.d.ts +2 -2
  11. package/dist/helpers.js +1 -1
  12. package/dist/index.cjs +354 -61
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.d.cts +23 -5
  15. package/dist/index.d.ts +23 -5
  16. package/dist/index.js +73 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/internal.cjs +360 -63
  19. package/dist/internal.cjs.map +1 -1
  20. package/dist/internal.d.cts +33 -7
  21. package/dist/internal.d.ts +33 -7
  22. package/dist/internal.js +61 -4
  23. package/dist/internal.js.map +1 -1
  24. package/dist/{revision-state-Dx8gCQIj.d.cts → revision-state-BDsQo_xD.d.cts} +2 -2
  25. package/dist/{revision-state-Dma10N9s.d.ts → revision-state-Cz3mcUHc.d.ts} +2 -2
  26. package/dist/schemas.cjs +170 -216
  27. package/dist/schemas.cjs.map +1 -1
  28. package/dist/schemas.d.cts +2 -2
  29. package/dist/schemas.d.ts +2 -2
  30. package/dist/schemas.js +170 -209
  31. package/dist/schemas.js.map +1 -1
  32. package/dist/{tasks-vupYoJgG.d.cts → tasks-Z4GcIqgO.d.cts} +190 -73
  33. package/dist/{tasks-vupYoJgG.d.ts → tasks-Z4GcIqgO.d.ts} +190 -73
  34. package/package.json +2 -2
  35. package/dist/chunk-4B7T6MBH.js.map +0 -1
  36. package/dist/chunk-GP6ICMWF.js.map +0 -1
package/dist/internal.cjs CHANGED
@@ -49,6 +49,7 @@ __export(internal_exports, {
49
49
  BusinessType: () => BusinessType,
50
50
  CELApi: () => CELApi,
51
51
  CHAT_TYPES: () => CHAT_TYPES,
52
+ CONFIG_HEALTH_FACADE_CHECK_SLUGS: () => CONFIG_HEALTH_FACADE_CHECK_SLUGS,
52
53
  CalendarEventStatus: () => CalendarEventStatus,
53
54
  CalendarPermissionType: () => CalendarPermissionType,
54
55
  CalendarScheduleAvailabilityType: () => CalendarScheduleAvailabilityType,
@@ -117,7 +118,13 @@ __export(internal_exports, {
117
118
  MembersApi: () => MembersApi,
118
119
  MenuItemResponseItemType: () => MenuItemResponseItemType,
119
120
  MenuItemType: () => MenuItemResponseItemType,
120
- MilestonesApi: () => MilestonesApi,
121
+ MergeMemberRolesRequestAccessStrategy: () => MergeMemberRolesRequestAccessStrategy,
122
+ MetricChatTypeEnum: () => MetricChatType,
123
+ MetricDenominatorEnum: () => MetricDenominator,
124
+ MetricKindEnum: () => MetricKind,
125
+ MetricSourceEnum: () => MetricSource,
126
+ MetricTypeEnum: () => MetricType,
127
+ MetricUnitEnum: () => MetricUnit,
121
128
  ModelProvider: () => ModelProvider,
122
129
  ModelType: () => ModelType,
123
130
  MondayIntegrationApi: () => MondayIntegrationApi,
@@ -206,12 +213,15 @@ __export(internal_exports, {
206
213
  WorkflowAccessWarningResourceType: () => WorkflowAccessWarningResourceType,
207
214
  WorkflowNotesApi: () => WorkflowNotesApi,
208
215
  WorkflowResourceType: () => WorkflowAccessWarningResourceType,
216
+ WorkflowRoutingMode: () => WorkflowRoutingMode,
209
217
  WorkflowsApi: () => WorkflowsApi,
210
218
  WorkspaceFeature: () => WorkspaceFeature,
211
219
  WorkspaceInvitationsApi: () => WorkspaceInvitationsApi,
212
220
  WorkspaceProvisionStatus: () => WorkspaceProvisionStatus,
213
221
  WorkspacesApi: () => WorkspacesApi,
222
+ archivedMemberConflictId: () => archivedMemberConflictId,
214
223
  areDependenciesSatisfied: () => areDependenciesSatisfied,
224
+ asIdentifiedMemberContactConflict: () => asIdentifiedMemberContactConflict,
215
225
  bindAccessGrantsMethods: () => bindAccessGrantsMethods,
216
226
  bindAgentTasksMethods: () => bindAgentTasksMethods,
217
227
  bindAgentsMethods: () => bindAgentsMethods,
@@ -231,6 +241,7 @@ __export(internal_exports, {
231
241
  bindIntegrationsMethods: () => bindIntegrationsMethods,
232
242
  bindJourneysMethods: () => bindJourneysMethods,
233
243
  bindMembersMethods: () => bindMembersMethods,
244
+ bindMetricsMethods: () => bindMetricsMethods,
234
245
  bindMotdMethods: () => bindMotdMethods,
235
246
  bindOperatorMethods: () => bindOperatorMethods,
236
247
  bindOrgMethods: () => bindOrgMethods,
@@ -271,9 +282,13 @@ __export(internal_exports, {
271
282
  getTTSProvider: () => getTTSProvider,
272
283
  getVoiceModelId: () => getVoiceModelId,
273
284
  initializeFeatures: () => initializeFeatures,
285
+ isAccountContactConflict: () => isAccountContactConflict,
274
286
  isAgentNoteOrigin: () => isAgentNoteOrigin,
275
287
  isChatType: () => isChatType,
288
+ isConfigHealthFacadeCheckSlug: () => isConfigHealthFacadeCheckSlug,
276
289
  isFeatureAvailable: () => isFeatureAvailable,
290
+ isIdentifiedMemberContactConflict: () => isIdentifiedMemberContactConflict,
291
+ isMemberContactConflict: () => isMemberContactConflict,
277
292
  isPositiveRating: () => isPositiveRating,
278
293
  isRegistryInitialized: () => isRegistryInitialized,
279
294
  isSMSDeliveryFailureStatus: () => isSMSDeliveryFailureStatus,
@@ -444,6 +459,12 @@ var MemberImportPreviewRowAction = {
444
459
  error: "error"
445
460
  };
446
461
 
462
+ // src/types/generated/member_role.ts
463
+ var MergeMemberRolesRequestAccessStrategy = {
464
+ union: "union",
465
+ target_only: "target_only"
466
+ };
467
+
447
468
  // src/types/member-types.ts
448
469
  var MemberType = /* @__PURE__ */ ((MemberType2) => {
449
470
  MemberType2["ANONYMOUS"] = "anonymous";
@@ -452,6 +473,37 @@ var MemberType = /* @__PURE__ */ ((MemberType2) => {
452
473
  MemberType2["AGENT"] = "agent";
453
474
  return MemberType2;
454
475
  })(MemberType || {});
476
+ function structuredErrorDetail(error) {
477
+ if (!error || typeof error !== "object") return null;
478
+ const detail = error.errorData;
479
+ if (!detail || typeof detail !== "object") return null;
480
+ return detail;
481
+ }
482
+ function isMemberContactConflict(error) {
483
+ const d = structuredErrorDetail(error);
484
+ if (!d || d.code !== "MEMBER_CONTACT_CONFLICT") return null;
485
+ if (d.conflictingMemberId !== null && typeof d.conflictingMemberId !== "number") {
486
+ return null;
487
+ }
488
+ return d;
489
+ }
490
+ function isAccountContactConflict(error) {
491
+ const d = structuredErrorDetail(error);
492
+ if (!d || d.code !== "ACCOUNT_CONTACT_CONFLICT") return null;
493
+ return d;
494
+ }
495
+ function archivedMemberConflictId(error) {
496
+ const d = structuredErrorDetail(error);
497
+ if (!d || d.code !== "ARCHIVED_MEMBER_CONFLICT") return null;
498
+ return typeof d.archivedMemberId === "number" ? d.archivedMemberId : null;
499
+ }
500
+ function isIdentifiedMemberContactConflict(conflict) {
501
+ return !!conflict && conflict.conflictingMemberId !== null;
502
+ }
503
+ function asIdentifiedMemberContactConflict(error) {
504
+ const conflict = isMemberContactConflict(error);
505
+ return isIdentifiedMemberContactConflict(conflict) ? conflict : null;
506
+ }
455
507
 
456
508
  // src/types/mcp-server-types.ts
457
509
  var McpServerState = /* @__PURE__ */ ((McpServerState2) => {
@@ -898,6 +950,18 @@ var ConsentMethod = /* @__PURE__ */ ((ConsentMethod2) => {
898
950
  return ConsentMethod2;
899
951
  })(ConsentMethod || {});
900
952
 
953
+ // src/types/config-health-types.ts
954
+ var CONFIG_HEALTH_FACADE_CHECK_SLUGS = [
955
+ "workflow.config",
956
+ "journey.authoring",
957
+ "workflow.access",
958
+ "routine.workflow_access",
959
+ "workspace.validation"
960
+ ];
961
+ function isConfigHealthFacadeCheckSlug(value) {
962
+ return CONFIG_HEALTH_FACADE_CHECK_SLUGS.includes(value);
963
+ }
964
+
901
965
  // src/types/experiment-types.ts
902
966
  function parseExperimentStatCount(value) {
903
967
  return typeof value === "number" ? value : null;
@@ -1152,6 +1216,9 @@ var PhiPostureReasonCode = {
1152
1216
  non_phi_policy_aligned: "non_phi_policy_aligned",
1153
1217
  phi_expected_workspace_prohibited: "phi_expected_workspace_prohibited",
1154
1218
  phi_authorization_not_evaluated: "phi_authorization_not_evaluated",
1219
+ phi_coverage_satisfied: "phi_coverage_satisfied",
1220
+ phi_coverage_missing: "phi_coverage_missing",
1221
+ phi_coverage_expired: "phi_coverage_expired",
1155
1222
  non_phi_org_workspace_permitted: "non_phi_org_workspace_permitted",
1156
1223
  phi_permitted_org_not_expected: "phi_permitted_org_not_expected",
1157
1224
  organization_review_expired: "organization_review_expired",
@@ -1352,6 +1419,36 @@ function isPositiveRating(rating) {
1352
1419
  return rating != null && rating >= POSITIVE_RATING_THRESHOLD;
1353
1420
  }
1354
1421
 
1422
+ // src/types/generated/metric.ts
1423
+ var MetricChatType = {
1424
+ assignment: "assignment",
1425
+ dm: "dm",
1426
+ contributor: "contributor"
1427
+ };
1428
+ var MetricDenominator = {
1429
+ observations: "observations",
1430
+ unique_members: "unique_members"
1431
+ };
1432
+ var MetricKind = {
1433
+ observation: "observation",
1434
+ gauge: "gauge"
1435
+ };
1436
+ var MetricSource = {
1437
+ chat: "chat",
1438
+ member_filter: "member_filter"
1439
+ };
1440
+ var MetricType = {
1441
+ expression: "expression",
1442
+ rubric: "rubric",
1443
+ filter_count: "filter_count"
1444
+ };
1445
+ var MetricUnit = {
1446
+ rate: "rate",
1447
+ score: "score",
1448
+ count: "count",
1449
+ custom: "custom"
1450
+ };
1451
+
1355
1452
  // src/types/generated/site.ts
1356
1453
  var MenuItemResponseItemType = {
1357
1454
  page: "page",
@@ -1369,7 +1466,9 @@ var AbilityConfigIssueCode = {
1369
1466
  invalid_state: "invalid_state",
1370
1467
  feature_disabled: "feature_disabled",
1371
1468
  missing_connection: "missing_connection",
1372
- external_drift: "external_drift"
1469
+ external_drift: "external_drift",
1470
+ missing_task_instructions: "missing_task_instructions",
1471
+ no_qualification_scenarios: "no_qualification_scenarios"
1373
1472
  };
1374
1473
  var AbilityConfigIssueSeverity = {
1375
1474
  warning: "warning",
@@ -1382,6 +1481,12 @@ var WorkflowAccessWarningResourceType = {
1382
1481
  calendar: "calendar"
1383
1482
  };
1384
1483
 
1484
+ // src/types/generated/workflow.ts
1485
+ var WorkflowRoutingMode = {
1486
+ open_world: "open_world",
1487
+ strict: "strict"
1488
+ };
1489
+
1385
1490
  // src/types/generated/pilot_program.ts
1386
1491
  var PilotRelationshipType = {
1387
1492
  direct_pilot: "direct_pilot",
@@ -2267,6 +2372,13 @@ var ApiError = class extends Error {
2267
2372
  * Populated when the backend returns a WorkflowValidationErrorResponse.
2268
2373
  */
2269
2374
  validationErrors;
2375
+ /**
2376
+ * The raw structured `detail` object when the backend returned one (a body
2377
+ * with `error: true` or a `code`). Declared here rather than bolted on with
2378
+ * `as any` at the throw site so consumers can narrow it with a type guard —
2379
+ * see `isMemberContactConflict` in `types/member-types`.
2380
+ */
2381
+ errorData;
2270
2382
  constructor(message, statusCode, errors, validationErrors) {
2271
2383
  super(message);
2272
2384
  this.statusCode = statusCode;
@@ -4108,7 +4220,7 @@ var ChatsApi = class extends BaseApiClient {
4108
4220
  `w/${wid}/chats/${chatId}/skills`
4109
4221
  );
4110
4222
  }
4111
- /** List built-in skills that can be selected before starting a Manager Chat. */
4223
+ /** List built-in skills selectable before a Manager Chat (and on Routine manager tasks). */
4112
4224
  async getManagerSkills(wid) {
4113
4225
  return this.fetch(`w/${wid}/chats/manager/skills`);
4114
4226
  }
@@ -4621,6 +4733,32 @@ var DashboardsApi = class extends BaseApiClient {
4621
4733
  `w/${wid}/dashboards/stats/workflow-assignments`
4622
4734
  );
4623
4735
  }
4736
+ /**
4737
+ * Current saved-configuration health across every family (Workflow
4738
+ * configuration, Journey authoring, Workflow access, Routine → Workflow
4739
+ * access, and the workspace lint).
4740
+ *
4741
+ * Requires ALL of `workflows:read`, `journeys:read`, `automations:read`,
4742
+ * `datatypes:read`, `members:read`, and `member_roles:read` — a pruned
4743
+ * subset would render as "all configuration is healthy".
4744
+ *
4745
+ * `page`/`pageSize` bound the response only; every family is evaluated in
4746
+ * full before the issue list is sliced. `check`/`severity` narrow the issue
4747
+ * list server-side, before pagination — filtering a single page in the
4748
+ * client cannot find a match that lives on a later one. `summary` and
4749
+ * `checks` are always workspace-global.
4750
+ */
4751
+ async getConfigurationHealth(wid, options) {
4752
+ const params = new URLSearchParams();
4753
+ if (options?.page !== void 0) params.append("page", options.page.toString());
4754
+ if (options?.pageSize !== void 0) params.append("pageSize", options.pageSize.toString());
4755
+ if (options?.check !== void 0) params.append("check", options.check);
4756
+ if (options?.severity !== void 0) params.append("severity", options.severity);
4757
+ const query = params.toString();
4758
+ return this.fetch(
4759
+ `w/${wid}/configuration-health${query ? `?${query}` : ""}`
4760
+ );
4761
+ }
4624
4762
  };
4625
4763
 
4626
4764
  // src/api/data-types.ts
@@ -6808,12 +6946,34 @@ var MembersApi = class extends BaseApiClient {
6808
6946
  body: JSON.stringify(memberRole)
6809
6947
  });
6810
6948
  }
6811
- /** Delete a member role. */
6949
+ /** Delete a member role. Default roles (``systemKey`` set) return 403. */
6812
6950
  async deleteMemberRole(wid, id) {
6813
6951
  return this.fetch(`w/${wid}/member-roles/${id}`, {
6814
6952
  method: "DELETE"
6815
6953
  });
6816
6954
  }
6955
+ /**
6956
+ * Describe legacy duplicate default roles in this workspace. Read-only.
6957
+ *
6958
+ * Workspaces seeded by older versions of the product can carry the same
6959
+ * default role under several spellings ("manager" next to "Manager"). This
6960
+ * reports which ones should be merged and exactly how many members and
6961
+ * references each merge would move.
6962
+ */
6963
+ async getMemberRoleCleanupPlan(wid) {
6964
+ return this.fetch(`w/${wid}/member-roles/cleanup-plan`);
6965
+ }
6966
+ /**
6967
+ * Move every member and reference from one role to another, then delete the
6968
+ * source role. Requires `member_roles:admin`. The source cannot be a default
6969
+ * role.
6970
+ */
6971
+ async mergeMemberRoles(wid, request) {
6972
+ return this.fetch(`w/${wid}/member-roles/cleanup/merge`, {
6973
+ method: "POST",
6974
+ body: JSON.stringify(request)
6975
+ });
6976
+ }
6817
6977
  // Import/Export Members API
6818
6978
  /**
6819
6979
  * Read-only preview classifying each CSV row before any write (GRA-5545).
@@ -7116,46 +7276,6 @@ var MembersApi = class extends BaseApiClient {
7116
7276
  }
7117
7277
  };
7118
7278
 
7119
- // src/api/milestones.ts
7120
- var MilestonesApi = class extends BaseApiClient {
7121
- /** List milestones in a workspace with optional pagination and sorting. */
7122
- async getMilestones(wid, options = {}) {
7123
- const params = new URLSearchParams();
7124
- if (options.page) params.append("page", options.page.toString());
7125
- if (options.pageSize) params.append("pageSize", options.pageSize.toString());
7126
- if (options.sortBy) params.append("sortBy", options.sortBy);
7127
- if (options.sortOrder) params.append("sortOrder", options.sortOrder);
7128
- if (options.search) params.append("search", options.search);
7129
- return this.fetch(
7130
- `w/${wid}/milestones${params.toString() ? `?${params.toString()}` : ""}`
7131
- );
7132
- }
7133
- /** Get a single milestone by ID. */
7134
- async getMilestone(wid, id) {
7135
- return this.fetch(`w/${wid}/milestones/${id}`);
7136
- }
7137
- /** Create a new milestone in a workspace. */
7138
- async createMilestone(wid, milestone) {
7139
- return this.fetch(`w/${wid}/milestones`, {
7140
- method: "POST",
7141
- body: JSON.stringify(milestone)
7142
- });
7143
- }
7144
- /** Update an existing milestone with partial data. */
7145
- async updateMilestone(wid, id, milestone) {
7146
- return this.fetch(`w/${wid}/milestones/${id}`, {
7147
- method: "PUT",
7148
- body: JSON.stringify(milestone)
7149
- });
7150
- }
7151
- /** Delete a milestone by ID. */
7152
- async deleteMilestone(wid, id) {
7153
- return this.fetch(`w/${wid}/milestones/${id}`, {
7154
- method: "DELETE"
7155
- });
7156
- }
7157
- };
7158
-
7159
7279
  // src/api/motd.ts
7160
7280
  var MotdApi = class extends BaseApiClient {
7161
7281
  /**
@@ -7341,6 +7461,23 @@ var MondayIntegrationApi = class extends BaseApiClient {
7341
7461
  }
7342
7462
  };
7343
7463
 
7464
+ // src/api/intervention-requests.ts
7465
+ var InterventionRequestsApi = class extends BaseApiClient {
7466
+ /** List intervention requests in a workspace, newest first. */
7467
+ async getInterventionRequests(wid, params = {}) {
7468
+ const query = new URLSearchParams();
7469
+ if (params.kind) query.set("kind", params.kind);
7470
+ if (params.openOnly) query.set("openOnly", "true");
7471
+ if (params.chatId !== void 0) query.set("chatId", String(params.chatId));
7472
+ if (params.unroutedOnly) query.set("unroutedOnly", "true");
7473
+ if (params.limit !== void 0) query.set("limit", String(params.limit));
7474
+ const qs = query.toString();
7475
+ return this.fetch(
7476
+ `w/${wid}/intervention-requests${qs ? `?${qs}` : ""}`
7477
+ );
7478
+ }
7479
+ };
7480
+
7344
7481
  // src/api/notification-rules.ts
7345
7482
  var NotificationRulesApi = class extends BaseApiClient {
7346
7483
  /** List all notification rules in a workspace. */
@@ -7464,6 +7601,41 @@ var OrgApi = class extends BaseApiClient {
7464
7601
  async getCurrentOrgMember(orgIdOrUuid) {
7465
7602
  return this.fetch(`o/${orgIdOrUuid}/me`);
7466
7603
  }
7604
+ /**
7605
+ * Update the settings an org admin owns: name, slug and contact details.
7606
+ *
7607
+ * Deliberately NOT the admin organization update — `primary` and
7608
+ * `enforceCreditLimit` are superuser-only and are not fields on this
7609
+ * endpoint's request model at all.
7610
+ */
7611
+ async updateOrganizationSettings(orgIdOrUuid, data) {
7612
+ return this.fetch(`o/${orgIdOrUuid}`, {
7613
+ method: "PATCH",
7614
+ body: JSON.stringify(data)
7615
+ });
7616
+ }
7617
+ /**
7618
+ * Read this organization's SSO configuration.
7619
+ *
7620
+ * Org-scoped (`org:admin`), unlike the SSO fields on the superuser admin
7621
+ * organization update — an org admin owns their own identity provider.
7622
+ */
7623
+ async getOrgSsoConfig(orgIdOrUuid) {
7624
+ return this.fetch(`o/${orgIdOrUuid}/sso`);
7625
+ }
7626
+ /** Configure this organization's SSO. Requires `org:admin`. */
7627
+ async updateOrgSsoConfig(orgIdOrUuid, data) {
7628
+ return this.fetch(`o/${orgIdOrUuid}/sso`, {
7629
+ method: "PUT",
7630
+ body: JSON.stringify(data)
7631
+ });
7632
+ }
7633
+ /** Remove this organization's SSO configuration. Requires `org:admin`. */
7634
+ async deleteOrgSsoConfig(orgIdOrUuid) {
7635
+ return this.fetch(`o/${orgIdOrUuid}/sso`, {
7636
+ method: "DELETE"
7637
+ });
7638
+ }
7467
7639
  /**
7468
7640
  * Get the billing customer UUID for an organization.
7469
7641
  */
@@ -7584,6 +7756,22 @@ var OrgApi = class extends BaseApiClient {
7584
7756
  async getOrganizationWorkspace(orgIdOrUuid, workspaceUuid) {
7585
7757
  return this.fetch(`o/${orgIdOrUuid}/workspaces/${workspaceUuid}`);
7586
7758
  }
7759
+ /**
7760
+ * Workspace cards for the organization page: identity plus the GLB-side
7761
+ * counts. Any org member may call it — members get the workspaces they
7762
+ * belong to, org:read holders get all of them.
7763
+ */
7764
+ async getOrganizationWorkspaceSummaries(orgIdOrUuid) {
7765
+ return this.fetch(`o/${orgIdOrUuid}/workspaces/summary`);
7766
+ }
7767
+ /**
7768
+ * Workspace-schema aggregates for one card, plus the caller's own member
7769
+ * role. Separate from the list because it opens a session against the
7770
+ * workspace's own schema — each card fetches its own.
7771
+ */
7772
+ async getOrganizationWorkspaceStats(orgIdOrUuid, workspaceUuid) {
7773
+ return this.fetch(`o/${orgIdOrUuid}/workspaces/${workspaceUuid}/stats`);
7774
+ }
7587
7775
  /**
7588
7776
  * Create a workspace in an organization.
7589
7777
  */
@@ -8514,6 +8702,67 @@ var PersonasApi = class extends BaseApiClient {
8514
8702
  }
8515
8703
  };
8516
8704
 
8705
+ // src/api/metrics.ts
8706
+ var MetricsApi = class extends BaseApiClient {
8707
+ /** List metric definitions in the workspace, paginated. */
8708
+ async listMetrics(wid, params) {
8709
+ const q = new URLSearchParams();
8710
+ if (params?.page !== void 0) q.set("page", String(params.page));
8711
+ if (params?.pageSize !== void 0) q.set("pageSize", String(params.pageSize));
8712
+ if (params?.includeArchived !== void 0)
8713
+ q.set("includeArchived", String(params.includeArchived));
8714
+ if (params?.source) q.set("source", params.source);
8715
+ const qs = q.toString() ? `?${q.toString()}` : "";
8716
+ return this.fetch(`w/${wid}/metrics${qs}`);
8717
+ }
8718
+ async getMetric(wid, id) {
8719
+ return this.fetch(`w/${wid}/metrics/${id}`);
8720
+ }
8721
+ async createMetric(wid, data) {
8722
+ return this.fetch(`w/${wid}/metrics`, {
8723
+ method: "POST",
8724
+ body: JSON.stringify(data)
8725
+ });
8726
+ }
8727
+ async updateMetric(wid, id, data) {
8728
+ return this.fetch(`w/${wid}/metrics/${id}`, {
8729
+ method: "PUT",
8730
+ body: JSON.stringify(data)
8731
+ });
8732
+ }
8733
+ /** Soft-archive a metric (observations retained). */
8734
+ async deleteMetric(wid, id) {
8735
+ return this.fetch(`w/${wid}/metrics/${id}`, { method: "DELETE" });
8736
+ }
8737
+ async listMetricObservations(wid, metricId, params) {
8738
+ const q = new URLSearchParams();
8739
+ q.set("start", params.start);
8740
+ q.set("end", params.end);
8741
+ if (params.page !== void 0) q.set("page", String(params.page));
8742
+ if (params.pageSize !== void 0) q.set("pageSize", String(params.pageSize));
8743
+ return this.fetch(
8744
+ `w/${wid}/metrics/${metricId}/observations?${q.toString()}`
8745
+ );
8746
+ }
8747
+ async getMetricSeries(wid, metricId, params) {
8748
+ const q = new URLSearchParams();
8749
+ q.set("start", params.start);
8750
+ q.set("end", params.end);
8751
+ if (params.bucket) q.set("bucket", params.bucket);
8752
+ if (params.aggregation) q.set("aggregation", params.aggregation);
8753
+ return this.fetch(
8754
+ `w/${wid}/metrics/${metricId}/series?${q.toString()}`
8755
+ );
8756
+ }
8757
+ /** On-demand compute of enabled chat-source metrics for one chat. */
8758
+ async computeChatMetrics(wid, data) {
8759
+ return this.fetch(`w/${wid}/metrics/compute-for-chat`, {
8760
+ method: "POST",
8761
+ body: JSON.stringify(data)
8762
+ });
8763
+ }
8764
+ };
8765
+
8517
8766
  // src/api/queries.ts
8518
8767
  var QueriesApi = class extends BaseApiClient {
8519
8768
  /** Queryable namespace: native fields, operators per type, DataType record fields. */
@@ -11153,11 +11402,11 @@ function createApiModules(apiKey, baseUrl, customFetch) {
11153
11402
  connectionSync: new ConnectionSyncApi(apiKey, baseUrl, customFetch),
11154
11403
  mcpServers: new McpServersApi(apiKey, baseUrl, customFetch),
11155
11404
  members: new MembersApi(apiKey, baseUrl, customFetch),
11156
- milestones: new MilestonesApi(apiKey, baseUrl, customFetch),
11157
11405
  motd: new MotdApi(apiKey, baseUrl, customFetch),
11158
11406
  trackedLinks: new TrackedLinksApi(apiKey, baseUrl, customFetch),
11159
11407
  confluence: new ConfluenceApi(apiKey, baseUrl, customFetch),
11160
11408
  mondayIntegration: new MondayIntegrationApi(apiKey, baseUrl, customFetch),
11409
+ interventionRequests: new InterventionRequestsApi(apiKey, baseUrl, customFetch),
11161
11410
  notificationRules: new NotificationRulesApi(apiKey, baseUrl, customFetch),
11162
11411
  oauth: new OAuthApi(apiKey, baseUrl, customFetch),
11163
11412
  operatorGroups: new OperatorApi(apiKey, baseUrl, customFetch),
@@ -11167,6 +11416,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
11167
11416
  pronunciations: new PronunciationsApi(apiKey, baseUrl, customFetch),
11168
11417
  qualifications: new QualificationsApi(apiKey, baseUrl, customFetch),
11169
11418
  personas: new PersonasApi(apiKey, baseUrl, customFetch),
11419
+ metrics: new MetricsApi(apiKey, baseUrl, customFetch),
11170
11420
  queries: new QueriesApi(apiKey, baseUrl, customFetch),
11171
11421
  reports: new ReportsApi(apiKey, baseUrl, customFetch),
11172
11422
  salesforce: new SalesforceApi(apiKey, baseUrl, customFetch),
@@ -11280,7 +11530,6 @@ var WORKSPACE_METHOD_NAMES = [
11280
11530
  "createMemberMemory",
11281
11531
  "createMemberRole",
11282
11532
  "createMenuItem",
11283
- "createMilestone",
11284
11533
  "createNotificationRule",
11285
11534
  "createOperatorGroup",
11286
11535
  "createPage",
@@ -11347,7 +11596,6 @@ var WORKSPACE_METHOD_NAMES = [
11347
11596
  "deleteMemberMemory",
11348
11597
  "deleteMemberRole",
11349
11598
  "deleteMenuItem",
11350
- "deleteMilestone",
11351
11599
  "deleteMondayConnection",
11352
11600
  "deleteNotificationRule",
11353
11601
  "deleteOperatorGroup",
@@ -11498,6 +11746,7 @@ var WORKSPACE_METHOD_NAMES = [
11498
11746
  "getChatsNeedsResponse",
11499
11747
  "getChildThreadMessages",
11500
11748
  "getClientWorkspace",
11749
+ "getConfigurationHealth",
11501
11750
  "getConfluenceStatus",
11502
11751
  "getConnectionSyncCapabilities",
11503
11752
  "getConnectionSyncCheckpoint",
@@ -11624,6 +11873,7 @@ var WORKSPACE_METHOD_NAMES = [
11624
11873
  "getMemberMemory",
11625
11874
  "getMemberRecordCounts",
11626
11875
  "getMemberRole",
11876
+ "getMemberRoleCleanupPlan",
11627
11877
  "getMemberRoleByUuid",
11628
11878
  "getMemberRoles",
11629
11879
  "getMemberSyncLinks",
@@ -11632,8 +11882,6 @@ var WORKSPACE_METHOD_NAMES = [
11632
11882
  "getMembersMessageActivity",
11633
11883
  "getMenuItems",
11634
11884
  "getMessageTiming",
11635
- "getMilestone",
11636
- "getMilestones",
11637
11885
  "getMondayConnectionBoardColumns",
11638
11886
  "getMondayConnectionBoardGroups",
11639
11887
  "getMondayConnectionBoards",
@@ -11796,6 +12044,14 @@ var WORKSPACE_METHOD_NAMES = [
11796
12044
  "listHealthiePatients",
11797
12045
  "listHealthieProviders",
11798
12046
  "listPersonas",
12047
+ "listMetrics",
12048
+ "getMetric",
12049
+ "createMetric",
12050
+ "updateMetric",
12051
+ "deleteMetric",
12052
+ "listMetricObservations",
12053
+ "getMetricSeries",
12054
+ "computeChatMetrics",
11799
12055
  "listPushSubscriptions",
11800
12056
  "listSalesforceObjects",
11801
12057
  "listScenarios",
@@ -11806,6 +12062,7 @@ var WORKSPACE_METHOD_NAMES = [
11806
12062
  "markEmailAsRead",
11807
12063
  "markEmailAsUnread",
11808
12064
  "markNotificationAsRead",
12065
+ "mergeMemberRoles",
11809
12066
  "previewImportMembers",
11810
12067
  "previewImportWorkspace",
11811
12068
  "previewRoutineWorkflowAccess",
@@ -11934,7 +12191,6 @@ var WORKSPACE_METHOD_NAMES = [
11934
12191
  "updateMemberLabel",
11935
12192
  "updateMemberRole",
11936
12193
  "updateMenuItem",
11937
- "updateMilestone",
11938
12194
  "updateMondaySyncConfig",
11939
12195
  "updateNotificationRule",
11940
12196
  "updateOperatorGroup",
@@ -12119,6 +12375,7 @@ function bindDashboardsMethods(target, dashboards) {
12119
12375
  target.deleteDashboard = dashboards.deleteDashboard.bind(dashboards);
12120
12376
  target.getDashboardChannelStats = dashboards.getDashboardChannelStats.bind(dashboards);
12121
12377
  target.getDashboardWorkflowAssignmentStats = dashboards.getDashboardWorkflowAssignmentStats.bind(dashboards);
12378
+ target.getConfigurationHealth = dashboards.getConfigurationHealth.bind(dashboards);
12122
12379
  }
12123
12380
 
12124
12381
  // src/client/bindings/motd.ts
@@ -12539,7 +12796,7 @@ function bindWorkflowsMethods(target, workflows, workflowNotes, voice, superviso
12539
12796
  }
12540
12797
 
12541
12798
  // src/client/bindings/calendars.ts
12542
- function bindCalendarsMethods(target, calendars, milestones) {
12799
+ function bindCalendarsMethods(target, calendars) {
12543
12800
  target.getCalendars = calendars.getCalendars.bind(calendars);
12544
12801
  target.getCalendar = calendars.getCalendar.bind(calendars);
12545
12802
  target.createCalendar = calendars.createCalendar.bind(calendars);
@@ -12571,11 +12828,6 @@ function bindCalendarsMethods(target, calendars, milestones) {
12571
12828
  target.linkCalendarToGoogle = calendars.linkCalendarToGoogle.bind(calendars);
12572
12829
  target.unlinkCalendarFromGoogle = calendars.unlinkCalendarFromGoogle.bind(calendars);
12573
12830
  target.syncCalendarWithGoogle = calendars.syncCalendarWithGoogle.bind(calendars);
12574
- target.getMilestones = milestones.getMilestones.bind(milestones);
12575
- target.getMilestone = milestones.getMilestone.bind(milestones);
12576
- target.createMilestone = milestones.createMilestone.bind(milestones);
12577
- target.updateMilestone = milestones.updateMilestone.bind(milestones);
12578
- target.deleteMilestone = milestones.deleteMilestone.bind(milestones);
12579
12831
  }
12580
12832
 
12581
12833
  // src/client/bindings/communications.ts
@@ -12932,6 +13184,11 @@ function bindOrgMethods(target, org) {
12932
13184
  target.updateBusinessProfile = org.updateBusinessProfile.bind(org);
12933
13185
  target.submitBusinessProfile = org.submitBusinessProfile.bind(org);
12934
13186
  target.cancelBusinessProfile = org.cancelBusinessProfile.bind(org);
13187
+ target.listLegalEntities = org.listLegalEntities.bind(org);
13188
+ target.getLegalEntity = org.getLegalEntity.bind(org);
13189
+ target.createLegalEntity = org.createLegalEntity.bind(org);
13190
+ target.getVoiceTrustProducts = org.getVoiceTrustProducts.bind(org);
13191
+ target.syncVoiceTrustProducts = org.syncVoiceTrustProducts.bind(org);
12935
13192
  target.createOrganizationWorkspace = org.createOrganizationWorkspace.bind(org);
12936
13193
  target.getOrgBillingCustomer = org.getOrgBillingCustomer.bind(org);
12937
13194
  }
@@ -13015,6 +13272,18 @@ function bindPersonasMethods(target, personas) {
13015
13272
  target.deletePersona = personas.deletePersona.bind(personas);
13016
13273
  }
13017
13274
 
13275
+ // src/client/bindings/metrics.ts
13276
+ function bindMetricsMethods(target, metrics) {
13277
+ target.listMetrics = metrics.listMetrics.bind(metrics);
13278
+ target.getMetric = metrics.getMetric.bind(metrics);
13279
+ target.createMetric = metrics.createMetric.bind(metrics);
13280
+ target.updateMetric = metrics.updateMetric.bind(metrics);
13281
+ target.deleteMetric = metrics.deleteMetric.bind(metrics);
13282
+ target.listMetricObservations = metrics.listMetricObservations.bind(metrics);
13283
+ target.getMetricSeries = metrics.getMetricSeries.bind(metrics);
13284
+ target.computeChatMetrics = metrics.computeChatMetrics.bind(metrics);
13285
+ }
13286
+
13018
13287
  // src/client/bindings/queries.ts
13019
13288
  function bindQueriesMethods(target, queries) {
13020
13289
  target.getQueryFields = queries.getQueryFields.bind(queries);
@@ -13223,6 +13492,8 @@ var GravityRailClient = class {
13223
13492
  createMemberRole;
13224
13493
  updateMemberRole;
13225
13494
  deleteMemberRole;
13495
+ getMemberRoleCleanupPlan;
13496
+ mergeMemberRoles;
13226
13497
  // Member Fields
13227
13498
  getMemberFields;
13228
13499
  getMemberFieldDefinitions;
@@ -13283,6 +13554,15 @@ var GravityRailClient = class {
13283
13554
  createPersona;
13284
13555
  updatePersona;
13285
13556
  deletePersona;
13557
+ // Metrics API (customer-defined outcome metrics)
13558
+ listMetrics;
13559
+ getMetric;
13560
+ createMetric;
13561
+ updateMetric;
13562
+ deleteMetric;
13563
+ listMetricObservations;
13564
+ getMetricSeries;
13565
+ computeChatMetrics;
13286
13566
  // Dashboards API
13287
13567
  getDashboards;
13288
13568
  getDashboard;
@@ -13291,6 +13571,7 @@ var GravityRailClient = class {
13291
13571
  deleteDashboard;
13292
13572
  getDashboardChannelStats;
13293
13573
  getDashboardWorkflowAssignmentStats;
13574
+ getConfigurationHealth;
13294
13575
  // MOTD API
13295
13576
  getMotd;
13296
13577
  // Tracked Links analytics (#10934)
@@ -13444,6 +13725,11 @@ var GravityRailClient = class {
13444
13725
  updateBusinessProfile;
13445
13726
  submitBusinessProfile;
13446
13727
  cancelBusinessProfile;
13728
+ listLegalEntities;
13729
+ getLegalEntity;
13730
+ createLegalEntity;
13731
+ getVoiceTrustProducts;
13732
+ syncVoiceTrustProducts;
13447
13733
  createOrganizationWorkspace;
13448
13734
  getOrgBillingCustomer;
13449
13735
  getVapidPublicKey;
@@ -13705,11 +13991,6 @@ var GravityRailClient = class {
13705
13991
  linkCalendarToGoogle;
13706
13992
  unlinkCalendarFromGoogle;
13707
13993
  syncCalendarWithGoogle;
13708
- getMilestones;
13709
- getMilestone;
13710
- createMilestone;
13711
- updateMilestone;
13712
- deleteMilestone;
13713
13994
  // Communications API
13714
13995
  getPhoneNumbers;
13715
13996
  getAvailablePhoneNumbers;
@@ -14089,6 +14370,7 @@ var GravityRailClient = class {
14089
14370
  bindAgentsMethods(this, apis.agents);
14090
14371
  bindQualificationsMethods(this, apis.qualifications);
14091
14372
  bindPersonasMethods(this, apis.personas);
14373
+ bindMetricsMethods(this, apis.metrics);
14092
14374
  bindQueriesMethods(this, apis.queries);
14093
14375
  bindDashboardsMethods(this, apis.dashboards);
14094
14376
  bindMotdMethods(this, apis.motd);
@@ -14105,7 +14387,7 @@ var GravityRailClient = class {
14105
14387
  bindFilesMethods(this, apis.files);
14106
14388
  bindEventsMethods(this, apis.events);
14107
14389
  bindWorkflowsMethods(this, apis.workflows, apis.workflowNotes, apis.voice, apis.supervisors);
14108
- bindCalendarsMethods(this, apis.calendars, apis.milestones);
14390
+ bindCalendarsMethods(this, apis.calendars);
14109
14391
  bindCommunicationsMethods(this, apis.phoneNumbers, apis.inboxes, apis.notificationRules);
14110
14392
  bindToolkitsMethods(
14111
14393
  this,
@@ -14280,6 +14562,7 @@ var GravityRailClient = class {
14280
14562
  BusinessType,
14281
14563
  CELApi,
14282
14564
  CHAT_TYPES,
14565
+ CONFIG_HEALTH_FACADE_CHECK_SLUGS,
14283
14566
  CalendarEventStatus,
14284
14567
  CalendarPermissionType,
14285
14568
  CalendarScheduleAvailabilityType,
@@ -14348,7 +14631,13 @@ var GravityRailClient = class {
14348
14631
  MembersApi,
14349
14632
  MenuItemResponseItemType,
14350
14633
  MenuItemType,
14351
- MilestonesApi,
14634
+ MergeMemberRolesRequestAccessStrategy,
14635
+ MetricChatTypeEnum,
14636
+ MetricDenominatorEnum,
14637
+ MetricKindEnum,
14638
+ MetricSourceEnum,
14639
+ MetricTypeEnum,
14640
+ MetricUnitEnum,
14352
14641
  ModelProvider,
14353
14642
  ModelType,
14354
14643
  MondayIntegrationApi,
@@ -14437,12 +14726,15 @@ var GravityRailClient = class {
14437
14726
  WorkflowAccessWarningResourceType,
14438
14727
  WorkflowNotesApi,
14439
14728
  WorkflowResourceType,
14729
+ WorkflowRoutingMode,
14440
14730
  WorkflowsApi,
14441
14731
  WorkspaceFeature,
14442
14732
  WorkspaceInvitationsApi,
14443
14733
  WorkspaceProvisionStatus,
14444
14734
  WorkspacesApi,
14735
+ archivedMemberConflictId,
14445
14736
  areDependenciesSatisfied,
14737
+ asIdentifiedMemberContactConflict,
14446
14738
  bindAccessGrantsMethods,
14447
14739
  bindAgentTasksMethods,
14448
14740
  bindAgentsMethods,
@@ -14462,6 +14754,7 @@ var GravityRailClient = class {
14462
14754
  bindIntegrationsMethods,
14463
14755
  bindJourneysMethods,
14464
14756
  bindMembersMethods,
14757
+ bindMetricsMethods,
14465
14758
  bindMotdMethods,
14466
14759
  bindOperatorMethods,
14467
14760
  bindOrgMethods,
@@ -14502,9 +14795,13 @@ var GravityRailClient = class {
14502
14795
  getTTSProvider,
14503
14796
  getVoiceModelId,
14504
14797
  initializeFeatures,
14798
+ isAccountContactConflict,
14505
14799
  isAgentNoteOrigin,
14506
14800
  isChatType,
14801
+ isConfigHealthFacadeCheckSlug,
14507
14802
  isFeatureAvailable,
14803
+ isIdentifiedMemberContactConflict,
14804
+ isMemberContactConflict,
14508
14805
  isPositiveRating,
14509
14806
  isRegistryInitialized,
14510
14807
  isSMSDeliveryFailureStatus,