@gravity-rail/cli 0.7.1 → 0.7.3
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/account-verify-phone-TDQNZ5XN.js +41 -0
- package/dist/account-verify-phone-TDQNZ5XN.js.map +1 -0
- package/dist/{chunk-OPWCTOHP.js → chunk-7VZ4JLAJ.js} +11 -1
- package/dist/chunk-7VZ4JLAJ.js.map +1 -0
- package/dist/chunk-KTTHOL3B.js +758 -0
- package/dist/chunk-KTTHOL3B.js.map +1 -0
- package/dist/cli-utils.js +0 -1
- package/dist/{errors-4MAJGD3C.js → errors-VK4QO3QZ.js} +2 -3
- package/dist/gr.js +2051 -2164
- package/dist/gr.js.map +1 -1
- package/dist/lib.d.ts +19 -13
- package/dist/lib.js +7593 -6759
- package/dist/lib.js.map +1 -1
- package/package.json +3 -7
- package/dist/chunk-424PT5DM.js +0 -23
- package/dist/chunk-OPWCTOHP.js.map +0 -1
- package/dist/errors-4MAJGD3C.js.map +0 -1
- package/dist/register-special-commands.d.ts +0 -4
- package/dist/register-special-commands.js +0 -5525
- package/dist/register-special-commands.js.map +0 -1
- /package/dist/{chunk-424PT5DM.js.map → errors-VK4QO3QZ.js.map} +0 -0
package/dist/lib.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GravityRailClient, PhoneCall } from '@gravity-rail/sdk';
|
|
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';
|
|
5
4
|
|
|
6
5
|
/** Metadata extracted from a paginated API response */
|
|
7
6
|
interface PaginationMeta {
|
|
@@ -156,7 +155,7 @@ interface CommandContext {
|
|
|
156
155
|
}
|
|
157
156
|
interface AuthenticatedContext extends CommandContext {
|
|
158
157
|
accessToken: string;
|
|
159
|
-
apiClient:
|
|
158
|
+
apiClient: GravityRailClient;
|
|
160
159
|
realmWorkspace?: string;
|
|
161
160
|
}
|
|
162
161
|
/** Create a base command context (no auth required) */
|
|
@@ -299,6 +298,10 @@ interface CrudConfig<T = unknown> {
|
|
|
299
298
|
createExamples?: string[];
|
|
300
299
|
/** Example lines shown in help for the update command */
|
|
301
300
|
updateExamples?: string[];
|
|
301
|
+
/** Full --help description for create (replaces default when set) */
|
|
302
|
+
createHelp?: string;
|
|
303
|
+
/** Full --help description for update (replaces default when set) */
|
|
304
|
+
updateHelp?: string;
|
|
302
305
|
/**
|
|
303
306
|
* Controls how the CRUD list handler interacts with pagination.
|
|
304
307
|
*
|
|
@@ -329,7 +332,7 @@ declare function crudCommands<T>(config: CrudConfig<T>): CommandDef[];
|
|
|
329
332
|
* Typed CRUD config for simple, top-level resources.
|
|
330
333
|
*
|
|
331
334
|
* Unlike the stringly-typed `CrudConfig`, operations are typed functions that
|
|
332
|
-
* receive the real `
|
|
335
|
+
* receive the real `GravityRailClient`. TypeScript validates the call at the definition
|
|
333
336
|
* site, eliminating the string-dispatch + positional-argument blind spot.
|
|
334
337
|
*
|
|
335
338
|
* Use this for resources that fit the simple CRUD contract:
|
|
@@ -361,16 +364,16 @@ interface SimpleCrudConfig<T = unknown> {
|
|
|
361
364
|
extra?: CommandDef[];
|
|
362
365
|
createExamples?: string[];
|
|
363
366
|
paginationSupport?: 'full' | 'client-only' | false;
|
|
364
|
-
list?: (client:
|
|
365
|
-
get?: (client:
|
|
366
|
-
create?: (client:
|
|
367
|
-
update?: (client:
|
|
368
|
-
delete?: (client:
|
|
369
|
-
archive?: (client:
|
|
370
|
-
unarchive?: (client:
|
|
367
|
+
list?: (client: GravityRailClient, workspace: string, opts?: Record<string, unknown>) => Promise<unknown>;
|
|
368
|
+
get?: (client: GravityRailClient, workspace: string, id: string) => Promise<unknown>;
|
|
369
|
+
create?: (client: GravityRailClient, workspace: string, data: unknown) => Promise<unknown>;
|
|
370
|
+
update?: (client: GravityRailClient, workspace: string, id: string, data: unknown) => Promise<unknown>;
|
|
371
|
+
delete?: (client: GravityRailClient, workspace: string, id: string) => Promise<unknown>;
|
|
372
|
+
archive?: (client: GravityRailClient, workspace: string, id: string) => Promise<unknown>;
|
|
373
|
+
unarchive?: (client: GravityRailClient, workspace: string, id: string) => Promise<unknown>;
|
|
371
374
|
/** When true, adds a --cascade flag to the delete command. */
|
|
372
375
|
supportsCascade?: boolean;
|
|
373
|
-
deleteFn?: (client:
|
|
376
|
+
deleteFn?: (client: GravityRailClient, workspace: string, id: string, cascade: boolean) => Promise<unknown>;
|
|
374
377
|
}
|
|
375
378
|
/**
|
|
376
379
|
* Generate CRUD commands from typed callable functions.
|
|
@@ -385,6 +388,7 @@ declare class CommandRegistry {
|
|
|
385
388
|
private domains;
|
|
386
389
|
register(domain: DomainDef): void;
|
|
387
390
|
registerCommand(cmd: CommandDef): void;
|
|
391
|
+
registerCommands(commands: readonly CommandDef[]): void;
|
|
388
392
|
/** Resolve command words to a CommandDef using longest-match.
|
|
389
393
|
* Supports {param} path segments that match any word and extract as pathParams. */
|
|
390
394
|
resolve(words: string[]): {
|
|
@@ -411,6 +415,8 @@ declare class CommandRegistry {
|
|
|
411
415
|
*/
|
|
412
416
|
declare function registerPublicDomains(registry: CommandRegistry): void;
|
|
413
417
|
|
|
418
|
+
declare const topLevelCommands: CommandDef[];
|
|
419
|
+
|
|
414
420
|
/**
|
|
415
421
|
* Concierge API client — direct HTTP calls to the global concierge endpoints.
|
|
416
422
|
*
|
|
@@ -504,4 +510,4 @@ declare function organizationsListCommand(ctx: AuthenticatedContext): Promise<vo
|
|
|
504
510
|
|
|
505
511
|
declare function whoamiCommand(ctx: AuthenticatedContext): Promise<void>;
|
|
506
512
|
|
|
507
|
-
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 };
|
|
513
|
+
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, topLevelCommands, unwrapItems, waitForOutboundPhoneCallOutcome, whoamiCommand };
|