@foir/cli 0.61.0 → 0.62.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/cli.js +971 -646
- package/dist/lib/config-helpers.d.ts +20 -8
- package/dist/lib/config-helpers.js +3 -3
- package/package.json +3 -3
|
@@ -338,13 +338,25 @@ interface ApplyConfigOperationInput {
|
|
|
338
338
|
*/
|
|
339
339
|
responseTransform?: string;
|
|
340
340
|
}
|
|
341
|
-
|
|
341
|
+
/**
|
|
342
|
+
* A context dimension — the EID-409 home for segments. `sourceType: 'segment'`
|
|
343
|
+
* carries an `evaluationRules` RuleExpression (evaluated fresh at request time
|
|
344
|
+
* into segment.<key>); `sourceType: 'model'` designates a customer-context
|
|
345
|
+
* source model via `sourceModelKey`. Reconciled config-scoped by `foir push`
|
|
346
|
+
* (owned via config_id): dimensions this config declares are created / updated,
|
|
347
|
+
* and config-owned dimensions dropped from the config are deleted.
|
|
348
|
+
*/
|
|
349
|
+
interface ApplyConfigContextDimensionInput {
|
|
342
350
|
key: string;
|
|
343
351
|
name: string;
|
|
344
352
|
description?: string;
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
353
|
+
/** 'segment' (rule-based) | 'model' (customer-context source) | custom. */
|
|
354
|
+
sourceType: string;
|
|
355
|
+
/** Segment rule (sourceType 'segment') — a RuleExpression object. */
|
|
356
|
+
evaluationRules?: Record<string, unknown>;
|
|
357
|
+
/** Customer-owned singleton model key (sourceType 'model'). */
|
|
358
|
+
sourceModelKey?: string;
|
|
359
|
+
defaultRecordKey?: string;
|
|
348
360
|
}
|
|
349
361
|
interface ApplyConfigScheduleInput {
|
|
350
362
|
/** Unique key for this schedule. Defaults to operationKey if not provided. */
|
|
@@ -657,7 +669,7 @@ interface ApplyConfigInput {
|
|
|
657
669
|
project?: ApplyConfigProjectInput;
|
|
658
670
|
models?: ApplyConfigModelInput[];
|
|
659
671
|
operations?: ApplyConfigOperationInput[];
|
|
660
|
-
|
|
672
|
+
contextDimensions?: ApplyConfigContextDimensionInput[];
|
|
661
673
|
schedules?: ApplyConfigScheduleInput[];
|
|
662
674
|
hooks?: ApplyConfigHookInput[];
|
|
663
675
|
authProviders?: ApplyConfigAuthProviderInput[];
|
|
@@ -700,8 +712,8 @@ declare function defineDesignTokens(tokens: ApplyConfigDesignTokensInput): Apply
|
|
|
700
712
|
declare function defineEnumField(field: EnumFieldDefinitionInput): FieldDefinitionInput;
|
|
701
713
|
/** Define an operation with type safety. */
|
|
702
714
|
declare function defineOperation(operation: ApplyConfigOperationInput): ApplyConfigOperationInput;
|
|
703
|
-
/** Define a segment with type safety. */
|
|
704
|
-
declare function
|
|
715
|
+
/** Define a context dimension (segment rule / model source) with type safety. */
|
|
716
|
+
declare function defineContextDimension(dimension: ApplyConfigContextDimensionInput): ApplyConfigContextDimensionInput;
|
|
705
717
|
/** Define a cron schedule for an operation. */
|
|
706
718
|
declare function defineSchedule(schedule: ApplyConfigScheduleInput): ApplyConfigScheduleInput;
|
|
707
719
|
/** Define an auth provider. */
|
|
@@ -746,4 +758,4 @@ interface FoirSecretsConfig {
|
|
|
746
758
|
*/
|
|
747
759
|
declare function defineSecrets(config: FoirSecretsConfig): FoirSecretsConfig;
|
|
748
760
|
|
|
749
|
-
export { type AccessInput, type AppInput, type AppPlacementFieldChoiceInput, type AppSinkMappingInput, type AppSourceMappingInput, type ApplyConfigApiKeyInput, type ApplyConfigAuthProviderInput, type ApplyConfigCustomerRoleInput, type ApplyConfigDesignTokensInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigProjectInput, type ApplyConfigProjectSettingsInput, type ApplyConfigRelyingPartyInput, type ApplyConfigRelyingPartyLoginMethods, type ApplyConfigScheduleInput, type
|
|
761
|
+
export { type AccessInput, type AppInput, type AppPlacementFieldChoiceInput, type AppSinkMappingInput, type AppSourceMappingInput, type ApplyConfigApiKeyInput, type ApplyConfigAuthProviderInput, type ApplyConfigContextDimensionInput, type ApplyConfigCustomerRoleInput, type ApplyConfigDesignTokensInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigProjectInput, type ApplyConfigProjectSettingsInput, type ApplyConfigRelyingPartyInput, type ApplyConfigRelyingPartyLoginMethods, type ApplyConfigScheduleInput, type EnumFieldConfig, type EnumFieldDefinitionInput, type EnumFieldOption, type FieldAccessInput, type FieldDefinitionInput, type FieldRelationshipInput, type FoirSecretsConfig, type LookupDefinitionInput, type QuotaRule, type ReferenceFieldConfig, type ReferenceFieldDefinitionInput, type SecretDeclaration, type SecretOwnerKind, type SelectFieldConfig, type SelectFieldDefinitionInput, defineAuthProvider, defineConfig, defineContextDimension, defineDesignTokens, defineEnumField, defineField, defineHook, defineModel, defineOperation, definePlacement, defineRelyingParty, defineSchedule, defineSecrets, defineSelectField };
|
|
@@ -20,8 +20,8 @@ function defineEnumField(field) {
|
|
|
20
20
|
function defineOperation(operation) {
|
|
21
21
|
return operation;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
23
|
+
function defineContextDimension(dimension) {
|
|
24
|
+
return dimension;
|
|
25
25
|
}
|
|
26
26
|
function defineSchedule(schedule) {
|
|
27
27
|
return schedule;
|
|
@@ -44,6 +44,7 @@ function defineSecrets(config) {
|
|
|
44
44
|
export {
|
|
45
45
|
defineAuthProvider,
|
|
46
46
|
defineConfig,
|
|
47
|
+
defineContextDimension,
|
|
47
48
|
defineDesignTokens,
|
|
48
49
|
defineEnumField,
|
|
49
50
|
defineField,
|
|
@@ -54,6 +55,5 @@ export {
|
|
|
54
55
|
defineRelyingParty,
|
|
55
56
|
defineSchedule,
|
|
56
57
|
defineSecrets,
|
|
57
|
-
defineSegment,
|
|
58
58
|
defineSelectField
|
|
59
59
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@foir/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0",
|
|
4
4
|
"description": "Universal platform CLI for Foir platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"tsx": "^4.20.0",
|
|
56
56
|
"typescript": "5.9.2",
|
|
57
57
|
"vitest": "^3.2.4",
|
|
58
|
-
"@foir/
|
|
59
|
-
"@foir/
|
|
58
|
+
"@foir/rpc-node": "0.0.0",
|
|
59
|
+
"@foir/proto-ts": "0.109.0"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=18.0.0"
|