@eide/foir-cli 0.1.35 → 0.1.36

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.
Files changed (227) hide show
  1. package/dist/cli.js +7467 -42
  2. package/dist/config/types.d.ts +7 -6
  3. package/dist/config/types.js +6 -14
  4. package/dist/generated-CPsQ9jfu.d.ts +195 -0
  5. package/dist/lib/extension-helpers.d.ts +10 -7
  6. package/dist/lib/extension-helpers.js +15 -85
  7. package/dist/lib/hook-helpers.d.ts +9 -6
  8. package/dist/lib/hook-helpers.js +12 -105
  9. package/dist/lib/seed-helpers.d.ts +10 -8
  10. package/dist/lib/seed-helpers.js +18 -124
  11. package/package.json +9 -8
  12. package/dist/auth/credentials.d.ts +0 -31
  13. package/dist/auth/credentials.d.ts.map +0 -1
  14. package/dist/auth/credentials.js +0 -139
  15. package/dist/cli.d.ts +0 -3
  16. package/dist/cli.d.ts.map +0 -1
  17. package/dist/codegen/fetch-customer-profile-schema.d.ts +0 -12
  18. package/dist/codegen/fetch-customer-profile-schema.d.ts.map +0 -1
  19. package/dist/codegen/fetch-customer-profile-schema.js +0 -21
  20. package/dist/codegen/fetch-models.d.ts +0 -58
  21. package/dist/codegen/fetch-models.d.ts.map +0 -1
  22. package/dist/codegen/fetch-models.js +0 -96
  23. package/dist/codegen/field-mapping.d.ts +0 -34
  24. package/dist/codegen/field-mapping.d.ts.map +0 -1
  25. package/dist/codegen/field-mapping.js +0 -250
  26. package/dist/codegen/generators/config.d.ts +0 -5
  27. package/dist/codegen/generators/config.d.ts.map +0 -1
  28. package/dist/codegen/generators/config.js +0 -82
  29. package/dist/codegen/generators/customer-profile-documents.d.ts +0 -5
  30. package/dist/codegen/generators/customer-profile-documents.d.ts.map +0 -1
  31. package/dist/codegen/generators/customer-profile-documents.js +0 -42
  32. package/dist/codegen/generators/customer-profile-hooks.d.ts +0 -5
  33. package/dist/codegen/generators/customer-profile-hooks.d.ts.map +0 -1
  34. package/dist/codegen/generators/customer-profile-hooks.js +0 -78
  35. package/dist/codegen/generators/customer-profile-loaders.d.ts +0 -5
  36. package/dist/codegen/generators/customer-profile-loaders.d.ts.map +0 -1
  37. package/dist/codegen/generators/customer-profile-loaders.js +0 -67
  38. package/dist/codegen/generators/customer-profile-operations.d.ts +0 -5
  39. package/dist/codegen/generators/customer-profile-operations.d.ts.map +0 -1
  40. package/dist/codegen/generators/customer-profile-operations.js +0 -126
  41. package/dist/codegen/generators/customer-profile-types.d.ts +0 -6
  42. package/dist/codegen/generators/customer-profile-types.d.ts.map +0 -1
  43. package/dist/codegen/generators/customer-profile-types.js +0 -45
  44. package/dist/codegen/generators/documents.d.ts +0 -12
  45. package/dist/codegen/generators/documents.d.ts.map +0 -1
  46. package/dist/codegen/generators/documents.js +0 -178
  47. package/dist/codegen/generators/field-types.d.ts +0 -5
  48. package/dist/codegen/generators/field-types.d.ts.map +0 -1
  49. package/dist/codegen/generators/field-types.js +0 -346
  50. package/dist/codegen/generators/model-index.d.ts +0 -6
  51. package/dist/codegen/generators/model-index.d.ts.map +0 -1
  52. package/dist/codegen/generators/model-index.js +0 -26
  53. package/dist/codegen/generators/model-types.d.ts +0 -12
  54. package/dist/codegen/generators/model-types.d.ts.map +0 -1
  55. package/dist/codegen/generators/model-types.js +0 -177
  56. package/dist/codegen/generators/public-schema-content.d.ts +0 -14
  57. package/dist/codegen/generators/public-schema-content.d.ts.map +0 -1
  58. package/dist/codegen/generators/public-schema-content.js +0 -22
  59. package/dist/codegen/generators/react-hooks-index.d.ts +0 -6
  60. package/dist/codegen/generators/react-hooks-index.d.ts.map +0 -1
  61. package/dist/codegen/generators/react-hooks-index.js +0 -20
  62. package/dist/codegen/generators/react-hooks.d.ts +0 -7
  63. package/dist/codegen/generators/react-hooks.d.ts.map +0 -1
  64. package/dist/codegen/generators/react-hooks.js +0 -139
  65. package/dist/codegen/generators/remix-loaders-index.d.ts +0 -6
  66. package/dist/codegen/generators/remix-loaders-index.d.ts.map +0 -1
  67. package/dist/codegen/generators/remix-loaders-index.js +0 -20
  68. package/dist/codegen/generators/remix-loaders.d.ts +0 -7
  69. package/dist/codegen/generators/remix-loaders.d.ts.map +0 -1
  70. package/dist/codegen/generators/remix-loaders.js +0 -107
  71. package/dist/codegen/generators/static-documents.d.ts +0 -14
  72. package/dist/codegen/generators/static-documents.d.ts.map +0 -1
  73. package/dist/codegen/generators/static-documents.js +0 -771
  74. package/dist/codegen/generators/swift-customer-profile.d.ts +0 -9
  75. package/dist/codegen/generators/swift-customer-profile.d.ts.map +0 -1
  76. package/dist/codegen/generators/swift-customer-profile.js +0 -152
  77. package/dist/codegen/generators/swift-field-types.d.ts +0 -5
  78. package/dist/codegen/generators/swift-field-types.d.ts.map +0 -1
  79. package/dist/codegen/generators/swift-field-types.js +0 -151
  80. package/dist/codegen/generators/swift-model-keys.d.ts +0 -6
  81. package/dist/codegen/generators/swift-model-keys.d.ts.map +0 -1
  82. package/dist/codegen/generators/swift-model-keys.js +0 -25
  83. package/dist/codegen/generators/swift-types.d.ts +0 -13
  84. package/dist/codegen/generators/swift-types.d.ts.map +0 -1
  85. package/dist/codegen/generators/swift-types.js +0 -188
  86. package/dist/codegen/generators/typed-operations-common.d.ts +0 -6
  87. package/dist/codegen/generators/typed-operations-common.d.ts.map +0 -1
  88. package/dist/codegen/generators/typed-operations-common.js +0 -84
  89. package/dist/codegen/generators/typed-operations-index.d.ts +0 -6
  90. package/dist/codegen/generators/typed-operations-index.d.ts.map +0 -1
  91. package/dist/codegen/generators/typed-operations-index.js +0 -22
  92. package/dist/codegen/generators/typed-operations.d.ts +0 -11
  93. package/dist/codegen/generators/typed-operations.d.ts.map +0 -1
  94. package/dist/codegen/generators/typed-operations.js +0 -263
  95. package/dist/codegen/swift-field-mapping.d.ts +0 -30
  96. package/dist/codegen/swift-field-mapping.d.ts.map +0 -1
  97. package/dist/codegen/swift-field-mapping.js +0 -150
  98. package/dist/codegen/write-files.d.ts +0 -15
  99. package/dist/codegen/write-files.d.ts.map +0 -1
  100. package/dist/codegen/write-files.js +0 -36
  101. package/dist/commands/api-keys.d.ts +0 -4
  102. package/dist/commands/api-keys.d.ts.map +0 -1
  103. package/dist/commands/api-keys.js +0 -129
  104. package/dist/commands/auth-config.d.ts +0 -4
  105. package/dist/commands/auth-config.d.ts.map +0 -1
  106. package/dist/commands/auth-config.js +0 -38
  107. package/dist/commands/auth-providers.d.ts +0 -4
  108. package/dist/commands/auth-providers.d.ts.map +0 -1
  109. package/dist/commands/auth-providers.js +0 -207
  110. package/dist/commands/context.d.ts +0 -4
  111. package/dist/commands/context.d.ts.map +0 -1
  112. package/dist/commands/context.js +0 -91
  113. package/dist/commands/create-extension.d.ts +0 -4
  114. package/dist/commands/create-extension.d.ts.map +0 -1
  115. package/dist/commands/create-extension.js +0 -60
  116. package/dist/commands/customer-profiles.d.ts +0 -4
  117. package/dist/commands/customer-profiles.d.ts.map +0 -1
  118. package/dist/commands/customer-profiles.js +0 -99
  119. package/dist/commands/customers.d.ts +0 -4
  120. package/dist/commands/customers.d.ts.map +0 -1
  121. package/dist/commands/customers.js +0 -126
  122. package/dist/commands/embeddings.d.ts +0 -4
  123. package/dist/commands/embeddings.d.ts.map +0 -1
  124. package/dist/commands/embeddings.js +0 -145
  125. package/dist/commands/experiments.d.ts +0 -4
  126. package/dist/commands/experiments.d.ts.map +0 -1
  127. package/dist/commands/experiments.js +0 -196
  128. package/dist/commands/extensions.d.ts +0 -4
  129. package/dist/commands/extensions.d.ts.map +0 -1
  130. package/dist/commands/extensions.js +0 -210
  131. package/dist/commands/files.d.ts +0 -4
  132. package/dist/commands/files.d.ts.map +0 -1
  133. package/dist/commands/files.js +0 -143
  134. package/dist/commands/hooks.d.ts +0 -4
  135. package/dist/commands/hooks.d.ts.map +0 -1
  136. package/dist/commands/hooks.js +0 -228
  137. package/dist/commands/locales.d.ts +0 -4
  138. package/dist/commands/locales.d.ts.map +0 -1
  139. package/dist/commands/locales.js +0 -140
  140. package/dist/commands/login.d.ts +0 -4
  141. package/dist/commands/login.d.ts.map +0 -1
  142. package/dist/commands/login.js +0 -124
  143. package/dist/commands/logout.d.ts +0 -4
  144. package/dist/commands/logout.d.ts.map +0 -1
  145. package/dist/commands/logout.js +0 -16
  146. package/dist/commands/media.d.ts +0 -4
  147. package/dist/commands/media.d.ts.map +0 -1
  148. package/dist/commands/media.js +0 -44
  149. package/dist/commands/models.d.ts +0 -4
  150. package/dist/commands/models.d.ts.map +0 -1
  151. package/dist/commands/models.js +0 -153
  152. package/dist/commands/notes.d.ts +0 -4
  153. package/dist/commands/notes.d.ts.map +0 -1
  154. package/dist/commands/notes.js +0 -132
  155. package/dist/commands/notifications.d.ts +0 -4
  156. package/dist/commands/notifications.d.ts.map +0 -1
  157. package/dist/commands/notifications.js +0 -73
  158. package/dist/commands/operations.d.ts +0 -4
  159. package/dist/commands/operations.d.ts.map +0 -1
  160. package/dist/commands/operations.js +0 -341
  161. package/dist/commands/playground.d.ts +0 -4
  162. package/dist/commands/playground.d.ts.map +0 -1
  163. package/dist/commands/playground.js +0 -270
  164. package/dist/commands/pull.d.ts +0 -4
  165. package/dist/commands/pull.d.ts.map +0 -1
  166. package/dist/commands/pull.js +0 -300
  167. package/dist/commands/records.d.ts +0 -4
  168. package/dist/commands/records.d.ts.map +0 -1
  169. package/dist/commands/records.js +0 -314
  170. package/dist/commands/register-commands.d.ts +0 -7
  171. package/dist/commands/register-commands.d.ts.map +0 -1
  172. package/dist/commands/register-commands.js +0 -259
  173. package/dist/commands/schedules.d.ts +0 -4
  174. package/dist/commands/schedules.d.ts.map +0 -1
  175. package/dist/commands/schedules.js +0 -155
  176. package/dist/commands/search.d.ts +0 -4
  177. package/dist/commands/search.d.ts.map +0 -1
  178. package/dist/commands/search.js +0 -60
  179. package/dist/commands/segments.d.ts +0 -4
  180. package/dist/commands/segments.d.ts.map +0 -1
  181. package/dist/commands/segments.js +0 -155
  182. package/dist/commands/select-project.d.ts +0 -4
  183. package/dist/commands/select-project.d.ts.map +0 -1
  184. package/dist/commands/select-project.js +0 -144
  185. package/dist/commands/settings.d.ts +0 -4
  186. package/dist/commands/settings.d.ts.map +0 -1
  187. package/dist/commands/settings.js +0 -115
  188. package/dist/commands/variant-catalog.d.ts +0 -4
  189. package/dist/commands/variant-catalog.d.ts.map +0 -1
  190. package/dist/commands/variant-catalog.js +0 -118
  191. package/dist/commands/whoami.d.ts +0 -4
  192. package/dist/commands/whoami.d.ts.map +0 -1
  193. package/dist/commands/whoami.js +0 -51
  194. package/dist/config/pull-config.d.ts +0 -33
  195. package/dist/config/pull-config.d.ts.map +0 -1
  196. package/dist/config/pull-config.js +0 -119
  197. package/dist/config/types.d.ts.map +0 -1
  198. package/dist/graphql/generated.d.ts +0 -6074
  199. package/dist/graphql/generated.d.ts.map +0 -1
  200. package/dist/graphql/generated.js +0 -355
  201. package/dist/lib/client.d.ts +0 -18
  202. package/dist/lib/client.d.ts.map +0 -1
  203. package/dist/lib/client.js +0 -64
  204. package/dist/lib/config-loader.d.ts +0 -28
  205. package/dist/lib/config-loader.d.ts.map +0 -1
  206. package/dist/lib/config-loader.js +0 -49
  207. package/dist/lib/config.d.ts +0 -12
  208. package/dist/lib/config.d.ts.map +0 -1
  209. package/dist/lib/config.js +0 -8
  210. package/dist/lib/errors.d.ts +0 -6
  211. package/dist/lib/errors.d.ts.map +0 -1
  212. package/dist/lib/errors.js +0 -76
  213. package/dist/lib/extension-helpers.d.ts.map +0 -1
  214. package/dist/lib/hook-helpers.d.ts.map +0 -1
  215. package/dist/lib/input.d.ts +0 -38
  216. package/dist/lib/input.d.ts.map +0 -1
  217. package/dist/lib/input.js +0 -108
  218. package/dist/lib/output.d.ts +0 -31
  219. package/dist/lib/output.d.ts.map +0 -1
  220. package/dist/lib/output.js +0 -107
  221. package/dist/lib/seed-helpers.d.ts.map +0 -1
  222. package/dist/scaffold/package-manager.d.ts +0 -12
  223. package/dist/scaffold/package-manager.d.ts.map +0 -1
  224. package/dist/scaffold/package-manager.js +0 -51
  225. package/dist/scaffold/scaffold.d.ts +0 -4
  226. package/dist/scaffold/scaffold.d.ts.map +0 -1
  227. package/dist/scaffold/scaffold.js +0 -462
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Configuration types for foir-cli
3
3
  */
4
- export type CodegenTarget = 'react' | 'remix';
5
- export interface DomainConfig {
4
+ type CodegenTarget = 'react' | 'remix';
5
+ interface DomainConfig {
6
6
  auth?: boolean;
7
7
  authProviders?: boolean;
8
8
  files?: boolean;
@@ -14,7 +14,7 @@ export interface DomainConfig {
14
14
  embeddings?: boolean;
15
15
  analytics?: boolean;
16
16
  }
17
- export interface FoirPullConfig {
17
+ interface FoirPullConfig {
18
18
  output?: {
19
19
  /** Directory for generated TypeScript types (default: './src/generated/types') */
20
20
  types?: string;
@@ -40,7 +40,7 @@ export interface FoirPullConfig {
40
40
  /** Format output with Prettier (default: true) */
41
41
  prettier?: boolean;
42
42
  }
43
- export interface FoirConfig {
43
+ interface FoirConfig {
44
44
  pull?: FoirPullConfig;
45
45
  }
46
46
  /**
@@ -52,5 +52,6 @@ export interface FoirConfig {
52
52
  * export default defineConfig({ pull: { output: { types: './src/generated' } } });
53
53
  * ```
54
54
  */
55
- export declare function defineConfig(config: FoirConfig): FoirConfig;
56
- //# sourceMappingURL=types.d.ts.map
55
+ declare function defineConfig(config: FoirConfig): FoirConfig;
56
+
57
+ export { type CodegenTarget, type DomainConfig, type FoirConfig, type FoirPullConfig, defineConfig };
@@ -1,15 +1,7 @@
1
- /**
2
- * Configuration types for foir-cli
3
- */
4
- /**
5
- * Helper to create a type-safe foir config.
6
- * Used in foir.config.ts files:
7
- *
8
- * ```ts
9
- * import { defineConfig } from '@eide/foir-cli/config';
10
- * export default defineConfig({ pull: { output: { types: './src/generated' } } });
11
- * ```
12
- */
13
- export function defineConfig(config) {
14
- return config;
1
+ // src/config/types.ts
2
+ function defineConfig(config) {
3
+ return config;
15
4
  }
5
+ export {
6
+ defineConfig
7
+ };
@@ -0,0 +1,195 @@
1
+ type Maybe<T> = T | null;
2
+ type InputMaybe<T> = Maybe<T>;
3
+ /** All built-in and custom scalars, mapped to their actual values */
4
+ type Scalars = {
5
+ ID: {
6
+ input: string;
7
+ output: string;
8
+ };
9
+ String: {
10
+ input: string;
11
+ output: string;
12
+ };
13
+ Boolean: {
14
+ input: boolean;
15
+ output: boolean;
16
+ };
17
+ Int: {
18
+ input: number;
19
+ output: number;
20
+ };
21
+ Float: {
22
+ input: number;
23
+ output: number;
24
+ };
25
+ /** The `BigInt` scalar type represents non-fractional signed whole numeric values. */
26
+ BigInt: {
27
+ input: any;
28
+ output: any;
29
+ };
30
+ DateTime: {
31
+ input: string;
32
+ output: string;
33
+ };
34
+ JSON: {
35
+ input: unknown;
36
+ output: unknown;
37
+ };
38
+ };
39
+ type CreateHookInput = {
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 = {
90
+ captureMetadata?: InputMaybe<Scalars['Boolean']['input']>;
91
+ config: Scalars['JSON']['input'];
92
+ enabled?: InputMaybe<Scalars['Boolean']['input']>;
93
+ isDefault?: InputMaybe<Scalars['Boolean']['input']>;
94
+ key: Scalars['String']['input'];
95
+ name: Scalars['String']['input'];
96
+ priority?: InputMaybe<Scalars['Int']['input']>;
97
+ type: Scalars['String']['input'];
98
+ verifyExternalCustomer?: InputMaybe<Scalars['Boolean']['input']>;
99
+ };
100
+ type InstallExtensionCustomerProfileSchemaInput = {
101
+ /** Array of field definitions for customer profile */
102
+ fields: Array<FieldDefinitionInput>;
103
+ publicFields?: InputMaybe<Array<Scalars['String']['input']>>;
104
+ };
105
+ /** Full extension provisioning input — one manifest, full setup. */
106
+ type InstallExtensionInput = {
107
+ authProviders?: InputMaybe<Array<InstallExtensionAuthProviderInput>>;
108
+ config?: InputMaybe<Scalars['JSON']['input']>;
109
+ connectionDomain?: InputMaybe<Scalars['String']['input']>;
110
+ credentials?: InputMaybe<Scalars['JSON']['input']>;
111
+ customerProfileSchema?: InputMaybe<InstallExtensionCustomerProfileSchemaInput>;
112
+ description?: InputMaybe<Scalars['String']['input']>;
113
+ direction?: InputMaybe<Scalars['String']['input']>;
114
+ extensionType?: InputMaybe<Scalars['String']['input']>;
115
+ /** If true, delete existing extension before installing (force reinstall) */
116
+ force?: InputMaybe<Scalars['Boolean']['input']>;
117
+ key: Scalars['String']['input'];
118
+ models?: InputMaybe<Array<InstallExtensionModelInput>>;
119
+ name: Scalars['String']['input'];
120
+ /** Base URL prepended to relative operation endpoints */
121
+ operationBaseUrl?: InputMaybe<Scalars['String']['input']>;
122
+ operations?: InputMaybe<Array<InstallExtensionOperationInput>>;
123
+ placements?: InputMaybe<Array<InstallExtensionPlacementInput>>;
124
+ };
125
+ type InstallExtensionModelInput = {
126
+ category?: InputMaybe<Scalars['String']['input']>;
127
+ config?: InputMaybe<ModelConfigInput>;
128
+ description?: InputMaybe<Scalars['String']['input']>;
129
+ /** Array of field definitions (must be an array, not an object!) */
130
+ fields: Array<FieldDefinitionInput>;
131
+ hooks?: InputMaybe<Scalars['JSON']['input']>;
132
+ icon?: InputMaybe<Scalars['String']['input']>;
133
+ key: Scalars['String']['input'];
134
+ name: Scalars['String']['input'];
135
+ pluralName?: InputMaybe<Scalars['String']['input']>;
136
+ };
137
+ type InstallExtensionOperationInput = {
138
+ category?: InputMaybe<Scalars['String']['input']>;
139
+ description?: InputMaybe<Scalars['String']['input']>;
140
+ endpoint: Scalars['String']['input'];
141
+ key: Scalars['String']['input'];
142
+ name: Scalars['String']['input'];
143
+ retryPolicy?: InputMaybe<RetryPolicyInput>;
144
+ timeoutMs?: InputMaybe<Scalars['Int']['input']>;
145
+ touchPoints?: InputMaybe<Array<Scalars['String']['input']>>;
146
+ };
147
+ type InstallExtensionPlacementInput = {
148
+ allowedOrigin?: InputMaybe<Scalars['String']['input']>;
149
+ height?: InputMaybe<Scalars['String']['input']>;
150
+ hideContentTab?: InputMaybe<Scalars['Boolean']['input']>;
151
+ modelKeys?: InputMaybe<Array<Scalars['String']['input']>>;
152
+ tabName?: InputMaybe<Scalars['String']['input']>;
153
+ type: Scalars['String']['input'];
154
+ url: Scalars['String']['input'];
155
+ };
156
+ /** Model configuration options */
157
+ type ModelConfigInput = {
158
+ customerScoped?: InputMaybe<Scalars['Boolean']['input']>;
159
+ publishing?: InputMaybe<Scalars['Boolean']['input']>;
160
+ sharing?: InputMaybe<SharingConfigInput>;
161
+ variants?: InputMaybe<Scalars['Boolean']['input']>;
162
+ versioning?: InputMaybe<Scalars['Boolean']['input']>;
163
+ };
164
+ /** Retry policy for operations */
165
+ type RetryPolicyInput = {
166
+ backoffMs: Scalars['Int']['input'];
167
+ backoffMultiplier: Scalars['Float']['input'];
168
+ maxRetries: Scalars['Int']['input'];
169
+ };
170
+ /** Sharing configuration */
171
+ type SharingConfigInput = {
172
+ enabled: Scalars['Boolean']['input'];
173
+ requireAcceptance?: InputMaybe<Scalars['Boolean']['input']>;
174
+ };
175
+ type UpdateHookInput = {
176
+ description?: InputMaybe<Scalars['String']['input']>;
177
+ event?: InputMaybe<HookEvent>;
178
+ filter?: InputMaybe<HookFilterInput>;
179
+ isActive?: InputMaybe<Scalars['Boolean']['input']>;
180
+ name?: InputMaybe<Scalars['String']['input']>;
181
+ notificationConfig?: InputMaybe<Scalars['JSON']['input']>;
182
+ operationKey?: InputMaybe<Scalars['String']['input']>;
183
+ targetType?: InputMaybe<Scalars['String']['input']>;
184
+ };
185
+ /**
186
+ * Input type for validation rules
187
+ * The rule can be a simple string (e.g., "required", "email") or a complex expression object
188
+ */
189
+ type ValidationRuleInput = {
190
+ message?: InputMaybe<Scalars['String']['input']>;
191
+ rule: Scalars['JSON']['input'];
192
+ value?: InputMaybe<Scalars['JSON']['input']>;
193
+ };
194
+
195
+ export type { CreateHookInput as C, FieldDefinitionInput as F, HookFilterInput as H, InstallExtensionInput as I, UpdateHookInput as U, InstallExtensionModelInput as a, InstallExtensionOperationInput as b, InstallExtensionAuthProviderInput as c, InstallExtensionCustomerProfileSchemaInput as d, InstallExtensionPlacementInput as e, HookEvent as f, CreateModelInput as g, CreateRecordInput as h };
@@ -1,3 +1,6 @@
1
+ import { I as InstallExtensionInput, F as FieldDefinitionInput, a as InstallExtensionModelInput, b as InstallExtensionOperationInput } from '../generated-CPsQ9jfu.js';
2
+ export { c as InstallExtensionAuthProviderInput, d as InstallExtensionCustomerProfileSchemaInput, e as InstallExtensionPlacementInput } from '../generated-CPsQ9jfu.js';
3
+
1
4
  /**
2
5
  * Extension configuration helpers.
3
6
  *
@@ -15,7 +18,7 @@
15
18
  * });
16
19
  * ```
17
20
  */
18
- import type { InstallExtensionInput, InstallExtensionModelInput, FieldDefinitionInput, InstallExtensionOperationInput } from '../graphql/generated.js';
21
+
19
22
  /**
20
23
  * Define an extension manifest with full type safety.
21
24
  *
@@ -37,7 +40,7 @@ import type { InstallExtensionInput, InstallExtensionModelInput, FieldDefinition
37
40
  * });
38
41
  * ```
39
42
  */
40
- export declare function defineExtension(config: InstallExtensionInput): InstallExtensionInput;
43
+ declare function defineExtension(config: InstallExtensionInput): InstallExtensionInput;
41
44
  /**
42
45
  * Define a model with type-safe field definitions.
43
46
  *
@@ -52,7 +55,7 @@ export declare function defineExtension(config: InstallExtensionInput): InstallE
52
55
  * });
53
56
  * ```
54
57
  */
55
- export declare function defineModel(model: InstallExtensionModelInput): InstallExtensionModelInput;
58
+ declare function defineModel(model: InstallExtensionModelInput): InstallExtensionModelInput;
56
59
  /**
57
60
  * Define a field with type safety.
58
61
  *
@@ -66,7 +69,7 @@ export declare function defineModel(model: InstallExtensionModelInput): InstallE
66
69
  * });
67
70
  * ```
68
71
  */
69
- export declare function defineField(field: FieldDefinitionInput): FieldDefinitionInput;
72
+ declare function defineField(field: FieldDefinitionInput): FieldDefinitionInput;
70
73
  /**
71
74
  * Define an operation with type safety.
72
75
  *
@@ -79,6 +82,6 @@ export declare function defineField(field: FieldDefinitionInput): FieldDefinitio
79
82
  * });
80
83
  * ```
81
84
  */
82
- export declare function defineOperation(operation: InstallExtensionOperationInput): InstallExtensionOperationInput;
83
- export type { InstallExtensionInput, InstallExtensionModelInput, FieldDefinitionInput, InstallExtensionOperationInput, InstallExtensionAuthProviderInput, InstallExtensionPlacementInput, InstallExtensionCustomerProfileSchemaInput, } from '../graphql/generated.js';
84
- //# sourceMappingURL=extension-helpers.d.ts.map
85
+ declare function defineOperation(operation: InstallExtensionOperationInput): InstallExtensionOperationInput;
86
+
87
+ export { FieldDefinitionInput, InstallExtensionInput, InstallExtensionModelInput, InstallExtensionOperationInput, defineExtension, defineField, defineModel, defineOperation };
@@ -1,89 +1,19 @@
1
- /**
2
- * Extension configuration helpers.
3
- *
4
- * These helpers provide type-safe configuration for extension installation
5
- * using types generated from the platform's GraphQL schema.
6
- *
7
- * @example
8
- * ```typescript
9
- * import { defineExtension } from '@eide/foir-cli/extensions';
10
- *
11
- * export default defineExtension({
12
- * key: 'my-extension',
13
- * name: 'My Extension',
14
- * models: [...]
15
- * });
16
- * ```
17
- */
18
- /**
19
- * Define an extension manifest with full type safety.
20
- *
21
- * This is a pass-through function that provides IntelliSense and
22
- * compile-time validation for extension configurations.
23
- *
24
- * @example
25
- * ```typescript
26
- * export default defineExtension({
27
- * key: 'my-extension',
28
- * name: 'My Extension',
29
- * models: [{
30
- * key: 'my_model',
31
- * name: 'My Model',
32
- * fields: [
33
- * { key: 'title', type: 'text', label: 'Title', required: true }
34
- * ]
35
- * }]
36
- * });
37
- * ```
38
- */
39
- export function defineExtension(config) {
40
- return config;
1
+ // src/lib/extension-helpers.ts
2
+ function defineExtension(config) {
3
+ return config;
41
4
  }
42
- /**
43
- * Define a model with type-safe field definitions.
44
- *
45
- * @example
46
- * ```typescript
47
- * const myModel = defineModel({
48
- * key: 'my_model',
49
- * name: 'My Model',
50
- * fields: [
51
- * { key: 'title', type: 'text', label: 'Title', required: true }
52
- * ]
53
- * });
54
- * ```
55
- */
56
- export function defineModel(model) {
57
- return model;
5
+ function defineModel(model) {
6
+ return model;
58
7
  }
59
- /**
60
- * Define a field with type safety.
61
- *
62
- * @example
63
- * ```typescript
64
- * const titleField = defineField({
65
- * key: 'title',
66
- * type: 'text',
67
- * label: 'Title',
68
- * required: true
69
- * });
70
- * ```
71
- */
72
- export function defineField(field) {
73
- return field;
8
+ function defineField(field) {
9
+ return field;
74
10
  }
75
- /**
76
- * Define an operation with type safety.
77
- *
78
- * @example
79
- * ```typescript
80
- * const myOperation = defineOperation({
81
- * key: 'my-operation',
82
- * name: 'My Operation',
83
- * endpoint: '/operations/my-operation'
84
- * });
85
- * ```
86
- */
87
- export function defineOperation(operation) {
88
- return operation;
11
+ function defineOperation(operation) {
12
+ return operation;
89
13
  }
14
+ export {
15
+ defineExtension,
16
+ defineField,
17
+ defineModel,
18
+ defineOperation
19
+ };
@@ -1,3 +1,6 @@
1
+ import { C as CreateHookInput, H as HookFilterInput } from '../generated-CPsQ9jfu.js';
2
+ export { f as HookEvent, U as UpdateHookInput } from '../generated-CPsQ9jfu.js';
3
+
1
4
  /**
2
5
  * Hook configuration helpers.
3
6
  *
@@ -26,7 +29,7 @@
26
29
  * });
27
30
  * ```
28
31
  */
29
- import type { CreateHookInput, HookFilterInput } from '../graphql/generated.js';
32
+
30
33
  /**
31
34
  * Define a hook with full type safety.
32
35
  *
@@ -71,7 +74,7 @@ import type { CreateHookInput, HookFilterInput } from '../graphql/generated.js';
71
74
  * });
72
75
  * ```
73
76
  */
74
- export declare function defineHook(hook: CreateHookInput): CreateHookInput;
77
+ declare function defineHook(hook: CreateHookInput): CreateHookInput;
75
78
  /**
76
79
  * Define multiple hooks with type safety.
77
80
  *
@@ -83,7 +86,7 @@ export declare function defineHook(hook: CreateHookInput): CreateHookInput;
83
86
  * ]);
84
87
  * ```
85
88
  */
86
- export declare function defineHooks(hooks: CreateHookInput[]): CreateHookInput[];
89
+ declare function defineHooks(hooks: CreateHookInput[]): CreateHookInput[];
87
90
  /**
88
91
  * Define a hook filter with type safety.
89
92
  *
@@ -100,6 +103,6 @@ export declare function defineHooks(hooks: CreateHookInput[]): CreateHookInput[]
100
103
  * });
101
104
  * ```
102
105
  */
103
- export declare function defineHookFilter(filter: HookFilterInput): HookFilterInput;
104
- export type { CreateHookInput, UpdateHookInput, HookFilterInput, HookEvent, } from '../graphql/generated.js';
105
- //# sourceMappingURL=hook-helpers.d.ts.map
106
+ declare function defineHookFilter(filter: HookFilterInput): HookFilterInput;
107
+
108
+ export { CreateHookInput, HookFilterInput, defineHook, defineHookFilter, defineHooks };
@@ -1,108 +1,15 @@
1
- /**
2
- * Hook configuration helpers.
3
- *
4
- * These helpers provide type-safe configuration for creating and managing
5
- * hooks using types generated from the platform's GraphQL schema.
6
- *
7
- * @example
8
- * ```typescript
9
- * import { defineHook } from '@eide/foir-cli/hooks';
10
- *
11
- * export default defineHook({
12
- * key: 'notify-on-publish',
13
- * name: 'Notify on Publish',
14
- * event: 'RECORD_PUBLISHED',
15
- * targetType: 'operation',
16
- * operationKey: 'send-notification',
17
- * filter: {
18
- * modelKey: 'blog_post',
19
- * condition: {
20
- * type: 'condition',
21
- * left: { type: 'context', path: 'customer.profile.plan' },
22
- * operator: 'in',
23
- * right: { type: 'literal', value: ['pro', 'enterprise'] },
24
- * },
25
- * },
26
- * });
27
- * ```
28
- */
29
- /**
30
- * Define a hook with full type safety.
31
- *
32
- * Provides IntelliSense for all hook fields including:
33
- * - `key`, `name`, `event` (required)
34
- * - `targetType`: 'operation' (default) or 'notification'
35
- * - `operationKey`: key of the operation to execute (when targetType='operation')
36
- * - `notificationConfig`: notification settings (when targetType='notification')
37
- * - `filter.modelKey`: only fire for records of this model
38
- * - `filter.customerSegmentKey`: only fire for customers in this segment
39
- * - `filter.condition`: rule expression (JSON) for conditional execution
40
- *
41
- * @example
42
- * ```typescript
43
- * // Operation hook
44
- * const hook = defineHook({
45
- * key: 'sync-on-create',
46
- * name: 'Sync on Create',
47
- * event: 'RECORD_CREATED',
48
- * operationKey: 'sync-to-external',
49
- * filter: { modelKey: 'product' },
50
- * });
51
- *
52
- * // Notification hook with condition
53
- * const notifyHook = defineHook({
54
- * key: 'alert-vip-update',
55
- * name: 'Alert on VIP Update',
56
- * event: 'RECORD_UPDATED',
57
- * targetType: 'notification',
58
- * notificationConfig: {
59
- * title: 'VIP record updated',
60
- * audience: { type: 'segment', segmentId: 'vip-customers' },
61
- * },
62
- * filter: {
63
- * condition: {
64
- * type: 'condition',
65
- * left: { type: 'context', path: 'customer.profile.tier' },
66
- * operator: 'equals',
67
- * right: { type: 'literal', value: 'vip', valueType: 'string' },
68
- * },
69
- * },
70
- * });
71
- * ```
72
- */
73
- export function defineHook(hook) {
74
- return hook;
1
+ // src/lib/hook-helpers.ts
2
+ function defineHook(hook) {
3
+ return hook;
75
4
  }
76
- /**
77
- * Define multiple hooks with type safety.
78
- *
79
- * @example
80
- * ```typescript
81
- * export const hooks = defineHooks([
82
- * { key: 'on-create', name: 'On Create', event: 'RECORD_CREATED', operationKey: 'sync' },
83
- * { key: 'on-delete', name: 'On Delete', event: 'RECORD_DELETED', operationKey: 'cleanup' },
84
- * ]);
85
- * ```
86
- */
87
- export function defineHooks(hooks) {
88
- return hooks;
5
+ function defineHooks(hooks) {
6
+ return hooks;
89
7
  }
90
- /**
91
- * Define a hook filter with type safety.
92
- *
93
- * @example
94
- * ```typescript
95
- * const filter = defineHookFilter({
96
- * modelKey: 'blog_post',
97
- * condition: {
98
- * type: 'condition',
99
- * left: { type: 'field', path: 'status' },
100
- * operator: 'equals',
101
- * right: { type: 'literal', value: 'published', valueType: 'string' },
102
- * },
103
- * });
104
- * ```
105
- */
106
- export function defineHookFilter(filter) {
107
- return filter;
8
+ function defineHookFilter(filter) {
9
+ return filter;
108
10
  }
11
+ export {
12
+ defineHook,
13
+ defineHookFilter,
14
+ defineHooks
15
+ };
@@ -1,3 +1,5 @@
1
+ import { F as FieldDefinitionInput, g as CreateModelInput, h as CreateRecordInput } from '../generated-CPsQ9jfu.js';
2
+
1
3
  /**
2
4
  * Model and record seed configuration helpers.
3
5
  *
@@ -27,7 +29,7 @@
27
29
  * ]);
28
30
  * ```
29
31
  */
30
- import type { CreateModelInput, CreateRecordInput, FieldDefinitionInput } from '../graphql/generated.js';
32
+
31
33
  /**
32
34
  * Define a single model with type safety.
33
35
  *
@@ -46,7 +48,7 @@ import type { CreateModelInput, CreateRecordInput, FieldDefinitionInput } from '
46
48
  * });
47
49
  * ```
48
50
  */
49
- export declare function defineModel(model: CreateModelInput): CreateModelInput;
51
+ declare function defineModel(model: CreateModelInput): CreateModelInput;
50
52
  /**
51
53
  * Define multiple models with type safety.
52
54
  *
@@ -66,7 +68,7 @@ export declare function defineModel(model: CreateModelInput): CreateModelInput;
66
68
  * ]);
67
69
  * ```
68
70
  */
69
- export declare function defineModels(models: CreateModelInput[]): CreateModelInput[];
71
+ declare function defineModels(models: CreateModelInput[]): CreateModelInput[];
70
72
  /**
71
73
  * Define a single record with type safety.
72
74
  *
@@ -82,7 +84,7 @@ export declare function defineModels(models: CreateModelInput[]): CreateModelInp
82
84
  * });
83
85
  * ```
84
86
  */
85
- export declare function defineRecord(record: CreateRecordInput): CreateRecordInput;
87
+ declare function defineRecord(record: CreateRecordInput): CreateRecordInput;
86
88
  /**
87
89
  * Define multiple records with type safety.
88
90
  *
@@ -102,7 +104,7 @@ export declare function defineRecord(record: CreateRecordInput): CreateRecordInp
102
104
  * ]);
103
105
  * ```
104
106
  */
105
- export declare function defineRecords(records: CreateRecordInput[]): CreateRecordInput[];
107
+ declare function defineRecords(records: CreateRecordInput[]): CreateRecordInput[];
106
108
  /**
107
109
  * Define a field with type safety.
108
110
  * Alias of the extension helper for convenience.
@@ -117,6 +119,6 @@ export declare function defineRecords(records: CreateRecordInput[]): CreateRecor
117
119
  * });
118
120
  * ```
119
121
  */
120
- export declare function defineField(field: FieldDefinitionInput): FieldDefinitionInput;
121
- export type { CreateModelInput, CreateRecordInput, FieldDefinitionInput, } from '../graphql/generated.js';
122
- //# sourceMappingURL=seed-helpers.d.ts.map
122
+ declare function defineField(field: FieldDefinitionInput): FieldDefinitionInput;
123
+
124
+ export { CreateModelInput, CreateRecordInput, FieldDefinitionInput, defineField, defineModel, defineModels, defineRecord, defineRecords };