@eide/foir-cli 0.1.30 → 0.1.32

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 (57) hide show
  1. package/dist/cli.js +0 -0
  2. package/dist/codegen/generators/static-documents.d.ts.map +1 -1
  3. package/dist/codegen/generators/static-documents.js +4 -1
  4. package/dist/commands/api-keys.d.ts.map +1 -1
  5. package/dist/commands/api-keys.js +3 -1
  6. package/dist/commands/auth-config.d.ts.map +1 -1
  7. package/dist/commands/auth-config.js +4 -3
  8. package/dist/commands/auth-providers.d.ts.map +1 -1
  9. package/dist/commands/auth-providers.js +7 -2
  10. package/dist/commands/customer-profiles.d.ts.map +1 -1
  11. package/dist/commands/customer-profiles.js +3 -1
  12. package/dist/commands/customers.d.ts.map +1 -1
  13. package/dist/commands/customers.js +9 -3
  14. package/dist/commands/embeddings.d.ts.map +1 -1
  15. package/dist/commands/embeddings.js +9 -3
  16. package/dist/commands/experiments.d.ts.map +1 -1
  17. package/dist/commands/experiments.js +28 -9
  18. package/dist/commands/extensions.d.ts.map +1 -1
  19. package/dist/commands/extensions.js +18 -6
  20. package/dist/commands/files.d.ts.map +1 -1
  21. package/dist/commands/hooks.d.ts.map +1 -1
  22. package/dist/commands/hooks.js +52 -6
  23. package/dist/commands/locales.d.ts.map +1 -1
  24. package/dist/commands/locales.js +13 -4
  25. package/dist/commands/login.d.ts.map +1 -1
  26. package/dist/commands/login.js +0 -1
  27. package/dist/commands/models.d.ts.map +1 -1
  28. package/dist/commands/models.js +6 -2
  29. package/dist/commands/notes.d.ts.map +1 -1
  30. package/dist/commands/notes.js +4 -2
  31. package/dist/commands/notifications.d.ts.map +1 -1
  32. package/dist/commands/operations.d.ts.map +1 -1
  33. package/dist/commands/operations.js +16 -5
  34. package/dist/commands/records.d.ts.map +1 -1
  35. package/dist/commands/records.js +15 -5
  36. package/dist/commands/schedules.d.ts.map +1 -1
  37. package/dist/commands/schedules.js +7 -2
  38. package/dist/commands/search.d.ts.map +1 -1
  39. package/dist/commands/segments.d.ts.map +1 -1
  40. package/dist/commands/segments.js +17 -5
  41. package/dist/commands/select-project.js +3 -3
  42. package/dist/commands/settings.d.ts.map +1 -1
  43. package/dist/commands/settings.js +3 -1
  44. package/dist/commands/variant-catalog.d.ts.map +1 -1
  45. package/dist/commands/variant-catalog.js +10 -3
  46. package/dist/commands/whoami.js +1 -1
  47. package/dist/graphql/generated.d.ts +31 -18
  48. package/dist/graphql/generated.d.ts.map +1 -1
  49. package/dist/graphql/generated.js +10167 -135
  50. package/dist/lib/errors.d.ts.map +1 -1
  51. package/dist/lib/errors.js +3 -0
  52. package/dist/lib/extension-helpers.d.ts.map +1 -1
  53. package/dist/lib/hook-helpers.d.ts +105 -0
  54. package/dist/lib/hook-helpers.d.ts.map +1 -0
  55. package/dist/lib/hook-helpers.js +108 -0
  56. package/dist/lib/seed-helpers.d.ts.map +1 -1
  57. package/package.json +13 -11
@@ -93,7 +93,9 @@ export function registerOperationsCommands(program, globalOpts) {
93
93
  if (!(opts.json || opts.jsonl || opts.quiet)) {
94
94
  console.log(`Streaming execution ${executionId}…`);
95
95
  }
96
- const baseUrl = opts.apiUrl ?? process.env.FOIR_API_URL ?? 'http://localhost:4000';
96
+ const baseUrl = opts.apiUrl ??
97
+ process.env.FOIR_API_URL ??
98
+ 'http://localhost:4000';
97
99
  const sseUrl = `${baseUrl}/api/operations/${executionId}/stream`;
98
100
  const response = await fetch(sseUrl);
99
101
  if (!response.ok || !response.body) {
@@ -159,7 +161,9 @@ export function registerOperationsCommands(program, globalOpts) {
159
161
  .action(withErrorHandler(globalOpts, async (key) => {
160
162
  const opts = globalOpts();
161
163
  const client = await createClient(opts);
162
- const data = await client.request(OperationExecutionStatsDocument, { operationKey: key });
164
+ const data = await client.request(OperationExecutionStatsDocument, {
165
+ operationKey: key,
166
+ });
163
167
  formatOutput(data.operationExecutionStats, opts);
164
168
  }));
165
169
  // dead-letters
@@ -233,7 +237,9 @@ export function registerOperationsCommands(program, globalOpts) {
233
237
  const opts = globalOpts();
234
238
  const client = await createClient(opts);
235
239
  const input = await parseInputData(cmdOpts);
236
- const data = await client.request(CreateOperationDocument, { input });
240
+ const data = await client.request(CreateOperationDocument, {
241
+ input,
242
+ });
237
243
  formatOutput(data.createOperation, opts);
238
244
  if (!(opts.json || opts.jsonl || opts.quiet))
239
245
  success(`Created operation "${data.createOperation.key}"`);
@@ -248,7 +254,10 @@ export function registerOperationsCommands(program, globalOpts) {
248
254
  const opts = globalOpts();
249
255
  const client = await createClient(opts);
250
256
  const input = await parseInputData(cmdOpts);
251
- const data = await client.request(UpdateOperationDocument, { key, input });
257
+ const data = await client.request(UpdateOperationDocument, {
258
+ key,
259
+ input,
260
+ });
252
261
  formatOutput(data.updateOperation, opts);
253
262
  if (!(opts.json || opts.jsonl || opts.quiet))
254
263
  success(`Updated operation "${key}"`);
@@ -260,7 +269,9 @@ export function registerOperationsCommands(program, globalOpts) {
260
269
  .option('--confirm', 'Skip confirmation prompt')
261
270
  .action(withErrorHandler(globalOpts, async (key, cmdOpts) => {
262
271
  const opts = globalOpts();
263
- const confirmed = await confirmAction(`Delete operation "${key}"?`, { confirm: !!cmdOpts.confirm });
272
+ const confirmed = await confirmAction(`Delete operation "${key}"?`, {
273
+ confirm: !!cmdOpts.confirm,
274
+ });
264
275
  if (!confirmed) {
265
276
  console.log('Aborted.');
266
277
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../src/commands/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA6BtD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CA4XN"}
1
+ {"version":3,"file":"records.d.ts","sourceRoot":"","sources":["../../src/commands/records.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA6BtD,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAuZN"}
@@ -64,7 +64,9 @@ export function registerRecordsCommands(program, globalOpts) {
64
64
  result = data.record;
65
65
  }
66
66
  else {
67
- const data = await client.request(GetRecordDocument, { id: idOrKey });
67
+ const data = await client.request(GetRecordDocument, {
68
+ id: idOrKey,
69
+ });
68
70
  result = data.record;
69
71
  }
70
72
  }
@@ -105,7 +107,9 @@ export function registerRecordsCommands(program, globalOpts) {
105
107
  const client = await createClient(opts);
106
108
  const inputData = await parseInputData(cmdOpts);
107
109
  const input = { modelKey, ...inputData };
108
- const data = await client.request(CreateRecordDocument, { input });
110
+ const data = await client.request(CreateRecordDocument, {
111
+ input,
112
+ });
109
113
  formatOutput(data.createRecord, opts);
110
114
  if (!(opts.json || opts.jsonl || opts.quiet)) {
111
115
  success(`Created record ${data.createRecord.record.id}`);
@@ -188,7 +192,9 @@ export function registerRecordsCommands(program, globalOpts) {
188
192
  const opts = globalOpts();
189
193
  const client = await createClient(opts);
190
194
  const naturalKey = cmdOpts.naturalKey ?? `${id}-copy`;
191
- const data = await client.request(DuplicateRecordDocument, { input: { recordId: id, naturalKey } });
195
+ const data = await client.request(DuplicateRecordDocument, {
196
+ input: { recordId: id, naturalKey },
197
+ });
192
198
  formatOutput(data.duplicateRecord, opts);
193
199
  if (!(opts.json || opts.jsonl || opts.quiet)) {
194
200
  success(`Duplicated → ${data.duplicateRecord.record.id}`);
@@ -262,7 +268,9 @@ export function registerRecordsCommands(program, globalOpts) {
262
268
  input.changeDescription = cmdOpts.message;
263
269
  if (cmdOpts.sourceVersion)
264
270
  input.sourceVersionId = cmdOpts.sourceVersion;
265
- const data = await client.request(CreateVersionDocument, { input });
271
+ const data = await client.request(CreateVersionDocument, {
272
+ input,
273
+ });
266
274
  formatOutput(data.createVersion, opts);
267
275
  if (!(opts.json || opts.jsonl || opts.quiet)) {
268
276
  success(`Created version ${data.createVersion.id}`);
@@ -295,7 +303,9 @@ export function registerRecordsCommands(program, globalOpts) {
295
303
  input.priority = parseInt(cmdOpts.priority, 10);
296
304
  if (cmdOpts.default)
297
305
  input.isDefault = true;
298
- const data = await client.request(CreateVariantDocument, { input });
306
+ const data = await client.request(CreateVariantDocument, {
307
+ input,
308
+ });
299
309
  formatOutput(data.createVariant, opts);
300
310
  if (!(opts.json || opts.jsonl || opts.quiet)) {
301
311
  success(`Created variant ${data.createVariant.id}`);
@@ -1 +1 @@
1
- {"version":3,"file":"schedules.d.ts","sourceRoot":"","sources":["../../src/commands/schedules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgBtD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CA8KN"}
1
+ {"version":3,"file":"schedules.d.ts","sourceRoot":"","sources":["../../src/commands/schedules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgBtD,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAmLN"}
@@ -64,7 +64,9 @@ export function registerSchedulesCommands(program, globalOpts) {
64
64
  const opts = globalOpts();
65
65
  const client = await createClient(opts);
66
66
  const input = await parseInputData(cmdOpts);
67
- const data = await client.request(CreateScheduleDocument, { input });
67
+ const data = await client.request(CreateScheduleDocument, {
68
+ input,
69
+ });
68
70
  formatOutput(data.createSchedule, opts);
69
71
  if (!(opts.json || opts.jsonl || opts.quiet))
70
72
  success(`Created schedule ${data.createSchedule.key}`);
@@ -79,7 +81,10 @@ export function registerSchedulesCommands(program, globalOpts) {
79
81
  const opts = globalOpts();
80
82
  const client = await createClient(opts);
81
83
  const input = await parseInputData(cmdOpts);
82
- const data = await client.request(UpdateScheduleDocument, { key, input });
84
+ const data = await client.request(UpdateScheduleDocument, {
85
+ key,
86
+ input,
87
+ });
83
88
  formatOutput(data.updateSchedule, opts);
84
89
  if (!(opts.json || opts.jsonl || opts.quiet))
85
90
  success(`Updated schedule "${key}"`);
@@ -1 +1 @@
1
- {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAwEN"}
1
+ {"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/commands/search.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMtD,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAgFN"}
@@ -1 +1 @@
1
- {"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../src/commands/segments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgBtD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAuKN"}
1
+ {"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../src/commands/segments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAgBtD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAsLN"}
@@ -50,11 +50,15 @@ export function registerSegmentsCommands(program, globalOpts) {
50
50
  const client = await createClient(opts);
51
51
  let result;
52
52
  if (isUUID(idOrKey)) {
53
- const data = await client.request(GetSegmentDocument, { id: idOrKey });
53
+ const data = await client.request(GetSegmentDocument, {
54
+ id: idOrKey,
55
+ });
54
56
  result = data.segment;
55
57
  }
56
58
  else {
57
- const data = await client.request(GetSegmentByKeyDocument, { key: idOrKey });
59
+ const data = await client.request(GetSegmentByKeyDocument, {
60
+ key: idOrKey,
61
+ });
58
62
  result = data.segmentByKey;
59
63
  }
60
64
  if (!result)
@@ -71,7 +75,9 @@ export function registerSegmentsCommands(program, globalOpts) {
71
75
  const opts = globalOpts();
72
76
  const client = await createClient(opts);
73
77
  const input = await parseInputData(cmdOpts);
74
- const data = await client.request(CreateSegmentDocument, { input });
78
+ const data = await client.request(CreateSegmentDocument, {
79
+ input,
80
+ });
75
81
  formatOutput(data.createSegment, opts);
76
82
  if (!(opts.json || opts.jsonl || opts.quiet))
77
83
  success(`Created segment ${data.createSegment.key}`);
@@ -86,7 +92,10 @@ export function registerSegmentsCommands(program, globalOpts) {
86
92
  const opts = globalOpts();
87
93
  const client = await createClient(opts);
88
94
  const input = await parseInputData(cmdOpts);
89
- const data = await client.request(UpdateSegmentDocument, { id, input });
95
+ const data = await client.request(UpdateSegmentDocument, {
96
+ id,
97
+ input,
98
+ });
90
99
  formatOutput(data.updateSegment, opts);
91
100
  if (!(opts.json || opts.jsonl || opts.quiet))
92
101
  success(`Updated segment ${id}`);
@@ -137,7 +146,10 @@ export function registerSegmentsCommands(program, globalOpts) {
137
146
  .action(withErrorHandler(globalOpts, async (segmentId, customerId) => {
138
147
  const opts = globalOpts();
139
148
  const client = await createClient(opts);
140
- const data = await client.request(TestSegmentEvaluationDocument, { segmentId, customerId });
149
+ const data = await client.request(TestSegmentEvaluationDocument, {
150
+ segmentId,
151
+ customerId,
152
+ });
141
153
  formatOutput(data.testSegmentEvaluation, opts);
142
154
  }));
143
155
  }
@@ -79,14 +79,14 @@ export function registerSelectProjectCommand(program, globalOpts) {
79
79
  const credentials = await getCredentials();
80
80
  if (!credentials) {
81
81
  console.log('Not logged in. Run `foir login` first.');
82
- process.exit(1);
82
+ throw new Error('Not authenticated');
83
83
  }
84
84
  console.log('Fetching your projects...\n');
85
85
  const sessionContext = await fetchSessionContext(apiUrl, credentials.accessToken);
86
86
  const { availableTenants: tenants, availableProjects: projects } = sessionContext;
87
87
  if (projects.length === 0) {
88
88
  console.log('No projects found. Create one in the platform first.');
89
- process.exit(1);
89
+ throw new Error('No projects available');
90
90
  }
91
91
  const tenantNameMap = new Map(tenants.map((t) => [t.id, t.name]));
92
92
  let selectedProject;
@@ -98,7 +98,7 @@ export function registerSelectProjectCommand(program, globalOpts) {
98
98
  for (const p of projects) {
99
99
  console.log(` - ${p.name} (${p.id})`);
100
100
  }
101
- process.exit(1);
101
+ throw new Error('Project not found');
102
102
  }
103
103
  selectedProject = found;
104
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/commands/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA0BtD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAgHN"}
1
+ {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/commands/settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA0BtD,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAkHN"}
@@ -30,7 +30,9 @@ export function registerSettingsCommands(program, globalOpts) {
30
30
  const client = await createClient(opts);
31
31
  let items;
32
32
  if (cmdOpts.category) {
33
- const data = await client.request(SettingsByCategoryDocument, { category: cmdOpts.category });
33
+ const data = await client.request(SettingsByCategoryDocument, {
34
+ category: cmdOpts.category,
35
+ });
34
36
  items = data.settingsByCategory;
35
37
  }
36
38
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"variant-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/variant-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAsIN"}
1
+ {"version":3,"file":"variant-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/variant-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AActD,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,aAAa,GAC9B,IAAI,CAyJN"}
@@ -48,7 +48,9 @@ export function registerVariantCatalogCommands(program, globalOpts) {
48
48
  const client = await createClient(opts);
49
49
  let result;
50
50
  if (isUUID(idOrKey)) {
51
- const data = await client.request(GetVariantCatalogEntryDocument, { id: idOrKey });
51
+ const data = await client.request(GetVariantCatalogEntryDocument, {
52
+ id: idOrKey,
53
+ });
52
54
  result = data.variantCatalogEntry;
53
55
  }
54
56
  else {
@@ -69,7 +71,9 @@ export function registerVariantCatalogCommands(program, globalOpts) {
69
71
  const opts = globalOpts();
70
72
  const client = await createClient(opts);
71
73
  const input = await parseInputData(cmdOpts);
72
- const data = await client.request(CreateVariantCatalogEntryDocument, { input });
74
+ const data = await client.request(CreateVariantCatalogEntryDocument, {
75
+ input,
76
+ });
73
77
  formatOutput(data.createVariantCatalogEntry, opts);
74
78
  if (!(opts.json || opts.jsonl || opts.quiet))
75
79
  success(`Created variant catalog entry ${data.createVariantCatalogEntry.key}`);
@@ -84,7 +88,10 @@ export function registerVariantCatalogCommands(program, globalOpts) {
84
88
  const opts = globalOpts();
85
89
  const client = await createClient(opts);
86
90
  const input = await parseInputData(cmdOpts);
87
- const data = await client.request(UpdateVariantCatalogEntryDocument, { id, input });
91
+ const data = await client.request(UpdateVariantCatalogEntryDocument, {
92
+ id,
93
+ input,
94
+ });
88
95
  formatOutput(data.updateVariantCatalogEntry, opts);
89
96
  if (!(opts.json || opts.jsonl || opts.quiet))
90
97
  success(`Updated variant catalog entry ${data.updateVariantCatalogEntry.key}`);
@@ -16,7 +16,7 @@ export function registerWhoamiCommand(program, globalOpts) {
16
16
  console.log('Not logged in.');
17
17
  console.log('\nRun `foir login` to authenticate.');
18
18
  }
19
- process.exit(1);
19
+ throw new Error('Not authenticated');
20
20
  }
21
21
  const expired = isTokenExpired(credentials);
22
22
  const projectContext = await getProjectContext();
@@ -42,6 +42,7 @@ export type Scalars = {
42
42
  input: number;
43
43
  output: number;
44
44
  };
45
+ /** The `BigInt` scalar type represents non-fractional signed whole numeric values. */
45
46
  BigInt: {
46
47
  input: any;
47
48
  output: any;
@@ -436,7 +437,7 @@ export type BillingCustomPackage = {
436
437
  validUntil?: Maybe<Scalars['DateTime']['output']>;
437
438
  };
438
439
  export type BillingInterval = 'MONTH' | 'YEAR';
439
- export type BillingMetric = 'API_REQUESTS' | 'MEDIA_STORAGE' | 'MEDIA_TRANSFORMATIONS' | 'PROJECTS' | 'USERS';
440
+ export type BillingMetric = 'MEDIA_STORAGE' | 'MEDIA_TRANSFORMATIONS' | 'PROJECTS' | 'RECORDS' | 'USERS';
440
441
  export type BillingPackageLimit = {
441
442
  id: Scalars['ID']['output'];
442
443
  includedQuantity?: Maybe<Scalars['BigInt']['output']>;
@@ -691,7 +692,9 @@ export type CreateHookInput = {
691
692
  isActive?: InputMaybe<Scalars['Boolean']['input']>;
692
693
  key: Scalars['String']['input'];
693
694
  name: Scalars['String']['input'];
694
- operationKey: Scalars['String']['input'];
695
+ notificationConfig?: InputMaybe<Scalars['JSON']['input']>;
696
+ operationKey?: InputMaybe<Scalars['String']['input']>;
697
+ targetType?: InputMaybe<Scalars['String']['input']>;
695
698
  };
696
699
  /** Input for creating an invitation */
697
700
  export type CreateInvitationInput = {
@@ -757,7 +760,6 @@ export type CreateOperationInput = {
757
760
  models?: InputMaybe<Array<Scalars['String']['input']>>;
758
761
  name: Scalars['String']['input'];
759
762
  outputSchema?: InputMaybe<Scalars['JSON']['input']>;
760
- rateLimitWeight?: InputMaybe<Scalars['Int']['input']>;
761
763
  retryPolicy?: InputMaybe<Scalars['JSON']['input']>;
762
764
  streamConfig?: InputMaybe<OperationStreamConfigInput>;
763
765
  timeoutMs?: InputMaybe<Scalars['Int']['input']>;
@@ -1772,17 +1774,20 @@ export type GrantAccessInput = {
1772
1774
  role: AdminAccessRole;
1773
1775
  tenantId: Scalars['ID']['input'];
1774
1776
  };
1775
- /** Event-driven hook that triggers an operation */
1777
+ /** Event-driven hook that triggers an operation or notification */
1776
1778
  export type Hook = {
1777
1779
  createdAt: Scalars['DateTime']['output'];
1778
1780
  description?: Maybe<Scalars['String']['output']>;
1779
1781
  event: HookEvent;
1782
+ extensionId?: Maybe<Scalars['ID']['output']>;
1780
1783
  filter?: Maybe<HookFilter>;
1781
1784
  id: Scalars['ID']['output'];
1782
1785
  isActive: Scalars['Boolean']['output'];
1783
1786
  key: Scalars['String']['output'];
1784
1787
  name: Scalars['String']['output'];
1785
- operationKey: Scalars['String']['output'];
1788
+ notificationConfig?: Maybe<Scalars['JSON']['output']>;
1789
+ operationKey?: Maybe<Scalars['String']['output']>;
1790
+ targetType: Scalars['String']['output'];
1786
1791
  updatedAt: Scalars['DateTime']['output'];
1787
1792
  };
1788
1793
  /** Paginated list of hooks */
@@ -1812,14 +1817,16 @@ export type HookDeliveryConnection = {
1812
1817
  /** Hook delivery status */
1813
1818
  export type HookDeliveryStatus = 'FAILED' | 'RETRYING' | 'SUCCESS';
1814
1819
  /** 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';
1820
+ 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
1821
  /** Optional filter to narrow when a hook fires */
1817
1822
  export type HookFilter = {
1823
+ condition?: Maybe<Scalars['JSON']['output']>;
1818
1824
  customerSegmentKey?: Maybe<Scalars['String']['output']>;
1819
1825
  metadata?: Maybe<Scalars['JSON']['output']>;
1820
1826
  modelKey?: Maybe<Scalars['String']['output']>;
1821
1827
  };
1822
1828
  export type HookFilterInput = {
1829
+ condition?: InputMaybe<Scalars['JSON']['input']>;
1823
1830
  customerSegmentKey?: InputMaybe<Scalars['String']['input']>;
1824
1831
  metadata?: InputMaybe<Scalars['JSON']['input']>;
1825
1832
  modelKey?: InputMaybe<Scalars['String']['input']>;
@@ -3439,11 +3446,6 @@ export type Operation = {
3439
3446
  models?: Maybe<Array<Scalars['String']['output']>>;
3440
3447
  name: Scalars['String']['output'];
3441
3448
  outputSchema?: Maybe<Scalars['JSON']['output']>;
3442
- /**
3443
- * Rate limit weight — how many rate limit points each execution consumes (default 1).
3444
- * Expensive operations can set higher weights to throttle more aggressively.
3445
- */
3446
- rateLimitWeight: Scalars['Int']['output'];
3447
3449
  retryPolicy?: Maybe<Scalars['JSON']['output']>;
3448
3450
  /** Streaming configuration. Operations with this set support STREAM execution mode. */
3449
3451
  streamConfig?: Maybe<OperationStreamConfig>;
@@ -5653,7 +5655,9 @@ export type UpdateHookInput = {
5653
5655
  filter?: InputMaybe<HookFilterInput>;
5654
5656
  isActive?: InputMaybe<Scalars['Boolean']['input']>;
5655
5657
  name?: InputMaybe<Scalars['String']['input']>;
5658
+ notificationConfig?: InputMaybe<Scalars['JSON']['input']>;
5656
5659
  operationKey?: InputMaybe<Scalars['String']['input']>;
5660
+ targetType?: InputMaybe<Scalars['String']['input']>;
5657
5661
  };
5658
5662
  export type UpdateLocaleInput = {
5659
5663
  displayName?: InputMaybe<Scalars['String']['input']>;
@@ -5710,7 +5714,6 @@ export type UpdateOperationInput = {
5710
5714
  models?: InputMaybe<Array<Scalars['String']['input']>>;
5711
5715
  name?: InputMaybe<Scalars['String']['input']>;
5712
5716
  outputSchema?: InputMaybe<Scalars['JSON']['input']>;
5713
- rateLimitWeight?: InputMaybe<Scalars['Int']['input']>;
5714
5717
  retryPolicy?: InputMaybe<Scalars['JSON']['input']>;
5715
5718
  streamConfig?: InputMaybe<OperationStreamConfigInput>;
5716
5719
  timeoutMs?: InputMaybe<Scalars['Int']['input']>;
@@ -6797,12 +6800,16 @@ export type ListHooksQuery = {
6797
6800
  key: string;
6798
6801
  name: string;
6799
6802
  event: HookEvent;
6800
- operationKey: string;
6803
+ targetType: string;
6804
+ operationKey?: string | null;
6805
+ notificationConfig?: unknown | null;
6801
6806
  isActive: boolean;
6807
+ extensionId?: string | null;
6802
6808
  updatedAt: string;
6803
6809
  filter?: {
6804
6810
  modelKey?: string | null;
6805
6811
  customerSegmentKey?: string | null;
6812
+ condition?: unknown | null;
6806
6813
  } | null;
6807
6814
  }>;
6808
6815
  };
@@ -6817,14 +6824,18 @@ export type GetHookByKeyQuery = {
6817
6824
  name: string;
6818
6825
  description?: string | null;
6819
6826
  event: HookEvent;
6820
- operationKey: string;
6827
+ targetType: string;
6828
+ operationKey?: string | null;
6829
+ notificationConfig?: unknown | null;
6821
6830
  isActive: boolean;
6831
+ extensionId?: string | null;
6822
6832
  createdAt: string;
6823
6833
  updatedAt: string;
6824
6834
  filter?: {
6825
6835
  modelKey?: string | null;
6826
6836
  customerSegmentKey?: string | null;
6827
6837
  metadata?: unknown | null;
6838
+ condition?: unknown | null;
6828
6839
  } | null;
6829
6840
  } | null;
6830
6841
  };
@@ -6837,7 +6848,9 @@ export type CreateHookMutation = {
6837
6848
  key: string;
6838
6849
  name: string;
6839
6850
  event: HookEvent;
6840
- operationKey: string;
6851
+ targetType: string;
6852
+ operationKey?: string | null;
6853
+ notificationConfig?: unknown | null;
6841
6854
  isActive: boolean;
6842
6855
  createdAt: string;
6843
6856
  };
@@ -6852,7 +6865,9 @@ export type UpdateHookMutation = {
6852
6865
  key: string;
6853
6866
  name: string;
6854
6867
  event: HookEvent;
6855
- operationKey: string;
6868
+ targetType: string;
6869
+ operationKey?: string | null;
6870
+ notificationConfig?: unknown | null;
6856
6871
  isActive: boolean;
6857
6872
  updatedAt: string;
6858
6873
  };
@@ -7287,7 +7302,6 @@ export type ListOperationsQuery = {
7287
7302
  category?: string | null;
7288
7303
  endpoint: string;
7289
7304
  isActive: boolean;
7290
- rateLimitWeight: number;
7291
7305
  createdAt: string;
7292
7306
  updatedAt: string;
7293
7307
  }>;
@@ -7314,7 +7328,6 @@ export type GetOperationQuery = {
7314
7328
  ui?: unknown | null;
7315
7329
  isActive: boolean;
7316
7330
  allowedRoles: Array<string>;
7317
- rateLimitWeight: number;
7318
7331
  createdAt: string;
7319
7332
  updatedAt: string;
7320
7333
  streamConfig?: {