@eide/foir-cli 0.5.6 → 0.5.7

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.
@@ -16,7 +16,11 @@
16
16
  * });
17
17
  * ```
18
18
  */
19
- interface FieldDefinitionInput {
19
+ interface SelectFieldConfig extends Record<string, unknown> {
20
+ optionModelKey: string;
21
+ multiple?: boolean;
22
+ }
23
+ type FieldDefinitionInput = {
20
24
  key: string;
21
25
  type: string;
22
26
  label?: string;
@@ -29,7 +33,11 @@ interface FieldDefinitionInput {
29
33
  storage?: string;
30
34
  templateZone?: string;
31
35
  zoneOrder?: number;
32
- }
36
+ };
37
+ type SelectFieldDefinitionInput = Omit<FieldDefinitionInput, 'type' | 'config'> & {
38
+ type: 'select';
39
+ config: SelectFieldConfig;
40
+ };
33
41
  interface ApplyConfigModelInput {
34
42
  key: string;
35
43
  name: string;
@@ -247,6 +255,8 @@ declare const defineExtension: typeof defineConfig;
247
255
  declare function defineModel(model: ApplyConfigModelInput): ApplyConfigModelInput;
248
256
  /** Define a field with type safety. */
249
257
  declare function defineField(field: FieldDefinitionInput): FieldDefinitionInput;
258
+ /** Define a select field — requires `optionModelKey` pointing to a model whose records become options. */
259
+ declare function defineSelectField(field: SelectFieldDefinitionInput): FieldDefinitionInput;
250
260
  /** Define an operation with type safety. */
251
261
  declare function defineOperation(operation: ApplyConfigOperationInput): ApplyConfigOperationInput;
252
262
  /** Define a segment with type safety. */
@@ -264,4 +274,4 @@ declare function defineIntegration(integration: IntegrationInput): IntegrationIn
264
274
  /** Define an extension declaration. */
265
275
  declare function defineExtensionDeclaration(extension: ExtensionInput): ExtensionInput;
266
276
 
267
- export { type ApplyConfigApiKeyInput, type ApplyConfigAuthProviderInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigScheduleInput, type ApplyConfigSegmentInput, type CredentialStrategy, type ExpressionPrecondition, type ExtensionInput, type ExtensionPlacementInput, type ExtensionTarget, type FieldDefinitionInput, type IntegrationCredentialsInput, type IntegrationInput, type IntegrationMiddlewareInput, type IntegrationSyncMappingInput, type ModelSeedFieldInput, type ModelSeedInput, type Precondition, type QuotaRule, type SegmentPrecondition, defineAuthProvider, defineConfig, defineExtension, defineExtensionDeclaration, defineField, defineHook, defineIntegration, defineModel, defineOperation, definePlacement, defineSchedule, defineSegment };
277
+ export { type ApplyConfigApiKeyInput, type ApplyConfigAuthProviderInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigScheduleInput, type ApplyConfigSegmentInput, type CredentialStrategy, type ExpressionPrecondition, type ExtensionInput, type ExtensionPlacementInput, type ExtensionTarget, type FieldDefinitionInput, type IntegrationCredentialsInput, type IntegrationInput, type IntegrationMiddlewareInput, type IntegrationSyncMappingInput, type ModelSeedFieldInput, type ModelSeedInput, type Precondition, type QuotaRule, type SegmentPrecondition, type SelectFieldConfig, type SelectFieldDefinitionInput, defineAuthProvider, defineConfig, defineExtension, defineExtensionDeclaration, defineField, defineHook, defineIntegration, defineModel, defineOperation, definePlacement, defineSchedule, defineSegment, defineSelectField };
@@ -9,6 +9,9 @@ function defineModel(model) {
9
9
  function defineField(field) {
10
10
  return field;
11
11
  }
12
+ function defineSelectField(field) {
13
+ return field;
14
+ }
12
15
  function defineOperation(operation) {
13
16
  return operation;
14
17
  }
@@ -45,5 +48,6 @@ export {
45
48
  defineOperation,
46
49
  definePlacement,
47
50
  defineSchedule,
48
- defineSegment
51
+ defineSegment,
52
+ defineSelectField
49
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eide/foir-cli",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Universal platform CLI for Foir platform",
5
5
  "type": "module",
6
6
  "publishConfig": {