@tearleads/client-sdk 0.1.19 → 0.1.20

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 (211) hide show
  1. package/client/organizations/index.js +2 -2
  2. package/client/organizations/index.js.map +1 -1
  3. package/client/organizations/organizationHistory.js +66 -0
  4. package/client/organizations/organizationHistory.js.map +1 -0
  5. package/client/organizations/organizationReadModels.d.ts +1 -1
  6. package/client/organizations/organizationReadModels.js +7 -27
  7. package/client/organizations/organizationReadModels.js.map +1 -1
  8. package/client/organizations/organizationsTypes.d.ts +1 -1
  9. package/client/organizations/organizationsTypes.js.map +1 -1
  10. package/data/containers/shared/types.d.ts +2 -2
  11. package/data/containers/shared/types.js.map +1 -1
  12. package/data/documents/shared/syncSubmitFailure.d.ts +2 -2
  13. package/data/documents/shared/syncSubmitFailure.js.map +1 -1
  14. package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js +34 -8
  15. package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js.map +1 -1
  16. package/data/keyingProjectionVerification/documentPurgeDocumentChainVerification.js.map +1 -1
  17. package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js +17 -0
  18. package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js.map +1 -0
  19. package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js +55 -0
  20. package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js.map +1 -0
  21. package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js +25 -13
  22. package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js.map +1 -1
  23. package/data/keyingProjectionVerification/documentPurgeProofVerification.d.ts +5 -3
  24. package/data/keyingProjectionVerification/documentPurgeProofVerification.js +52 -8
  25. package/data/keyingProjectionVerification/documentPurgeProofVerification.js.map +1 -1
  26. package/data/keyingProjectionVerification/projectionPolicyEvidence.js.map +1 -1
  27. package/data/keyingProjectionVerification/types.d.ts +4 -0
  28. package/data/keyingProjectionVerification/types.js.map +1 -1
  29. package/data/persistence/principalAuthorizationCheckpoints.js +1 -1
  30. package/data/persistence/principalAuthorizationCheckpoints.js.map +1 -1
  31. package/data/persistence/principalCurrentAcknowledgementPersistence.d.ts +1 -0
  32. package/data/persistence/principalCurrentAcknowledgementPersistence.js +58 -12
  33. package/data/persistence/principalCurrentAcknowledgementPersistence.js.map +1 -1
  34. package/data/persistence/principalHistoryEvidencePersistence.d.ts +2 -0
  35. package/data/persistence/principalHistoryEvidencePersistence.js +2 -0
  36. package/data/persistence/principalHistoryEvidencePersistence.js.map +1 -1
  37. package/data/persistence/principalHistoryIncompleteRetention.js +32 -0
  38. package/data/persistence/principalHistoryIncompleteRetention.js.map +1 -0
  39. package/data/persistence/principalHistoryNodeRetention.js +76 -0
  40. package/data/persistence/principalHistoryNodeRetention.js.map +1 -0
  41. package/data/persistence/principalHistoryPrefixPersistence.d.ts +1 -0
  42. package/data/persistence/principalHistoryPrefixPersistence.js +30 -1
  43. package/data/persistence/principalHistoryPrefixPersistence.js.map +1 -1
  44. package/data/persistence/principalHistoryRootOwnership.js +71 -0
  45. package/data/persistence/principalHistoryRootOwnership.js.map +1 -0
  46. package/data/persistence/principalHistoryStagePersistence.js +45 -0
  47. package/data/persistence/principalHistoryStagePersistence.js.map +1 -1
  48. package/data/persistence/principalHistoryStageRetention.js +44 -0
  49. package/data/persistence/principalHistoryStageRetention.js.map +1 -0
  50. package/data/persistence/principalHistoryUnpublishedRetention.js +71 -0
  51. package/data/persistence/principalHistoryUnpublishedRetention.js.map +1 -0
  52. package/data/persistence/principalKeyEnvelopeArchivePersistence.js +63 -0
  53. package/data/persistence/principalKeyEnvelopeArchivePersistence.js.map +1 -0
  54. package/data/persistence/principalKeyEnvelopeCandidates.js +10 -1
  55. package/data/persistence/principalKeyEnvelopeCandidates.js.map +1 -1
  56. package/data/sqlite/principalHistoryEvidenceSchema.js +2 -0
  57. package/data/sqlite/principalHistoryEvidenceSchema.js.map +1 -1
  58. package/data/sqlite/principalHistoryNodeRetentionSchema.js +30 -0
  59. package/data/sqlite/principalHistoryNodeRetentionSchema.js.map +1 -0
  60. package/data/sqlite/principalHistoryRetentionSchema.js +40 -0
  61. package/data/sqlite/principalHistoryRetentionSchema.js.map +1 -0
  62. package/data/sqlite/principalHistoryStageSchema.js +2 -0
  63. package/data/sqlite/principalHistoryStageSchema.js.map +1 -1
  64. package/data/sqlite/schema.d.ts +453 -0
  65. package/data/sqlite/schema.js +6 -0
  66. package/data/sqlite/schema.js.map +1 -1
  67. package/data/sqlite/sqliteCommitGuards.js +49 -0
  68. package/data/sqlite/sqliteCommitGuards.js.map +1 -0
  69. package/data/sqlite/sqlitePersistenceRuntime.js +14 -2
  70. package/data/sqlite/sqlitePersistenceRuntime.js.map +1 -1
  71. package/index.d.ts +3 -1
  72. package/index.js.map +1 -1
  73. package/internal/api-client/ApiClient.d.ts +60 -137
  74. package/internal/api-client/ApiClient.js +7 -5
  75. package/internal/api-client/ApiClient.js.map +1 -1
  76. package/internal/api-client/apiRequestRuntime.js +7 -7
  77. package/internal/api-client/apiRequestRuntime.js.map +1 -1
  78. package/internal/api-client/documentPurge.js +25 -0
  79. package/internal/api-client/documentPurge.js.map +1 -0
  80. package/internal/api-client/organizationPolicyHistory.d.ts +53 -0
  81. package/internal/api-client/organizationPolicyHistory.js +15 -0
  82. package/internal/api-client/organizationPolicyHistory.js.map +1 -0
  83. package/internal/api-client/requestInternals.js +4 -4
  84. package/internal/api-client/requestInternals.js.map +1 -1
  85. package/internal/api-client/types.d.ts +2 -2
  86. package/internal/api-client/types.js.map +1 -1
  87. package/internal/crypto/keying/principalPolicyHistory.js +4 -0
  88. package/internal/crypto/keying/principalPolicyHistory.js.map +1 -1
  89. package/internal/crypto/keying/principalPolicyHistoryTypes.d.ts +2 -0
  90. package/internal/crypto/keying/principalPolicyHistoryTypes.js.map +1 -1
  91. package/internal/validators/operation/containerMutations.d.ts +448 -6528
  92. package/internal/validators/operation/documentMutations.d.ts +323 -579
  93. package/internal/validators/operation/documentMutations.js +22 -4
  94. package/internal/validators/operation/documentMutations.js.map +1 -1
  95. package/internal/validators/operation/documentSync.d.ts +26 -406
  96. package/internal/validators/operation/organizationPolicyHistory.d.ts +188 -310
  97. package/internal/validators/operation/organizationPolicyHistory.js +17 -3
  98. package/internal/validators/operation/organizationPolicyHistory.js.map +1 -1
  99. package/internal/validators/response/containerMutationError.d.ts +28 -408
  100. package/internal/validators/response/documentMutation.d.ts +232 -544
  101. package/internal/validators/response/documentMutation.js +1 -2
  102. package/internal/validators/response/documentMutation.js.map +1 -1
  103. package/internal/validators/response/documentSyncError.d.ts +26 -406
  104. package/internal/validators/response/documentSyncError.js +4 -3
  105. package/internal/validators/response/documentSyncError.js.map +1 -1
  106. package/internal/validators/response/index.d.ts +1 -1
  107. package/internal/validators/response/index.js +1 -1
  108. package/internal/validators/response/index.js.map +1 -1
  109. package/internal/validators/response/organizationPolicyHistory.d.ts +127 -309
  110. package/internal/validators/response/organizationPolicyHistory.js +10 -4
  111. package/internal/validators/response/organizationPolicyHistory.js.map +1 -1
  112. package/internal/validators/response/principal.d.ts +28 -408
  113. package/internal/validators/response/principal.js +3 -1
  114. package/internal/validators/response/principal.js.map +1 -1
  115. package/internal/validators/util/index.d.ts +1 -1
  116. package/internal/validators/util/index.js +1 -1
  117. package/internal/validators/util/index.js.map +1 -1
  118. package/internal/validators/util/principalHistoryWire.d.ts +2 -0
  119. package/internal/validators/util/principalHistoryWire.js +2 -0
  120. package/internal/validators/util/principalHistoryWire.js.map +1 -1
  121. package/package.json +1 -1
  122. package/workflows/container-contents/container-state/createWithMetadata.js +19 -49
  123. package/workflows/container-contents/container-state/createWithMetadata.js.map +1 -1
  124. package/workflows/container-contents/container-state/groupGrantVerification.js +29 -0
  125. package/workflows/container-contents/container-state/groupGrantVerification.js.map +1 -1
  126. package/workflows/container-contents/container-state/groupShareEpoch.js +33 -0
  127. package/workflows/container-contents/container-state/groupShareEpoch.js.map +1 -0
  128. package/workflows/container-contents/container-state/remote.js +4 -1
  129. package/workflows/container-contents/container-state/remote.js.map +1 -1
  130. package/workflows/container-contents/container-state/share.js +2 -24
  131. package/workflows/container-contents/container-state/share.js.map +1 -1
  132. package/workflows/container-contents/documentTombstoneEvidence.js +23 -12
  133. package/workflows/container-contents/documentTombstoneEvidence.js.map +1 -1
  134. package/workflows/containers/child/create.js +1 -3
  135. package/workflows/containers/child/create.js.map +1 -1
  136. package/workflows/containers/child/createSubmission.d.ts +1 -3
  137. package/workflows/containers/child/createSubmission.js +13 -15
  138. package/workflows/containers/child/createSubmission.js.map +1 -1
  139. package/workflows/containers/child/currentShareGrantMutation.js +82 -0
  140. package/workflows/containers/child/currentShareGrantMutation.js.map +1 -0
  141. package/workflows/containers/child/currentSharePrincipalPolicy.js +83 -0
  142. package/workflows/containers/child/currentSharePrincipalPolicy.js.map +1 -0
  143. package/workflows/containers/child/mutationSubmit.js +1 -1
  144. package/workflows/containers/child/mutationSubmit.js.map +1 -1
  145. package/workflows/containers/child/runtimeCurrentGroupShare.js +82 -0
  146. package/workflows/containers/child/runtimeCurrentGroupShare.js.map +1 -0
  147. package/workflows/containers/child/share.js +1 -14
  148. package/workflows/containers/child/share.js.map +1 -1
  149. package/workflows/containers/child/shareProjection.js +15 -0
  150. package/workflows/containers/child/shareProjection.js.map +1 -0
  151. package/workflows/documents/purge.d.ts +3 -0
  152. package/workflows/documents/purge.js +13 -0
  153. package/workflows/documents/purge.js.map +1 -1
  154. package/workflows/documents/sync.js +2 -0
  155. package/workflows/documents/sync.js.map +1 -1
  156. package/workflows/documents/syncFailures.js +2 -2
  157. package/workflows/documents/syncFailures.js.map +1 -1
  158. package/workflows/documents/syncPolicyRepair.js +15 -13
  159. package/workflows/documents/syncPolicyRepair.js.map +1 -1
  160. package/workflows/organizations/initialPrincipalCurrentPublication.js +2 -0
  161. package/workflows/organizations/initialPrincipalCurrentPublication.js.map +1 -1
  162. package/workflows/organizations/loadPolicyHistoryDetails.js +31 -32
  163. package/workflows/organizations/loadPolicyHistoryDetails.js.map +1 -1
  164. package/workflows/organizations/organizationPolicyHistoryDetails.js +37 -15
  165. package/workflows/organizations/organizationPolicyHistoryDetails.js.map +1 -1
  166. package/workflows/organizations/organizationPolicyHistoryVerification.js +56 -69
  167. package/workflows/organizations/organizationPolicyHistoryVerification.js.map +1 -1
  168. package/workflows/organizations/policyHistoryCache.js +5 -2
  169. package/workflows/organizations/policyHistoryCache.js.map +1 -1
  170. package/workflows/organizations/policyHistoryTypes.d.ts +1 -0
  171. package/workflows/organizations/policyHistoryTypes.js.map +1 -1
  172. package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js +4 -1
  173. package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js.map +1 -1
  174. package/workflows/principals/loadRecoveredPrincipalHistoryPage.d.ts +0 -1
  175. package/workflows/principals/loadRecoveredPrincipalHistoryPage.js +1 -2
  176. package/workflows/principals/loadRecoveredPrincipalHistoryPage.js.map +1 -1
  177. package/workflows/principals/policyRepair.js +38 -0
  178. package/workflows/principals/policyRepair.js.map +1 -0
  179. package/workflows/principals/policyRepairBudget.d.ts +2 -2
  180. package/workflows/principals/policyRepairBudget.js +3 -3
  181. package/workflows/principals/policyRepairBudget.js.map +1 -1
  182. package/workflows/principals/principalHistoryRecoveryPrefix.js +4 -0
  183. package/workflows/principals/principalHistoryRecoveryPrefix.js.map +1 -1
  184. package/workflows/principals/principalRecoveryLocalPreference.js +3 -2
  185. package/workflows/principals/principalRecoveryLocalPreference.js.map +1 -1
  186. package/workflows/principals/publicPrincipalHistoryPage.js +1 -0
  187. package/workflows/principals/publicPrincipalHistoryPage.js.map +1 -1
  188. package/workflows/principals/publicPrincipalHistoryProgress.js +1 -0
  189. package/workflows/principals/publicPrincipalHistoryProgress.js.map +1 -1
  190. package/workflows/principals/publicPrincipalHistoryTypes.d.ts +2 -0
  191. package/workflows/principals/publicPrincipalHistoryTypes.js.map +1 -1
  192. package/workflows/principals/publicProjectionPrincipal.js +1 -0
  193. package/workflows/principals/publicProjectionPrincipal.js.map +1 -1
  194. package/workflows/principals/recoverPrincipalHistoryPage.js +2 -1
  195. package/workflows/principals/recoverPrincipalHistoryPage.js.map +1 -1
  196. package/workflows/principals/recoverPrincipalPolicyHistory.js +1 -0
  197. package/workflows/principals/recoverPrincipalPolicyHistory.js.map +1 -1
  198. package/workflows/principals/recoverPublicPrincipalHistory.js +2 -0
  199. package/workflows/principals/recoverPublicPrincipalHistory.js.map +1 -1
  200. package/workflows/principals/runtimePolicyRecovery.js +2 -1
  201. package/workflows/principals/runtimePolicyRecovery.js.map +1 -1
  202. package/workflows/principals/selectPublicPrincipalHistory.js +21 -15
  203. package/workflows/principals/selectPublicPrincipalHistory.js.map +1 -1
  204. package/workflows/sync/remoteResetPrincipalScope.js +6 -0
  205. package/workflows/sync/remoteResetPrincipalScope.js.map +1 -1
  206. package/data/keyingProjectionVerification/principalPolicySnapshotVerification.js +0 -208
  207. package/data/keyingProjectionVerification/principalPolicySnapshotVerification.js.map +0 -1
  208. package/data/keyingProjectionVerification/snapshotVerificationCache.js +0 -39
  209. package/data/keyingProjectionVerification/snapshotVerificationCache.js.map +0 -1
  210. package/workflows/containers/child/policyRepair.js +0 -23
  211. package/workflows/containers/child/policyRepair.js.map +0 -1
@@ -0,0 +1,40 @@
1
+ import { desc } from "drizzle-orm";
2
+ import { index, integer, primaryKey, sqliteTable, text, } from "drizzle-orm/sqlite-core";
3
+ import { defineSqlTableSchema } from "./sqlTableSchema.js";
4
+ /** Encrypted key candidates survive disposable progress reclamation. */
5
+ export const principalKeyEnvelopeArchive = sqliteTable("principal_key_envelope_archive", {
6
+ organizationId: text("organization_id").notNull(),
7
+ principalType: text("principal_type").notNull(),
8
+ principalId: text("principal_id").notNull(),
9
+ keyFingerprint: text("key_fingerprint").notNull(),
10
+ version: integer("version").notNull(),
11
+ envelopesJson: text("envelopes_json").notNull(),
12
+ }, (table) => [
13
+ primaryKey({
14
+ columns: [
15
+ table.organizationId,
16
+ table.principalType,
17
+ table.principalId,
18
+ table.keyFingerprint,
19
+ ],
20
+ }),
21
+ index("principal_key_envelope_archive_fingerprint_idx").on(table.keyFingerprint, table.version),
22
+ ]);
23
+ /** Scope and recency are eviction hints, never authenticated recovery state. */
24
+ export const principalHistoryStageScopes = sqliteTable("principal_history_stage_scopes", {
25
+ id: text("id").primaryKey(),
26
+ organizationId: text("organization_id").notNull(),
27
+ scopeId: text("scope_id").notNull(),
28
+ afterVersion: integer("after_version").notNull(),
29
+ complete: integer("complete", { mode: "boolean" }).notNull(),
30
+ touchedAt: integer("touched_at").notNull(),
31
+ }, (table) => [
32
+ index("principal_history_stage_scopes_scope_idx").on(table.scopeId, table.organizationId, table.complete, desc(table.afterVersion), desc(table.touchedAt), table.id),
33
+ index("principal_history_stage_scopes_organization_idx").on(table.organizationId),
34
+ index("principal_history_stage_scopes_incomplete_idx").on(table.scopeId, table.organizationId, table.complete, desc(table.touchedAt), table.id),
35
+ ]);
36
+ export const principalHistoryRetentionTables = [
37
+ defineSqlTableSchema(principalKeyEnvelopeArchive),
38
+ defineSqlTableSchema(principalHistoryStageScopes),
39
+ ];
40
+ //# sourceMappingURL=principalHistoryRetentionSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"principalHistoryRetentionSchema.js","sourceRoot":"","sources":["principalHistoryRetentionSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EACL,KAAK,EACL,OAAO,EACP,UAAU,EACV,WAAW,EACX,IAAI,GACL,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,wEAAwE;AACxE,MAAM,CAAC,MAAM,2BAA2B,GAAG,WAAW,CACpD,gCAAgC,EAChC;IACE,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE;IACjD,aAAa,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,EAAE;IAC/C,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE;IAC3C,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE;IACjD,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE;IACrC,aAAa,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,OAAO,EAAE;CAChD,EACD,CAAC,KAAK,EAAE,EAAE,CAAC;IACT,UAAU,CAAC;QACT,OAAO,EAAE;YACP,KAAK,CAAC,cAAc;YACpB,KAAK,CAAC,aAAa;YACnB,KAAK,CAAC,WAAW;YACjB,KAAK,CAAC,cAAc;SACrB;KACF,CAAC;IACF,KAAK,CAAC,gDAAgD,CAAC,CAAC,EAAE,CACxD,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,OAAO,CACd;CACF,CACF,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,2BAA2B,GAAG,WAAW,CACpD,gCAAgC,EAChC;IACE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE;IACjD,OAAO,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE;IACnC,YAAY,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;IAChD,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IAC5D,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,OAAO,EAAE;CAC3C,EACD,CAAC,KAAK,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,0CAA0C,CAAC,CAAC,EAAE,CAClD,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,QAAQ,EACd,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,EACxB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EACrB,KAAK,CAAC,EAAE,CACT;IACD,KAAK,CAAC,iDAAiD,CAAC,CAAC,EAAE,CACzD,KAAK,CAAC,cAAc,CACrB;IACD,KAAK,CAAC,+CAA+C,CAAC,CAAC,EAAE,CACvD,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,cAAc,EACpB,KAAK,CAAC,QAAQ,EACd,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EACrB,KAAK,CAAC,EAAE,CACT;CACF,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,oBAAoB,CAAC,2BAA2B,CAAC;IACjD,oBAAoB,CAAC,2BAA2B,CAAC;CAClD,CAAC","sourcesContent":["import { desc } from \"drizzle-orm\";\nimport {\n index,\n integer,\n primaryKey,\n sqliteTable,\n text,\n} from \"drizzle-orm/sqlite-core\";\nimport { defineSqlTableSchema } from \"./sqlTableSchema\";\n\n/** Encrypted key candidates survive disposable progress reclamation. */\nexport const principalKeyEnvelopeArchive = sqliteTable(\n \"principal_key_envelope_archive\",\n {\n organizationId: text(\"organization_id\").notNull(),\n principalType: text(\"principal_type\").notNull(),\n principalId: text(\"principal_id\").notNull(),\n keyFingerprint: text(\"key_fingerprint\").notNull(),\n version: integer(\"version\").notNull(),\n envelopesJson: text(\"envelopes_json\").notNull(),\n },\n (table) => [\n primaryKey({\n columns: [\n table.organizationId,\n table.principalType,\n table.principalId,\n table.keyFingerprint,\n ],\n }),\n index(\"principal_key_envelope_archive_fingerprint_idx\").on(\n table.keyFingerprint,\n table.version,\n ),\n ],\n);\n\n/** Scope and recency are eviction hints, never authenticated recovery state. */\nexport const principalHistoryStageScopes = sqliteTable(\n \"principal_history_stage_scopes\",\n {\n id: text(\"id\").primaryKey(),\n organizationId: text(\"organization_id\").notNull(),\n scopeId: text(\"scope_id\").notNull(),\n afterVersion: integer(\"after_version\").notNull(),\n complete: integer(\"complete\", { mode: \"boolean\" }).notNull(),\n touchedAt: integer(\"touched_at\").notNull(),\n },\n (table) => [\n index(\"principal_history_stage_scopes_scope_idx\").on(\n table.scopeId,\n table.organizationId,\n table.complete,\n desc(table.afterVersion),\n desc(table.touchedAt),\n table.id,\n ),\n index(\"principal_history_stage_scopes_organization_idx\").on(\n table.organizationId,\n ),\n index(\"principal_history_stage_scopes_incomplete_idx\").on(\n table.scopeId,\n table.organizationId,\n table.complete,\n desc(table.touchedAt),\n table.id,\n ),\n ],\n);\n\nexport const principalHistoryRetentionTables = [\n defineSqlTableSchema(principalKeyEnvelopeArchive),\n defineSqlTableSchema(principalHistoryStageScopes),\n];\n"]}
@@ -1,5 +1,6 @@
1
1
  import { desc } from "drizzle-orm";
2
2
  import { index, integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
3
+ import { principalHistoryRetentionTables } from "./principalHistoryRetentionSchema.js";
3
4
  import { principalCurrentFingerprintJson } from "./principalKeyFingerprintJson.js";
4
5
  import { defineSqlTableSchema } from "./sqlTableSchema.js";
5
6
  /** Provisional, locally authenticated verification work; never an app checkpoint. */
@@ -16,5 +17,6 @@ export const principalHistoryStages = sqliteTable("principal_history_stages", {
16
17
  ]);
17
18
  export const principalHistoryStageTables = [
18
19
  defineSqlTableSchema(principalHistoryStages),
20
+ ...principalHistoryRetentionTables,
19
21
  ];
20
22
  //# sourceMappingURL=principalHistoryStageSchema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"principalHistoryStageSchema.js","sourceRoot":"","sources":["principalHistoryStageSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,qFAAqF;AACrF,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAC/C,0BAA0B,EAC1B;IACE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE;IACjD,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE;IAC3C,YAAY,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;IAChD,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IAC5D,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE;CACrC,EACD,CAAC,KAAK,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,8CAA8C,CAAC,CAAC,EAAE,CACtD,+BAA+B,CAAC,KAAK,CAAC,WAAW,CAAC,EAClD,KAAK,CAAC,QAAQ,EACd,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CACzB;IACD,KAAK,CAAC,2CAA2C,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC;CAC5E,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,oBAAoB,CAAC,sBAAsB,CAAC;CAC7C,CAAC","sourcesContent":["import { desc } from \"drizzle-orm\";\nimport { index, integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { principalCurrentFingerprintJson } from \"./principalKeyFingerprintJson\";\nimport { defineSqlTableSchema } from \"./sqlTableSchema\";\n\n/** Provisional, locally authenticated verification work; never an app checkpoint. */\nexport const principalHistoryStages = sqliteTable(\n \"principal_history_stages\",\n {\n id: text(\"id\").primaryKey(),\n organizationId: text(\"organization_id\").notNull(),\n currentJson: text(\"current_json\").notNull(),\n afterVersion: integer(\"after_version\").notNull(),\n complete: integer(\"complete\", { mode: \"boolean\" }).notNull(),\n progress: text(\"progress\").notNull(),\n },\n (table) => [\n index(\"principal_history_stages_key_fingerprint_idx\").on(\n principalCurrentFingerprintJson(table.currentJson),\n table.complete,\n desc(table.afterVersion),\n ),\n index(\"principal_history_stages_organization_idx\").on(table.organizationId),\n ],\n);\n\nexport const principalHistoryStageTables = [\n defineSqlTableSchema(principalHistoryStages),\n];\n"]}
1
+ {"version":3,"file":"principalHistoryStageSchema.js","sourceRoot":"","sources":["principalHistoryStageSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAExD,qFAAqF;AACrF,MAAM,CAAC,MAAM,sBAAsB,GAAG,WAAW,CAC/C,0BAA0B,EAC1B;IACE,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE;IAC3B,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE;IACjD,WAAW,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,OAAO,EAAE;IAC3C,YAAY,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC,OAAO,EAAE;IAChD,QAAQ,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IAC5D,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE;CACrC,EACD,CAAC,KAAK,EAAE,EAAE,CAAC;IACT,KAAK,CAAC,8CAA8C,CAAC,CAAC,EAAE,CACtD,+BAA+B,CAAC,KAAK,CAAC,WAAW,CAAC,EAClD,KAAK,CAAC,QAAQ,EACd,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CACzB;IACD,KAAK,CAAC,2CAA2C,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC;CAC5E,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,oBAAoB,CAAC,sBAAsB,CAAC;IAC5C,GAAG,+BAA+B;CACnC,CAAC","sourcesContent":["import { desc } from \"drizzle-orm\";\nimport { index, integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\nimport { principalHistoryRetentionTables } from \"./principalHistoryRetentionSchema\";\nimport { principalCurrentFingerprintJson } from \"./principalKeyFingerprintJson\";\nimport { defineSqlTableSchema } from \"./sqlTableSchema\";\n\n/** Provisional, locally authenticated verification work; never an app checkpoint. */\nexport const principalHistoryStages = sqliteTable(\n \"principal_history_stages\",\n {\n id: text(\"id\").primaryKey(),\n organizationId: text(\"organization_id\").notNull(),\n currentJson: text(\"current_json\").notNull(),\n afterVersion: integer(\"after_version\").notNull(),\n complete: integer(\"complete\", { mode: \"boolean\" }).notNull(),\n progress: text(\"progress\").notNull(),\n },\n (table) => [\n index(\"principal_history_stages_key_fingerprint_idx\").on(\n principalCurrentFingerprintJson(table.currentJson),\n table.complete,\n desc(table.afterVersion),\n ),\n index(\"principal_history_stages_organization_idx\").on(table.organizationId),\n ],\n);\n\nexport const principalHistoryStageTables = [\n defineSqlTableSchema(principalHistoryStages),\n ...principalHistoryRetentionTables,\n];\n"]}
@@ -6510,6 +6510,459 @@ export declare const clientSQLiteSchema: {
6510
6510
  };
6511
6511
  dialect: "sqlite";
6512
6512
  }>;
6513
+ principalHistoryNodeReferences: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
6514
+ name: "principal_history_node_references";
6515
+ schema: undefined;
6516
+ columns: {
6517
+ scopeId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6518
+ name: "scope_id";
6519
+ tableName: "principal_history_node_references";
6520
+ dataType: "string";
6521
+ columnType: "SQLiteText";
6522
+ data: string;
6523
+ driverParam: string;
6524
+ notNull: true;
6525
+ hasDefault: false;
6526
+ isPrimaryKey: false;
6527
+ isAutoincrement: false;
6528
+ hasRuntimeDefault: false;
6529
+ enumValues: [string, ...string[]];
6530
+ baseColumn: never;
6531
+ identity: undefined;
6532
+ generated: undefined;
6533
+ }, {}, {
6534
+ length: number | undefined;
6535
+ }>;
6536
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6537
+ name: "organization_id";
6538
+ tableName: "principal_history_node_references";
6539
+ dataType: "string";
6540
+ columnType: "SQLiteText";
6541
+ data: string;
6542
+ driverParam: string;
6543
+ notNull: true;
6544
+ hasDefault: false;
6545
+ isPrimaryKey: false;
6546
+ isAutoincrement: false;
6547
+ hasRuntimeDefault: false;
6548
+ enumValues: [string, ...string[]];
6549
+ baseColumn: never;
6550
+ identity: undefined;
6551
+ generated: undefined;
6552
+ }, {}, {
6553
+ length: number | undefined;
6554
+ }>;
6555
+ hash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6556
+ name: "hash";
6557
+ tableName: "principal_history_node_references";
6558
+ dataType: "string";
6559
+ columnType: "SQLiteText";
6560
+ data: string;
6561
+ driverParam: string;
6562
+ notNull: true;
6563
+ hasDefault: false;
6564
+ isPrimaryKey: false;
6565
+ isAutoincrement: false;
6566
+ hasRuntimeDefault: false;
6567
+ enumValues: [string, ...string[]];
6568
+ baseColumn: never;
6569
+ identity: undefined;
6570
+ generated: undefined;
6571
+ }, {}, {
6572
+ length: number | undefined;
6573
+ }>;
6574
+ referenceCount: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6575
+ name: "reference_count";
6576
+ tableName: "principal_history_node_references";
6577
+ dataType: "number";
6578
+ columnType: "SQLiteInteger";
6579
+ data: number;
6580
+ driverParam: number;
6581
+ notNull: true;
6582
+ hasDefault: false;
6583
+ isPrimaryKey: false;
6584
+ isAutoincrement: false;
6585
+ hasRuntimeDefault: false;
6586
+ enumValues: undefined;
6587
+ baseColumn: never;
6588
+ identity: undefined;
6589
+ generated: undefined;
6590
+ }, {}, {}>;
6591
+ managed: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6592
+ name: "managed";
6593
+ tableName: "principal_history_node_references";
6594
+ dataType: "boolean";
6595
+ columnType: "SQLiteBoolean";
6596
+ data: boolean;
6597
+ driverParam: number;
6598
+ notNull: true;
6599
+ hasDefault: false;
6600
+ isPrimaryKey: false;
6601
+ isAutoincrement: false;
6602
+ hasRuntimeDefault: false;
6603
+ enumValues: undefined;
6604
+ baseColumn: never;
6605
+ identity: undefined;
6606
+ generated: undefined;
6607
+ }, {}, {}>;
6608
+ leftHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6609
+ name: "left_hash";
6610
+ tableName: "principal_history_node_references";
6611
+ dataType: "string";
6612
+ columnType: "SQLiteText";
6613
+ data: string;
6614
+ driverParam: string;
6615
+ notNull: false;
6616
+ hasDefault: false;
6617
+ isPrimaryKey: false;
6618
+ isAutoincrement: false;
6619
+ hasRuntimeDefault: false;
6620
+ enumValues: [string, ...string[]];
6621
+ baseColumn: never;
6622
+ identity: undefined;
6623
+ generated: undefined;
6624
+ }, {}, {
6625
+ length: number | undefined;
6626
+ }>;
6627
+ rightHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6628
+ name: "right_hash";
6629
+ tableName: "principal_history_node_references";
6630
+ dataType: "string";
6631
+ columnType: "SQLiteText";
6632
+ data: string;
6633
+ driverParam: string;
6634
+ notNull: false;
6635
+ hasDefault: false;
6636
+ isPrimaryKey: false;
6637
+ isAutoincrement: false;
6638
+ hasRuntimeDefault: false;
6639
+ enumValues: [string, ...string[]];
6640
+ baseColumn: never;
6641
+ identity: undefined;
6642
+ generated: undefined;
6643
+ }, {}, {
6644
+ length: number | undefined;
6645
+ }>;
6646
+ };
6647
+ dialect: "sqlite";
6648
+ }>;
6649
+ principalHistoryRootOwners: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
6650
+ name: "principal_history_root_owners";
6651
+ schema: undefined;
6652
+ columns: {
6653
+ id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6654
+ name: "id";
6655
+ tableName: "principal_history_root_owners";
6656
+ dataType: "string";
6657
+ columnType: "SQLiteText";
6658
+ data: string;
6659
+ driverParam: string;
6660
+ notNull: true;
6661
+ hasDefault: false;
6662
+ isPrimaryKey: true;
6663
+ isAutoincrement: false;
6664
+ hasRuntimeDefault: false;
6665
+ enumValues: [string, ...string[]];
6666
+ baseColumn: never;
6667
+ identity: undefined;
6668
+ generated: undefined;
6669
+ }, {}, {
6670
+ length: number | undefined;
6671
+ }>;
6672
+ scopeId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6673
+ name: "scope_id";
6674
+ tableName: "principal_history_root_owners";
6675
+ dataType: "string";
6676
+ columnType: "SQLiteText";
6677
+ data: string;
6678
+ driverParam: string;
6679
+ notNull: true;
6680
+ hasDefault: false;
6681
+ isPrimaryKey: false;
6682
+ isAutoincrement: false;
6683
+ hasRuntimeDefault: false;
6684
+ enumValues: [string, ...string[]];
6685
+ baseColumn: never;
6686
+ identity: undefined;
6687
+ generated: undefined;
6688
+ }, {}, {
6689
+ length: number | undefined;
6690
+ }>;
6691
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6692
+ name: "organization_id";
6693
+ tableName: "principal_history_root_owners";
6694
+ dataType: "string";
6695
+ columnType: "SQLiteText";
6696
+ data: string;
6697
+ driverParam: string;
6698
+ notNull: true;
6699
+ hasDefault: false;
6700
+ isPrimaryKey: false;
6701
+ isAutoincrement: false;
6702
+ hasRuntimeDefault: false;
6703
+ enumValues: [string, ...string[]];
6704
+ baseColumn: never;
6705
+ identity: undefined;
6706
+ generated: undefined;
6707
+ }, {}, {
6708
+ length: number | undefined;
6709
+ }>;
6710
+ rootHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6711
+ name: "root_hash";
6712
+ tableName: "principal_history_root_owners";
6713
+ dataType: "string";
6714
+ columnType: "SQLiteText";
6715
+ data: string;
6716
+ driverParam: string;
6717
+ notNull: true;
6718
+ hasDefault: false;
6719
+ isPrimaryKey: false;
6720
+ isAutoincrement: false;
6721
+ hasRuntimeDefault: false;
6722
+ enumValues: [string, ...string[]];
6723
+ baseColumn: never;
6724
+ identity: undefined;
6725
+ generated: undefined;
6726
+ }, {}, {
6727
+ length: number | undefined;
6728
+ }>;
6729
+ };
6730
+ dialect: "sqlite";
6731
+ }>;
6732
+ principalHistoryStageScopes: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
6733
+ name: "principal_history_stage_scopes";
6734
+ schema: undefined;
6735
+ columns: {
6736
+ id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6737
+ name: "id";
6738
+ tableName: "principal_history_stage_scopes";
6739
+ dataType: "string";
6740
+ columnType: "SQLiteText";
6741
+ data: string;
6742
+ driverParam: string;
6743
+ notNull: true;
6744
+ hasDefault: false;
6745
+ isPrimaryKey: true;
6746
+ isAutoincrement: false;
6747
+ hasRuntimeDefault: false;
6748
+ enumValues: [string, ...string[]];
6749
+ baseColumn: never;
6750
+ identity: undefined;
6751
+ generated: undefined;
6752
+ }, {}, {
6753
+ length: number | undefined;
6754
+ }>;
6755
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6756
+ name: "organization_id";
6757
+ tableName: "principal_history_stage_scopes";
6758
+ dataType: "string";
6759
+ columnType: "SQLiteText";
6760
+ data: string;
6761
+ driverParam: string;
6762
+ notNull: true;
6763
+ hasDefault: false;
6764
+ isPrimaryKey: false;
6765
+ isAutoincrement: false;
6766
+ hasRuntimeDefault: false;
6767
+ enumValues: [string, ...string[]];
6768
+ baseColumn: never;
6769
+ identity: undefined;
6770
+ generated: undefined;
6771
+ }, {}, {
6772
+ length: number | undefined;
6773
+ }>;
6774
+ scopeId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6775
+ name: "scope_id";
6776
+ tableName: "principal_history_stage_scopes";
6777
+ dataType: "string";
6778
+ columnType: "SQLiteText";
6779
+ data: string;
6780
+ driverParam: string;
6781
+ notNull: true;
6782
+ hasDefault: false;
6783
+ isPrimaryKey: false;
6784
+ isAutoincrement: false;
6785
+ hasRuntimeDefault: false;
6786
+ enumValues: [string, ...string[]];
6787
+ baseColumn: never;
6788
+ identity: undefined;
6789
+ generated: undefined;
6790
+ }, {}, {
6791
+ length: number | undefined;
6792
+ }>;
6793
+ afterVersion: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6794
+ name: "after_version";
6795
+ tableName: "principal_history_stage_scopes";
6796
+ dataType: "number";
6797
+ columnType: "SQLiteInteger";
6798
+ data: number;
6799
+ driverParam: number;
6800
+ notNull: true;
6801
+ hasDefault: false;
6802
+ isPrimaryKey: false;
6803
+ isAutoincrement: false;
6804
+ hasRuntimeDefault: false;
6805
+ enumValues: undefined;
6806
+ baseColumn: never;
6807
+ identity: undefined;
6808
+ generated: undefined;
6809
+ }, {}, {}>;
6810
+ complete: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6811
+ name: "complete";
6812
+ tableName: "principal_history_stage_scopes";
6813
+ dataType: "boolean";
6814
+ columnType: "SQLiteBoolean";
6815
+ data: boolean;
6816
+ driverParam: number;
6817
+ notNull: true;
6818
+ hasDefault: false;
6819
+ isPrimaryKey: false;
6820
+ isAutoincrement: false;
6821
+ hasRuntimeDefault: false;
6822
+ enumValues: undefined;
6823
+ baseColumn: never;
6824
+ identity: undefined;
6825
+ generated: undefined;
6826
+ }, {}, {}>;
6827
+ touchedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6828
+ name: "touched_at";
6829
+ tableName: "principal_history_stage_scopes";
6830
+ dataType: "number";
6831
+ columnType: "SQLiteInteger";
6832
+ data: number;
6833
+ driverParam: number;
6834
+ notNull: true;
6835
+ hasDefault: false;
6836
+ isPrimaryKey: false;
6837
+ isAutoincrement: false;
6838
+ hasRuntimeDefault: false;
6839
+ enumValues: undefined;
6840
+ baseColumn: never;
6841
+ identity: undefined;
6842
+ generated: undefined;
6843
+ }, {}, {}>;
6844
+ };
6845
+ dialect: "sqlite";
6846
+ }>;
6847
+ principalKeyEnvelopeArchive: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
6848
+ name: "principal_key_envelope_archive";
6849
+ schema: undefined;
6850
+ columns: {
6851
+ organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6852
+ name: "organization_id";
6853
+ tableName: "principal_key_envelope_archive";
6854
+ dataType: "string";
6855
+ columnType: "SQLiteText";
6856
+ data: string;
6857
+ driverParam: string;
6858
+ notNull: true;
6859
+ hasDefault: false;
6860
+ isPrimaryKey: false;
6861
+ isAutoincrement: false;
6862
+ hasRuntimeDefault: false;
6863
+ enumValues: [string, ...string[]];
6864
+ baseColumn: never;
6865
+ identity: undefined;
6866
+ generated: undefined;
6867
+ }, {}, {
6868
+ length: number | undefined;
6869
+ }>;
6870
+ principalType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6871
+ name: "principal_type";
6872
+ tableName: "principal_key_envelope_archive";
6873
+ dataType: "string";
6874
+ columnType: "SQLiteText";
6875
+ data: string;
6876
+ driverParam: string;
6877
+ notNull: true;
6878
+ hasDefault: false;
6879
+ isPrimaryKey: false;
6880
+ isAutoincrement: false;
6881
+ hasRuntimeDefault: false;
6882
+ enumValues: [string, ...string[]];
6883
+ baseColumn: never;
6884
+ identity: undefined;
6885
+ generated: undefined;
6886
+ }, {}, {
6887
+ length: number | undefined;
6888
+ }>;
6889
+ principalId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6890
+ name: "principal_id";
6891
+ tableName: "principal_key_envelope_archive";
6892
+ dataType: "string";
6893
+ columnType: "SQLiteText";
6894
+ data: string;
6895
+ driverParam: string;
6896
+ notNull: true;
6897
+ hasDefault: false;
6898
+ isPrimaryKey: false;
6899
+ isAutoincrement: false;
6900
+ hasRuntimeDefault: false;
6901
+ enumValues: [string, ...string[]];
6902
+ baseColumn: never;
6903
+ identity: undefined;
6904
+ generated: undefined;
6905
+ }, {}, {
6906
+ length: number | undefined;
6907
+ }>;
6908
+ keyFingerprint: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6909
+ name: "key_fingerprint";
6910
+ tableName: "principal_key_envelope_archive";
6911
+ dataType: "string";
6912
+ columnType: "SQLiteText";
6913
+ data: string;
6914
+ driverParam: string;
6915
+ notNull: true;
6916
+ hasDefault: false;
6917
+ isPrimaryKey: false;
6918
+ isAutoincrement: false;
6919
+ hasRuntimeDefault: false;
6920
+ enumValues: [string, ...string[]];
6921
+ baseColumn: never;
6922
+ identity: undefined;
6923
+ generated: undefined;
6924
+ }, {}, {
6925
+ length: number | undefined;
6926
+ }>;
6927
+ version: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6928
+ name: "version";
6929
+ tableName: "principal_key_envelope_archive";
6930
+ dataType: "number";
6931
+ columnType: "SQLiteInteger";
6932
+ data: number;
6933
+ driverParam: number;
6934
+ notNull: true;
6935
+ hasDefault: false;
6936
+ isPrimaryKey: false;
6937
+ isAutoincrement: false;
6938
+ hasRuntimeDefault: false;
6939
+ enumValues: undefined;
6940
+ baseColumn: never;
6941
+ identity: undefined;
6942
+ generated: undefined;
6943
+ }, {}, {}>;
6944
+ envelopesJson: import("drizzle-orm/sqlite-core").SQLiteColumn<{
6945
+ name: "envelopes_json";
6946
+ tableName: "principal_key_envelope_archive";
6947
+ dataType: "string";
6948
+ columnType: "SQLiteText";
6949
+ data: string;
6950
+ driverParam: string;
6951
+ notNull: true;
6952
+ hasDefault: false;
6953
+ isPrimaryKey: false;
6954
+ isAutoincrement: false;
6955
+ hasRuntimeDefault: false;
6956
+ enumValues: [string, ...string[]];
6957
+ baseColumn: never;
6958
+ identity: undefined;
6959
+ generated: undefined;
6960
+ }, {}, {
6961
+ length: number | undefined;
6962
+ }>;
6963
+ };
6964
+ dialect: "sqlite";
6965
+ }>;
6513
6966
  principalMutationJournal: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
6514
6967
  name: "principal_mutation_journal";
6515
6968
  schema: undefined;
@@ -12,6 +12,8 @@ import * as provisioningAttempt from "./organizationProvisioningAttemptSchema.js
12
12
  import { organizationReadModelSQLiteSchema, organizationReadModelTables, } from "./organizationReadModelTableRegistry.js";
13
13
  import { principalGrantRetirements } from "./principalGrantRetirementSchema.js";
14
14
  import { principalHistoryEntries, principalHistoryEvidenceTables, principalHistoryNodes, principalHistoryPrefixes, } from "./principalHistoryEvidenceSchema.js";
15
+ import { principalHistoryNodeReferences, principalHistoryRootOwners, } from "./principalHistoryNodeRetentionSchema.js";
16
+ import { principalHistoryStageScopes, principalKeyEnvelopeArchive, } from "./principalHistoryRetentionSchema.js";
15
17
  import { principalHistoryStages, principalHistoryStageTables, } from "./principalHistoryStageSchema.js";
16
18
  import { principalMutationJournal, principalMutationJournalTables, } from "./principalMutationJournalSchema.js";
17
19
  import { principalPolicies, principalPolicyBundleHistory, principalPolicyBundleReferences, principalPolicyCheckpoints, principalPolicyOrganizations, } from "./principalPolicySchema.js";
@@ -600,6 +602,10 @@ export const clientSqlTables = [
600
602
  ...provisioningAttempt.organizationProvisioningAttemptTables,
601
603
  ];
602
604
  export const clientSQLiteSchema = {
605
+ principalHistoryNodeReferences,
606
+ principalHistoryRootOwners,
607
+ principalHistoryStageScopes,
608
+ principalKeyEnvelopeArchive,
603
609
  principalMutationJournal,
604
610
  principalHistoryEntries,
605
611
  principalHistoryNodes,