@tearleads/client-sdk 0.1.44 → 0.1.45

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 (113) hide show
  1. package/data/persistence/container-contents/containerContentsPersistence.js +2 -3
  2. package/data/persistence/container-contents/containerContentsPersistence.js.map +1 -1
  3. package/data/persistence/container-contents/containerCreateIntentSettlement.js +16 -16
  4. package/data/persistence/container-contents/containerCreateIntentSettlement.js.map +1 -1
  5. package/data/persistence/container-contents/containerDeletionPersistence.js +5 -11
  6. package/data/persistence/container-contents/containerDeletionPersistence.js.map +1 -1
  7. package/data/persistence/container-contents/containerDocumentReassignment.js +13 -13
  8. package/data/persistence/container-contents/containerDocumentReassignment.js.map +1 -1
  9. package/data/persistence/container-contents/containerHydrationPersistence.js +7 -4
  10. package/data/persistence/container-contents/containerHydrationPersistence.js.map +1 -1
  11. package/data/persistence/container-contents/containerIntentPersistence.js +43 -42
  12. package/data/persistence/container-contents/containerIntentPersistence.js.map +1 -1
  13. package/data/persistence/container-contents/containerMetadataMutationPersistence.js +15 -20
  14. package/data/persistence/container-contents/containerMetadataMutationPersistence.js.map +1 -1
  15. package/data/persistence/container-contents/containerMoveAbandonPersistence.js +1 -6
  16. package/data/persistence/container-contents/containerMoveAbandonPersistence.js.map +1 -1
  17. package/data/persistence/container-contents/containerMoveIntentRows.js +9 -8
  18. package/data/persistence/container-contents/containerMoveIntentRows.js.map +1 -1
  19. package/data/persistence/container-contents/containerReconcilePersistence.js +4 -8
  20. package/data/persistence/container-contents/containerReconcilePersistence.js.map +1 -1
  21. package/data/persistence/container-contents/containerRecoveryPersistence.js +20 -19
  22. package/data/persistence/container-contents/containerRecoveryPersistence.js.map +1 -1
  23. package/data/persistence/container-contents/containerRemovalWork.js +10 -10
  24. package/data/persistence/container-contents/containerRemovalWork.js.map +1 -1
  25. package/data/persistence/container-contents/containerStructuralRepair.js +21 -44
  26. package/data/persistence/container-contents/containerStructuralRepair.js.map +1 -1
  27. package/data/persistence/container-contents/documentLinkRemovalRepair.js +12 -11
  28. package/data/persistence/container-contents/documentLinkRemovalRepair.js.map +1 -1
  29. package/data/persistence/container-contents/documentMoveIntentPersistence.js +53 -28
  30. package/data/persistence/container-contents/documentMoveIntentPersistence.js.map +1 -1
  31. package/data/persistence/container-contents/documentPlacementIntentEnqueue.js +9 -8
  32. package/data/persistence/container-contents/documentPlacementIntentEnqueue.js.map +1 -1
  33. package/data/persistence/container-contents/documentPurgePlacement.js +6 -6
  34. package/data/persistence/container-contents/documentPurgePlacement.js.map +1 -1
  35. package/data/persistence/container-contents/dormantContainerMetadata.js +1 -5
  36. package/data/persistence/container-contents/dormantContainerMetadata.js.map +1 -1
  37. package/data/persistence/container-contents/pendingContainerCreate.js +5 -5
  38. package/data/persistence/container-contents/pendingContainerCreate.js.map +1 -1
  39. package/data/persistence/containers/containerPersistence.js +10 -27
  40. package/data/persistence/containers/containerPersistence.js.map +1 -1
  41. package/data/persistence/containers/documentContainerProjectionPersistence.js +2 -2
  42. package/data/persistence/containers/documentContainerProjectionPersistence.js.map +1 -1
  43. package/data/persistence/containers/documentPlacement.js +10 -10
  44. package/data/persistence/containers/documentPlacement.js.map +1 -1
  45. package/data/persistence/documents/internal/discardDocument.js +5 -5
  46. package/data/persistence/documents/internal/discardDocument.js.map +1 -1
  47. package/data/persistence/documents/internal/documentDeletionPersistence.js +7 -9
  48. package/data/persistence/documents/internal/documentDeletionPersistence.js.map +1 -1
  49. package/data/persistence/documents/internal/documentMutationPersistence.js +6 -8
  50. package/data/persistence/documents/internal/documentMutationPersistence.js.map +1 -1
  51. package/data/persistence/documents/internal/ensureDocumentsSchema.js +2 -2
  52. package/data/persistence/documents/internal/ensureDocumentsSchema.js.map +1 -1
  53. package/data/persistence/documents/internal/orphanSideRows.js +3 -22
  54. package/data/persistence/documents/internal/orphanSideRows.js.map +1 -1
  55. package/data/persistence/organizations/organizationDataUsagePersistence.js +31 -64
  56. package/data/persistence/organizations/organizationDataUsagePersistence.js.map +1 -1
  57. package/data/persistence/organizations/organizationReadModelPurge.js +1 -5
  58. package/data/persistence/organizations/organizationReadModelPurge.js.map +1 -1
  59. package/data/persistence/principalCurrentAcknowledgementPersistence.js +24 -17
  60. package/data/persistence/principalCurrentAcknowledgementPersistence.js.map +1 -1
  61. package/data/persistence/principalHistoryIncompleteRetention.js +3 -9
  62. package/data/persistence/principalHistoryIncompleteRetention.js.map +1 -1
  63. package/data/persistence/principalHistoryStagePersistence.d.ts +3 -9
  64. package/data/persistence/principalHistoryStagePersistence.js +15 -25
  65. package/data/persistence/principalHistoryStagePersistence.js.map +1 -1
  66. package/data/persistence/principalHistoryStageRetention.js +16 -15
  67. package/data/persistence/principalHistoryStageRetention.js.map +1 -1
  68. package/data/persistence/principalHistoryUnpublishedRetention.js +6 -13
  69. package/data/persistence/principalHistoryUnpublishedRetention.js.map +1 -1
  70. package/data/sqlite/containerSchema.d.ts +84 -180
  71. package/data/sqlite/containerSchema.js +14 -23
  72. package/data/sqlite/containerSchema.js.map +1 -1
  73. package/data/sqlite/documentPlacementIntentSchema.js +3 -50
  74. package/data/sqlite/documentPlacementIntentSchema.js.map +1 -1
  75. package/data/sqlite/documentSyncFailurePersistence.d.ts +16 -6
  76. package/data/sqlite/documentSyncFailurePersistence.js +44 -54
  77. package/data/sqlite/documentSyncFailurePersistence.js.map +1 -1
  78. package/data/sqlite/{documentPlacementIntentSchema.d.ts → localIntentSchema.d.ts} +162 -88
  79. package/data/sqlite/localIntentSchema.js +90 -0
  80. package/data/sqlite/localIntentSchema.js.map +1 -0
  81. package/data/sqlite/organizationDataUsageSchema.js +11 -17
  82. package/data/sqlite/organizationDataUsageSchema.js.map +1 -1
  83. package/data/sqlite/principalHistoryRetentionSchema.js +0 -15
  84. package/data/sqlite/principalHistoryRetentionSchema.js.map +1 -1
  85. package/data/sqlite/principalHistoryStageSchema.d.ts +44 -2
  86. package/data/sqlite/principalHistoryStageSchema.js +14 -2
  87. package/data/sqlite/principalHistoryStageSchema.js.map +1 -1
  88. package/data/sqlite/schema.d.ts +947 -2112
  89. package/data/sqlite/schema.js +26 -134
  90. package/data/sqlite/schema.js.map +1 -1
  91. package/package.json +1 -1
  92. package/workflows/container-contents/documentPriming.js +6 -10
  93. package/workflows/container-contents/documentPriming.js.map +1 -1
  94. package/workflows/container-contents/documentQueries/sql.js +11 -10
  95. package/workflows/container-contents/documentQueries/sql.js.map +1 -1
  96. package/workflows/container-contents/documentQueries.js +2 -2
  97. package/workflows/container-contents/documentQueries.js.map +1 -1
  98. package/workflows/container-contents/pendingDownloads.js +2 -5
  99. package/workflows/container-contents/pendingDownloads.js.map +1 -1
  100. package/workflows/container-contents/pendingWrites/deferredTails.js +3 -11
  101. package/workflows/container-contents/pendingWrites/deferredTails.js.map +1 -1
  102. package/workflows/container-contents/pendingWrites/sources.js +56 -80
  103. package/workflows/container-contents/pendingWrites/sources.js.map +1 -1
  104. package/workflows/container-contents/pendingWrites.js +6 -4
  105. package/workflows/container-contents/pendingWrites.js.map +1 -1
  106. package/workflows/container-contents/remoteContainerState.js +2 -1
  107. package/workflows/container-contents/remoteContainerState.js.map +1 -1
  108. package/workflows/sync/remoteReset.js +16 -23
  109. package/workflows/sync/remoteReset.js.map +1 -1
  110. package/workflows/sync/remoteResetPrincipalScope.js +1 -2
  111. package/workflows/sync/remoteResetPrincipalScope.js.map +1 -1
  112. package/workflows/sync/remoteResetScope.js +15 -8
  113. package/workflows/sync/remoteResetScope.js.map +1 -1
@@ -1,9 +1,9 @@
1
1
  import { containerDocumentTombstoneHolds } from "./containerDocumentTombstoneHoldSchema.js";
2
2
  import { organizationReadModelTables } from "./organizationReadModelTableRegistry.js";
3
3
  import { type SqlTableSchema } from "./sqlTableSchema.js";
4
- export { containerHydrationTombstones, containerProjection, containers, dormantContainerMetadata, dormantMetadataSweepRequests, supersededContainerBindings, } from "./containerSchema.js";
4
+ export { containerHydrationTombstones, containers, dormantContainerMetadata, dormantMetadataSweepRequests, supersededContainerBindings, } from "./containerSchema.js";
5
5
  export { documentAttachmentBlobProjection, documentPendingAttachments, } from "./documentAttachmentSchema.js";
6
- export { documentMoveIntents } from "./documentPlacementIntentSchema.js";
6
+ export { inContainerIntentLanes, inLocalIntentLane, LOCAL_INTENT_LANES, LOCAL_INTENT_SUBJECT, localIntents, } from "./localIntentSchema.js";
7
7
  export { principalPolicies, principalPolicyBundleHistory, principalPolicyBundleReferences, principalPolicyCheckpoints, principalPolicyOrganizations, } from "./principalPolicySchema.js";
8
8
  export { securityIncidents } from "./securityIncidentSchema.js";
9
9
  export { containerDocumentTombstoneHolds, organizationReadModelTables };
@@ -44,6 +44,14 @@ export { containerDocumentTombstoneHolds, organizationReadModelTables };
44
44
  * - `recoveryGeneration`: Atomic raw-history recovery writer fence.
45
45
  * - `recoveryDocumentId`: Former server id for cross-client post-purge recreation.
46
46
  * - `pullContinuation`: Durable progress for the next bounded remote pull.
47
+ * - `syncFailureStatus`, `syncFailureMessage`, `syncFailureAttemptedAt`: The
48
+ * last terminal sync failure or quarantined incoming update for this scope.
49
+ * The durable write queue (queued rows of `documentHistoryUpdates`) has no
50
+ * status columns, so these let the write-queue view and footer explain why
51
+ * the document is blocked. `syncFailureMessage` is non-null exactly when a
52
+ * failure is recorded; a newer failure replaces the old, and a later fully
53
+ * validated sync pass, a remote reset, or the scope's teardown clears all
54
+ * three.
47
55
  * - `updatedAt`: Local timestamp for the last persisted runtime-state update.
48
56
  *
49
57
  * Indexes:
@@ -336,60 +344,31 @@ export declare const documents: import("drizzle-orm/sqlite-core").SQLiteTableWit
336
344
  }, {}, {
337
345
  length: number | undefined;
338
346
  }>;
339
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
340
- name: "updated_at";
347
+ syncFailureStatus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
348
+ name: "sync_failure_status";
341
349
  tableName: "documents";
342
- dataType: "string";
343
- columnType: "SQLiteText";
344
- data: string;
345
- driverParam: string;
346
- notNull: true;
350
+ dataType: "number";
351
+ columnType: "SQLiteInteger";
352
+ data: number;
353
+ driverParam: number;
354
+ notNull: false;
347
355
  hasDefault: false;
348
356
  isPrimaryKey: false;
349
357
  isAutoincrement: false;
350
358
  hasRuntimeDefault: false;
351
- enumValues: [string, ...string[]];
359
+ enumValues: undefined;
352
360
  baseColumn: never;
353
361
  identity: undefined;
354
362
  generated: undefined;
355
- }, {}, {
356
- length: number | undefined;
357
- }>;
358
- };
359
- dialect: "sqlite";
360
- }>;
361
- /**
362
- * Last terminal sync failure or quarantined incoming update per document scope.
363
- *
364
- * The durable write queue (queued rows of `documentHistoryUpdates`) has no
365
- * status columns — a row is either queued or settled. Terminal submissions and
366
- * incoming updates that cannot be decrypted or imported are recorded here so
367
- * the write-queue view and footer can surface why the document is blocked.
368
- * Rows are upserted per scope and deleted only after a later fully validated
369
- * sync pass succeeds or the scope's local state is torn down.
370
- *
371
- * Columns:
372
- * - `appKind`: Local document namespace matching `documents.appKind`.
373
- * - `localId`: Local document id matching `documents.localId`.
374
- * - `status`: HTTP status of the failed submission when known.
375
- * - `message`: Human-readable failure description for queue display.
376
- * - `attemptedAt`: Timestamp of the failed attempt.
377
- *
378
- * Indexes:
379
- * - `(appKind, localId)` is the primary key and keeps one failure per scope.
380
- */
381
- export declare const documentSyncFailures: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
382
- name: "document_sync_failures";
383
- schema: undefined;
384
- columns: {
385
- appKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
386
- name: "app_kind";
387
- tableName: "document_sync_failures";
363
+ }, {}, {}>;
364
+ syncFailureMessage: import("drizzle-orm/sqlite-core").SQLiteColumn<{
365
+ name: "sync_failure_message";
366
+ tableName: "documents";
388
367
  dataType: "string";
389
368
  columnType: "SQLiteText";
390
369
  data: string;
391
370
  driverParam: string;
392
- notNull: true;
371
+ notNull: false;
393
372
  hasDefault: false;
394
373
  isPrimaryKey: false;
395
374
  isAutoincrement: false;
@@ -401,54 +380,18 @@ export declare const documentSyncFailures: import("drizzle-orm/sqlite-core").SQL
401
380
  }, {}, {
402
381
  length: number | undefined;
403
382
  }>;
404
- localId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
405
- name: "local_id";
406
- tableName: "document_sync_failures";
383
+ syncFailureAttemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
384
+ name: "sync_failure_attempted_at";
385
+ tableName: "documents";
407
386
  dataType: "string";
408
387
  columnType: "SQLiteText";
409
388
  data: string;
410
389
  driverParam: string;
411
- notNull: true;
412
- hasDefault: false;
413
- isPrimaryKey: false;
414
- isAutoincrement: false;
415
- hasRuntimeDefault: false;
416
- enumValues: [string, ...string[]];
417
- baseColumn: never;
418
- identity: undefined;
419
- generated: undefined;
420
- }, {}, {
421
- length: number | undefined;
422
- }>;
423
- status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
424
- name: "status";
425
- tableName: "document_sync_failures";
426
- dataType: "number";
427
- columnType: "SQLiteInteger";
428
- data: number;
429
- driverParam: number;
430
390
  notNull: false;
431
391
  hasDefault: false;
432
392
  isPrimaryKey: false;
433
393
  isAutoincrement: false;
434
394
  hasRuntimeDefault: false;
435
- enumValues: undefined;
436
- baseColumn: never;
437
- identity: undefined;
438
- generated: undefined;
439
- }, {}, {}>;
440
- message: import("drizzle-orm/sqlite-core").SQLiteColumn<{
441
- name: "message";
442
- tableName: "document_sync_failures";
443
- dataType: "string";
444
- columnType: "SQLiteText";
445
- data: string;
446
- driverParam: string;
447
- notNull: true;
448
- hasDefault: false;
449
- isPrimaryKey: false;
450
- isAutoincrement: false;
451
- hasRuntimeDefault: false;
452
395
  enumValues: [string, ...string[]];
453
396
  baseColumn: never;
454
397
  identity: undefined;
@@ -456,9 +399,9 @@ export declare const documentSyncFailures: import("drizzle-orm/sqlite-core").SQL
456
399
  }, {}, {
457
400
  length: number | undefined;
458
401
  }>;
459
- attemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
460
- name: "attempted_at";
461
- tableName: "document_sync_failures";
402
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
403
+ name: "updated_at";
404
+ tableName: "documents";
462
405
  dataType: "string";
463
406
  columnType: "SQLiteText";
464
407
  data: string;
@@ -1631,98 +1574,39 @@ export declare const documentProjectionText: import("drizzle-orm/sqlite-core").S
1631
1574
  dialect: "sqlite";
1632
1575
  }>;
1633
1576
  /**
1634
- * Offline create queue for containers.
1577
+ * Per-lane sync state for container data: the server cursor and the local
1578
+ * freshness marker share one row per lane.
1635
1579
  *
1636
- * A user can create a local container before the API has assigned all remote
1637
- * state for the container and its metadata document. This table keeps the sync
1638
- * intent until container-create sync either records the remote ids or stores an
1639
- * error for retry.
1580
+ * Container sync is split into lanes, such as a parent-container child lane or
1581
+ * a container-document membership lane. The cursor lets the next request
1582
+ * resume without replaying the entire tree. The freshness marker records the
1583
+ * last fully drained check independently of the cursor: empty server
1584
+ * responses do not always carry a new watermark, but startup still needs to
1585
+ * know that it recently checked the lane before polling again.
1640
1586
  *
1641
1587
  * Columns:
1642
- * - `id`: Client-generated intent id.
1643
- * - `containerId`: Local container id created optimistically.
1644
- * - `parentContainerId`: Parent container id used when the intent is sent.
1645
- * - `intentType`: Intent discriminator, currently `container.create`.
1646
- * - `syncStatus`: Current sync state, currently `pending` or `synced`.
1647
- * - `remoteContainerId`: Remote container id recorded after successful sync.
1648
- * - `remoteMetadataDocumentId`: Remote metadata document id recorded after
1649
- * successful sync.
1650
- * - `remoteMetadataAccessStateHash`: Access state hash for the synced metadata
1651
- * document.
1652
- * - `lastError`: Last sync error message for retry/debug display.
1653
- * - `createdAt`: Intent creation timestamp used for FIFO sync.
1654
- * - `updatedAt`: Local timestamp for the latest status/error change.
1588
+ * - `laneKind`: Sync lane category, such as `container_parent` or
1589
+ * `container_documents`.
1590
+ * - `laneId`: Lane identity. Root parent sync uses `root`, child sync uses a
1591
+ * parent-prefixed container id, and document lanes use the container id.
1592
+ * - `watermarkUpdatedAt`: Server `updatedAt` value for the stored watermark;
1593
+ * null until a watermark is saved.
1594
+ * - `watermarkId`: Server id tie-breaker for the stored watermark; null
1595
+ * exactly when `watermarkUpdatedAt` is.
1596
+ * - `updatedAt`: Local timestamp for when the cursor was saved.
1597
+ * - `checkedAt`: Local timestamp for the most recent fully drained lane check;
1598
+ * null until one completes.
1655
1599
  *
1656
1600
  * Indexes:
1657
- * - `id` is the primary key.
1658
- * - `containerId` is unique so each local container has one create intent.
1659
- * - `(syncStatus, createdAt)` supports listing pending intents in creation
1660
- * order.
1601
+ * - `(laneKind, laneId)` is the primary key and stores one row per lane.
1661
1602
  */
1662
- export declare const containerCreateIntents: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
1663
- name: "container_create_intents";
1603
+ export declare const containerSyncWatermarks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
1604
+ name: "container_sync_watermarks";
1664
1605
  schema: undefined;
1665
1606
  columns: {
1666
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1667
- name: "id";
1668
- tableName: "container_create_intents";
1669
- dataType: "string";
1670
- columnType: "SQLiteText";
1671
- data: string;
1672
- driverParam: string;
1673
- notNull: false;
1674
- hasDefault: false;
1675
- isPrimaryKey: false;
1676
- isAutoincrement: false;
1677
- hasRuntimeDefault: false;
1678
- enumValues: [string, ...string[]];
1679
- baseColumn: never;
1680
- identity: undefined;
1681
- generated: undefined;
1682
- }, {}, {
1683
- length: number | undefined;
1684
- }>;
1685
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1686
- name: "container_id";
1687
- tableName: "container_create_intents";
1688
- dataType: "string";
1689
- columnType: "SQLiteText";
1690
- data: string;
1691
- driverParam: string;
1692
- notNull: true;
1693
- hasDefault: false;
1694
- isPrimaryKey: false;
1695
- isAutoincrement: false;
1696
- hasRuntimeDefault: false;
1697
- enumValues: [string, ...string[]];
1698
- baseColumn: never;
1699
- identity: undefined;
1700
- generated: undefined;
1701
- }, {}, {
1702
- length: number | undefined;
1703
- }>;
1704
- parentContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1705
- name: "parent_container_id";
1706
- tableName: "container_create_intents";
1707
- dataType: "string";
1708
- columnType: "SQLiteText";
1709
- data: string;
1710
- driverParam: string;
1711
- notNull: true;
1712
- hasDefault: false;
1713
- isPrimaryKey: false;
1714
- isAutoincrement: false;
1715
- hasRuntimeDefault: false;
1716
- enumValues: [string, ...string[]];
1717
- baseColumn: never;
1718
- identity: undefined;
1719
- generated: undefined;
1720
- }, {}, {
1721
- length: number | undefined;
1722
- }>;
1723
- intentType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1724
- name: "intent_type";
1725
- tableName: "container_create_intents";
1607
+ laneKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1608
+ name: "lane_kind";
1609
+ tableName: "container_sync_watermarks";
1726
1610
  dataType: "string";
1727
1611
  columnType: "SQLiteText";
1728
1612
  data: string;
@@ -1739,9 +1623,9 @@ export declare const containerCreateIntents: import("drizzle-orm/sqlite-core").S
1739
1623
  }, {}, {
1740
1624
  length: number | undefined;
1741
1625
  }>;
1742
- syncStatus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1743
- name: "sync_status";
1744
- tableName: "container_create_intents";
1626
+ laneId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1627
+ name: "lane_id";
1628
+ tableName: "container_sync_watermarks";
1745
1629
  dataType: "string";
1746
1630
  columnType: "SQLiteText";
1747
1631
  data: string;
@@ -1758,28 +1642,9 @@ export declare const containerCreateIntents: import("drizzle-orm/sqlite-core").S
1758
1642
  }, {}, {
1759
1643
  length: number | undefined;
1760
1644
  }>;
1761
- remoteContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1762
- name: "remote_container_id";
1763
- tableName: "container_create_intents";
1764
- dataType: "string";
1765
- columnType: "SQLiteText";
1766
- data: string;
1767
- driverParam: string;
1768
- notNull: false;
1769
- hasDefault: false;
1770
- isPrimaryKey: false;
1771
- isAutoincrement: false;
1772
- hasRuntimeDefault: false;
1773
- enumValues: [string, ...string[]];
1774
- baseColumn: never;
1775
- identity: undefined;
1776
- generated: undefined;
1777
- }, {}, {
1778
- length: number | undefined;
1779
- }>;
1780
- remoteMetadataDocumentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1781
- name: "remote_metadata_document_id";
1782
- tableName: "container_create_intents";
1645
+ watermarkUpdatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1646
+ name: "watermark_updated_at";
1647
+ tableName: "container_sync_watermarks";
1783
1648
  dataType: "string";
1784
1649
  columnType: "SQLiteText";
1785
1650
  data: string;
@@ -1796,9 +1661,9 @@ export declare const containerCreateIntents: import("drizzle-orm/sqlite-core").S
1796
1661
  }, {}, {
1797
1662
  length: number | undefined;
1798
1663
  }>;
1799
- remoteMetadataAccessStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1800
- name: "remote_metadata_access_state_hash";
1801
- tableName: "container_create_intents";
1664
+ watermarkId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1665
+ name: "watermark_id";
1666
+ tableName: "container_sync_watermarks";
1802
1667
  dataType: "string";
1803
1668
  columnType: "SQLiteText";
1804
1669
  data: string;
@@ -1815,9 +1680,9 @@ export declare const containerCreateIntents: import("drizzle-orm/sqlite-core").S
1815
1680
  }, {}, {
1816
1681
  length: number | undefined;
1817
1682
  }>;
1818
- lastError: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1819
- name: "last_error";
1820
- tableName: "container_create_intents";
1683
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1684
+ name: "updated_at";
1685
+ tableName: "container_sync_watermarks";
1821
1686
  dataType: "string";
1822
1687
  columnType: "SQLiteText";
1823
1688
  data: string;
@@ -1834,9 +1699,9 @@ export declare const containerCreateIntents: import("drizzle-orm/sqlite-core").S
1834
1699
  }, {}, {
1835
1700
  length: number | undefined;
1836
1701
  }>;
1837
- lastAttemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1838
- name: "last_attempted_at";
1839
- tableName: "container_create_intents";
1702
+ checkedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1703
+ name: "checked_at";
1704
+ tableName: "container_sync_watermarks";
1840
1705
  dataType: "string";
1841
1706
  columnType: "SQLiteText";
1842
1707
  data: string;
@@ -1853,722 +1718,35 @@ export declare const containerCreateIntents: import("drizzle-orm/sqlite-core").S
1853
1718
  }, {}, {
1854
1719
  length: number | undefined;
1855
1720
  }>;
1856
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1857
- name: "created_at";
1858
- tableName: "container_create_intents";
1859
- dataType: "string";
1860
- columnType: "SQLiteText";
1861
- data: string;
1862
- driverParam: string;
1863
- notNull: true;
1864
- hasDefault: false;
1865
- isPrimaryKey: false;
1866
- isAutoincrement: false;
1867
- hasRuntimeDefault: false;
1868
- enumValues: [string, ...string[]];
1869
- baseColumn: never;
1870
- identity: undefined;
1871
- generated: undefined;
1872
- }, {}, {
1873
- length: number | undefined;
1874
- }>;
1875
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1876
- name: "updated_at";
1877
- tableName: "container_create_intents";
1878
- dataType: "string";
1879
- columnType: "SQLiteText";
1880
- data: string;
1881
- driverParam: string;
1882
- notNull: true;
1883
- hasDefault: false;
1884
- isPrimaryKey: false;
1885
- isAutoincrement: false;
1886
- hasRuntimeDefault: false;
1887
- enumValues: [string, ...string[]];
1888
- baseColumn: never;
1889
- identity: undefined;
1890
- generated: undefined;
1891
- }, {}, {
1892
- length: number | undefined;
1893
- }>;
1894
1721
  };
1895
1722
  dialect: "sqlite";
1896
1723
  }>;
1897
- /**
1898
- * Offline move queue for synced containers.
1899
- *
1900
- * A user can move a container whose server identity is already known while the
1901
- * API or writer context is unavailable. This table stores only the desired
1902
- * final parent and replay diagnostics; the signed move request is rebuilt from
1903
- * current writer projections when sync resumes.
1904
- *
1905
- * Columns:
1906
- * - `id`: Client-generated intent id.
1907
- * - `containerId`: Synced container moved optimistically in the local tree.
1908
- * - `parentContainerId`: Desired final parent container id.
1909
- * - `previousParentContainerId`: Parent observed when the move was queued.
1910
- * - `intentType`: Intent discriminator, currently `container.move`.
1911
- * - `syncStatus`: Current sync state, currently `pending` or `blocked`.
1912
- * - `lastError`: Last sync error message for retry/debug display.
1913
- * - `lastAttemptedAt`: Timestamp of the last replay attempt.
1914
- * - `createdAt`: Intent creation timestamp used for FIFO sync.
1915
- * - `updatedAt`: Local timestamp for the latest target/status/error change.
1916
- *
1917
- * Indexes:
1918
- * - `id` is the primary key.
1919
- * - `containerId` is unique so same-container moves coalesce to one intent.
1920
- * - `(syncStatus, createdAt)` supports listing pending intents in queue order.
1921
- */
1922
- export declare const containerMoveIntents: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
1923
- name: "container_move_intents";
1924
- schema: undefined;
1925
- columns: {
1926
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1927
- name: "id";
1928
- tableName: "container_move_intents";
1929
- dataType: "string";
1930
- columnType: "SQLiteText";
1931
- data: string;
1932
- driverParam: string;
1933
- notNull: false;
1934
- hasDefault: false;
1935
- isPrimaryKey: false;
1936
- isAutoincrement: false;
1937
- hasRuntimeDefault: false;
1938
- enumValues: [string, ...string[]];
1939
- baseColumn: never;
1940
- identity: undefined;
1941
- generated: undefined;
1942
- }, {}, {
1943
- length: number | undefined;
1944
- }>;
1945
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1946
- name: "container_id";
1947
- tableName: "container_move_intents";
1948
- dataType: "string";
1949
- columnType: "SQLiteText";
1950
- data: string;
1951
- driverParam: string;
1952
- notNull: true;
1953
- hasDefault: false;
1954
- isPrimaryKey: false;
1955
- isAutoincrement: false;
1956
- hasRuntimeDefault: false;
1957
- enumValues: [string, ...string[]];
1958
- baseColumn: never;
1959
- identity: undefined;
1960
- generated: undefined;
1961
- }, {}, {
1962
- length: number | undefined;
1963
- }>;
1964
- parentContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1965
- name: "parent_container_id";
1966
- tableName: "container_move_intents";
1967
- dataType: "string";
1968
- columnType: "SQLiteText";
1969
- data: string;
1970
- driverParam: string;
1971
- notNull: true;
1972
- hasDefault: false;
1973
- isPrimaryKey: false;
1974
- isAutoincrement: false;
1975
- hasRuntimeDefault: false;
1976
- enumValues: [string, ...string[]];
1977
- baseColumn: never;
1978
- identity: undefined;
1979
- generated: undefined;
1980
- }, {}, {
1981
- length: number | undefined;
1982
- }>;
1983
- previousParentContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1984
- name: "previous_parent_container_id";
1985
- tableName: "container_move_intents";
1986
- dataType: "string";
1987
- columnType: "SQLiteText";
1988
- data: string;
1989
- driverParam: string;
1990
- notNull: false;
1991
- hasDefault: false;
1992
- isPrimaryKey: false;
1993
- isAutoincrement: false;
1994
- hasRuntimeDefault: false;
1995
- enumValues: [string, ...string[]];
1996
- baseColumn: never;
1997
- identity: undefined;
1998
- generated: undefined;
1999
- }, {}, {
2000
- length: number | undefined;
2001
- }>;
2002
- intentType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2003
- name: "intent_type";
2004
- tableName: "container_move_intents";
2005
- dataType: "string";
2006
- columnType: "SQLiteText";
2007
- data: string;
2008
- driverParam: string;
2009
- notNull: true;
2010
- hasDefault: false;
2011
- isPrimaryKey: false;
2012
- isAutoincrement: false;
2013
- hasRuntimeDefault: false;
2014
- enumValues: [string, ...string[]];
2015
- baseColumn: never;
2016
- identity: undefined;
2017
- generated: undefined;
2018
- }, {}, {
2019
- length: number | undefined;
2020
- }>;
2021
- syncStatus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2022
- name: "sync_status";
2023
- tableName: "container_move_intents";
2024
- dataType: "string";
2025
- columnType: "SQLiteText";
2026
- data: string;
2027
- driverParam: string;
2028
- notNull: true;
2029
- hasDefault: false;
2030
- isPrimaryKey: false;
2031
- isAutoincrement: false;
2032
- hasRuntimeDefault: false;
2033
- enumValues: [string, ...string[]];
2034
- baseColumn: never;
2035
- identity: undefined;
2036
- generated: undefined;
2037
- }, {}, {
2038
- length: number | undefined;
2039
- }>;
2040
- lastError: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2041
- name: "last_error";
2042
- tableName: "container_move_intents";
2043
- dataType: "string";
2044
- columnType: "SQLiteText";
2045
- data: string;
2046
- driverParam: string;
2047
- notNull: false;
2048
- hasDefault: false;
2049
- isPrimaryKey: false;
2050
- isAutoincrement: false;
2051
- hasRuntimeDefault: false;
2052
- enumValues: [string, ...string[]];
2053
- baseColumn: never;
2054
- identity: undefined;
2055
- generated: undefined;
2056
- }, {}, {
2057
- length: number | undefined;
2058
- }>;
2059
- lastAttemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2060
- name: "last_attempted_at";
2061
- tableName: "container_move_intents";
2062
- dataType: "string";
2063
- columnType: "SQLiteText";
2064
- data: string;
2065
- driverParam: string;
2066
- notNull: false;
2067
- hasDefault: false;
2068
- isPrimaryKey: false;
2069
- isAutoincrement: false;
2070
- hasRuntimeDefault: false;
2071
- enumValues: [string, ...string[]];
2072
- baseColumn: never;
2073
- identity: undefined;
2074
- generated: undefined;
2075
- }, {}, {
2076
- length: number | undefined;
2077
- }>;
2078
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2079
- name: "created_at";
2080
- tableName: "container_move_intents";
2081
- dataType: "string";
2082
- columnType: "SQLiteText";
2083
- data: string;
2084
- driverParam: string;
2085
- notNull: true;
2086
- hasDefault: false;
2087
- isPrimaryKey: false;
2088
- isAutoincrement: false;
2089
- hasRuntimeDefault: false;
2090
- enumValues: [string, ...string[]];
2091
- baseColumn: never;
2092
- identity: undefined;
2093
- generated: undefined;
2094
- }, {}, {
2095
- length: number | undefined;
2096
- }>;
2097
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2098
- name: "updated_at";
2099
- tableName: "container_move_intents";
2100
- dataType: "string";
2101
- columnType: "SQLiteText";
2102
- data: string;
2103
- driverParam: string;
2104
- notNull: true;
2105
- hasDefault: false;
2106
- isPrimaryKey: false;
2107
- isAutoincrement: false;
2108
- hasRuntimeDefault: false;
2109
- enumValues: [string, ...string[]];
2110
- baseColumn: never;
2111
- identity: undefined;
2112
- generated: undefined;
2113
- }, {}, {
2114
- length: number | undefined;
2115
- }>;
2116
- };
2117
- dialect: "sqlite";
2118
- }>;
2119
- /**
2120
- * Per-lane sync state for container data: the server cursor and the local
2121
- * freshness marker share one row per lane.
2122
- *
2123
- * Container sync is split into lanes, such as a parent-container child lane or
2124
- * a container-document membership lane. The cursor lets the next request
2125
- * resume without replaying the entire tree. The freshness marker records the
2126
- * last fully drained check independently of the cursor: empty server
2127
- * responses do not always carry a new watermark, but startup still needs to
2128
- * know that it recently checked the lane before polling again.
2129
- *
2130
- * Columns:
2131
- * - `laneKind`: Sync lane category, such as `container_parent` or
2132
- * `container_documents`.
2133
- * - `laneId`: Lane identity. Root parent sync uses `root`, child sync uses a
2134
- * parent-prefixed container id, and document lanes use the container id.
2135
- * - `watermarkUpdatedAt`: Server `updatedAt` value for the stored watermark;
2136
- * null until a watermark is saved.
2137
- * - `watermarkId`: Server id tie-breaker for the stored watermark; null
2138
- * exactly when `watermarkUpdatedAt` is.
2139
- * - `updatedAt`: Local timestamp for when the cursor was saved.
2140
- * - `checkedAt`: Local timestamp for the most recent fully drained lane check;
2141
- * null until one completes.
2142
- *
2143
- * Indexes:
2144
- * - `(laneKind, laneId)` is the primary key and stores one row per lane.
2145
- */
2146
- export declare const containerSyncWatermarks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2147
- name: "container_sync_watermarks";
2148
- schema: undefined;
2149
- columns: {
2150
- laneKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2151
- name: "lane_kind";
2152
- tableName: "container_sync_watermarks";
2153
- dataType: "string";
2154
- columnType: "SQLiteText";
2155
- data: string;
2156
- driverParam: string;
2157
- notNull: true;
2158
- hasDefault: false;
2159
- isPrimaryKey: false;
2160
- isAutoincrement: false;
2161
- hasRuntimeDefault: false;
2162
- enumValues: [string, ...string[]];
2163
- baseColumn: never;
2164
- identity: undefined;
2165
- generated: undefined;
2166
- }, {}, {
2167
- length: number | undefined;
2168
- }>;
2169
- laneId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2170
- name: "lane_id";
2171
- tableName: "container_sync_watermarks";
2172
- dataType: "string";
2173
- columnType: "SQLiteText";
2174
- data: string;
2175
- driverParam: string;
2176
- notNull: true;
2177
- hasDefault: false;
2178
- isPrimaryKey: false;
2179
- isAutoincrement: false;
2180
- hasRuntimeDefault: false;
2181
- enumValues: [string, ...string[]];
2182
- baseColumn: never;
2183
- identity: undefined;
2184
- generated: undefined;
2185
- }, {}, {
2186
- length: number | undefined;
2187
- }>;
2188
- watermarkUpdatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2189
- name: "watermark_updated_at";
2190
- tableName: "container_sync_watermarks";
2191
- dataType: "string";
2192
- columnType: "SQLiteText";
2193
- data: string;
2194
- driverParam: string;
2195
- notNull: false;
2196
- hasDefault: false;
2197
- isPrimaryKey: false;
2198
- isAutoincrement: false;
2199
- hasRuntimeDefault: false;
2200
- enumValues: [string, ...string[]];
2201
- baseColumn: never;
2202
- identity: undefined;
2203
- generated: undefined;
2204
- }, {}, {
2205
- length: number | undefined;
2206
- }>;
2207
- watermarkId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2208
- name: "watermark_id";
2209
- tableName: "container_sync_watermarks";
2210
- dataType: "string";
2211
- columnType: "SQLiteText";
2212
- data: string;
2213
- driverParam: string;
2214
- notNull: false;
2215
- hasDefault: false;
2216
- isPrimaryKey: false;
2217
- isAutoincrement: false;
2218
- hasRuntimeDefault: false;
2219
- enumValues: [string, ...string[]];
2220
- baseColumn: never;
2221
- identity: undefined;
2222
- generated: undefined;
2223
- }, {}, {
2224
- length: number | undefined;
2225
- }>;
2226
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2227
- name: "updated_at";
2228
- tableName: "container_sync_watermarks";
2229
- dataType: "string";
2230
- columnType: "SQLiteText";
2231
- data: string;
2232
- driverParam: string;
2233
- notNull: false;
2234
- hasDefault: false;
2235
- isPrimaryKey: false;
2236
- isAutoincrement: false;
2237
- hasRuntimeDefault: false;
2238
- enumValues: [string, ...string[]];
2239
- baseColumn: never;
2240
- identity: undefined;
2241
- generated: undefined;
2242
- }, {}, {
2243
- length: number | undefined;
2244
- }>;
2245
- checkedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2246
- name: "checked_at";
2247
- tableName: "container_sync_watermarks";
2248
- dataType: "string";
2249
- columnType: "SQLiteText";
2250
- data: string;
2251
- driverParam: string;
2252
- notNull: false;
2253
- hasDefault: false;
2254
- isPrimaryKey: false;
2255
- isAutoincrement: false;
2256
- hasRuntimeDefault: false;
2257
- enumValues: [string, ...string[]];
2258
- baseColumn: never;
2259
- identity: undefined;
2260
- generated: undefined;
2261
- }, {}, {
2262
- length: number | undefined;
2263
- }>;
2264
- };
2265
- dialect: "sqlite";
2266
- }>;
2267
- export declare const documentTables: ReadonlyArray<SqlTableSchema>;
2268
- export declare const principalPolicyTables: ReadonlyArray<SqlTableSchema>;
2269
- export declare const keyingCheckpointTables: ReadonlyArray<SqlTableSchema>;
2270
- export declare const trustedUserIdentityPinTables: ReadonlyArray<SqlTableSchema>;
2271
- export declare const containerTables: readonly SqlTableSchema[];
2272
- export declare const documentContainerProjectionTables: ReadonlyArray<SqlTableSchema>;
2273
- export declare const documentMoveIntentTables: ReadonlyArray<SqlTableSchema>;
2274
- export declare const documentProjectionTables: ReadonlyArray<SqlTableSchema>;
2275
- export declare const containerCreateIntentTables: ReadonlyArray<SqlTableSchema>;
2276
- export declare const containerMoveIntentTables: ReadonlyArray<SqlTableSchema>;
2277
- export declare const containerSyncWatermarkTables: ReadonlyArray<SqlTableSchema>;
2278
- export declare const clientSqlTables: ReadonlyArray<SqlTableSchema>;
2279
- export declare const clientSQLiteSchema: {
2280
- organizationProvisioningAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2281
- name: "organization_provisioning_attempts";
2282
- schema: undefined;
2283
- columns: {
2284
- replacedOrganizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2285
- name: "replaced_organization_id";
2286
- tableName: "organization_provisioning_attempts";
2287
- dataType: "string";
2288
- columnType: "SQLiteText";
2289
- data: string;
2290
- driverParam: string;
2291
- notNull: true;
2292
- hasDefault: false;
2293
- isPrimaryKey: true;
2294
- isAutoincrement: false;
2295
- hasRuntimeDefault: false;
2296
- enumValues: [string, ...string[]];
2297
- baseColumn: never;
2298
- identity: undefined;
2299
- generated: undefined;
2300
- }, {}, {
2301
- length: number | undefined;
2302
- }>;
2303
- userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2304
- name: "user_id";
2305
- tableName: "organization_provisioning_attempts";
2306
- dataType: "string";
2307
- columnType: "SQLiteText";
2308
- data: string;
2309
- driverParam: string;
2310
- notNull: true;
2311
- hasDefault: false;
2312
- isPrimaryKey: false;
2313
- isAutoincrement: false;
2314
- hasRuntimeDefault: false;
2315
- enumValues: [string, ...string[]];
2316
- baseColumn: never;
2317
- identity: undefined;
2318
- generated: undefined;
2319
- }, {}, {
2320
- length: number | undefined;
2321
- }>;
2322
- organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2323
- name: "organization_id";
2324
- tableName: "organization_provisioning_attempts";
2325
- dataType: "string";
2326
- columnType: "SQLiteText";
2327
- data: string;
2328
- driverParam: string;
2329
- notNull: true;
2330
- hasDefault: false;
2331
- isPrimaryKey: false;
2332
- isAutoincrement: false;
2333
- hasRuntimeDefault: false;
2334
- enumValues: [string, ...string[]];
2335
- baseColumn: never;
2336
- identity: undefined;
2337
- generated: undefined;
2338
- }, {}, {
2339
- length: number | undefined;
2340
- }>;
2341
- rootContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2342
- name: "root_container_id";
2343
- tableName: "organization_provisioning_attempts";
2344
- dataType: "string";
2345
- columnType: "SQLiteText";
2346
- data: string;
2347
- driverParam: string;
2348
- notNull: true;
2349
- hasDefault: false;
2350
- isPrimaryKey: false;
2351
- isAutoincrement: false;
2352
- hasRuntimeDefault: false;
2353
- enumValues: [string, ...string[]];
2354
- baseColumn: never;
2355
- identity: undefined;
2356
- generated: undefined;
2357
- }, {}, {
2358
- length: number | undefined;
2359
- }>;
2360
- serializedArtifacts: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2361
- name: "serialized_artifacts";
2362
- tableName: "organization_provisioning_attempts";
2363
- dataType: "string";
2364
- columnType: "SQLiteText";
2365
- data: string;
2366
- driverParam: string;
2367
- notNull: true;
2368
- hasDefault: false;
2369
- isPrimaryKey: false;
2370
- isAutoincrement: false;
2371
- hasRuntimeDefault: false;
2372
- enumValues: [string, ...string[]];
2373
- baseColumn: never;
2374
- identity: undefined;
2375
- generated: undefined;
2376
- }, {}, {
2377
- length: number | undefined;
2378
- }>;
2379
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2380
- name: "created_at";
2381
- tableName: "organization_provisioning_attempts";
2382
- dataType: "string";
2383
- columnType: "SQLiteText";
2384
- data: string;
2385
- driverParam: string;
2386
- notNull: true;
2387
- hasDefault: false;
2388
- isPrimaryKey: false;
2389
- isAutoincrement: false;
2390
- hasRuntimeDefault: false;
2391
- enumValues: [string, ...string[]];
2392
- baseColumn: never;
2393
- identity: undefined;
2394
- generated: undefined;
2395
- }, {}, {
2396
- length: number | undefined;
2397
- }>;
2398
- };
2399
- dialect: "sqlite";
2400
- }>;
2401
- organizationDataUsageSnapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2402
- name: "organization_data_usage_snapshots";
2403
- schema: undefined;
2404
- columns: {
2405
- organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2406
- name: "organization_id";
2407
- tableName: "organization_data_usage_snapshots";
2408
- dataType: "string";
2409
- columnType: "SQLiteText";
2410
- data: string;
2411
- driverParam: string;
2412
- notNull: true;
2413
- hasDefault: false;
2414
- isPrimaryKey: false;
2415
- isAutoincrement: false;
2416
- hasRuntimeDefault: false;
2417
- enumValues: [string, ...string[]];
2418
- baseColumn: never;
2419
- identity: undefined;
2420
- generated: undefined;
2421
- }, {}, {
2422
- length: number | undefined;
2423
- }>;
2424
- requesterUserId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2425
- name: "requester_user_id";
2426
- tableName: "organization_data_usage_snapshots";
2427
- dataType: "string";
2428
- columnType: "SQLiteText";
2429
- data: string;
2430
- driverParam: string;
2431
- notNull: true;
2432
- hasDefault: false;
2433
- isPrimaryKey: false;
2434
- isAutoincrement: false;
2435
- hasRuntimeDefault: false;
2436
- enumValues: [string, ...string[]];
2437
- baseColumn: never;
2438
- identity: undefined;
2439
- generated: undefined;
2440
- }, {}, {
2441
- length: number | undefined;
2442
- }>;
2443
- projectionVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2444
- name: "projection_version";
2445
- tableName: "organization_data_usage_snapshots";
2446
- dataType: "number";
2447
- columnType: "SQLiteInteger";
2448
- data: number;
2449
- driverParam: number;
2450
- notNull: true;
2451
- hasDefault: false;
2452
- isPrimaryKey: false;
2453
- isAutoincrement: false;
2454
- hasRuntimeDefault: false;
2455
- enumValues: undefined;
2456
- baseColumn: never;
2457
- identity: undefined;
2458
- generated: undefined;
2459
- }, {}, {}>;
2460
- blobCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2461
- name: "blob_count";
2462
- tableName: "organization_data_usage_snapshots";
2463
- dataType: "number";
2464
- columnType: "SQLiteInteger";
2465
- data: number;
2466
- driverParam: number;
2467
- notNull: true;
2468
- hasDefault: false;
2469
- isPrimaryKey: false;
2470
- isAutoincrement: false;
2471
- hasRuntimeDefault: false;
2472
- enumValues: undefined;
2473
- baseColumn: never;
2474
- identity: undefined;
2475
- generated: undefined;
2476
- }, {}, {}>;
2477
- blobByteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2478
- name: "blob_byte_length";
2479
- tableName: "organization_data_usage_snapshots";
2480
- dataType: "number";
2481
- columnType: "SQLiteInteger";
2482
- data: number;
2483
- driverParam: number;
2484
- notNull: true;
2485
- hasDefault: false;
2486
- isPrimaryKey: false;
2487
- isAutoincrement: false;
2488
- hasRuntimeDefault: false;
2489
- enumValues: undefined;
2490
- baseColumn: never;
2491
- identity: undefined;
2492
- generated: undefined;
2493
- }, {}, {}>;
2494
- documentByteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2495
- name: "document_byte_length";
2496
- tableName: "organization_data_usage_snapshots";
2497
- dataType: "number";
2498
- columnType: "SQLiteInteger";
2499
- data: number;
2500
- driverParam: number;
2501
- notNull: true;
2502
- hasDefault: false;
2503
- isPrimaryKey: false;
2504
- isAutoincrement: false;
2505
- hasRuntimeDefault: false;
2506
- enumValues: undefined;
2507
- baseColumn: never;
2508
- identity: undefined;
2509
- generated: undefined;
2510
- }, {}, {}>;
2511
- documentCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2512
- name: "document_count";
2513
- tableName: "organization_data_usage_snapshots";
2514
- dataType: "number";
2515
- columnType: "SQLiteInteger";
2516
- data: number;
2517
- driverParam: number;
2518
- notNull: true;
2519
- hasDefault: false;
2520
- isPrimaryKey: false;
2521
- isAutoincrement: false;
2522
- hasRuntimeDefault: false;
2523
- enumValues: undefined;
2524
- baseColumn: never;
2525
- identity: undefined;
2526
- generated: undefined;
2527
- }, {}, {}>;
2528
- documentUpdateCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2529
- name: "document_update_count";
2530
- tableName: "organization_data_usage_snapshots";
2531
- dataType: "number";
2532
- columnType: "SQLiteInteger";
2533
- data: number;
2534
- driverParam: number;
2535
- notNull: true;
2536
- hasDefault: false;
2537
- isPrimaryKey: false;
2538
- isAutoincrement: false;
2539
- hasRuntimeDefault: false;
2540
- enumValues: undefined;
2541
- baseColumn: never;
2542
- identity: undefined;
2543
- generated: undefined;
2544
- }, {}, {}>;
2545
- totalByteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2546
- name: "total_byte_length";
2547
- tableName: "organization_data_usage_snapshots";
2548
- dataType: "number";
2549
- columnType: "SQLiteInteger";
2550
- data: number;
2551
- driverParam: number;
2552
- notNull: true;
2553
- hasDefault: false;
2554
- isPrimaryKey: false;
2555
- isAutoincrement: false;
2556
- hasRuntimeDefault: false;
2557
- enumValues: undefined;
2558
- baseColumn: never;
2559
- identity: undefined;
2560
- generated: undefined;
2561
- }, {}, {}>;
2562
- refreshedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2563
- name: "refreshed_at";
2564
- tableName: "organization_data_usage_snapshots";
1724
+ export declare const documentTables: ReadonlyArray<SqlTableSchema>;
1725
+ export declare const principalPolicyTables: ReadonlyArray<SqlTableSchema>;
1726
+ export declare const keyingCheckpointTables: ReadonlyArray<SqlTableSchema>;
1727
+ export declare const trustedUserIdentityPinTables: ReadonlyArray<SqlTableSchema>;
1728
+ export declare const containerTables: readonly SqlTableSchema[];
1729
+ export declare const documentContainerProjectionTables: ReadonlyArray<SqlTableSchema>;
1730
+ export declare const localIntentTables: ReadonlyArray<SqlTableSchema>;
1731
+ export declare const documentPlacementIntentTables: ReadonlyArray<SqlTableSchema>;
1732
+ export declare const documentProjectionTables: ReadonlyArray<SqlTableSchema>;
1733
+ export declare const containerSyncWatermarkTables: ReadonlyArray<SqlTableSchema>;
1734
+ export declare const clientSqlTables: ReadonlyArray<SqlTableSchema>;
1735
+ export declare const clientSQLiteSchema: {
1736
+ organizationProvisioningAttempts: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
1737
+ name: "organization_provisioning_attempts";
1738
+ schema: undefined;
1739
+ columns: {
1740
+ replacedOrganizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1741
+ name: "replaced_organization_id";
1742
+ tableName: "organization_provisioning_attempts";
2565
1743
  dataType: "string";
2566
1744
  columnType: "SQLiteText";
2567
1745
  data: string;
2568
1746
  driverParam: string;
2569
1747
  notNull: true;
2570
1748
  hasDefault: false;
2571
- isPrimaryKey: false;
1749
+ isPrimaryKey: true;
2572
1750
  isAutoincrement: false;
2573
1751
  hasRuntimeDefault: false;
2574
1752
  enumValues: [string, ...string[]];
@@ -2578,16 +1756,9 @@ export declare const clientSQLiteSchema: {
2578
1756
  }, {}, {
2579
1757
  length: number | undefined;
2580
1758
  }>;
2581
- };
2582
- dialect: "sqlite";
2583
- }>;
2584
- organizationDataUsageCategories: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2585
- name: "organization_data_usage_categories";
2586
- schema: undefined;
2587
- columns: {
2588
- organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2589
- name: "organization_id";
2590
- tableName: "organization_data_usage_categories";
1759
+ userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1760
+ name: "user_id";
1761
+ tableName: "organization_provisioning_attempts";
2591
1762
  dataType: "string";
2592
1763
  columnType: "SQLiteText";
2593
1764
  data: string;
@@ -2604,9 +1775,9 @@ export declare const clientSQLiteSchema: {
2604
1775
  }, {}, {
2605
1776
  length: number | undefined;
2606
1777
  }>;
2607
- requesterUserId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2608
- name: "requester_user_id";
2609
- tableName: "organization_data_usage_categories";
1778
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1779
+ name: "organization_id";
1780
+ tableName: "organization_provisioning_attempts";
2610
1781
  dataType: "string";
2611
1782
  columnType: "SQLiteText";
2612
1783
  data: string;
@@ -2623,9 +1794,9 @@ export declare const clientSQLiteSchema: {
2623
1794
  }, {}, {
2624
1795
  length: number | undefined;
2625
1796
  }>;
2626
- category: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2627
- name: "category";
2628
- tableName: "organization_data_usage_categories";
1797
+ rootContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1798
+ name: "root_container_id";
1799
+ tableName: "organization_provisioning_attempts";
2629
1800
  dataType: "string";
2630
1801
  columnType: "SQLiteText";
2631
1802
  data: string;
@@ -2642,67 +1813,9 @@ export declare const clientSQLiteSchema: {
2642
1813
  }, {}, {
2643
1814
  length: number | undefined;
2644
1815
  }>;
2645
- byteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2646
- name: "byte_length";
2647
- tableName: "organization_data_usage_categories";
2648
- dataType: "number";
2649
- columnType: "SQLiteInteger";
2650
- data: number;
2651
- driverParam: number;
2652
- notNull: true;
2653
- hasDefault: false;
2654
- isPrimaryKey: false;
2655
- isAutoincrement: false;
2656
- hasRuntimeDefault: false;
2657
- enumValues: undefined;
2658
- baseColumn: never;
2659
- identity: undefined;
2660
- generated: undefined;
2661
- }, {}, {}>;
2662
- documentCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2663
- name: "document_count";
2664
- tableName: "organization_data_usage_categories";
2665
- dataType: "number";
2666
- columnType: "SQLiteInteger";
2667
- data: number;
2668
- driverParam: number;
2669
- notNull: true;
2670
- hasDefault: false;
2671
- isPrimaryKey: false;
2672
- isAutoincrement: false;
2673
- hasRuntimeDefault: false;
2674
- enumValues: undefined;
2675
- baseColumn: never;
2676
- identity: undefined;
2677
- generated: undefined;
2678
- }, {}, {}>;
2679
- updateCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2680
- name: "update_count";
2681
- tableName: "organization_data_usage_categories";
2682
- dataType: "number";
2683
- columnType: "SQLiteInteger";
2684
- data: number;
2685
- driverParam: number;
2686
- notNull: true;
2687
- hasDefault: false;
2688
- isPrimaryKey: false;
2689
- isAutoincrement: false;
2690
- hasRuntimeDefault: false;
2691
- enumValues: undefined;
2692
- baseColumn: never;
2693
- identity: undefined;
2694
- generated: undefined;
2695
- }, {}, {}>;
2696
- };
2697
- dialect: "sqlite";
2698
- }>;
2699
- organizationReadModelState: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2700
- name: "organization_read_model_state";
2701
- schema: undefined;
2702
- columns: {
2703
- organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2704
- name: "organization_id";
2705
- tableName: "organization_read_model_state";
1816
+ serializedArtifacts: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1817
+ name: "serialized_artifacts";
1818
+ tableName: "organization_provisioning_attempts";
2706
1819
  dataType: "string";
2707
1820
  columnType: "SQLiteText";
2708
1821
  data: string;
@@ -2719,9 +1832,9 @@ export declare const clientSQLiteSchema: {
2719
1832
  }, {}, {
2720
1833
  length: number | undefined;
2721
1834
  }>;
2722
- cursor: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2723
- name: "cursor";
2724
- tableName: "organization_read_model_state";
1835
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1836
+ name: "created_at";
1837
+ tableName: "organization_provisioning_attempts";
2725
1838
  dataType: "string";
2726
1839
  columnType: "SQLiteText";
2727
1840
  data: string;
@@ -2738,14 +1851,21 @@ export declare const clientSQLiteSchema: {
2738
1851
  }, {}, {
2739
1852
  length: number | undefined;
2740
1853
  }>;
2741
- profileDocumentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2742
- name: "profile_document_id";
2743
- tableName: "organization_read_model_state";
1854
+ };
1855
+ dialect: "sqlite";
1856
+ }>;
1857
+ organizationDataUsageSnapshots: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
1858
+ name: "organization_data_usage_snapshots";
1859
+ schema: undefined;
1860
+ columns: {
1861
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1862
+ name: "organization_id";
1863
+ tableName: "organization_data_usage_snapshots";
2744
1864
  dataType: "string";
2745
1865
  columnType: "SQLiteText";
2746
1866
  data: string;
2747
1867
  driverParam: string;
2748
- notNull: false;
1868
+ notNull: true;
2749
1869
  hasDefault: false;
2750
1870
  isPrimaryKey: false;
2751
1871
  isAutoincrement: false;
@@ -2757,9 +1877,9 @@ export declare const clientSQLiteSchema: {
2757
1877
  }, {}, {
2758
1878
  length: number | undefined;
2759
1879
  }>;
2760
- memberGroupId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2761
- name: "member_group_id";
2762
- tableName: "organization_read_model_state";
1880
+ requesterUserId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1881
+ name: "requester_user_id";
1882
+ tableName: "organization_data_usage_snapshots";
2763
1883
  dataType: "string";
2764
1884
  columnType: "SQLiteText";
2765
1885
  data: string;
@@ -2776,47 +1896,43 @@ export declare const clientSQLiteSchema: {
2776
1896
  }, {}, {
2777
1897
  length: number | undefined;
2778
1898
  }>;
2779
- memberGroupStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2780
- name: "member_group_state_hash";
2781
- tableName: "organization_read_model_state";
2782
- dataType: "string";
2783
- columnType: "SQLiteText";
2784
- data: string;
2785
- driverParam: string;
1899
+ projectionVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1900
+ name: "projection_version";
1901
+ tableName: "organization_data_usage_snapshots";
1902
+ dataType: "number";
1903
+ columnType: "SQLiteInteger";
1904
+ data: number;
1905
+ driverParam: number;
2786
1906
  notNull: true;
2787
1907
  hasDefault: false;
2788
1908
  isPrimaryKey: false;
2789
1909
  isAutoincrement: false;
2790
1910
  hasRuntimeDefault: false;
2791
- enumValues: [string, ...string[]];
1911
+ enumValues: undefined;
2792
1912
  baseColumn: never;
2793
1913
  identity: undefined;
2794
1914
  generated: undefined;
2795
- }, {}, {
2796
- length: number | undefined;
2797
- }>;
2798
- organizationStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2799
- name: "organization_state_hash";
2800
- tableName: "organization_read_model_state";
2801
- dataType: "string";
2802
- columnType: "SQLiteText";
2803
- data: string;
2804
- driverParam: string;
1915
+ }, {}, {}>;
1916
+ blobCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1917
+ name: "blob_count";
1918
+ tableName: "organization_data_usage_snapshots";
1919
+ dataType: "number";
1920
+ columnType: "SQLiteInteger";
1921
+ data: number;
1922
+ driverParam: number;
2805
1923
  notNull: true;
2806
1924
  hasDefault: false;
2807
1925
  isPrimaryKey: false;
2808
1926
  isAutoincrement: false;
2809
1927
  hasRuntimeDefault: false;
2810
- enumValues: [string, ...string[]];
1928
+ enumValues: undefined;
2811
1929
  baseColumn: never;
2812
1930
  identity: undefined;
2813
1931
  generated: undefined;
2814
- }, {}, {
2815
- length: number | undefined;
2816
- }>;
2817
- organizationStateVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2818
- name: "organization_state_version";
2819
- tableName: "organization_read_model_state";
1932
+ }, {}, {}>;
1933
+ blobByteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1934
+ name: "blob_byte_length";
1935
+ tableName: "organization_data_usage_snapshots";
2820
1936
  dataType: "number";
2821
1937
  columnType: "SQLiteInteger";
2822
1938
  data: number;
@@ -2831,9 +1947,9 @@ export declare const clientSQLiteSchema: {
2831
1947
  identity: undefined;
2832
1948
  generated: undefined;
2833
1949
  }, {}, {}>;
2834
- organizationKeyEpoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2835
- name: "organization_key_epoch";
2836
- tableName: "organization_read_model_state";
1950
+ documentByteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1951
+ name: "document_byte_length";
1952
+ tableName: "organization_data_usage_snapshots";
2837
1953
  dataType: "number";
2838
1954
  columnType: "SQLiteInteger";
2839
1955
  data: number;
@@ -2848,28 +1964,9 @@ export declare const clientSQLiteSchema: {
2848
1964
  identity: undefined;
2849
1965
  generated: undefined;
2850
1966
  }, {}, {}>;
2851
- organizationKeyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2852
- name: "organization_key_fingerprint";
2853
- tableName: "organization_read_model_state";
2854
- dataType: "string";
2855
- columnType: "SQLiteText";
2856
- data: string;
2857
- driverParam: string;
2858
- notNull: true;
2859
- hasDefault: false;
2860
- isPrimaryKey: false;
2861
- isAutoincrement: false;
2862
- hasRuntimeDefault: false;
2863
- enumValues: [string, ...string[]];
2864
- baseColumn: never;
2865
- identity: undefined;
2866
- generated: undefined;
2867
- }, {}, {
2868
- length: number | undefined;
2869
- }>;
2870
- organizationMemberCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2871
- name: "organization_member_count";
2872
- tableName: "organization_read_model_state";
1967
+ documentCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1968
+ name: "document_count";
1969
+ tableName: "organization_data_usage_snapshots";
2873
1970
  dataType: "number";
2874
1971
  columnType: "SQLiteInteger";
2875
1972
  data: number;
@@ -2884,54 +1981,43 @@ export declare const clientSQLiteSchema: {
2884
1981
  identity: undefined;
2885
1982
  generated: undefined;
2886
1983
  }, {}, {}>;
2887
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2888
- name: "updated_at";
2889
- tableName: "organization_read_model_state";
2890
- dataType: "string";
2891
- columnType: "SQLiteText";
2892
- data: string;
2893
- driverParam: string;
1984
+ documentUpdateCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
1985
+ name: "document_update_count";
1986
+ tableName: "organization_data_usage_snapshots";
1987
+ dataType: "number";
1988
+ columnType: "SQLiteInteger";
1989
+ data: number;
1990
+ driverParam: number;
2894
1991
  notNull: true;
2895
1992
  hasDefault: false;
2896
1993
  isPrimaryKey: false;
2897
1994
  isAutoincrement: false;
2898
1995
  hasRuntimeDefault: false;
2899
- enumValues: [string, ...string[]];
1996
+ enumValues: undefined;
2900
1997
  baseColumn: never;
2901
1998
  identity: undefined;
2902
1999
  generated: undefined;
2903
- }, {}, {
2904
- length: number | undefined;
2905
- }>;
2906
- };
2907
- dialect: "sqlite";
2908
- }>;
2909
- organizationReadModelRequesters: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2910
- name: "organization_read_model_requesters";
2911
- schema: undefined;
2912
- columns: {
2913
- organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2914
- name: "organization_id";
2915
- tableName: "organization_read_model_requesters";
2916
- dataType: "string";
2917
- columnType: "SQLiteText";
2918
- data: string;
2919
- driverParam: string;
2000
+ }, {}, {}>;
2001
+ totalByteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2002
+ name: "total_byte_length";
2003
+ tableName: "organization_data_usage_snapshots";
2004
+ dataType: "number";
2005
+ columnType: "SQLiteInteger";
2006
+ data: number;
2007
+ driverParam: number;
2920
2008
  notNull: true;
2921
2009
  hasDefault: false;
2922
2010
  isPrimaryKey: false;
2923
2011
  isAutoincrement: false;
2924
2012
  hasRuntimeDefault: false;
2925
- enumValues: [string, ...string[]];
2013
+ enumValues: undefined;
2926
2014
  baseColumn: never;
2927
2015
  identity: undefined;
2928
2016
  generated: undefined;
2929
- }, {}, {
2930
- length: number | undefined;
2931
- }>;
2932
- userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2933
- name: "user_id";
2934
- tableName: "organization_read_model_requesters";
2017
+ }, {}, {}>;
2018
+ categoryBreakdownJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2019
+ name: "category_breakdown_json";
2020
+ tableName: "organization_data_usage_snapshots";
2935
2021
  dataType: "string";
2936
2022
  columnType: "SQLiteText";
2937
2023
  data: string;
@@ -2948,26 +2034,9 @@ export declare const clientSQLiteSchema: {
2948
2034
  }, {}, {
2949
2035
  length: number | undefined;
2950
2036
  }>;
2951
- isOrgAdmin: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2952
- name: "is_org_admin";
2953
- tableName: "organization_read_model_requesters";
2954
- dataType: "boolean";
2955
- columnType: "SQLiteBoolean";
2956
- data: boolean;
2957
- driverParam: number;
2958
- notNull: true;
2959
- hasDefault: false;
2960
- isPrimaryKey: false;
2961
- isAutoincrement: false;
2962
- hasRuntimeDefault: false;
2963
- enumValues: undefined;
2964
- baseColumn: never;
2965
- identity: undefined;
2966
- generated: undefined;
2967
- }, {}, {}>;
2968
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2969
- name: "updated_at";
2970
- tableName: "organization_read_model_requesters";
2037
+ refreshedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2038
+ name: "refreshed_at";
2039
+ tableName: "organization_data_usage_snapshots";
2971
2040
  dataType: "string";
2972
2041
  columnType: "SQLiteText";
2973
2042
  data: string;
@@ -2987,13 +2056,13 @@ export declare const clientSQLiteSchema: {
2987
2056
  };
2988
2057
  dialect: "sqlite";
2989
2058
  }>;
2990
- organizationReadModelDirectoryUsers: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2991
- name: "organization_read_model_directory_users";
2059
+ organizationReadModelState: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2060
+ name: "organization_read_model_state";
2992
2061
  schema: undefined;
2993
2062
  columns: {
2994
2063
  organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2995
2064
  name: "organization_id";
2996
- tableName: "organization_read_model_directory_users";
2065
+ tableName: "organization_read_model_state";
2997
2066
  dataType: "string";
2998
2067
  columnType: "SQLiteText";
2999
2068
  data: string;
@@ -3010,9 +2079,9 @@ export declare const clientSQLiteSchema: {
3010
2079
  }, {}, {
3011
2080
  length: number | undefined;
3012
2081
  }>;
3013
- userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3014
- name: "user_id";
3015
- tableName: "organization_read_model_directory_users";
2082
+ cursor: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2083
+ name: "cursor";
2084
+ tableName: "organization_read_model_state";
3016
2085
  dataType: "string";
3017
2086
  columnType: "SQLiteText";
3018
2087
  data: string;
@@ -3029,31 +2098,14 @@ export declare const clientSQLiteSchema: {
3029
2098
  }, {}, {
3030
2099
  length: number | undefined;
3031
2100
  }>;
3032
- sortOrder: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3033
- name: "sort_order";
3034
- tableName: "organization_read_model_directory_users";
3035
- dataType: "number";
3036
- columnType: "SQLiteInteger";
3037
- data: number;
3038
- driverParam: number;
3039
- notNull: true;
3040
- hasDefault: false;
3041
- isPrimaryKey: false;
3042
- isAutoincrement: false;
3043
- hasRuntimeDefault: false;
3044
- enumValues: undefined;
3045
- baseColumn: never;
3046
- identity: undefined;
3047
- generated: undefined;
3048
- }, {}, {}>;
3049
- signingKeyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3050
- name: "signing_key_fingerprint";
3051
- tableName: "organization_read_model_directory_users";
2101
+ profileDocumentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2102
+ name: "profile_document_id";
2103
+ tableName: "organization_read_model_state";
3052
2104
  dataType: "string";
3053
2105
  columnType: "SQLiteText";
3054
2106
  data: string;
3055
2107
  driverParam: string;
3056
- notNull: true;
2108
+ notNull: false;
3057
2109
  hasDefault: false;
3058
2110
  isPrimaryKey: false;
3059
2111
  isAutoincrement: false;
@@ -3065,9 +2117,9 @@ export declare const clientSQLiteSchema: {
3065
2117
  }, {}, {
3066
2118
  length: number | undefined;
3067
2119
  }>;
3068
- signingPublicKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3069
- name: "signing_public_key";
3070
- tableName: "organization_read_model_directory_users";
2120
+ memberGroupId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2121
+ name: "member_group_id";
2122
+ tableName: "organization_read_model_state";
3071
2123
  dataType: "string";
3072
2124
  columnType: "SQLiteText";
3073
2125
  data: string;
@@ -3084,9 +2136,9 @@ export declare const clientSQLiteSchema: {
3084
2136
  }, {}, {
3085
2137
  length: number | undefined;
3086
2138
  }>;
3087
- encapsulationPublicKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3088
- name: "encapsulation_public_key";
3089
- tableName: "organization_read_model_directory_users";
2139
+ memberGroupStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2140
+ name: "member_group_state_hash";
2141
+ tableName: "organization_read_model_state";
3090
2142
  dataType: "string";
3091
2143
  columnType: "SQLiteText";
3092
2144
  data: string;
@@ -3103,9 +2155,9 @@ export declare const clientSQLiteSchema: {
3103
2155
  }, {}, {
3104
2156
  length: number | undefined;
3105
2157
  }>;
3106
- encapsulationKeyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3107
- name: "encapsulation_key_fingerprint";
3108
- tableName: "organization_read_model_directory_users";
2158
+ organizationStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2159
+ name: "organization_state_hash";
2160
+ tableName: "organization_read_model_state";
3109
2161
  dataType: "string";
3110
2162
  columnType: "SQLiteText";
3111
2163
  data: string;
@@ -3122,12 +2174,12 @@ export declare const clientSQLiteSchema: {
3122
2174
  }, {}, {
3123
2175
  length: number | undefined;
3124
2176
  }>;
3125
- isPersonalOrganizationOwner: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3126
- name: "is_personal_organization_owner";
3127
- tableName: "organization_read_model_directory_users";
3128
- dataType: "boolean";
3129
- columnType: "SQLiteBoolean";
3130
- data: boolean;
2177
+ organizationStateVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2178
+ name: "organization_state_version";
2179
+ tableName: "organization_read_model_state";
2180
+ dataType: "number";
2181
+ columnType: "SQLiteInteger";
2182
+ data: number;
3131
2183
  driverParam: number;
3132
2184
  notNull: true;
3133
2185
  hasDefault: false;
@@ -3139,28 +2191,26 @@ export declare const clientSQLiteSchema: {
3139
2191
  identity: undefined;
3140
2192
  generated: undefined;
3141
2193
  }, {}, {}>;
3142
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3143
- name: "created_at";
3144
- tableName: "organization_read_model_directory_users";
3145
- dataType: "string";
3146
- columnType: "SQLiteText";
3147
- data: string;
3148
- driverParam: string;
2194
+ organizationKeyEpoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2195
+ name: "organization_key_epoch";
2196
+ tableName: "organization_read_model_state";
2197
+ dataType: "number";
2198
+ columnType: "SQLiteInteger";
2199
+ data: number;
2200
+ driverParam: number;
3149
2201
  notNull: true;
3150
2202
  hasDefault: false;
3151
2203
  isPrimaryKey: false;
3152
2204
  isAutoincrement: false;
3153
2205
  hasRuntimeDefault: false;
3154
- enumValues: [string, ...string[]];
2206
+ enumValues: undefined;
3155
2207
  baseColumn: never;
3156
2208
  identity: undefined;
3157
2209
  generated: undefined;
3158
- }, {}, {
3159
- length: number | undefined;
3160
- }>;
3161
- status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3162
- name: "status";
3163
- tableName: "organization_read_model_directory_users";
2210
+ }, {}, {}>;
2211
+ organizationKeyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2212
+ name: "organization_key_fingerprint";
2213
+ tableName: "organization_read_model_state";
3164
2214
  dataType: "string";
3165
2215
  columnType: "SQLiteText";
3166
2216
  data: string;
@@ -3177,28 +2227,26 @@ export declare const clientSQLiteSchema: {
3177
2227
  }, {}, {
3178
2228
  length: number | undefined;
3179
2229
  }>;
3180
- profileDocumentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3181
- name: "profile_document_id";
3182
- tableName: "organization_read_model_directory_users";
3183
- dataType: "string";
3184
- columnType: "SQLiteText";
3185
- data: string;
3186
- driverParam: string;
3187
- notNull: false;
2230
+ organizationMemberCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2231
+ name: "organization_member_count";
2232
+ tableName: "organization_read_model_state";
2233
+ dataType: "number";
2234
+ columnType: "SQLiteInteger";
2235
+ data: number;
2236
+ driverParam: number;
2237
+ notNull: true;
3188
2238
  hasDefault: false;
3189
2239
  isPrimaryKey: false;
3190
2240
  isAutoincrement: false;
3191
2241
  hasRuntimeDefault: false;
3192
- enumValues: [string, ...string[]];
2242
+ enumValues: undefined;
3193
2243
  baseColumn: never;
3194
2244
  identity: undefined;
3195
2245
  generated: undefined;
3196
- }, {}, {
3197
- length: number | undefined;
3198
- }>;
3199
- joinedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3200
- name: "joined_at";
3201
- tableName: "organization_read_model_directory_users";
2246
+ }, {}, {}>;
2247
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2248
+ name: "updated_at";
2249
+ tableName: "organization_read_model_state";
3202
2250
  dataType: "string";
3203
2251
  columnType: "SQLiteText";
3204
2252
  data: string;
@@ -3215,9 +2263,16 @@ export declare const clientSQLiteSchema: {
3215
2263
  }, {}, {
3216
2264
  length: number | undefined;
3217
2265
  }>;
3218
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3219
- name: "updated_at";
3220
- tableName: "organization_read_model_directory_users";
2266
+ };
2267
+ dialect: "sqlite";
2268
+ }>;
2269
+ organizationReadModelRequesters: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2270
+ name: "organization_read_model_requesters";
2271
+ schema: undefined;
2272
+ columns: {
2273
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2274
+ name: "organization_id";
2275
+ tableName: "organization_read_model_requesters";
3221
2276
  dataType: "string";
3222
2277
  columnType: "SQLiteText";
3223
2278
  data: string;
@@ -3234,14 +2289,14 @@ export declare const clientSQLiteSchema: {
3234
2289
  }, {}, {
3235
2290
  length: number | undefined;
3236
2291
  }>;
3237
- disabledAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3238
- name: "disabled_at";
3239
- tableName: "organization_read_model_directory_users";
2292
+ userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2293
+ name: "user_id";
2294
+ tableName: "organization_read_model_requesters";
3240
2295
  dataType: "string";
3241
2296
  columnType: "SQLiteText";
3242
2297
  data: string;
3243
2298
  driverParam: string;
3244
- notNull: false;
2299
+ notNull: true;
3245
2300
  hasDefault: false;
3246
2301
  isPrimaryKey: false;
3247
2302
  isAutoincrement: false;
@@ -3253,14 +2308,31 @@ export declare const clientSQLiteSchema: {
3253
2308
  }, {}, {
3254
2309
  length: number | undefined;
3255
2310
  }>;
3256
- disabledByUserId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3257
- name: "disabled_by_user_id";
3258
- tableName: "organization_read_model_directory_users";
2311
+ isOrgAdmin: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2312
+ name: "is_org_admin";
2313
+ tableName: "organization_read_model_requesters";
2314
+ dataType: "boolean";
2315
+ columnType: "SQLiteBoolean";
2316
+ data: boolean;
2317
+ driverParam: number;
2318
+ notNull: true;
2319
+ hasDefault: false;
2320
+ isPrimaryKey: false;
2321
+ isAutoincrement: false;
2322
+ hasRuntimeDefault: false;
2323
+ enumValues: undefined;
2324
+ baseColumn: never;
2325
+ identity: undefined;
2326
+ generated: undefined;
2327
+ }, {}, {}>;
2328
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2329
+ name: "updated_at";
2330
+ tableName: "organization_read_model_requesters";
3259
2331
  dataType: "string";
3260
2332
  columnType: "SQLiteText";
3261
2333
  data: string;
3262
2334
  driverParam: string;
3263
- notNull: false;
2335
+ notNull: true;
3264
2336
  hasDefault: false;
3265
2337
  isPrimaryKey: false;
3266
2338
  isAutoincrement: false;
@@ -3275,13 +2347,13 @@ export declare const clientSQLiteSchema: {
3275
2347
  };
3276
2348
  dialect: "sqlite";
3277
2349
  }>;
3278
- organizationReadModelGroups: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3279
- name: "organization_read_model_groups";
2350
+ organizationReadModelDirectoryUsers: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2351
+ name: "organization_read_model_directory_users";
3280
2352
  schema: undefined;
3281
2353
  columns: {
3282
2354
  organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3283
2355
  name: "organization_id";
3284
- tableName: "organization_read_model_groups";
2356
+ tableName: "organization_read_model_directory_users";
3285
2357
  dataType: "string";
3286
2358
  columnType: "SQLiteText";
3287
2359
  data: string;
@@ -3298,9 +2370,9 @@ export declare const clientSQLiteSchema: {
3298
2370
  }, {}, {
3299
2371
  length: number | undefined;
3300
2372
  }>;
3301
- groupId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3302
- name: "group_id";
3303
- tableName: "organization_read_model_groups";
2373
+ userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2374
+ name: "user_id";
2375
+ tableName: "organization_read_model_directory_users";
3304
2376
  dataType: "string";
3305
2377
  columnType: "SQLiteText";
3306
2378
  data: string;
@@ -3319,7 +2391,7 @@ export declare const clientSQLiteSchema: {
3319
2391
  }>;
3320
2392
  sortOrder: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3321
2393
  name: "sort_order";
3322
- tableName: "organization_read_model_groups";
2394
+ tableName: "organization_read_model_directory_users";
3323
2395
  dataType: "number";
3324
2396
  columnType: "SQLiteInteger";
3325
2397
  data: number;
@@ -3334,9 +2406,9 @@ export declare const clientSQLiteSchema: {
3334
2406
  identity: undefined;
3335
2407
  generated: undefined;
3336
2408
  }, {}, {}>;
3337
- name: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3338
- name: "name";
3339
- tableName: "organization_read_model_groups";
2409
+ signingKeyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2410
+ name: "signing_key_fingerprint";
2411
+ tableName: "organization_read_model_directory_users";
3340
2412
  dataType: "string";
3341
2413
  columnType: "SQLiteText";
3342
2414
  data: string;
@@ -3353,9 +2425,9 @@ export declare const clientSQLiteSchema: {
3353
2425
  }, {}, {
3354
2426
  length: number | undefined;
3355
2427
  }>;
3356
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3357
- name: "created_at";
3358
- tableName: "organization_read_model_groups";
2428
+ signingPublicKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2429
+ name: "signing_public_key";
2430
+ tableName: "organization_read_model_directory_users";
3359
2431
  dataType: "string";
3360
2432
  columnType: "SQLiteText";
3361
2433
  data: string;
@@ -3372,31 +2444,14 @@ export declare const clientSQLiteSchema: {
3372
2444
  }, {}, {
3373
2445
  length: number | undefined;
3374
2446
  }>;
3375
- isBuiltin: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3376
- name: "is_builtin";
3377
- tableName: "organization_read_model_groups";
3378
- dataType: "boolean";
3379
- columnType: "SQLiteBoolean";
3380
- data: boolean;
3381
- driverParam: number;
3382
- notNull: true;
3383
- hasDefault: false;
3384
- isPrimaryKey: false;
3385
- isAutoincrement: false;
3386
- hasRuntimeDefault: false;
3387
- enumValues: undefined;
3388
- baseColumn: never;
3389
- identity: undefined;
3390
- generated: undefined;
3391
- }, {}, {}>;
3392
- stateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3393
- name: "state_hash";
3394
- tableName: "organization_read_model_groups";
2447
+ encapsulationPublicKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2448
+ name: "encapsulation_public_key";
2449
+ tableName: "organization_read_model_directory_users";
3395
2450
  dataType: "string";
3396
2451
  columnType: "SQLiteText";
3397
2452
  data: string;
3398
2453
  driverParam: string;
3399
- notNull: false;
2454
+ notNull: true;
3400
2455
  hasDefault: false;
3401
2456
  isPrimaryKey: false;
3402
2457
  isAutoincrement: false;
@@ -3408,48 +2463,14 @@ export declare const clientSQLiteSchema: {
3408
2463
  }, {}, {
3409
2464
  length: number | undefined;
3410
2465
  }>;
3411
- stateVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3412
- name: "state_version";
3413
- tableName: "organization_read_model_groups";
3414
- dataType: "number";
3415
- columnType: "SQLiteInteger";
3416
- data: number;
3417
- driverParam: number;
3418
- notNull: false;
3419
- hasDefault: false;
3420
- isPrimaryKey: false;
3421
- isAutoincrement: false;
3422
- hasRuntimeDefault: false;
3423
- enumValues: undefined;
3424
- baseColumn: never;
3425
- identity: undefined;
3426
- generated: undefined;
3427
- }, {}, {}>;
3428
- keyEpoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3429
- name: "key_epoch";
3430
- tableName: "organization_read_model_groups";
3431
- dataType: "number";
3432
- columnType: "SQLiteInteger";
3433
- data: number;
3434
- driverParam: number;
3435
- notNull: false;
3436
- hasDefault: false;
3437
- isPrimaryKey: false;
3438
- isAutoincrement: false;
3439
- hasRuntimeDefault: false;
3440
- enumValues: undefined;
3441
- baseColumn: never;
3442
- identity: undefined;
3443
- generated: undefined;
3444
- }, {}, {}>;
3445
- keyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3446
- name: "key_fingerprint";
3447
- tableName: "organization_read_model_groups";
2466
+ encapsulationKeyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2467
+ name: "encapsulation_key_fingerprint";
2468
+ tableName: "organization_read_model_directory_users";
3448
2469
  dataType: "string";
3449
2470
  columnType: "SQLiteText";
3450
2471
  data: string;
3451
2472
  driverParam: string;
3452
- notNull: false;
2473
+ notNull: true;
3453
2474
  hasDefault: false;
3454
2475
  isPrimaryKey: false;
3455
2476
  isAutoincrement: false;
@@ -3461,14 +2482,14 @@ export declare const clientSQLiteSchema: {
3461
2482
  }, {}, {
3462
2483
  length: number | undefined;
3463
2484
  }>;
3464
- memberCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3465
- name: "member_count";
3466
- tableName: "organization_read_model_groups";
3467
- dataType: "number";
3468
- columnType: "SQLiteInteger";
3469
- data: number;
2485
+ isPersonalOrganizationOwner: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2486
+ name: "is_personal_organization_owner";
2487
+ tableName: "organization_read_model_directory_users";
2488
+ dataType: "boolean";
2489
+ columnType: "SQLiteBoolean";
2490
+ data: boolean;
3470
2491
  driverParam: number;
3471
- notNull: false;
2492
+ notNull: true;
3472
2493
  hasDefault: false;
3473
2494
  isPrimaryKey: false;
3474
2495
  isAutoincrement: false;
@@ -3478,14 +2499,14 @@ export declare const clientSQLiteSchema: {
3478
2499
  identity: undefined;
3479
2500
  generated: undefined;
3480
2501
  }, {}, {}>;
3481
- membersStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3482
- name: "members_state_hash";
3483
- tableName: "organization_read_model_groups";
2502
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2503
+ name: "created_at";
2504
+ tableName: "organization_read_model_directory_users";
3484
2505
  dataType: "string";
3485
2506
  columnType: "SQLiteText";
3486
2507
  data: string;
3487
2508
  driverParam: string;
3488
- notNull: false;
2509
+ notNull: true;
3489
2510
  hasDefault: false;
3490
2511
  isPrimaryKey: false;
3491
2512
  isAutoincrement: false;
@@ -3497,16 +2518,9 @@ export declare const clientSQLiteSchema: {
3497
2518
  }, {}, {
3498
2519
  length: number | undefined;
3499
2520
  }>;
3500
- };
3501
- dialect: "sqlite";
3502
- }>;
3503
- organizationReadModelGroupMembers: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3504
- name: "organization_read_model_group_members";
3505
- schema: undefined;
3506
- columns: {
3507
- organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3508
- name: "organization_id";
3509
- tableName: "organization_read_model_group_members";
2521
+ status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2522
+ name: "status";
2523
+ tableName: "organization_read_model_directory_users";
3510
2524
  dataType: "string";
3511
2525
  columnType: "SQLiteText";
3512
2526
  data: string;
@@ -3523,14 +2537,14 @@ export declare const clientSQLiteSchema: {
3523
2537
  }, {}, {
3524
2538
  length: number | undefined;
3525
2539
  }>;
3526
- groupId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3527
- name: "group_id";
3528
- tableName: "organization_read_model_group_members";
2540
+ profileDocumentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2541
+ name: "profile_document_id";
2542
+ tableName: "organization_read_model_directory_users";
3529
2543
  dataType: "string";
3530
2544
  columnType: "SQLiteText";
3531
2545
  data: string;
3532
2546
  driverParam: string;
3533
- notNull: true;
2547
+ notNull: false;
3534
2548
  hasDefault: false;
3535
2549
  isPrimaryKey: false;
3536
2550
  isAutoincrement: false;
@@ -3542,9 +2556,9 @@ export declare const clientSQLiteSchema: {
3542
2556
  }, {}, {
3543
2557
  length: number | undefined;
3544
2558
  }>;
3545
- userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3546
- name: "user_id";
3547
- tableName: "organization_read_model_group_members";
2559
+ joinedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2560
+ name: "joined_at";
2561
+ tableName: "organization_read_model_directory_users";
3548
2562
  dataType: "string";
3549
2563
  columnType: "SQLiteText";
3550
2564
  data: string;
@@ -3561,31 +2575,33 @@ export declare const clientSQLiteSchema: {
3561
2575
  }, {}, {
3562
2576
  length: number | undefined;
3563
2577
  }>;
3564
- sortOrder: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3565
- name: "sort_order";
3566
- tableName: "organization_read_model_group_members";
3567
- dataType: "number";
3568
- columnType: "SQLiteInteger";
3569
- data: number;
3570
- driverParam: number;
2578
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2579
+ name: "updated_at";
2580
+ tableName: "organization_read_model_directory_users";
2581
+ dataType: "string";
2582
+ columnType: "SQLiteText";
2583
+ data: string;
2584
+ driverParam: string;
3571
2585
  notNull: true;
3572
2586
  hasDefault: false;
3573
2587
  isPrimaryKey: false;
3574
2588
  isAutoincrement: false;
3575
2589
  hasRuntimeDefault: false;
3576
- enumValues: undefined;
2590
+ enumValues: [string, ...string[]];
3577
2591
  baseColumn: never;
3578
2592
  identity: undefined;
3579
2593
  generated: undefined;
3580
- }, {}, {}>;
3581
- stateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3582
- name: "state_hash";
3583
- tableName: "organization_read_model_group_members";
2594
+ }, {}, {
2595
+ length: number | undefined;
2596
+ }>;
2597
+ disabledAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2598
+ name: "disabled_at";
2599
+ tableName: "organization_read_model_directory_users";
3584
2600
  dataType: "string";
3585
2601
  columnType: "SQLiteText";
3586
2602
  data: string;
3587
2603
  driverParam: string;
3588
- notNull: true;
2604
+ notNull: false;
3589
2605
  hasDefault: false;
3590
2606
  isPrimaryKey: false;
3591
2607
  isAutoincrement: false;
@@ -3597,14 +2613,14 @@ export declare const clientSQLiteSchema: {
3597
2613
  }, {}, {
3598
2614
  length: number | undefined;
3599
2615
  }>;
3600
- role: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3601
- name: "role";
3602
- tableName: "organization_read_model_group_members";
2616
+ disabledByUserId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2617
+ name: "disabled_by_user_id";
2618
+ tableName: "organization_read_model_directory_users";
3603
2619
  dataType: "string";
3604
2620
  columnType: "SQLiteText";
3605
2621
  data: string;
3606
2622
  driverParam: string;
3607
- notNull: true;
2623
+ notNull: false;
3608
2624
  hasDefault: false;
3609
2625
  isPrimaryKey: false;
3610
2626
  isAutoincrement: false;
@@ -3619,13 +2635,13 @@ export declare const clientSQLiteSchema: {
3619
2635
  };
3620
2636
  dialect: "sqlite";
3621
2637
  }>;
3622
- organizationReadModelContainerGrants: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3623
- name: "organization_read_model_container_grants";
2638
+ organizationReadModelGroups: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2639
+ name: "organization_read_model_groups";
3624
2640
  schema: undefined;
3625
2641
  columns: {
3626
2642
  organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3627
2643
  name: "organization_id";
3628
- tableName: "organization_read_model_container_grants";
2644
+ tableName: "organization_read_model_groups";
3629
2645
  dataType: "string";
3630
2646
  columnType: "SQLiteText";
3631
2647
  data: string;
@@ -3642,9 +2658,9 @@ export declare const clientSQLiteSchema: {
3642
2658
  }, {}, {
3643
2659
  length: number | undefined;
3644
2660
  }>;
3645
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3646
- name: "container_id";
3647
- tableName: "organization_read_model_container_grants";
2661
+ groupId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2662
+ name: "group_id";
2663
+ tableName: "organization_read_model_groups";
3648
2664
  dataType: "string";
3649
2665
  columnType: "SQLiteText";
3650
2666
  data: string;
@@ -3661,28 +2677,26 @@ export declare const clientSQLiteSchema: {
3661
2677
  }, {}, {
3662
2678
  length: number | undefined;
3663
2679
  }>;
3664
- subjectType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3665
- name: "subject_type";
3666
- tableName: "organization_read_model_container_grants";
3667
- dataType: "string";
3668
- columnType: "SQLiteText";
3669
- data: string;
3670
- driverParam: string;
2680
+ sortOrder: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2681
+ name: "sort_order";
2682
+ tableName: "organization_read_model_groups";
2683
+ dataType: "number";
2684
+ columnType: "SQLiteInteger";
2685
+ data: number;
2686
+ driverParam: number;
3671
2687
  notNull: true;
3672
2688
  hasDefault: false;
3673
2689
  isPrimaryKey: false;
3674
2690
  isAutoincrement: false;
3675
2691
  hasRuntimeDefault: false;
3676
- enumValues: [string, ...string[]];
2692
+ enumValues: undefined;
3677
2693
  baseColumn: never;
3678
2694
  identity: undefined;
3679
2695
  generated: undefined;
3680
- }, {}, {
3681
- length: number | undefined;
3682
- }>;
3683
- subjectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3684
- name: "subject_id";
3685
- tableName: "organization_read_model_container_grants";
2696
+ }, {}, {}>;
2697
+ name: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2698
+ name: "name";
2699
+ tableName: "organization_read_model_groups";
3686
2700
  dataType: "string";
3687
2701
  columnType: "SQLiteText";
3688
2702
  data: string;
@@ -3699,50 +2713,50 @@ export declare const clientSQLiteSchema: {
3699
2713
  }, {}, {
3700
2714
  length: number | undefined;
3701
2715
  }>;
3702
- sortOrder: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3703
- name: "sort_order";
3704
- tableName: "organization_read_model_container_grants";
3705
- dataType: "number";
3706
- columnType: "SQLiteInteger";
3707
- data: number;
3708
- driverParam: number;
2716
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2717
+ name: "created_at";
2718
+ tableName: "organization_read_model_groups";
2719
+ dataType: "string";
2720
+ columnType: "SQLiteText";
2721
+ data: string;
2722
+ driverParam: string;
3709
2723
  notNull: true;
3710
2724
  hasDefault: false;
3711
2725
  isPrimaryKey: false;
3712
2726
  isAutoincrement: false;
3713
2727
  hasRuntimeDefault: false;
3714
- enumValues: undefined;
2728
+ enumValues: [string, ...string[]];
3715
2729
  baseColumn: never;
3716
2730
  identity: undefined;
3717
2731
  generated: undefined;
3718
- }, {}, {}>;
3719
- accessLevel: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3720
- name: "access_level";
3721
- tableName: "organization_read_model_container_grants";
3722
- dataType: "string";
3723
- columnType: "SQLiteText";
3724
- data: string;
3725
- driverParam: string;
2732
+ }, {}, {
2733
+ length: number | undefined;
2734
+ }>;
2735
+ isBuiltin: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2736
+ name: "is_builtin";
2737
+ tableName: "organization_read_model_groups";
2738
+ dataType: "boolean";
2739
+ columnType: "SQLiteBoolean";
2740
+ data: boolean;
2741
+ driverParam: number;
3726
2742
  notNull: true;
3727
2743
  hasDefault: false;
3728
2744
  isPrimaryKey: false;
3729
2745
  isAutoincrement: false;
3730
2746
  hasRuntimeDefault: false;
3731
- enumValues: [string, ...string[]];
2747
+ enumValues: undefined;
3732
2748
  baseColumn: never;
3733
2749
  identity: undefined;
3734
2750
  generated: undefined;
3735
- }, {}, {
3736
- length: number | undefined;
3737
- }>;
3738
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3739
- name: "created_at";
3740
- tableName: "organization_read_model_container_grants";
2751
+ }, {}, {}>;
2752
+ stateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2753
+ name: "state_hash";
2754
+ tableName: "organization_read_model_groups";
3741
2755
  dataType: "string";
3742
2756
  columnType: "SQLiteText";
3743
2757
  data: string;
3744
2758
  driverParam: string;
3745
- notNull: true;
2759
+ notNull: false;
3746
2760
  hasDefault: false;
3747
2761
  isPrimaryKey: false;
3748
2762
  isAutoincrement: false;
@@ -3754,31 +2768,14 @@ export declare const clientSQLiteSchema: {
3754
2768
  }, {}, {
3755
2769
  length: number | undefined;
3756
2770
  }>;
3757
- depth: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3758
- name: "depth";
3759
- tableName: "organization_read_model_container_grants";
2771
+ stateVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2772
+ name: "state_version";
2773
+ tableName: "organization_read_model_groups";
3760
2774
  dataType: "number";
3761
2775
  columnType: "SQLiteInteger";
3762
2776
  data: number;
3763
2777
  driverParam: number;
3764
- notNull: true;
3765
- hasDefault: false;
3766
- isPrimaryKey: false;
3767
- isAutoincrement: false;
3768
- hasRuntimeDefault: false;
3769
- enumValues: undefined;
3770
- baseColumn: never;
3771
- identity: undefined;
3772
- generated: undefined;
3773
- }, {}, {}>;
3774
- isBuiltin: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3775
- name: "is_builtin";
3776
- tableName: "organization_read_model_container_grants";
3777
- dataType: "boolean";
3778
- columnType: "SQLiteBoolean";
3779
- data: boolean;
3780
- driverParam: number;
3781
- notNull: true;
2778
+ notNull: false;
3782
2779
  hasDefault: false;
3783
2780
  isPrimaryKey: false;
3784
2781
  isAutoincrement: false;
@@ -3788,14 +2785,14 @@ export declare const clientSQLiteSchema: {
3788
2785
  identity: undefined;
3789
2786
  generated: undefined;
3790
2787
  }, {}, {}>;
3791
- metadataAccessEpoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3792
- name: "metadata_access_epoch";
3793
- tableName: "organization_read_model_container_grants";
2788
+ keyEpoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2789
+ name: "key_epoch";
2790
+ tableName: "organization_read_model_groups";
3794
2791
  dataType: "number";
3795
2792
  columnType: "SQLiteInteger";
3796
2793
  data: number;
3797
2794
  driverParam: number;
3798
- notNull: true;
2795
+ notNull: false;
3799
2796
  hasDefault: false;
3800
2797
  isPrimaryKey: false;
3801
2798
  isAutoincrement: false;
@@ -3805,14 +2802,14 @@ export declare const clientSQLiteSchema: {
3805
2802
  identity: undefined;
3806
2803
  generated: undefined;
3807
2804
  }, {}, {}>;
3808
- metadataAccessStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3809
- name: "metadata_access_state_hash";
3810
- tableName: "organization_read_model_container_grants";
2805
+ keyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2806
+ name: "key_fingerprint";
2807
+ tableName: "organization_read_model_groups";
3811
2808
  dataType: "string";
3812
2809
  columnType: "SQLiteText";
3813
2810
  data: string;
3814
2811
  driverParam: string;
3815
- notNull: true;
2812
+ notNull: false;
3816
2813
  hasDefault: false;
3817
2814
  isPrimaryKey: false;
3818
2815
  isAutoincrement: false;
@@ -3824,9 +2821,26 @@ export declare const clientSQLiteSchema: {
3824
2821
  }, {}, {
3825
2822
  length: number | undefined;
3826
2823
  }>;
3827
- metadataDocumentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3828
- name: "metadata_document_id";
3829
- tableName: "organization_read_model_container_grants";
2824
+ memberCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2825
+ name: "member_count";
2826
+ tableName: "organization_read_model_groups";
2827
+ dataType: "number";
2828
+ columnType: "SQLiteInteger";
2829
+ data: number;
2830
+ driverParam: number;
2831
+ notNull: false;
2832
+ hasDefault: false;
2833
+ isPrimaryKey: false;
2834
+ isAutoincrement: false;
2835
+ hasRuntimeDefault: false;
2836
+ enumValues: undefined;
2837
+ baseColumn: never;
2838
+ identity: undefined;
2839
+ generated: undefined;
2840
+ }, {}, {}>;
2841
+ membersStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2842
+ name: "members_state_hash";
2843
+ tableName: "organization_read_model_groups";
3830
2844
  dataType: "string";
3831
2845
  columnType: "SQLiteText";
3832
2846
  data: string;
@@ -3843,14 +2857,21 @@ export declare const clientSQLiteSchema: {
3843
2857
  }, {}, {
3844
2858
  length: number | undefined;
3845
2859
  }>;
3846
- parentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3847
- name: "parent_id";
3848
- tableName: "organization_read_model_container_grants";
2860
+ };
2861
+ dialect: "sqlite";
2862
+ }>;
2863
+ organizationReadModelGroupMembers: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2864
+ name: "organization_read_model_group_members";
2865
+ schema: undefined;
2866
+ columns: {
2867
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2868
+ name: "organization_id";
2869
+ tableName: "organization_read_model_group_members";
3849
2870
  dataType: "string";
3850
2871
  columnType: "SQLiteText";
3851
2872
  data: string;
3852
2873
  driverParam: string;
3853
- notNull: false;
2874
+ notNull: true;
3854
2875
  hasDefault: false;
3855
2876
  isPrimaryKey: false;
3856
2877
  isAutoincrement: false;
@@ -3862,9 +2883,9 @@ export declare const clientSQLiteSchema: {
3862
2883
  }, {}, {
3863
2884
  length: number | undefined;
3864
2885
  }>;
3865
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3866
- name: "updated_at";
3867
- tableName: "organization_read_model_container_grants";
2886
+ groupId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2887
+ name: "group_id";
2888
+ tableName: "organization_read_model_group_members";
3868
2889
  dataType: "string";
3869
2890
  columnType: "SQLiteText";
3870
2891
  data: string;
@@ -3883,12 +2904,12 @@ export declare const clientSQLiteSchema: {
3883
2904
  }>;
3884
2905
  userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3885
2906
  name: "user_id";
3886
- tableName: "organization_read_model_container_grants";
2907
+ tableName: "organization_read_model_group_members";
3887
2908
  dataType: "string";
3888
2909
  columnType: "SQLiteText";
3889
2910
  data: string;
3890
2911
  driverParam: string;
3891
- notNull: false;
2912
+ notNull: true;
3892
2913
  hasDefault: false;
3893
2914
  isPrimaryKey: false;
3894
2915
  isAutoincrement: false;
@@ -3900,14 +2921,31 @@ export declare const clientSQLiteSchema: {
3900
2921
  }, {}, {
3901
2922
  length: number | undefined;
3902
2923
  }>;
3903
- signingKeyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3904
- name: "signing_key_fingerprint";
3905
- tableName: "organization_read_model_container_grants";
2924
+ sortOrder: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2925
+ name: "sort_order";
2926
+ tableName: "organization_read_model_group_members";
2927
+ dataType: "number";
2928
+ columnType: "SQLiteInteger";
2929
+ data: number;
2930
+ driverParam: number;
2931
+ notNull: true;
2932
+ hasDefault: false;
2933
+ isPrimaryKey: false;
2934
+ isAutoincrement: false;
2935
+ hasRuntimeDefault: false;
2936
+ enumValues: undefined;
2937
+ baseColumn: never;
2938
+ identity: undefined;
2939
+ generated: undefined;
2940
+ }, {}, {}>;
2941
+ stateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2942
+ name: "state_hash";
2943
+ tableName: "organization_read_model_group_members";
3906
2944
  dataType: "string";
3907
2945
  columnType: "SQLiteText";
3908
2946
  data: string;
3909
2947
  driverParam: string;
3910
- notNull: false;
2948
+ notNull: true;
3911
2949
  hasDefault: false;
3912
2950
  isPrimaryKey: false;
3913
2951
  isAutoincrement: false;
@@ -3919,14 +2957,14 @@ export declare const clientSQLiteSchema: {
3919
2957
  }, {}, {
3920
2958
  length: number | undefined;
3921
2959
  }>;
3922
- groupId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3923
- name: "group_id";
3924
- tableName: "organization_read_model_container_grants";
2960
+ role: import("drizzle-orm/sqlite-core").SQLiteColumn<{
2961
+ name: "role";
2962
+ tableName: "organization_read_model_group_members";
3925
2963
  dataType: "string";
3926
2964
  columnType: "SQLiteText";
3927
2965
  data: string;
3928
2966
  driverParam: string;
3929
- notNull: false;
2967
+ notNull: true;
3930
2968
  hasDefault: false;
3931
2969
  isPrimaryKey: false;
3932
2970
  isAutoincrement: false;
@@ -3941,13 +2979,13 @@ export declare const clientSQLiteSchema: {
3941
2979
  };
3942
2980
  dialect: "sqlite";
3943
2981
  }>;
3944
- organizationPresentationDenials: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3945
- name: "organization_presentation_denials";
2982
+ organizationReadModelContainerGrants: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
2983
+ name: "organization_read_model_container_grants";
3946
2984
  schema: undefined;
3947
2985
  columns: {
3948
2986
  organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3949
2987
  name: "organization_id";
3950
- tableName: "organization_presentation_denials";
2988
+ tableName: "organization_read_model_container_grants";
3951
2989
  dataType: "string";
3952
2990
  columnType: "SQLiteText";
3953
2991
  data: string;
@@ -3964,9 +3002,9 @@ export declare const clientSQLiteSchema: {
3964
3002
  }, {}, {
3965
3003
  length: number | undefined;
3966
3004
  }>;
3967
- requesterUserId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3968
- name: "requester_user_id";
3969
- tableName: "organization_presentation_denials";
3005
+ containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3006
+ name: "container_id";
3007
+ tableName: "organization_read_model_container_grants";
3970
3008
  dataType: "string";
3971
3009
  columnType: "SQLiteText";
3972
3010
  data: string;
@@ -3983,9 +3021,9 @@ export declare const clientSQLiteSchema: {
3983
3021
  }, {}, {
3984
3022
  length: number | undefined;
3985
3023
  }>;
3986
- projection: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3987
- name: "projection";
3988
- tableName: "organization_presentation_denials";
3024
+ subjectType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3025
+ name: "subject_type";
3026
+ tableName: "organization_read_model_container_grants";
3989
3027
  dataType: "string";
3990
3028
  columnType: "SQLiteText";
3991
3029
  data: string;
@@ -4002,9 +3040,9 @@ export declare const clientSQLiteSchema: {
4002
3040
  }, {}, {
4003
3041
  length: number | undefined;
4004
3042
  }>;
4005
- deniedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4006
- name: "denied_at";
4007
- tableName: "organization_presentation_denials";
3043
+ subjectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3044
+ name: "subject_id";
3045
+ tableName: "organization_read_model_container_grants";
4008
3046
  dataType: "string";
4009
3047
  columnType: "SQLiteText";
4010
3048
  data: string;
@@ -4021,35 +3059,26 @@ export declare const clientSQLiteSchema: {
4021
3059
  }, {}, {
4022
3060
  length: number | undefined;
4023
3061
  }>;
4024
- };
4025
- dialect: "sqlite";
4026
- }>;
4027
- documentContainerProjection: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4028
- name: "document_container_projection";
4029
- schema: undefined;
4030
- columns: {
4031
- documentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4032
- name: "document_id";
4033
- tableName: "document_container_projection";
4034
- dataType: "string";
4035
- columnType: "SQLiteText";
4036
- data: string;
4037
- driverParam: string;
3062
+ sortOrder: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3063
+ name: "sort_order";
3064
+ tableName: "organization_read_model_container_grants";
3065
+ dataType: "number";
3066
+ columnType: "SQLiteInteger";
3067
+ data: number;
3068
+ driverParam: number;
4038
3069
  notNull: true;
4039
3070
  hasDefault: false;
4040
3071
  isPrimaryKey: false;
4041
3072
  isAutoincrement: false;
4042
3073
  hasRuntimeDefault: false;
4043
- enumValues: [string, ...string[]];
3074
+ enumValues: undefined;
4044
3075
  baseColumn: never;
4045
3076
  identity: undefined;
4046
3077
  generated: undefined;
4047
- }, {}, {
4048
- length: number | undefined;
4049
- }>;
4050
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4051
- name: "container_id";
4052
- tableName: "document_container_projection";
3078
+ }, {}, {}>;
3079
+ accessLevel: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3080
+ name: "access_level";
3081
+ tableName: "organization_read_model_container_grants";
4053
3082
  dataType: "string";
4054
3083
  columnType: "SQLiteText";
4055
3084
  data: string;
@@ -4066,9 +3095,9 @@ export declare const clientSQLiteSchema: {
4066
3095
  }, {}, {
4067
3096
  length: number | undefined;
4068
3097
  }>;
4069
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4070
- name: "updated_at";
4071
- tableName: "document_container_projection";
3098
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3099
+ name: "created_at";
3100
+ tableName: "organization_read_model_container_grants";
4072
3101
  dataType: "string";
4073
3102
  columnType: "SQLiteText";
4074
3103
  data: string;
@@ -4085,54 +3114,60 @@ export declare const clientSQLiteSchema: {
4085
3114
  }, {}, {
4086
3115
  length: number | undefined;
4087
3116
  }>;
4088
- };
4089
- dialect: "sqlite";
4090
- }>;
4091
- documentMoveIntents: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4092
- name: "document_move_intents";
4093
- schema: undefined;
4094
- columns: {
4095
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4096
- name: "id";
4097
- tableName: "document_move_intents";
4098
- dataType: "string";
4099
- columnType: "SQLiteText";
4100
- data: string;
4101
- driverParam: string;
4102
- notNull: false;
3117
+ depth: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3118
+ name: "depth";
3119
+ tableName: "organization_read_model_container_grants";
3120
+ dataType: "number";
3121
+ columnType: "SQLiteInteger";
3122
+ data: number;
3123
+ driverParam: number;
3124
+ notNull: true;
4103
3125
  hasDefault: false;
4104
3126
  isPrimaryKey: false;
4105
3127
  isAutoincrement: false;
4106
3128
  hasRuntimeDefault: false;
4107
- enumValues: [string, ...string[]];
3129
+ enumValues: undefined;
4108
3130
  baseColumn: never;
4109
3131
  identity: undefined;
4110
3132
  generated: undefined;
4111
- }, {}, {
4112
- length: number | undefined;
4113
- }>;
4114
- localId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4115
- name: "local_id";
4116
- tableName: "document_move_intents";
4117
- dataType: "string";
4118
- columnType: "SQLiteText";
4119
- data: string;
4120
- driverParam: string;
3133
+ }, {}, {}>;
3134
+ isBuiltin: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3135
+ name: "is_builtin";
3136
+ tableName: "organization_read_model_container_grants";
3137
+ dataType: "boolean";
3138
+ columnType: "SQLiteBoolean";
3139
+ data: boolean;
3140
+ driverParam: number;
3141
+ notNull: true;
3142
+ hasDefault: false;
3143
+ isPrimaryKey: false;
3144
+ isAutoincrement: false;
3145
+ hasRuntimeDefault: false;
3146
+ enumValues: undefined;
3147
+ baseColumn: never;
3148
+ identity: undefined;
3149
+ generated: undefined;
3150
+ }, {}, {}>;
3151
+ metadataAccessEpoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3152
+ name: "metadata_access_epoch";
3153
+ tableName: "organization_read_model_container_grants";
3154
+ dataType: "number";
3155
+ columnType: "SQLiteInteger";
3156
+ data: number;
3157
+ driverParam: number;
4121
3158
  notNull: true;
4122
3159
  hasDefault: false;
4123
3160
  isPrimaryKey: false;
4124
3161
  isAutoincrement: false;
4125
3162
  hasRuntimeDefault: false;
4126
- enumValues: [string, ...string[]];
3163
+ enumValues: undefined;
4127
3164
  baseColumn: never;
4128
3165
  identity: undefined;
4129
3166
  generated: undefined;
4130
- }, {}, {
4131
- length: number | undefined;
4132
- }>;
4133
- documentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4134
- name: "document_id";
4135
- tableName: "document_move_intents";
3167
+ }, {}, {}>;
3168
+ metadataAccessStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3169
+ name: "metadata_access_state_hash";
3170
+ tableName: "organization_read_model_container_grants";
4136
3171
  dataType: "string";
4137
3172
  columnType: "SQLiteText";
4138
3173
  data: string;
@@ -4149,14 +3184,14 @@ export declare const clientSQLiteSchema: {
4149
3184
  }, {}, {
4150
3185
  length: number | undefined;
4151
3186
  }>;
4152
- targetContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4153
- name: "target_container_id";
4154
- tableName: "document_move_intents";
3187
+ metadataDocumentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3188
+ name: "metadata_document_id";
3189
+ tableName: "organization_read_model_container_grants";
4155
3190
  dataType: "string";
4156
3191
  columnType: "SQLiteText";
4157
3192
  data: string;
4158
3193
  driverParam: string;
4159
- notNull: true;
3194
+ notNull: false;
4160
3195
  hasDefault: false;
4161
3196
  isPrimaryKey: false;
4162
3197
  isAutoincrement: false;
@@ -4168,9 +3203,9 @@ export declare const clientSQLiteSchema: {
4168
3203
  }, {}, {
4169
3204
  length: number | undefined;
4170
3205
  }>;
4171
- sourceContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4172
- name: "source_container_id";
4173
- tableName: "document_move_intents";
3206
+ parentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3207
+ name: "parent_id";
3208
+ tableName: "organization_read_model_container_grants";
4174
3209
  dataType: "string";
4175
3210
  columnType: "SQLiteText";
4176
3211
  data: string;
@@ -4187,26 +3222,9 @@ export declare const clientSQLiteSchema: {
4187
3222
  }, {}, {
4188
3223
  length: number | undefined;
4189
3224
  }>;
4190
- replaceLinkedContainers: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4191
- name: "replace_linked_containers";
4192
- tableName: "document_move_intents";
4193
- dataType: "boolean";
4194
- columnType: "SQLiteBoolean";
4195
- data: boolean;
4196
- driverParam: number;
4197
- notNull: true;
4198
- hasDefault: true;
4199
- isPrimaryKey: false;
4200
- isAutoincrement: false;
4201
- hasRuntimeDefault: false;
4202
- enumValues: undefined;
4203
- baseColumn: never;
4204
- identity: undefined;
4205
- generated: undefined;
4206
- }, {}, {}>;
4207
- intentType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4208
- name: "intent_type";
4209
- tableName: "document_move_intents";
3225
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3226
+ name: "updated_at";
3227
+ tableName: "organization_read_model_container_grants";
4210
3228
  dataType: "string";
4211
3229
  columnType: "SQLiteText";
4212
3230
  data: string;
@@ -4223,14 +3241,14 @@ export declare const clientSQLiteSchema: {
4223
3241
  }, {}, {
4224
3242
  length: number | undefined;
4225
3243
  }>;
4226
- syncStatus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4227
- name: "sync_status";
4228
- tableName: "document_move_intents";
3244
+ userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3245
+ name: "user_id";
3246
+ tableName: "organization_read_model_container_grants";
4229
3247
  dataType: "string";
4230
3248
  columnType: "SQLiteText";
4231
3249
  data: string;
4232
3250
  driverParam: string;
4233
- notNull: true;
3251
+ notNull: false;
4234
3252
  hasDefault: false;
4235
3253
  isPrimaryKey: false;
4236
3254
  isAutoincrement: false;
@@ -4242,9 +3260,9 @@ export declare const clientSQLiteSchema: {
4242
3260
  }, {}, {
4243
3261
  length: number | undefined;
4244
3262
  }>;
4245
- lastError: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4246
- name: "last_error";
4247
- tableName: "document_move_intents";
3263
+ signingKeyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3264
+ name: "signing_key_fingerprint";
3265
+ tableName: "organization_read_model_container_grants";
4248
3266
  dataType: "string";
4249
3267
  columnType: "SQLiteText";
4250
3268
  data: string;
@@ -4261,9 +3279,9 @@ export declare const clientSQLiteSchema: {
4261
3279
  }, {}, {
4262
3280
  length: number | undefined;
4263
3281
  }>;
4264
- lastAttemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4265
- name: "last_attempted_at";
4266
- tableName: "document_move_intents";
3282
+ groupId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3283
+ name: "group_id";
3284
+ tableName: "organization_read_model_container_grants";
4267
3285
  dataType: "string";
4268
3286
  columnType: "SQLiteText";
4269
3287
  data: string;
@@ -4280,9 +3298,16 @@ export declare const clientSQLiteSchema: {
4280
3298
  }, {}, {
4281
3299
  length: number | undefined;
4282
3300
  }>;
4283
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4284
- name: "created_at";
4285
- tableName: "document_move_intents";
3301
+ };
3302
+ dialect: "sqlite";
3303
+ }>;
3304
+ organizationPresentationDenials: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3305
+ name: "organization_presentation_denials";
3306
+ schema: undefined;
3307
+ columns: {
3308
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3309
+ name: "organization_id";
3310
+ tableName: "organization_presentation_denials";
4286
3311
  dataType: "string";
4287
3312
  columnType: "SQLiteText";
4288
3313
  data: string;
@@ -4299,9 +3324,9 @@ export declare const clientSQLiteSchema: {
4299
3324
  }, {}, {
4300
3325
  length: number | undefined;
4301
3326
  }>;
4302
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4303
- name: "updated_at";
4304
- tableName: "document_move_intents";
3327
+ requesterUserId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3328
+ name: "requester_user_id";
3329
+ tableName: "organization_presentation_denials";
4305
3330
  dataType: "string";
4306
3331
  columnType: "SQLiteText";
4307
3332
  data: string;
@@ -4318,16 +3343,9 @@ export declare const clientSQLiteSchema: {
4318
3343
  }, {}, {
4319
3344
  length: number | undefined;
4320
3345
  }>;
4321
- };
4322
- dialect: "sqlite";
4323
- }>;
4324
- documentIntentLinkTargets: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4325
- name: "document_intent_link_targets";
4326
- schema: undefined;
4327
- columns: {
4328
- intentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4329
- name: "intent_id";
4330
- tableName: "document_intent_link_targets";
3346
+ projection: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3347
+ name: "projection";
3348
+ tableName: "organization_presentation_denials";
4331
3349
  dataType: "string";
4332
3350
  columnType: "SQLiteText";
4333
3351
  data: string;
@@ -4344,28 +3362,9 @@ export declare const clientSQLiteSchema: {
4344
3362
  }, {}, {
4345
3363
  length: number | undefined;
4346
3364
  }>;
4347
- operation: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4348
- name: "operation";
4349
- tableName: "document_intent_link_targets";
4350
- dataType: "string";
4351
- columnType: "SQLiteText";
4352
- data: "link" | "unlink";
4353
- driverParam: string;
4354
- notNull: true;
4355
- hasDefault: true;
4356
- isPrimaryKey: false;
4357
- isAutoincrement: false;
4358
- hasRuntimeDefault: false;
4359
- enumValues: ["link", "unlink"];
4360
- baseColumn: never;
4361
- identity: undefined;
4362
- generated: undefined;
4363
- }, {}, {
4364
- length: number | undefined;
4365
- }>;
4366
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4367
- name: "container_id";
4368
- tableName: "document_intent_link_targets";
3365
+ deniedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3366
+ name: "denied_at";
3367
+ tableName: "organization_presentation_denials";
4369
3368
  dataType: "string";
4370
3369
  columnType: "SQLiteText";
4371
3370
  data: string;
@@ -4385,18 +3384,18 @@ export declare const clientSQLiteSchema: {
4385
3384
  };
4386
3385
  dialect: "sqlite";
4387
3386
  }>;
4388
- documentProjection: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4389
- name: "document_projection";
3387
+ documentContainerProjection: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3388
+ name: "document_container_projection";
4390
3389
  schema: undefined;
4391
3390
  columns: {
4392
- localId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4393
- name: "local_id";
4394
- tableName: "document_projection";
3391
+ documentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3392
+ name: "document_id";
3393
+ tableName: "document_container_projection";
4395
3394
  dataType: "string";
4396
3395
  columnType: "SQLiteText";
4397
3396
  data: string;
4398
3397
  driverParam: string;
4399
- notNull: false;
3398
+ notNull: true;
4400
3399
  hasDefault: false;
4401
3400
  isPrimaryKey: false;
4402
3401
  isAutoincrement: false;
@@ -4408,14 +3407,14 @@ export declare const clientSQLiteSchema: {
4408
3407
  }, {}, {
4409
3408
  length: number | undefined;
4410
3409
  }>;
4411
- documentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4412
- name: "document_id";
4413
- tableName: "document_projection";
3410
+ containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3411
+ name: "container_id";
3412
+ tableName: "document_container_projection";
4414
3413
  dataType: "string";
4415
3414
  columnType: "SQLiteText";
4416
3415
  data: string;
4417
3416
  driverParam: string;
4418
- notNull: false;
3417
+ notNull: true;
4419
3418
  hasDefault: false;
4420
3419
  isPrimaryKey: false;
4421
3420
  isAutoincrement: false;
@@ -4427,14 +3426,14 @@ export declare const clientSQLiteSchema: {
4427
3426
  }, {}, {
4428
3427
  length: number | undefined;
4429
3428
  }>;
4430
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4431
- name: "container_id";
4432
- tableName: "document_projection";
3429
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3430
+ name: "updated_at";
3431
+ tableName: "document_container_projection";
4433
3432
  dataType: "string";
4434
3433
  columnType: "SQLiteText";
4435
3434
  data: string;
4436
3435
  driverParam: string;
4437
- notNull: false;
3436
+ notNull: true;
4438
3437
  hasDefault: false;
4439
3438
  isPrimaryKey: false;
4440
3439
  isAutoincrement: false;
@@ -4446,9 +3445,16 @@ export declare const clientSQLiteSchema: {
4446
3445
  }, {}, {
4447
3446
  length: number | undefined;
4448
3447
  }>;
4449
- organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4450
- name: "organization_id";
4451
- tableName: "document_projection";
3448
+ };
3449
+ dialect: "sqlite";
3450
+ }>;
3451
+ localIntents: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3452
+ name: "local_intents";
3453
+ schema: undefined;
3454
+ columns: {
3455
+ id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3456
+ name: "id";
3457
+ tableName: "local_intents";
4452
3458
  dataType: "string";
4453
3459
  columnType: "SQLiteText";
4454
3460
  data: string;
@@ -4465,15 +3471,15 @@ export declare const clientSQLiteSchema: {
4465
3471
  }, {}, {
4466
3472
  length: number | undefined;
4467
3473
  }>;
4468
- documentKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4469
- name: "document_kind";
4470
- tableName: "document_projection";
3474
+ lane: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3475
+ name: "lane";
3476
+ tableName: "local_intents";
4471
3477
  dataType: "string";
4472
3478
  columnType: "SQLiteText";
4473
3479
  data: string;
4474
3480
  driverParam: string;
4475
3481
  notNull: true;
4476
- hasDefault: true;
3482
+ hasDefault: false;
4477
3483
  isPrimaryKey: false;
4478
3484
  isAutoincrement: false;
4479
3485
  hasRuntimeDefault: false;
@@ -4484,15 +3490,15 @@ export declare const clientSQLiteSchema: {
4484
3490
  }, {}, {
4485
3491
  length: number | undefined;
4486
3492
  }>;
4487
- title: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4488
- name: "title";
4489
- tableName: "document_projection";
3493
+ intentType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3494
+ name: "intent_type";
3495
+ tableName: "local_intents";
4490
3496
  dataType: "string";
4491
3497
  columnType: "SQLiteText";
4492
3498
  data: string;
4493
3499
  driverParam: string;
4494
3500
  notNull: true;
4495
- hasDefault: true;
3501
+ hasDefault: false;
4496
3502
  isPrimaryKey: false;
4497
3503
  isAutoincrement: false;
4498
3504
  hasRuntimeDefault: false;
@@ -4503,9 +3509,9 @@ export declare const clientSQLiteSchema: {
4503
3509
  }, {}, {
4504
3510
  length: number | undefined;
4505
3511
  }>;
4506
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4507
- name: "updated_at";
4508
- tableName: "document_projection";
3512
+ subjectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3513
+ name: "subject_id";
3514
+ tableName: "local_intents";
4509
3515
  dataType: "string";
4510
3516
  columnType: "SQLiteText";
4511
3517
  data: string;
@@ -4522,21 +3528,14 @@ export declare const clientSQLiteSchema: {
4522
3528
  }, {}, {
4523
3529
  length: number | undefined;
4524
3530
  }>;
4525
- };
4526
- dialect: "sqlite";
4527
- }>;
4528
- documentPendingAttachments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4529
- name: "document_pending_attachments";
4530
- schema: undefined;
4531
- columns: {
4532
3531
  localId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4533
3532
  name: "local_id";
4534
- tableName: "document_pending_attachments";
3533
+ tableName: "local_intents";
4535
3534
  dataType: "string";
4536
3535
  columnType: "SQLiteText";
4537
3536
  data: string;
4538
3537
  driverParam: string;
4539
- notNull: true;
3538
+ notNull: false;
4540
3539
  hasDefault: false;
4541
3540
  isPrimaryKey: false;
4542
3541
  isAutoincrement: false;
@@ -4548,9 +3547,9 @@ export declare const clientSQLiteSchema: {
4548
3547
  }, {}, {
4549
3548
  length: number | undefined;
4550
3549
  }>;
4551
- slotId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4552
- name: "slot_id";
4553
- tableName: "document_pending_attachments";
3550
+ targetContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3551
+ name: "target_container_id";
3552
+ tableName: "local_intents";
4554
3553
  dataType: "string";
4555
3554
  columnType: "SQLiteText";
4556
3555
  data: string;
@@ -4567,14 +3566,14 @@ export declare const clientSQLiteSchema: {
4567
3566
  }, {}, {
4568
3567
  length: number | undefined;
4569
3568
  }>;
4570
- name: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4571
- name: "name";
4572
- tableName: "document_pending_attachments";
3569
+ sourceContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3570
+ name: "source_container_id";
3571
+ tableName: "local_intents";
4573
3572
  dataType: "string";
4574
3573
  columnType: "SQLiteText";
4575
3574
  data: string;
4576
3575
  driverParam: string;
4577
- notNull: true;
3576
+ notNull: false;
4578
3577
  hasDefault: false;
4579
3578
  isPrimaryKey: false;
4580
3579
  isAutoincrement: false;
@@ -4586,9 +3585,26 @@ export declare const clientSQLiteSchema: {
4586
3585
  }, {}, {
4587
3586
  length: number | undefined;
4588
3587
  }>;
4589
- mimeType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4590
- name: "mime_type";
4591
- tableName: "document_pending_attachments";
3588
+ replaceLinkedContainers: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3589
+ name: "replace_linked_containers";
3590
+ tableName: "local_intents";
3591
+ dataType: "boolean";
3592
+ columnType: "SQLiteBoolean";
3593
+ data: boolean;
3594
+ driverParam: number;
3595
+ notNull: true;
3596
+ hasDefault: true;
3597
+ isPrimaryKey: false;
3598
+ isAutoincrement: false;
3599
+ hasRuntimeDefault: false;
3600
+ enumValues: undefined;
3601
+ baseColumn: never;
3602
+ identity: undefined;
3603
+ generated: undefined;
3604
+ }, {}, {}>;
3605
+ remoteContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3606
+ name: "remote_container_id";
3607
+ tableName: "local_intents";
4592
3608
  dataType: "string";
4593
3609
  columnType: "SQLiteText";
4594
3610
  data: string;
@@ -4605,14 +3621,14 @@ export declare const clientSQLiteSchema: {
4605
3621
  }, {}, {
4606
3622
  length: number | undefined;
4607
3623
  }>;
4608
- storageKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4609
- name: "storage_key";
4610
- tableName: "document_pending_attachments";
3624
+ remoteMetadataDocumentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3625
+ name: "remote_metadata_document_id";
3626
+ tableName: "local_intents";
4611
3627
  dataType: "string";
4612
3628
  columnType: "SQLiteText";
4613
3629
  data: string;
4614
3630
  driverParam: string;
4615
- notNull: true;
3631
+ notNull: false;
4616
3632
  hasDefault: false;
4617
3633
  isPrimaryKey: false;
4618
3634
  isAutoincrement: false;
@@ -4624,31 +3640,14 @@ export declare const clientSQLiteSchema: {
4624
3640
  }, {}, {
4625
3641
  length: number | undefined;
4626
3642
  }>;
4627
- byteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4628
- name: "byte_length";
4629
- tableName: "document_pending_attachments";
4630
- dataType: "number";
4631
- columnType: "SQLiteInteger";
4632
- data: number;
4633
- driverParam: number;
4634
- notNull: true;
4635
- hasDefault: false;
4636
- isPrimaryKey: false;
4637
- isAutoincrement: false;
4638
- hasRuntimeDefault: false;
4639
- enumValues: undefined;
4640
- baseColumn: never;
4641
- identity: undefined;
4642
- generated: undefined;
4643
- }, {}, {}>;
4644
- contentSha256: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4645
- name: "content_sha256";
4646
- tableName: "document_pending_attachments";
3643
+ remoteMetadataAccessStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3644
+ name: "remote_metadata_access_state_hash";
3645
+ tableName: "local_intents";
4647
3646
  dataType: "string";
4648
3647
  columnType: "SQLiteText";
4649
3648
  data: string;
4650
3649
  driverParam: string;
4651
- notNull: true;
3650
+ notNull: false;
4652
3651
  hasDefault: false;
4653
3652
  isPrimaryKey: false;
4654
3653
  isAutoincrement: false;
@@ -4660,9 +3659,9 @@ export declare const clientSQLiteSchema: {
4660
3659
  }, {}, {
4661
3660
  length: number | undefined;
4662
3661
  }>;
4663
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4664
- name: "created_at";
4665
- tableName: "document_pending_attachments";
3662
+ syncStatus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3663
+ name: "sync_status";
3664
+ tableName: "local_intents";
4666
3665
  dataType: "string";
4667
3666
  columnType: "SQLiteText";
4668
3667
  data: string;
@@ -4679,9 +3678,9 @@ export declare const clientSQLiteSchema: {
4679
3678
  }, {}, {
4680
3679
  length: number | undefined;
4681
3680
  }>;
4682
- uploadBlobId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4683
- name: "upload_blob_id";
4684
- tableName: "document_pending_attachments";
3681
+ lastError: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3682
+ name: "last_error";
3683
+ tableName: "local_intents";
4685
3684
  dataType: "string";
4686
3685
  columnType: "SQLiteText";
4687
3686
  data: string;
@@ -4698,9 +3697,9 @@ export declare const clientSQLiteSchema: {
4698
3697
  }, {}, {
4699
3698
  length: number | undefined;
4700
3699
  }>;
4701
- uploadContentKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4702
- name: "upload_content_key";
4703
- tableName: "document_pending_attachments";
3700
+ lastAttemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3701
+ name: "last_attempted_at";
3702
+ tableName: "local_intents";
4704
3703
  dataType: "string";
4705
3704
  columnType: "SQLiteText";
4706
3705
  data: string;
@@ -4717,14 +3716,14 @@ export declare const clientSQLiteSchema: {
4717
3716
  }, {}, {
4718
3717
  length: number | undefined;
4719
3718
  }>;
4720
- uploadIv: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4721
- name: "upload_iv";
4722
- tableName: "document_pending_attachments";
3719
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3720
+ name: "created_at";
3721
+ tableName: "local_intents";
4723
3722
  dataType: "string";
4724
3723
  columnType: "SQLiteText";
4725
3724
  data: string;
4726
3725
  driverParam: string;
4727
- notNull: false;
3726
+ notNull: true;
4728
3727
  hasDefault: false;
4729
3728
  isPrimaryKey: false;
4730
3729
  isAutoincrement: false;
@@ -4736,67 +3735,78 @@ export declare const clientSQLiteSchema: {
4736
3735
  }, {}, {
4737
3736
  length: number | undefined;
4738
3737
  }>;
4739
- uploadContentKeyEpoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4740
- name: "upload_content_key_epoch";
4741
- tableName: "document_pending_attachments";
4742
- dataType: "number";
4743
- columnType: "SQLiteInteger";
4744
- data: number;
4745
- driverParam: number;
4746
- notNull: false;
3738
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3739
+ name: "updated_at";
3740
+ tableName: "local_intents";
3741
+ dataType: "string";
3742
+ columnType: "SQLiteText";
3743
+ data: string;
3744
+ driverParam: string;
3745
+ notNull: true;
4747
3746
  hasDefault: false;
4748
3747
  isPrimaryKey: false;
4749
3748
  isAutoincrement: false;
4750
3749
  hasRuntimeDefault: false;
4751
- enumValues: undefined;
3750
+ enumValues: [string, ...string[]];
4752
3751
  baseColumn: never;
4753
3752
  identity: undefined;
4754
3753
  generated: undefined;
4755
- }, {}, {}>;
4756
- uploadPartSize: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4757
- name: "upload_part_size";
4758
- tableName: "document_pending_attachments";
4759
- dataType: "number";
4760
- columnType: "SQLiteInteger";
4761
- data: number;
4762
- driverParam: number;
4763
- notNull: false;
3754
+ }, {}, {
3755
+ length: number | undefined;
3756
+ }>;
3757
+ };
3758
+ dialect: "sqlite";
3759
+ }>;
3760
+ documentIntentLinkTargets: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3761
+ name: "document_intent_link_targets";
3762
+ schema: undefined;
3763
+ columns: {
3764
+ intentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3765
+ name: "intent_id";
3766
+ tableName: "document_intent_link_targets";
3767
+ dataType: "string";
3768
+ columnType: "SQLiteText";
3769
+ data: string;
3770
+ driverParam: string;
3771
+ notNull: true;
4764
3772
  hasDefault: false;
4765
3773
  isPrimaryKey: false;
4766
3774
  isAutoincrement: false;
4767
3775
  hasRuntimeDefault: false;
4768
- enumValues: undefined;
3776
+ enumValues: [string, ...string[]];
4769
3777
  baseColumn: never;
4770
3778
  identity: undefined;
4771
3779
  generated: undefined;
4772
- }, {}, {}>;
4773
- uploadPlaintextSha256: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4774
- name: "upload_plaintext_sha256";
4775
- tableName: "document_pending_attachments";
3780
+ }, {}, {
3781
+ length: number | undefined;
3782
+ }>;
3783
+ operation: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3784
+ name: "operation";
3785
+ tableName: "document_intent_link_targets";
4776
3786
  dataType: "string";
4777
3787
  columnType: "SQLiteText";
4778
- data: string;
3788
+ data: "link" | "unlink";
4779
3789
  driverParam: string;
4780
- notNull: false;
4781
- hasDefault: false;
3790
+ notNull: true;
3791
+ hasDefault: true;
4782
3792
  isPrimaryKey: false;
4783
3793
  isAutoincrement: false;
4784
3794
  hasRuntimeDefault: false;
4785
- enumValues: [string, ...string[]];
3795
+ enumValues: ["link", "unlink"];
4786
3796
  baseColumn: never;
4787
3797
  identity: undefined;
4788
3798
  generated: undefined;
4789
3799
  }, {}, {
4790
3800
  length: number | undefined;
4791
3801
  }>;
4792
- uploadStageId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4793
- name: "upload_stage_id";
4794
- tableName: "document_pending_attachments";
3802
+ containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3803
+ name: "container_id";
3804
+ tableName: "document_intent_link_targets";
4795
3805
  dataType: "string";
4796
3806
  columnType: "SQLiteText";
4797
3807
  data: string;
4798
3808
  driverParam: string;
4799
- notNull: false;
3809
+ notNull: true;
4800
3810
  hasDefault: false;
4801
3811
  isPrimaryKey: false;
4802
3812
  isAutoincrement: false;
@@ -4811,18 +3821,18 @@ export declare const clientSQLiteSchema: {
4811
3821
  };
4812
3822
  dialect: "sqlite";
4813
3823
  }>;
4814
- documentAttachmentBlobProjection: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4815
- name: "document_attachment_blob_projection";
3824
+ documentProjection: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3825
+ name: "document_projection";
4816
3826
  schema: undefined;
4817
3827
  columns: {
4818
3828
  localId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4819
3829
  name: "local_id";
4820
- tableName: "document_attachment_blob_projection";
3830
+ tableName: "document_projection";
4821
3831
  dataType: "string";
4822
3832
  columnType: "SQLiteText";
4823
3833
  data: string;
4824
3834
  driverParam: string;
4825
- notNull: true;
3835
+ notNull: false;
4826
3836
  hasDefault: false;
4827
3837
  isPrimaryKey: false;
4828
3838
  isAutoincrement: false;
@@ -4834,14 +3844,14 @@ export declare const clientSQLiteSchema: {
4834
3844
  }, {}, {
4835
3845
  length: number | undefined;
4836
3846
  }>;
4837
- slotId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4838
- name: "slot_id";
4839
- tableName: "document_attachment_blob_projection";
3847
+ documentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3848
+ name: "document_id";
3849
+ tableName: "document_projection";
4840
3850
  dataType: "string";
4841
3851
  columnType: "SQLiteText";
4842
3852
  data: string;
4843
3853
  driverParam: string;
4844
- notNull: true;
3854
+ notNull: false;
4845
3855
  hasDefault: false;
4846
3856
  isPrimaryKey: false;
4847
3857
  isAutoincrement: false;
@@ -4853,9 +3863,9 @@ export declare const clientSQLiteSchema: {
4853
3863
  }, {}, {
4854
3864
  length: number | undefined;
4855
3865
  }>;
4856
- blobId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4857
- name: "blob_id";
4858
- tableName: "document_attachment_blob_projection";
3866
+ containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3867
+ name: "container_id";
3868
+ tableName: "document_projection";
4859
3869
  dataType: "string";
4860
3870
  columnType: "SQLiteText";
4861
3871
  data: string;
@@ -4872,14 +3882,14 @@ export declare const clientSQLiteSchema: {
4872
3882
  }, {}, {
4873
3883
  length: number | undefined;
4874
3884
  }>;
4875
- storageKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4876
- name: "storage_key";
4877
- tableName: "document_attachment_blob_projection";
3885
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3886
+ name: "organization_id";
3887
+ tableName: "document_projection";
4878
3888
  dataType: "string";
4879
3889
  columnType: "SQLiteText";
4880
3890
  data: string;
4881
3891
  driverParam: string;
4882
- notNull: true;
3892
+ notNull: false;
4883
3893
  hasDefault: false;
4884
3894
  isPrimaryKey: false;
4885
3895
  isAutoincrement: false;
@@ -4891,15 +3901,15 @@ export declare const clientSQLiteSchema: {
4891
3901
  }, {}, {
4892
3902
  length: number | undefined;
4893
3903
  }>;
4894
- mimeType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4895
- name: "mime_type";
4896
- tableName: "document_attachment_blob_projection";
3904
+ documentKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3905
+ name: "document_kind";
3906
+ tableName: "document_projection";
4897
3907
  dataType: "string";
4898
3908
  columnType: "SQLiteText";
4899
3909
  data: string;
4900
3910
  driverParam: string;
4901
- notNull: false;
4902
- hasDefault: false;
3911
+ notNull: true;
3912
+ hasDefault: true;
4903
3913
  isPrimaryKey: false;
4904
3914
  isAutoincrement: false;
4905
3915
  hasRuntimeDefault: false;
@@ -4910,32 +3920,15 @@ export declare const clientSQLiteSchema: {
4910
3920
  }, {}, {
4911
3921
  length: number | undefined;
4912
3922
  }>;
4913
- byteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4914
- name: "byte_length";
4915
- tableName: "document_attachment_blob_projection";
4916
- dataType: "number";
4917
- columnType: "SQLiteInteger";
4918
- data: number;
4919
- driverParam: number;
4920
- notNull: true;
4921
- hasDefault: false;
4922
- isPrimaryKey: false;
4923
- isAutoincrement: false;
4924
- hasRuntimeDefault: false;
4925
- enumValues: undefined;
4926
- baseColumn: never;
4927
- identity: undefined;
4928
- generated: undefined;
4929
- }, {}, {}>;
4930
- contentSha256: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4931
- name: "content_sha256";
4932
- tableName: "document_attachment_blob_projection";
3923
+ title: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3924
+ name: "title";
3925
+ tableName: "document_projection";
4933
3926
  dataType: "string";
4934
3927
  columnType: "SQLiteText";
4935
3928
  data: string;
4936
3929
  driverParam: string;
4937
3930
  notNull: true;
4938
- hasDefault: false;
3931
+ hasDefault: true;
4939
3932
  isPrimaryKey: false;
4940
3933
  isAutoincrement: false;
4941
3934
  hasRuntimeDefault: false;
@@ -4948,7 +3941,7 @@ export declare const clientSQLiteSchema: {
4948
3941
  }>;
4949
3942
  updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4950
3943
  name: "updated_at";
4951
- tableName: "document_attachment_blob_projection";
3944
+ tableName: "document_projection";
4952
3945
  dataType: "string";
4953
3946
  columnType: "SQLiteText";
4954
3947
  data: string;
@@ -4965,14 +3958,21 @@ export declare const clientSQLiteSchema: {
4965
3958
  }, {}, {
4966
3959
  length: number | undefined;
4967
3960
  }>;
4968
- detachedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4969
- name: "detached_at";
4970
- tableName: "document_attachment_blob_projection";
3961
+ };
3962
+ dialect: "sqlite";
3963
+ }>;
3964
+ documentPendingAttachments: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
3965
+ name: "document_pending_attachments";
3966
+ schema: undefined;
3967
+ columns: {
3968
+ localId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3969
+ name: "local_id";
3970
+ tableName: "document_pending_attachments";
4971
3971
  dataType: "string";
4972
3972
  columnType: "SQLiteText";
4973
3973
  data: string;
4974
3974
  driverParam: string;
4975
- notNull: false;
3975
+ notNull: true;
4976
3976
  hasDefault: false;
4977
3977
  isPrimaryKey: false;
4978
3978
  isAutoincrement: false;
@@ -4984,23 +3984,16 @@ export declare const clientSQLiteSchema: {
4984
3984
  }, {}, {
4985
3985
  length: number | undefined;
4986
3986
  }>;
4987
- };
4988
- dialect: "sqlite";
4989
- }>;
4990
- documentOrphanBlobReclaims: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4991
- name: "document_orphan_blob_reclaims";
4992
- schema: undefined;
4993
- columns: {
4994
- storageKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4995
- name: "storage_key";
4996
- tableName: "document_orphan_blob_reclaims";
3987
+ slotId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
3988
+ name: "slot_id";
3989
+ tableName: "document_pending_attachments";
4997
3990
  dataType: "string";
4998
3991
  columnType: "SQLiteText";
4999
3992
  data: string;
5000
3993
  driverParam: string;
5001
3994
  notNull: true;
5002
3995
  hasDefault: false;
5003
- isPrimaryKey: true;
3996
+ isPrimaryKey: false;
5004
3997
  isAutoincrement: false;
5005
3998
  hasRuntimeDefault: false;
5006
3999
  enumValues: [string, ...string[]];
@@ -5010,21 +4003,14 @@ export declare const clientSQLiteSchema: {
5010
4003
  }, {}, {
5011
4004
  length: number | undefined;
5012
4005
  }>;
5013
- };
5014
- dialect: "sqlite";
5015
- }>;
5016
- containerCreateIntents: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
5017
- name: "container_create_intents";
5018
- schema: undefined;
5019
- columns: {
5020
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5021
- name: "id";
5022
- tableName: "container_create_intents";
4006
+ name: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4007
+ name: "name";
4008
+ tableName: "document_pending_attachments";
5023
4009
  dataType: "string";
5024
4010
  columnType: "SQLiteText";
5025
4011
  data: string;
5026
4012
  driverParam: string;
5027
- notNull: false;
4013
+ notNull: true;
5028
4014
  hasDefault: false;
5029
4015
  isPrimaryKey: false;
5030
4016
  isAutoincrement: false;
@@ -5036,14 +4022,14 @@ export declare const clientSQLiteSchema: {
5036
4022
  }, {}, {
5037
4023
  length: number | undefined;
5038
4024
  }>;
5039
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5040
- name: "container_id";
5041
- tableName: "container_create_intents";
4025
+ mimeType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4026
+ name: "mime_type";
4027
+ tableName: "document_pending_attachments";
5042
4028
  dataType: "string";
5043
4029
  columnType: "SQLiteText";
5044
4030
  data: string;
5045
4031
  driverParam: string;
5046
- notNull: true;
4032
+ notNull: false;
5047
4033
  hasDefault: false;
5048
4034
  isPrimaryKey: false;
5049
4035
  isAutoincrement: false;
@@ -5055,9 +4041,9 @@ export declare const clientSQLiteSchema: {
5055
4041
  }, {}, {
5056
4042
  length: number | undefined;
5057
4043
  }>;
5058
- parentContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5059
- name: "parent_container_id";
5060
- tableName: "container_create_intents";
4044
+ storageKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4045
+ name: "storage_key";
4046
+ tableName: "document_pending_attachments";
5061
4047
  dataType: "string";
5062
4048
  columnType: "SQLiteText";
5063
4049
  data: string;
@@ -5074,9 +4060,26 @@ export declare const clientSQLiteSchema: {
5074
4060
  }, {}, {
5075
4061
  length: number | undefined;
5076
4062
  }>;
5077
- intentType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5078
- name: "intent_type";
5079
- tableName: "container_create_intents";
4063
+ byteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4064
+ name: "byte_length";
4065
+ tableName: "document_pending_attachments";
4066
+ dataType: "number";
4067
+ columnType: "SQLiteInteger";
4068
+ data: number;
4069
+ driverParam: number;
4070
+ notNull: true;
4071
+ hasDefault: false;
4072
+ isPrimaryKey: false;
4073
+ isAutoincrement: false;
4074
+ hasRuntimeDefault: false;
4075
+ enumValues: undefined;
4076
+ baseColumn: never;
4077
+ identity: undefined;
4078
+ generated: undefined;
4079
+ }, {}, {}>;
4080
+ contentSha256: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4081
+ name: "content_sha256";
4082
+ tableName: "document_pending_attachments";
5080
4083
  dataType: "string";
5081
4084
  columnType: "SQLiteText";
5082
4085
  data: string;
@@ -5093,9 +4096,9 @@ export declare const clientSQLiteSchema: {
5093
4096
  }, {}, {
5094
4097
  length: number | undefined;
5095
4098
  }>;
5096
- syncStatus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5097
- name: "sync_status";
5098
- tableName: "container_create_intents";
4099
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4100
+ name: "created_at";
4101
+ tableName: "document_pending_attachments";
5099
4102
  dataType: "string";
5100
4103
  columnType: "SQLiteText";
5101
4104
  data: string;
@@ -5112,9 +4115,9 @@ export declare const clientSQLiteSchema: {
5112
4115
  }, {}, {
5113
4116
  length: number | undefined;
5114
4117
  }>;
5115
- remoteContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5116
- name: "remote_container_id";
5117
- tableName: "container_create_intents";
4118
+ uploadBlobId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4119
+ name: "upload_blob_id";
4120
+ tableName: "document_pending_attachments";
5118
4121
  dataType: "string";
5119
4122
  columnType: "SQLiteText";
5120
4123
  data: string;
@@ -5131,9 +4134,9 @@ export declare const clientSQLiteSchema: {
5131
4134
  }, {}, {
5132
4135
  length: number | undefined;
5133
4136
  }>;
5134
- remoteMetadataDocumentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5135
- name: "remote_metadata_document_id";
5136
- tableName: "container_create_intents";
4137
+ uploadContentKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4138
+ name: "upload_content_key";
4139
+ tableName: "document_pending_attachments";
5137
4140
  dataType: "string";
5138
4141
  columnType: "SQLiteText";
5139
4142
  data: string;
@@ -5150,9 +4153,9 @@ export declare const clientSQLiteSchema: {
5150
4153
  }, {}, {
5151
4154
  length: number | undefined;
5152
4155
  }>;
5153
- remoteMetadataAccessStateHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5154
- name: "remote_metadata_access_state_hash";
5155
- tableName: "container_create_intents";
4156
+ uploadIv: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4157
+ name: "upload_iv";
4158
+ tableName: "document_pending_attachments";
5156
4159
  dataType: "string";
5157
4160
  columnType: "SQLiteText";
5158
4161
  data: string;
@@ -5169,52 +4172,48 @@ export declare const clientSQLiteSchema: {
5169
4172
  }, {}, {
5170
4173
  length: number | undefined;
5171
4174
  }>;
5172
- lastError: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5173
- name: "last_error";
5174
- tableName: "container_create_intents";
5175
- dataType: "string";
5176
- columnType: "SQLiteText";
5177
- data: string;
5178
- driverParam: string;
4175
+ uploadContentKeyEpoch: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4176
+ name: "upload_content_key_epoch";
4177
+ tableName: "document_pending_attachments";
4178
+ dataType: "number";
4179
+ columnType: "SQLiteInteger";
4180
+ data: number;
4181
+ driverParam: number;
5179
4182
  notNull: false;
5180
4183
  hasDefault: false;
5181
4184
  isPrimaryKey: false;
5182
4185
  isAutoincrement: false;
5183
4186
  hasRuntimeDefault: false;
5184
- enumValues: [string, ...string[]];
4187
+ enumValues: undefined;
5185
4188
  baseColumn: never;
5186
4189
  identity: undefined;
5187
4190
  generated: undefined;
5188
- }, {}, {
5189
- length: number | undefined;
5190
- }>;
5191
- lastAttemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5192
- name: "last_attempted_at";
5193
- tableName: "container_create_intents";
5194
- dataType: "string";
5195
- columnType: "SQLiteText";
5196
- data: string;
5197
- driverParam: string;
4191
+ }, {}, {}>;
4192
+ uploadPartSize: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4193
+ name: "upload_part_size";
4194
+ tableName: "document_pending_attachments";
4195
+ dataType: "number";
4196
+ columnType: "SQLiteInteger";
4197
+ data: number;
4198
+ driverParam: number;
5198
4199
  notNull: false;
5199
4200
  hasDefault: false;
5200
4201
  isPrimaryKey: false;
5201
4202
  isAutoincrement: false;
5202
4203
  hasRuntimeDefault: false;
5203
- enumValues: [string, ...string[]];
4204
+ enumValues: undefined;
5204
4205
  baseColumn: never;
5205
4206
  identity: undefined;
5206
4207
  generated: undefined;
5207
- }, {}, {
5208
- length: number | undefined;
5209
- }>;
5210
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5211
- name: "created_at";
5212
- tableName: "container_create_intents";
4208
+ }, {}, {}>;
4209
+ uploadPlaintextSha256: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4210
+ name: "upload_plaintext_sha256";
4211
+ tableName: "document_pending_attachments";
5213
4212
  dataType: "string";
5214
4213
  columnType: "SQLiteText";
5215
4214
  data: string;
5216
4215
  driverParam: string;
5217
- notNull: true;
4216
+ notNull: false;
5218
4217
  hasDefault: false;
5219
4218
  isPrimaryKey: false;
5220
4219
  isAutoincrement: false;
@@ -5226,14 +4225,14 @@ export declare const clientSQLiteSchema: {
5226
4225
  }, {}, {
5227
4226
  length: number | undefined;
5228
4227
  }>;
5229
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5230
- name: "updated_at";
5231
- tableName: "container_create_intents";
4228
+ uploadStageId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4229
+ name: "upload_stage_id";
4230
+ tableName: "document_pending_attachments";
5232
4231
  dataType: "string";
5233
4232
  columnType: "SQLiteText";
5234
4233
  data: string;
5235
4234
  driverParam: string;
5236
- notNull: true;
4235
+ notNull: false;
5237
4236
  hasDefault: false;
5238
4237
  isPrimaryKey: false;
5239
4238
  isAutoincrement: false;
@@ -5248,18 +4247,18 @@ export declare const clientSQLiteSchema: {
5248
4247
  };
5249
4248
  dialect: "sqlite";
5250
4249
  }>;
5251
- containerMoveIntents: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
5252
- name: "container_move_intents";
4250
+ documentAttachmentBlobProjection: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4251
+ name: "document_attachment_blob_projection";
5253
4252
  schema: undefined;
5254
4253
  columns: {
5255
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5256
- name: "id";
5257
- tableName: "container_move_intents";
4254
+ localId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4255
+ name: "local_id";
4256
+ tableName: "document_attachment_blob_projection";
5258
4257
  dataType: "string";
5259
4258
  columnType: "SQLiteText";
5260
4259
  data: string;
5261
4260
  driverParam: string;
5262
- notNull: false;
4261
+ notNull: true;
5263
4262
  hasDefault: false;
5264
4263
  isPrimaryKey: false;
5265
4264
  isAutoincrement: false;
@@ -5271,9 +4270,9 @@ export declare const clientSQLiteSchema: {
5271
4270
  }, {}, {
5272
4271
  length: number | undefined;
5273
4272
  }>;
5274
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5275
- name: "container_id";
5276
- tableName: "container_move_intents";
4273
+ slotId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4274
+ name: "slot_id";
4275
+ tableName: "document_attachment_blob_projection";
5277
4276
  dataType: "string";
5278
4277
  columnType: "SQLiteText";
5279
4278
  data: string;
@@ -5290,14 +4289,14 @@ export declare const clientSQLiteSchema: {
5290
4289
  }, {}, {
5291
4290
  length: number | undefined;
5292
4291
  }>;
5293
- parentContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5294
- name: "parent_container_id";
5295
- tableName: "container_move_intents";
4292
+ blobId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4293
+ name: "blob_id";
4294
+ tableName: "document_attachment_blob_projection";
5296
4295
  dataType: "string";
5297
4296
  columnType: "SQLiteText";
5298
4297
  data: string;
5299
4298
  driverParam: string;
5300
- notNull: true;
4299
+ notNull: false;
5301
4300
  hasDefault: false;
5302
4301
  isPrimaryKey: false;
5303
4302
  isAutoincrement: false;
@@ -5309,14 +4308,14 @@ export declare const clientSQLiteSchema: {
5309
4308
  }, {}, {
5310
4309
  length: number | undefined;
5311
4310
  }>;
5312
- previousParentContainerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5313
- name: "previous_parent_container_id";
5314
- tableName: "container_move_intents";
4311
+ storageKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4312
+ name: "storage_key";
4313
+ tableName: "document_attachment_blob_projection";
5315
4314
  dataType: "string";
5316
4315
  columnType: "SQLiteText";
5317
4316
  data: string;
5318
4317
  driverParam: string;
5319
- notNull: false;
4318
+ notNull: true;
5320
4319
  hasDefault: false;
5321
4320
  isPrimaryKey: false;
5322
4321
  isAutoincrement: false;
@@ -5328,14 +4327,14 @@ export declare const clientSQLiteSchema: {
5328
4327
  }, {}, {
5329
4328
  length: number | undefined;
5330
4329
  }>;
5331
- intentType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5332
- name: "intent_type";
5333
- tableName: "container_move_intents";
4330
+ mimeType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4331
+ name: "mime_type";
4332
+ tableName: "document_attachment_blob_projection";
5334
4333
  dataType: "string";
5335
4334
  columnType: "SQLiteText";
5336
4335
  data: string;
5337
4336
  driverParam: string;
5338
- notNull: true;
4337
+ notNull: false;
5339
4338
  hasDefault: false;
5340
4339
  isPrimaryKey: false;
5341
4340
  isAutoincrement: false;
@@ -5347,33 +4346,31 @@ export declare const clientSQLiteSchema: {
5347
4346
  }, {}, {
5348
4347
  length: number | undefined;
5349
4348
  }>;
5350
- syncStatus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5351
- name: "sync_status";
5352
- tableName: "container_move_intents";
5353
- dataType: "string";
5354
- columnType: "SQLiteText";
5355
- data: string;
5356
- driverParam: string;
4349
+ byteLength: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4350
+ name: "byte_length";
4351
+ tableName: "document_attachment_blob_projection";
4352
+ dataType: "number";
4353
+ columnType: "SQLiteInteger";
4354
+ data: number;
4355
+ driverParam: number;
5357
4356
  notNull: true;
5358
4357
  hasDefault: false;
5359
4358
  isPrimaryKey: false;
5360
4359
  isAutoincrement: false;
5361
4360
  hasRuntimeDefault: false;
5362
- enumValues: [string, ...string[]];
4361
+ enumValues: undefined;
5363
4362
  baseColumn: never;
5364
4363
  identity: undefined;
5365
4364
  generated: undefined;
5366
- }, {}, {
5367
- length: number | undefined;
5368
- }>;
5369
- lastError: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5370
- name: "last_error";
5371
- tableName: "container_move_intents";
4365
+ }, {}, {}>;
4366
+ contentSha256: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4367
+ name: "content_sha256";
4368
+ tableName: "document_attachment_blob_projection";
5372
4369
  dataType: "string";
5373
4370
  columnType: "SQLiteText";
5374
4371
  data: string;
5375
4372
  driverParam: string;
5376
- notNull: false;
4373
+ notNull: true;
5377
4374
  hasDefault: false;
5378
4375
  isPrimaryKey: false;
5379
4376
  isAutoincrement: false;
@@ -5385,14 +4382,14 @@ export declare const clientSQLiteSchema: {
5385
4382
  }, {}, {
5386
4383
  length: number | undefined;
5387
4384
  }>;
5388
- lastAttemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5389
- name: "last_attempted_at";
5390
- tableName: "container_move_intents";
4385
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4386
+ name: "updated_at";
4387
+ tableName: "document_attachment_blob_projection";
5391
4388
  dataType: "string";
5392
4389
  columnType: "SQLiteText";
5393
4390
  data: string;
5394
4391
  driverParam: string;
5395
- notNull: false;
4392
+ notNull: true;
5396
4393
  hasDefault: false;
5397
4394
  isPrimaryKey: false;
5398
4395
  isAutoincrement: false;
@@ -5404,14 +4401,14 @@ export declare const clientSQLiteSchema: {
5404
4401
  }, {}, {
5405
4402
  length: number | undefined;
5406
4403
  }>;
5407
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5408
- name: "created_at";
5409
- tableName: "container_move_intents";
4404
+ detachedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4405
+ name: "detached_at";
4406
+ tableName: "document_attachment_blob_projection";
5410
4407
  dataType: "string";
5411
4408
  columnType: "SQLiteText";
5412
4409
  data: string;
5413
4410
  driverParam: string;
5414
- notNull: true;
4411
+ notNull: false;
5415
4412
  hasDefault: false;
5416
4413
  isPrimaryKey: false;
5417
4414
  isAutoincrement: false;
@@ -5423,16 +4420,23 @@ export declare const clientSQLiteSchema: {
5423
4420
  }, {}, {
5424
4421
  length: number | undefined;
5425
4422
  }>;
5426
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5427
- name: "updated_at";
5428
- tableName: "container_move_intents";
4423
+ };
4424
+ dialect: "sqlite";
4425
+ }>;
4426
+ documentOrphanBlobReclaims: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4427
+ name: "document_orphan_blob_reclaims";
4428
+ schema: undefined;
4429
+ columns: {
4430
+ storageKey: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4431
+ name: "storage_key";
4432
+ tableName: "document_orphan_blob_reclaims";
5429
4433
  dataType: "string";
5430
4434
  columnType: "SQLiteText";
5431
4435
  data: string;
5432
4436
  driverParam: string;
5433
4437
  notNull: true;
5434
4438
  hasDefault: false;
5435
- isPrimaryKey: false;
4439
+ isPrimaryKey: true;
5436
4440
  isAutoincrement: false;
5437
4441
  hasRuntimeDefault: false;
5438
4442
  enumValues: [string, ...string[]];
@@ -5665,15 +4669,15 @@ export declare const clientSQLiteSchema: {
5665
4669
  }, {}, {
5666
4670
  length: number | undefined;
5667
4671
  }>;
5668
- effectiveAccessLevel: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5669
- name: "effective_access_level";
4672
+ displayName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4673
+ name: "display_name";
5670
4674
  tableName: "containers";
5671
4675
  dataType: "string";
5672
4676
  columnType: "SQLiteText";
5673
4677
  data: string;
5674
4678
  driverParam: string;
5675
- notNull: true;
5676
- hasDefault: true;
4679
+ notNull: false;
4680
+ hasDefault: false;
5677
4681
  isPrimaryKey: false;
5678
4682
  isAutoincrement: false;
5679
4683
  hasRuntimeDefault: false;
@@ -5684,14 +4688,14 @@ export declare const clientSQLiteSchema: {
5684
4688
  }, {}, {
5685
4689
  length: number | undefined;
5686
4690
  }>;
5687
- localCreatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5688
- name: "local_created_at";
4691
+ icon: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4692
+ name: "icon";
5689
4693
  tableName: "containers";
5690
4694
  dataType: "string";
5691
4695
  columnType: "SQLiteText";
5692
4696
  data: string;
5693
4697
  driverParam: string;
5694
- notNull: true;
4698
+ notNull: false;
5695
4699
  hasDefault: false;
5696
4700
  isPrimaryKey: false;
5697
4701
  isAutoincrement: false;
@@ -5703,15 +4707,15 @@ export declare const clientSQLiteSchema: {
5703
4707
  }, {}, {
5704
4708
  length: number | undefined;
5705
4709
  }>;
5706
- localUpdatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5707
- name: "local_updated_at";
4710
+ effectiveAccessLevel: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4711
+ name: "effective_access_level";
5708
4712
  tableName: "containers";
5709
4713
  dataType: "string";
5710
4714
  columnType: "SQLiteText";
5711
4715
  data: string;
5712
4716
  driverParam: string;
5713
4717
  notNull: true;
5714
- hasDefault: false;
4718
+ hasDefault: true;
5715
4719
  isPrimaryKey: false;
5716
4720
  isAutoincrement: false;
5717
4721
  hasRuntimeDefault: false;
@@ -5722,14 +4726,14 @@ export declare const clientSQLiteSchema: {
5722
4726
  }, {}, {
5723
4727
  length: number | undefined;
5724
4728
  }>;
5725
- serverCreatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5726
- name: "server_created_at";
4729
+ localCreatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4730
+ name: "local_created_at";
5727
4731
  tableName: "containers";
5728
4732
  dataType: "string";
5729
4733
  columnType: "SQLiteText";
5730
4734
  data: string;
5731
4735
  driverParam: string;
5732
- notNull: false;
4736
+ notNull: true;
5733
4737
  hasDefault: false;
5734
4738
  isPrimaryKey: false;
5735
4739
  isAutoincrement: false;
@@ -5741,39 +4745,13 @@ export declare const clientSQLiteSchema: {
5741
4745
  }, {}, {
5742
4746
  length: number | undefined;
5743
4747
  }>;
5744
- serverUpdatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5745
- name: "server_updated_at";
4748
+ localUpdatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4749
+ name: "local_updated_at";
5746
4750
  tableName: "containers";
5747
4751
  dataType: "string";
5748
4752
  columnType: "SQLiteText";
5749
4753
  data: string;
5750
4754
  driverParam: string;
5751
- notNull: false;
5752
- hasDefault: false;
5753
- isPrimaryKey: false;
5754
- isAutoincrement: false;
5755
- hasRuntimeDefault: false;
5756
- enumValues: [string, ...string[]];
5757
- baseColumn: never;
5758
- identity: undefined;
5759
- generated: undefined;
5760
- }, {}, {
5761
- length: number | undefined;
5762
- }>;
5763
- };
5764
- dialect: "sqlite";
5765
- }>;
5766
- containerHydrationTombstones: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
5767
- name: "container_hydration_tombstones";
5768
- schema: undefined;
5769
- columns: {
5770
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5771
- name: "container_id";
5772
- tableName: "container_hydration_tombstones";
5773
- dataType: "string";
5774
- columnType: "SQLiteText";
5775
- data: string;
5776
- driverParam: string;
5777
4755
  notNull: true;
5778
4756
  hasDefault: false;
5779
4757
  isPrimaryKey: false;
@@ -5786,48 +4764,14 @@ export declare const clientSQLiteSchema: {
5786
4764
  }, {}, {
5787
4765
  length: number | undefined;
5788
4766
  }>;
5789
- generation: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5790
- name: "generation";
5791
- tableName: "container_hydration_tombstones";
5792
- dataType: "number";
5793
- columnType: "SQLiteInteger";
5794
- data: number;
5795
- driverParam: number;
5796
- notNull: true;
5797
- hasDefault: true;
5798
- isPrimaryKey: false;
5799
- isAutoincrement: false;
5800
- hasRuntimeDefault: false;
5801
- enumValues: undefined;
5802
- baseColumn: never;
5803
- identity: undefined;
5804
- generated: undefined;
5805
- }, {}, {}>;
5806
- cleared: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5807
- name: "cleared";
5808
- tableName: "container_hydration_tombstones";
5809
- dataType: "boolean";
5810
- columnType: "SQLiteBoolean";
5811
- data: boolean;
5812
- driverParam: number;
5813
- notNull: true;
5814
- hasDefault: true;
5815
- isPrimaryKey: false;
5816
- isAutoincrement: false;
5817
- hasRuntimeDefault: false;
5818
- enumValues: undefined;
5819
- baseColumn: never;
5820
- identity: undefined;
5821
- generated: undefined;
5822
- }, {}, {}>;
5823
- reason: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5824
- name: "reason";
5825
- tableName: "container_hydration_tombstones";
4767
+ serverCreatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4768
+ name: "server_created_at";
4769
+ tableName: "containers";
5826
4770
  dataType: "string";
5827
4771
  columnType: "SQLiteText";
5828
4772
  data: string;
5829
4773
  driverParam: string;
5830
- notNull: true;
4774
+ notNull: false;
5831
4775
  hasDefault: false;
5832
4776
  isPrimaryKey: false;
5833
4777
  isAutoincrement: false;
@@ -5839,14 +4783,14 @@ export declare const clientSQLiteSchema: {
5839
4783
  }, {}, {
5840
4784
  length: number | undefined;
5841
4785
  }>;
5842
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5843
- name: "updated_at";
5844
- tableName: "container_hydration_tombstones";
4786
+ serverUpdatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4787
+ name: "server_updated_at";
4788
+ tableName: "containers";
5845
4789
  dataType: "string";
5846
4790
  columnType: "SQLiteText";
5847
4791
  data: string;
5848
4792
  driverParam: string;
5849
- notNull: true;
4793
+ notNull: false;
5850
4794
  hasDefault: false;
5851
4795
  isPrimaryKey: false;
5852
4796
  isAutoincrement: false;
@@ -5861,37 +4805,18 @@ export declare const clientSQLiteSchema: {
5861
4805
  };
5862
4806
  dialect: "sqlite";
5863
4807
  }>;
5864
- containerProjection: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
5865
- name: "container_projection";
4808
+ containerHydrationTombstones: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4809
+ name: "container_hydration_tombstones";
5866
4810
  schema: undefined;
5867
4811
  columns: {
5868
- containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5869
- name: "container_id";
5870
- tableName: "container_projection";
5871
- dataType: "string";
5872
- columnType: "SQLiteText";
5873
- data: string;
5874
- driverParam: string;
5875
- notNull: false;
5876
- hasDefault: false;
5877
- isPrimaryKey: false;
5878
- isAutoincrement: false;
5879
- hasRuntimeDefault: false;
5880
- enumValues: [string, ...string[]];
5881
- baseColumn: never;
5882
- identity: undefined;
5883
- generated: undefined;
5884
- }, {}, {
5885
- length: number | undefined;
5886
- }>;
5887
- displayName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5888
- name: "display_name";
5889
- tableName: "container_projection";
4812
+ containerId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4813
+ name: "container_id";
4814
+ tableName: "container_hydration_tombstones";
5890
4815
  dataType: "string";
5891
4816
  columnType: "SQLiteText";
5892
4817
  data: string;
5893
4818
  driverParam: string;
5894
- notNull: false;
4819
+ notNull: true;
5895
4820
  hasDefault: false;
5896
4821
  isPrimaryKey: false;
5897
4822
  isAutoincrement: false;
@@ -5903,14 +4828,48 @@ export declare const clientSQLiteSchema: {
5903
4828
  }, {}, {
5904
4829
  length: number | undefined;
5905
4830
  }>;
5906
- icon: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5907
- name: "icon";
5908
- tableName: "container_projection";
4831
+ generation: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4832
+ name: "generation";
4833
+ tableName: "container_hydration_tombstones";
4834
+ dataType: "number";
4835
+ columnType: "SQLiteInteger";
4836
+ data: number;
4837
+ driverParam: number;
4838
+ notNull: true;
4839
+ hasDefault: true;
4840
+ isPrimaryKey: false;
4841
+ isAutoincrement: false;
4842
+ hasRuntimeDefault: false;
4843
+ enumValues: undefined;
4844
+ baseColumn: never;
4845
+ identity: undefined;
4846
+ generated: undefined;
4847
+ }, {}, {}>;
4848
+ cleared: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4849
+ name: "cleared";
4850
+ tableName: "container_hydration_tombstones";
4851
+ dataType: "boolean";
4852
+ columnType: "SQLiteBoolean";
4853
+ data: boolean;
4854
+ driverParam: number;
4855
+ notNull: true;
4856
+ hasDefault: true;
4857
+ isPrimaryKey: false;
4858
+ isAutoincrement: false;
4859
+ hasRuntimeDefault: false;
4860
+ enumValues: undefined;
4861
+ baseColumn: never;
4862
+ identity: undefined;
4863
+ generated: undefined;
4864
+ }, {}, {}>;
4865
+ reason: import("drizzle-orm/sqlite-core").SQLiteColumn<{
4866
+ name: "reason";
4867
+ tableName: "container_hydration_tombstones";
5909
4868
  dataType: "string";
5910
4869
  columnType: "SQLiteText";
5911
4870
  data: string;
5912
4871
  driverParam: string;
5913
- notNull: false;
4872
+ notNull: true;
5914
4873
  hasDefault: false;
5915
4874
  isPrimaryKey: false;
5916
4875
  isAutoincrement: false;
@@ -5924,7 +4883,7 @@ export declare const clientSQLiteSchema: {
5924
4883
  }>;
5925
4884
  updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5926
4885
  name: "updated_at";
5927
- tableName: "container_projection";
4886
+ tableName: "container_hydration_tombstones";
5928
4887
  dataType: "string";
5929
4888
  columnType: "SQLiteText";
5930
4889
  data: string;
@@ -6408,121 +5367,6 @@ export declare const clientSQLiteSchema: {
6408
5367
  };
6409
5368
  dialect: "sqlite";
6410
5369
  }>;
6411
- principalHistoryStageScopes: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
6412
- name: "principal_history_stage_scopes";
6413
- schema: undefined;
6414
- columns: {
6415
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6416
- name: "id";
6417
- tableName: "principal_history_stage_scopes";
6418
- dataType: "string";
6419
- columnType: "SQLiteText";
6420
- data: string;
6421
- driverParam: string;
6422
- notNull: true;
6423
- hasDefault: false;
6424
- isPrimaryKey: true;
6425
- isAutoincrement: false;
6426
- hasRuntimeDefault: false;
6427
- enumValues: [string, ...string[]];
6428
- baseColumn: never;
6429
- identity: undefined;
6430
- generated: undefined;
6431
- }, {}, {
6432
- length: number | undefined;
6433
- }>;
6434
- organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6435
- name: "organization_id";
6436
- tableName: "principal_history_stage_scopes";
6437
- dataType: "string";
6438
- columnType: "SQLiteText";
6439
- data: string;
6440
- driverParam: string;
6441
- notNull: true;
6442
- hasDefault: false;
6443
- isPrimaryKey: false;
6444
- isAutoincrement: false;
6445
- hasRuntimeDefault: false;
6446
- enumValues: [string, ...string[]];
6447
- baseColumn: never;
6448
- identity: undefined;
6449
- generated: undefined;
6450
- }, {}, {
6451
- length: number | undefined;
6452
- }>;
6453
- scopeId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6454
- name: "scope_id";
6455
- tableName: "principal_history_stage_scopes";
6456
- dataType: "string";
6457
- columnType: "SQLiteText";
6458
- data: string;
6459
- driverParam: string;
6460
- notNull: true;
6461
- hasDefault: false;
6462
- isPrimaryKey: false;
6463
- isAutoincrement: false;
6464
- hasRuntimeDefault: false;
6465
- enumValues: [string, ...string[]];
6466
- baseColumn: never;
6467
- identity: undefined;
6468
- generated: undefined;
6469
- }, {}, {
6470
- length: number | undefined;
6471
- }>;
6472
- afterVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6473
- name: "after_version";
6474
- tableName: "principal_history_stage_scopes";
6475
- dataType: "number";
6476
- columnType: "SQLiteInteger";
6477
- data: number;
6478
- driverParam: number;
6479
- notNull: true;
6480
- hasDefault: false;
6481
- isPrimaryKey: false;
6482
- isAutoincrement: false;
6483
- hasRuntimeDefault: false;
6484
- enumValues: undefined;
6485
- baseColumn: never;
6486
- identity: undefined;
6487
- generated: undefined;
6488
- }, {}, {}>;
6489
- complete: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6490
- name: "complete";
6491
- tableName: "principal_history_stage_scopes";
6492
- dataType: "boolean";
6493
- columnType: "SQLiteBoolean";
6494
- data: boolean;
6495
- driverParam: number;
6496
- notNull: true;
6497
- hasDefault: false;
6498
- isPrimaryKey: false;
6499
- isAutoincrement: false;
6500
- hasRuntimeDefault: false;
6501
- enumValues: undefined;
6502
- baseColumn: never;
6503
- identity: undefined;
6504
- generated: undefined;
6505
- }, {}, {}>;
6506
- touchedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6507
- name: "touched_at";
6508
- tableName: "principal_history_stage_scopes";
6509
- dataType: "number";
6510
- columnType: "SQLiteInteger";
6511
- data: number;
6512
- driverParam: number;
6513
- notNull: true;
6514
- hasDefault: false;
6515
- isPrimaryKey: false;
6516
- isAutoincrement: false;
6517
- hasRuntimeDefault: false;
6518
- enumValues: undefined;
6519
- baseColumn: never;
6520
- identity: undefined;
6521
- generated: undefined;
6522
- }, {}, {}>;
6523
- };
6524
- dialect: "sqlite";
6525
- }>;
6526
5370
  principalKeyEnvelopeArchive: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
6527
5371
  name: "principal_key_envelope_archive";
6528
5372
  schema: undefined;
@@ -7071,6 +5915,25 @@ export declare const clientSQLiteSchema: {
7071
5915
  }, {}, {
7072
5916
  length: number | undefined;
7073
5917
  }>;
5918
+ scopeId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5919
+ name: "scope_id";
5920
+ tableName: "principal_history_stages";
5921
+ dataType: "string";
5922
+ columnType: "SQLiteText";
5923
+ data: string;
5924
+ driverParam: string;
5925
+ notNull: true;
5926
+ hasDefault: false;
5927
+ isPrimaryKey: false;
5928
+ isAutoincrement: false;
5929
+ hasRuntimeDefault: false;
5930
+ enumValues: [string, ...string[]];
5931
+ baseColumn: never;
5932
+ identity: undefined;
5933
+ generated: undefined;
5934
+ }, {}, {
5935
+ length: number | undefined;
5936
+ }>;
7074
5937
  currentJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
7075
5938
  name: "current_json";
7076
5939
  tableName: "principal_history_stages";
@@ -7124,6 +5987,23 @@ export declare const clientSQLiteSchema: {
7124
5987
  identity: undefined;
7125
5988
  generated: undefined;
7126
5989
  }, {}, {}>;
5990
+ touchedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
5991
+ name: "touched_at";
5992
+ tableName: "principal_history_stages";
5993
+ dataType: "number";
5994
+ columnType: "SQLiteInteger";
5995
+ data: number;
5996
+ driverParam: number;
5997
+ notNull: true;
5998
+ hasDefault: false;
5999
+ isPrimaryKey: false;
6000
+ isAutoincrement: false;
6001
+ hasRuntimeDefault: false;
6002
+ enumValues: undefined;
6003
+ baseColumn: never;
6004
+ identity: undefined;
6005
+ generated: undefined;
6006
+ }, {}, {}>;
7127
6007
  progress: import("drizzle-orm/sqlite-core").SQLiteColumn<{
7128
6008
  name: "progress";
7129
6009
  tableName: "principal_history_stages";
@@ -7597,40 +6477,31 @@ export declare const clientSQLiteSchema: {
7597
6477
  }, {}, {
7598
6478
  length: number | undefined;
7599
6479
  }>;
7600
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
7601
- name: "updated_at";
6480
+ syncFailureStatus: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6481
+ name: "sync_failure_status";
7602
6482
  tableName: "documents";
7603
- dataType: "string";
7604
- columnType: "SQLiteText";
7605
- data: string;
7606
- driverParam: string;
7607
- notNull: true;
6483
+ dataType: "number";
6484
+ columnType: "SQLiteInteger";
6485
+ data: number;
6486
+ driverParam: number;
6487
+ notNull: false;
7608
6488
  hasDefault: false;
7609
6489
  isPrimaryKey: false;
7610
6490
  isAutoincrement: false;
7611
6491
  hasRuntimeDefault: false;
7612
- enumValues: [string, ...string[]];
6492
+ enumValues: undefined;
7613
6493
  baseColumn: never;
7614
6494
  identity: undefined;
7615
6495
  generated: undefined;
7616
- }, {}, {
7617
- length: number | undefined;
7618
- }>;
7619
- };
7620
- dialect: "sqlite";
7621
- }>;
7622
- documentSyncFailures: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
7623
- name: "document_sync_failures";
7624
- schema: undefined;
7625
- columns: {
7626
- appKind: import("drizzle-orm/sqlite-core").SQLiteColumn<{
7627
- name: "app_kind";
7628
- tableName: "document_sync_failures";
6496
+ }, {}, {}>;
6497
+ syncFailureMessage: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6498
+ name: "sync_failure_message";
6499
+ tableName: "documents";
7629
6500
  dataType: "string";
7630
6501
  columnType: "SQLiteText";
7631
6502
  data: string;
7632
6503
  driverParam: string;
7633
- notNull: true;
6504
+ notNull: false;
7634
6505
  hasDefault: false;
7635
6506
  isPrimaryKey: false;
7636
6507
  isAutoincrement: false;
@@ -7642,54 +6513,18 @@ export declare const clientSQLiteSchema: {
7642
6513
  }, {}, {
7643
6514
  length: number | undefined;
7644
6515
  }>;
7645
- localId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
7646
- name: "local_id";
7647
- tableName: "document_sync_failures";
6516
+ syncFailureAttemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6517
+ name: "sync_failure_attempted_at";
6518
+ tableName: "documents";
7648
6519
  dataType: "string";
7649
6520
  columnType: "SQLiteText";
7650
6521
  data: string;
7651
6522
  driverParam: string;
7652
- notNull: true;
7653
- hasDefault: false;
7654
- isPrimaryKey: false;
7655
- isAutoincrement: false;
7656
- hasRuntimeDefault: false;
7657
- enumValues: [string, ...string[]];
7658
- baseColumn: never;
7659
- identity: undefined;
7660
- generated: undefined;
7661
- }, {}, {
7662
- length: number | undefined;
7663
- }>;
7664
- status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
7665
- name: "status";
7666
- tableName: "document_sync_failures";
7667
- dataType: "number";
7668
- columnType: "SQLiteInteger";
7669
- data: number;
7670
- driverParam: number;
7671
6523
  notNull: false;
7672
6524
  hasDefault: false;
7673
6525
  isPrimaryKey: false;
7674
6526
  isAutoincrement: false;
7675
6527
  hasRuntimeDefault: false;
7676
- enumValues: undefined;
7677
- baseColumn: never;
7678
- identity: undefined;
7679
- generated: undefined;
7680
- }, {}, {}>;
7681
- message: import("drizzle-orm/sqlite-core").SQLiteColumn<{
7682
- name: "message";
7683
- tableName: "document_sync_failures";
7684
- dataType: "string";
7685
- columnType: "SQLiteText";
7686
- data: string;
7687
- driverParam: string;
7688
- notNull: true;
7689
- hasDefault: false;
7690
- isPrimaryKey: false;
7691
- isAutoincrement: false;
7692
- hasRuntimeDefault: false;
7693
6528
  enumValues: [string, ...string[]];
7694
6529
  baseColumn: never;
7695
6530
  identity: undefined;
@@ -7697,9 +6532,9 @@ export declare const clientSQLiteSchema: {
7697
6532
  }, {}, {
7698
6533
  length: number | undefined;
7699
6534
  }>;
7700
- attemptedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
7701
- name: "attempted_at";
7702
- tableName: "document_sync_failures";
6535
+ updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6536
+ name: "updated_at";
6537
+ tableName: "documents";
7703
6538
  dataType: "string";
7704
6539
  columnType: "SQLiteText";
7705
6540
  data: string;