@eide/foir-cli 0.1.45 → 0.1.47

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.
@@ -36,57 +36,7 @@ type Scalars = {
36
36
  output: unknown;
37
37
  };
38
38
  };
39
- type CreateHookInput = {
40
- description?: InputMaybe<Scalars['String']['input']>;
41
- event: HookEvent;
42
- filter?: InputMaybe<HookFilterInput>;
43
- isActive?: InputMaybe<Scalars['Boolean']['input']>;
44
- key: Scalars['String']['input'];
45
- name: Scalars['String']['input'];
46
- notificationConfig?: InputMaybe<Scalars['JSON']['input']>;
47
- operationKey?: InputMaybe<Scalars['String']['input']>;
48
- targetType?: InputMaybe<Scalars['String']['input']>;
49
- };
50
- type CreateModelInput = {
51
- config?: InputMaybe<Scalars['JSON']['input']>;
52
- extensionId?: InputMaybe<Scalars['String']['input']>;
53
- fields: Scalars['JSON']['input'];
54
- key: Scalars['String']['input'];
55
- name: Scalars['String']['input'];
56
- };
57
- type CreateRecordInput = {
58
- changeDescription?: InputMaybe<Scalars['String']['input']>;
59
- customerId?: InputMaybe<Scalars['String']['input']>;
60
- data?: InputMaybe<Scalars['JSON']['input']>;
61
- hooks?: InputMaybe<Scalars['Boolean']['input']>;
62
- metadata?: InputMaybe<Scalars['JSON']['input']>;
63
- modelKey: Scalars['String']['input'];
64
- naturalKey?: InputMaybe<Scalars['String']['input']>;
65
- validate?: InputMaybe<Scalars['Boolean']['input']>;
66
- };
67
- /** Field definition for a model */
68
- type FieldDefinitionInput = {
69
- config?: InputMaybe<Scalars['JSON']['input']>;
70
- defaultValue?: InputMaybe<Scalars['JSON']['input']>;
71
- helpText?: InputMaybe<Scalars['String']['input']>;
72
- id?: InputMaybe<Scalars['String']['input']>;
73
- isTranslatable?: InputMaybe<Scalars['Boolean']['input']>;
74
- key: Scalars['String']['input'];
75
- label: Scalars['String']['input'];
76
- placeholder?: InputMaybe<Scalars['String']['input']>;
77
- required?: InputMaybe<Scalars['Boolean']['input']>;
78
- type: Scalars['String']['input'];
79
- validation?: InputMaybe<Array<ValidationRuleInput>>;
80
- };
81
- /** Platform events that can trigger hooks. */
82
- type HookEvent = 'CUSTOMER_AUTH_PROVIDER_LINKED' | 'CUSTOMER_AUTH_PROVIDER_UNLINKED' | 'CUSTOMER_DELETED' | 'CUSTOMER_EMAIL_UPDATED' | 'CUSTOMER_EMAIL_VERIFIED' | 'CUSTOMER_PASSWORD_CHANGED' | 'CUSTOMER_PASSWORD_RESET_COMPLETED' | 'CUSTOMER_PASSWORD_RESET_REQUESTED' | 'CUSTOMER_PROFILE_UPDATED' | 'CUSTOMER_REGISTERED' | 'CUSTOMER_SESSION_CREATED' | 'CUSTOMER_SESSION_REVOKED' | 'EXTENSION_CLEANUP_STARTED' | 'EXTENSION_INITIALIZED' | 'RECORD_CREATED' | 'RECORD_DELETED' | 'RECORD_PUBLISHED' | 'RECORD_SHARED' | 'RECORD_SHARE_ACCEPTED' | 'RECORD_SHARE_REVOKED' | 'RECORD_UNPUBLISHED' | 'RECORD_UPDATED';
83
- type HookFilterInput = {
84
- condition?: InputMaybe<Scalars['JSON']['input']>;
85
- customerSegmentKey?: InputMaybe<Scalars['String']['input']>;
86
- metadata?: InputMaybe<Scalars['JSON']['input']>;
87
- modelKey?: InputMaybe<Scalars['String']['input']>;
88
- };
89
- type InstallExtensionAuthProviderInput = {
39
+ type ApplyConfigAuthProviderInput = {
90
40
  captureMetadata?: InputMaybe<Scalars['Boolean']['input']>;
91
41
  config: Scalars['JSON']['input'];
92
42
  enabled?: InputMaybe<Scalars['Boolean']['input']>;
@@ -97,36 +47,51 @@ type InstallExtensionAuthProviderInput = {
97
47
  type: Scalars['String']['input'];
98
48
  verifyExternalCustomer?: InputMaybe<Scalars['Boolean']['input']>;
99
49
  };
100
- type InstallExtensionCustomerProfileSchemaInput = {
50
+ type ApplyConfigCustomerProfileSchemaInput = {
101
51
  /** Array of field definitions for customer profile */
102
52
  fields: Array<FieldDefinitionInput>;
103
53
  publicFields?: InputMaybe<Array<Scalars['String']['input']>>;
104
54
  };
105
- /** Full extension provisioning input — one manifest, full setup. */
106
- type InstallExtensionInput = {
107
- authProviders?: InputMaybe<Array<InstallExtensionAuthProviderInput>>;
55
+ type ApplyConfigHookInput$1 = {
56
+ description?: InputMaybe<Scalars['String']['input']>;
57
+ event: Scalars['String']['input'];
58
+ filter?: InputMaybe<Scalars['JSON']['input']>;
59
+ isActive?: InputMaybe<Scalars['Boolean']['input']>;
60
+ key: Scalars['String']['input'];
61
+ name: Scalars['String']['input'];
62
+ notificationConfig?: InputMaybe<Scalars['JSON']['input']>;
63
+ operationKey?: InputMaybe<Scalars['String']['input']>;
64
+ targetType?: InputMaybe<Scalars['String']['input']>;
65
+ };
66
+ /** Full config provisioning input — one manifest, full setup. */
67
+ type ApplyConfigInput = {
68
+ authProviders?: InputMaybe<Array<ApplyConfigAuthProviderInput>>;
108
69
  config?: InputMaybe<Scalars['JSON']['input']>;
70
+ configType?: InputMaybe<Scalars['String']['input']>;
109
71
  connectionDomain?: InputMaybe<Scalars['String']['input']>;
110
72
  credentials?: InputMaybe<Scalars['JSON']['input']>;
111
- customerProfileSchema?: InputMaybe<InstallExtensionCustomerProfileSchemaInput>;
73
+ customerProfileSchema?: InputMaybe<ApplyConfigCustomerProfileSchemaInput>;
112
74
  description?: InputMaybe<Scalars['String']['input']>;
113
75
  direction?: InputMaybe<Scalars['String']['input']>;
114
- extensionType?: InputMaybe<Scalars['String']['input']>;
115
- /** If true, delete existing extension before installing (force reinstall) */
76
+ /** If true, delete existing config before applying (force reinstall) */
116
77
  force?: InputMaybe<Scalars['Boolean']['input']>;
78
+ hooks?: InputMaybe<Array<ApplyConfigHookInput$1>>;
117
79
  key: Scalars['String']['input'];
118
- models?: InputMaybe<Array<InstallExtensionModelInput>>;
80
+ models?: InputMaybe<Array<ApplyConfigModelInput>>;
119
81
  name: Scalars['String']['input'];
120
82
  /** Base URL prepended to relative operation endpoints */
121
83
  operationBaseUrl?: InputMaybe<Scalars['String']['input']>;
122
- operations?: InputMaybe<Array<InstallExtensionOperationInput>>;
123
- placements?: InputMaybe<Array<InstallExtensionPlacementInput>>;
124
- segments?: InputMaybe<Array<InstallExtensionSegmentInput>>;
84
+ operations?: InputMaybe<Array<ApplyConfigOperationInput>>;
85
+ placements?: InputMaybe<Array<ApplyConfigPlacementInput>>;
86
+ schedules?: InputMaybe<Array<ApplyConfigScheduleInput>>;
87
+ segments?: InputMaybe<Array<ApplyConfigSegmentInput>>;
125
88
  };
126
- type InstallExtensionModelInput = {
89
+ type ApplyConfigModelInput = {
127
90
  category?: InputMaybe<Scalars['String']['input']>;
128
91
  config?: InputMaybe<ModelConfigInput>;
129
92
  description?: InputMaybe<Scalars['String']['input']>;
93
+ /** Which data field to display as the record name in list views */
94
+ displayField?: InputMaybe<Scalars['String']['input']>;
130
95
  /** Array of field definitions (must be an array, not an object!) */
131
96
  fields: Array<FieldDefinitionInput>;
132
97
  hooks?: InputMaybe<Scalars['JSON']['input']>;
@@ -135,7 +100,7 @@ type InstallExtensionModelInput = {
135
100
  name: Scalars['String']['input'];
136
101
  pluralName?: InputMaybe<Scalars['String']['input']>;
137
102
  };
138
- type InstallExtensionOperationInput = {
103
+ type ApplyConfigOperationInput = {
139
104
  category?: InputMaybe<Scalars['String']['input']>;
140
105
  description?: InputMaybe<Scalars['String']['input']>;
141
106
  endpoint: Scalars['String']['input'];
@@ -147,7 +112,7 @@ type InstallExtensionOperationInput = {
147
112
  timeoutMs?: InputMaybe<Scalars['Int']['input']>;
148
113
  touchPoints?: InputMaybe<Array<Scalars['String']['input']>>;
149
114
  };
150
- type InstallExtensionPlacementInput = {
115
+ type ApplyConfigPlacementInput = {
151
116
  allowedOrigin?: InputMaybe<Scalars['String']['input']>;
152
117
  height?: InputMaybe<Scalars['String']['input']>;
153
118
  hideContentTab?: InputMaybe<Scalars['Boolean']['input']>;
@@ -156,7 +121,17 @@ type InstallExtensionPlacementInput = {
156
121
  type: Scalars['String']['input'];
157
122
  url: Scalars['String']['input'];
158
123
  };
159
- type InstallExtensionSegmentInput = {
124
+ type ApplyConfigScheduleInput = {
125
+ cron: Scalars['String']['input'];
126
+ description?: InputMaybe<Scalars['String']['input']>;
127
+ isActive?: InputMaybe<Scalars['Boolean']['input']>;
128
+ key: Scalars['String']['input'];
129
+ name: Scalars['String']['input'];
130
+ /** Key of the operation this schedule triggers */
131
+ operationKey: Scalars['String']['input'];
132
+ timezone?: InputMaybe<Scalars['String']['input']>;
133
+ };
134
+ type ApplyConfigSegmentInput = {
160
135
  description?: InputMaybe<Scalars['String']['input']>;
161
136
  evaluationMode?: InputMaybe<Scalars['String']['input']>;
162
137
  isActive?: InputMaybe<Scalars['Boolean']['input']>;
@@ -164,6 +139,20 @@ type InstallExtensionSegmentInput = {
164
139
  name: Scalars['String']['input'];
165
140
  rules: Scalars['JSON']['input'];
166
141
  };
142
+ /** Field definition for a model */
143
+ type FieldDefinitionInput = {
144
+ config?: InputMaybe<Scalars['JSON']['input']>;
145
+ defaultValue?: InputMaybe<Scalars['JSON']['input']>;
146
+ helpText?: InputMaybe<Scalars['String']['input']>;
147
+ id?: InputMaybe<Scalars['String']['input']>;
148
+ isTranslatable?: InputMaybe<Scalars['Boolean']['input']>;
149
+ key: Scalars['String']['input'];
150
+ label: Scalars['String']['input'];
151
+ placeholder?: InputMaybe<Scalars['String']['input']>;
152
+ required?: InputMaybe<Scalars['Boolean']['input']>;
153
+ type: Scalars['String']['input'];
154
+ validation?: InputMaybe<Array<ValidationRuleInput>>;
155
+ };
167
156
  /** Model configuration options */
168
157
  type ModelConfigInput = {
169
158
  customerScoped?: InputMaybe<Scalars['Boolean']['input']>;
@@ -205,16 +194,6 @@ type SharingConfigInput = {
205
194
  enabled: Scalars['Boolean']['input'];
206
195
  requireAcceptance?: InputMaybe<Scalars['Boolean']['input']>;
207
196
  };
208
- type UpdateHookInput = {
209
- description?: InputMaybe<Scalars['String']['input']>;
210
- event?: InputMaybe<HookEvent>;
211
- filter?: InputMaybe<HookFilterInput>;
212
- isActive?: InputMaybe<Scalars['Boolean']['input']>;
213
- name?: InputMaybe<Scalars['String']['input']>;
214
- notificationConfig?: InputMaybe<Scalars['JSON']['input']>;
215
- operationKey?: InputMaybe<Scalars['String']['input']>;
216
- targetType?: InputMaybe<Scalars['String']['input']>;
217
- };
218
197
  /**
219
198
  * Input type for validation rules
220
199
  * The rule can be a simple string (e.g., "required", "email") or a complex expression object
@@ -225,4 +204,45 @@ type ValidationRuleInput = {
225
204
  value?: InputMaybe<Scalars['JSON']['input']>;
226
205
  };
227
206
 
228
- export type { CreateHookInput as C, FieldDefinitionInput as F, HookFilterInput as H, InstallExtensionInput as I, UpdateHookInput as U, InstallExtensionModelInput as a, InstallExtensionOperationInput as b, InstallExtensionSegmentInput as c, InstallExtensionAuthProviderInput as d, InstallExtensionCustomerProfileSchemaInput as e, InstallExtensionPlacementInput as f, HookEvent as g, CreateModelInput as h, CreateRecordInput as i };
207
+ /**
208
+ * Config definition helpers.
209
+ *
210
+ * Type-safe helpers for building `foir.config.ts` files.
211
+ * Every function is a pass-through that provides IntelliSense
212
+ * and compile-time validation.
213
+ *
214
+ * @example
215
+ * ```typescript
216
+ * import { defineConfig } from '@eide/foir-cli/configs';
217
+ *
218
+ * export default defineConfig({
219
+ * key: 'my-app',
220
+ * name: 'My App',
221
+ * models: [...]
222
+ * });
223
+ * ```
224
+ */
225
+
226
+ type ApplyConfigHookInput = NonNullable<ApplyConfigInput['hooks']>[number];
227
+ /** Define a complete config manifest. */
228
+ declare function defineConfig(config: ApplyConfigInput): ApplyConfigInput;
229
+ /** @deprecated Use `defineConfig` instead. */
230
+ declare const defineExtension: typeof defineConfig;
231
+ /** Define a model with type-safe field definitions. */
232
+ declare function defineModel(model: ApplyConfigModelInput): ApplyConfigModelInput;
233
+ /** Define a field with type safety. */
234
+ declare function defineField(field: FieldDefinitionInput): FieldDefinitionInput;
235
+ /** Define an operation with type safety. */
236
+ declare function defineOperation(operation: ApplyConfigOperationInput): ApplyConfigOperationInput;
237
+ /** Define a segment with type safety. */
238
+ declare function defineSegment(segment: ApplyConfigSegmentInput): ApplyConfigSegmentInput;
239
+ /** Define a cron schedule for an operation. */
240
+ declare function defineSchedule(schedule: ApplyConfigScheduleInput): ApplyConfigScheduleInput;
241
+ /** Define an auth provider. */
242
+ declare function defineAuthProvider(provider: ApplyConfigAuthProviderInput): ApplyConfigAuthProviderInput;
243
+ /** Define a lifecycle hook. */
244
+ declare function defineHook(hook: ApplyConfigHookInput): ApplyConfigHookInput;
245
+ /** Define an editor placement (sidebar or main-editor tab). */
246
+ declare function definePlacement(placement: ApplyConfigPlacementInput): ApplyConfigPlacementInput;
247
+
248
+ export { type ApplyConfigAuthProviderInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigScheduleInput, type ApplyConfigSegmentInput, type FieldDefinitionInput, defineAuthProvider, defineConfig, defineExtension, defineField, defineHook, defineModel, defineOperation, definePlacement, defineSchedule, defineSegment };
@@ -0,0 +1,41 @@
1
+ // src/lib/config-helpers.ts
2
+ function defineConfig(config) {
3
+ return config;
4
+ }
5
+ var defineExtension = defineConfig;
6
+ function defineModel(model) {
7
+ return model;
8
+ }
9
+ function defineField(field) {
10
+ return field;
11
+ }
12
+ function defineOperation(operation) {
13
+ return operation;
14
+ }
15
+ function defineSegment(segment) {
16
+ return segment;
17
+ }
18
+ function defineSchedule(schedule) {
19
+ return schedule;
20
+ }
21
+ function defineAuthProvider(provider) {
22
+ return provider;
23
+ }
24
+ function defineHook(hook) {
25
+ return hook;
26
+ }
27
+ function definePlacement(placement) {
28
+ return placement;
29
+ }
30
+ export {
31
+ defineAuthProvider,
32
+ defineConfig,
33
+ defineExtension,
34
+ defineField,
35
+ defineHook,
36
+ defineModel,
37
+ defineOperation,
38
+ definePlacement,
39
+ defineSchedule,
40
+ defineSegment
41
+ };
@@ -434,23 +434,23 @@ type Query {
434
434
  defaultVariantCatalogEntry: VariantCatalogEntry
435
435
 
436
436
  """
437
- List extensions for the current project.
437
+ List configs for the current project.
438
438
  Filtered by headers-based context.
439
439
  """
440
- extensions(extensionType: String, direction: String, enabled: Boolean, syncStatus: String, limit: Int, offset: Int): [Extension!]!
440
+ configs(configType: String, direction: String, enabled: Boolean, syncStatus: String, limit: Int, offset: Int): [Config!]!
441
441
 
442
- """Get a single extension by ID."""
443
- extension(id: ID!): Extension
442
+ """Get a single config by ID."""
443
+ config(id: ID!): Config
444
444
 
445
- """Get a single extension by key."""
446
- extensionByKey(key: String!): Extension
445
+ """Get a single config by key."""
446
+ configByKey(key: String!): Config
447
447
 
448
448
  """
449
- Get all editor extension placements for a model.
449
+ Get all editor config placements for a model.
450
450
  Returns both main-editor and sidebar placements with credentials.
451
451
  Optionally filter by placementType ('main-editor' or 'sidebar').
452
452
  """
453
- extensionsForEditor(modelKey: String!, placementType: String): [EditorExtensionPlacement!]!
453
+ configsForEditor(modelKey: String!, placementType: String): [EditorConfigPlacement!]!
454
454
 
455
455
  """
456
456
  Get applicable operations for a given context.
@@ -519,7 +519,7 @@ type Query {
519
519
  modelByKey(key: String!): Model
520
520
 
521
521
  """List all models with optional filtering"""
522
- models(search: String, filters: [FilterInput!], category: String, extensionId: String, limit: Int, offset: Int): ModelList!
522
+ models(search: String, filters: [FilterInput!], category: String, configId: String, limit: Int, offset: Int): ModelList!
523
523
 
524
524
  """List schema versions for a model"""
525
525
  modelVersions(modelId: ID!, limit: Int, offset: Int): ModelVersionList!
@@ -993,28 +993,28 @@ type Mutation {
993
993
  deleteVariantCatalogEntry(id: ID!): Boolean!
994
994
  ensureDefaultVariantCatalogEntry: VariantCatalogEntry!
995
995
 
996
- """Register a new extension."""
997
- registerExtension(input: RegisterExtensionInput!): Extension!
996
+ """Register a new config."""
997
+ registerConfig(input: RegisterConfigInput!): Config!
998
998
 
999
- """Update an existing extension."""
1000
- updateExtension(id: ID!, input: UpdateExtensionInput!): Extension!
999
+ """Update an existing config."""
1000
+ updateConfig(id: ID!, input: UpdateConfigInput!): Config!
1001
1001
 
1002
- """Unregister an extension."""
1003
- unregisterExtension(id: ID!): Boolean!
1002
+ """Unregister a config."""
1003
+ unregisterConfig(id: ID!): Boolean!
1004
1004
 
1005
1005
  """
1006
- Trigger data sync for a read-direction extension.
1007
- Calls the extension API's sync endpoint with stored credentials.
1006
+ Trigger data sync for a read-direction config.
1007
+ Calls the config API's sync endpoint with stored credentials.
1008
1008
  """
1009
- triggerExtensionSync(extensionId: ID!): TriggerExtensionSyncResult!
1009
+ triggerConfigSync(configId: ID!): TriggerConfigSyncResult!
1010
1010
 
1011
1011
  """
1012
- Install (or update) an extension with full provisioning:
1012
+ Apply (or update) a config with full provisioning:
1013
1013
  models, operations, API keys, webhook secret, auth providers, customer profile schema.
1014
- First call creates the extension and returns credentials.
1014
+ First call creates the config and returns credentials.
1015
1015
  Subsequent calls update models/operations without regenerating credentials.
1016
1016
  """
1017
- installExtension(input: InstallExtensionInput!): InstallExtensionResult!
1017
+ applyConfig(input: ApplyConfigInput!): ApplyConfigResult!
1018
1018
 
1019
1019
  """Execute an operation by key."""
1020
1020
  executeOperation(input: ExecuteOperationInput!): ExecuteOperationResult!
@@ -4325,12 +4325,12 @@ input UpdateVariantCatalogInput {
4325
4325
  }
4326
4326
 
4327
4327
  """
4328
- Extension — platform extensions and external integrations (Design System, Shopify, Contentful, etc.)
4328
+ Config — platform configs and external integrations (Design System, Shopify, Contentful, etc.)
4329
4329
  """
4330
- type Extension {
4330
+ type Config {
4331
4331
  id: ID!
4332
4332
  key: String!
4333
- extensionType: String!
4333
+ configType: String!
4334
4334
  direction: String!
4335
4335
  name: String!
4336
4336
  description: String
@@ -4348,12 +4348,12 @@ type Extension {
4348
4348
  }
4349
4349
 
4350
4350
  """
4351
- Editor extension placement with credentials.
4352
- Returned by extensionsForEditor query.
4351
+ Editor config placement with credentials.
4352
+ Returned by configsForEditor query.
4353
4353
  """
4354
- type EditorExtensionPlacement {
4355
- extensionId: ID!
4356
- extensionKey: String!
4354
+ type EditorConfigPlacement {
4355
+ configId: ID!
4356
+ configKey: String!
4357
4357
  label: String!
4358
4358
 
4359
4359
  """'main-editor' or 'sidebar'"""
@@ -4370,16 +4370,16 @@ type EditorExtensionPlacement {
4370
4370
  connectionDomain: String
4371
4371
  }
4372
4372
 
4373
- """Result of triggering extension sync"""
4374
- type TriggerExtensionSyncResult {
4373
+ """Result of triggering config sync"""
4374
+ type TriggerConfigSyncResult {
4375
4375
  success: Boolean!
4376
4376
  error: String
4377
4377
  results: JSON
4378
4378
  }
4379
4379
 
4380
- input RegisterExtensionInput {
4380
+ input RegisterConfigInput {
4381
4381
  key: String!
4382
- extensionType: String!
4382
+ configType: String!
4383
4383
  direction: String
4384
4384
  name: String!
4385
4385
  description: String
@@ -4395,11 +4395,11 @@ input RegisterExtensionInput {
4395
4395
  config: JSON
4396
4396
  }
4397
4397
 
4398
- """Full extension provisioning input — one manifest, full setup."""
4399
- input InstallExtensionInput {
4398
+ """Full config provisioning input — one manifest, full setup."""
4399
+ input ApplyConfigInput {
4400
4400
  key: String!
4401
4401
  name: String!
4402
- extensionType: String
4402
+ configType: String
4403
4403
  direction: String
4404
4404
  description: String
4405
4405
  connectionDomain: String
@@ -4408,14 +4408,16 @@ input InstallExtensionInput {
4408
4408
  operationBaseUrl: String
4409
4409
  config: JSON
4410
4410
  credentials: JSON
4411
- placements: [InstallExtensionPlacementInput!]
4412
- models: [InstallExtensionModelInput!]
4413
- operations: [InstallExtensionOperationInput!]
4414
- segments: [InstallExtensionSegmentInput!]
4415
- authProviders: [InstallExtensionAuthProviderInput!]
4416
- customerProfileSchema: InstallExtensionCustomerProfileSchemaInput
4417
-
4418
- """If true, delete existing extension before installing (force reinstall)"""
4411
+ placements: [ApplyConfigPlacementInput!]
4412
+ models: [ApplyConfigModelInput!]
4413
+ operations: [ApplyConfigOperationInput!]
4414
+ segments: [ApplyConfigSegmentInput!]
4415
+ schedules: [ApplyConfigScheduleInput!]
4416
+ hooks: [ApplyConfigHookInput!]
4417
+ authProviders: [ApplyConfigAuthProviderInput!]
4418
+ customerProfileSchema: ApplyConfigCustomerProfileSchemaInput
4419
+
4420
+ """If true, delete existing config before applying (force reinstall)"""
4419
4421
  force: Boolean
4420
4422
  }
4421
4423
 
@@ -4434,7 +4436,7 @@ input SharingConfigInput {
4434
4436
  requireAcceptance: Boolean
4435
4437
  }
4436
4438
 
4437
- input InstallExtensionModelInput {
4439
+ input ApplyConfigModelInput {
4438
4440
  key: String!
4439
4441
  name: String!
4440
4442
  pluralName: String
@@ -4442,6 +4444,9 @@ input InstallExtensionModelInput {
4442
4444
  category: String
4443
4445
  icon: String
4444
4446
 
4447
+ """Which data field to display as the record name in list views"""
4448
+ displayField: String
4449
+
4445
4450
  """Array of field definitions (must be an array, not an object!)"""
4446
4451
  fields: [FieldDefinitionInput!]!
4447
4452
  config: ModelConfigInput
@@ -4455,7 +4460,7 @@ input RetryPolicyInput {
4455
4460
  backoffMultiplier: Float!
4456
4461
  }
4457
4462
 
4458
- input InstallExtensionOperationInput {
4463
+ input ApplyConfigOperationInput {
4459
4464
  key: String!
4460
4465
  name: String!
4461
4466
  description: String
@@ -4468,7 +4473,7 @@ input InstallExtensionOperationInput {
4468
4473
  quotas: [OperationQuotaInput!]
4469
4474
  }
4470
4475
 
4471
- input InstallExtensionSegmentInput {
4476
+ input ApplyConfigSegmentInput {
4472
4477
  key: String!
4473
4478
  name: String!
4474
4479
  description: String
@@ -4477,7 +4482,7 @@ input InstallExtensionSegmentInput {
4477
4482
  isActive: Boolean
4478
4483
  }
4479
4484
 
4480
- input InstallExtensionAuthProviderInput {
4485
+ input ApplyConfigAuthProviderInput {
4481
4486
  key: String!
4482
4487
  name: String!
4483
4488
  type: String!
@@ -4489,13 +4494,37 @@ input InstallExtensionAuthProviderInput {
4489
4494
  verifyExternalCustomer: Boolean
4490
4495
  }
4491
4496
 
4492
- input InstallExtensionCustomerProfileSchemaInput {
4497
+ input ApplyConfigCustomerProfileSchemaInput {
4493
4498
  """Array of field definitions for customer profile"""
4494
4499
  fields: [FieldDefinitionInput!]!
4495
4500
  publicFields: [String!]
4496
4501
  }
4497
4502
 
4498
- input InstallExtensionPlacementInput {
4503
+ input ApplyConfigHookInput {
4504
+ key: String!
4505
+ name: String!
4506
+ description: String
4507
+ event: String!
4508
+ targetType: String
4509
+ operationKey: String
4510
+ notificationConfig: JSON
4511
+ filter: JSON
4512
+ isActive: Boolean
4513
+ }
4514
+
4515
+ input ApplyConfigScheduleInput {
4516
+ key: String!
4517
+ name: String!
4518
+ description: String
4519
+ cron: String!
4520
+ timezone: String
4521
+
4522
+ """Key of the operation this schedule triggers"""
4523
+ operationKey: String!
4524
+ isActive: Boolean
4525
+ }
4526
+
4527
+ input ApplyConfigPlacementInput {
4499
4528
  type: String!
4500
4529
  url: String!
4501
4530
  allowedOrigin: String
@@ -4505,30 +4534,34 @@ input InstallExtensionPlacementInput {
4505
4534
  modelKeys: [String!]
4506
4535
  }
4507
4536
 
4508
- """Result of installExtension mutation"""
4509
- type InstallExtensionResult {
4510
- extensionId: ID!
4511
- extensionKey: String!
4537
+ """Result of applyConfig mutation"""
4538
+ type ApplyConfigResult {
4539
+ configId: ID!
4540
+ configKey: String!
4512
4541
 
4513
- """Credentials returned on first install only. Null on updates."""
4514
- credentials: InstallExtensionCredentials
4542
+ """Credentials returned on first apply only. Null on updates."""
4543
+ credentials: ApplyConfigCredentials
4515
4544
  modelsCreated: Int!
4516
4545
  modelsUpdated: Int!
4517
4546
  operationsCreated: Int!
4518
4547
  operationsUpdated: Int!
4519
4548
  segmentsCreated: Int!
4520
4549
  segmentsUpdated: Int!
4550
+ schedulesCreated: Int!
4551
+ schedulesUpdated: Int!
4552
+ hooksCreated: Int!
4553
+ hooksUpdated: Int!
4521
4554
  isUpdate: Boolean!
4522
4555
  }
4523
4556
 
4524
- type InstallExtensionCredentials {
4557
+ type ApplyConfigCredentials {
4525
4558
  platformApiKey: String!
4526
4559
  platformEditorKey: String!
4527
4560
  webhookSecret: String!
4528
4561
  }
4529
4562
 
4530
- input UpdateExtensionInput {
4531
- extensionType: String
4563
+ input UpdateConfigInput {
4564
+ configType: String
4532
4565
  direction: String
4533
4566
  name: String
4534
4567
  description: String
@@ -4927,7 +4960,7 @@ type Hook {
4927
4960
  operationKey: String
4928
4961
  notificationConfig: JSON
4929
4962
  filter: HookFilter
4930
- extensionId: ID
4963
+ configId: ID
4931
4964
  isActive: Boolean!
4932
4965
  createdAt: DateTime!
4933
4966
  updatedAt: DateTime!
@@ -5110,8 +5143,8 @@ type Model {
5110
5143
  """Which data field to display as the record name in list views"""
5111
5144
  displayField: String
5112
5145
 
5113
- """Extension that owns this model"""
5114
- extensionId: String
5146
+ """Config that owns this model"""
5147
+ configId: String
5115
5148
 
5116
5149
  """Whether this is a system-provided model"""
5117
5150
  systemEntity: Boolean!
@@ -5161,7 +5194,7 @@ input CreateModelInput {
5161
5194
  name: String!
5162
5195
  fields: JSON!
5163
5196
  config: JSON
5164
- extensionId: String
5197
+ configId: String
5165
5198
  }
5166
5199
 
5167
5200
  input UpdateModelInput {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eide/foir-cli",
3
- "version": "0.1.45",
3
+ "version": "0.1.47",
4
4
  "description": "Universal platform CLI for Foir platform",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -14,17 +14,9 @@
14
14
  "types": "./dist/cli.d.ts",
15
15
  "import": "./dist/cli.js"
16
16
  },
17
- "./extensions": {
18
- "types": "./dist/lib/extension-helpers.d.ts",
19
- "import": "./dist/lib/extension-helpers.js"
20
- },
21
- "./hooks": {
22
- "types": "./dist/lib/hook-helpers.d.ts",
23
- "import": "./dist/lib/hook-helpers.js"
24
- },
25
- "./seed": {
26
- "types": "./dist/lib/seed-helpers.d.ts",
27
- "import": "./dist/lib/seed-helpers.js"
17
+ "./configs": {
18
+ "types": "./dist/lib/config-helpers.d.ts",
19
+ "import": "./dist/lib/config-helpers.js"
28
20
  }
29
21
  },
30
22
  "files": [
@@ -87,7 +79,7 @@
87
79
  },
88
80
  "repository": {
89
81
  "type": "git",
90
- "url": "https://github.com/eidebuild/eide.git",
82
+ "url": "https://github.com/eidestudio/foir.git",
91
83
  "directory": "packages/cli"
92
84
  }
93
85
  }