@eide/foir-cli 0.1.31 → 0.1.33
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 +0 -0
- package/dist/codegen/field-mapping.d.ts +5 -0
- package/dist/codegen/field-mapping.d.ts.map +1 -1
- package/dist/codegen/field-mapping.js +15 -0
- package/dist/codegen/generators/config.js +2 -2
- package/dist/codegen/generators/field-types.d.ts.map +1 -1
- package/dist/codegen/generators/field-types.js +20 -13
- package/dist/codegen/generators/model-types.d.ts.map +1 -1
- package/dist/codegen/generators/model-types.js +28 -4
- package/dist/codegen/generators/typed-operations-common.d.ts +1 -1
- package/dist/codegen/generators/typed-operations-common.d.ts.map +1 -1
- package/dist/codegen/generators/typed-operations-common.js +4 -2
- package/dist/codegen/generators/typed-operations.d.ts.map +1 -1
- package/dist/codegen/generators/typed-operations.js +4 -3
- package/dist/commands/hooks.d.ts.map +1 -1
- package/dist/commands/hooks.js +41 -3
- package/dist/commands/operations.d.ts.map +1 -1
- package/dist/commands/operations.js +55 -0
- package/dist/commands/pull.js +1 -1
- package/dist/graphql/generated.d.ts +68 -8
- package/dist/graphql/generated.d.ts.map +1 -1
- package/dist/graphql/generated.js +10167 -135
- package/dist/lib/hook-helpers.d.ts +105 -0
- package/dist/lib/hook-helpers.d.ts.map +1 -0
- package/dist/lib/hook-helpers.js +108 -0
- package/package.json +23 -18
|
@@ -692,7 +692,9 @@ export type CreateHookInput = {
|
|
|
692
692
|
isActive?: InputMaybe<Scalars['Boolean']['input']>;
|
|
693
693
|
key: Scalars['String']['input'];
|
|
694
694
|
name: Scalars['String']['input'];
|
|
695
|
-
|
|
695
|
+
notificationConfig?: InputMaybe<Scalars['JSON']['input']>;
|
|
696
|
+
operationKey?: InputMaybe<Scalars['String']['input']>;
|
|
697
|
+
targetType?: InputMaybe<Scalars['String']['input']>;
|
|
696
698
|
};
|
|
697
699
|
/** Input for creating an invitation */
|
|
698
700
|
export type CreateInvitationInput = {
|
|
@@ -758,6 +760,7 @@ export type CreateOperationInput = {
|
|
|
758
760
|
models?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
759
761
|
name: Scalars['String']['input'];
|
|
760
762
|
outputSchema?: InputMaybe<Scalars['JSON']['input']>;
|
|
763
|
+
quotas?: InputMaybe<Array<OperationQuotaInput>>;
|
|
761
764
|
retryPolicy?: InputMaybe<Scalars['JSON']['input']>;
|
|
762
765
|
streamConfig?: InputMaybe<OperationStreamConfigInput>;
|
|
763
766
|
timeoutMs?: InputMaybe<Scalars['Int']['input']>;
|
|
@@ -1772,17 +1775,20 @@ export type GrantAccessInput = {
|
|
|
1772
1775
|
role: AdminAccessRole;
|
|
1773
1776
|
tenantId: Scalars['ID']['input'];
|
|
1774
1777
|
};
|
|
1775
|
-
/** Event-driven hook that triggers an operation */
|
|
1778
|
+
/** Event-driven hook that triggers an operation or notification */
|
|
1776
1779
|
export type Hook = {
|
|
1777
1780
|
createdAt: Scalars['DateTime']['output'];
|
|
1778
1781
|
description?: Maybe<Scalars['String']['output']>;
|
|
1779
1782
|
event: HookEvent;
|
|
1783
|
+
extensionId?: Maybe<Scalars['ID']['output']>;
|
|
1780
1784
|
filter?: Maybe<HookFilter>;
|
|
1781
1785
|
id: Scalars['ID']['output'];
|
|
1782
1786
|
isActive: Scalars['Boolean']['output'];
|
|
1783
1787
|
key: Scalars['String']['output'];
|
|
1784
1788
|
name: Scalars['String']['output'];
|
|
1785
|
-
|
|
1789
|
+
notificationConfig?: Maybe<Scalars['JSON']['output']>;
|
|
1790
|
+
operationKey?: Maybe<Scalars['String']['output']>;
|
|
1791
|
+
targetType: Scalars['String']['output'];
|
|
1786
1792
|
updatedAt: Scalars['DateTime']['output'];
|
|
1787
1793
|
};
|
|
1788
1794
|
/** Paginated list of hooks */
|
|
@@ -1812,14 +1818,16 @@ export type HookDeliveryConnection = {
|
|
|
1812
1818
|
/** Hook delivery status */
|
|
1813
1819
|
export type HookDeliveryStatus = 'FAILED' | 'RETRYING' | 'SUCCESS';
|
|
1814
1820
|
/** Platform events that can trigger hooks. */
|
|
1815
|
-
export 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' | 'RECORD_CREATED' | 'RECORD_DELETED' | 'RECORD_PUBLISHED' | 'RECORD_SHARED' | 'RECORD_SHARE_ACCEPTED' | 'RECORD_SHARE_REVOKED' | 'RECORD_UNPUBLISHED' | 'RECORD_UPDATED';
|
|
1821
|
+
export 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';
|
|
1816
1822
|
/** Optional filter to narrow when a hook fires */
|
|
1817
1823
|
export type HookFilter = {
|
|
1824
|
+
condition?: Maybe<Scalars['JSON']['output']>;
|
|
1818
1825
|
customerSegmentKey?: Maybe<Scalars['String']['output']>;
|
|
1819
1826
|
metadata?: Maybe<Scalars['JSON']['output']>;
|
|
1820
1827
|
modelKey?: Maybe<Scalars['String']['output']>;
|
|
1821
1828
|
};
|
|
1822
1829
|
export type HookFilterInput = {
|
|
1830
|
+
condition?: InputMaybe<Scalars['JSON']['input']>;
|
|
1823
1831
|
customerSegmentKey?: InputMaybe<Scalars['String']['input']>;
|
|
1824
1832
|
metadata?: InputMaybe<Scalars['JSON']['input']>;
|
|
1825
1833
|
modelKey?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -2155,6 +2163,11 @@ export type Mutation = {
|
|
|
2155
2163
|
* Promotes winning content to the target variant and cleans up experiment artifacts.
|
|
2156
2164
|
*/
|
|
2157
2165
|
applyExperimentWinner: ApplyWinnerResult;
|
|
2166
|
+
/**
|
|
2167
|
+
* Assign a custom package to a tenant's subscription. Platform admin only.
|
|
2168
|
+
* Creates a minimal subscription if the tenant doesn't have one (no Stripe required).
|
|
2169
|
+
*/
|
|
2170
|
+
assignBillingCustomPackage: BillingSubscription;
|
|
2158
2171
|
batchPublishVersions: BatchPublishResult;
|
|
2159
2172
|
batchRecordOperations: BatchRecordOperationsResult;
|
|
2160
2173
|
bulkUpdateRecords: BulkUpdateRecordsResult;
|
|
@@ -2607,6 +2620,10 @@ export type MutationApplyExperimentWinnerArgs = {
|
|
|
2607
2620
|
experimentId: Scalars['ID']['input'];
|
|
2608
2621
|
winnerId: Scalars['String']['input'];
|
|
2609
2622
|
};
|
|
2623
|
+
export type MutationAssignBillingCustomPackageArgs = {
|
|
2624
|
+
customPackageId: Scalars['ID']['input'];
|
|
2625
|
+
tenantId: Scalars['ID']['input'];
|
|
2626
|
+
};
|
|
2610
2627
|
export type MutationBatchPublishVersionsArgs = {
|
|
2611
2628
|
batchId?: InputMaybe<Scalars['String']['input']>;
|
|
2612
2629
|
versionIds: Array<Scalars['ID']['input']>;
|
|
@@ -3439,6 +3456,8 @@ export type Operation = {
|
|
|
3439
3456
|
models?: Maybe<Array<Scalars['String']['output']>>;
|
|
3440
3457
|
name: Scalars['String']['output'];
|
|
3441
3458
|
outputSchema?: Maybe<Scalars['JSON']['output']>;
|
|
3459
|
+
/** Quota rules for rate-limiting operation executions per scope. */
|
|
3460
|
+
quotas?: Maybe<Array<Scalars['JSON']['output']>>;
|
|
3442
3461
|
retryPolicy?: Maybe<Scalars['JSON']['output']>;
|
|
3443
3462
|
/** Streaming configuration. Operations with this set support STREAM execution mode. */
|
|
3444
3463
|
streamConfig?: Maybe<OperationStreamConfig>;
|
|
@@ -3488,6 +3507,27 @@ export type OperationList = {
|
|
|
3488
3507
|
items: Array<Operation>;
|
|
3489
3508
|
total: Scalars['Int']['output'];
|
|
3490
3509
|
};
|
|
3510
|
+
/** Quota rule input for operation create/update */
|
|
3511
|
+
export type OperationQuotaInput = {
|
|
3512
|
+
/** Optional condition expression (RuleExpression as JSON) */
|
|
3513
|
+
condition?: InputMaybe<Scalars['JSON']['input']>;
|
|
3514
|
+
/** Duration window in seconds */
|
|
3515
|
+
duration: Scalars['Int']['input'];
|
|
3516
|
+
/** Max points per duration window (0 = unlimited) */
|
|
3517
|
+
points: Scalars['Int']['input'];
|
|
3518
|
+
/** Scope for quota tracking: customer, user, or tenant */
|
|
3519
|
+
scope: Scalars['String']['input'];
|
|
3520
|
+
/** Segment key to match (null = default/fallback rule) */
|
|
3521
|
+
segmentKey?: InputMaybe<Scalars['String']['input']>;
|
|
3522
|
+
};
|
|
3523
|
+
/** Operation quota usage for the current context */
|
|
3524
|
+
export type OperationQuotaUsage = {
|
|
3525
|
+
consumed: Scalars['Int']['output'];
|
|
3526
|
+
limit?: Maybe<Scalars['Int']['output']>;
|
|
3527
|
+
operationKey: Scalars['String']['output'];
|
|
3528
|
+
remaining?: Maybe<Scalars['Int']['output']>;
|
|
3529
|
+
resetsAt?: Maybe<Scalars['DateTime']['output']>;
|
|
3530
|
+
};
|
|
3491
3531
|
/** Streaming configuration for an operation */
|
|
3492
3532
|
export type OperationStreamConfig = {
|
|
3493
3533
|
/** Max gap between callback chunks in ms (default: 30000) */
|
|
@@ -3988,6 +4028,8 @@ export type Query = {
|
|
|
3988
4028
|
operationExecutionStats: OperationExecutionStats;
|
|
3989
4029
|
/** List operation executions with filtering. */
|
|
3990
4030
|
operationExecutions: OperationExecutionList;
|
|
4031
|
+
/** Get quota usage for an operation in the current context. */
|
|
4032
|
+
operationQuotaUsage?: Maybe<OperationQuotaUsage>;
|
|
3991
4033
|
/** List operations for the current project. */
|
|
3992
4034
|
operations: OperationList;
|
|
3993
4035
|
/** Get the operations signing secret status (masked). */
|
|
@@ -4469,6 +4511,9 @@ export type QueryOperationExecutionsArgs = {
|
|
|
4469
4511
|
operationKey?: InputMaybe<Scalars['String']['input']>;
|
|
4470
4512
|
status?: InputMaybe<OperationExecutionStatus>;
|
|
4471
4513
|
};
|
|
4514
|
+
export type QueryOperationQuotaUsageArgs = {
|
|
4515
|
+
operationKey: Scalars['String']['input'];
|
|
4516
|
+
};
|
|
4472
4517
|
export type QueryOperationsArgs = {
|
|
4473
4518
|
category?: InputMaybe<Scalars['String']['input']>;
|
|
4474
4519
|
isActive?: InputMaybe<Scalars['Boolean']['input']>;
|
|
@@ -5648,7 +5693,9 @@ export type UpdateHookInput = {
|
|
|
5648
5693
|
filter?: InputMaybe<HookFilterInput>;
|
|
5649
5694
|
isActive?: InputMaybe<Scalars['Boolean']['input']>;
|
|
5650
5695
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
5696
|
+
notificationConfig?: InputMaybe<Scalars['JSON']['input']>;
|
|
5651
5697
|
operationKey?: InputMaybe<Scalars['String']['input']>;
|
|
5698
|
+
targetType?: InputMaybe<Scalars['String']['input']>;
|
|
5652
5699
|
};
|
|
5653
5700
|
export type UpdateLocaleInput = {
|
|
5654
5701
|
displayName?: InputMaybe<Scalars['String']['input']>;
|
|
@@ -5705,6 +5752,7 @@ export type UpdateOperationInput = {
|
|
|
5705
5752
|
models?: InputMaybe<Array<Scalars['String']['input']>>;
|
|
5706
5753
|
name?: InputMaybe<Scalars['String']['input']>;
|
|
5707
5754
|
outputSchema?: InputMaybe<Scalars['JSON']['input']>;
|
|
5755
|
+
quotas?: InputMaybe<Array<OperationQuotaInput>>;
|
|
5708
5756
|
retryPolicy?: InputMaybe<Scalars['JSON']['input']>;
|
|
5709
5757
|
streamConfig?: InputMaybe<OperationStreamConfigInput>;
|
|
5710
5758
|
timeoutMs?: InputMaybe<Scalars['Int']['input']>;
|
|
@@ -6791,12 +6839,16 @@ export type ListHooksQuery = {
|
|
|
6791
6839
|
key: string;
|
|
6792
6840
|
name: string;
|
|
6793
6841
|
event: HookEvent;
|
|
6794
|
-
|
|
6842
|
+
targetType: string;
|
|
6843
|
+
operationKey?: string | null;
|
|
6844
|
+
notificationConfig?: unknown | null;
|
|
6795
6845
|
isActive: boolean;
|
|
6846
|
+
extensionId?: string | null;
|
|
6796
6847
|
updatedAt: string;
|
|
6797
6848
|
filter?: {
|
|
6798
6849
|
modelKey?: string | null;
|
|
6799
6850
|
customerSegmentKey?: string | null;
|
|
6851
|
+
condition?: unknown | null;
|
|
6800
6852
|
} | null;
|
|
6801
6853
|
}>;
|
|
6802
6854
|
};
|
|
@@ -6811,14 +6863,18 @@ export type GetHookByKeyQuery = {
|
|
|
6811
6863
|
name: string;
|
|
6812
6864
|
description?: string | null;
|
|
6813
6865
|
event: HookEvent;
|
|
6814
|
-
|
|
6866
|
+
targetType: string;
|
|
6867
|
+
operationKey?: string | null;
|
|
6868
|
+
notificationConfig?: unknown | null;
|
|
6815
6869
|
isActive: boolean;
|
|
6870
|
+
extensionId?: string | null;
|
|
6816
6871
|
createdAt: string;
|
|
6817
6872
|
updatedAt: string;
|
|
6818
6873
|
filter?: {
|
|
6819
6874
|
modelKey?: string | null;
|
|
6820
6875
|
customerSegmentKey?: string | null;
|
|
6821
6876
|
metadata?: unknown | null;
|
|
6877
|
+
condition?: unknown | null;
|
|
6822
6878
|
} | null;
|
|
6823
6879
|
} | null;
|
|
6824
6880
|
};
|
|
@@ -6831,7 +6887,9 @@ export type CreateHookMutation = {
|
|
|
6831
6887
|
key: string;
|
|
6832
6888
|
name: string;
|
|
6833
6889
|
event: HookEvent;
|
|
6834
|
-
|
|
6890
|
+
targetType: string;
|
|
6891
|
+
operationKey?: string | null;
|
|
6892
|
+
notificationConfig?: unknown | null;
|
|
6835
6893
|
isActive: boolean;
|
|
6836
6894
|
createdAt: string;
|
|
6837
6895
|
};
|
|
@@ -6846,7 +6904,9 @@ export type UpdateHookMutation = {
|
|
|
6846
6904
|
key: string;
|
|
6847
6905
|
name: string;
|
|
6848
6906
|
event: HookEvent;
|
|
6849
|
-
|
|
6907
|
+
targetType: string;
|
|
6908
|
+
operationKey?: string | null;
|
|
6909
|
+
notificationConfig?: unknown | null;
|
|
6850
6910
|
isActive: boolean;
|
|
6851
6911
|
updatedAt: string;
|
|
6852
6912
|
};
|