@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/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 `GravityRailClient`. TypeScript validates the call at the definition
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: GravityRailClient, workspace: string, opts?: Record<string, unknown>) => Promise<unknown>;
337
- get?: (client: GravityRailClient, workspace: string, id: string) => Promise<unknown>;
338
- create?: (client: GravityRailClient, workspace: string, data: unknown) => Promise<unknown>;
339
- update?: (client: GravityRailClient, workspace: string, id: string, data: unknown) => Promise<unknown>;
340
- delete?: (client: GravityRailClient, workspace: string, id: string) => Promise<unknown>;
341
- archive?: (client: GravityRailClient, workspace: string, id: string) => Promise<unknown>;
342
- unarchive?: (client: GravityRailClient, workspace: string, id: string) => Promise<unknown>;
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: GravityRailClient, workspace: string, id: string, cascade: boolean) => Promise<unknown>;
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
- If workspace phone list is still empty, create a workspace phone record then:
8585
- gr phone-numbers link -w ${workspaceUuid} --id <workspace-phone-id> --provider-phone-uuid ${providerPhoneUuid} --allow-write
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
  }