@eide/foir-cli 0.1.34 → 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 (221) hide show
  1. package/dist/cli.js +7469 -81
  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 -7
  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 -176
  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/pull.d.ts +0 -4
  162. package/dist/commands/pull.d.ts.map +0 -1
  163. package/dist/commands/pull.js +0 -300
  164. package/dist/commands/records.d.ts +0 -4
  165. package/dist/commands/records.d.ts.map +0 -1
  166. package/dist/commands/records.js +0 -314
  167. package/dist/commands/schedules.d.ts +0 -4
  168. package/dist/commands/schedules.d.ts.map +0 -1
  169. package/dist/commands/schedules.js +0 -155
  170. package/dist/commands/search.d.ts +0 -4
  171. package/dist/commands/search.d.ts.map +0 -1
  172. package/dist/commands/search.js +0 -60
  173. package/dist/commands/segments.d.ts +0 -4
  174. package/dist/commands/segments.d.ts.map +0 -1
  175. package/dist/commands/segments.js +0 -155
  176. package/dist/commands/select-project.d.ts +0 -4
  177. package/dist/commands/select-project.d.ts.map +0 -1
  178. package/dist/commands/select-project.js +0 -144
  179. package/dist/commands/settings.d.ts +0 -4
  180. package/dist/commands/settings.d.ts.map +0 -1
  181. package/dist/commands/settings.js +0 -115
  182. package/dist/commands/variant-catalog.d.ts +0 -4
  183. package/dist/commands/variant-catalog.d.ts.map +0 -1
  184. package/dist/commands/variant-catalog.js +0 -118
  185. package/dist/commands/whoami.d.ts +0 -4
  186. package/dist/commands/whoami.d.ts.map +0 -1
  187. package/dist/commands/whoami.js +0 -51
  188. package/dist/config/pull-config.d.ts +0 -33
  189. package/dist/config/pull-config.d.ts.map +0 -1
  190. package/dist/config/pull-config.js +0 -119
  191. package/dist/config/types.d.ts.map +0 -1
  192. package/dist/graphql/generated.d.ts +0 -8330
  193. package/dist/graphql/generated.d.ts.map +0 -1
  194. package/dist/graphql/generated.js +0 -135
  195. package/dist/lib/client.d.ts +0 -18
  196. package/dist/lib/client.d.ts.map +0 -1
  197. package/dist/lib/client.js +0 -64
  198. package/dist/lib/config-loader.d.ts +0 -28
  199. package/dist/lib/config-loader.d.ts.map +0 -1
  200. package/dist/lib/config-loader.js +0 -49
  201. package/dist/lib/config.d.ts +0 -12
  202. package/dist/lib/config.d.ts.map +0 -1
  203. package/dist/lib/config.js +0 -8
  204. package/dist/lib/errors.d.ts +0 -6
  205. package/dist/lib/errors.d.ts.map +0 -1
  206. package/dist/lib/errors.js +0 -76
  207. package/dist/lib/extension-helpers.d.ts.map +0 -1
  208. package/dist/lib/hook-helpers.d.ts.map +0 -1
  209. package/dist/lib/input.d.ts +0 -38
  210. package/dist/lib/input.d.ts.map +0 -1
  211. package/dist/lib/input.js +0 -108
  212. package/dist/lib/output.d.ts +0 -31
  213. package/dist/lib/output.d.ts.map +0 -1
  214. package/dist/lib/output.js +0 -107
  215. package/dist/lib/seed-helpers.d.ts.map +0 -1
  216. package/dist/scaffold/package-manager.d.ts +0 -12
  217. package/dist/scaffold/package-manager.d.ts.map +0 -1
  218. package/dist/scaffold/package-manager.js +0 -51
  219. package/dist/scaffold/scaffold.d.ts +0 -4
  220. package/dist/scaffold/scaffold.d.ts.map +0 -1
  221. package/dist/scaffold/scaffold.js +0 -462
@@ -1,771 +0,0 @@
1
- /**
2
- * Generates static .graphql files for non-model API domains.
3
- * These cover ~80% of the public API that has no model-specific typing.
4
- */
5
- const HEADER = '# @generated by foir — DO NOT EDIT MANUALLY';
6
- function authDocument() {
7
- return `# Customer authentication operations
8
- ${HEADER}
9
-
10
- mutation CustomerLogin($email: String!, $password: String!) {
11
- customerLogin(email: $email, password: $password) {
12
- success
13
- accessToken
14
- refreshToken
15
- user { id email status }
16
- }
17
- }
18
-
19
- mutation CustomerRegister($email: String!, $password: String!) {
20
- customerRegister(email: $email, password: $password) {
21
- success
22
- accessToken
23
- refreshToken
24
- user { id email status }
25
- emailVerificationRequired
26
- }
27
- }
28
-
29
- mutation CustomerRequestOTP($email: String!) {
30
- customerRequestOTP(email: $email) {
31
- success
32
- expiresAt
33
- message
34
- }
35
- }
36
-
37
- mutation CustomerLoginOTP($email: String!, $otp: String!) {
38
- customerLoginOTP(email: $email, otp: $otp) {
39
- success
40
- accessToken
41
- refreshToken
42
- user { id email status }
43
- }
44
- }
45
-
46
- mutation CustomerRefreshToken($refreshToken: String!) {
47
- customerRefreshToken(refreshToken: $refreshToken) {
48
- success
49
- accessToken
50
- refreshToken
51
- }
52
- }
53
-
54
- mutation CustomerRequestPasswordReset($email: String!) {
55
- customerRequestPasswordReset(email: $email) {
56
- success
57
- message
58
- }
59
- }
60
-
61
- mutation CustomerResetPassword($token: String!, $newPassword: String!) {
62
- customerResetPassword(token: $token, newPassword: $newPassword) {
63
- success
64
- message
65
- }
66
- }
67
-
68
- mutation CustomerUpdatePassword($currentPassword: String!, $newPassword: String!) {
69
- customerUpdatePassword(currentPassword: $currentPassword, newPassword: $newPassword) {
70
- success
71
- message
72
- }
73
- }
74
-
75
- mutation CustomerVerifyEmail($token: String!) {
76
- customerVerifyEmail(token: $token) {
77
- success
78
- user { id email }
79
- message
80
- }
81
- }
82
-
83
- mutation CustomerResendVerificationEmail {
84
- customerResendVerificationEmail {
85
- success
86
- message
87
- }
88
- }
89
-
90
- mutation CustomerLogout {
91
- customerLogout {
92
- success
93
- message
94
- }
95
- }
96
-
97
- query AuthConfig($tenantId: ID) {
98
- authConfig(tenantId: $tenantId) {
99
- authMethods
100
- passwordPolicy {
101
- minLength
102
- requireUppercase
103
- requireLowercase
104
- requireNumbers
105
- requireSpecialChars
106
- requireSpecial
107
- }
108
- publicRegistrationEnabled
109
- }
110
- }
111
-
112
- query CurrentUser {
113
- currentUser {
114
- id
115
- email
116
- emailVerified
117
- status
118
- userType
119
- }
120
- }
121
- `;
122
- }
123
- function authProvidersDocument() {
124
- return `# Auth provider operations
125
- ${HEADER}
126
-
127
- query AuthProviders {
128
- authProviders {
129
- id
130
- key
131
- name
132
- type
133
- enabled
134
- isDefault
135
- priority
136
- }
137
- }
138
-
139
- query DefaultAuthProvider {
140
- defaultAuthProvider {
141
- id
142
- key
143
- name
144
- type
145
- enabled
146
- isDefault
147
- priority
148
- }
149
- }
150
-
151
- mutation CustomerLoginWithProvider($input: ProviderLoginInput!) {
152
- customerLoginWithProvider(input: $input) {
153
- method
154
- providerId
155
- providerKey
156
- redirectUrl
157
- accessToken
158
- refreshToken
159
- user { id email userType }
160
- otpSent
161
- email
162
- expiresAt
163
- state
164
- }
165
- }
166
-
167
- mutation CustomerProviderCallback($input: ProviderCallbackInput!) {
168
- customerProviderCallback(input: $input) {
169
- accessToken
170
- refreshToken
171
- user { id email userType }
172
- isNewCustomer
173
- providerAccessToken
174
- providerAccessTokenExpiresIn
175
- }
176
- }
177
-
178
- mutation CustomerProviderVerifyOTP($input: ProviderOTPVerifyInput!) {
179
- customerProviderVerifyOTP(input: $input) {
180
- accessToken
181
- refreshToken
182
- user { id email userType }
183
- isNewCustomer
184
- providerAccessToken
185
- providerAccessTokenExpiresIn
186
- }
187
- }
188
- `;
189
- }
190
- function filesDocument() {
191
- return `# File management operations
192
- ${HEADER}
193
-
194
- query GetFile($id: ID!) {
195
- file(id: $id) {
196
- id
197
- filename
198
- mimeType
199
- size
200
- url
201
- source
202
- status
203
- metadata
204
- width
205
- height
206
- blurhash
207
- dominantColor
208
- duration
209
- thumbnailUrl
210
- previewUrl
211
- altText
212
- caption
213
- description
214
- isImage
215
- isVideo
216
- createdAt
217
- updatedAt
218
- }
219
- }
220
-
221
- mutation CreateFileUpload(
222
- $filename: String!
223
- $mimeType: String!
224
- $size: Int!
225
- $folder: String
226
- $metadata: JSON
227
- ) {
228
- createFileUpload(
229
- filename: $filename
230
- mimeType: $mimeType
231
- size: $size
232
- folder: $folder
233
- metadata: $metadata
234
- ) {
235
- uploadId
236
- uploadUrl
237
- expiresAt
238
- }
239
- }
240
-
241
- mutation ConfirmFileUpload($uploadId: ID!) {
242
- confirmFileUpload(uploadId: $uploadId) {
243
- id
244
- filename
245
- mimeType
246
- size
247
- url
248
- source
249
- status
250
- createdAt
251
- }
252
- }
253
- `;
254
- }
255
- function syncDocument() {
256
- return `# Sync engine operations (Layer 1: delta sync protocol)
257
- ${HEADER}
258
-
259
- query SyncPull($modelKey: String!, $since: String!, $limit: Int) {
260
- syncPull(modelKey: $modelKey, since: $since, limit: $limit) {
261
- items {
262
- id
263
- modelKey
264
- naturalKey
265
- data
266
- metadata
267
- syncVersion
268
- updatedAt
269
- deleted
270
- }
271
- cursor
272
- hasMore
273
- }
274
- }
275
-
276
- mutation SyncPush($items: [SyncPushItemInput!]!) {
277
- syncPush(items: $items) {
278
- items {
279
- clientId
280
- serverId
281
- syncVersion
282
- status
283
- serverData
284
- serverSyncVersion
285
- error
286
- }
287
- }
288
- }
289
-
290
- subscription RecordChanged($modelKey: String!) {
291
- recordChanged(modelKey: $modelKey) {
292
- type
293
- recordId
294
- modelKey
295
- naturalKey
296
- syncVersion
297
- data
298
- updatedBy
299
- timestamp
300
- }
301
- }
302
- `;
303
- }
304
- function notificationsDocument() {
305
- return `# Customer notification operations
306
- ${HEADER}
307
-
308
- query CustomerNotifications(
309
- $unreadOnly: Boolean
310
- $category: String
311
- $limit: Int
312
- $offset: Int
313
- ) {
314
- customerNotifications(
315
- unreadOnly: $unreadOnly
316
- category: $category
317
- limit: $limit
318
- offset: $offset
319
- ) {
320
- items {
321
- id
322
- type
323
- category
324
- title
325
- message
326
- actionUrl
327
- imageUrl
328
- metadata
329
- alertChannels
330
- isRead
331
- readAt
332
- createdAt
333
- }
334
- total
335
- unreadCount
336
- hasMore
337
- }
338
- }
339
-
340
- query CustomerUnreadCount($category: String) {
341
- customerUnreadCount(category: $category)
342
- }
343
-
344
- query NotificationPreferences {
345
- notificationPreferences {
346
- id
347
- category
348
- channel
349
- enabled
350
- }
351
- }
352
-
353
- mutation SendNotification($input: SendNotificationInput!) {
354
- sendNotification(input: $input) {
355
- id
356
- type
357
- category
358
- title
359
- message
360
- actionUrl
361
- imageUrl
362
- metadata
363
- alertChannels
364
- isRead
365
- readAt
366
- createdAt
367
- }
368
- }
369
-
370
- mutation SendBulkNotifications($input: SendBulkNotificationsInput!) {
371
- sendBulkNotifications(input: $input) {
372
- sent
373
- failed
374
- }
375
- }
376
-
377
- mutation MarkCustomerNotificationRead($id: ID!) {
378
- markCustomerNotificationRead(id: $id) {
379
- id
380
- isRead
381
- readAt
382
- }
383
- }
384
-
385
- mutation MarkAllCustomerNotificationsRead($category: String) {
386
- markAllCustomerNotificationsRead(category: $category)
387
- }
388
-
389
- mutation RegisterDeviceToken($input: RegisterDeviceTokenInput!) {
390
- registerDeviceToken(input: $input) {
391
- id
392
- platform
393
- token
394
- deviceName
395
- isActive
396
- createdAt
397
- }
398
- }
399
-
400
- mutation UnregisterDeviceToken($token: String!) {
401
- unregisterDeviceToken(token: $token)
402
- }
403
-
404
- mutation UpdateNotificationPreference($input: UpdateNotificationPreferenceInput!) {
405
- updateNotificationPreference(input: $input) {
406
- id
407
- category
408
- channel
409
- enabled
410
- }
411
- }
412
- `;
413
- }
414
- function operationsDocument() {
415
- return `# Operation execution operations
416
- ${HEADER}
417
-
418
- query GetOperationExecution($id: ID!) {
419
- operationExecution(id: $id) {
420
- id
421
- operationKey
422
- status
423
- result
424
- error
425
- startedAt
426
- completedAt
427
- durationMs
428
- metadata
429
- createdAt
430
- }
431
- }
432
-
433
- query ListOperationExecutions(
434
- $operationKey: String
435
- $status: OperationExecutionStatus
436
- $limit: Int
437
- $offset: Int
438
- ) {
439
- operationExecutions(
440
- operationKey: $operationKey
441
- status: $status
442
- limit: $limit
443
- offset: $offset
444
- ) {
445
- items {
446
- id
447
- operationKey
448
- status
449
- durationMs
450
- startedAt
451
- completedAt
452
- metadata
453
- createdAt
454
- }
455
- total
456
- }
457
- }
458
-
459
- mutation ExecuteOperation($input: ExecuteOperationInput!) {
460
- executeOperation(input: $input) {
461
- success
462
- result
463
- error {
464
- code
465
- message
466
- }
467
- executionId
468
- durationMs
469
- metadata
470
- }
471
- }
472
-
473
- mutation CancelOperationExecution($id: ID!) {
474
- cancelOperationExecution(id: $id) {
475
- id
476
- status
477
- }
478
- }
479
- `;
480
- }
481
- function schedulesDocument() {
482
- return `# Schedule management operations
483
- ${HEADER}
484
-
485
- query GetSchedule($key: String!) {
486
- schedule(key: $key) {
487
- id
488
- key
489
- name
490
- description
491
- cron
492
- cronDescription
493
- timezone
494
- targetType
495
- isActive
496
- lastRunAt
497
- lastRunStatus
498
- nextRunAt
499
- runCount
500
- failureCount
501
- createdAt
502
- updatedAt
503
- }
504
- }
505
-
506
- query ListSchedules(
507
- $targetType: ScheduleTargetType
508
- $isActive: Boolean
509
- $limit: Int
510
- $offset: Int
511
- ) {
512
- schedules(
513
- targetType: $targetType
514
- isActive: $isActive
515
- limit: $limit
516
- offset: $offset
517
- ) {
518
- items {
519
- id
520
- key
521
- name
522
- cron
523
- cronDescription
524
- timezone
525
- isActive
526
- lastRunAt
527
- lastRunStatus
528
- nextRunAt
529
- runCount
530
- failureCount
531
- createdAt
532
- }
533
- total
534
- }
535
- }
536
-
537
- mutation CreateSchedule($input: CreateScheduleInput!) {
538
- createSchedule(input: $input) {
539
- id
540
- key
541
- name
542
- cron
543
- isActive
544
- createdAt
545
- }
546
- }
547
-
548
- mutation UpdateSchedule($key: String!, $input: UpdateScheduleInput!) {
549
- updateSchedule(key: $key, input: $input) {
550
- id
551
- key
552
- name
553
- cron
554
- isActive
555
- updatedAt
556
- }
557
- }
558
-
559
- mutation DeleteSchedule($key: String!) {
560
- deleteSchedule(key: $key)
561
- }
562
-
563
- mutation PauseSchedule($key: String!) {
564
- pauseSchedule(key: $key) {
565
- id
566
- key
567
- isActive
568
- }
569
- }
570
-
571
- mutation ResumeSchedule($key: String!) {
572
- resumeSchedule(key: $key) {
573
- id
574
- key
575
- isActive
576
- }
577
- }
578
-
579
- mutation TriggerSchedule($key: String!) {
580
- triggerSchedule(key: $key) {
581
- success
582
- jobId
583
- error
584
- }
585
- }
586
- `;
587
- }
588
- function sharingDocument() {
589
- return `# Sharing operations
590
- ${HEADER}
591
-
592
- fragment ShareFields on Share {
593
- id
594
- resourceType
595
- recordId
596
- fileId
597
- permission
598
- status
599
- sharedWithCustomerId
600
- acceptedAt
601
- declinedAt
602
- expiresAt
603
- createdAt
604
- createdBy
605
- revokedAt
606
- }
607
-
608
- query GetShares($resourceType: ShareResourceType!, $resourceId: ID!, $status: ShareStatus) {
609
- shares(resourceType: $resourceType, resourceId: $resourceId, status: $status) {
610
- ...ShareFields
611
- }
612
- }
613
-
614
- query SharedWithMe(
615
- $resourceType: ShareResourceType
616
- $modelKey: String
617
- $status: ShareStatus
618
- $limit: Int
619
- $offset: Int
620
- ) {
621
- sharedWithMe(
622
- resourceType: $resourceType
623
- modelKey: $modelKey
624
- status: $status
625
- limit: $limit
626
- offset: $offset
627
- ) {
628
- ...ShareFields
629
- }
630
- }
631
-
632
- mutation ShareRecord(
633
- $recordId: ID!
634
- $sharedWithCustomerId: ID!
635
- $permission: SharePermission!
636
- $expiresAt: DateTime
637
- ) {
638
- shareRecord(
639
- recordId: $recordId
640
- sharedWithCustomerId: $sharedWithCustomerId
641
- permission: $permission
642
- expiresAt: $expiresAt
643
- ) {
644
- ...ShareFields
645
- }
646
- }
647
-
648
- mutation ShareFile(
649
- $fileId: ID!
650
- $sharedWithCustomerId: ID!
651
- $permission: SharePermission!
652
- $expiresAt: DateTime
653
- ) {
654
- shareFile(
655
- fileId: $fileId
656
- sharedWithCustomerId: $sharedWithCustomerId
657
- permission: $permission
658
- expiresAt: $expiresAt
659
- ) {
660
- ...ShareFields
661
- }
662
- }
663
-
664
- mutation AcceptShare($shareId: ID!) {
665
- acceptShare(shareId: $shareId) {
666
- ...ShareFields
667
- }
668
- }
669
-
670
- mutation DeclineShare($shareId: ID!) {
671
- declineShare(shareId: $shareId) {
672
- ...ShareFields
673
- }
674
- }
675
-
676
- mutation RevokeShare($shareId: ID!) {
677
- revokeShare(shareId: $shareId) {
678
- ...ShareFields
679
- }
680
- }
681
-
682
- mutation UpdateSharePermission($shareId: ID!, $permission: SharePermission!) {
683
- updateSharePermission(shareId: $shareId, permission: $permission) {
684
- ...ShareFields
685
- }
686
- }
687
- `;
688
- }
689
- function embeddingsDocument() {
690
- return `# Vector embedding operations (search, write, delete)
691
- ${HEADER}
692
-
693
- query SearchEmbeddings($input: SearchEmbeddingsInput!) {
694
- searchEmbeddings(input: $input) {
695
- recordId
696
- modelKey
697
- naturalKey
698
- key
699
- similarity
700
- metadata
701
- }
702
- }
703
-
704
- mutation WriteEmbeddings($input: WriteEmbeddingsInput!) {
705
- writeEmbeddings(input: $input) {
706
- written
707
- errors {
708
- recordId
709
- key
710
- message
711
- }
712
- }
713
- }
714
-
715
- mutation DeleteEmbeddings($input: DeleteEmbeddingsInput!) {
716
- deleteEmbeddings(input: $input) {
717
- deleted
718
- }
719
- }
720
- `;
721
- }
722
- function analyticsDocument() {
723
- return `# Analytics & conversion tracking operations
724
- ${HEADER}
725
-
726
- mutation RecordConversion($input: RecordConversionInput!) {
727
- recordConversion(input: $input) {
728
- success
729
- }
730
- }
731
- `;
732
- }
733
- /**
734
- * Generate static domain .graphql files based on enabled domains.
735
- */
736
- export function generateStaticDocuments(domains) {
737
- const files = [];
738
- if (domains.auth)
739
- files.push({ filename: 'auth.graphql', content: authDocument() });
740
- if (domains.authProviders)
741
- files.push({
742
- filename: 'auth-providers.graphql',
743
- content: authProvidersDocument(),
744
- });
745
- if (domains.files)
746
- files.push({ filename: 'files.graphql', content: filesDocument() });
747
- if (domains.sync)
748
- files.push({ filename: 'sync.graphql', content: syncDocument() });
749
- if (domains.notifications)
750
- files.push({
751
- filename: 'notifications.graphql',
752
- content: notificationsDocument(),
753
- });
754
- if (domains.operations)
755
- files.push({
756
- filename: 'operations.graphql',
757
- content: operationsDocument(),
758
- });
759
- if (domains.schedules)
760
- files.push({ filename: 'schedules.graphql', content: schedulesDocument() });
761
- if (domains.sharing)
762
- files.push({ filename: 'sharing.graphql', content: sharingDocument() });
763
- if (domains.embeddings)
764
- files.push({
765
- filename: 'embeddings.graphql',
766
- content: embeddingsDocument(),
767
- });
768
- if (domains.analytics)
769
- files.push({ filename: 'analytics.graphql', content: analyticsDocument() });
770
- return files;
771
- }