@gravity-rail/cli 1.0.0 → 3.0.1

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/lib.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GravityRailClient, PhoneCall } from '@gravity-rail/sdk';
1
+ import { GravityRailClient, OutboundCallReceipt, PhoneCall } from '@gravity-rail/sdk';
2
2
  import { EnvironmentConfig, CredentialsManager, CLICredentials } from './cli-utils.js';
3
3
  export { b as ConciergeAppContextPayload, j as buildCliConciergeAppContext } from './cli-client-context-NJgZhyfd.js';
4
4
 
@@ -428,13 +428,29 @@ declare function readJsonInput(args: ParsedArgs, options?: {
428
428
  /** True when the number is a provisioned test placeholder, not a real handset. */
429
429
  declare function isLikelySeedPhoneNumber(phone: string): boolean;
430
430
  /**
431
- * Poll until the outbound PhoneCall for a chat reaches a terminal or connected state.
432
- * Throws CLIError when Twilio reports failure (often within 1–2s).
431
+ * One line describing a queued-call receipt, for CLI output.
432
+ *
433
+ * Queued is acceptance, not ringing: the call has no SID and no PhoneCall yet,
434
+ * and admission places it later. Identifiers and a closed state only.
433
435
  */
434
- declare function waitForOutboundPhoneCallOutcome(client: GravityRailClient, workspaceUuid: string, chatId: number, memberId: number, options?: {
436
+ declare function describeOutboundCallReceipt(receipt: OutboundCallReceipt | null | undefined): string;
437
+ interface WaitForOutboundCallOptions {
435
438
  timeoutMs?: number;
436
439
  intervalMs?: number;
437
- }): Promise<PhoneCall>;
440
+ }
441
+ /**
442
+ * Poll until the outbound PhoneCall for a chat reaches a terminal or connected state.
443
+ * Throws CLIError when Twilio reports failure (often within 1–2s).
444
+ *
445
+ * Given the `outboundCallReceipt` a chat create returned, returns it at once
446
+ * without polling: the call was accepted into the paced call queue, so no
447
+ * PhoneCall exists yet and its absence is not a failure. Queued means
448
+ * accepted, not ringing — never create the chat again to retry it.
449
+ */
450
+ declare function waitForOutboundPhoneCallOutcome(client: GravityRailClient, workspaceUuid: string, chatId: number, memberId: number, options?: WaitForOutboundCallOptions): Promise<PhoneCall>;
451
+ declare function waitForOutboundPhoneCallOutcome(client: GravityRailClient, workspaceUuid: string, chatId: number, memberId: number, options: WaitForOutboundCallOptions & {
452
+ receipt: OutboundCallReceipt | null | undefined;
453
+ }): Promise<PhoneCall | OutboundCallReceipt>;
438
454
  /**
439
455
  * Resolve the workspace PhoneNumber id to use for outbound voice.
440
456
  * Order: explicit flag → workspace defaults → first voice-enabled line.
@@ -749,5 +765,5 @@ declare function organizationsListCommand(ctx: AuthenticatedContext, options?: {
749
765
 
750
766
  declare function whoamiCommand(ctx: AuthenticatedContext): Promise<void>;
751
767
 
752
- export { AuthRequiredError, CLIError, COL, CommandRegistry, LIST_PAGINATION_ARGS, PAGINATION_ARGS, PIPED_INPUT_FIRST_BYTE_WAIT_MS, WORKSPACE_EXPORT_ZIP, authBrowserCommand, authImportDevCommand, authListCommand, authSwitchCommand, chatCommand, commandAwaitsPipedInput, commandNeedsJsonBody, conciergeCommand, conciergeOutboundCommand, confirmAccountPhoneVerify, createAuthenticatedContext, createConciergeChat, createContext, createPublicAuthenticatedContext, createPublicContext, crudCommands, detectOutputFormat, devImportLocalCommand, extractPaginationMeta, fetchAllCursorPages, fetchAllPages, flushStdout, formatPaginationWarning, getConciergeChat, getConciergeChatMessages, getStartedCommand, handleError, hint, importDevProfiles, isCursorPaginatedResponse, isDirectoryTrusted, isLikelySeedPhoneNumber, isListResult, isPagePaginatedResponse, isPaginatedResponse, isWorkspaceExportZip, listConciergeChats, listResult, loginCommand, logoutCommand, manageCommand, organizationsListCommand, originateConciergeCall, originateConciergeSms, outputData, outputSingle, parseArgs, parseGlobalOptions, parsePaginationArgs, profilesFromDevRealms, readCommandJsonInput, readJsonInput, registerPublicDomains, requireAuth, requireDirectoryTrust, requireNumber, requireString, resolveVoicePhoneNumberId, simpleCrudCommands, startAccountPhoneVerify, stderr, topLevelCommands, unwrapItems, waitForOutboundPhoneCallOutcome, whoamiCommand };
768
+ export { AuthRequiredError, CLIError, COL, CommandRegistry, LIST_PAGINATION_ARGS, PAGINATION_ARGS, PIPED_INPUT_FIRST_BYTE_WAIT_MS, WORKSPACE_EXPORT_ZIP, authBrowserCommand, authImportDevCommand, authListCommand, authSwitchCommand, chatCommand, commandAwaitsPipedInput, commandNeedsJsonBody, conciergeCommand, conciergeOutboundCommand, confirmAccountPhoneVerify, createAuthenticatedContext, createConciergeChat, createContext, createPublicAuthenticatedContext, createPublicContext, crudCommands, describeOutboundCallReceipt, detectOutputFormat, devImportLocalCommand, extractPaginationMeta, fetchAllCursorPages, fetchAllPages, flushStdout, formatPaginationWarning, getConciergeChat, getConciergeChatMessages, getStartedCommand, handleError, hint, importDevProfiles, isCursorPaginatedResponse, isDirectoryTrusted, isLikelySeedPhoneNumber, isListResult, isPagePaginatedResponse, isPaginatedResponse, isWorkspaceExportZip, listConciergeChats, listResult, loginCommand, logoutCommand, manageCommand, organizationsListCommand, originateConciergeCall, originateConciergeSms, outputData, outputSingle, parseArgs, parseGlobalOptions, parsePaginationArgs, profilesFromDevRealms, readCommandJsonInput, readJsonInput, registerPublicDomains, requireAuth, requireDirectoryTrust, requireNumber, requireString, resolveVoicePhoneNumberId, simpleCrudCommands, startAccountPhoneVerify, stderr, topLevelCommands, unwrapItems, waitForOutboundPhoneCallOutcome, whoamiCommand };
753
769
  export type { ArgDef, AuthenticatedContext, CommandContext, CommandDef, CommandHandlerContext, ConciergeChat, ConciergeMessage, DomainDef, GlobalOptions, GlobalOptionsResult, GlobalOptionsSpec, OutputFormat, OutputOptions, PaginationMeta, ParsedArgs, ParsedGlobalOptions, PublicGlobalOptions, TableColumn, WorkspaceExportZipInput };