@gravity-rail/cli 0.5.1 → 0.6.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 +5 -34
- package/dist/gr.js.map +1 -1
- package/dist/lib.d.ts +9 -10
- package/dist/lib.js +2 -2
- package/dist/lib.js.map +1 -1
- package/package.json +2 -2
package/dist/lib.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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 } from '@gravity-rail/sdk';
|
|
5
4
|
|
|
6
5
|
/** Metadata extracted from a paginated API response */
|
|
7
6
|
interface PaginationMeta {
|
|
@@ -301,7 +300,7 @@ declare function crudCommands<T>(config: CrudConfig<T>): CommandDef[];
|
|
|
301
300
|
* Typed CRUD config for simple, top-level resources.
|
|
302
301
|
*
|
|
303
302
|
* Unlike the stringly-typed `CrudConfig`, operations are typed functions that
|
|
304
|
-
* receive the real `
|
|
303
|
+
* receive the real `ApiClient`. TypeScript validates the call at the definition
|
|
305
304
|
* site, eliminating the string-dispatch + positional-argument blind spot.
|
|
306
305
|
*
|
|
307
306
|
* Use this for resources that fit the simple CRUD contract:
|
|
@@ -333,16 +332,16 @@ interface SimpleCrudConfig<T = unknown> {
|
|
|
333
332
|
extra?: CommandDef[];
|
|
334
333
|
createExamples?: string[];
|
|
335
334
|
paginationSupport?: 'full' | 'client-only' | false;
|
|
336
|
-
list?: (client:
|
|
337
|
-
get?: (client:
|
|
338
|
-
create?: (client:
|
|
339
|
-
update?: (client:
|
|
340
|
-
delete?: (client:
|
|
341
|
-
archive?: (client:
|
|
342
|
-
unarchive?: (client:
|
|
335
|
+
list?: (client: ApiClient, workspace: string, opts?: Record<string, unknown>) => Promise<unknown>;
|
|
336
|
+
get?: (client: ApiClient, workspace: string, id: string) => Promise<unknown>;
|
|
337
|
+
create?: (client: ApiClient, workspace: string, data: unknown) => Promise<unknown>;
|
|
338
|
+
update?: (client: ApiClient, workspace: string, id: string, data: unknown) => Promise<unknown>;
|
|
339
|
+
delete?: (client: ApiClient, workspace: string, id: string) => Promise<unknown>;
|
|
340
|
+
archive?: (client: ApiClient, workspace: string, id: string) => Promise<unknown>;
|
|
341
|
+
unarchive?: (client: ApiClient, workspace: string, id: string) => Promise<unknown>;
|
|
343
342
|
/** When true, adds a --cascade flag to the delete command. */
|
|
344
343
|
supportsCascade?: boolean;
|
|
345
|
-
deleteFn?: (client:
|
|
344
|
+
deleteFn?: (client: ApiClient, workspace: string, id: string, cascade: boolean) => Promise<unknown>;
|
|
346
345
|
}
|
|
347
346
|
/**
|
|
348
347
|
* Generate CRUD commands from typed callable functions.
|
package/dist/lib.js
CHANGED
|
@@ -8581,8 +8581,8 @@ var commands2 = [
|
|
|
8581
8581
|
outputSingle(result, hctx.ctx, PROVIDER_PHONE_COLUMNS);
|
|
8582
8582
|
process.stdout.write(
|
|
8583
8583
|
`
|
|
8584
|
-
|
|
8585
|
-
gr phone-numbers
|
|
8584
|
+
Create a workspace phone linked to this provider number (sets Twilio webhooks):
|
|
8585
|
+
gr phone-numbers create -w ${workspaceUuid} --allow-write --data '{"name":"\u2026","providerPhoneUuid":"${providerPhoneUuid}"}'
|
|
8586
8586
|
`
|
|
8587
8587
|
);
|
|
8588
8588
|
}
|