@gravity-rail/cli 0.33.0 → 0.34.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.
package/dist/gr.js CHANGED
@@ -3230,7 +3230,7 @@ var init_libphonenumber_js = __esm({
3230
3230
  }
3231
3231
  });
3232
3232
 
3233
- // ../sdk/dist/chunk-WDYHAQDY.js
3233
+ // ../sdk/dist/chunk-ON7HBHJA.js
3234
3234
  function sanitizePhoneForBackend(phoneNumber) {
3235
3235
  try {
3236
3236
  let parsed = parsePhoneNumber4(phoneNumber);
@@ -4134,6 +4134,8 @@ function bindCommunicationsMethods(target, phoneNumbers, inboxes, notificationRu
4134
4134
  target.getChatEmails = inboxes.getChatEmails.bind(inboxes);
4135
4135
  target.replyToEmail = inboxes.replyToEmail.bind(inboxes);
4136
4136
  target.sendInboxEmail = inboxes.sendInboxEmail.bind(inboxes);
4137
+ target.previewInboxEmail = inboxes.previewInboxEmail.bind(inboxes);
4138
+ target.previewEmailReply = inboxes.previewEmailReply.bind(inboxes);
4137
4139
  target.getNotificationRules = notificationRules.getNotificationRules.bind(notificationRules);
4138
4140
  target.createNotificationRule = notificationRules.createNotificationRule.bind(notificationRules);
4139
4141
  target.updateNotificationRule = notificationRules.updateNotificationRule.bind(notificationRules);
@@ -4607,8 +4609,8 @@ function getRevisionState(workflow, revision) {
4607
4609
  };
4608
4610
  }
4609
4611
  var AbilitiesApi, AccessGrantsApi, AgentTasksApi, AgentsApi, AIModelsApi, ApiKeysApi, AppsApi, AssignmentsApi, VoiceApi, AuthApi, BuildersApi, CalendarsApi, CallsApi, CELApi, ChatsApi, ConfluenceApi, CustomToolkitsApi, DataTypesApi, DiscordBotsApi, SlackAppsApi, EventsApi, FeaturesApi, FhirConnectionsApi, InboundFaxStatus, DocumoFaxApi, HealthieApi, FilesApi, InboxesApi, InquiriesApi, AppConnectionsApi, McpServersApi, MemberImportValidationError, MembersApi, MondayIntegrationApi, NotificationRulesApi, OperatorApi, OrgApi, OAuthConnectionsApi, OAuthApi, PhoneNumbersApi, PronunciationsApi, PromptsApi, PersonasApi, QueriesApi, QualificationsApi, ReportsApi, SalesforceApi, ConnectionSyncApi, HubspotApi, SitesApi, SubscriptionsApi, SupportRequestsApi, CustomersApi, ResellersApi, SupervisorsApi, TasksApi, TemplatesApi, ToolkitsApi, JourneysApi, WorkflowsApi, WorkflowNotesApi, EventRuleObjectType, EventRuleEventType, EventRuleActionType, DriverMode, WorkspaceInvitationsApi, WorkspacesApi, DashboardsApi, DevicesApi, TeamsAppsApi, ExperimentsApi, PatientSyncConnectionsApi, ActivityApi, MotdApi, InterventionRequestsApi, MetricsApi, 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;
4610
- var init_chunk_WDYHAQDY = __esm({
4611
- "../sdk/dist/chunk-WDYHAQDY.js"() {
4612
+ var init_chunk_ON7HBHJA = __esm({
4613
+ "../sdk/dist/chunk-ON7HBHJA.js"() {
4612
4614
  init_chunk_P2E6LU7I();
4613
4615
  init_libphonenumber_js();
4614
4616
  AbilitiesApi = class extends BaseApiClient {
@@ -8012,6 +8014,32 @@ var init_chunk_WDYHAQDY = __esm({
8012
8014
  body: JSON.stringify(body)
8013
8015
  });
8014
8016
  }
8017
+ /**
8018
+ * Render a compose or `email:send` template draft through the same
8019
+ * outbound body-assembly seam (footer, layout wrapper, markdown fallback)
8020
+ * as sending. Preview excludes delivery-specific MIME transformations,
8021
+ * including inline-image content IDs.
8022
+ */
8023
+ async previewInboxEmail(wid, inboxId, body) {
8024
+ return this.fetch(`w/${wid}/inboxes/${inboxId}/emails/preview`, {
8025
+ method: "POST",
8026
+ body: JSON.stringify(body)
8027
+ });
8028
+ }
8029
+ /**
8030
+ * Render a reply draft, including its quote, through outbound body
8031
+ * assembly. Preview excludes delivery-specific MIME transformations,
8032
+ * including inline-image content IDs.
8033
+ */
8034
+ async previewEmailReply(wid, inboxId, emailId, body) {
8035
+ return this.fetch(
8036
+ `w/${wid}/inboxes/${inboxId}/emails/${emailId}/reply-preview`,
8037
+ {
8038
+ method: "POST",
8039
+ body: JSON.stringify(body)
8040
+ }
8041
+ );
8042
+ }
8015
8043
  /**
8016
8044
  * Make a stored email's sender a Member of this workspace.
8017
8045
  *
@@ -9598,10 +9626,19 @@ var init_chunk_WDYHAQDY = __esm({
9598
9626
  }
9599
9627
  /**
9600
9628
  * Enable custom site routing for a verified org domain.
9629
+ *
9630
+ * Pass `{ childHosting: true }` to enable the domain as a **parent**
9631
+ * instead: it publishes one `*.<domain>` wildcard CNAME, serves nothing
9632
+ * at its own name, and hosts are added beneath it afterwards. The mode
9633
+ * is fixed at enable — disable and re-enable to change it.
9634
+ *
9635
+ * The request always carries a JSON body, `{}` by default: the route
9636
+ * requires one as a CSRF barrier.
9601
9637
  */
9602
- async enableOrgDomainSite(orgIdOrUuid, domainUuid) {
9638
+ async enableOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
9603
9639
  return this.fetch(`o/${orgIdOrUuid}/domains/${domainUuid}/site`, {
9604
- method: "POST"
9640
+ method: "POST",
9641
+ body: JSON.stringify(options)
9605
9642
  });
9606
9643
  }
9607
9644
  /**
@@ -9613,12 +9650,15 @@ var init_chunk_WDYHAQDY = __esm({
9613
9650
  /**
9614
9651
  * Pre-enable DNS check: is the site CNAME resolving to the routing
9615
9652
  * endpoint yet? Pure DNS — consumes no enable budget.
9653
+ *
9654
+ * Pass `{ childHosting: true }` to check the mode you intend to enable
9655
+ * in: the wildcard is probed instead of the domain's own CNAME.
9616
9656
  */
9617
- async preflightOrgDomainSite(orgIdOrUuid, domainUuid) {
9657
+ async preflightOrgDomainSite(orgIdOrUuid, domainUuid, options = {}) {
9618
9658
  return this.fetch(
9619
9659
  `o/${orgIdOrUuid}/domains/${domainUuid}/site/preflight`,
9620
- // Empty JSON body: the route requires one as a CSRF barrier.
9621
- { method: "POST", body: JSON.stringify({}) }
9660
+ // JSON body, `{}` by default: the route requires one as a CSRF barrier.
9661
+ { method: "POST", body: JSON.stringify(options) }
9622
9662
  );
9623
9663
  }
9624
9664
  /**
@@ -9630,6 +9670,27 @@ var init_chunk_WDYHAQDY = __esm({
9630
9670
  { method: "POST" }
9631
9671
  );
9632
9672
  }
9673
+ /**
9674
+ * Create one child host beneath a child-hosting parent domain.
9675
+ *
9676
+ * The child gets its own CloudFront tenant and managed certificate and
9677
+ * needs no customer DNS: the parent's wildcard CNAME already routes it.
9678
+ */
9679
+ async createOrgDomainSiteChildHost(orgIdOrUuid, parentDomainUuid, request) {
9680
+ return this.fetch(
9681
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`,
9682
+ { method: "POST", body: JSON.stringify(request) }
9683
+ );
9684
+ }
9685
+ /**
9686
+ * List the child hosts beneath a child-hosting parent domain, with live
9687
+ * per-host status.
9688
+ */
9689
+ async listOrgDomainSiteChildHosts(orgIdOrUuid, parentDomainUuid) {
9690
+ return this.fetch(
9691
+ `o/${orgIdOrUuid}/domains/${parentDomainUuid}/site/children`
9692
+ );
9693
+ }
9633
9694
  /**
9634
9695
  * Disable custom site routing for an org domain.
9635
9696
  */
@@ -9992,6 +10053,34 @@ var init_chunk_WDYHAQDY = __esm({
9992
10053
  `o/${orgIdOrUuid}/webhooks/${endpointUuid}/deliveries?limit=${limit}`
9993
10054
  );
9994
10055
  }
10056
+ /**
10057
+ * A representative delivery body for one event type — what the test-send
10058
+ * editor is prefilled with, and the same builder the public event catalog
10059
+ * is generated from. Pass `endpointUuid` to have the sample name that
10060
+ * endpoint and sit in a workspace it actually covers.
10061
+ */
10062
+ async getOrgWebhookEventSample(orgIdOrUuid, eventType, endpointUuid) {
10063
+ const query = endpointUuid ? `?endpointUuid=${encodeURIComponent(endpointUuid)}` : "";
10064
+ return this.fetch(
10065
+ `o/${orgIdOrUuid}/webhooks/event-types/${encodeURIComponent(eventType)}/sample${query}`
10066
+ );
10067
+ }
10068
+ /**
10069
+ * Send one payload to the endpoint now and report what came back.
10070
+ *
10071
+ * Outside the delivery queue: no delivery row, no retry, no effect on the
10072
+ * endpoint's status — but the same signing, egress vetting and outcome
10073
+ * classification a real delivery goes through.
10074
+ */
10075
+ async testOrgWebhookEndpoint(orgIdOrUuid, endpointUuid, data) {
10076
+ return this.fetch(
10077
+ `o/${orgIdOrUuid}/webhooks/${endpointUuid}/test`,
10078
+ {
10079
+ method: "POST",
10080
+ body: JSON.stringify(data)
10081
+ }
10082
+ );
10083
+ }
9995
10084
  };
9996
10085
  OAuthConnectionsApi = class extends BaseApiClient {
9997
10086
  async getConnectionStatus(providerSlug) {
@@ -14668,10 +14757,12 @@ var init_chunk_WDYHAQDY = __esm({
14668
14757
  "markEmailAsUnread",
14669
14758
  "markNotificationAsRead",
14670
14759
  "mergeMemberRoles",
14760
+ "previewEmailReply",
14671
14761
  "previewImportMembers",
14672
14762
  "previewMemberWorkflowVoice",
14673
14763
  "previewRenameFieldSlug",
14674
14764
  "previewImportWorkspace",
14765
+ "previewInboxEmail",
14675
14766
  "previewRoutineVoiceReadiness",
14676
14767
  "previewRoutineWorkflowAccess",
14677
14768
  "previewSchedule",
@@ -15612,6 +15703,8 @@ var init_chunk_WDYHAQDY = __esm({
15612
15703
  getChatEmails;
15613
15704
  replyToEmail;
15614
15705
  sendInboxEmail;
15706
+ previewInboxEmail;
15707
+ previewEmailReply;
15615
15708
  getNotificationRules;
15616
15709
  createNotificationRule;
15617
15710
  updateNotificationRule;
@@ -16184,7 +16277,7 @@ var init_chunk_HRUMZ46V = __esm({
16184
16277
  var SEARCHABLE_EVENT_RULE_SOURCE_FIELDS, ActivityEventType, EntityKind;
16185
16278
  var init_dist = __esm({
16186
16279
  "../sdk/dist/index.js"() {
16187
- init_chunk_WDYHAQDY();
16280
+ init_chunk_ON7HBHJA();
16188
16281
  init_chunk_HRUMZ46V();
16189
16282
  init_chunk_P2E6LU7I();
16190
16283
  SEARCHABLE_EVENT_RULE_SOURCE_FIELDS = [
@@ -29304,6 +29397,12 @@ var qualificationsDomain = {
29304
29397
  required: false
29305
29398
  },
29306
29399
  { name: "goal", description: "Goal for the user simulator", required: false },
29400
+ { name: "channel", description: "Run channel: web-chat | web-voice", required: false },
29401
+ {
29402
+ name: "anonymous",
29403
+ description: "Use an anonymous caller: true | false; otherwise inherit scenario",
29404
+ required: false
29405
+ },
29307
29406
  { name: "driver", description: "Driver mode: auto | human", required: false },
29308
29407
  {
29309
29408
  name: "workflow-revision-id",
@@ -29336,7 +29435,17 @@ var qualificationsDomain = {
29336
29435
  required: false
29337
29436
  }
29338
29437
  ],
29339
- handler: async ({ ctx, workspace, args }) => {
29438
+ handler: async ({ ctx, workspace, args, data }) => {
29439
+ if (data !== void 0 || args["data"] !== void 0) {
29440
+ throw new CLIError(
29441
+ "runs start does not accept --data; use --channel, --anonymous and the named run flags"
29442
+ );
29443
+ }
29444
+ const channel = args["channel"];
29445
+ if (channel !== void 0 && channel !== "web-chat" && channel !== "web-voice") {
29446
+ throw new CLIError("--channel must be web-chat or web-voice");
29447
+ }
29448
+ const anonymous = optionalBool(args, "anonymous");
29340
29449
  const driver = args["driver"] === "human" ? DriverMode.HUMAN : DriverMode.AUTO;
29341
29450
  const scenarioId = args["scenario-id"] ? requireNumber(args, "scenario-id") : void 0;
29342
29451
  const personaId = args["persona-id"] ? requireNumber(args, "persona-id") : void 0;
@@ -29360,6 +29469,8 @@ var qualificationsDomain = {
29360
29469
  ...args["workflow-revision-id"] ? { workflowRevisionId: requireNumber(args, "workflow-revision-id") } : {},
29361
29470
  ...args["workflow-revision-uuid"] ? { workflowRevisionUuid: String(args["workflow-revision-uuid"]) } : {},
29362
29471
  ...args["goal"] ? { goal: String(args["goal"]) } : {},
29472
+ ...channel !== void 0 ? { channel } : {},
29473
+ ...anonymous !== void 0 ? { anonymous } : {},
29363
29474
  ...args["assistant-chat-model-id"] ? { assistantChatModelId: String(args["assistant-chat-model-id"]) } : {},
29364
29475
  ...args["assistant-realtime-model-id"] ? {
29365
29476
  assistantRealtimeModelId: String(args["assistant-realtime-model-id"])
@@ -43030,7 +43141,7 @@ init_concierge_api();
43030
43141
 
43031
43142
  // package.json
43032
43143
  var package_default = {
43033
- version: "0.33.0"};
43144
+ version: "0.34.0"};
43034
43145
 
43035
43146
  // src/gr.ts
43036
43147
  var VERSION = package_default.version;