@gravity-rail/cli 0.6.0 → 0.7.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/README.md +28 -0
- package/dist/account-verify-phone-4LRJZT5I.js +36 -0
- package/dist/account-verify-phone-4LRJZT5I.js.map +1 -0
- package/dist/chunk-3EO4COHB.js +14202 -0
- package/dist/chunk-3EO4COHB.js.map +1 -0
- package/dist/chunk-QVG4L6BE.js +2199 -0
- package/dist/chunk-QVG4L6BE.js.map +1 -0
- package/dist/concierge-ZOG7YFWQ.js +6 -0
- package/dist/concierge-ZOG7YFWQ.js.map +1 -0
- package/dist/gr.js +7181 -22883
- package/dist/gr.js.map +1 -1
- package/dist/lib.d.ts +43 -1
- package/dist/lib.js +597 -9
- package/dist/lib.js.map +1 -1
- package/package.json +2 -2
package/dist/lib.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiClient } from '@gravity-rail/client';
|
|
2
2
|
import { E as EnvironmentConfig, C as CredentialsManager } from './cli-client-context-9KRUt6O-.js';
|
|
3
3
|
export { a as ConciergeAppContextPayload, b as buildCliConciergeAppContext } from './cli-client-context-9KRUt6O-.js';
|
|
4
|
+
import { GravityRailClient, PhoneCall } from '@gravity-rail/sdk';
|
|
4
5
|
|
|
5
6
|
/** Metadata extracted from a paginated API response */
|
|
6
7
|
interface PaginationMeta {
|
|
@@ -131,6 +132,8 @@ declare function stderr(msg: string): void;
|
|
|
131
132
|
interface GlobalOptions {
|
|
132
133
|
env: string;
|
|
133
134
|
realm?: string;
|
|
135
|
+
/** Override API base URL (also: GRAVITY_RAIL_API_URL env var). */
|
|
136
|
+
apiUrl?: string;
|
|
134
137
|
outputFormat?: string;
|
|
135
138
|
verbose?: boolean;
|
|
136
139
|
allowWrite?: boolean;
|
|
@@ -241,9 +244,33 @@ declare class AuthRequiredError extends CLIError {
|
|
|
241
244
|
}
|
|
242
245
|
declare function handleError(err: unknown): never;
|
|
243
246
|
|
|
247
|
+
/**
|
|
248
|
+
* Whether the CLI should read --data / --file / stdin for this command.
|
|
249
|
+
*
|
|
250
|
+
* CRUD create/update handlers rely on COMMON_ARGS for --data, but those flags are
|
|
251
|
+
* not listed on cmd.args — without this helper, `gr members update --data …` silently
|
|
252
|
+
* skips the body.
|
|
253
|
+
*/
|
|
254
|
+
declare function commandNeedsJsonBody(cmd: CommandDef, parsedArgs: ParsedArgs): boolean;
|
|
244
255
|
/** Read JSON input from --data string, --file path, or stdin (if piped) */
|
|
245
256
|
declare function readJsonInput(args: ParsedArgs): Promise<unknown | undefined>;
|
|
246
257
|
|
|
258
|
+
/** True when the number is a provisioned test placeholder, not a real handset. */
|
|
259
|
+
declare function isLikelySeedPhoneNumber(phone: string): boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Poll until the outbound PhoneCall for a chat reaches a terminal or connected state.
|
|
262
|
+
* Throws CLIError when Twilio reports failure (often within 1–2s).
|
|
263
|
+
*/
|
|
264
|
+
declare function waitForOutboundPhoneCallOutcome(client: GravityRailClient, workspaceUuid: string, chatId: number, memberId: number, options?: {
|
|
265
|
+
timeoutMs?: number;
|
|
266
|
+
intervalMs?: number;
|
|
267
|
+
}): Promise<PhoneCall>;
|
|
268
|
+
/**
|
|
269
|
+
* Resolve the workspace PhoneNumber id to use for outbound voice.
|
|
270
|
+
* Order: explicit flag → workspace defaults → first voice-enabled line.
|
|
271
|
+
*/
|
|
272
|
+
declare function resolveVoicePhoneNumberId(client: GravityRailClient, workspaceUuid: string, explicitId?: number): Promise<number>;
|
|
273
|
+
|
|
247
274
|
/**
|
|
248
275
|
* @deprecated Use `SimpleCrudConfig` with `simpleCrudCommands()` for new code.
|
|
249
276
|
*
|
|
@@ -270,6 +297,8 @@ interface CrudConfig<T = unknown> {
|
|
|
270
297
|
extra?: CommandDef[];
|
|
271
298
|
/** Example lines shown in help for the create command */
|
|
272
299
|
createExamples?: string[];
|
|
300
|
+
/** Example lines shown in help for the update command */
|
|
301
|
+
updateExamples?: string[];
|
|
273
302
|
/**
|
|
274
303
|
* Controls how the CRUD list handler interacts with pagination.
|
|
275
304
|
*
|
|
@@ -405,6 +434,18 @@ interface ConciergeMessage {
|
|
|
405
434
|
declare function listConciergeChats(ctx: AuthenticatedContext): Promise<ConciergeChat[]>;
|
|
406
435
|
declare function createConciergeChat(ctx: AuthenticatedContext, title?: string): Promise<ConciergeChat>;
|
|
407
436
|
declare function getConciergeChat(ctx: AuthenticatedContext, chatId: number): Promise<ConciergeChat>;
|
|
437
|
+
interface ConciergeCallResult {
|
|
438
|
+
callSid: string;
|
|
439
|
+
startedAt: string;
|
|
440
|
+
}
|
|
441
|
+
interface ConciergeSmsResult {
|
|
442
|
+
messageSid: string;
|
|
443
|
+
conversationId: string;
|
|
444
|
+
}
|
|
445
|
+
declare function originateConciergeCall(ctx: AuthenticatedContext, kind?: string): Promise<ConciergeCallResult>;
|
|
446
|
+
declare function originateConciergeSms(ctx: AuthenticatedContext, kind?: string): Promise<ConciergeSmsResult>;
|
|
447
|
+
declare function startAccountPhoneVerify(ctx: AuthenticatedContext, phone: string): Promise<void>;
|
|
448
|
+
declare function confirmAccountPhoneVerify(ctx: AuthenticatedContext, code: string): Promise<void>;
|
|
408
449
|
declare function getConciergeChatMessages(ctx: AuthenticatedContext, chatId: number): Promise<ConciergeMessage[]>;
|
|
409
450
|
|
|
410
451
|
/**
|
|
@@ -424,6 +465,7 @@ declare function authBrowserCommand(ctx: AuthenticatedContext, args: Record<stri
|
|
|
424
465
|
* but without requiring a workspace.
|
|
425
466
|
*/
|
|
426
467
|
|
|
468
|
+
declare function conciergeOutboundCommand(hctx: CommandHandlerContext): Promise<void>;
|
|
427
469
|
declare function conciergeCommand(hctx: CommandHandlerContext): Promise<void>;
|
|
428
470
|
|
|
429
471
|
/**
|
|
@@ -458,4 +500,4 @@ declare function organizationsListCommand(ctx: AuthenticatedContext): Promise<vo
|
|
|
458
500
|
|
|
459
501
|
declare function whoamiCommand(ctx: AuthenticatedContext): Promise<void>;
|
|
460
502
|
|
|
461
|
-
export { type ArgDef, AuthRequiredError, type AuthenticatedContext, CLIError, COL, type CommandContext, type CommandDef, type CommandHandlerContext, CommandRegistry, type ConciergeChat, type ConciergeMessage, type DomainDef, type GlobalOptions, LIST_PAGINATION_ARGS, type OutputFormat, type OutputOptions, PAGINATION_ARGS, type PaginationMeta, type ParsedArgs, type PublicGlobalOptions, type TableColumn, authBrowserCommand, chatCommand, conciergeCommand, createAuthenticatedContext, createConciergeChat, createContext, createPublicAuthenticatedContext, createPublicContext, crudCommands, detectOutputFormat, devImportLocalCommand, extractPaginationMeta, fetchAllCursorPages, fetchAllPages, formatPaginationWarning, getConciergeChat, getConciergeChatMessages, getStartedCommand, handleError, isCursorPaginatedResponse, isDirectoryTrusted, isListResult, isPagePaginatedResponse, isPaginatedResponse, listConciergeChats, listResult, loginCommand, logoutCommand, manageCommand, organizationsListCommand, outputData, outputSingle, parseArgs, parsePaginationArgs, readJsonInput, registerPublicDomains, requireAuth, requireDirectoryTrust, requireNumber, requireString, simpleCrudCommands, stderr, unwrapItems, whoamiCommand };
|
|
503
|
+
export { type ArgDef, AuthRequiredError, type AuthenticatedContext, CLIError, COL, type CommandContext, type CommandDef, type CommandHandlerContext, CommandRegistry, type ConciergeChat, type ConciergeMessage, type DomainDef, type GlobalOptions, LIST_PAGINATION_ARGS, type OutputFormat, type OutputOptions, PAGINATION_ARGS, type PaginationMeta, type ParsedArgs, type PublicGlobalOptions, type TableColumn, authBrowserCommand, chatCommand, commandNeedsJsonBody, conciergeCommand, conciergeOutboundCommand, confirmAccountPhoneVerify, createAuthenticatedContext, createConciergeChat, createContext, createPublicAuthenticatedContext, createPublicContext, crudCommands, detectOutputFormat, devImportLocalCommand, extractPaginationMeta, fetchAllCursorPages, fetchAllPages, formatPaginationWarning, getConciergeChat, getConciergeChatMessages, getStartedCommand, handleError, isCursorPaginatedResponse, isDirectoryTrusted, isLikelySeedPhoneNumber, isListResult, isPagePaginatedResponse, isPaginatedResponse, listConciergeChats, listResult, loginCommand, logoutCommand, manageCommand, organizationsListCommand, originateConciergeCall, originateConciergeSms, outputData, outputSingle, parseArgs, parsePaginationArgs, readJsonInput, registerPublicDomains, requireAuth, requireDirectoryTrust, requireNumber, requireString, resolveVoicePhoneNumberId, simpleCrudCommands, startAccountPhoneVerify, stderr, unwrapItems, waitForOutboundPhoneCallOutcome, whoamiCommand };
|