@gravity-rail/cli 3.0.1 → 3.2.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.
@@ -3,7 +3,7 @@ import {
3
3
  getEnvironmentConfig,
4
4
  printTable,
5
5
  resolveNonInteractiveAuth
6
- } from "./chunk-RMZJJR2T.js";
6
+ } from "./chunk-INGVO35B.js";
7
7
  import {
8
8
  AuthRequiredError,
9
9
  CLIError
@@ -817,4 +817,4 @@ export {
817
817
  confirmAccountPhoneVerify,
818
818
  getConciergeChatMessages
819
819
  };
820
- //# sourceMappingURL=chunk-GQB43YPD.js.map
820
+ //# sourceMappingURL=chunk-WBFYLV7Q.js.map
package/dist/cli-utils.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  selectFromList,
31
31
  startCallbackServer,
32
32
  wrapText
33
- } from "./chunk-RMZJJR2T.js";
33
+ } from "./chunk-INGVO35B.js";
34
34
  export {
35
35
  AGUIClient,
36
36
  CALLBACK_PATH,
package/dist/gr.js CHANGED
@@ -3167,7 +3167,7 @@ var init_libphonenumber_js = __esm({
3167
3167
  }
3168
3168
  });
3169
3169
 
3170
- // ../sdk/dist/chunk-LWRMGN4Z.js
3170
+ // ../sdk/dist/chunk-MAPAZORN.js
3171
3171
  function resourceWorkflowsPath(wid, ...segments) {
3172
3172
  const tail = segments.map((segment) => encodeURIComponent(String(segment))).join("/");
3173
3173
  const base = `w/${encodeURIComponent(wid)}/resource-workflows`;
@@ -3773,6 +3773,7 @@ function bindMembersMethods(target, members) {
3773
3773
  }
3774
3774
  function bindWorkspacesMethods(target, workspaces, signupRequests) {
3775
3775
  target.getWorkspaces = workspaces.getWorkspaces.bind(workspaces);
3776
+ target.getWorkspaceOrganizationDirectory = workspaces.getWorkspaceOrganizationDirectory.bind(workspaces);
3776
3777
  target.getOrganizationWorkspacePages = workspaces.getOrganizationWorkspacePages.bind(workspaces);
3777
3778
  target.getDeviceAdmissibleWorkspaces = workspaces.getDeviceAdmissibleWorkspaces.bind(workspaces);
3778
3779
  target.getPublicWorkspaces = workspaces.getPublicWorkspaces.bind(workspaces);
@@ -3789,6 +3790,9 @@ function bindWorkspacesMethods(target, workspaces, signupRequests) {
3789
3790
  target.getBusinessHoursStatus = workspaces.getBusinessHoursStatus.bind(workspaces);
3790
3791
  target.getAvailableWorkspaceFeatures = workspaces.getAvailableWorkspaceFeatures.bind(workspaces);
3791
3792
  target.getWorkspaceNotices = workspaces.getWorkspaceNotices.bind(workspaces);
3793
+ target.getNotificationSubscriptions = workspaces.getNotificationSubscriptions.bind(workspaces);
3794
+ target.updateNotificationSubscription = workspaces.updateNotificationSubscription.bind(workspaces);
3795
+ target.getNotificationAudience = workspaces.getNotificationAudience.bind(workspaces);
3792
3796
  target.getNotifications = workspaces.getNotifications.bind(workspaces);
3793
3797
  target.getNotification = workspaces.getNotification.bind(workspaces);
3794
3798
  target.getUnreadNotificationCount = workspaces.getUnreadNotificationCount.bind(workspaces);
@@ -4450,6 +4454,8 @@ function bindIntegrationsMethods(target, mondayIntegration, discordBots, slackAp
4450
4454
  target.describeSalesforceObject = salesforce.describeSalesforceObject.bind(salesforce);
4451
4455
  target.searchSalesforceRecords = salesforce.searchSalesforceRecords.bind(salesforce);
4452
4456
  target.importSalesforceMembers = salesforce.importSalesforceMembers.bind(salesforce);
4457
+ target.getHubspotBookingReceipt = hubspot.getHubspotBookingReceipt.bind(hubspot);
4458
+ target.releaseHubspotBookingAttempt = hubspot.releaseHubspotBookingAttempt.bind(hubspot);
4453
4459
  target.installHubspot = hubspot.installHubspot.bind(hubspot);
4454
4460
  target.configureHubspot = hubspot.configureHubspot.bind(hubspot);
4455
4461
  target.startHubspotOAuth = hubspot.startHubspotOAuth.bind(hubspot);
@@ -4803,8 +4809,8 @@ function getRevisionState(workflow, revision) {
4803
4809
  };
4804
4810
  }
4805
4811
  var AbilitiesApi, ResourceWorkflowsApi, BundlesApi, InstallationsApi, AccessGrantsApi, AgentTasksApi, AgentsApi, AIModelsApi, ApiKeysApi, AppsApi, AssignmentsApi, VoiceApi, AuthApi, BuildersApi, CalendarsApi, CallsApi, CELApi, ChatsApi, ConfluenceApi, CustomToolkitsApi, DataTypesApi, DiscordBotsApi, SlackAppsApi, EventsApi, FeaturesApi, FhirConnectionsApi, StediApi, InboundFaxStatus, DocumoFaxApi, HealthieApi, FilesApi, InboxesApi, InquiriesApi, AppConnectionsApi, McpServersApi, MemberImportValidationError, MembersApi, MondayIntegrationApi, NotificationRulesApi, OperatorApi, OrgApi, OAuthConnectionsApi, OAuthApi, PhoneNumbersApi, PronunciationsApi, PromptsApi, PersonasApi, QueriesApi, QualificationsApi, ReportsApi, RoutingRulesApi, SalesforceApi, ConnectionSyncApi, HubspotApi, SitesApi, SubscriptionsApi, SupportRequestsApi, CustomersApi, ResellersApi, SupervisorsApi, TasksApi, TemplatesApi, ToolkitsApi, JourneysApi, WorkflowsApi, WorkflowNotesApi, EventRuleObjectType, EventRuleEventType, EventRuleActionType, DriverMode, MEMBER_RELATIONSHIP_KINDS, WorkspaceInvitationsApi, WorkspacesApi, MedicalBillingApi, DashboardsApi, DevicesApi, TeamsAppsApi, ExperimentsApi, PatientSyncConnectionsApi, ClaimMdApi, ActivityApi, MotdApi, InterventionRequestsApi, MetricsApi, DataReportsApi, ProjectsApi, TrackedLinksApi, WORKSPACE_METHOD_NAMES, WORKSPACE_METHOD_NAME_SET, GravityRailClient, WIDGET_SLUGS, CHAT_TYPES, BUILTIN_ASSISTANT_CHAT_TYPES, MEMBER_AGENT_CHAT_TYPES, ActivityGrain, ActivityGroupBy, ActivityOpenItemOrder, ActivityWindowBasis;
4806
- var init_chunk_LWRMGN4Z = __esm({
4807
- "../sdk/dist/chunk-LWRMGN4Z.js"() {
4812
+ var init_chunk_MAPAZORN = __esm({
4813
+ "../sdk/dist/chunk-MAPAZORN.js"() {
4808
4814
  init_chunk_RLFS7O2L();
4809
4815
  init_libphonenumber_js();
4810
4816
  AbilitiesApi = class extends BaseApiClient {
@@ -12575,6 +12581,20 @@ var init_chunk_LWRMGN4Z = __esm({
12575
12581
  }
12576
12582
  };
12577
12583
  HubspotApi = class extends BaseApiClient {
12584
+ async getHubspotBookingReceipt(wid, meetingId) {
12585
+ return this.fetch(
12586
+ `w/${wid}/app-connections/hubspot/booking-deals/${encodeURIComponent(meetingId)}/receipt`
12587
+ );
12588
+ }
12589
+ async releaseHubspotBookingAttempt(wid, meetingId, data) {
12590
+ return this.fetch(
12591
+ `w/${wid}/app-connections/hubspot/booking-deals/${encodeURIComponent(meetingId)}/release`,
12592
+ {
12593
+ method: "POST",
12594
+ body: JSON.stringify(data)
12595
+ }
12596
+ );
12597
+ }
12578
12598
  /**
12579
12599
  * Create the HubSpot connection shell (no credentials yet).
12580
12600
  *
@@ -14003,7 +14023,7 @@ var init_chunk_LWRMGN4Z = __esm({
14003
14023
  body.append("relativePath", relativePath);
14004
14024
  return this.fetch(`w/${wid}/workflows/${id}/knowledge/uploads`, { method: "POST", body });
14005
14025
  }
14006
- /** List all workflows in a workspace, optionally including archived ones. */
14026
+ /** List workflows by archived status; `archived: true` returns only archived Workflows. */
14007
14027
  async getWorkflows(wid, options = {}) {
14008
14028
  const params = new URLSearchParams();
14009
14029
  if (options.archived) params.set("archived", "true");
@@ -14466,6 +14486,7 @@ var init_chunk_LWRMGN4Z = __esm({
14466
14486
  EventRuleActionType2["INVOKE_CUSTOM_TOOL"] = "custom_tool:invoke";
14467
14487
  EventRuleActionType2["MONDAY_UPSERT_ITEM"] = "monday:upsert_item";
14468
14488
  EventRuleActionType2["MONDAY_REFRESH"] = "monday:refresh";
14489
+ EventRuleActionType2["HUBSPOT_CREATE_DEAL_FROM_BOOKING"] = "hubspot:create_deal_from_booking";
14469
14490
  EventRuleActionType2["ASSIGNMENT_CONCLUDE"] = "assignment:conclude";
14470
14491
  EventRuleActionType2["JOURNEY_ENROLL"] = "journey:enroll";
14471
14492
  EventRuleActionType2["SMS_SEND"] = "sms:send";
@@ -14814,6 +14835,12 @@ var init_chunk_LWRMGN4Z = __esm({
14814
14835
  async getWorkspaces(options) {
14815
14836
  return this.fetch(`w/?${workspaceDirectoryParams(options)}`);
14816
14837
  }
14838
+ /** One organization page reached through organization or workspace membership. */
14839
+ async getWorkspaceOrganizationDirectory(options) {
14840
+ return this.fetch(
14841
+ `w/organizations?${workspaceDirectoryParams(options)}`
14842
+ );
14843
+ }
14817
14844
  /**
14818
14845
  * Page 1 of each organization's workspace directory, in one request.
14819
14846
  * Later pages stay on ``getWorkspaces({ organizationUuid, page })``.
@@ -14915,6 +14942,18 @@ var init_chunk_LWRMGN4Z = __esm({
14915
14942
  const url = `w/${wid}/notifications${queryString ? `?${queryString}` : ""}`;
14916
14943
  return this.fetch(url);
14917
14944
  }
14945
+ async getNotificationSubscriptions(wid) {
14946
+ return this.fetch(`w/${wid}/notifications/subscriptions`);
14947
+ }
14948
+ async updateNotificationSubscription(wid, id, enabled) {
14949
+ return this.fetch(`w/${wid}/notifications/subscriptions/${id}`, {
14950
+ method: "PATCH",
14951
+ body: JSON.stringify({ enabled })
14952
+ });
14953
+ }
14954
+ async getNotificationAudience(wid, id) {
14955
+ return this.fetch(`w/${wid}/notifications/audiences/${id}`);
14956
+ }
14918
14957
  /** Get a single notification by ID. */
14919
14958
  async getNotification(wid, id) {
14920
14959
  return this.fetch(`w/${wid}/notifications/${id}`);
@@ -16780,6 +16819,8 @@ var init_chunk_LWRMGN4Z = __esm({
16780
16819
  "getHubspotObjectProperties",
16781
16820
  "getHubspotReconciliationMatches",
16782
16821
  "getHubspotStatus",
16822
+ "getHubspotBookingReceipt",
16823
+ "releaseHubspotBookingAttempt",
16783
16824
  "getHubspotSyncLogs",
16784
16825
  "getHubspotTransformPresets",
16785
16826
  "getICalFeedUrl",
@@ -17711,6 +17752,7 @@ var init_chunk_LWRMGN4Z = __esm({
17711
17752
  inspectPrompt;
17712
17753
  // Workspaces API
17713
17754
  getWorkspaces;
17755
+ getWorkspaceOrganizationDirectory;
17714
17756
  getOrganizationWorkspacePages;
17715
17757
  getDeviceAdmissibleWorkspaces;
17716
17758
  getPublicWorkspaces;
@@ -17727,6 +17769,9 @@ var init_chunk_LWRMGN4Z = __esm({
17727
17769
  getBusinessHoursStatus;
17728
17770
  getAvailableWorkspaceFeatures;
17729
17771
  getWorkspaceNotices;
17772
+ getNotificationSubscriptions;
17773
+ updateNotificationSubscription;
17774
+ getNotificationAudience;
17730
17775
  getNotifications;
17731
17776
  getNotification;
17732
17777
  getUnreadNotificationCount;
@@ -18439,6 +18484,8 @@ var init_chunk_LWRMGN4Z = __esm({
18439
18484
  searchSalesforceRecords;
18440
18485
  importSalesforceMembers;
18441
18486
  // HubSpot API
18487
+ getHubspotBookingReceipt;
18488
+ releaseHubspotBookingAttempt;
18442
18489
  installHubspot;
18443
18490
  configureHubspot;
18444
18491
  startHubspotOAuth;
@@ -18846,7 +18893,7 @@ var init_chunk_6KPGCPGW = __esm({
18846
18893
  var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS, ActivityEventType, EntityKind;
18847
18894
  var init_dist = __esm({
18848
18895
  "../sdk/dist/index.js"() {
18849
- init_chunk_LWRMGN4Z();
18896
+ init_chunk_MAPAZORN();
18850
18897
  init_chunk_D5VNVTUQ();
18851
18898
  init_chunk_6KPGCPGW();
18852
18899
  init_chunk_RLFS7O2L();
@@ -23273,7 +23320,7 @@ var init_package = __esm({
23273
23320
  "package.json"() {
23274
23321
  package_default = {
23275
23322
  name: "@gravity-rail/cli",
23276
- version: "3.0.1",
23323
+ version: "3.2.0",
23277
23324
  description: "Gravity Rail CLI \u2014 manage workspaces from the command line",
23278
23325
  type: "module",
23279
23326
  bin: {
@@ -28550,6 +28597,17 @@ var workflowsDomain = {
28550
28597
  archiveMethod: "archiveWorkflow",
28551
28598
  unarchiveMethod: "unarchiveWorkflow",
28552
28599
  columns: COLUMNS5,
28600
+ // The list hides archived Workflows by default. `--archived` uses the
28601
+ // API's existing `archived` filter so an operator can find a row that
28602
+ // still blocks a phone/inbox archive but no longer appears in the
28603
+ // default listing (#27586). Default listing behavior is unchanged.
28604
+ listArgs: [
28605
+ {
28606
+ name: "archived",
28607
+ description: "List archived workflows instead of active ones",
28608
+ isFlag: true
28609
+ }
28610
+ ],
28553
28611
  // `GET /workflows` is a `PaginatedResponse` (pageSize default 100, max
28554
28612
  // 500 — lib/routes/workspace/workflows/list.py). Without this opt-in the
28555
28613
  // command exposes no `--page` / `--all`, so a caller reading the list
@@ -47363,6 +47421,60 @@ var hubspotDomain = {
47363
47421
  name: "hubspot",
47364
47422
  description: "HubSpot CRM integration",
47365
47423
  commands: [
47424
+ {
47425
+ path: ["hubspot", "booking-deals", "receipt"],
47426
+ description: "Inspect a booking receipt before operator recovery",
47427
+ requiresWorkspace: true,
47428
+ args: [{ name: "meeting-id", description: "HubSpot meeting ID", required: true }],
47429
+ handler: async ({ ctx, workspace, args }) => {
47430
+ outputSingle(
47431
+ await requireAuth(ctx).apiClient.getHubspotBookingReceipt(
47432
+ workspace,
47433
+ requireString(args, "meeting-id")
47434
+ ),
47435
+ ctx
47436
+ );
47437
+ }
47438
+ },
47439
+ {
47440
+ path: ["hubspot", "booking-deals", "release"],
47441
+ description: "Release an uncertain attempt after checking HubSpot and stopping any running attempt. Does not create a deal; replay the booking record afterward.",
47442
+ requiresWorkspace: true,
47443
+ mutates: true,
47444
+ args: [
47445
+ { name: "meeting-id", description: "HubSpot meeting ID", required: true },
47446
+ { name: "portal-id", description: "Inspected receipt portal ID", required: true },
47447
+ { name: "attempt-id", description: "Inspected receipt attempt UUID", required: true },
47448
+ {
47449
+ name: "confirm-no-deal-and-no-running-attempt",
47450
+ description: "Enter yes after verifying both conditions in HubSpot and Gravity Rail",
47451
+ required: true
47452
+ }
47453
+ ],
47454
+ handler: async ({ ctx, workspace, args }) => {
47455
+ if (args["confirm-no-deal-and-no-running-attempt"] !== "yes") {
47456
+ throw new CLIError(
47457
+ "Confirm no existing deal and no running attempt with --confirm-no-deal-and-no-running-attempt yes"
47458
+ );
47459
+ }
47460
+ await requireAuth(ctx).apiClient.releaseHubspotBookingAttempt(
47461
+ workspace,
47462
+ requireString(args, "meeting-id"),
47463
+ {
47464
+ portalId: requireString(args, "portal-id"),
47465
+ attemptId: requireString(args, "attempt-id"),
47466
+ confirmedNoDealAndNoRunningAttempt: true
47467
+ }
47468
+ );
47469
+ outputSingle(
47470
+ {
47471
+ status: "released",
47472
+ nextStep: "Replay the booking record through its record-updated Action"
47473
+ },
47474
+ ctx
47475
+ );
47476
+ }
47477
+ },
47366
47478
  {
47367
47479
  path: ["hubspot", "install"],
47368
47480
  description: "Install HubSpot (setup step 1): create the connection and get its OAuth callback URL",