@gravity-rail/sdk 0.17.0 → 0.18.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.
@@ -1,5 +1,5 @@
1
- import { eb as GravityRailClient } from './client-8xakCsVs.cjs';
2
- import { bW as WorkspaceMemberResponse, aM as DataRecordResponse } from './tasks-Z4GcIqgO.cjs';
1
+ import { eb as GravityRailClient } from './client-B51HZ6zY.cjs';
2
+ import { bW as WorkspaceMemberResponse, aM as DataRecordResponse } from './tasks-1JXJJuG8.cjs';
3
3
  import 'zod';
4
4
 
5
5
  interface OutboundPhoneNumberOption {
package/dist/helpers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { eb as GravityRailClient } from './client-ASnNEN1U.js';
2
- import { bW as WorkspaceMemberResponse, aM as DataRecordResponse } from './tasks-Z4GcIqgO.js';
1
+ import { eb as GravityRailClient } from './client-G5i59XtT.js';
2
+ import { bW as WorkspaceMemberResponse, aM as DataRecordResponse } from './tasks-1JXJJuG8.js';
3
3
  import 'zod';
4
4
 
5
5
  interface OutboundPhoneNumberOption {
package/dist/index.cjs CHANGED
@@ -131,7 +131,8 @@ __export(src_exports, {
131
131
  SMS_DELIVERY_FAILURE_STATUSES: () => SMS_DELIVERY_FAILURE_STATUSES,
132
132
  STT_MODEL_DEEPGRAM_FLUX: () => STT_MODEL_DEEPGRAM_FLUX,
133
133
  STT_MODEL_DEEPGRAM_FLUX_MULTI: () => STT_MODEL_DEEPGRAM_FLUX_MULTI,
134
- STT_MODEL_ELEVENLABS_SCRIBE: () => STT_MODEL_ELEVENLABS_SCRIBE,
134
+ STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST: () => STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST,
135
+ STT_MODEL_DEEPGRAM_FLUX_SELFHOST: () => STT_MODEL_DEEPGRAM_FLUX_SELFHOST,
135
136
  Scope: () => Scope,
136
137
  ScopeCategory: () => ScopeCategory,
137
138
  ScopeManager: () => ScopeManager,
@@ -2077,9 +2078,7 @@ var ChatsApi = class extends BaseApiClient {
2077
2078
  }
2078
2079
  /** Get loaded and revealed skills for a chat. */
2079
2080
  async getChatSkills(wid, chatId) {
2080
- return this.fetch(
2081
- `w/${wid}/chats/${chatId}/skills`
2082
- );
2081
+ return this.fetch(`w/${wid}/chats/${chatId}/skills`);
2083
2082
  }
2084
2083
  /** List built-in skills selectable before a Manager Chat (and on Routine manager tasks). */
2085
2084
  async getManagerSkills(wid) {
@@ -2692,6 +2691,7 @@ var DataTypesApi = class extends BaseApiClient {
2692
2691
  const params = new URLSearchParams();
2693
2692
  if (options?.memberId !== void 0) params.append("member_id", options.memberId.toString());
2694
2693
  if (options?.memberIds?.length) params.append("member_ids", options.memberIds.join(","));
2694
+ if (options?.recordId !== void 0) params.append("record_id", options.recordId.toString());
2695
2695
  if (options?.search) params.append("search", options.search);
2696
2696
  if (options?.searchField) params.append("search_field", options.searchField);
2697
2697
  if (options?.dataRecordFilterId != null) {
@@ -2712,9 +2712,7 @@ var DataTypesApi = class extends BaseApiClient {
2712
2712
  params.append("dataTypeId", options.dataTypeId.toString());
2713
2713
  }
2714
2714
  const qs = params.toString();
2715
- return this.fetch(
2716
- `w/${wid}/data-record-filters${qs ? `?${qs}` : ""}`
2717
- );
2715
+ return this.fetch(`w/${wid}/data-record-filters${qs ? `?${qs}` : ""}`);
2718
2716
  }
2719
2717
  /** Get a single data-record filter by ID. */
2720
2718
  async getDataRecordFilter(wid, filterId) {
@@ -2742,9 +2740,7 @@ var DataTypesApi = class extends BaseApiClient {
2742
2740
  }
2743
2741
  /** Get the count of records matching a saved filter. */
2744
2742
  async getDataRecordFilterCount(wid, filterId) {
2745
- return this.fetch(
2746
- `w/${wid}/data-record-filters/${filterId}/count`
2747
- );
2743
+ return this.fetch(`w/${wid}/data-record-filters/${filterId}/count`);
2748
2744
  }
2749
2745
  /** Get a single data record by ID. */
2750
2746
  async getDataRecord(wid, recordId) {
@@ -3289,6 +3285,27 @@ var EventsApi = class extends BaseApiClient {
3289
3285
  method: "POST"
3290
3286
  });
3291
3287
  }
3288
+ /**
3289
+ * Configuration change history for one routine, newest first.
3290
+ *
3291
+ * Answers "who turned this off, when, and why" — including the
3292
+ * platform-initiated pauses (finite-repeat exhaustion, outbound-safety
3293
+ * runaway auto-pause) that no other surface exposes.
3294
+ *
3295
+ * `transitionsOnly` filters to rows that record a real trigger-gate
3296
+ * transition. Prefer it for a toggle-focused view: a full-form save always
3297
+ * re-sends every field, so unfiltered history includes saves that changed
3298
+ * nothing.
3299
+ */
3300
+ async getRoutineConfigEvents(wid, id, options = {}) {
3301
+ const params = new URLSearchParams();
3302
+ if (options.limit) params.append("limit", options.limit.toString());
3303
+ if (options.beforeId) params.append("before_id", options.beforeId.toString());
3304
+ if (options.transitionsOnly) params.append("transitions_only", "true");
3305
+ return this.fetch(
3306
+ `w/${wid}/routines/${id}/history${params.toString() ? `?${params.toString()}` : ""}`
3307
+ );
3308
+ }
3292
3309
  /** List routine run history with optional filtering by routine and status. */
3293
3310
  async getRoutineRuns(wid, options = {}) {
3294
3311
  const params = new URLSearchParams();
@@ -5144,6 +5161,17 @@ var MembersApi = class extends BaseApiClient {
5144
5161
  }
5145
5162
  };
5146
5163
 
5164
+ // src/api/activity-timeline.ts
5165
+ var ActivityTimelineApi = class extends BaseApiClient {
5166
+ /** One page of activity. Omit `cursor` for a fresh snapshot. */
5167
+ async queryActivityTimeline(wid, request = {}) {
5168
+ return this.fetch(`w/${wid}/activity-timeline/query`, {
5169
+ method: "POST",
5170
+ body: JSON.stringify(request)
5171
+ });
5172
+ }
5173
+ };
5174
+
5147
5175
  // src/api/motd.ts
5148
5176
  var MotdApi = class extends BaseApiClient {
5149
5177
  /**
@@ -6281,6 +6309,7 @@ var PhoneNumbersApi = class extends BaseApiClient {
6281
6309
  if (filters?.inbound !== void 0) params.set("inbound", String(filters.inbound));
6282
6310
  if (filters?.dateFrom) params.set("dateFrom", filters.dateFrom);
6283
6311
  if (filters?.dateTo) params.set("dateTo", filters.dateTo);
6312
+ if (filters?.callId !== void 0) params.set("callId", String(filters.callId));
6284
6313
  return this.fetch(`w/${wid}/calls?${params}`);
6285
6314
  }
6286
6315
  /** List paginated voicemails for a phone number. */
@@ -8237,6 +8266,8 @@ var JourneysApi = class extends BaseApiClient {
8237
8266
  qs.set("currentTaskId", String(params.currentTaskId));
8238
8267
  if (params?.runtimeFailureEdgeId !== void 0)
8239
8268
  qs.set("runtimeFailureEdgeId", String(params.runtimeFailureEdgeId));
8269
+ if (params?.memberJourneyId !== void 0)
8270
+ qs.set("memberJourneyId", String(params.memberJourneyId));
8240
8271
  const query = qs.toString();
8241
8272
  return this.fetch(
8242
8273
  `w/${wid}/journeys/${journeyId}/members${query ? `?${query}` : ""}`
@@ -8273,6 +8304,36 @@ var JourneysApi = class extends BaseApiClient {
8273
8304
  async getMemberJourneys(wid, memberId) {
8274
8305
  return this.fetch(`w/${wid}/journeys/by-member/${memberId}`);
8275
8306
  }
8307
+ /**
8308
+ * Status history for one enrollment — the per-member journey timeline.
8309
+ *
8310
+ * This is where a step that completed having emitted nothing shows up as
8311
+ * `zeroEmission: true` with its reason, instead of being indistinguishable
8312
+ * from a step that sent (GRA-7341). Newest first.
8313
+ *
8314
+ * PHI-safe: identifiers, closed status codes, operator-authored step names,
8315
+ * counts, and timestamps. `entry.reason` is populated only for rows the
8316
+ * server allowlists; every other row reports `reasonRedacted: true`.
8317
+ *
8318
+ * `zeroEmissionOnly` narrows the page to the dropped-send rows. Use it when
8319
+ * that is all you need: without it a busy enrollment can push every
8320
+ * zero-emission row off the first page, and a caller that renders only what
8321
+ * it loaded would report "nothing was dropped" — the exact failure this
8322
+ * endpoint exists to eliminate. `zeroEmissionCount` is unaffected by the
8323
+ * filter and always counts the whole enrollment.
8324
+ */
8325
+ async getEnrollmentStatusLog(wid, journeyId, memberJourneyId, params = {}) {
8326
+ const qs = new URLSearchParams();
8327
+ if (params.page !== void 0) qs.set("page", String(params.page));
8328
+ if (params.pageSize !== void 0) qs.set("pageSize", String(params.pageSize));
8329
+ if (params.zeroEmissionOnly !== void 0) {
8330
+ qs.set("zeroEmissionOnly", String(params.zeroEmissionOnly));
8331
+ }
8332
+ const query = qs.toString();
8333
+ return this.fetch(
8334
+ `w/${wid}/journeys/${journeyId}/enrollments/${memberJourneyId}/status-log` + (query ? `?${query}` : "")
8335
+ );
8336
+ }
8276
8337
  /** List members currently or historically associated with one journey step. */
8277
8338
  async getStepMembers(wid, journeyId, stepUuid, params = {}) {
8278
8339
  const qs = new URLSearchParams();
@@ -9011,18 +9072,20 @@ var MASKED_SECRET_SENTINEL = "__SECRET_SET__";
9011
9072
  // src/types/billing-types.ts
9012
9073
  var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
9013
9074
  WorkspaceFeature2["PHONE"] = "phone";
9075
+ WorkspaceFeature2["A2P_REGISTRATION"] = "a2p_registration";
9014
9076
  WorkspaceFeature2["EMAIL"] = "email";
9015
9077
  WorkspaceFeature2["WHATSAPP"] = "whatsapp";
9016
9078
  WorkspaceFeature2["DISCORD"] = "discord";
9017
9079
  WorkspaceFeature2["SLACK"] = "slack";
9018
9080
  WorkspaceFeature2["TEAMS"] = "teams";
9019
9081
  WorkspaceFeature2["SITES"] = "sites";
9020
- WorkspaceFeature2["FORMS"] = "forms";
9021
9082
  WorkspaceFeature2["MAPS"] = "maps";
9022
9083
  WorkspaceFeature2["BROWSER"] = "browser";
9023
9084
  WorkspaceFeature2["WEB_SEARCH"] = "web_search";
9024
9085
  WorkspaceFeature2["CALENDAR"] = "calendar";
9025
9086
  WorkspaceFeature2["EXPERIMENTS"] = "experiments";
9087
+ WorkspaceFeature2["MAILBOX_USER_INPUT"] = "mailbox_user_input";
9088
+ WorkspaceFeature2["FORKED_TRAJECTORIES"] = "forked_trajectories";
9026
9089
  WorkspaceFeature2["GMAIL"] = "gmail";
9027
9090
  WorkspaceFeature2["GCALENDAR"] = "gcalendar";
9028
9091
  WorkspaceFeature2["GDRIVE"] = "gdrive";
@@ -9039,6 +9102,9 @@ var WorkspaceFeature = /* @__PURE__ */ ((WorkspaceFeature2) => {
9039
9102
  WorkspaceFeature2["CONFLUENCE"] = "confluence";
9040
9103
  WorkspaceFeature2["AGENT_MEMORY"] = "agent_memory";
9041
9104
  WorkspaceFeature2["IMAGE_GENERATION"] = "image_generation";
9105
+ WorkspaceFeature2["STRICT_NATIVE_VOICE"] = "strict_native_voice";
9106
+ WorkspaceFeature2["CHARLESTON_NEPHROLOGY_PMD_PAGING"] = "charleston_nephrology_pmd_paging";
9107
+ WorkspaceFeature2["PATIENTSYNC_TRANSFER"] = "patientsync_transfer";
9042
9108
  return WorkspaceFeature2;
9043
9109
  })(WorkspaceFeature || {});
9044
9110
  var MemberFeature = /* @__PURE__ */ ((MemberFeature2) => {
@@ -9199,8 +9265,9 @@ var REALTIME_MODEL_GEMINI_VERTEX = "google:vertex:gemini-3.1-flash-live";
9199
9265
  var REALTIME_MODEL_NOVA_SONIC = "aws:bedrock:nova-sonic-1";
9200
9266
  var REALTIME_MODEL_CUSTOM = "custom:realtime:composable";
9201
9267
  var STT_MODEL_DEEPGRAM_FLUX = "deepgram:stt:flux-general-en";
9268
+ var STT_MODEL_DEEPGRAM_FLUX_SELFHOST = "deepgram:stt:flux-general-en:selfhost";
9202
9269
  var STT_MODEL_DEEPGRAM_FLUX_MULTI = "deepgram:stt:flux-general-multi";
9203
- var STT_MODEL_ELEVENLABS_SCRIBE = "elevenlabs:stt:scribe_v2_realtime";
9270
+ var STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST = "deepgram:stt:flux-general-multi:selfhost";
9204
9271
  var TTS_MODEL_ELEVENLABS_FLASH = "elevenlabs:tts:eleven_flash_v2_5";
9205
9272
  var TTS_MODEL_ELEVENLABS_TURBO = "elevenlabs:tts:eleven_turbo_v2_5";
9206
9273
  var TTS_MODEL_ELEVENLABS_MULTILINGUAL = "elevenlabs:tts:eleven_multilingual_v2";
@@ -9944,6 +10011,7 @@ function createApiModules(apiKey, baseUrl, customFetch) {
9944
10011
  connectionSync: new ConnectionSyncApi(apiKey, baseUrl, customFetch),
9945
10012
  mcpServers: new McpServersApi(apiKey, baseUrl, customFetch),
9946
10013
  members: new MembersApi(apiKey, baseUrl, customFetch),
10014
+ activityTimeline: new ActivityTimelineApi(apiKey, baseUrl, customFetch),
9947
10015
  motd: new MotdApi(apiKey, baseUrl, customFetch),
9948
10016
  trackedLinks: new TrackedLinksApi(apiKey, baseUrl, customFetch),
9949
10017
  confluence: new ConfluenceApi(apiKey, baseUrl, customFetch),
@@ -10321,6 +10389,7 @@ var WORKSPACE_METHOD_NAMES = [
10321
10389
  "getDocumoFaxSetup",
10322
10390
  "listDocumoFaxes",
10323
10391
  "getDocumoFaxStatus",
10392
+ "getEnrollmentStatusLog",
10324
10393
  "getEventRule",
10325
10394
  "getEventRules",
10326
10395
  "getExperiment",
@@ -10348,6 +10417,7 @@ var WORKSPACE_METHOD_NAMES = [
10348
10417
  "listChatRecordings",
10349
10418
  "previewQuery",
10350
10419
  "publishSiteSource",
10420
+ "queryActivityTimeline",
10351
10421
  "registerDiscordSlashCommands",
10352
10422
  "reopenWorkspaceSupportRequest",
10353
10423
  "resetSiteSource",
@@ -10465,6 +10535,7 @@ var WORKSPACE_METHOD_NAMES = [
10465
10535
  "getRecordingInfo",
10466
10536
  "getResellerWorkspaces",
10467
10537
  "getRoutine",
10538
+ "getRoutineConfigEvents",
10468
10539
  "getRoutineRuns",
10469
10540
  "getRoutines",
10470
10541
  "getRuleExecutions",
@@ -10920,6 +10991,11 @@ function bindDashboardsMethods(target, dashboards) {
10920
10991
  target.getConfigurationHealth = dashboards.getConfigurationHealth.bind(dashboards);
10921
10992
  }
10922
10993
 
10994
+ // src/client/bindings/activity-timeline.ts
10995
+ function bindActivityTimelineMethods(target, activityTimeline) {
10996
+ target.queryActivityTimeline = activityTimeline.queryActivityTimeline.bind(activityTimeline);
10997
+ }
10998
+
10923
10999
  // src/client/bindings/motd.ts
10924
11000
  function bindMotdMethods(target, motd) {
10925
11001
  target.getMotd = motd.getMotd.bind(motd);
@@ -11777,6 +11853,7 @@ function bindJourneysMethods(target, journeys) {
11777
11853
  target.reenrollMember = journeys.reenrollMember.bind(journeys);
11778
11854
  target.deleteEnrollment = journeys.deleteEnrollment.bind(journeys);
11779
11855
  target.getMemberJourneys = journeys.getMemberJourneys.bind(journeys);
11856
+ target.getEnrollmentStatusLog = journeys.getEnrollmentStatusLog.bind(journeys);
11780
11857
  target.getStepMembers = journeys.getStepMembers.bind(journeys);
11781
11858
  target.getStepMemberCounts = journeys.getStepMemberCounts.bind(journeys);
11782
11859
  target.advanceStep = journeys.advanceStep.bind(journeys);
@@ -12114,6 +12191,8 @@ var GravityRailClient = class {
12114
12191
  getDashboardChannelStats;
12115
12192
  getDashboardWorkflowAssignmentStats;
12116
12193
  getConfigurationHealth;
12194
+ // Activity Timeline API
12195
+ queryActivityTimeline;
12117
12196
  // MOTD API
12118
12197
  getMotd;
12119
12198
  // Tracked Links analytics (#10934)
@@ -12149,6 +12228,7 @@ var GravityRailClient = class {
12149
12228
  reenrollMember;
12150
12229
  deleteEnrollment;
12151
12230
  getMemberJourneys;
12231
+ getEnrollmentStatusLog;
12152
12232
  getStepMembers;
12153
12233
  getStepMemberCounts;
12154
12234
  advanceStep;
@@ -12450,6 +12530,7 @@ var GravityRailClient = class {
12450
12530
  updateRoutine;
12451
12531
  deleteRoutine;
12452
12532
  runRoutine;
12533
+ getRoutineConfigEvents;
12453
12534
  getRoutineRuns;
12454
12535
  resetRoutineRuns;
12455
12536
  previewSchedule;
@@ -12915,6 +12996,7 @@ var GravityRailClient = class {
12915
12996
  bindMetricsMethods(this, apis.metrics);
12916
12997
  bindQueriesMethods(this, apis.queries);
12917
12998
  bindDashboardsMethods(this, apis.dashboards);
12999
+ bindActivityTimelineMethods(this, apis.activityTimeline);
12918
13000
  bindMotdMethods(this, apis.motd);
12919
13001
  bindTrackedLinksMethods(this, apis.trackedLinks);
12920
13002
  bindJourneysMethods(this, apis.journeys);
@@ -15403,7 +15485,10 @@ var SCOPES = {
15403
15485
  "workflows:read": {
15404
15486
  name: "workflows:read",
15405
15487
  category: "workflows" /* WORKFLOWS */,
15406
- description: "View workflow definitions"
15488
+ // Object access is separate: listing and opening a specific workflow
15489
+ // additionally require ownership, workflows:admin, a workflow role
15490
+ // association, or an access grant (WorkflowAction.USE).
15491
+ description: "Access the Workflows area and view workflows shared with you"
15407
15492
  },
15408
15493
  "workflows:write": {
15409
15494
  name: "workflows:write",
@@ -16026,7 +16111,8 @@ function getRevisionState(workflow, revision) {
16026
16111
  SMS_DELIVERY_FAILURE_STATUSES,
16027
16112
  STT_MODEL_DEEPGRAM_FLUX,
16028
16113
  STT_MODEL_DEEPGRAM_FLUX_MULTI,
16029
- STT_MODEL_ELEVENLABS_SCRIBE,
16114
+ STT_MODEL_DEEPGRAM_FLUX_MULTI_SELFHOST,
16115
+ STT_MODEL_DEEPGRAM_FLUX_SELFHOST,
16030
16116
  Scope,
16031
16117
  ScopeCategory,
16032
16118
  ScopeManager,