@tearleads/client-sdk 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/organizations/index.js +2 -2
- package/client/organizations/index.js.map +1 -1
- package/client/organizations/organizationHistory.js +66 -0
- package/client/organizations/organizationHistory.js.map +1 -0
- package/client/organizations/organizationReadModels.d.ts +1 -1
- package/client/organizations/organizationReadModels.js +7 -27
- package/client/organizations/organizationReadModels.js.map +1 -1
- package/client/organizations/organizationsTypes.d.ts +1 -1
- package/client/organizations/organizationsTypes.js.map +1 -1
- package/data/containers/shared/types.d.ts +2 -2
- package/data/containers/shared/types.js.map +1 -1
- package/data/documents/shared/syncSubmitFailure.d.ts +2 -2
- package/data/documents/shared/syncSubmitFailure.js.map +1 -1
- package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js +34 -8
- package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js.map +1 -1
- package/data/keyingProjectionVerification/documentPurgeDocumentChainVerification.js.map +1 -1
- package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js +17 -0
- package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js +55 -0
- package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js.map +1 -0
- package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js +25 -13
- package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js.map +1 -1
- package/data/keyingProjectionVerification/documentPurgeProofVerification.d.ts +5 -3
- package/data/keyingProjectionVerification/documentPurgeProofVerification.js +52 -8
- package/data/keyingProjectionVerification/documentPurgeProofVerification.js.map +1 -1
- package/data/keyingProjectionVerification/projectionPolicyEvidence.js.map +1 -1
- package/data/keyingProjectionVerification/types.d.ts +4 -0
- package/data/keyingProjectionVerification/types.js.map +1 -1
- package/data/persistence/organizations/organizationReadModelProjection.js +2 -2
- package/data/persistence/organizations/organizationReadModelProjection.js.map +1 -1
- package/data/persistence/principalAuthorizationCheckpoints.js +1 -1
- package/data/persistence/principalAuthorizationCheckpoints.js.map +1 -1
- package/data/persistence/principalCurrentAcknowledgementPersistence.d.ts +1 -0
- package/data/persistence/principalCurrentAcknowledgementPersistence.js +58 -12
- package/data/persistence/principalCurrentAcknowledgementPersistence.js.map +1 -1
- package/data/persistence/principalHistoryEvidencePersistence.d.ts +2 -0
- package/data/persistence/principalHistoryEvidencePersistence.js +2 -0
- package/data/persistence/principalHistoryEvidencePersistence.js.map +1 -1
- package/data/persistence/principalHistoryIncompleteRetention.js +32 -0
- package/data/persistence/principalHistoryIncompleteRetention.js.map +1 -0
- package/data/persistence/principalHistoryNodeRetention.js +76 -0
- package/data/persistence/principalHistoryNodeRetention.js.map +1 -0
- package/data/persistence/principalHistoryPrefixPersistence.d.ts +1 -0
- package/data/persistence/principalHistoryPrefixPersistence.js +30 -1
- package/data/persistence/principalHistoryPrefixPersistence.js.map +1 -1
- package/data/persistence/principalHistoryRootOwnership.js +71 -0
- package/data/persistence/principalHistoryRootOwnership.js.map +1 -0
- package/data/persistence/principalHistoryStagePersistence.js +45 -0
- package/data/persistence/principalHistoryStagePersistence.js.map +1 -1
- package/data/persistence/principalHistoryStageRetention.js +44 -0
- package/data/persistence/principalHistoryStageRetention.js.map +1 -0
- package/data/persistence/principalHistoryUnpublishedRetention.js +71 -0
- package/data/persistence/principalHistoryUnpublishedRetention.js.map +1 -0
- package/data/persistence/principalKeyEnvelopeArchivePersistence.js +63 -0
- package/data/persistence/principalKeyEnvelopeArchivePersistence.js.map +1 -0
- package/data/persistence/principalKeyEnvelopeCandidates.js +10 -1
- package/data/persistence/principalKeyEnvelopeCandidates.js.map +1 -1
- package/data/persistence/principalPolicyReferencePersistence.js +2 -2
- package/data/persistence/principalPolicyReferencePersistence.js.map +1 -1
- package/data/sqlite/principalHistoryEvidenceSchema.js +2 -0
- package/data/sqlite/principalHistoryEvidenceSchema.js.map +1 -1
- package/data/sqlite/principalHistoryNodeRetentionSchema.js +30 -0
- package/data/sqlite/principalHistoryNodeRetentionSchema.js.map +1 -0
- package/data/sqlite/principalHistoryRetentionSchema.js +40 -0
- package/data/sqlite/principalHistoryRetentionSchema.js.map +1 -0
- package/data/sqlite/principalHistoryStageSchema.js +2 -0
- package/data/sqlite/principalHistoryStageSchema.js.map +1 -1
- package/data/sqlite/schema.d.ts +453 -0
- package/data/sqlite/schema.js +6 -0
- package/data/sqlite/schema.js.map +1 -1
- package/data/sqlite/sqliteCommitGuards.js +49 -0
- package/data/sqlite/sqliteCommitGuards.js.map +1 -0
- package/data/sqlite/sqlitePersistenceRuntime.js +14 -2
- package/data/sqlite/sqlitePersistenceRuntime.js.map +1 -1
- package/index.d.ts +3 -1
- package/index.js.map +1 -1
- package/internal/api-client/ApiClient.d.ts +60 -137
- package/internal/api-client/ApiClient.js +7 -5
- package/internal/api-client/ApiClient.js.map +1 -1
- package/internal/api-client/apiRequestRuntime.js +7 -7
- package/internal/api-client/apiRequestRuntime.js.map +1 -1
- package/internal/api-client/documentPurge.js +25 -0
- package/internal/api-client/documentPurge.js.map +1 -0
- package/internal/api-client/organizationPolicyHistory.d.ts +53 -0
- package/internal/api-client/organizationPolicyHistory.js +15 -0
- package/internal/api-client/organizationPolicyHistory.js.map +1 -0
- package/internal/api-client/requestInternals.js +4 -4
- package/internal/api-client/requestInternals.js.map +1 -1
- package/internal/api-client/types.d.ts +2 -2
- package/internal/api-client/types.js.map +1 -1
- package/internal/crypto/keying/accessEvent.js +11 -9
- package/internal/crypto/keying/accessEvent.js.map +1 -1
- package/internal/crypto/keying/principalPolicyChainEntry.js +3 -0
- package/internal/crypto/keying/principalPolicyChainEntry.js.map +1 -1
- package/internal/crypto/keying/principalPolicyHistory.js +4 -0
- package/internal/crypto/keying/principalPolicyHistory.js.map +1 -1
- package/internal/crypto/keying/principalPolicyHistoryTypes.d.ts +2 -0
- package/internal/crypto/keying/principalPolicyHistoryTypes.js.map +1 -1
- package/internal/crypto/keying/principalPolicyTransition.d.ts +2 -1
- package/internal/crypto/keying/principalPolicyTransition.js +5 -0
- package/internal/crypto/keying/principalPolicyTransition.js.map +1 -1
- package/internal/crypto/principalState.js +2 -2
- package/internal/crypto/principalState.js.map +1 -1
- package/internal/validators/operation/containerMutations.d.ts +448 -6528
- package/internal/validators/operation/documentMutations.d.ts +323 -579
- package/internal/validators/operation/documentMutations.js +22 -4
- package/internal/validators/operation/documentMutations.js.map +1 -1
- package/internal/validators/operation/documentSync.d.ts +26 -406
- package/internal/validators/operation/organizationPolicyHistory.d.ts +188 -310
- package/internal/validators/operation/organizationPolicyHistory.js +17 -3
- package/internal/validators/operation/organizationPolicyHistory.js.map +1 -1
- package/internal/validators/operation/organizations.d.ts +2 -2
- package/internal/validators/request/principal.js +2 -2
- package/internal/validators/request/principal.js.map +1 -1
- package/internal/validators/response/containerMutationError.d.ts +28 -408
- package/internal/validators/response/documentMutation.d.ts +232 -544
- package/internal/validators/response/documentMutation.js +1 -2
- package/internal/validators/response/documentMutation.js.map +1 -1
- package/internal/validators/response/documentSyncError.d.ts +26 -406
- package/internal/validators/response/documentSyncError.js +4 -3
- package/internal/validators/response/documentSyncError.js.map +1 -1
- package/internal/validators/response/index.d.ts +1 -1
- package/internal/validators/response/index.js +1 -1
- package/internal/validators/response/index.js.map +1 -1
- package/internal/validators/response/organization.d.ts +1 -1
- package/internal/validators/response/organization.js +1 -1
- package/internal/validators/response/organization.js.map +1 -1
- package/internal/validators/response/organizationPolicyHistory.d.ts +127 -309
- package/internal/validators/response/organizationPolicyHistory.js +10 -4
- package/internal/validators/response/organizationPolicyHistory.js.map +1 -1
- package/internal/validators/response/organizationReadModel.d.ts +5 -5
- package/internal/validators/response/principal.d.ts +28 -408
- package/internal/validators/response/principal.js +3 -1
- package/internal/validators/response/principal.js.map +1 -1
- package/internal/validators/response/principalReference.d.ts +1 -1
- package/internal/validators/response/principalReference.js +1 -1
- package/internal/validators/response/principalReference.js.map +1 -1
- package/internal/validators/response/principalSnapshot.js +4 -4
- package/internal/validators/response/principalSnapshot.js.map +1 -1
- package/internal/validators/util/index.d.ts +1 -1
- package/internal/validators/util/index.js +1 -1
- package/internal/validators/util/index.js.map +1 -1
- package/internal/validators/util/principalHistoryWire.d.ts +2 -0
- package/internal/validators/util/principalHistoryWire.js +2 -0
- package/internal/validators/util/principalHistoryWire.js.map +1 -1
- package/package.json +1 -1
- package/workflows/container-contents/container-state/createWithMetadata.js +19 -49
- package/workflows/container-contents/container-state/createWithMetadata.js.map +1 -1
- package/workflows/container-contents/container-state/groupGrantVerification.js +29 -0
- package/workflows/container-contents/container-state/groupGrantVerification.js.map +1 -1
- package/workflows/container-contents/container-state/groupShareEpoch.js +33 -0
- package/workflows/container-contents/container-state/groupShareEpoch.js.map +1 -0
- package/workflows/container-contents/container-state/remote.js +4 -1
- package/workflows/container-contents/container-state/remote.js.map +1 -1
- package/workflows/container-contents/container-state/share.js +2 -24
- package/workflows/container-contents/container-state/share.js.map +1 -1
- package/workflows/container-contents/documentTombstoneEvidence.js +23 -12
- package/workflows/container-contents/documentTombstoneEvidence.js.map +1 -1
- package/workflows/containers/child/create.js +1 -3
- package/workflows/containers/child/create.js.map +1 -1
- package/workflows/containers/child/createSubmission.d.ts +1 -3
- package/workflows/containers/child/createSubmission.js +13 -15
- package/workflows/containers/child/createSubmission.js.map +1 -1
- package/workflows/containers/child/currentShareGrantMutation.js +82 -0
- package/workflows/containers/child/currentShareGrantMutation.js.map +1 -0
- package/workflows/containers/child/currentSharePrincipalPolicy.js +83 -0
- package/workflows/containers/child/currentSharePrincipalPolicy.js.map +1 -0
- package/workflows/containers/child/mutationSubmit.js +1 -1
- package/workflows/containers/child/mutationSubmit.js.map +1 -1
- package/workflows/containers/child/runtimeCurrentGroupShare.js +82 -0
- package/workflows/containers/child/runtimeCurrentGroupShare.js.map +1 -0
- package/workflows/containers/child/share.js +1 -14
- package/workflows/containers/child/share.js.map +1 -1
- package/workflows/containers/child/shareProjection.js +15 -0
- package/workflows/containers/child/shareProjection.js.map +1 -0
- package/workflows/containers/mutationResponse.js +1 -1
- package/workflows/containers/mutationResponse.js.map +1 -1
- package/workflows/documents/purge.d.ts +3 -0
- package/workflows/documents/purge.js +13 -0
- package/workflows/documents/purge.js.map +1 -1
- package/workflows/documents/sync.js +2 -0
- package/workflows/documents/sync.js.map +1 -1
- package/workflows/documents/syncFailures.js +2 -2
- package/workflows/documents/syncFailures.js.map +1 -1
- package/workflows/documents/syncPolicyRepair.js +15 -13
- package/workflows/documents/syncPolicyRepair.js.map +1 -1
- package/workflows/organizations/initialPrincipalCurrentPublication.js +2 -0
- package/workflows/organizations/initialPrincipalCurrentPublication.js.map +1 -1
- package/workflows/organizations/loadPolicyHistoryDetails.js +31 -32
- package/workflows/organizations/loadPolicyHistoryDetails.js.map +1 -1
- package/workflows/organizations/organizationPolicyHistoryDetails.js +37 -15
- package/workflows/organizations/organizationPolicyHistoryDetails.js.map +1 -1
- package/workflows/organizations/organizationPolicyHistoryVerification.js +56 -69
- package/workflows/organizations/organizationPolicyHistoryVerification.js.map +1 -1
- package/workflows/organizations/policyHistoryCache.js +5 -2
- package/workflows/organizations/policyHistoryCache.js.map +1 -1
- package/workflows/organizations/policyHistoryTypes.d.ts +1 -0
- package/workflows/organizations/policyHistoryTypes.js.map +1 -1
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js +4 -1
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js.map +1 -1
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.d.ts +0 -1
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.js +1 -2
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.js.map +1 -1
- package/workflows/principals/policyRepair.js +38 -0
- package/workflows/principals/policyRepair.js.map +1 -0
- package/workflows/principals/policyRepairBudget.d.ts +2 -2
- package/workflows/principals/policyRepairBudget.js +3 -3
- package/workflows/principals/policyRepairBudget.js.map +1 -1
- package/workflows/principals/principalHistoryRecoveryPrefix.js +4 -0
- package/workflows/principals/principalHistoryRecoveryPrefix.js.map +1 -1
- package/workflows/principals/principalRecoveryLocalPreference.js +3 -2
- package/workflows/principals/principalRecoveryLocalPreference.js.map +1 -1
- package/workflows/principals/publicPrincipalHistoryPage.js +1 -0
- package/workflows/principals/publicPrincipalHistoryPage.js.map +1 -1
- package/workflows/principals/publicPrincipalHistoryProgress.js +1 -0
- package/workflows/principals/publicPrincipalHistoryProgress.js.map +1 -1
- package/workflows/principals/publicPrincipalHistoryTypes.d.ts +2 -0
- package/workflows/principals/publicPrincipalHistoryTypes.js.map +1 -1
- package/workflows/principals/publicProjectionPrincipal.js +1 -0
- package/workflows/principals/publicProjectionPrincipal.js.map +1 -1
- package/workflows/principals/recoverPrincipalHistoryPage.js +2 -1
- package/workflows/principals/recoverPrincipalHistoryPage.js.map +1 -1
- package/workflows/principals/recoverPrincipalPolicyHistory.js +1 -0
- package/workflows/principals/recoverPrincipalPolicyHistory.js.map +1 -1
- package/workflows/principals/recoverPublicPrincipalHistory.js +2 -0
- package/workflows/principals/recoverPublicPrincipalHistory.js.map +1 -1
- package/workflows/principals/runtimePolicyRecovery.js +2 -1
- package/workflows/principals/runtimePolicyRecovery.js.map +1 -1
- package/workflows/principals/selectPublicPrincipalHistory.js +21 -15
- package/workflows/principals/selectPublicPrincipalHistory.js.map +1 -1
- package/workflows/sync/remoteResetPrincipalScope.js +6 -0
- package/workflows/sync/remoteResetPrincipalScope.js.map +1 -1
- package/data/keyingProjectionVerification/principalPolicySnapshotVerification.js +0 -208
- package/data/keyingProjectionVerification/principalPolicySnapshotVerification.js.map +0 -1
- package/data/keyingProjectionVerification/snapshotVerificationCache.js +0 -39
- package/data/keyingProjectionVerification/snapshotVerificationCache.js.map +0 -1
- package/workflows/containers/child/policyRepair.js +0 -23
- package/workflows/containers/child/policyRepair.js.map +0 -1
|
@@ -1,380 +1,198 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Display rows per private history page; the API also carries one predecessor. */
|
|
3
|
+
export declare const PRINCIPAL_DISPLAY_HISTORY_PAGE_SIZE = 32;
|
|
2
4
|
/** Signed evidence only. Display names are resolved on the client. */
|
|
3
5
|
export declare const OrganizationPolicyHistoryResponseSchema: z.ZodType<{
|
|
4
6
|
organizationId: string;
|
|
5
7
|
stateHash: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
userId: string;
|
|
23
|
-
}[];
|
|
24
|
-
currentState: {
|
|
25
|
-
createdAt: string;
|
|
26
|
-
encapsulationPublicKey: string;
|
|
27
|
-
externalAuthority: {
|
|
8
|
+
beforeVersion: number;
|
|
9
|
+
nextBeforeVersion: number | null;
|
|
10
|
+
evidence: {
|
|
11
|
+
organization: {
|
|
12
|
+
head: {
|
|
13
|
+
keyEpoch: number;
|
|
14
|
+
keyFingerprint: string;
|
|
15
|
+
principalId: string;
|
|
16
|
+
principalType: "group" | "organization";
|
|
17
|
+
stateHash: string;
|
|
18
|
+
version: number;
|
|
19
|
+
};
|
|
20
|
+
grant: string;
|
|
21
|
+
} | null;
|
|
22
|
+
organizationPayloads: {
|
|
23
|
+
reference: {
|
|
28
24
|
keyEpoch: number;
|
|
29
25
|
keyFingerprint: string;
|
|
30
26
|
principalId: string;
|
|
31
|
-
principalType: "group";
|
|
27
|
+
principalType: "group" | "organization";
|
|
32
28
|
stateHash: string;
|
|
33
29
|
version: number;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
memberCount: number;
|
|
40
|
-
memberEnvelopesRoot: string;
|
|
41
|
-
membershipMode: "projection";
|
|
42
|
-
membershipRoot: string;
|
|
43
|
-
payloadCiphertextHash: string;
|
|
44
|
-
prevStateHash: string | null;
|
|
45
|
-
principalId: string;
|
|
46
|
-
principalType: "group" | "organization";
|
|
47
|
-
projectionRoot: string;
|
|
48
|
-
signature: string;
|
|
49
|
-
signedAt: string;
|
|
50
|
-
signerUserId: string;
|
|
51
|
-
signerUserKeyFingerprint: string;
|
|
52
|
-
stateHash: string;
|
|
53
|
-
version: number;
|
|
54
|
-
};
|
|
55
|
-
previousStates: {
|
|
56
|
-
grants: {
|
|
57
|
-
accessLevel: "admin" | "read" | "write";
|
|
58
|
-
containerId: string;
|
|
59
|
-
}[];
|
|
60
|
-
projection: {
|
|
61
|
-
role: "member" | "admin";
|
|
62
|
-
userId: string;
|
|
63
|
-
}[];
|
|
64
|
-
state: {
|
|
30
|
+
};
|
|
31
|
+
payload: {
|
|
32
|
+
cipherSuite: "aes-256-gcm";
|
|
33
|
+
ciphertext: string;
|
|
34
|
+
ciphertextHash: string;
|
|
65
35
|
createdAt: string;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
version: number;
|
|
74
|
-
} | null;
|
|
75
|
-
grantCount: number;
|
|
76
|
-
grantRoot: string;
|
|
36
|
+
principalId: string;
|
|
37
|
+
principalType: "group" | "organization";
|
|
38
|
+
stateHash: string;
|
|
39
|
+
};
|
|
40
|
+
}[];
|
|
41
|
+
groups: {
|
|
42
|
+
head: {
|
|
77
43
|
keyEpoch: number;
|
|
78
44
|
keyFingerprint: string;
|
|
79
|
-
memberCount: number;
|
|
80
|
-
memberEnvelopesRoot: string;
|
|
81
|
-
membershipMode: "projection";
|
|
82
|
-
membershipRoot: string;
|
|
83
|
-
payloadCiphertextHash: string;
|
|
84
|
-
prevStateHash: string | null;
|
|
85
45
|
principalId: string;
|
|
86
46
|
principalType: "group" | "organization";
|
|
87
|
-
projectionRoot: string;
|
|
88
|
-
signature: string;
|
|
89
|
-
signedAt: string;
|
|
90
|
-
signerUserId: string;
|
|
91
|
-
signerUserKeyFingerprint: string;
|
|
92
47
|
stateHash: string;
|
|
93
48
|
version: number;
|
|
94
49
|
};
|
|
50
|
+
grant: string;
|
|
95
51
|
}[];
|
|
96
|
-
}
|
|
52
|
+
};
|
|
97
53
|
}, {
|
|
98
54
|
organizationId: string;
|
|
99
55
|
stateHash: string;
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
userId: string;
|
|
117
|
-
}[];
|
|
118
|
-
currentState: {
|
|
119
|
-
createdAt: string;
|
|
120
|
-
encapsulationPublicKey: string;
|
|
121
|
-
externalAuthority: {
|
|
56
|
+
beforeVersion: number;
|
|
57
|
+
nextBeforeVersion: number | null;
|
|
58
|
+
evidence: {
|
|
59
|
+
organization: {
|
|
60
|
+
head: {
|
|
61
|
+
keyEpoch: number;
|
|
62
|
+
keyFingerprint: string;
|
|
63
|
+
principalId: string;
|
|
64
|
+
principalType: "group" | "organization";
|
|
65
|
+
stateHash: string;
|
|
66
|
+
version: number;
|
|
67
|
+
};
|
|
68
|
+
grant: string;
|
|
69
|
+
} | null;
|
|
70
|
+
organizationPayloads: {
|
|
71
|
+
reference: {
|
|
122
72
|
keyEpoch: number;
|
|
123
73
|
keyFingerprint: string;
|
|
124
74
|
principalId: string;
|
|
125
|
-
principalType: "group";
|
|
75
|
+
principalType: "group" | "organization";
|
|
126
76
|
stateHash: string;
|
|
127
77
|
version: number;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
memberCount: number;
|
|
134
|
-
memberEnvelopesRoot: string;
|
|
135
|
-
membershipMode: "projection";
|
|
136
|
-
membershipRoot: string;
|
|
137
|
-
payloadCiphertextHash: string;
|
|
138
|
-
prevStateHash: string | null;
|
|
139
|
-
principalId: string;
|
|
140
|
-
principalType: "group" | "organization";
|
|
141
|
-
projectionRoot: string;
|
|
142
|
-
signature: string;
|
|
143
|
-
signedAt: string;
|
|
144
|
-
signerUserId: string;
|
|
145
|
-
signerUserKeyFingerprint: string;
|
|
146
|
-
stateHash: string;
|
|
147
|
-
version: number;
|
|
148
|
-
};
|
|
149
|
-
previousStates: {
|
|
150
|
-
grants: {
|
|
151
|
-
accessLevel: "admin" | "read" | "write";
|
|
152
|
-
containerId: string;
|
|
153
|
-
}[];
|
|
154
|
-
projection: {
|
|
155
|
-
role: "member" | "admin";
|
|
156
|
-
userId: string;
|
|
157
|
-
}[];
|
|
158
|
-
state: {
|
|
78
|
+
};
|
|
79
|
+
payload: {
|
|
80
|
+
cipherSuite: "aes-256-gcm";
|
|
81
|
+
ciphertext: string;
|
|
82
|
+
ciphertextHash: string;
|
|
159
83
|
createdAt: string;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
version: number;
|
|
168
|
-
} | null;
|
|
169
|
-
grantCount: number;
|
|
170
|
-
grantRoot: string;
|
|
84
|
+
principalId: string;
|
|
85
|
+
principalType: "group" | "organization";
|
|
86
|
+
stateHash: string;
|
|
87
|
+
};
|
|
88
|
+
}[];
|
|
89
|
+
groups: {
|
|
90
|
+
head: {
|
|
171
91
|
keyEpoch: number;
|
|
172
92
|
keyFingerprint: string;
|
|
173
|
-
memberCount: number;
|
|
174
|
-
memberEnvelopesRoot: string;
|
|
175
|
-
membershipMode: "projection";
|
|
176
|
-
membershipRoot: string;
|
|
177
|
-
payloadCiphertextHash: string;
|
|
178
|
-
prevStateHash: string | null;
|
|
179
93
|
principalId: string;
|
|
180
94
|
principalType: "group" | "organization";
|
|
181
|
-
projectionRoot: string;
|
|
182
|
-
signature: string;
|
|
183
|
-
signedAt: string;
|
|
184
|
-
signerUserId: string;
|
|
185
|
-
signerUserKeyFingerprint: string;
|
|
186
95
|
stateHash: string;
|
|
187
96
|
version: number;
|
|
188
97
|
};
|
|
98
|
+
grant: string;
|
|
189
99
|
}[];
|
|
190
|
-
}
|
|
100
|
+
};
|
|
191
101
|
}, z.core.$ZodTypeInternals<{
|
|
192
102
|
organizationId: string;
|
|
193
103
|
stateHash: string;
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
userId: string;
|
|
211
|
-
}[];
|
|
212
|
-
currentState: {
|
|
213
|
-
createdAt: string;
|
|
214
|
-
encapsulationPublicKey: string;
|
|
215
|
-
externalAuthority: {
|
|
104
|
+
beforeVersion: number;
|
|
105
|
+
nextBeforeVersion: number | null;
|
|
106
|
+
evidence: {
|
|
107
|
+
organization: {
|
|
108
|
+
head: {
|
|
109
|
+
keyEpoch: number;
|
|
110
|
+
keyFingerprint: string;
|
|
111
|
+
principalId: string;
|
|
112
|
+
principalType: "group" | "organization";
|
|
113
|
+
stateHash: string;
|
|
114
|
+
version: number;
|
|
115
|
+
};
|
|
116
|
+
grant: string;
|
|
117
|
+
} | null;
|
|
118
|
+
organizationPayloads: {
|
|
119
|
+
reference: {
|
|
216
120
|
keyEpoch: number;
|
|
217
121
|
keyFingerprint: string;
|
|
218
122
|
principalId: string;
|
|
219
|
-
principalType: "group";
|
|
123
|
+
principalType: "group" | "organization";
|
|
220
124
|
stateHash: string;
|
|
221
125
|
version: number;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
memberCount: number;
|
|
228
|
-
memberEnvelopesRoot: string;
|
|
229
|
-
membershipMode: "projection";
|
|
230
|
-
membershipRoot: string;
|
|
231
|
-
payloadCiphertextHash: string;
|
|
232
|
-
prevStateHash: string | null;
|
|
233
|
-
principalId: string;
|
|
234
|
-
principalType: "group" | "organization";
|
|
235
|
-
projectionRoot: string;
|
|
236
|
-
signature: string;
|
|
237
|
-
signedAt: string;
|
|
238
|
-
signerUserId: string;
|
|
239
|
-
signerUserKeyFingerprint: string;
|
|
240
|
-
stateHash: string;
|
|
241
|
-
version: number;
|
|
242
|
-
};
|
|
243
|
-
previousStates: {
|
|
244
|
-
grants: {
|
|
245
|
-
accessLevel: "admin" | "read" | "write";
|
|
246
|
-
containerId: string;
|
|
247
|
-
}[];
|
|
248
|
-
projection: {
|
|
249
|
-
role: "member" | "admin";
|
|
250
|
-
userId: string;
|
|
251
|
-
}[];
|
|
252
|
-
state: {
|
|
126
|
+
};
|
|
127
|
+
payload: {
|
|
128
|
+
cipherSuite: "aes-256-gcm";
|
|
129
|
+
ciphertext: string;
|
|
130
|
+
ciphertextHash: string;
|
|
253
131
|
createdAt: string;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
version: number;
|
|
262
|
-
} | null;
|
|
263
|
-
grantCount: number;
|
|
264
|
-
grantRoot: string;
|
|
132
|
+
principalId: string;
|
|
133
|
+
principalType: "group" | "organization";
|
|
134
|
+
stateHash: string;
|
|
135
|
+
};
|
|
136
|
+
}[];
|
|
137
|
+
groups: {
|
|
138
|
+
head: {
|
|
265
139
|
keyEpoch: number;
|
|
266
140
|
keyFingerprint: string;
|
|
267
|
-
memberCount: number;
|
|
268
|
-
memberEnvelopesRoot: string;
|
|
269
|
-
membershipMode: "projection";
|
|
270
|
-
membershipRoot: string;
|
|
271
|
-
payloadCiphertextHash: string;
|
|
272
|
-
prevStateHash: string | null;
|
|
273
141
|
principalId: string;
|
|
274
142
|
principalType: "group" | "organization";
|
|
275
|
-
projectionRoot: string;
|
|
276
|
-
signature: string;
|
|
277
|
-
signedAt: string;
|
|
278
|
-
signerUserId: string;
|
|
279
|
-
signerUserKeyFingerprint: string;
|
|
280
143
|
stateHash: string;
|
|
281
144
|
version: number;
|
|
282
145
|
};
|
|
146
|
+
grant: string;
|
|
283
147
|
}[];
|
|
284
|
-
}
|
|
148
|
+
};
|
|
285
149
|
}, {
|
|
286
150
|
organizationId: string;
|
|
287
151
|
stateHash: string;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
userId: string;
|
|
305
|
-
}[];
|
|
306
|
-
currentState: {
|
|
307
|
-
createdAt: string;
|
|
308
|
-
encapsulationPublicKey: string;
|
|
309
|
-
externalAuthority: {
|
|
152
|
+
beforeVersion: number;
|
|
153
|
+
nextBeforeVersion: number | null;
|
|
154
|
+
evidence: {
|
|
155
|
+
organization: {
|
|
156
|
+
head: {
|
|
157
|
+
keyEpoch: number;
|
|
158
|
+
keyFingerprint: string;
|
|
159
|
+
principalId: string;
|
|
160
|
+
principalType: "group" | "organization";
|
|
161
|
+
stateHash: string;
|
|
162
|
+
version: number;
|
|
163
|
+
};
|
|
164
|
+
grant: string;
|
|
165
|
+
} | null;
|
|
166
|
+
organizationPayloads: {
|
|
167
|
+
reference: {
|
|
310
168
|
keyEpoch: number;
|
|
311
169
|
keyFingerprint: string;
|
|
312
170
|
principalId: string;
|
|
313
|
-
principalType: "group";
|
|
171
|
+
principalType: "group" | "organization";
|
|
314
172
|
stateHash: string;
|
|
315
173
|
version: number;
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
memberCount: number;
|
|
322
|
-
memberEnvelopesRoot: string;
|
|
323
|
-
membershipMode: "projection";
|
|
324
|
-
membershipRoot: string;
|
|
325
|
-
payloadCiphertextHash: string;
|
|
326
|
-
prevStateHash: string | null;
|
|
327
|
-
principalId: string;
|
|
328
|
-
principalType: "group" | "organization";
|
|
329
|
-
projectionRoot: string;
|
|
330
|
-
signature: string;
|
|
331
|
-
signedAt: string;
|
|
332
|
-
signerUserId: string;
|
|
333
|
-
signerUserKeyFingerprint: string;
|
|
334
|
-
stateHash: string;
|
|
335
|
-
version: number;
|
|
336
|
-
};
|
|
337
|
-
previousStates: {
|
|
338
|
-
grants: {
|
|
339
|
-
accessLevel: "admin" | "read" | "write";
|
|
340
|
-
containerId: string;
|
|
341
|
-
}[];
|
|
342
|
-
projection: {
|
|
343
|
-
role: "member" | "admin";
|
|
344
|
-
userId: string;
|
|
345
|
-
}[];
|
|
346
|
-
state: {
|
|
174
|
+
};
|
|
175
|
+
payload: {
|
|
176
|
+
cipherSuite: "aes-256-gcm";
|
|
177
|
+
ciphertext: string;
|
|
178
|
+
ciphertextHash: string;
|
|
347
179
|
createdAt: string;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
version: number;
|
|
356
|
-
} | null;
|
|
357
|
-
grantCount: number;
|
|
358
|
-
grantRoot: string;
|
|
180
|
+
principalId: string;
|
|
181
|
+
principalType: "group" | "organization";
|
|
182
|
+
stateHash: string;
|
|
183
|
+
};
|
|
184
|
+
}[];
|
|
185
|
+
groups: {
|
|
186
|
+
head: {
|
|
359
187
|
keyEpoch: number;
|
|
360
188
|
keyFingerprint: string;
|
|
361
|
-
memberCount: number;
|
|
362
|
-
memberEnvelopesRoot: string;
|
|
363
|
-
membershipMode: "projection";
|
|
364
|
-
membershipRoot: string;
|
|
365
|
-
payloadCiphertextHash: string;
|
|
366
|
-
prevStateHash: string | null;
|
|
367
189
|
principalId: string;
|
|
368
190
|
principalType: "group" | "organization";
|
|
369
|
-
projectionRoot: string;
|
|
370
|
-
signature: string;
|
|
371
|
-
signedAt: string;
|
|
372
|
-
signerUserId: string;
|
|
373
|
-
signerUserKeyFingerprint: string;
|
|
374
191
|
stateHash: string;
|
|
375
192
|
version: number;
|
|
376
193
|
};
|
|
194
|
+
grant: string;
|
|
377
195
|
}[];
|
|
378
|
-
}
|
|
196
|
+
};
|
|
379
197
|
}>>;
|
|
380
198
|
export type OrganizationPolicyHistoryResponse = z.infer<typeof OrganizationPolicyHistoryResponseSchema>;
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { registerJsonSchemaFragment } from "../jsonSchema.js";
|
|
3
|
+
import { loosePlainObject, nonEmptyStringSchema } from "../schema.js";
|
|
4
|
+
import { ProjectionPolicyEvidenceResponseSchema } from "./projectionPolicyEvidence.js";
|
|
5
|
+
const cursorSchema = registerJsonSchemaFragment(z.custom((value) => typeof value === "number" && Number.isSafeInteger(value) && value >= 2), { type: "integer", minimum: 2, maximum: Number.MAX_SAFE_INTEGER });
|
|
6
|
+
/** Display rows per private history page; the API also carries one predecessor. */
|
|
7
|
+
export const PRINCIPAL_DISPLAY_HISTORY_PAGE_SIZE = 32;
|
|
3
8
|
/** Signed evidence only. Display names are resolved on the client. */
|
|
4
9
|
export const OrganizationPolicyHistoryResponseSchema = loosePlainObject({
|
|
5
10
|
organizationId: nonEmptyStringSchema,
|
|
6
11
|
stateHash: nonEmptyStringSchema,
|
|
7
|
-
|
|
8
|
-
|
|
12
|
+
beforeVersion: cursorSchema,
|
|
13
|
+
nextBeforeVersion: cursorSchema.nullable(),
|
|
14
|
+
evidence: ProjectionPolicyEvidenceResponseSchema,
|
|
9
15
|
});
|
|
10
16
|
//# sourceMappingURL=organizationPolicyHistory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizationPolicyHistory.js","sourceRoot":"","sources":["organizationPolicyHistory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"organizationPolicyHistory.js","sourceRoot":"","sources":["organizationPolicyHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAAE,sCAAsC,EAAE,MAAM,4BAA4B,CAAC;AAEpF,MAAM,YAAY,GAAG,0BAA0B,CAC7C,CAAC,CAAC,MAAM,CACN,CAAC,KAAK,EAAE,EAAE,CACR,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CACzE,EACD,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAClE,CAAC;AAEF,mFAAmF;AACnF,MAAM,CAAC,MAAM,mCAAmC,GAAG,EAAE,CAAC;AAEtD,sEAAsE;AACtE,MAAM,CAAC,MAAM,uCAAuC,GAAG,gBAAgB,CAAC;IACtE,cAAc,EAAE,oBAAoB;IACpC,SAAS,EAAE,oBAAoB;IAC/B,aAAa,EAAE,YAAY;IAC3B,iBAAiB,EAAE,YAAY,CAAC,QAAQ,EAAE;IAC1C,QAAQ,EAAE,sCAAsC;CACjD,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { registerJsonSchemaFragment } from \"../jsonSchema\";\nimport { loosePlainObject, nonEmptyStringSchema } from \"../schema\";\nimport { ProjectionPolicyEvidenceResponseSchema } from \"./projectionPolicyEvidence\";\n\nconst cursorSchema = registerJsonSchemaFragment(\n z.custom<number>(\n (value) =>\n typeof value === \"number\" && Number.isSafeInteger(value) && value >= 2,\n ),\n { type: \"integer\", minimum: 2, maximum: Number.MAX_SAFE_INTEGER },\n);\n\n/** Display rows per private history page; the API also carries one predecessor. */\nexport const PRINCIPAL_DISPLAY_HISTORY_PAGE_SIZE = 32;\n\n/** Signed evidence only. Display names are resolved on the client. */\nexport const OrganizationPolicyHistoryResponseSchema = loosePlainObject({\n organizationId: nonEmptyStringSchema,\n stateHash: nonEmptyStringSchema,\n beforeVersion: cursorSchema,\n nextBeforeVersion: cursorSchema.nullable(),\n evidence: ProjectionPolicyEvidenceResponseSchema,\n});\n\nexport type OrganizationPolicyHistoryResponse = z.infer<\n typeof OrganizationPolicyHistoryResponseSchema\n>;\n"]}
|
|
@@ -123,7 +123,7 @@ export type OrganizationReadModelGroupMembershipsResponse = z.infer<typeof Organ
|
|
|
123
123
|
declare const OrganizationReadModelOrganizationPolicyResponseSchema: z.ZodObject<{
|
|
124
124
|
currentState: z.ZodObject<{
|
|
125
125
|
stateHash: z.ZodString;
|
|
126
|
-
keyEpoch: z.
|
|
126
|
+
keyEpoch: z.ZodCustom<number, number>;
|
|
127
127
|
keyFingerprint: z.ZodString;
|
|
128
128
|
memberCount: z.ZodCustom<number, number>;
|
|
129
129
|
version: z.ZodCustom<number, number>;
|
|
@@ -264,7 +264,7 @@ declare const OrganizationReadModelSnapshotResponseSchema: z.ZodObject<{
|
|
|
264
264
|
organizationPolicy: z.ZodObject<{
|
|
265
265
|
currentState: z.ZodObject<{
|
|
266
266
|
stateHash: z.ZodString;
|
|
267
|
-
keyEpoch: z.
|
|
267
|
+
keyEpoch: z.ZodCustom<number, number>;
|
|
268
268
|
keyFingerprint: z.ZodString;
|
|
269
269
|
memberCount: z.ZodCustom<number, number>;
|
|
270
270
|
version: z.ZodCustom<number, number>;
|
|
@@ -413,7 +413,7 @@ declare const OrganizationReadModelDeltaResponseSchema: z.ZodObject<{
|
|
|
413
413
|
organizationPolicy: z.ZodOptional<z.ZodObject<{
|
|
414
414
|
currentState: z.ZodObject<{
|
|
415
415
|
stateHash: z.ZodString;
|
|
416
|
-
keyEpoch: z.
|
|
416
|
+
keyEpoch: z.ZodCustom<number, number>;
|
|
417
417
|
keyFingerprint: z.ZodString;
|
|
418
418
|
memberCount: z.ZodCustom<number, number>;
|
|
419
419
|
version: z.ZodCustom<number, number>;
|
|
@@ -563,7 +563,7 @@ export declare const OrganizationReadModelResponseSchema: z.ZodDiscriminatedUnio
|
|
|
563
563
|
organizationPolicy: z.ZodOptional<z.ZodObject<{
|
|
564
564
|
currentState: z.ZodObject<{
|
|
565
565
|
stateHash: z.ZodString;
|
|
566
|
-
keyEpoch: z.
|
|
566
|
+
keyEpoch: z.ZodCustom<number, number>;
|
|
567
567
|
keyFingerprint: z.ZodString;
|
|
568
568
|
memberCount: z.ZodCustom<number, number>;
|
|
569
569
|
version: z.ZodCustom<number, number>;
|
|
@@ -712,7 +712,7 @@ export declare const OrganizationReadModelResponseSchema: z.ZodDiscriminatedUnio
|
|
|
712
712
|
organizationPolicy: z.ZodObject<{
|
|
713
713
|
currentState: z.ZodObject<{
|
|
714
714
|
stateHash: z.ZodString;
|
|
715
|
-
keyEpoch: z.
|
|
715
|
+
keyEpoch: z.ZodCustom<number, number>;
|
|
716
716
|
keyFingerprint: z.ZodString;
|
|
717
717
|
memberCount: z.ZodCustom<number, number>;
|
|
718
718
|
version: z.ZodCustom<number, number>;
|