@eide/foir-cli 0.1.12 → 0.1.14

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.js CHANGED
@@ -24,6 +24,7 @@ import { registerSegmentsCommands } from './commands/segments.js';
24
24
  import { registerExperimentsCommands } from './commands/experiments.js';
25
25
  import { registerSettingsCommands } from './commands/settings.js';
26
26
  import { registerApiKeysCommands } from './commands/api-keys.js';
27
+ import { registerAuthProvidersCommands } from './commands/auth-providers.js';
27
28
  import { registerExtensionsCommands } from './commands/extensions.js';
28
29
  import { registerOperationsCommands } from './commands/operations.js';
29
30
  import { registerSchedulesCommands } from './commands/schedules.js';
@@ -67,6 +68,7 @@ registerSegmentsCommands(program, getGlobalOpts);
67
68
  registerExperimentsCommands(program, getGlobalOpts);
68
69
  registerSettingsCommands(program, getGlobalOpts);
69
70
  registerApiKeysCommands(program, getGlobalOpts);
71
+ registerAuthProvidersCommands(program, getGlobalOpts);
70
72
  registerExtensionsCommands(program, getGlobalOpts);
71
73
  registerOperationsCommands(program, getGlobalOpts);
72
74
  registerSchedulesCommands(program, getGlobalOpts);
@@ -3,4 +3,10 @@
3
3
  */
4
4
  import type { CodegenModel } from '../fetch-models.js';
5
5
  export declare function generateModelDocuments(model: CodegenModel): string;
6
+ /**
7
+ * Generate the shared ShareFields fragment file.
8
+ * This must be emitted once (not per-model) to avoid duplicate fragment errors
9
+ * in Apollo iOS and other codegen tools that validate across all .graphql files.
10
+ */
11
+ export declare function generateSharedFragments(): string;
6
12
  //# sourceMappingURL=documents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/codegen/generators/documents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAiGlE"}
1
+ {"version":3,"file":"documents.d.ts","sourceRoot":"","sources":["../../../src/codegen/generators/documents.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,GAAG,MAAM,CAiGlE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAgBhD"}
@@ -99,8 +99,15 @@ mutation Unpublish${typeName}($id: ID!) {
99
99
  }
100
100
  ${model.config.sharing?.enabled ? generateSharingOperations(model.key, typeName, pluralName) : ''}`;
101
101
  }
102
- function generateSharingOperations(modelKey, typeName, pluralName) {
103
- return `# Sharing operations
102
+ /**
103
+ * Generate the shared ShareFields fragment file.
104
+ * This must be emitted once (not per-model) to avoid duplicate fragment errors
105
+ * in Apollo iOS and other codegen tools that validate across all .graphql files.
106
+ */
107
+ export function generateSharedFragments() {
108
+ return `# Shared fragments used across multiple model documents
109
+ # @generated by foir — DO NOT EDIT MANUALLY
110
+
104
111
  fragment ShareFields on Share {
105
112
  id
106
113
  resourceType
@@ -112,6 +119,10 @@ fragment ShareFields on Share {
112
119
  createdAt
113
120
  revokedAt
114
121
  }
122
+ `;
123
+ }
124
+ function generateSharingOperations(modelKey, typeName, pluralName) {
125
+ return `# Sharing operations
115
126
 
116
127
  mutation Share${typeName}($recordId: ID!, $sharedWithCustomerId: ID!, $permission: SharePermission!) {
117
128
  shareRecord(recordId: $recordId, sharedWithCustomerId: $sharedWithCustomerId, permission: $permission) {
@@ -0,0 +1,4 @@
1
+ import type { Command } from 'commander';
2
+ import type { GlobalOptions } from '../lib/config.js';
3
+ export declare function registerAuthProvidersCommands(program: Command, globalOpts: () => GlobalOptions): void;
4
+ //# sourceMappingURL=auth-providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-providers.d.ts","sourceRoot":"","sources":["../../src/commands/auth-providers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAsBtD,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CA4PN"}
@@ -0,0 +1,202 @@
1
+ import chalk from 'chalk';
2
+ import { withErrorHandler } from '../lib/errors.js';
3
+ import { createClient } from '../lib/client.js';
4
+ import { formatOutput, formatList, success } from '../lib/output.js';
5
+ import { parseInputData, confirmAction } from '../lib/input.js';
6
+ import { LIST_AUTH_PROVIDERS, GET_AUTH_PROVIDER, CREATE_AUTH_PROVIDER, UPDATE_AUTH_PROVIDER, DELETE_AUTH_PROVIDER, } from '../graphql/queries.js';
7
+ const VALID_TYPES = [
8
+ 'OAUTH2',
9
+ 'TOKEN_SSO',
10
+ 'SAML',
11
+ 'OTP_VERIFY',
12
+ 'OIDC',
13
+ 'EXTERNAL',
14
+ ];
15
+ export function registerAuthProvidersCommands(program, globalOpts) {
16
+ const authProviders = program
17
+ .command('auth-providers')
18
+ .description('Manage customer auth providers');
19
+ // list
20
+ authProviders
21
+ .command('list')
22
+ .description('List auth providers')
23
+ .option('--enabled-only', 'Show only enabled providers')
24
+ .action(withErrorHandler(globalOpts, async (cmdOpts) => {
25
+ const opts = globalOpts();
26
+ const client = await createClient(opts);
27
+ const data = await client.request(LIST_AUTH_PROVIDERS, {
28
+ enabledOnly: !!cmdOpts.enabledOnly,
29
+ });
30
+ formatList(data.customerAuthProviders, opts, {
31
+ columns: [
32
+ { key: 'id', header: 'ID', width: 28 },
33
+ { key: 'key', header: 'Key', width: 20 },
34
+ { key: 'name', header: 'Name', width: 24 },
35
+ { key: 'type', header: 'Type', width: 12 },
36
+ {
37
+ key: 'enabled',
38
+ header: 'Enabled',
39
+ width: 8,
40
+ format: (v) => (v ? 'yes' : 'no'),
41
+ },
42
+ {
43
+ key: 'isDefault',
44
+ header: 'Default',
45
+ width: 8,
46
+ format: (v) => (v ? 'yes' : 'no'),
47
+ },
48
+ { key: 'priority', header: 'Priority', width: 8 },
49
+ ],
50
+ });
51
+ }));
52
+ // get
53
+ authProviders
54
+ .command('get <id>')
55
+ .description('Get auth provider details')
56
+ .action(withErrorHandler(globalOpts, async (id) => {
57
+ const opts = globalOpts();
58
+ const client = await createClient(opts);
59
+ const data = await client.request(GET_AUTH_PROVIDER, { id });
60
+ if (!data.customerAuthProvider) {
61
+ throw new Error(`Auth provider not found: ${id}`);
62
+ }
63
+ if (opts.json || opts.jsonl) {
64
+ formatOutput(data.customerAuthProvider, opts);
65
+ }
66
+ else {
67
+ const p = data.customerAuthProvider;
68
+ console.log(chalk.bold(`${p.name}`) + chalk.gray(` (${p.key})`));
69
+ console.log(` Type: ${p.type}`);
70
+ console.log(` Enabled: ${p.enabled ? 'yes' : 'no'}`);
71
+ console.log(` Default: ${p.isDefault ? 'yes' : 'no'}`);
72
+ console.log(` Priority: ${p.priority}`);
73
+ console.log(` Verify External Customer: ${p.verifyExternalCustomer ? 'yes' : 'no'}`);
74
+ console.log(` Capture Metadata: ${p.captureMetadata ? 'yes' : 'no'}`);
75
+ if (p.configDisplay) {
76
+ console.log(` Config:`);
77
+ console.log(chalk.gray(JSON.stringify(p.configDisplay, null, 2).replace(/^/gm, ' ')));
78
+ }
79
+ console.log(chalk.gray(` Created: ${p.createdAt}`));
80
+ console.log(chalk.gray(` Updated: ${p.updatedAt}`));
81
+ }
82
+ }));
83
+ // create
84
+ authProviders
85
+ .command('create')
86
+ .description('Create a new auth provider')
87
+ .requiredOption('--key <key>', 'Unique provider key')
88
+ .requiredOption('--name <name>', 'Display name')
89
+ .requiredOption('--type <type>', `Provider type (${VALID_TYPES.join(', ')})`)
90
+ .option('-d, --data <json>', 'Provider config as JSON string')
91
+ .option('--file <path>', 'Provider config from JSON file')
92
+ .option('--enabled', 'Enable the provider')
93
+ .option('--is-default', 'Set as default provider')
94
+ .option('--priority <n>', 'Display priority (higher = first)')
95
+ .option('--verify-external-customer', 'Verify customer exists in external system')
96
+ .option('--capture-metadata', 'Capture metadata from provider during auth')
97
+ .action(withErrorHandler(globalOpts, async (cmdOpts) => {
98
+ const opts = globalOpts();
99
+ const type = cmdOpts.type.toUpperCase();
100
+ if (!VALID_TYPES.includes(type)) {
101
+ throw new Error(`Invalid type "${cmdOpts.type}". Valid types: ${VALID_TYPES.join(', ')}`);
102
+ }
103
+ const config = await parseInputData({
104
+ data: cmdOpts.data,
105
+ file: cmdOpts.file,
106
+ });
107
+ const input = {
108
+ key: cmdOpts.key,
109
+ name: cmdOpts.name,
110
+ type,
111
+ config,
112
+ };
113
+ if (cmdOpts.enabled !== undefined)
114
+ input.enabled = true;
115
+ if (cmdOpts.isDefault !== undefined)
116
+ input.isDefault = true;
117
+ if (cmdOpts.priority !== undefined)
118
+ input.priority = parseInt(String(cmdOpts.priority), 10);
119
+ if (cmdOpts.verifyExternalCustomer !== undefined)
120
+ input.verifyExternalCustomer = true;
121
+ if (cmdOpts.captureMetadata !== undefined)
122
+ input.captureMetadata = true;
123
+ const client = await createClient(opts);
124
+ const data = await client.request(CREATE_AUTH_PROVIDER, { input });
125
+ if (opts.json || opts.jsonl) {
126
+ formatOutput(data.createCustomerAuthProvider, opts);
127
+ }
128
+ else {
129
+ success(`Created auth provider: ${data.createCustomerAuthProvider.name} (${data.createCustomerAuthProvider.key})`);
130
+ }
131
+ }));
132
+ // update
133
+ authProviders
134
+ .command('update <id>')
135
+ .description('Update an auth provider')
136
+ .option('--name <name>', 'Display name')
137
+ .option('-d, --data <json>', 'Provider config as JSON string')
138
+ .option('--file <path>', 'Provider config from JSON file')
139
+ .option('--enabled', 'Enable the provider')
140
+ .option('--no-enabled', 'Disable the provider')
141
+ .option('--is-default', 'Set as default provider')
142
+ .option('--priority <n>', 'Display priority (higher = first)')
143
+ .option('--verify-external-customer', 'Verify customer exists in external system')
144
+ .option('--capture-metadata', 'Capture metadata from provider during auth')
145
+ .action(withErrorHandler(globalOpts, async (id, cmdOpts) => {
146
+ const opts = globalOpts();
147
+ const input = {};
148
+ if (cmdOpts.name !== undefined)
149
+ input.name = cmdOpts.name;
150
+ if (cmdOpts.isDefault !== undefined)
151
+ input.isDefault = true;
152
+ if (cmdOpts.priority !== undefined)
153
+ input.priority = parseInt(String(cmdOpts.priority), 10);
154
+ if (cmdOpts.verifyExternalCustomer !== undefined)
155
+ input.verifyExternalCustomer = true;
156
+ if (cmdOpts.captureMetadata !== undefined)
157
+ input.captureMetadata = true;
158
+ // Commander's --no-enabled sets enabled=false, --enabled sets enabled=true
159
+ if (cmdOpts.enabled !== undefined) {
160
+ input.enabled = !!cmdOpts.enabled;
161
+ }
162
+ // Config from --data or --file (optional for update)
163
+ if (cmdOpts.data || cmdOpts.file) {
164
+ input.config = await parseInputData({
165
+ data: cmdOpts.data,
166
+ file: cmdOpts.file,
167
+ });
168
+ }
169
+ if (Object.keys(input).length === 0) {
170
+ throw new Error('No update fields provided.');
171
+ }
172
+ const client = await createClient(opts);
173
+ const data = await client.request(UPDATE_AUTH_PROVIDER, { id, input });
174
+ if (opts.json || opts.jsonl) {
175
+ formatOutput(data.updateCustomerAuthProvider, opts);
176
+ }
177
+ else {
178
+ success(`Updated auth provider: ${data.updateCustomerAuthProvider.name} (${data.updateCustomerAuthProvider.key})`);
179
+ }
180
+ }));
181
+ // delete
182
+ authProviders
183
+ .command('delete <id>')
184
+ .description('Delete an auth provider')
185
+ .option('--confirm', 'Skip confirmation prompt')
186
+ .action(withErrorHandler(globalOpts, async (id, cmdOpts) => {
187
+ const opts = globalOpts();
188
+ const confirmed = await confirmAction(`Delete auth provider ${id}? This cannot be undone.`, { confirm: !!cmdOpts.confirm });
189
+ if (!confirmed) {
190
+ console.log('Aborted.');
191
+ return;
192
+ }
193
+ const client = await createClient(opts);
194
+ const data = await client.request(DELETE_AUTH_PROVIDER, { id });
195
+ if (opts.json || opts.jsonl) {
196
+ formatOutput({ deleted: data.deleteCustomerAuthProvider, id }, opts);
197
+ }
198
+ else {
199
+ success(`Deleted auth provider ${id}`);
200
+ }
201
+ }));
202
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../src/commands/pull.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAuBtD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CA4LN"}
1
+ {"version":3,"file":"pull.d.ts","sourceRoot":"","sources":["../../src/commands/pull.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAuBtD,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAuMN"}
@@ -10,7 +10,7 @@ import { generateFieldTypesFile } from '../codegen/generators/field-types.js';
10
10
  import { generateConfigFile } from '../codegen/generators/config.js';
11
11
  import { generateModelTypes } from '../codegen/generators/model-types.js';
12
12
  import { generateModelIndex } from '../codegen/generators/model-index.js';
13
- import { generateModelDocuments } from '../codegen/generators/documents.js';
13
+ import { generateModelDocuments, generateSharedFragments } from '../codegen/generators/documents.js';
14
14
  import { generateSwiftModelFile } from '../codegen/generators/swift-types.js';
15
15
  import { generateSwiftFieldTypesFile } from '../codegen/generators/swift-field-types.js';
16
16
  import { generateSwiftModelKeys } from '../codegen/generators/swift-model-keys.js';
@@ -96,6 +96,14 @@ export function registerPullCommand(program, globalOpts) {
96
96
  content: generateModelDocuments(model),
97
97
  });
98
98
  }
99
+ // 5a. Shared fragments (emitted once when any model uses sharing)
100
+ const hasSharingModels = publicModels.some((m) => m.config.sharing?.enabled);
101
+ if (hasSharingModels) {
102
+ files.push({
103
+ path: resolve(docsDir, '_shared.graphql'),
104
+ content: generateSharedFragments(),
105
+ });
106
+ }
99
107
  // 5b. Customer profile GraphQL documents (always — static platform operations)
100
108
  files.push({
101
109
  path: resolve(docsDir, 'customer-profile.graphql'),
@@ -4,6 +4,11 @@ export declare const GET_API_KEY = "\n query($id: ID!) { getApiKey(id: $id) { i
4
4
  export declare const CREATE_API_KEY = "\n mutation($input: CreateApiKeyInput!) { createApiKey(input: $input) { apiKey { id name keyPrefix isActive scopes createdAt } plainKey warning } }\n";
5
5
  export declare const ROTATE_API_KEY = "\n mutation($id: ID!) { rotateApiKey(id: $id) { apiKey { id name keyPrefix rotatedAt } plainKey warning } }\n";
6
6
  export declare const REVOKE_API_KEY = "\n mutation($id: ID!) { revokeApiKey(id: $id) { id name isActive revokedAt } }\n";
7
+ export declare const LIST_AUTH_PROVIDERS = "\n query($enabledOnly: Boolean) {\n customerAuthProviders(enabledOnly: $enabledOnly) {\n id key name type enabled isDefault priority createdAt updatedAt\n }\n }\n";
8
+ export declare const GET_AUTH_PROVIDER = "\n query($id: ID!) {\n customerAuthProvider(id: $id) {\n id key name type configDisplay enabled isDefault priority\n verifyExternalCustomer captureMetadata createdAt updatedAt createdBy updatedBy\n }\n }\n";
9
+ export declare const CREATE_AUTH_PROVIDER = "\n mutation($input: CreateAuthProviderInput!) {\n createCustomerAuthProvider(input: $input) {\n id key name type enabled isDefault priority createdAt\n }\n }\n";
10
+ export declare const UPDATE_AUTH_PROVIDER = "\n mutation($id: ID!, $input: UpdateAuthProviderInput!) {\n updateCustomerAuthProvider(id: $id, input: $input) {\n id key name type enabled isDefault priority updatedAt\n }\n }\n";
11
+ export declare const DELETE_AUTH_PROVIDER = "\n mutation($id: ID!) { deleteCustomerAuthProvider(id: $id) }\n";
7
12
  export declare const RECORD = "\n query($id: ID!) { record(id: $id) { id modelKey naturalKey recordType parentId data metadata currentVersionId publishedVersionId publishedVersionNumber publishedAt publishedBy publishStatus versionNumber customerId createdAt updatedAt createdBy updatedBy } }\n";
8
13
  export declare const RECORD_BY_KEY = "\n query($modelKey: String!, $naturalKey: String!) { recordByKey(modelKey: $modelKey, naturalKey: $naturalKey) { id modelKey naturalKey recordType parentId data metadata currentVersionId publishedVersionId publishedVersionNumber publishedAt publishedBy publishStatus versionNumber customerId createdAt updatedAt createdBy updatedBy } }\n";
9
14
  export declare const RECORDS = "\n query($modelKey: String!, $limit: Int, $offset: Int, $filters: [FilterInput!], $sort: SortInput) {\n records(modelKey: $modelKey, limit: $limit, offset: $offset, filters: $filters, sort: $sort) {\n items { id modelKey naturalKey recordType publishStatus versionNumber customerId createdAt updatedAt }\n total\n }\n }\n";
@@ -1 +1 @@
1
- {"version":3,"file":"queries.d.ts","sourceRoot":"","sources":["../../src/graphql/queries.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB,8HAE/B,CAAC;AAIF,eAAO,MAAM,aAAa,oVAOzB,CAAC;AAEF,eAAO,MAAM,WAAW,oOAEvB,CAAC;AAEF,eAAO,MAAM,cAAc,2JAE1B,CAAC;AAEF,eAAO,MAAM,cAAc,mHAE1B,CAAC;AAEF,eAAO,MAAM,cAAc,sFAE1B,CAAC;AAIF,eAAO,MAAM,MAAM,6QAElB,CAAC;AAEF,eAAO,MAAM,aAAa,uVAEzB,CAAC;AAEF,eAAO,MAAM,OAAO,wVAOnB,CAAC;AAEF,eAAO,MAAM,aAAa,+MAEzB,CAAC;AAEF,eAAO,MAAM,aAAa,qJAEzB,CAAC;AAEF,eAAO,MAAM,aAAa,kFAEzB,CAAC;AAEF,eAAO,MAAM,eAAe,8EAE3B,CAAC;AAEF,eAAO,MAAM,gBAAgB,0DAE5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,kLAE5B,CAAC;AAEF,eAAO,MAAM,eAAe,uOAE3B,CAAC;AAEF,eAAO,MAAM,eAAe,wMAE3B,CAAC;AAIF,eAAO,MAAM,kBAAkB,sKAO9B,CAAC;AAEF,eAAO,MAAM,YAAY,uPAExB,CAAC;AAEF,eAA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AAI,qLAEhB,CAAC;AAEF,eAAO,MAAM,WAAW,8HAEvB,CAAC;AAEF,eAAO,MAAM,YAAY,qHAExB,CAAC;AAEF,eAAO,MAAM,WAAW,iEAEvB,CAAC;AAIF,eAAO,MAAM,eAAe,qNAE3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,yIAEjC,CAAC;AAEF,eAAO,MAAM,4BAA4B,qJAExC,CAAC;AAEF,eAAO,MAAM,4BAA4B,iJAExC,CAAC;AAEF,eAAO,MAAM,4BAA4B,oKAExC,CAAC;AAEF,eAAO,MAAM,4BAA4B,oEAExC,CAAC"}
@@ -27,6 +27,39 @@ export const ROTATE_API_KEY = `
27
27
  export const REVOKE_API_KEY = `
28
28
  mutation($id: ID!) { revokeApiKey(id: $id) { id name isActive revokedAt } }
29
29
  `;
30
+ // --- Auth Providers ---
31
+ export const LIST_AUTH_PROVIDERS = `
32
+ query($enabledOnly: Boolean) {
33
+ customerAuthProviders(enabledOnly: $enabledOnly) {
34
+ id key name type enabled isDefault priority createdAt updatedAt
35
+ }
36
+ }
37
+ `;
38
+ export const GET_AUTH_PROVIDER = `
39
+ query($id: ID!) {
40
+ customerAuthProvider(id: $id) {
41
+ id key name type configDisplay enabled isDefault priority
42
+ verifyExternalCustomer captureMetadata createdAt updatedAt createdBy updatedBy
43
+ }
44
+ }
45
+ `;
46
+ export const CREATE_AUTH_PROVIDER = `
47
+ mutation($input: CreateAuthProviderInput!) {
48
+ createCustomerAuthProvider(input: $input) {
49
+ id key name type enabled isDefault priority createdAt
50
+ }
51
+ }
52
+ `;
53
+ export const UPDATE_AUTH_PROVIDER = `
54
+ mutation($id: ID!, $input: UpdateAuthProviderInput!) {
55
+ updateCustomerAuthProvider(id: $id, input: $input) {
56
+ id key name type enabled isDefault priority updatedAt
57
+ }
58
+ }
59
+ `;
60
+ export const DELETE_AUTH_PROVIDER = `
61
+ mutation($id: ID!) { deleteCustomerAuthProvider(id: $id) }
62
+ `;
30
63
  // --- Records ---
31
64
  export const RECORD = `
32
65
  query($id: ID!) { record(id: $id) { id modelKey naturalKey recordType parentId data metadata currentVersionId publishedVersionId publishedVersionNumber publishedAt publishedBy publishStatus versionNumber customerId createdAt updatedAt createdBy updatedBy } }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eide/foir-cli",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Universal platform CLI for EIDE — scriptable, composable resource management",
5
5
  "type": "module",
6
6
  "publishConfig": {