@eide/foir-cli 0.4.5 → 0.4.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.
package/dist/cli.js CHANGED
@@ -4601,6 +4601,7 @@ async function reconcileModels(client, configId, models, summary) {
4601
4601
  manifestKeys.add(m.key);
4602
4602
  const config2 = { ...m.config };
4603
4603
  if (m.pluralName) config2.pluralName = m.pluralName;
4604
+ if (m.pluralKey) config2.pluralKey = m.pluralKey;
4604
4605
  if (m.description) config2.description = m.description;
4605
4606
  const ex = existingByKey.get(m.key);
4606
4607
  if (ex) {
@@ -34,10 +34,25 @@ interface ApplyConfigModelInput {
34
34
  key: string;
35
35
  name: string;
36
36
  pluralName?: string;
37
+ pluralKey?: string;
37
38
  description?: string;
38
39
  fields?: FieldDefinitionInput[];
39
40
  config?: Record<string, unknown>;
40
41
  }
42
+ interface QuotaRule {
43
+ /** Segment key to target (empty string or omitted = default/fallback). */
44
+ segmentKey?: string;
45
+ /** Max requests allowed in the window (0 = unlimited). */
46
+ points: number;
47
+ /** Window duration in seconds (3600=1hr, 86400=1day, 604800=7day, 2592000=30day). */
48
+ duration: number;
49
+ /** Scope for tracking: per customer, per user, or per tenant. */
50
+ scope: 'customer' | 'user' | 'tenant';
51
+ /** Optional rule expression condition. */
52
+ condition?: Record<string, unknown>;
53
+ /** Optional expiry — rule is ignored after this date (ISO 8601). */
54
+ expiresAt?: string;
55
+ }
41
56
  interface ApplyConfigOperationInput {
42
57
  key: string;
43
58
  name: string;
@@ -52,8 +67,10 @@ interface ApplyConfigOperationInput {
52
67
  outputSchema?: Record<string, unknown>;
53
68
  /** Streaming configuration for SSE/chunked responses. */
54
69
  streamConfig?: Record<string, unknown>;
55
- /** Usage quota rules (e.g., rate limits per customer). */
56
- quotas?: Record<string, unknown>;
70
+ /** Usage quota rules (rate limits per customer/user/tenant). */
71
+ quotas?: {
72
+ rules: QuotaRule[];
73
+ };
57
74
  /** Retry policy for failed executions. */
58
75
  retryPolicy?: Record<string, unknown>;
59
76
  /** Roles allowed to execute this operation. */
@@ -170,4 +187,4 @@ declare function defineHook(hook: ApplyConfigHookInput): ApplyConfigHookInput;
170
187
  /** Define an editor placement (sidebar or main-editor tab). */
171
188
  declare function definePlacement(placement: ApplyConfigPlacementInput): ApplyConfigPlacementInput;
172
189
 
173
- export { type ApplyConfigApiKeyInput, 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 };
190
+ export { type ApplyConfigApiKeyInput, type ApplyConfigAuthProviderInput, type ApplyConfigHookInput, type ApplyConfigInput, type ApplyConfigModelInput, type ApplyConfigOperationInput, type ApplyConfigPlacementInput, type ApplyConfigScheduleInput, type ApplyConfigSegmentInput, type FieldDefinitionInput, type QuotaRule, defineAuthProvider, defineConfig, defineExtension, defineField, defineHook, defineModel, defineOperation, definePlacement, defineSchedule, defineSegment };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eide/foir-cli",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "description": "Universal platform CLI for Foir platform",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -49,7 +49,7 @@
49
49
  "@bufbuild/protobuf": "^2.0.0",
50
50
  "@connectrpc/connect": "^2.0.0",
51
51
  "@connectrpc/connect-node": "^2.0.0",
52
- "@eide/foir-proto-ts": "^0.3.3",
52
+ "@eide/foir-proto-ts": "^0.3.5",
53
53
  "chalk": "^5.3.0",
54
54
  "commander": "^12.1.0",
55
55
  "dotenv": "^16.4.5",