@eide/foir-cli 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -468,6 +468,7 @@ import { OperationsService as OperationsService2 } from "@eide/foir-proto-ts/ope
468
468
  import { HooksService as HooksService2 } from "@eide/foir-proto-ts/hooks/v1/hooks_pb";
469
469
  import { NotificationsService as NotificationsService2 } from "@eide/foir-proto-ts/notifications/v1/notifications_pb";
470
470
  import { SchedulesService as SchedulesService2 } from "@eide/foir-proto-ts/schedules/v1/schedules_pb";
471
+ import { IntegrationsService as IntegrationsService2 } from "@eide/foir-proto-ts/integrations/v1/integrations_pb";
471
472
 
472
473
  // src/lib/rpc/identity.ts
473
474
  import { create } from "@bufbuild/protobuf";
@@ -1142,8 +1143,113 @@ function createIdentityMethods(client) {
1142
1143
  };
1143
1144
  }
1144
1145
 
1146
+ // src/lib/rpc/integrations.ts
1147
+ import { create as create2 } from "@bufbuild/protobuf";
1148
+ import {
1149
+ ListIntegrationsRequestSchema,
1150
+ ListExtensionsRequestSchema,
1151
+ CredentialStrategy,
1152
+ ExtensionTarget
1153
+ } from "@eide/foir-proto-ts/integrations/v1/integrations_pb";
1154
+ function createIntegrationsMethods(client) {
1155
+ return {
1156
+ async listIntegrations(projectId) {
1157
+ const resp = await client.listIntegrations(
1158
+ create2(ListIntegrationsRequestSchema, { projectId })
1159
+ );
1160
+ return resp.integrations.map((s) => s.config).filter((c) => c !== void 0);
1161
+ },
1162
+ async listExtensions(projectId) {
1163
+ const resp = await client.listExtensions(
1164
+ create2(ListExtensionsRequestSchema, { projectId })
1165
+ );
1166
+ return resp.extensions;
1167
+ }
1168
+ };
1169
+ }
1170
+ var STRATEGY_FROM_PROTO = {
1171
+ [CredentialStrategy.UNSPECIFIED]: "none",
1172
+ [CredentialStrategy.OAUTH]: "oauth",
1173
+ [CredentialStrategy.API_KEY]: "api_key",
1174
+ [CredentialStrategy.SHARED_SECRET]: "shared_secret",
1175
+ [CredentialStrategy.SSH_KEY]: "ssh_key",
1176
+ [CredentialStrategy.NONE]: "none",
1177
+ [CredentialStrategy.MANAGED]: "managed"
1178
+ };
1179
+ var TARGET_FROM_PROTO = {
1180
+ [ExtensionTarget.UNSPECIFIED]: "record",
1181
+ [ExtensionTarget.RECORD]: "record",
1182
+ [ExtensionTarget.MODEL_LIST]: "model-list"
1183
+ };
1184
+ function integrationConfigToInput(cfg) {
1185
+ const sync = {};
1186
+ for (const [k, v] of Object.entries(cfg.sync)) {
1187
+ sync[k] = syncMappingFromProto(v);
1188
+ }
1189
+ const out = {
1190
+ middleware: { url: cfg.middleware?.url ?? "" },
1191
+ credentials: {
1192
+ strategy: STRATEGY_FROM_PROTO[cfg.credentials?.strategy ?? CredentialStrategy.UNSPECIFIED] ?? "none"
1193
+ },
1194
+ sync
1195
+ };
1196
+ if (cfg.enabled === false) {
1197
+ out.enabled = false;
1198
+ }
1199
+ if (cfg.settings && Object.keys(cfg.settings).length > 0) {
1200
+ out.settings = cfg.settings;
1201
+ }
1202
+ if (cfg.metadata && Object.keys(cfg.metadata).length > 0) {
1203
+ out.metadata = cfg.metadata;
1204
+ }
1205
+ return out;
1206
+ }
1207
+ function syncMappingFromProto(m) {
1208
+ const out = {
1209
+ model: m.model,
1210
+ naturalKey: m.naturalKey,
1211
+ fields: { ...m.fields }
1212
+ };
1213
+ if (m.modelSeed) {
1214
+ const seed = { fields: {} };
1215
+ for (const [fk, fv] of Object.entries(m.modelSeed.fields)) {
1216
+ seed.fields[fk] = {
1217
+ type: fv.type,
1218
+ ...fv.required ? { required: true } : {},
1219
+ ...fv.naturalKey ? { naturalKey: true } : {},
1220
+ ...fv.label ? { label: fv.label } : {},
1221
+ ...fv.helpText ? { helpText: fv.helpText } : {},
1222
+ ...fv.config && Object.keys(fv.config).length > 0 ? { config: fv.config } : {}
1223
+ };
1224
+ }
1225
+ out.modelSeed = seed;
1226
+ }
1227
+ return out;
1228
+ }
1229
+ function extensionConfigToInput(cfg) {
1230
+ const out = {
1231
+ url: cfg.url,
1232
+ placements: cfg.placements.map((p) => {
1233
+ const placement = {
1234
+ target: TARGET_FROM_PROTO[p.target] ?? "record",
1235
+ model: p.model,
1236
+ tab: p.tab,
1237
+ title: p.title
1238
+ };
1239
+ if (p.hints && Object.keys(p.hints).length > 0) {
1240
+ placement.hints = p.hints;
1241
+ }
1242
+ return placement;
1243
+ })
1244
+ };
1245
+ if (cfg.metadata && Object.keys(cfg.metadata).length > 0) {
1246
+ out.metadata = cfg.metadata;
1247
+ }
1248
+ return out;
1249
+ }
1250
+
1145
1251
  // src/lib/rpc/models.ts
1146
- import { create as create2, fromJson } from "@bufbuild/protobuf";
1252
+ import { create as create3, fromJson } from "@bufbuild/protobuf";
1147
1253
  import { ValueSchema } from "@bufbuild/protobuf/wkt";
1148
1254
  import {
1149
1255
  FieldSchema as ProtoFieldSchema,
@@ -1160,7 +1266,7 @@ import {
1160
1266
  RestoreModelVersionRequestSchema
1161
1267
  } from "@eide/foir-proto-ts/models/v1/models_pb";
1162
1268
  function jsFieldToProto(f) {
1163
- return create2(ProtoFieldSchema, {
1269
+ return create3(ProtoFieldSchema, {
1164
1270
  id: f.id,
1165
1271
  key: f.key,
1166
1272
  label: f.label,
@@ -1177,13 +1283,13 @@ function jsFieldToProto(f) {
1177
1283
  });
1178
1284
  }
1179
1285
  function jsConfigToProto(c) {
1180
- return create2(ProtoModelConfigSchema, {
1286
+ return create3(ProtoModelConfigSchema, {
1181
1287
  versioning: c.versioning ?? false,
1182
1288
  publishing: c.publishing ?? false,
1183
1289
  variants: c.variants ?? false,
1184
1290
  inline: c.inline ?? false,
1185
1291
  customerScoped: c.customerScoped ?? false,
1186
- sharing: c.sharing ? create2(ProtoSharingConfigSchema, {
1292
+ sharing: c.sharing ? create3(ProtoSharingConfigSchema, {
1187
1293
  enabled: c.sharing.enabled,
1188
1294
  requireAcceptance: c.sharing.requireAcceptance
1189
1295
  }) : void 0,
@@ -1202,18 +1308,18 @@ function createModelsMethods(client) {
1202
1308
  return {
1203
1309
  // ── Queries ──────────────────────────────────────────────
1204
1310
  async getModel(id) {
1205
- const resp = await client.getModel(create2(GetModelRequestSchema, { id }));
1311
+ const resp = await client.getModel(create3(GetModelRequestSchema, { id }));
1206
1312
  return resp.model ?? null;
1207
1313
  },
1208
1314
  async getModelByKey(key) {
1209
1315
  const resp = await client.getModelByKey(
1210
- create2(GetModelByKeyRequestSchema, { key })
1316
+ create3(GetModelByKeyRequestSchema, { key })
1211
1317
  );
1212
1318
  return resp.model ?? null;
1213
1319
  },
1214
1320
  async listModels(params = {}) {
1215
1321
  const resp = await client.listModels(
1216
- create2(ListModelsRequestSchema, {
1322
+ create3(ListModelsRequestSchema, {
1217
1323
  search: params.search,
1218
1324
  category: params.category,
1219
1325
  configId: params.configId,
@@ -1229,7 +1335,7 @@ function createModelsMethods(client) {
1229
1335
  // ── Mutations ────────────────────────────────────────────
1230
1336
  async createModel(params) {
1231
1337
  const resp = await client.createModel(
1232
- create2(CreateModelRequestSchema, {
1338
+ create3(CreateModelRequestSchema, {
1233
1339
  key: params.key,
1234
1340
  name: params.name,
1235
1341
  fields: params.fields.map(jsFieldToProto),
@@ -1241,7 +1347,7 @@ function createModelsMethods(client) {
1241
1347
  },
1242
1348
  async updateModel(params) {
1243
1349
  const resp = await client.updateModel(
1244
- create2(UpdateModelRequestSchema, {
1350
+ create3(UpdateModelRequestSchema, {
1245
1351
  id: params.id,
1246
1352
  name: params.name,
1247
1353
  updateFields: params.fields != null,
@@ -1254,20 +1360,20 @@ function createModelsMethods(client) {
1254
1360
  },
1255
1361
  async deleteModel(id) {
1256
1362
  const resp = await client.deleteModel(
1257
- create2(DeleteModelRequestSchema, { id })
1363
+ create3(DeleteModelRequestSchema, { id })
1258
1364
  );
1259
1365
  return resp.success;
1260
1366
  },
1261
1367
  async duplicateModel(params) {
1262
1368
  const resp = await client.duplicateModel(
1263
- create2(DuplicateModelRequestSchema, params)
1369
+ create3(DuplicateModelRequestSchema, params)
1264
1370
  );
1265
1371
  return resp.model ?? null;
1266
1372
  },
1267
1373
  // ── Versioning ───────────────────────────────────────────
1268
1374
  async listModelVersions(modelId, params = {}) {
1269
1375
  const resp = await client.listModelVersions(
1270
- create2(ListModelVersionsRequestSchema, {
1376
+ create3(ListModelVersionsRequestSchema, {
1271
1377
  modelId,
1272
1378
  limit: params.limit ?? 50,
1273
1379
  offset: params.offset ?? 0
@@ -1280,7 +1386,7 @@ function createModelsMethods(client) {
1280
1386
  },
1281
1387
  async restoreModelVersion(modelId, versionId) {
1282
1388
  const resp = await client.restoreModelVersion(
1283
- create2(RestoreModelVersionRequestSchema, { modelId, versionId })
1389
+ create3(RestoreModelVersionRequestSchema, { modelId, versionId })
1284
1390
  );
1285
1391
  return resp.model ?? null;
1286
1392
  }
@@ -1288,7 +1394,7 @@ function createModelsMethods(client) {
1288
1394
  }
1289
1395
 
1290
1396
  // src/lib/rpc/records.ts
1291
- import { create as create3 } from "@bufbuild/protobuf";
1397
+ import { create as create4 } from "@bufbuild/protobuf";
1292
1398
  import {
1293
1399
  CreateRecordRequestSchema,
1294
1400
  GetRecordRequestSchema,
@@ -1359,7 +1465,7 @@ function createRecordsMethods(client) {
1359
1465
  // ── CRUD ──────────────────────────────────────────────────
1360
1466
  async createRecord(params) {
1361
1467
  const resp = await client.createRecord(
1362
- create3(CreateRecordRequestSchema, {
1468
+ create4(CreateRecordRequestSchema, {
1363
1469
  modelKey: params.modelKey,
1364
1470
  naturalKey: params.naturalKey,
1365
1471
  data: params.data ? sanitizeData(params.data) : void 0,
@@ -1376,32 +1482,32 @@ function createRecordsMethods(client) {
1376
1482
  },
1377
1483
  async getRecord(id) {
1378
1484
  const resp = await client.getRecord(
1379
- create3(GetRecordRequestSchema, { id })
1485
+ create4(GetRecordRequestSchema, { id })
1380
1486
  );
1381
1487
  return resp.record ?? null;
1382
1488
  },
1383
1489
  async getRecordByKey(modelKey, naturalKey) {
1384
1490
  const resp = await client.getRecordByKey(
1385
- create3(GetRecordByKeyRequestSchema, { modelKey, naturalKey })
1491
+ create4(GetRecordByKeyRequestSchema, { modelKey, naturalKey })
1386
1492
  );
1387
1493
  return resp.record ?? null;
1388
1494
  },
1389
1495
  async getRecordByKeyOrId(modelKey, identifier) {
1390
1496
  const resp = await client.getRecordByKeyOrId(
1391
- create3(GetRecordByKeyOrIdRequestSchema, { modelKey, identifier })
1497
+ create4(GetRecordByKeyOrIdRequestSchema, { modelKey, identifier })
1392
1498
  );
1393
1499
  return resp.record ?? null;
1394
1500
  },
1395
1501
  async listRecords(params) {
1396
1502
  const resp = await client.listRecords(
1397
- create3(ListRecordsRequestSchema, {
1503
+ create4(ListRecordsRequestSchema, {
1398
1504
  modelKey: params.modelKey,
1399
1505
  limit: params.limit ?? 50,
1400
1506
  offset: params.offset ?? 0,
1401
1507
  customerId: params.customerId,
1402
1508
  search: params.search,
1403
1509
  filters: params.filters?.map(
1404
- (f) => create3(RecordFilterSchema, {
1510
+ (f) => create4(RecordFilterSchema, {
1405
1511
  field: f.field,
1406
1512
  operator: f.operator
1407
1513
  })
@@ -1415,7 +1521,7 @@ function createRecordsMethods(client) {
1415
1521
  },
1416
1522
  async updateRecord(params) {
1417
1523
  const resp = await client.updateRecord(
1418
- create3(UpdateRecordRequestSchema, {
1524
+ create4(UpdateRecordRequestSchema, {
1419
1525
  id: params.id,
1420
1526
  data: sanitizeData(params.data),
1421
1527
  naturalKey: params.naturalKey
@@ -1425,28 +1531,28 @@ function createRecordsMethods(client) {
1425
1531
  },
1426
1532
  async deleteRecord(id) {
1427
1533
  const resp = await client.deleteRecord(
1428
- create3(DeleteRecordRequestSchema, { id })
1534
+ create4(DeleteRecordRequestSchema, { id })
1429
1535
  );
1430
1536
  return resp.success;
1431
1537
  },
1432
1538
  async duplicateRecord(id, newNaturalKey) {
1433
1539
  const resp = await client.duplicateRecord(
1434
- create3(DuplicateRecordRequestSchema, { id, newNaturalKey })
1540
+ create4(DuplicateRecordRequestSchema, { id, newNaturalKey })
1435
1541
  );
1436
1542
  return resp.record ?? null;
1437
1543
  },
1438
1544
  async duplicateRecordsBulk(ids, modelKey) {
1439
1545
  const resp = await client.duplicateRecordsBulk(
1440
- create3(DuplicateRecordsBulkRequestSchema, { ids, modelKey })
1546
+ create4(DuplicateRecordsBulkRequestSchema, { ids, modelKey })
1441
1547
  );
1442
1548
  return resp.records ?? [];
1443
1549
  },
1444
1550
  async batchRecordOperations(operations) {
1445
1551
  const typeMap = { create: 1, update: 2, delete: 3 };
1446
1552
  const resp = await client.batchRecordOperations(
1447
- create3(BatchRecordOperationsRequestSchema, {
1553
+ create4(BatchRecordOperationsRequestSchema, {
1448
1554
  operations: operations.map(
1449
- (op) => create3(BatchOperationSchema, {
1555
+ (op) => create4(BatchOperationSchema, {
1450
1556
  type: typeMap[op.type],
1451
1557
  id: op.id,
1452
1558
  modelKey: op.modelKey,
@@ -1463,7 +1569,7 @@ function createRecordsMethods(client) {
1463
1569
  },
1464
1570
  async bulkUpdateRecords(params) {
1465
1571
  const resp = await client.bulkUpdateRecords(
1466
- create3(BulkUpdateRecordsRequestSchema, {
1572
+ create4(BulkUpdateRecordsRequestSchema, {
1467
1573
  modelKey: params.modelKey,
1468
1574
  data: sanitizeData(params.data)
1469
1575
  })
@@ -1473,7 +1579,7 @@ function createRecordsMethods(client) {
1473
1579
  // ── Versioning ────────────────────────────────────────────
1474
1580
  async createVersion(parentId, data, changeDescription) {
1475
1581
  const resp = await client.createVersion(
1476
- create3(CreateVersionRequestSchema, {
1582
+ create4(CreateVersionRequestSchema, {
1477
1583
  parentId,
1478
1584
  data: data ? sanitizeData(data) : void 0,
1479
1585
  changeDescription
@@ -1483,25 +1589,25 @@ function createRecordsMethods(client) {
1483
1589
  },
1484
1590
  async publishVersion(versionId) {
1485
1591
  const resp = await client.publishVersion(
1486
- create3(PublishVersionRequestSchema, { versionId })
1592
+ create4(PublishVersionRequestSchema, { versionId })
1487
1593
  );
1488
1594
  return resp.record ?? null;
1489
1595
  },
1490
1596
  async unpublishRecord(recordId) {
1491
1597
  const resp = await client.unpublishRecord(
1492
- create3(UnpublishRecordRequestSchema, { recordId })
1598
+ create4(UnpublishRecordRequestSchema, { recordId })
1493
1599
  );
1494
1600
  return resp.success;
1495
1601
  },
1496
1602
  async revertToVersion(versionId) {
1497
1603
  const resp = await client.revertToVersion(
1498
- create3(RevertToVersionRequestSchema, { versionId })
1604
+ create4(RevertToVersionRequestSchema, { versionId })
1499
1605
  );
1500
1606
  return resp.record ?? null;
1501
1607
  },
1502
1608
  async listRecordVersions(parentId, params) {
1503
1609
  const resp = await client.listRecordVersions(
1504
- create3(ListRecordVersionsRequestSchema, {
1610
+ create4(ListRecordVersionsRequestSchema, {
1505
1611
  parentId,
1506
1612
  limit: params?.limit ?? 50,
1507
1613
  offset: params?.offset ?? 0
@@ -1514,7 +1620,7 @@ function createRecordsMethods(client) {
1514
1620
  },
1515
1621
  async saveContent(params) {
1516
1622
  const resp = await client.saveContent(
1517
- create3(SaveContentRequestSchema, {
1623
+ create4(SaveContentRequestSchema, {
1518
1624
  recordId: params.recordId,
1519
1625
  data: sanitizeData(params.data),
1520
1626
  variantKey: params.variantKey,
@@ -1529,7 +1635,7 @@ function createRecordsMethods(client) {
1529
1635
  // ── Variants ──────────────────────────────────────────────
1530
1636
  async createVariant(recordId, variantKey, data) {
1531
1637
  const resp = await client.createVariant(
1532
- create3(CreateVariantRequestSchema, {
1638
+ create4(CreateVariantRequestSchema, {
1533
1639
  recordId,
1534
1640
  variantKey,
1535
1641
  data: data ? sanitizeData(data) : void 0
@@ -1539,7 +1645,7 @@ function createRecordsMethods(client) {
1539
1645
  },
1540
1646
  async updateVariant(variantId, data) {
1541
1647
  const resp = await client.updateVariant(
1542
- create3(UpdateVariantRequestSchema, {
1648
+ create4(UpdateVariantRequestSchema, {
1543
1649
  variantId,
1544
1650
  data: sanitizeData(data)
1545
1651
  })
@@ -1548,19 +1654,19 @@ function createRecordsMethods(client) {
1548
1654
  },
1549
1655
  async deleteVariant(variantId) {
1550
1656
  const resp = await client.deleteVariant(
1551
- create3(DeleteVariantRequestSchema, { variantId })
1657
+ create4(DeleteVariantRequestSchema, { variantId })
1552
1658
  );
1553
1659
  return resp.success;
1554
1660
  },
1555
1661
  async setDefaultVariant(recordId, variantId) {
1556
1662
  const resp = await client.setDefaultVariant(
1557
- create3(SetDefaultVariantRequestSchema, { recordId, variantId })
1663
+ create4(SetDefaultVariantRequestSchema, { recordId, variantId })
1558
1664
  );
1559
1665
  return resp.record ?? null;
1560
1666
  },
1561
1667
  async listRecordVariants(recordId, params) {
1562
1668
  const resp = await client.listRecordVariants(
1563
- create3(ListRecordVariantsRequestSchema, {
1669
+ create4(ListRecordVariantsRequestSchema, {
1564
1670
  recordId,
1565
1671
  limit: params?.limit ?? 50,
1566
1672
  offset: params?.offset ?? 0
@@ -1574,7 +1680,7 @@ function createRecordsMethods(client) {
1574
1680
  // ── Scheduling ────────────────────────────────────────────
1575
1681
  async scheduleRecordPublish(versionId, publishAt, unpublishAt) {
1576
1682
  const resp = await client.scheduleRecordPublish(
1577
- create3(ScheduleRecordPublishRequestSchema, {
1683
+ create4(ScheduleRecordPublishRequestSchema, {
1578
1684
  versionId,
1579
1685
  publishAt: {
1580
1686
  seconds: BigInt(Math.floor(publishAt.getTime() / 1e3)),
@@ -1590,13 +1696,13 @@ function createRecordsMethods(client) {
1590
1696
  },
1591
1697
  async cancelScheduledRecordPublish(versionId) {
1592
1698
  const resp = await client.cancelScheduledRecordPublish(
1593
- create3(CancelScheduledRecordPublishRequestSchema, { versionId })
1699
+ create4(CancelScheduledRecordPublishRequestSchema, { versionId })
1594
1700
  );
1595
1701
  return resp.version ?? null;
1596
1702
  },
1597
1703
  async listScheduledPublishes(params) {
1598
1704
  const resp = await client.listScheduledPublishes(
1599
- create3(ListScheduledPublishesRequestSchema, {
1705
+ create4(ListScheduledPublishesRequestSchema, {
1600
1706
  from: params?.from ? {
1601
1707
  seconds: BigInt(Math.floor(params.from.getTime() / 1e3)),
1602
1708
  nanos: 0
@@ -1617,7 +1723,7 @@ function createRecordsMethods(client) {
1617
1723
  },
1618
1724
  async listDraftVersions(params) {
1619
1725
  const resp = await client.listDraftVersions(
1620
- create3(ListDraftVersionsRequestSchema, {
1726
+ create4(ListDraftVersionsRequestSchema, {
1621
1727
  modelKey: params?.modelKey,
1622
1728
  search: params?.search,
1623
1729
  limit: params?.limit ?? 50,
@@ -1632,7 +1738,7 @@ function createRecordsMethods(client) {
1632
1738
  // ── Batch Publishing ──────────────────────────────────────
1633
1739
  async batchPublishVersions(versionIds) {
1634
1740
  const resp = await client.batchPublishVersions(
1635
- create3(BatchPublishVersionsRequestSchema, { versionIds })
1741
+ create4(BatchPublishVersionsRequestSchema, { versionIds })
1636
1742
  );
1637
1743
  return {
1638
1744
  records: resp.records ?? [],
@@ -1642,7 +1748,7 @@ function createRecordsMethods(client) {
1642
1748
  // ── Publish Batches ───────────────────────────────────────
1643
1749
  async createPublishBatch(params) {
1644
1750
  const resp = await client.createPublishBatch(
1645
- create3(CreatePublishBatchRequestSchema, {
1751
+ create4(CreatePublishBatchRequestSchema, {
1646
1752
  name: params.name,
1647
1753
  versionIds: params.versionIds,
1648
1754
  scheduledAt: params.scheduledAt ? {
@@ -1657,7 +1763,7 @@ function createRecordsMethods(client) {
1657
1763
  },
1658
1764
  async updatePublishBatch(params) {
1659
1765
  const resp = await client.updatePublishBatch(
1660
- create3(UpdatePublishBatchRequestSchema, {
1766
+ create4(UpdatePublishBatchRequestSchema, {
1661
1767
  batchId: params.batchId,
1662
1768
  name: params.name,
1663
1769
  scheduledAt: params.scheduledAt ? {
@@ -1672,19 +1778,19 @@ function createRecordsMethods(client) {
1672
1778
  },
1673
1779
  async cancelPublishBatch(batchId) {
1674
1780
  const resp = await client.cancelPublishBatch(
1675
- create3(CancelPublishBatchRequestSchema, { batchId })
1781
+ create4(CancelPublishBatchRequestSchema, { batchId })
1676
1782
  );
1677
1783
  return resp.batch ?? null;
1678
1784
  },
1679
1785
  async rollbackPublishBatch(batchId) {
1680
1786
  const resp = await client.rollbackPublishBatch(
1681
- create3(RollbackPublishBatchRequestSchema, { batchId })
1787
+ create4(RollbackPublishBatchRequestSchema, { batchId })
1682
1788
  );
1683
1789
  return resp.batch ?? null;
1684
1790
  },
1685
1791
  async retryFailedBatchItems(batchId) {
1686
1792
  const resp = await client.retryFailedBatchItems(
1687
- create3(RetryFailedBatchItemsRequestSchema, { batchId })
1793
+ create4(RetryFailedBatchItemsRequestSchema, { batchId })
1688
1794
  );
1689
1795
  return {
1690
1796
  batch: resp.batch ?? null,
@@ -1693,13 +1799,13 @@ function createRecordsMethods(client) {
1693
1799
  },
1694
1800
  async addItemsToPublishBatch(batchId, versionIds) {
1695
1801
  const resp = await client.addItemsToPublishBatch(
1696
- create3(AddItemsToPublishBatchRequestSchema, { batchId, versionIds })
1802
+ create4(AddItemsToPublishBatchRequestSchema, { batchId, versionIds })
1697
1803
  );
1698
1804
  return resp.batch ?? null;
1699
1805
  },
1700
1806
  async removeItemsFromPublishBatch(batchId, versionIds) {
1701
1807
  const resp = await client.removeItemsFromPublishBatch(
1702
- create3(RemoveItemsFromPublishBatchRequestSchema, {
1808
+ create4(RemoveItemsFromPublishBatchRequestSchema, {
1703
1809
  batchId,
1704
1810
  versionIds
1705
1811
  })
@@ -1708,7 +1814,7 @@ function createRecordsMethods(client) {
1708
1814
  },
1709
1815
  async listPublishBatches(params) {
1710
1816
  const resp = await client.listPublishBatches(
1711
- create3(ListPublishBatchesRequestSchema, {
1817
+ create4(ListPublishBatchesRequestSchema, {
1712
1818
  status: params?.status,
1713
1819
  from: params?.from ? {
1714
1820
  seconds: BigInt(Math.floor(params.from.getTime() / 1e3)),
@@ -1729,7 +1835,7 @@ function createRecordsMethods(client) {
1729
1835
  },
1730
1836
  async getPublishBatch(batchId) {
1731
1837
  const resp = await client.getPublishBatch(
1732
- create3(GetPublishBatchRequestSchema, { batchId })
1838
+ create4(GetPublishBatchRequestSchema, { batchId })
1733
1839
  );
1734
1840
  return {
1735
1841
  batch: resp.batch ?? null,
@@ -1739,7 +1845,7 @@ function createRecordsMethods(client) {
1739
1845
  // ── Search & Embeddings ──────────────────────────────────
1740
1846
  async globalSearch(params) {
1741
1847
  const resp = await client.globalSearch(
1742
- create3(GlobalSearchRequestSchema, {
1848
+ create4(GlobalSearchRequestSchema, {
1743
1849
  query: params.query,
1744
1850
  modelKeys: params.modelKeys ?? [],
1745
1851
  limit: params.limit ?? 20
@@ -1752,7 +1858,7 @@ function createRecordsMethods(client) {
1752
1858
  },
1753
1859
  async getEmbeddingStats(modelKey) {
1754
1860
  const resp = await client.getEmbeddingStats(
1755
- create3(GetEmbeddingStatsRequestSchema, {
1861
+ create4(GetEmbeddingStatsRequestSchema, {
1756
1862
  modelKey
1757
1863
  })
1758
1864
  );
@@ -1760,13 +1866,13 @@ function createRecordsMethods(client) {
1760
1866
  },
1761
1867
  async getRecordEmbeddings(recordId) {
1762
1868
  const resp = await client.getRecordEmbeddings(
1763
- create3(GetRecordEmbeddingsRequestSchema, { recordId })
1869
+ create4(GetRecordEmbeddingsRequestSchema, { recordId })
1764
1870
  );
1765
1871
  return resp.embeddings ?? [];
1766
1872
  },
1767
1873
  async findSimilarRecords(params) {
1768
1874
  const resp = await client.findSimilarRecords(
1769
- create3(FindSimilarRecordsRequestSchema, {
1875
+ create4(FindSimilarRecordsRequestSchema, {
1770
1876
  recordId: params.recordId,
1771
1877
  modelKey: params.modelKey,
1772
1878
  limit: params.limit ?? 10
@@ -1778,7 +1884,7 @@ function createRecordsMethods(client) {
1778
1884
  }
1779
1885
 
1780
1886
  // src/lib/rpc/configs.ts
1781
- import { create as create4 } from "@bufbuild/protobuf";
1887
+ import { create as create5 } from "@bufbuild/protobuf";
1782
1888
  import {
1783
1889
  CreateConfigRequestSchema,
1784
1890
  GetConfigRequestSchema,
@@ -1802,7 +1908,7 @@ function createConfigsMethods(client) {
1802
1908
  // ── Operations ────────────────────────────────────────────
1803
1909
  async listOperations(params = {}) {
1804
1910
  return client.listOperations(
1805
- create4(ListOperationsRequestSchema, {
1911
+ create5(ListOperationsRequestSchema, {
1806
1912
  category: params.category,
1807
1913
  isActive: params.isActive,
1808
1914
  search: params.search,
@@ -1814,19 +1920,19 @@ function createConfigsMethods(client) {
1814
1920
  // ── Queries ──────────────────────────────────────────────
1815
1921
  async getConfig(id) {
1816
1922
  const resp = await client.getConfig(
1817
- create4(GetConfigRequestSchema, { id })
1923
+ create5(GetConfigRequestSchema, { id })
1818
1924
  );
1819
1925
  return resp.config ?? null;
1820
1926
  },
1821
1927
  async getConfigByKey(key) {
1822
1928
  const resp = await client.getConfigByKey(
1823
- create4(GetConfigByKeyRequestSchema, { key })
1929
+ create5(GetConfigByKeyRequestSchema, { key })
1824
1930
  );
1825
1931
  return resp.config ?? null;
1826
1932
  },
1827
1933
  async listConfigs(params = {}) {
1828
1934
  return client.listConfigs(
1829
- create4(ListConfigsRequestSchema, {
1935
+ create5(ListConfigsRequestSchema, {
1830
1936
  configType: params.configType,
1831
1937
  enabled: params.enabled,
1832
1938
  limit: params.limit ?? 50,
@@ -1837,7 +1943,7 @@ function createConfigsMethods(client) {
1837
1943
  // ── Mutations ────────────────────────────────────────────
1838
1944
  async createConfig(params) {
1839
1945
  const resp = await client.createConfig(
1840
- create4(CreateConfigRequestSchema, {
1946
+ create5(CreateConfigRequestSchema, {
1841
1947
  key: params.key,
1842
1948
  configType: params.configType,
1843
1949
  direction: DIRECTION_TO_PROTO[params.direction ?? "read"] ?? ConfigDirection.READ,
@@ -1851,7 +1957,7 @@ function createConfigsMethods(client) {
1851
1957
  },
1852
1958
  async updateConfig(params) {
1853
1959
  const resp = await client.updateConfig(
1854
- create4(UpdateConfigRequestSchema, {
1960
+ create5(UpdateConfigRequestSchema, {
1855
1961
  id: params.id,
1856
1962
  name: params.name,
1857
1963
  description: params.description,
@@ -1865,7 +1971,7 @@ function createConfigsMethods(client) {
1865
1971
  },
1866
1972
  async applyConfig(configKey, configData) {
1867
1973
  const resp = await client.applyConfig(
1868
- create4(ApplyConfigRequestSchema, {
1974
+ create5(ApplyConfigRequestSchema, {
1869
1975
  configKey,
1870
1976
  configData
1871
1977
  })
@@ -1881,13 +1987,13 @@ function createConfigsMethods(client) {
1881
1987
  },
1882
1988
  async triggerConfigSync(configId) {
1883
1989
  const resp = await client.triggerConfigSync(
1884
- create4(TriggerConfigSyncRequestSchema, { configId })
1990
+ create5(TriggerConfigSyncRequestSchema, { configId })
1885
1991
  );
1886
1992
  return resp.success;
1887
1993
  },
1888
1994
  async deleteConfig(id) {
1889
1995
  const resp = await client.deleteConfig(
1890
- create4(DeleteConfigRequestSchema, { id })
1996
+ create5(DeleteConfigRequestSchema, { id })
1891
1997
  );
1892
1998
  return resp.success;
1893
1999
  }
@@ -1895,7 +2001,7 @@ function createConfigsMethods(client) {
1895
2001
  }
1896
2002
 
1897
2003
  // src/lib/rpc/segments.ts
1898
- import { create as create5, fromJson as fromJson2 } from "@bufbuild/protobuf";
2004
+ import { create as create6, fromJson as fromJson2 } from "@bufbuild/protobuf";
1899
2005
  import { ValueSchema as ValueSchema2 } from "@bufbuild/protobuf/wkt";
1900
2006
  import {
1901
2007
  RuleExpressionSchema,
@@ -1916,7 +2022,7 @@ import {
1916
2022
  OptBackIntoSegmentRequestSchema
1917
2023
  } from "@eide/foir-proto-ts/segments/v1/segments_pb";
1918
2024
  function rawOperandToProto(raw) {
1919
- return create5(RuleOperandSchema, {
2025
+ return create6(RuleOperandSchema, {
1920
2026
  type: raw.type,
1921
2027
  path: raw.path,
1922
2028
  value: raw.value !== void 0 ? fromJson2(ValueSchema2, raw.value) : void 0,
@@ -1925,7 +2031,7 @@ function rawOperandToProto(raw) {
1925
2031
  });
1926
2032
  }
1927
2033
  function rawRulesToProto(raw) {
1928
- return create5(RuleExpressionSchema, {
2034
+ return create6(RuleExpressionSchema, {
1929
2035
  type: raw.type,
1930
2036
  id: raw.id,
1931
2037
  left: raw.left ? rawOperandToProto(raw.left) : void 0,
@@ -1941,19 +2047,19 @@ function createSegmentsMethods(client) {
1941
2047
  // ── Queries ──────────────────────────────────────────────
1942
2048
  async getSegment(id) {
1943
2049
  const resp = await client.getSegment(
1944
- create5(GetSegmentRequestSchema, { id })
2050
+ create6(GetSegmentRequestSchema, { id })
1945
2051
  );
1946
2052
  return resp.segment ?? null;
1947
2053
  },
1948
2054
  async getSegmentByKey(key) {
1949
2055
  const resp = await client.getSegmentByKey(
1950
- create5(GetSegmentByKeyRequestSchema, { key })
2056
+ create6(GetSegmentByKeyRequestSchema, { key })
1951
2057
  );
1952
2058
  return resp.segment ?? null;
1953
2059
  },
1954
2060
  async listSegments(params = {}) {
1955
2061
  return client.listSegments(
1956
- create5(ListSegmentsRequestSchema, {
2062
+ create6(ListSegmentsRequestSchema, {
1957
2063
  isActive: params.isActive,
1958
2064
  configId: params.configId,
1959
2065
  limit: params.limit ?? 50,
@@ -1965,7 +2071,7 @@ function createSegmentsMethods(client) {
1965
2071
  async createSegment(params) {
1966
2072
  const rules = params.rules && !("$typeName" in params.rules) ? rawRulesToProto(params.rules) : params.rules;
1967
2073
  const resp = await client.createSegment(
1968
- create5(CreateSegmentRequestSchema, {
2074
+ create6(CreateSegmentRequestSchema, {
1969
2075
  key: params.key,
1970
2076
  name: params.name,
1971
2077
  description: params.description,
@@ -1982,7 +2088,7 @@ function createSegmentsMethods(client) {
1982
2088
  async updateSegment(params) {
1983
2089
  const rules = params.rules && !("$typeName" in params.rules) ? rawRulesToProto(params.rules) : params.rules;
1984
2090
  const resp = await client.updateSegment(
1985
- create5(UpdateSegmentRequestSchema, {
2091
+ create6(UpdateSegmentRequestSchema, {
1986
2092
  id: params.id,
1987
2093
  name: params.name,
1988
2094
  description: params.description,
@@ -1995,19 +2101,19 @@ function createSegmentsMethods(client) {
1995
2101
  },
1996
2102
  async deleteSegment(id) {
1997
2103
  const resp = await client.deleteSegment(
1998
- create5(DeleteSegmentRequestSchema, { id })
2104
+ create6(DeleteSegmentRequestSchema, { id })
1999
2105
  );
2000
2106
  return resp.success;
2001
2107
  },
2002
2108
  // ── Customer Operations ──────────────────────────────────
2003
2109
  async getCustomerMemberships(customerId) {
2004
2110
  return client.getCustomerMemberships(
2005
- create5(GetCustomerMembershipsRequestSchema, { customerId })
2111
+ create6(GetCustomerMembershipsRequestSchema, { customerId })
2006
2112
  );
2007
2113
  },
2008
2114
  async previewSegmentRules(rules, sampleSize) {
2009
2115
  const resp = await client.previewSegmentRules(
2010
- create5(PreviewSegmentRulesRequestSchema, {
2116
+ create6(PreviewSegmentRulesRequestSchema, {
2011
2117
  rules,
2012
2118
  sampleSize: sampleSize ?? 10
2013
2119
  })
@@ -2016,26 +2122,26 @@ function createSegmentsMethods(client) {
2016
2122
  },
2017
2123
  async testSegmentEvaluation(segmentId, customerId) {
2018
2124
  const resp = await client.testSegmentEvaluation(
2019
- create5(TestSegmentEvaluationRequestSchema, { segmentId, customerId })
2125
+ create6(TestSegmentEvaluationRequestSchema, { segmentId, customerId })
2020
2126
  );
2021
2127
  return resp.result ?? null;
2022
2128
  },
2023
2129
  // ── Opt-out Management ───────────────────────────────────
2024
2130
  async setGlobalOptOut(customerId, optedOut) {
2025
2131
  const resp = await client.setGlobalOptOut(
2026
- create5(SetGlobalOptOutRequestSchema, { customerId, optedOut })
2132
+ create6(SetGlobalOptOutRequestSchema, { customerId, optedOut })
2027
2133
  );
2028
2134
  return resp.success;
2029
2135
  },
2030
2136
  async optOutOfSegment(customerId, segmentId) {
2031
2137
  const resp = await client.optOutOfSegment(
2032
- create5(OptOutOfSegmentRequestSchema, { customerId, segmentId })
2138
+ create6(OptOutOfSegmentRequestSchema, { customerId, segmentId })
2033
2139
  );
2034
2140
  return resp.success;
2035
2141
  },
2036
2142
  async optBackIntoSegment(customerId, segmentId) {
2037
2143
  const resp = await client.optBackIntoSegment(
2038
- create5(OptBackIntoSegmentRequestSchema, { customerId, segmentId })
2144
+ create6(OptBackIntoSegmentRequestSchema, { customerId, segmentId })
2039
2145
  );
2040
2146
  return resp.success;
2041
2147
  }
@@ -2043,7 +2149,7 @@ function createSegmentsMethods(client) {
2043
2149
  }
2044
2150
 
2045
2151
  // src/lib/rpc/experiments.ts
2046
- import { create as create6 } from "@bufbuild/protobuf";
2152
+ import { create as create7 } from "@bufbuild/protobuf";
2047
2153
  import {
2048
2154
  ExperimentStatus,
2049
2155
  CreateExperimentRequestSchema,
@@ -2076,19 +2182,19 @@ function createExperimentsMethods(client) {
2076
2182
  // ── Queries ──────────────────────────────────────────────
2077
2183
  async getExperiment(id) {
2078
2184
  const resp = await client.getExperiment(
2079
- create6(GetExperimentRequestSchema, { id })
2185
+ create7(GetExperimentRequestSchema, { id })
2080
2186
  );
2081
2187
  return resp.experiment ?? null;
2082
2188
  },
2083
2189
  async getExperimentByKey(key) {
2084
2190
  const resp = await client.getExperimentByKey(
2085
- create6(GetExperimentByKeyRequestSchema, { key })
2191
+ create7(GetExperimentByKeyRequestSchema, { key })
2086
2192
  );
2087
2193
  return resp.experiment ?? null;
2088
2194
  },
2089
2195
  async listExperiments(params = {}) {
2090
2196
  return client.listExperiments(
2091
- create6(ListExperimentsRequestSchema, {
2197
+ create7(ListExperimentsRequestSchema, {
2092
2198
  status: params.status ? STATUS_TO_PROTO[params.status] : void 0,
2093
2199
  isActive: params.isActive,
2094
2200
  limit: params.limit ?? 50,
@@ -2098,21 +2204,21 @@ function createExperimentsMethods(client) {
2098
2204
  },
2099
2205
  async getExperimentStats(experimentId) {
2100
2206
  const resp = await client.getExperimentStats(
2101
- create6(GetExperimentStatsRequestSchema, { experimentId })
2207
+ create7(GetExperimentStatsRequestSchema, { experimentId })
2102
2208
  );
2103
2209
  return resp.stats ?? null;
2104
2210
  },
2105
2211
  // ── Mutations ────────────────────────────────────────────
2106
2212
  async createExperiment(params) {
2107
2213
  const resp = await client.createExperiment(
2108
- create6(CreateExperimentRequestSchema, {
2214
+ create7(CreateExperimentRequestSchema, {
2109
2215
  key: params.key,
2110
2216
  name: params.name,
2111
2217
  description: params.description,
2112
2218
  targeting: params.targeting,
2113
2219
  controlPercent: params.controlPercent,
2114
2220
  variants: params.variants?.map(
2115
- (v) => create6(ExperimentVariantSchema, {
2221
+ (v) => create7(ExperimentVariantSchema, {
2116
2222
  key: v.key,
2117
2223
  name: v.name,
2118
2224
  percent: v.percent
@@ -2124,14 +2230,14 @@ function createExperimentsMethods(client) {
2124
2230
  },
2125
2231
  async updateExperiment(params) {
2126
2232
  const resp = await client.updateExperiment(
2127
- create6(UpdateExperimentRequestSchema, {
2233
+ create7(UpdateExperimentRequestSchema, {
2128
2234
  id: params.id,
2129
2235
  name: params.name,
2130
2236
  description: params.description,
2131
2237
  targeting: params.targeting,
2132
2238
  controlPercent: params.controlPercent,
2133
2239
  variants: params.variants?.map(
2134
- (v) => create6(ExperimentVariantSchema, {
2240
+ (v) => create7(ExperimentVariantSchema, {
2135
2241
  key: v.key,
2136
2242
  name: v.name,
2137
2243
  percent: v.percent
@@ -2143,38 +2249,38 @@ function createExperimentsMethods(client) {
2143
2249
  },
2144
2250
  async deleteExperiment(id) {
2145
2251
  const resp = await client.deleteExperiment(
2146
- create6(DeleteExperimentRequestSchema, { id })
2252
+ create7(DeleteExperimentRequestSchema, { id })
2147
2253
  );
2148
2254
  return resp.success;
2149
2255
  },
2150
2256
  // ── Lifecycle ────────────────────────────────────────────
2151
2257
  async startExperiment(experimentId) {
2152
2258
  const resp = await client.startExperiment(
2153
- create6(StartExperimentRequestSchema, { experimentId })
2259
+ create7(StartExperimentRequestSchema, { experimentId })
2154
2260
  );
2155
2261
  return resp.experiment ?? null;
2156
2262
  },
2157
2263
  async pauseExperiment(experimentId) {
2158
2264
  const resp = await client.pauseExperiment(
2159
- create6(PauseExperimentRequestSchema, { experimentId })
2265
+ create7(PauseExperimentRequestSchema, { experimentId })
2160
2266
  );
2161
2267
  return resp.experiment ?? null;
2162
2268
  },
2163
2269
  async resumeExperiment(experimentId) {
2164
2270
  const resp = await client.resumeExperiment(
2165
- create6(ResumeExperimentRequestSchema, { experimentId })
2271
+ create7(ResumeExperimentRequestSchema, { experimentId })
2166
2272
  );
2167
2273
  return resp.experiment ?? null;
2168
2274
  },
2169
2275
  async endExperiment(experimentId) {
2170
2276
  const resp = await client.endExperiment(
2171
- create6(EndExperimentRequestSchema, { experimentId })
2277
+ create7(EndExperimentRequestSchema, { experimentId })
2172
2278
  );
2173
2279
  return resp.experiment ?? null;
2174
2280
  },
2175
2281
  async applyExperimentWinner(experimentId, winnerVariantKey) {
2176
2282
  const resp = await client.applyExperimentWinner(
2177
- create6(ApplyExperimentWinnerRequestSchema, {
2283
+ create7(ApplyExperimentWinnerRequestSchema, {
2178
2284
  experimentId,
2179
2285
  winnerVariantKey
2180
2286
  })
@@ -2184,7 +2290,7 @@ function createExperimentsMethods(client) {
2184
2290
  // ── Assignments ──────────────────────────────────────────
2185
2291
  async forceAssignExperiment(customerId, experimentId, variantKey) {
2186
2292
  const resp = await client.forceAssignExperiment(
2187
- create6(ForceAssignExperimentRequestSchema, {
2293
+ create7(ForceAssignExperimentRequestSchema, {
2188
2294
  customerId,
2189
2295
  experimentId,
2190
2296
  variantKey
@@ -2194,7 +2300,7 @@ function createExperimentsMethods(client) {
2194
2300
  },
2195
2301
  async removeExperimentAssignment(customerId, experimentId) {
2196
2302
  const resp = await client.removeExperimentAssignment(
2197
- create6(RemoveExperimentAssignmentRequestSchema, {
2303
+ create7(RemoveExperimentAssignmentRequestSchema, {
2198
2304
  customerId,
2199
2305
  experimentId
2200
2306
  })
@@ -2203,7 +2309,7 @@ function createExperimentsMethods(client) {
2203
2309
  },
2204
2310
  async getCustomerAssignments(customerId) {
2205
2311
  const resp = await client.getCustomerAssignments(
2206
- create6(GetCustomerAssignmentsRequestSchema, { customerId })
2312
+ create7(GetCustomerAssignmentsRequestSchema, { customerId })
2207
2313
  );
2208
2314
  return resp.assignments ?? [];
2209
2315
  }
@@ -2211,7 +2317,7 @@ function createExperimentsMethods(client) {
2211
2317
  }
2212
2318
 
2213
2319
  // src/lib/rpc/settings.ts
2214
- import { create as create7 } from "@bufbuild/protobuf";
2320
+ import { create as create8 } from "@bufbuild/protobuf";
2215
2321
  import {
2216
2322
  GetSettingsRequestSchema,
2217
2323
  UpdateSettingRequestSchema,
@@ -2262,7 +2368,7 @@ function createSettingsMethods(client) {
2262
2368
  // ── Settings ─────────────────────────────────────────────
2263
2369
  async getSettings(params = {}) {
2264
2370
  const resp = await client.getSettings(
2265
- create7(GetSettingsRequestSchema, {
2371
+ create8(GetSettingsRequestSchema, {
2266
2372
  category: params.category,
2267
2373
  key: params.key
2268
2374
  })
@@ -2271,7 +2377,7 @@ function createSettingsMethods(client) {
2271
2377
  },
2272
2378
  async updateSetting(params) {
2273
2379
  const resp = await client.updateSetting(
2274
- create7(UpdateSettingRequestSchema, {
2380
+ create8(UpdateSettingRequestSchema, {
2275
2381
  key: params.key,
2276
2382
  value: params.value
2277
2383
  })
@@ -2280,14 +2386,14 @@ function createSettingsMethods(client) {
2280
2386
  },
2281
2387
  async deleteSetting(key) {
2282
2388
  const resp = await client.deleteSetting(
2283
- create7(DeleteSettingRequestSchema, { key })
2389
+ create8(DeleteSettingRequestSchema, { key })
2284
2390
  );
2285
2391
  return resp.success;
2286
2392
  },
2287
2393
  // ── Mentions ─────────────────────────────────────────────
2288
2394
  async listMyMentions(params = {}) {
2289
2395
  return client.listMyMentions(
2290
- create7(ListMyMentionsRequestSchema, {
2396
+ create8(ListMyMentionsRequestSchema, {
2291
2397
  status: params.status ?? [],
2292
2398
  entityType: params.entityType,
2293
2399
  limit: params.limit ?? 50,
@@ -2297,7 +2403,7 @@ function createSettingsMethods(client) {
2297
2403
  },
2298
2404
  async updateMentionStatus(params) {
2299
2405
  const resp = await client.updateMentionStatus(
2300
- create7(UpdateMentionStatusRequestSchema, {
2406
+ create8(UpdateMentionStatusRequestSchema, {
2301
2407
  mentionId: params.mentionId,
2302
2408
  status: params.status,
2303
2409
  completedNote: params.completedNote,
@@ -2309,7 +2415,7 @@ function createSettingsMethods(client) {
2309
2415
  // ── Notes ────────────────────────────────────────────────
2310
2416
  async createNote(params) {
2311
2417
  const resp = await client.createNote(
2312
- create7(CreateNoteRequestSchema, {
2418
+ create8(CreateNoteRequestSchema, {
2313
2419
  ...params,
2314
2420
  content: params.content
2315
2421
  })
@@ -2317,12 +2423,12 @@ function createSettingsMethods(client) {
2317
2423
  return resp.note ?? null;
2318
2424
  },
2319
2425
  async getNote(id) {
2320
- const resp = await client.getNote(create7(GetNoteRequestSchema, { id }));
2426
+ const resp = await client.getNote(create8(GetNoteRequestSchema, { id }));
2321
2427
  return resp.note ?? null;
2322
2428
  },
2323
2429
  async listNotes(params) {
2324
2430
  return client.listNotes(
2325
- create7(ListNotesRequestSchema, {
2431
+ create8(ListNotesRequestSchema, {
2326
2432
  entityType: params.entityType,
2327
2433
  entityId: params.entityId,
2328
2434
  limit: params.limit ?? 50,
@@ -2332,7 +2438,7 @@ function createSettingsMethods(client) {
2332
2438
  },
2333
2439
  async updateNote(params) {
2334
2440
  const resp = await client.updateNote(
2335
- create7(UpdateNoteRequestSchema, {
2441
+ create8(UpdateNoteRequestSchema, {
2336
2442
  id: params.id,
2337
2443
  content: params.content,
2338
2444
  isResolved: params.isResolved
@@ -2342,14 +2448,14 @@ function createSettingsMethods(client) {
2342
2448
  },
2343
2449
  async deleteNote(id) {
2344
2450
  const resp = await client.deleteNote(
2345
- create7(DeleteNoteRequestSchema, { id })
2451
+ create8(DeleteNoteRequestSchema, { id })
2346
2452
  );
2347
2453
  return resp.success;
2348
2454
  },
2349
2455
  // ── Context Dimensions ───────────────────────────────────
2350
2456
  async listContextDimensions(params = {}) {
2351
2457
  return client.listContextDimensions(
2352
- create7(ListContextDimensionsRequestSchema, {
2458
+ create8(ListContextDimensionsRequestSchema, {
2353
2459
  search: params.search,
2354
2460
  limit: params.limit ?? 50,
2355
2461
  offset: params.offset ?? 0
@@ -2358,31 +2464,31 @@ function createSettingsMethods(client) {
2358
2464
  },
2359
2465
  async getContextDimension(id) {
2360
2466
  const resp = await client.getContextDimension(
2361
- create7(GetContextDimensionRequestSchema, { id })
2467
+ create8(GetContextDimensionRequestSchema, { id })
2362
2468
  );
2363
2469
  return resp.dimension ?? null;
2364
2470
  },
2365
2471
  async createContextDimension(params) {
2366
2472
  const resp = await client.createContextDimension(
2367
- create7(CreateContextDimensionRequestSchema, params)
2473
+ create8(CreateContextDimensionRequestSchema, params)
2368
2474
  );
2369
2475
  return resp.dimension ?? null;
2370
2476
  },
2371
2477
  async updateContextDimension(params) {
2372
2478
  const resp = await client.updateContextDimension(
2373
- create7(UpdateContextDimensionRequestSchema, params)
2479
+ create8(UpdateContextDimensionRequestSchema, params)
2374
2480
  );
2375
2481
  return resp.dimension ?? null;
2376
2482
  },
2377
2483
  async deleteContextDimension(id) {
2378
2484
  const resp = await client.deleteContextDimension(
2379
- create7(DeleteContextDimensionRequestSchema, { id })
2485
+ create8(DeleteContextDimensionRequestSchema, { id })
2380
2486
  );
2381
2487
  return resp.success;
2382
2488
  },
2383
2489
  async getContextDimensionValues(dimensionKey, params = {}) {
2384
2490
  return client.getContextDimensionValues(
2385
- create7(GetContextDimensionValuesRequestSchema, {
2491
+ create8(GetContextDimensionValuesRequestSchema, {
2386
2492
  dimensionKey,
2387
2493
  search: params.search,
2388
2494
  limit: params.limit ?? 50,
@@ -2393,19 +2499,19 @@ function createSettingsMethods(client) {
2393
2499
  // ── Customer Profile Schema ──────────────────────────────
2394
2500
  async getCustomerProfileSchema() {
2395
2501
  const resp = await client.getCustomerProfileSchema(
2396
- create7(GetCustomerProfileSchemaRequestSchema, {})
2502
+ create8(GetCustomerProfileSchemaRequestSchema, {})
2397
2503
  );
2398
2504
  return resp.schema ?? null;
2399
2505
  },
2400
2506
  async getCustomerProfile(customerId) {
2401
2507
  const resp = await client.getCustomerProfile(
2402
- create7(GetCustomerProfileRequestSchema, { customerId })
2508
+ create8(GetCustomerProfileRequestSchema, { customerId })
2403
2509
  );
2404
2510
  return resp.data ?? null;
2405
2511
  },
2406
2512
  async setCustomerProfile(params) {
2407
2513
  const resp = await client.setCustomerProfile(
2408
- create7(SetCustomerProfileRequestSchema, {
2514
+ create8(SetCustomerProfileRequestSchema, {
2409
2515
  customerId: params.customerId,
2410
2516
  data: params.data
2411
2517
  })
@@ -2414,7 +2520,7 @@ function createSettingsMethods(client) {
2414
2520
  },
2415
2521
  async updateCustomerProfileSchema(params) {
2416
2522
  const resp = await client.updateCustomerProfileSchema(
2417
- create7(UpdateCustomerProfileSchemaRequestSchema, {
2523
+ create8(UpdateCustomerProfileSchemaRequestSchema, {
2418
2524
  fields: params.fields.map((f) => ({
2419
2525
  id: f.id,
2420
2526
  key: f.key,
@@ -2432,19 +2538,19 @@ function createSettingsMethods(client) {
2432
2538
  },
2433
2539
  async getCustomerResolutionAttributes(customerId) {
2434
2540
  return client.getCustomerResolutionAttributes(
2435
- create7(GetCustomerResolutionAttributesRequestSchema, { customerId })
2541
+ create8(GetCustomerResolutionAttributesRequestSchema, { customerId })
2436
2542
  );
2437
2543
  },
2438
2544
  async getEditorConfigs(modelKey) {
2439
2545
  const resp = await client.getEditorConfigs(
2440
- create7(GetEditorConfigsRequestSchema, { modelKey })
2546
+ create8(GetEditorConfigsRequestSchema, { modelKey })
2441
2547
  );
2442
2548
  return resp.placements ?? [];
2443
2549
  },
2444
2550
  // ── Variant Catalog ──────────────────────────────────────
2445
2551
  async listVariantCatalog(params = {}) {
2446
2552
  return client.listVariantCatalog(
2447
- create7(ListVariantCatalogRequestSchema, {
2553
+ create8(ListVariantCatalogRequestSchema, {
2448
2554
  isActive: params.isActive,
2449
2555
  limit: params.limit ?? 50,
2450
2556
  offset: params.offset ?? 0
@@ -2453,13 +2559,13 @@ function createSettingsMethods(client) {
2453
2559
  },
2454
2560
  async getVariantCatalogEntry(id) {
2455
2561
  const resp = await client.getVariantCatalogEntry(
2456
- create7(GetVariantCatalogEntryRequestSchema, { id })
2562
+ create8(GetVariantCatalogEntryRequestSchema, { id })
2457
2563
  );
2458
2564
  return resp.entry ?? null;
2459
2565
  },
2460
2566
  async createVariantCatalogEntry(params) {
2461
2567
  const resp = await client.createVariantCatalogEntry(
2462
- create7(CreateVariantCatalogEntryRequestSchema, {
2568
+ create8(CreateVariantCatalogEntryRequestSchema, {
2463
2569
  key: params.key,
2464
2570
  name: params.name,
2465
2571
  description: params.description,
@@ -2473,7 +2579,7 @@ function createSettingsMethods(client) {
2473
2579
  },
2474
2580
  async updateVariantCatalogEntry(params) {
2475
2581
  const resp = await client.updateVariantCatalogEntry(
2476
- create7(UpdateVariantCatalogEntryRequestSchema, {
2582
+ create8(UpdateVariantCatalogEntryRequestSchema, {
2477
2583
  id: params.id,
2478
2584
  name: params.name,
2479
2585
  description: params.description,
@@ -2487,14 +2593,14 @@ function createSettingsMethods(client) {
2487
2593
  },
2488
2594
  async deleteVariantCatalogEntry(id) {
2489
2595
  const resp = await client.deleteVariantCatalogEntry(
2490
- create7(DeleteVariantCatalogEntryRequestSchema, { id })
2596
+ create8(DeleteVariantCatalogEntryRequestSchema, { id })
2491
2597
  );
2492
2598
  return resp.success;
2493
2599
  },
2494
2600
  // ── Locales ──────────────────────────────────────────────
2495
2601
  async listLocales(params = {}) {
2496
2602
  return client.listLocales(
2497
- create7(ListLocalesRequestSchema, {
2603
+ create8(ListLocalesRequestSchema, {
2498
2604
  includeInactive: params.includeInactive,
2499
2605
  limit: params.limit ?? 50,
2500
2606
  offset: params.offset ?? 0
@@ -2503,25 +2609,25 @@ function createSettingsMethods(client) {
2503
2609
  },
2504
2610
  async getLocale(id) {
2505
2611
  const resp = await client.getLocale(
2506
- create7(GetLocaleRequestSchema, { id })
2612
+ create8(GetLocaleRequestSchema, { id })
2507
2613
  );
2508
2614
  return resp.locale ?? null;
2509
2615
  },
2510
2616
  async getLocaleByCode(code) {
2511
2617
  const resp = await client.getLocaleByCode(
2512
- create7(GetLocaleByCodeRequestSchema, { code })
2618
+ create8(GetLocaleByCodeRequestSchema, { code })
2513
2619
  );
2514
2620
  return resp.locale ?? null;
2515
2621
  },
2516
2622
  async getDefaultLocale() {
2517
2623
  const resp = await client.getDefaultLocale(
2518
- create7(GetDefaultLocaleRequestSchema, {})
2624
+ create8(GetDefaultLocaleRequestSchema, {})
2519
2625
  );
2520
2626
  return resp.locale ?? null;
2521
2627
  },
2522
2628
  async createLocale(params) {
2523
2629
  const resp = await client.createLocale(
2524
- create7(CreateLocaleRequestSchema, {
2630
+ create8(CreateLocaleRequestSchema, {
2525
2631
  locale: params.locale,
2526
2632
  displayName: params.displayName,
2527
2633
  nativeName: params.nativeName,
@@ -2534,7 +2640,7 @@ function createSettingsMethods(client) {
2534
2640
  },
2535
2641
  async updateLocale(params) {
2536
2642
  const resp = await client.updateLocale(
2537
- create7(UpdateLocaleRequestSchema, {
2643
+ create8(UpdateLocaleRequestSchema, {
2538
2644
  id: params.id,
2539
2645
  displayName: params.displayName,
2540
2646
  nativeName: params.nativeName,
@@ -2548,20 +2654,20 @@ function createSettingsMethods(client) {
2548
2654
  },
2549
2655
  async deleteLocale(id) {
2550
2656
  const resp = await client.deleteLocale(
2551
- create7(DeleteLocaleRequestSchema, { id })
2657
+ create8(DeleteLocaleRequestSchema, { id })
2552
2658
  );
2553
2659
  return resp.success;
2554
2660
  },
2555
2661
  // ── Nav Preferences ─────────────────────────────────────
2556
2662
  async getNavPreferences() {
2557
2663
  const resp = await client.getNavPreferences(
2558
- create7(GetNavPreferencesRequestSchema, {})
2664
+ create8(GetNavPreferencesRequestSchema, {})
2559
2665
  );
2560
2666
  return resp.preferences ?? null;
2561
2667
  },
2562
2668
  async updateNavPreferences(params) {
2563
2669
  const resp = await client.updateNavPreferences(
2564
- create7(UpdateNavPreferencesRequestSchema, {
2670
+ create8(UpdateNavPreferencesRequestSchema, {
2565
2671
  preferences: params.preferences ? {
2566
2672
  favoriteProjects: params.preferences.favoriteProjects,
2567
2673
  favoriteNavItems: params.preferences.favoriteNavItems,
@@ -2578,7 +2684,7 @@ function createSettingsMethods(client) {
2578
2684
  // ── Recently Opened ─────────────────────────────────────
2579
2685
  async listRecentlyOpened(limit) {
2580
2686
  const resp = await client.listRecentlyOpened(
2581
- create7(ListRecentlyOpenedRequestSchema, {
2687
+ create8(ListRecentlyOpenedRequestSchema, {
2582
2688
  limit: limit ?? 20
2583
2689
  })
2584
2690
  );
@@ -2586,7 +2692,7 @@ function createSettingsMethods(client) {
2586
2692
  },
2587
2693
  async trackRecentlyOpened(params) {
2588
2694
  const resp = await client.trackRecentlyOpened(
2589
- create7(TrackRecentlyOpenedRequestSchema, {
2695
+ create8(TrackRecentlyOpenedRequestSchema, {
2590
2696
  type: params.type,
2591
2697
  id: params.id,
2592
2698
  label: params.label,
@@ -2597,7 +2703,7 @@ function createSettingsMethods(client) {
2597
2703
  },
2598
2704
  async removeRecentlyOpened(params) {
2599
2705
  const resp = await client.removeRecentlyOpened(
2600
- create7(RemoveRecentlyOpenedRequestSchema, {
2706
+ create8(RemoveRecentlyOpenedRequestSchema, {
2601
2707
  type: params.type,
2602
2708
  id: params.id
2603
2709
  })
@@ -2606,14 +2712,14 @@ function createSettingsMethods(client) {
2606
2712
  },
2607
2713
  async clearRecentlyOpened() {
2608
2714
  const resp = await client.clearRecentlyOpened(
2609
- create7(ClearRecentlyOpenedRequestSchema, {})
2715
+ create8(ClearRecentlyOpenedRequestSchema, {})
2610
2716
  );
2611
2717
  return resp.success;
2612
2718
  },
2613
2719
  // ── Email Actions ──────────────────────────────────────────
2614
2720
  async listEmailActions(params = {}) {
2615
2721
  return client.listEmailActions(
2616
- create7(ListEmailActionsRequestSchema, {
2722
+ create8(ListEmailActionsRequestSchema, {
2617
2723
  limit: params.limit ?? 50,
2618
2724
  offset: params.offset ?? 0
2619
2725
  })
@@ -2621,7 +2727,7 @@ function createSettingsMethods(client) {
2621
2727
  },
2622
2728
  async updateEmailAction(params) {
2623
2729
  const resp = await client.updateEmailAction(
2624
- create7(UpdateEmailActionRequestSchema, {
2730
+ create8(UpdateEmailActionRequestSchema, {
2625
2731
  key: params.key,
2626
2732
  resendTemplateId: params.resendTemplateId,
2627
2733
  defaultFrom: params.defaultFrom,
@@ -2634,7 +2740,7 @@ function createSettingsMethods(client) {
2634
2740
  },
2635
2741
  async listResendTemplates() {
2636
2742
  const resp = await client.listResendTemplates(
2637
- create7(ListResendTemplatesRequestSchema, {})
2743
+ create8(ListResendTemplatesRequestSchema, {})
2638
2744
  );
2639
2745
  return resp.templates ?? [];
2640
2746
  }
@@ -2642,7 +2748,7 @@ function createSettingsMethods(client) {
2642
2748
  }
2643
2749
 
2644
2750
  // src/lib/rpc/storage.ts
2645
- import { create as create8 } from "@bufbuild/protobuf";
2751
+ import { create as create9 } from "@bufbuild/protobuf";
2646
2752
  import {
2647
2753
  CreateFileUploadRequestSchema,
2648
2754
  ConfirmFileUploadRequestSchema,
@@ -2662,7 +2768,7 @@ function createStorageMethods(client) {
2662
2768
  return {
2663
2769
  async createFileUpload(params) {
2664
2770
  return client.createFileUpload(
2665
- create8(CreateFileUploadRequestSchema, {
2771
+ create9(CreateFileUploadRequestSchema, {
2666
2772
  filename: params.filename,
2667
2773
  mimeType: params.mimeType,
2668
2774
  size: BigInt(params.size),
@@ -2672,17 +2778,17 @@ function createStorageMethods(client) {
2672
2778
  },
2673
2779
  async confirmFileUpload(uploadId) {
2674
2780
  const resp = await client.confirmFileUpload(
2675
- create8(ConfirmFileUploadRequestSchema, { uploadId })
2781
+ create9(ConfirmFileUploadRequestSchema, { uploadId })
2676
2782
  );
2677
2783
  return resp.file ?? null;
2678
2784
  },
2679
2785
  async getFile(id) {
2680
- const resp = await client.getFile(create8(GetFileRequestSchema, { id }));
2786
+ const resp = await client.getFile(create9(GetFileRequestSchema, { id }));
2681
2787
  return resp.file ?? null;
2682
2788
  },
2683
2789
  async listFiles(params) {
2684
2790
  return client.listFiles(
2685
- create8(ListFilesRequestSchema, {
2791
+ create9(ListFilesRequestSchema, {
2686
2792
  folder: params.folder,
2687
2793
  mimeType: params.mimeType,
2688
2794
  search: params.search,
@@ -2694,13 +2800,13 @@ function createStorageMethods(client) {
2694
2800
  },
2695
2801
  async getStorageUsage() {
2696
2802
  const resp = await client.getStorageUsage(
2697
- create8(GetStorageUsageRequestSchema, {})
2803
+ create9(GetStorageUsageRequestSchema, {})
2698
2804
  );
2699
2805
  return resp.usage ?? null;
2700
2806
  },
2701
2807
  async updateFile(params) {
2702
2808
  const resp = await client.updateFile(
2703
- create8(UpdateFileRequestSchema, {
2809
+ create9(UpdateFileRequestSchema, {
2704
2810
  id: params.id,
2705
2811
  filename: params.filename,
2706
2812
  folder: params.folder,
@@ -2711,7 +2817,7 @@ function createStorageMethods(client) {
2711
2817
  },
2712
2818
  async updateFileMetadata(params) {
2713
2819
  const resp = await client.updateFileMetadata(
2714
- create8(UpdateFileMetadataRequestSchema, {
2820
+ create9(UpdateFileMetadataRequestSchema, {
2715
2821
  id: params.id,
2716
2822
  altText: params.altText,
2717
2823
  caption: params.caption,
@@ -2722,37 +2828,37 @@ function createStorageMethods(client) {
2722
2828
  },
2723
2829
  async deleteFile(id) {
2724
2830
  const resp = await client.deleteFile(
2725
- create8(DeleteFileRequestSchema, { id })
2831
+ create9(DeleteFileRequestSchema, { id })
2726
2832
  );
2727
2833
  return resp.success;
2728
2834
  },
2729
2835
  async permanentlyDeleteFile(id) {
2730
2836
  const resp = await client.permanentlyDeleteFile(
2731
- create8(PermanentlyDeleteFileRequestSchema, { id })
2837
+ create9(PermanentlyDeleteFileRequestSchema, { id })
2732
2838
  );
2733
2839
  return resp.success;
2734
2840
  },
2735
2841
  async restoreFile(id) {
2736
2842
  const resp = await client.restoreFile(
2737
- create8(RestoreFileRequestSchema, { id })
2843
+ create9(RestoreFileRequestSchema, { id })
2738
2844
  );
2739
2845
  return resp.file ?? null;
2740
2846
  },
2741
2847
  async trackFileUsage(fileId, entityType) {
2742
2848
  const resp = await client.trackFileUsage(
2743
- create8(TrackFileUsageRequestSchema, { fileId, entityType })
2849
+ create9(TrackFileUsageRequestSchema, { fileId, entityType })
2744
2850
  );
2745
2851
  return resp.file ?? null;
2746
2852
  },
2747
2853
  async removeFileUsage(fileId, entityType) {
2748
2854
  const resp = await client.removeFileUsage(
2749
- create8(RemoveFileUsageRequestSchema, { fileId, entityType })
2855
+ create9(RemoveFileUsageRequestSchema, { fileId, entityType })
2750
2856
  );
2751
2857
  return resp.success;
2752
2858
  },
2753
2859
  async cleanupOrphanedFiles(params) {
2754
2860
  return client.cleanupOrphanedFiles(
2755
- create8(CleanupOrphanedFilesRequestSchema, {
2861
+ create9(CleanupOrphanedFilesRequestSchema, {
2756
2862
  orphanThresholdDays: params?.orphanThresholdDays ?? 30,
2757
2863
  dryRun: params?.dryRun ?? false,
2758
2864
  limit: params?.limit ?? 100
@@ -2763,7 +2869,7 @@ function createStorageMethods(client) {
2763
2869
  }
2764
2870
 
2765
2871
  // src/lib/rpc/operations.ts
2766
- import { create as create9 } from "@bufbuild/protobuf";
2872
+ import { create as create10 } from "@bufbuild/protobuf";
2767
2873
  import {
2768
2874
  ListOperationsRequestSchema as ListOperationsRequestSchema2,
2769
2875
  GetOperationRequestSchema,
@@ -2781,7 +2887,7 @@ function createOperationsMethods(client) {
2781
2887
  // ── CRUD ──────────────────────────────────────────────────
2782
2888
  async listOperations(params = {}) {
2783
2889
  return client.listOperations(
2784
- create9(ListOperationsRequestSchema2, {
2890
+ create10(ListOperationsRequestSchema2, {
2785
2891
  configId: params.configId,
2786
2892
  category: params.category,
2787
2893
  isActive: params.isActive,
@@ -2793,7 +2899,7 @@ function createOperationsMethods(client) {
2793
2899
  },
2794
2900
  async getOperation(params) {
2795
2901
  const resp = await client.getOperation(
2796
- create9(GetOperationRequestSchema, {
2902
+ create10(GetOperationRequestSchema, {
2797
2903
  id: params.id ?? "",
2798
2904
  key: params.key
2799
2905
  })
@@ -2802,7 +2908,7 @@ function createOperationsMethods(client) {
2802
2908
  },
2803
2909
  async createOperation(params) {
2804
2910
  const resp = await client.createOperation(
2805
- create9(CreateOperationRequestSchema, {
2911
+ create10(CreateOperationRequestSchema, {
2806
2912
  key: params.key,
2807
2913
  name: params.name,
2808
2914
  endpoint: params.endpoint,
@@ -2824,7 +2930,7 @@ function createOperationsMethods(client) {
2824
2930
  },
2825
2931
  async updateOperation(params) {
2826
2932
  const resp = await client.updateOperation(
2827
- create9(UpdateOperationRequestSchema, {
2933
+ create10(UpdateOperationRequestSchema, {
2828
2934
  id: params.id,
2829
2935
  name: params.name,
2830
2936
  description: params.description,
@@ -2843,20 +2949,20 @@ function createOperationsMethods(client) {
2843
2949
  },
2844
2950
  async deleteOperation(id) {
2845
2951
  const resp = await client.deleteOperation(
2846
- create9(DeleteOperationRequestSchema, { id })
2952
+ create10(DeleteOperationRequestSchema, { id })
2847
2953
  );
2848
2954
  return resp.success;
2849
2955
  },
2850
2956
  async getSigningSecret() {
2851
2957
  const resp = await client.getSigningSecret(
2852
- create9(GetSigningSecretRequestSchema, {})
2958
+ create10(GetSigningSecretRequestSchema, {})
2853
2959
  );
2854
2960
  return { secret: resp.secret, prefix: resp.prefix };
2855
2961
  },
2856
2962
  // ── Execution ─────────────────────────────────────────────
2857
2963
  async executeOperation(params) {
2858
2964
  return client.executeOperation(
2859
- create9(ExecuteOperationRequestSchema, {
2965
+ create10(ExecuteOperationRequestSchema, {
2860
2966
  operationKey: params.operationKey,
2861
2967
  input: params.input,
2862
2968
  triggerType: params.triggerType,
@@ -2867,7 +2973,7 @@ function createOperationsMethods(client) {
2867
2973
  // ── Dead Letter Queue ─────────────────────────────────────
2868
2974
  async listDeadLetterEntries(params = {}) {
2869
2975
  return client.listDeadLetterEntries(
2870
- create9(ListDeadLetterEntriesRequestSchema, {
2976
+ create10(ListDeadLetterEntriesRequestSchema, {
2871
2977
  operationKey: params.operationKey,
2872
2978
  limit: params.limit ?? 50,
2873
2979
  offset: params.offset ?? 0
@@ -2876,13 +2982,13 @@ function createOperationsMethods(client) {
2876
2982
  },
2877
2983
  async retryDeadLetterEntry(id) {
2878
2984
  const resp = await client.retryDeadLetterEntry(
2879
- create9(RetryDeadLetterEntryRequestSchema, { id })
2985
+ create10(RetryDeadLetterEntryRequestSchema, { id })
2880
2986
  );
2881
2987
  return resp.success;
2882
2988
  },
2883
2989
  async dismissDeadLetterEntry(id) {
2884
2990
  const resp = await client.dismissDeadLetterEntry(
2885
- create9(DismissDeadLetterEntryRequestSchema, { id })
2991
+ create10(DismissDeadLetterEntryRequestSchema, { id })
2886
2992
  );
2887
2993
  return resp.success;
2888
2994
  }
@@ -2890,7 +2996,7 @@ function createOperationsMethods(client) {
2890
2996
  }
2891
2997
 
2892
2998
  // src/lib/rpc/hooks.ts
2893
- import { create as create10 } from "@bufbuild/protobuf";
2999
+ import { create as create11 } from "@bufbuild/protobuf";
2894
3000
  import {
2895
3001
  ListHooksRequestSchema,
2896
3002
  GetHookRequestSchema,
@@ -2907,7 +3013,7 @@ function createHooksMethods(client) {
2907
3013
  // ── Queries ──────────────────────────────────────────────
2908
3014
  async listHooks(params = {}) {
2909
3015
  return client.listHooks(
2910
- create10(ListHooksRequestSchema, {
3016
+ create11(ListHooksRequestSchema, {
2911
3017
  event: params.event,
2912
3018
  isActive: params.isActive,
2913
3019
  configId: params.configId,
@@ -2917,13 +3023,13 @@ function createHooksMethods(client) {
2917
3023
  );
2918
3024
  },
2919
3025
  async getHook(id) {
2920
- const resp = await client.getHook(create10(GetHookRequestSchema, { id }));
3026
+ const resp = await client.getHook(create11(GetHookRequestSchema, { id }));
2921
3027
  return resp.hook ?? null;
2922
3028
  },
2923
3029
  // ── Mutations ────────────────────────────────────────────
2924
3030
  async createHook(params) {
2925
3031
  const resp = await client.createHook(
2926
- create10(CreateHookRequestSchema, {
3032
+ create11(CreateHookRequestSchema, {
2927
3033
  key: params.key,
2928
3034
  name: params.name,
2929
3035
  event: params.event,
@@ -2939,7 +3045,7 @@ function createHooksMethods(client) {
2939
3045
  },
2940
3046
  async updateHook(params) {
2941
3047
  const resp = await client.updateHook(
2942
- create10(UpdateHookRequestSchema, {
3048
+ create11(UpdateHookRequestSchema, {
2943
3049
  id: params.id,
2944
3050
  name: params.name,
2945
3051
  description: params.description,
@@ -2953,21 +3059,21 @@ function createHooksMethods(client) {
2953
3059
  },
2954
3060
  async deleteHook(id) {
2955
3061
  const resp = await client.deleteHook(
2956
- create10(DeleteHookRequestSchema, { id })
3062
+ create11(DeleteHookRequestSchema, { id })
2957
3063
  );
2958
3064
  return resp.success;
2959
3065
  },
2960
3066
  // ── Get by Key ──────────────────────────────────────────
2961
3067
  async getHookByKey(key) {
2962
3068
  const resp = await client.getHookByKey(
2963
- create10(GetHookByKeyRequestSchema, { key })
3069
+ create11(GetHookByKeyRequestSchema, { key })
2964
3070
  );
2965
3071
  return resp.hook ?? null;
2966
3072
  },
2967
3073
  // ── Deliveries ──────────────────────────────────────────
2968
3074
  async listHookDeliveries(params) {
2969
3075
  return client.listHookDeliveries(
2970
- create10(ListHookDeliveriesRequestSchema, {
3076
+ create11(ListHookDeliveriesRequestSchema, {
2971
3077
  hookId: params.hookId,
2972
3078
  status: params.status,
2973
3079
  limit: params.limit ?? 50,
@@ -2977,14 +3083,14 @@ function createHooksMethods(client) {
2977
3083
  },
2978
3084
  async retryHookDelivery(deliveryId) {
2979
3085
  const resp = await client.retryHookDelivery(
2980
- create10(RetryHookDeliveryRequestSchema, { deliveryId })
3086
+ create11(RetryHookDeliveryRequestSchema, { deliveryId })
2981
3087
  );
2982
3088
  return resp.success;
2983
3089
  },
2984
3090
  // ── Testing ─────────────────────────────────────────────
2985
3091
  async testHook(params) {
2986
3092
  const resp = await client.testHook(
2987
- create10(TestHookRequestSchema, {
3093
+ create11(TestHookRequestSchema, {
2988
3094
  hookId: params.hookId,
2989
3095
  testPayload: params.testPayload
2990
3096
  })
@@ -2998,7 +3104,7 @@ function createHooksMethods(client) {
2998
3104
  }
2999
3105
 
3000
3106
  // src/lib/rpc/notifications.ts
3001
- import { create as create11 } from "@bufbuild/protobuf";
3107
+ import { create as create12 } from "@bufbuild/protobuf";
3002
3108
  import {
3003
3109
  ListNotificationsRequestSchema,
3004
3110
  MarkNotificationReadRequestSchema,
@@ -3008,7 +3114,7 @@ function createNotificationsMethods(client) {
3008
3114
  return {
3009
3115
  async listNotifications(params = {}) {
3010
3116
  return client.listNotifications(
3011
- create11(ListNotificationsRequestSchema, {
3117
+ create12(ListNotificationsRequestSchema, {
3012
3118
  isRead: params.unreadOnly ? false : void 0,
3013
3119
  limit: params.limit ?? 20,
3014
3120
  offset: params.offset ?? 0
@@ -3017,13 +3123,13 @@ function createNotificationsMethods(client) {
3017
3123
  },
3018
3124
  async markNotificationRead(id) {
3019
3125
  const resp = await client.markNotificationRead(
3020
- create11(MarkNotificationReadRequestSchema, { id })
3126
+ create12(MarkNotificationReadRequestSchema, { id })
3021
3127
  );
3022
3128
  return resp.success;
3023
3129
  },
3024
3130
  async markAllNotificationsRead() {
3025
3131
  const resp = await client.markAllNotificationsRead(
3026
- create11(MarkAllNotificationsReadRequestSchema, {})
3132
+ create12(MarkAllNotificationsReadRequestSchema, {})
3027
3133
  );
3028
3134
  return resp.count;
3029
3135
  }
@@ -3031,7 +3137,7 @@ function createNotificationsMethods(client) {
3031
3137
  }
3032
3138
 
3033
3139
  // src/lib/rpc/cron-schedules.ts
3034
- import { create as create12 } from "@bufbuild/protobuf";
3140
+ import { create as create13 } from "@bufbuild/protobuf";
3035
3141
  import {
3036
3142
  ListCronSchedulesRequestSchema,
3037
3143
  GetCronScheduleRequestSchema,
@@ -3048,7 +3154,7 @@ function createCronSchedulesMethods(client) {
3048
3154
  // ── Queries ──────────────────────────────────────────────
3049
3155
  async listCronSchedules(params = {}) {
3050
3156
  return client.listCronSchedules(
3051
- create12(ListCronSchedulesRequestSchema, {
3157
+ create13(ListCronSchedulesRequestSchema, {
3052
3158
  configId: params.configId,
3053
3159
  isActive: params.isActive,
3054
3160
  limit: params.limit ?? 50,
@@ -3058,20 +3164,20 @@ function createCronSchedulesMethods(client) {
3058
3164
  },
3059
3165
  async getCronSchedule(id) {
3060
3166
  const resp = await client.getCronSchedule(
3061
- create12(GetCronScheduleRequestSchema, { id })
3167
+ create13(GetCronScheduleRequestSchema, { id })
3062
3168
  );
3063
3169
  return resp.schedule ?? null;
3064
3170
  },
3065
3171
  async getCronScheduleByKey(key) {
3066
3172
  const resp = await client.getCronScheduleByKey(
3067
- create12(GetCronScheduleByKeyRequestSchema, { key })
3173
+ create13(GetCronScheduleByKeyRequestSchema, { key })
3068
3174
  );
3069
3175
  return resp.schedule ?? null;
3070
3176
  },
3071
3177
  // ── Mutations ────────────────────────────────────────────
3072
3178
  async createCronSchedule(params) {
3073
3179
  const resp = await client.createCronSchedule(
3074
- create12(CreateCronScheduleRequestSchema, {
3180
+ create13(CreateCronScheduleRequestSchema, {
3075
3181
  key: params.key,
3076
3182
  name: params.name,
3077
3183
  description: params.description,
@@ -3087,7 +3193,7 @@ function createCronSchedulesMethods(client) {
3087
3193
  },
3088
3194
  async updateCronSchedule(params) {
3089
3195
  const resp = await client.updateCronSchedule(
3090
- create12(UpdateCronScheduleRequestSchema, {
3196
+ create13(UpdateCronScheduleRequestSchema, {
3091
3197
  id: params.id,
3092
3198
  name: params.name,
3093
3199
  description: params.description,
@@ -3101,25 +3207,25 @@ function createCronSchedulesMethods(client) {
3101
3207
  },
3102
3208
  async deleteCronSchedule(id) {
3103
3209
  const resp = await client.deleteCronSchedule(
3104
- create12(DeleteCronScheduleRequestSchema, { id })
3210
+ create13(DeleteCronScheduleRequestSchema, { id })
3105
3211
  );
3106
3212
  return resp.success;
3107
3213
  },
3108
3214
  async pauseCronSchedule(params) {
3109
3215
  const resp = await client.pauseCronSchedule(
3110
- create12(PauseCronScheduleRequestSchema, { id: params.id })
3216
+ create13(PauseCronScheduleRequestSchema, { id: params.id })
3111
3217
  );
3112
3218
  return resp.schedule ?? null;
3113
3219
  },
3114
3220
  async resumeCronSchedule(params) {
3115
3221
  const resp = await client.resumeCronSchedule(
3116
- create12(ResumeCronScheduleRequestSchema, { id: params.id })
3222
+ create13(ResumeCronScheduleRequestSchema, { id: params.id })
3117
3223
  );
3118
3224
  return resp.schedule ?? null;
3119
3225
  },
3120
3226
  async triggerCronSchedule(params) {
3121
3227
  const resp = await client.triggerCronSchedule(
3122
- create12(TriggerCronScheduleRequestSchema, { id: params.id })
3228
+ create13(TriggerCronScheduleRequestSchema, { id: params.id })
3123
3229
  );
3124
3230
  return resp.schedule ?? null;
3125
3231
  }
@@ -3184,6 +3290,9 @@ async function createPlatformClient(options) {
3184
3290
  ),
3185
3291
  cronSchedules: createCronSchedulesMethods(
3186
3292
  createRpcClient(SchedulesService2, transport)
3293
+ ),
3294
+ integrations: createIntegrationsMethods(
3295
+ createRpcClient(IntegrationsService2, transport)
3187
3296
  )
3188
3297
  };
3189
3298
  }
@@ -3219,6 +3328,9 @@ function createPlatformClientWithHeaders(apiUrl, headers) {
3219
3328
  ),
3220
3329
  cronSchedules: createCronSchedulesMethods(
3221
3330
  createRpcClient(SchedulesService2, transport)
3331
+ ),
3332
+ integrations: createIntegrationsMethods(
3333
+ createRpcClient(IntegrationsService2, transport)
3222
3334
  )
3223
3335
  };
3224
3336
  }
@@ -5585,6 +5697,29 @@ function registerPullCommand(program2, globalOpts) {
5585
5697
  `Config "${configKey}" has no config data. It may have been created via the admin UI without a manifest.`
5586
5698
  );
5587
5699
  }
5700
+ const resolved = await resolveProjectContext(globalOpts());
5701
+ let integrations;
5702
+ let extensions;
5703
+ if (resolved) {
5704
+ const projectId = resolved.project.id;
5705
+ const protoIntegrations = await client.integrations.listIntegrations(projectId);
5706
+ if (protoIntegrations.length > 0) {
5707
+ integrations = {};
5708
+ for (const cfg of protoIntegrations) {
5709
+ integrations[cfg.name] = integrationConfigToInput(cfg);
5710
+ }
5711
+ }
5712
+ const protoExtensions = await client.integrations.listExtensions(projectId);
5713
+ if (protoExtensions.length > 0) {
5714
+ extensions = {};
5715
+ for (const cfg of protoExtensions) {
5716
+ extensions[cfg.name] = extensionConfigToInput(cfg);
5717
+ }
5718
+ }
5719
+ }
5720
+ const configDataNoInteg = { ...configData };
5721
+ delete configDataNoInteg.integrations;
5722
+ delete configDataNoInteg.extensions;
5588
5723
  const manifest = {
5589
5724
  key: config2.key,
5590
5725
  name: config2.name,
@@ -5592,7 +5727,9 @@ function registerPullCommand(program2, globalOpts) {
5592
5727
  ...config2.direction ? { direction: config2.direction } : {},
5593
5728
  ...config2.description ? { description: config2.description } : {},
5594
5729
  ...config2.connectionDomain ? { operationBaseUrl: config2.connectionDomain } : {},
5595
- ...configData
5730
+ ...configDataNoInteg,
5731
+ ...integrations ? { integrations } : {},
5732
+ ...extensions ? { extensions } : {}
5596
5733
  };
5597
5734
  delete manifest.force;
5598
5735
  const jsonContent = JSON.stringify(manifest, null, 2);
@@ -5639,6 +5776,12 @@ export default defineConfig(${jsonContent});
5639
5776
  if (schedules.length > 0) parts.push(`${schedules.length} schedule(s)`);
5640
5777
  if (authProviders.length > 0) parts.push(`${authProviders.length} auth provider(s)`);
5641
5778
  if (configData.customerProfileSchema) parts.push("customer profile schema");
5779
+ if (integrations && Object.keys(integrations).length > 0) {
5780
+ parts.push(`${Object.keys(integrations).length} integration(s)`);
5781
+ }
5782
+ if (extensions && Object.keys(extensions).length > 0) {
5783
+ parts.push(`${Object.keys(extensions).length} extension(s)`);
5784
+ }
5642
5785
  if (parts.length > 0) {
5643
5786
  console.log(chalk7.dim(` Contains: ${parts.join(", ")}`));
5644
5787
  }