@eide/foir-cli 0.1.45 → 0.1.46
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 +315 -138
- package/dist/{generated-xEC9Cfzw.d.ts → lib/config-helpers.d.ts} +95 -77
- package/dist/lib/config-helpers.js +41 -0
- package/dist/schema.graphql +93 -63
- package/package.json +4 -12
- package/dist/lib/extension-helpers.d.ts +0 -100
- package/dist/lib/extension-helpers.js +0 -23
- package/dist/lib/hook-helpers.d.ts +0 -108
- package/dist/lib/hook-helpers.js +0 -15
- package/dist/lib/seed-helpers.d.ts +0 -124
- package/dist/lib/seed-helpers.js +0 -23
|
@@ -36,57 +36,7 @@ type Scalars = {
|
|
|
36
36
|
output: unknown;
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
-
type
|
|
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,33 +47,46 @@ type InstallExtensionAuthProviderInput = {
|
|
|
97
47
|
type: Scalars['String']['input'];
|
|
98
48
|
verifyExternalCustomer?: InputMaybe<Scalars['Boolean']['input']>;
|
|
99
49
|
};
|
|
100
|
-
type
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
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<
|
|
73
|
+
customerProfileSchema?: InputMaybe<ApplyConfigCustomerProfileSchemaInput>;
|
|
112
74
|
description?: InputMaybe<Scalars['String']['input']>;
|
|
113
75
|
direction?: InputMaybe<Scalars['String']['input']>;
|
|
114
|
-
|
|
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<
|
|
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<
|
|
123
|
-
placements?: InputMaybe<Array<
|
|
124
|
-
|
|
84
|
+
operations?: InputMaybe<Array<ApplyConfigOperationInput>>;
|
|
85
|
+
placements?: InputMaybe<Array<ApplyConfigPlacementInput>>;
|
|
86
|
+
schedules?: InputMaybe<Array<ApplyConfigScheduleInput>>;
|
|
87
|
+
segments?: InputMaybe<Array<ApplyConfigSegmentInput>>;
|
|
125
88
|
};
|
|
126
|
-
type
|
|
89
|
+
type ApplyConfigModelInput = {
|
|
127
90
|
category?: InputMaybe<Scalars['String']['input']>;
|
|
128
91
|
config?: InputMaybe<ModelConfigInput>;
|
|
129
92
|
description?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -135,7 +98,7 @@ type InstallExtensionModelInput = {
|
|
|
135
98
|
name: Scalars['String']['input'];
|
|
136
99
|
pluralName?: InputMaybe<Scalars['String']['input']>;
|
|
137
100
|
};
|
|
138
|
-
type
|
|
101
|
+
type ApplyConfigOperationInput = {
|
|
139
102
|
category?: InputMaybe<Scalars['String']['input']>;
|
|
140
103
|
description?: InputMaybe<Scalars['String']['input']>;
|
|
141
104
|
endpoint: Scalars['String']['input'];
|
|
@@ -147,7 +110,7 @@ type InstallExtensionOperationInput = {
|
|
|
147
110
|
timeoutMs?: InputMaybe<Scalars['Int']['input']>;
|
|
148
111
|
touchPoints?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
149
112
|
};
|
|
150
|
-
type
|
|
113
|
+
type ApplyConfigPlacementInput = {
|
|
151
114
|
allowedOrigin?: InputMaybe<Scalars['String']['input']>;
|
|
152
115
|
height?: InputMaybe<Scalars['String']['input']>;
|
|
153
116
|
hideContentTab?: InputMaybe<Scalars['Boolean']['input']>;
|
|
@@ -156,7 +119,17 @@ type InstallExtensionPlacementInput = {
|
|
|
156
119
|
type: Scalars['String']['input'];
|
|
157
120
|
url: Scalars['String']['input'];
|
|
158
121
|
};
|
|
159
|
-
type
|
|
122
|
+
type ApplyConfigScheduleInput = {
|
|
123
|
+
cron: Scalars['String']['input'];
|
|
124
|
+
description?: InputMaybe<Scalars['String']['input']>;
|
|
125
|
+
isActive?: InputMaybe<Scalars['Boolean']['input']>;
|
|
126
|
+
key: Scalars['String']['input'];
|
|
127
|
+
name: Scalars['String']['input'];
|
|
128
|
+
/** Key of the operation this schedule triggers */
|
|
129
|
+
operationKey: Scalars['String']['input'];
|
|
130
|
+
timezone?: InputMaybe<Scalars['String']['input']>;
|
|
131
|
+
};
|
|
132
|
+
type ApplyConfigSegmentInput = {
|
|
160
133
|
description?: InputMaybe<Scalars['String']['input']>;
|
|
161
134
|
evaluationMode?: InputMaybe<Scalars['String']['input']>;
|
|
162
135
|
isActive?: InputMaybe<Scalars['Boolean']['input']>;
|
|
@@ -164,6 +137,20 @@ type InstallExtensionSegmentInput = {
|
|
|
164
137
|
name: Scalars['String']['input'];
|
|
165
138
|
rules: Scalars['JSON']['input'];
|
|
166
139
|
};
|
|
140
|
+
/** Field definition for a model */
|
|
141
|
+
type FieldDefinitionInput = {
|
|
142
|
+
config?: InputMaybe<Scalars['JSON']['input']>;
|
|
143
|
+
defaultValue?: InputMaybe<Scalars['JSON']['input']>;
|
|
144
|
+
helpText?: InputMaybe<Scalars['String']['input']>;
|
|
145
|
+
id?: InputMaybe<Scalars['String']['input']>;
|
|
146
|
+
isTranslatable?: InputMaybe<Scalars['Boolean']['input']>;
|
|
147
|
+
key: Scalars['String']['input'];
|
|
148
|
+
label: Scalars['String']['input'];
|
|
149
|
+
placeholder?: InputMaybe<Scalars['String']['input']>;
|
|
150
|
+
required?: InputMaybe<Scalars['Boolean']['input']>;
|
|
151
|
+
type: Scalars['String']['input'];
|
|
152
|
+
validation?: InputMaybe<Array<ValidationRuleInput>>;
|
|
153
|
+
};
|
|
167
154
|
/** Model configuration options */
|
|
168
155
|
type ModelConfigInput = {
|
|
169
156
|
customerScoped?: InputMaybe<Scalars['Boolean']['input']>;
|
|
@@ -205,16 +192,6 @@ type SharingConfigInput = {
|
|
|
205
192
|
enabled: Scalars['Boolean']['input'];
|
|
206
193
|
requireAcceptance?: InputMaybe<Scalars['Boolean']['input']>;
|
|
207
194
|
};
|
|
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
195
|
/**
|
|
219
196
|
* Input type for validation rules
|
|
220
197
|
* The rule can be a simple string (e.g., "required", "email") or a complex expression object
|
|
@@ -225,4 +202,45 @@ type ValidationRuleInput = {
|
|
|
225
202
|
value?: InputMaybe<Scalars['JSON']['input']>;
|
|
226
203
|
};
|
|
227
204
|
|
|
228
|
-
|
|
205
|
+
/**
|
|
206
|
+
* Config definition helpers.
|
|
207
|
+
*
|
|
208
|
+
* Type-safe helpers for building `foir.config.ts` files.
|
|
209
|
+
* Every function is a pass-through that provides IntelliSense
|
|
210
|
+
* and compile-time validation.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```typescript
|
|
214
|
+
* import { defineConfig } from '@eide/foir-cli/configs';
|
|
215
|
+
*
|
|
216
|
+
* export default defineConfig({
|
|
217
|
+
* key: 'my-app',
|
|
218
|
+
* name: 'My App',
|
|
219
|
+
* models: [...]
|
|
220
|
+
* });
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
|
|
224
|
+
type ApplyConfigHookInput = NonNullable<ApplyConfigInput['hooks']>[number];
|
|
225
|
+
/** Define a complete config manifest. */
|
|
226
|
+
declare function defineConfig(config: ApplyConfigInput): ApplyConfigInput;
|
|
227
|
+
/** @deprecated Use `defineConfig` instead. */
|
|
228
|
+
declare const defineExtension: typeof defineConfig;
|
|
229
|
+
/** Define a model with type-safe field definitions. */
|
|
230
|
+
declare function defineModel(model: ApplyConfigModelInput): ApplyConfigModelInput;
|
|
231
|
+
/** Define a field with type safety. */
|
|
232
|
+
declare function defineField(field: FieldDefinitionInput): FieldDefinitionInput;
|
|
233
|
+
/** Define an operation with type safety. */
|
|
234
|
+
declare function defineOperation(operation: ApplyConfigOperationInput): ApplyConfigOperationInput;
|
|
235
|
+
/** Define a segment with type safety. */
|
|
236
|
+
declare function defineSegment(segment: ApplyConfigSegmentInput): ApplyConfigSegmentInput;
|
|
237
|
+
/** Define a cron schedule for an operation. */
|
|
238
|
+
declare function defineSchedule(schedule: ApplyConfigScheduleInput): ApplyConfigScheduleInput;
|
|
239
|
+
/** Define an auth provider. */
|
|
240
|
+
declare function defineAuthProvider(provider: ApplyConfigAuthProviderInput): ApplyConfigAuthProviderInput;
|
|
241
|
+
/** Define a lifecycle hook. */
|
|
242
|
+
declare function defineHook(hook: ApplyConfigHookInput): ApplyConfigHookInput;
|
|
243
|
+
/** Define an editor placement (sidebar or main-editor tab). */
|
|
244
|
+
declare function definePlacement(placement: ApplyConfigPlacementInput): ApplyConfigPlacementInput;
|
|
245
|
+
|
|
246
|
+
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
|
+
};
|
package/dist/schema.graphql
CHANGED
|
@@ -434,23 +434,23 @@ type Query {
|
|
|
434
434
|
defaultVariantCatalogEntry: VariantCatalogEntry
|
|
435
435
|
|
|
436
436
|
"""
|
|
437
|
-
List
|
|
437
|
+
List configs for the current project.
|
|
438
438
|
Filtered by headers-based context.
|
|
439
439
|
"""
|
|
440
|
-
|
|
440
|
+
configs(configType: String, direction: String, enabled: Boolean, syncStatus: String, limit: Int, offset: Int): [Config!]!
|
|
441
441
|
|
|
442
|
-
"""Get a single
|
|
443
|
-
|
|
442
|
+
"""Get a single config by ID."""
|
|
443
|
+
config(id: ID!): Config
|
|
444
444
|
|
|
445
|
-
"""Get a single
|
|
446
|
-
|
|
445
|
+
"""Get a single config by key."""
|
|
446
|
+
configByKey(key: String!): Config
|
|
447
447
|
|
|
448
448
|
"""
|
|
449
|
-
Get all editor
|
|
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
|
-
|
|
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,
|
|
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
|
|
997
|
-
|
|
996
|
+
"""Register a new config."""
|
|
997
|
+
registerConfig(input: RegisterConfigInput!): Config!
|
|
998
998
|
|
|
999
|
-
"""Update an existing
|
|
1000
|
-
|
|
999
|
+
"""Update an existing config."""
|
|
1000
|
+
updateConfig(id: ID!, input: UpdateConfigInput!): Config!
|
|
1001
1001
|
|
|
1002
|
-
"""Unregister
|
|
1003
|
-
|
|
1002
|
+
"""Unregister a config."""
|
|
1003
|
+
unregisterConfig(id: ID!): Boolean!
|
|
1004
1004
|
|
|
1005
1005
|
"""
|
|
1006
|
-
Trigger data sync for a read-direction
|
|
1007
|
-
Calls the
|
|
1006
|
+
Trigger data sync for a read-direction config.
|
|
1007
|
+
Calls the config API's sync endpoint with stored credentials.
|
|
1008
1008
|
"""
|
|
1009
|
-
|
|
1009
|
+
triggerConfigSync(configId: ID!): TriggerConfigSyncResult!
|
|
1010
1010
|
|
|
1011
1011
|
"""
|
|
1012
|
-
|
|
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
|
|
1014
|
+
First call creates the config and returns credentials.
|
|
1015
1015
|
Subsequent calls update models/operations without regenerating credentials.
|
|
1016
1016
|
"""
|
|
1017
|
-
|
|
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
|
-
|
|
4328
|
+
Config — platform configs and external integrations (Design System, Shopify, Contentful, etc.)
|
|
4329
4329
|
"""
|
|
4330
|
-
type
|
|
4330
|
+
type Config {
|
|
4331
4331
|
id: ID!
|
|
4332
4332
|
key: String!
|
|
4333
|
-
|
|
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
|
|
4352
|
-
Returned by
|
|
4351
|
+
Editor config placement with credentials.
|
|
4352
|
+
Returned by configsForEditor query.
|
|
4353
4353
|
"""
|
|
4354
|
-
type
|
|
4355
|
-
|
|
4356
|
-
|
|
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
|
|
4374
|
-
type
|
|
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
|
|
4380
|
+
input RegisterConfigInput {
|
|
4381
4381
|
key: String!
|
|
4382
|
-
|
|
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
|
|
4399
|
-
input
|
|
4398
|
+
"""Full config provisioning input — one manifest, full setup."""
|
|
4399
|
+
input ApplyConfigInput {
|
|
4400
4400
|
key: String!
|
|
4401
4401
|
name: String!
|
|
4402
|
-
|
|
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: [
|
|
4412
|
-
models: [
|
|
4413
|
-
operations: [
|
|
4414
|
-
segments: [
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
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
|
|
4439
|
+
input ApplyConfigModelInput {
|
|
4438
4440
|
key: String!
|
|
4439
4441
|
name: String!
|
|
4440
4442
|
pluralName: String
|
|
@@ -4455,7 +4457,7 @@ input RetryPolicyInput {
|
|
|
4455
4457
|
backoffMultiplier: Float!
|
|
4456
4458
|
}
|
|
4457
4459
|
|
|
4458
|
-
input
|
|
4460
|
+
input ApplyConfigOperationInput {
|
|
4459
4461
|
key: String!
|
|
4460
4462
|
name: String!
|
|
4461
4463
|
description: String
|
|
@@ -4468,7 +4470,7 @@ input InstallExtensionOperationInput {
|
|
|
4468
4470
|
quotas: [OperationQuotaInput!]
|
|
4469
4471
|
}
|
|
4470
4472
|
|
|
4471
|
-
input
|
|
4473
|
+
input ApplyConfigSegmentInput {
|
|
4472
4474
|
key: String!
|
|
4473
4475
|
name: String!
|
|
4474
4476
|
description: String
|
|
@@ -4477,7 +4479,7 @@ input InstallExtensionSegmentInput {
|
|
|
4477
4479
|
isActive: Boolean
|
|
4478
4480
|
}
|
|
4479
4481
|
|
|
4480
|
-
input
|
|
4482
|
+
input ApplyConfigAuthProviderInput {
|
|
4481
4483
|
key: String!
|
|
4482
4484
|
name: String!
|
|
4483
4485
|
type: String!
|
|
@@ -4489,13 +4491,37 @@ input InstallExtensionAuthProviderInput {
|
|
|
4489
4491
|
verifyExternalCustomer: Boolean
|
|
4490
4492
|
}
|
|
4491
4493
|
|
|
4492
|
-
input
|
|
4494
|
+
input ApplyConfigCustomerProfileSchemaInput {
|
|
4493
4495
|
"""Array of field definitions for customer profile"""
|
|
4494
4496
|
fields: [FieldDefinitionInput!]!
|
|
4495
4497
|
publicFields: [String!]
|
|
4496
4498
|
}
|
|
4497
4499
|
|
|
4498
|
-
input
|
|
4500
|
+
input ApplyConfigHookInput {
|
|
4501
|
+
key: String!
|
|
4502
|
+
name: String!
|
|
4503
|
+
description: String
|
|
4504
|
+
event: String!
|
|
4505
|
+
targetType: String
|
|
4506
|
+
operationKey: String
|
|
4507
|
+
notificationConfig: JSON
|
|
4508
|
+
filter: JSON
|
|
4509
|
+
isActive: Boolean
|
|
4510
|
+
}
|
|
4511
|
+
|
|
4512
|
+
input ApplyConfigScheduleInput {
|
|
4513
|
+
key: String!
|
|
4514
|
+
name: String!
|
|
4515
|
+
description: String
|
|
4516
|
+
cron: String!
|
|
4517
|
+
timezone: String
|
|
4518
|
+
|
|
4519
|
+
"""Key of the operation this schedule triggers"""
|
|
4520
|
+
operationKey: String!
|
|
4521
|
+
isActive: Boolean
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4524
|
+
input ApplyConfigPlacementInput {
|
|
4499
4525
|
type: String!
|
|
4500
4526
|
url: String!
|
|
4501
4527
|
allowedOrigin: String
|
|
@@ -4505,30 +4531,34 @@ input InstallExtensionPlacementInput {
|
|
|
4505
4531
|
modelKeys: [String!]
|
|
4506
4532
|
}
|
|
4507
4533
|
|
|
4508
|
-
"""Result of
|
|
4509
|
-
type
|
|
4510
|
-
|
|
4511
|
-
|
|
4534
|
+
"""Result of applyConfig mutation"""
|
|
4535
|
+
type ApplyConfigResult {
|
|
4536
|
+
configId: ID!
|
|
4537
|
+
configKey: String!
|
|
4512
4538
|
|
|
4513
|
-
"""Credentials returned on first
|
|
4514
|
-
credentials:
|
|
4539
|
+
"""Credentials returned on first apply only. Null on updates."""
|
|
4540
|
+
credentials: ApplyConfigCredentials
|
|
4515
4541
|
modelsCreated: Int!
|
|
4516
4542
|
modelsUpdated: Int!
|
|
4517
4543
|
operationsCreated: Int!
|
|
4518
4544
|
operationsUpdated: Int!
|
|
4519
4545
|
segmentsCreated: Int!
|
|
4520
4546
|
segmentsUpdated: Int!
|
|
4547
|
+
schedulesCreated: Int!
|
|
4548
|
+
schedulesUpdated: Int!
|
|
4549
|
+
hooksCreated: Int!
|
|
4550
|
+
hooksUpdated: Int!
|
|
4521
4551
|
isUpdate: Boolean!
|
|
4522
4552
|
}
|
|
4523
4553
|
|
|
4524
|
-
type
|
|
4554
|
+
type ApplyConfigCredentials {
|
|
4525
4555
|
platformApiKey: String!
|
|
4526
4556
|
platformEditorKey: String!
|
|
4527
4557
|
webhookSecret: String!
|
|
4528
4558
|
}
|
|
4529
4559
|
|
|
4530
|
-
input
|
|
4531
|
-
|
|
4560
|
+
input UpdateConfigInput {
|
|
4561
|
+
configType: String
|
|
4532
4562
|
direction: String
|
|
4533
4563
|
name: String
|
|
4534
4564
|
description: String
|
|
@@ -4927,7 +4957,7 @@ type Hook {
|
|
|
4927
4957
|
operationKey: String
|
|
4928
4958
|
notificationConfig: JSON
|
|
4929
4959
|
filter: HookFilter
|
|
4930
|
-
|
|
4960
|
+
configId: ID
|
|
4931
4961
|
isActive: Boolean!
|
|
4932
4962
|
createdAt: DateTime!
|
|
4933
4963
|
updatedAt: DateTime!
|
|
@@ -5110,8 +5140,8 @@ type Model {
|
|
|
5110
5140
|
"""Which data field to display as the record name in list views"""
|
|
5111
5141
|
displayField: String
|
|
5112
5142
|
|
|
5113
|
-
"""
|
|
5114
|
-
|
|
5143
|
+
"""Config that owns this model"""
|
|
5144
|
+
configId: String
|
|
5115
5145
|
|
|
5116
5146
|
"""Whether this is a system-provided model"""
|
|
5117
5147
|
systemEntity: Boolean!
|
|
@@ -5161,7 +5191,7 @@ input CreateModelInput {
|
|
|
5161
5191
|
name: String!
|
|
5162
5192
|
fields: JSON!
|
|
5163
5193
|
config: JSON
|
|
5164
|
-
|
|
5194
|
+
configId: String
|
|
5165
5195
|
}
|
|
5166
5196
|
|
|
5167
5197
|
input UpdateModelInput {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eide/foir-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.46",
|
|
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
|
-
"./
|
|
18
|
-
"types": "./dist/lib/
|
|
19
|
-
"import": "./dist/lib/
|
|
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": [
|