@gravity-rail/cli 0.7.1 → 0.7.2
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/cli-utils.js +0 -1
- package/dist/{errors-4MAJGD3C.js → errors-SMY7LZJB.js} +1 -2
- package/dist/gr.js +335 -1706
- package/dist/gr.js.map +1 -1
- package/dist/lib.d.ts +15 -12
- package/dist/lib.js +6352 -5468
- package/dist/lib.js.map +1 -1
- package/dist/register-special-commands.js +1 -1670
- package/dist/register-special-commands.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-424PT5DM.js +0 -23
- package/dist/errors-4MAJGD3C.js.map +0 -1
- /package/dist/{chunk-424PT5DM.js.map → errors-SMY7LZJB.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.
|