@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
|
@@ -33,6 +33,15 @@ export declare const getOrganizationPolicyHistoryOperation: Omit<{
|
|
|
33
33
|
code: z.ZodLiteral<"organization_presentation_access_denied">;
|
|
34
34
|
error: z.ZodString;
|
|
35
35
|
}, z.core.$loose>;
|
|
36
|
+
readonly 409: z.ZodType<{
|
|
37
|
+
error: string;
|
|
38
|
+
}, {
|
|
39
|
+
error: string;
|
|
40
|
+
}, z.core.$ZodTypeInternals<{
|
|
41
|
+
error: string;
|
|
42
|
+
}, {
|
|
43
|
+
error: string;
|
|
44
|
+
}>>;
|
|
36
45
|
readonly 500: z.ZodType<{
|
|
37
46
|
error: string;
|
|
38
47
|
}, {
|
|
@@ -42,8 +51,25 @@ export declare const getOrganizationPolicyHistoryOperation: Omit<{
|
|
|
42
51
|
}, {
|
|
43
52
|
error: string;
|
|
44
53
|
}>>;
|
|
54
|
+
readonly 503: z.ZodType<{
|
|
55
|
+
error: string;
|
|
56
|
+
code?: "billing_checkout_no_active_members" | "billing_roster_over_capacity" | "principal_history_preparation_unavailable" | undefined;
|
|
57
|
+
committed?: boolean | undefined;
|
|
58
|
+
}, {
|
|
59
|
+
error: string;
|
|
60
|
+
code?: "billing_checkout_no_active_members" | "billing_roster_over_capacity" | "principal_history_preparation_unavailable" | undefined;
|
|
61
|
+
committed?: boolean | undefined;
|
|
62
|
+
}, z.core.$ZodTypeInternals<{
|
|
63
|
+
error: string;
|
|
64
|
+
code?: "billing_checkout_no_active_members" | "billing_roster_over_capacity" | "principal_history_preparation_unavailable" | undefined;
|
|
65
|
+
committed?: boolean | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
error: string;
|
|
68
|
+
code?: "billing_checkout_no_active_members" | "billing_roster_over_capacity" | "principal_history_preparation_unavailable" | undefined;
|
|
69
|
+
committed?: boolean | undefined;
|
|
70
|
+
}>>;
|
|
45
71
|
};
|
|
46
|
-
readonly failureStatuses: readonly [400, 401, 403, 404, 500];
|
|
72
|
+
readonly failureStatuses: readonly [400, 401, 403, 404, 409, 500, 503];
|
|
47
73
|
readonly id: "organizations.policyHistory.get";
|
|
48
74
|
readonly method: "GET";
|
|
49
75
|
readonly params: z.ZodObject<{
|
|
@@ -52,386 +78,212 @@ export declare const getOrganizationPolicyHistoryOperation: Omit<{
|
|
|
52
78
|
readonly path: "/organizations/{organizationId}/policy-history";
|
|
53
79
|
readonly query: z.ZodObject<{
|
|
54
80
|
stateHash: z.ZodString;
|
|
81
|
+
beforeVersion: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<number, string | number>>>;
|
|
55
82
|
}, z.core.$strict>;
|
|
56
83
|
readonly responses: {
|
|
57
84
|
readonly 200: z.ZodType<{
|
|
58
85
|
organizationId: string;
|
|
59
86
|
stateHash: string;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
userId: string;
|
|
77
|
-
}[];
|
|
78
|
-
currentState: {
|
|
79
|
-
createdAt: string;
|
|
80
|
-
encapsulationPublicKey: string;
|
|
81
|
-
externalAuthority: {
|
|
87
|
+
beforeVersion: number;
|
|
88
|
+
nextBeforeVersion: number | null;
|
|
89
|
+
evidence: {
|
|
90
|
+
organization: {
|
|
91
|
+
head: {
|
|
92
|
+
keyEpoch: number;
|
|
93
|
+
keyFingerprint: string;
|
|
94
|
+
principalId: string;
|
|
95
|
+
principalType: "group" | "organization";
|
|
96
|
+
stateHash: string;
|
|
97
|
+
version: number;
|
|
98
|
+
};
|
|
99
|
+
grant: string;
|
|
100
|
+
} | null;
|
|
101
|
+
organizationPayloads: {
|
|
102
|
+
reference: {
|
|
82
103
|
keyEpoch: number;
|
|
83
104
|
keyFingerprint: string;
|
|
84
105
|
principalId: string;
|
|
85
|
-
principalType: "group";
|
|
106
|
+
principalType: "group" | "organization";
|
|
86
107
|
stateHash: string;
|
|
87
108
|
version: number;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
memberCount: number;
|
|
94
|
-
memberEnvelopesRoot: string;
|
|
95
|
-
membershipMode: "projection";
|
|
96
|
-
membershipRoot: string;
|
|
97
|
-
payloadCiphertextHash: string;
|
|
98
|
-
prevStateHash: string | null;
|
|
99
|
-
principalId: string;
|
|
100
|
-
principalType: "group" | "organization";
|
|
101
|
-
projectionRoot: string;
|
|
102
|
-
signature: string;
|
|
103
|
-
signedAt: string;
|
|
104
|
-
signerUserId: string;
|
|
105
|
-
signerUserKeyFingerprint: string;
|
|
106
|
-
stateHash: string;
|
|
107
|
-
version: number;
|
|
108
|
-
};
|
|
109
|
-
previousStates: {
|
|
110
|
-
grants: {
|
|
111
|
-
accessLevel: "admin" | "read" | "write";
|
|
112
|
-
containerId: string;
|
|
113
|
-
}[];
|
|
114
|
-
projection: {
|
|
115
|
-
role: "member" | "admin";
|
|
116
|
-
userId: string;
|
|
117
|
-
}[];
|
|
118
|
-
state: {
|
|
109
|
+
};
|
|
110
|
+
payload: {
|
|
111
|
+
cipherSuite: "aes-256-gcm";
|
|
112
|
+
ciphertext: string;
|
|
113
|
+
ciphertextHash: string;
|
|
119
114
|
createdAt: string;
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
version: number;
|
|
128
|
-
} | null;
|
|
129
|
-
grantCount: number;
|
|
130
|
-
grantRoot: string;
|
|
115
|
+
principalId: string;
|
|
116
|
+
principalType: "group" | "organization";
|
|
117
|
+
stateHash: string;
|
|
118
|
+
};
|
|
119
|
+
}[];
|
|
120
|
+
groups: {
|
|
121
|
+
head: {
|
|
131
122
|
keyEpoch: number;
|
|
132
123
|
keyFingerprint: string;
|
|
133
|
-
memberCount: number;
|
|
134
|
-
memberEnvelopesRoot: string;
|
|
135
|
-
membershipMode: "projection";
|
|
136
|
-
membershipRoot: string;
|
|
137
|
-
payloadCiphertextHash: string;
|
|
138
|
-
prevStateHash: string | null;
|
|
139
124
|
principalId: string;
|
|
140
125
|
principalType: "group" | "organization";
|
|
141
|
-
projectionRoot: string;
|
|
142
|
-
signature: string;
|
|
143
|
-
signedAt: string;
|
|
144
|
-
signerUserId: string;
|
|
145
|
-
signerUserKeyFingerprint: string;
|
|
146
126
|
stateHash: string;
|
|
147
127
|
version: number;
|
|
148
128
|
};
|
|
129
|
+
grant: string;
|
|
149
130
|
}[];
|
|
150
|
-
}
|
|
131
|
+
};
|
|
151
132
|
}, {
|
|
152
133
|
organizationId: string;
|
|
153
134
|
stateHash: string;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
userId: string;
|
|
171
|
-
}[];
|
|
172
|
-
currentState: {
|
|
173
|
-
createdAt: string;
|
|
174
|
-
encapsulationPublicKey: string;
|
|
175
|
-
externalAuthority: {
|
|
135
|
+
beforeVersion: number;
|
|
136
|
+
nextBeforeVersion: number | null;
|
|
137
|
+
evidence: {
|
|
138
|
+
organization: {
|
|
139
|
+
head: {
|
|
140
|
+
keyEpoch: number;
|
|
141
|
+
keyFingerprint: string;
|
|
142
|
+
principalId: string;
|
|
143
|
+
principalType: "group" | "organization";
|
|
144
|
+
stateHash: string;
|
|
145
|
+
version: number;
|
|
146
|
+
};
|
|
147
|
+
grant: string;
|
|
148
|
+
} | null;
|
|
149
|
+
organizationPayloads: {
|
|
150
|
+
reference: {
|
|
176
151
|
keyEpoch: number;
|
|
177
152
|
keyFingerprint: string;
|
|
178
153
|
principalId: string;
|
|
179
|
-
principalType: "group";
|
|
154
|
+
principalType: "group" | "organization";
|
|
180
155
|
stateHash: string;
|
|
181
156
|
version: number;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
memberCount: number;
|
|
188
|
-
memberEnvelopesRoot: string;
|
|
189
|
-
membershipMode: "projection";
|
|
190
|
-
membershipRoot: string;
|
|
191
|
-
payloadCiphertextHash: string;
|
|
192
|
-
prevStateHash: string | null;
|
|
193
|
-
principalId: string;
|
|
194
|
-
principalType: "group" | "organization";
|
|
195
|
-
projectionRoot: string;
|
|
196
|
-
signature: string;
|
|
197
|
-
signedAt: string;
|
|
198
|
-
signerUserId: string;
|
|
199
|
-
signerUserKeyFingerprint: string;
|
|
200
|
-
stateHash: string;
|
|
201
|
-
version: number;
|
|
202
|
-
};
|
|
203
|
-
previousStates: {
|
|
204
|
-
grants: {
|
|
205
|
-
accessLevel: "admin" | "read" | "write";
|
|
206
|
-
containerId: string;
|
|
207
|
-
}[];
|
|
208
|
-
projection: {
|
|
209
|
-
role: "member" | "admin";
|
|
210
|
-
userId: string;
|
|
211
|
-
}[];
|
|
212
|
-
state: {
|
|
157
|
+
};
|
|
158
|
+
payload: {
|
|
159
|
+
cipherSuite: "aes-256-gcm";
|
|
160
|
+
ciphertext: string;
|
|
161
|
+
ciphertextHash: string;
|
|
213
162
|
createdAt: string;
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
version: number;
|
|
222
|
-
} | null;
|
|
223
|
-
grantCount: number;
|
|
224
|
-
grantRoot: string;
|
|
163
|
+
principalId: string;
|
|
164
|
+
principalType: "group" | "organization";
|
|
165
|
+
stateHash: string;
|
|
166
|
+
};
|
|
167
|
+
}[];
|
|
168
|
+
groups: {
|
|
169
|
+
head: {
|
|
225
170
|
keyEpoch: number;
|
|
226
171
|
keyFingerprint: string;
|
|
227
|
-
memberCount: number;
|
|
228
|
-
memberEnvelopesRoot: string;
|
|
229
|
-
membershipMode: "projection";
|
|
230
|
-
membershipRoot: string;
|
|
231
|
-
payloadCiphertextHash: string;
|
|
232
|
-
prevStateHash: string | null;
|
|
233
172
|
principalId: string;
|
|
234
173
|
principalType: "group" | "organization";
|
|
235
|
-
projectionRoot: string;
|
|
236
|
-
signature: string;
|
|
237
|
-
signedAt: string;
|
|
238
|
-
signerUserId: string;
|
|
239
|
-
signerUserKeyFingerprint: string;
|
|
240
174
|
stateHash: string;
|
|
241
175
|
version: number;
|
|
242
176
|
};
|
|
177
|
+
grant: string;
|
|
243
178
|
}[];
|
|
244
|
-
}
|
|
179
|
+
};
|
|
245
180
|
}, z.core.$ZodTypeInternals<{
|
|
246
181
|
organizationId: string;
|
|
247
182
|
stateHash: string;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
userId: string;
|
|
265
|
-
}[];
|
|
266
|
-
currentState: {
|
|
267
|
-
createdAt: string;
|
|
268
|
-
encapsulationPublicKey: string;
|
|
269
|
-
externalAuthority: {
|
|
183
|
+
beforeVersion: number;
|
|
184
|
+
nextBeforeVersion: number | null;
|
|
185
|
+
evidence: {
|
|
186
|
+
organization: {
|
|
187
|
+
head: {
|
|
188
|
+
keyEpoch: number;
|
|
189
|
+
keyFingerprint: string;
|
|
190
|
+
principalId: string;
|
|
191
|
+
principalType: "group" | "organization";
|
|
192
|
+
stateHash: string;
|
|
193
|
+
version: number;
|
|
194
|
+
};
|
|
195
|
+
grant: string;
|
|
196
|
+
} | null;
|
|
197
|
+
organizationPayloads: {
|
|
198
|
+
reference: {
|
|
270
199
|
keyEpoch: number;
|
|
271
200
|
keyFingerprint: string;
|
|
272
201
|
principalId: string;
|
|
273
|
-
principalType: "group";
|
|
202
|
+
principalType: "group" | "organization";
|
|
274
203
|
stateHash: string;
|
|
275
204
|
version: number;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
memberCount: number;
|
|
282
|
-
memberEnvelopesRoot: string;
|
|
283
|
-
membershipMode: "projection";
|
|
284
|
-
membershipRoot: string;
|
|
285
|
-
payloadCiphertextHash: string;
|
|
286
|
-
prevStateHash: string | null;
|
|
287
|
-
principalId: string;
|
|
288
|
-
principalType: "group" | "organization";
|
|
289
|
-
projectionRoot: string;
|
|
290
|
-
signature: string;
|
|
291
|
-
signedAt: string;
|
|
292
|
-
signerUserId: string;
|
|
293
|
-
signerUserKeyFingerprint: string;
|
|
294
|
-
stateHash: string;
|
|
295
|
-
version: number;
|
|
296
|
-
};
|
|
297
|
-
previousStates: {
|
|
298
|
-
grants: {
|
|
299
|
-
accessLevel: "admin" | "read" | "write";
|
|
300
|
-
containerId: string;
|
|
301
|
-
}[];
|
|
302
|
-
projection: {
|
|
303
|
-
role: "member" | "admin";
|
|
304
|
-
userId: string;
|
|
305
|
-
}[];
|
|
306
|
-
state: {
|
|
205
|
+
};
|
|
206
|
+
payload: {
|
|
207
|
+
cipherSuite: "aes-256-gcm";
|
|
208
|
+
ciphertext: string;
|
|
209
|
+
ciphertextHash: string;
|
|
307
210
|
createdAt: string;
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
version: number;
|
|
316
|
-
} | null;
|
|
317
|
-
grantCount: number;
|
|
318
|
-
grantRoot: string;
|
|
211
|
+
principalId: string;
|
|
212
|
+
principalType: "group" | "organization";
|
|
213
|
+
stateHash: string;
|
|
214
|
+
};
|
|
215
|
+
}[];
|
|
216
|
+
groups: {
|
|
217
|
+
head: {
|
|
319
218
|
keyEpoch: number;
|
|
320
219
|
keyFingerprint: string;
|
|
321
|
-
memberCount: number;
|
|
322
|
-
memberEnvelopesRoot: string;
|
|
323
|
-
membershipMode: "projection";
|
|
324
|
-
membershipRoot: string;
|
|
325
|
-
payloadCiphertextHash: string;
|
|
326
|
-
prevStateHash: string | null;
|
|
327
220
|
principalId: string;
|
|
328
221
|
principalType: "group" | "organization";
|
|
329
|
-
projectionRoot: string;
|
|
330
|
-
signature: string;
|
|
331
|
-
signedAt: string;
|
|
332
|
-
signerUserId: string;
|
|
333
|
-
signerUserKeyFingerprint: string;
|
|
334
222
|
stateHash: string;
|
|
335
223
|
version: number;
|
|
336
224
|
};
|
|
225
|
+
grant: string;
|
|
337
226
|
}[];
|
|
338
|
-
}
|
|
227
|
+
};
|
|
339
228
|
}, {
|
|
340
229
|
organizationId: string;
|
|
341
230
|
stateHash: string;
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
userId: string;
|
|
359
|
-
}[];
|
|
360
|
-
currentState: {
|
|
361
|
-
createdAt: string;
|
|
362
|
-
encapsulationPublicKey: string;
|
|
363
|
-
externalAuthority: {
|
|
231
|
+
beforeVersion: number;
|
|
232
|
+
nextBeforeVersion: number | null;
|
|
233
|
+
evidence: {
|
|
234
|
+
organization: {
|
|
235
|
+
head: {
|
|
236
|
+
keyEpoch: number;
|
|
237
|
+
keyFingerprint: string;
|
|
238
|
+
principalId: string;
|
|
239
|
+
principalType: "group" | "organization";
|
|
240
|
+
stateHash: string;
|
|
241
|
+
version: number;
|
|
242
|
+
};
|
|
243
|
+
grant: string;
|
|
244
|
+
} | null;
|
|
245
|
+
organizationPayloads: {
|
|
246
|
+
reference: {
|
|
364
247
|
keyEpoch: number;
|
|
365
248
|
keyFingerprint: string;
|
|
366
249
|
principalId: string;
|
|
367
|
-
principalType: "group";
|
|
250
|
+
principalType: "group" | "organization";
|
|
368
251
|
stateHash: string;
|
|
369
252
|
version: number;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
memberCount: number;
|
|
376
|
-
memberEnvelopesRoot: string;
|
|
377
|
-
membershipMode: "projection";
|
|
378
|
-
membershipRoot: string;
|
|
379
|
-
payloadCiphertextHash: string;
|
|
380
|
-
prevStateHash: string | null;
|
|
381
|
-
principalId: string;
|
|
382
|
-
principalType: "group" | "organization";
|
|
383
|
-
projectionRoot: string;
|
|
384
|
-
signature: string;
|
|
385
|
-
signedAt: string;
|
|
386
|
-
signerUserId: string;
|
|
387
|
-
signerUserKeyFingerprint: string;
|
|
388
|
-
stateHash: string;
|
|
389
|
-
version: number;
|
|
390
|
-
};
|
|
391
|
-
previousStates: {
|
|
392
|
-
grants: {
|
|
393
|
-
accessLevel: "admin" | "read" | "write";
|
|
394
|
-
containerId: string;
|
|
395
|
-
}[];
|
|
396
|
-
projection: {
|
|
397
|
-
role: "member" | "admin";
|
|
398
|
-
userId: string;
|
|
399
|
-
}[];
|
|
400
|
-
state: {
|
|
253
|
+
};
|
|
254
|
+
payload: {
|
|
255
|
+
cipherSuite: "aes-256-gcm";
|
|
256
|
+
ciphertext: string;
|
|
257
|
+
ciphertextHash: string;
|
|
401
258
|
createdAt: string;
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
version: number;
|
|
410
|
-
} | null;
|
|
411
|
-
grantCount: number;
|
|
412
|
-
grantRoot: string;
|
|
259
|
+
principalId: string;
|
|
260
|
+
principalType: "group" | "organization";
|
|
261
|
+
stateHash: string;
|
|
262
|
+
};
|
|
263
|
+
}[];
|
|
264
|
+
groups: {
|
|
265
|
+
head: {
|
|
413
266
|
keyEpoch: number;
|
|
414
267
|
keyFingerprint: string;
|
|
415
|
-
memberCount: number;
|
|
416
|
-
memberEnvelopesRoot: string;
|
|
417
|
-
membershipMode: "projection";
|
|
418
|
-
membershipRoot: string;
|
|
419
|
-
payloadCiphertextHash: string;
|
|
420
|
-
prevStateHash: string | null;
|
|
421
268
|
principalId: string;
|
|
422
269
|
principalType: "group" | "organization";
|
|
423
|
-
projectionRoot: string;
|
|
424
|
-
signature: string;
|
|
425
|
-
signedAt: string;
|
|
426
|
-
signerUserId: string;
|
|
427
|
-
signerUserKeyFingerprint: string;
|
|
428
270
|
stateHash: string;
|
|
429
271
|
version: number;
|
|
430
272
|
};
|
|
273
|
+
grant: string;
|
|
431
274
|
}[];
|
|
432
|
-
}
|
|
275
|
+
};
|
|
433
276
|
}>>;
|
|
277
|
+
readonly 202: z.ZodObject<{
|
|
278
|
+
code: z.ZodLiteral<"principal_history_preparation_pending">;
|
|
279
|
+
committed: z.ZodLiteral<false>;
|
|
280
|
+
progressToken: z.ZodCustom<string, string>;
|
|
281
|
+
}, z.core.$strict>;
|
|
434
282
|
};
|
|
283
|
+
readonly runtimeRefinements: readonly [{
|
|
284
|
+
readonly id: "response.principal-history-preparation-rollback";
|
|
285
|
+
readonly description: "A 503 with code principal_history_preparation_unavailable requires committed:false; other 503 responses do not guarantee rollback.";
|
|
286
|
+
}];
|
|
435
287
|
}, "failureResponses" | "failureStatuses"> & {
|
|
436
288
|
readonly failureResponses: {
|
|
437
289
|
readonly 400: z.ZodType<{
|
|
@@ -464,6 +316,15 @@ export declare const getOrganizationPolicyHistoryOperation: Omit<{
|
|
|
464
316
|
code: z.ZodLiteral<"organization_presentation_access_denied">;
|
|
465
317
|
error: z.ZodString;
|
|
466
318
|
}, z.core.$loose>;
|
|
319
|
+
readonly 409: z.ZodType<{
|
|
320
|
+
error: string;
|
|
321
|
+
}, {
|
|
322
|
+
error: string;
|
|
323
|
+
}, z.core.$ZodTypeInternals<{
|
|
324
|
+
error: string;
|
|
325
|
+
}, {
|
|
326
|
+
error: string;
|
|
327
|
+
}>>;
|
|
467
328
|
readonly 500: z.ZodType<{
|
|
468
329
|
error: string;
|
|
469
330
|
}, {
|
|
@@ -473,8 +334,25 @@ export declare const getOrganizationPolicyHistoryOperation: Omit<{
|
|
|
473
334
|
}, {
|
|
474
335
|
error: string;
|
|
475
336
|
}>>;
|
|
337
|
+
readonly 503: z.ZodType<{
|
|
338
|
+
error: string;
|
|
339
|
+
code?: "billing_checkout_no_active_members" | "billing_roster_over_capacity" | "principal_history_preparation_unavailable" | undefined;
|
|
340
|
+
committed?: boolean | undefined;
|
|
341
|
+
}, {
|
|
342
|
+
error: string;
|
|
343
|
+
code?: "billing_checkout_no_active_members" | "billing_roster_over_capacity" | "principal_history_preparation_unavailable" | undefined;
|
|
344
|
+
committed?: boolean | undefined;
|
|
345
|
+
}, z.core.$ZodTypeInternals<{
|
|
346
|
+
error: string;
|
|
347
|
+
code?: "billing_checkout_no_active_members" | "billing_roster_over_capacity" | "principal_history_preparation_unavailable" | undefined;
|
|
348
|
+
committed?: boolean | undefined;
|
|
349
|
+
}, {
|
|
350
|
+
error: string;
|
|
351
|
+
code?: "billing_checkout_no_active_members" | "billing_roster_over_capacity" | "principal_history_preparation_unavailable" | undefined;
|
|
352
|
+
committed?: boolean | undefined;
|
|
353
|
+
}>>;
|
|
476
354
|
} & {
|
|
477
355
|
readonly 503: typeof ErrorResponseSchema;
|
|
478
356
|
};
|
|
479
|
-
readonly failureStatuses: readonly [400, 401, 403, 404, 500] | readonly [400, 401, 403, 404, 500, 503];
|
|
357
|
+
readonly failureStatuses: readonly [400, 401, 403, 404, 409, 500, 503] | readonly [400, 401, 403, 404, 409, 500, 503, 503];
|
|
480
358
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { registerJsonSchemaFragment } from "../jsonSchema.js";
|
|
2
3
|
import { ErrorResponseSchema, OrganizationPolicyHistoryResponseSchema, OrganizationPresentationFailureResponseSchema, SessionFailureResponseSchema, } from "../response/index.js";
|
|
4
|
+
import { PrincipalHistoryPreparationFailureResponseSchema, PrincipalHistoryPreparationResponseSchema, principalHistoryRollbackRefinement, } from "../response/principalHistoryPreparation.js";
|
|
3
5
|
import { nonEmptyStringSchema } from "../schema.js";
|
|
4
6
|
import { defineJsonOperation } from "./definition.js";
|
|
5
7
|
import { OrganizationPathParamsSchema } from "./organizations.js";
|
|
8
|
+
import { PrincipalPolicyPageQuerySchema } from "./principalPolicyPageQuery.js";
|
|
6
9
|
export const getOrganizationPolicyHistoryOperation = defineJsonOperation({
|
|
7
10
|
auth: "session",
|
|
8
11
|
failureResponses: {
|
|
@@ -10,14 +13,25 @@ export const getOrganizationPolicyHistoryOperation = defineJsonOperation({
|
|
|
10
13
|
401: SessionFailureResponseSchema,
|
|
11
14
|
403: OrganizationPresentationFailureResponseSchema,
|
|
12
15
|
404: OrganizationPresentationFailureResponseSchema,
|
|
16
|
+
409: ErrorResponseSchema,
|
|
13
17
|
500: ErrorResponseSchema,
|
|
18
|
+
503: PrincipalHistoryPreparationFailureResponseSchema,
|
|
14
19
|
},
|
|
15
|
-
failureStatuses: [400, 401, 403, 404, 500],
|
|
20
|
+
failureStatuses: [400, 401, 403, 404, 409, 500, 503],
|
|
16
21
|
id: "organizations.policyHistory.get",
|
|
17
22
|
method: "GET",
|
|
18
23
|
params: OrganizationPathParamsSchema,
|
|
19
24
|
path: "/organizations/{organizationId}/policy-history",
|
|
20
|
-
query: z.strictObject({
|
|
21
|
-
|
|
25
|
+
query: z.strictObject({
|
|
26
|
+
stateHash: nonEmptyStringSchema,
|
|
27
|
+
beforeVersion: registerJsonSchemaFragment(PrincipalPolicyPageQuerySchema.shape.afterVersion
|
|
28
|
+
.unwrap()
|
|
29
|
+
.refine((value) => value >= 2), { type: "integer", minimum: 2, maximum: Number.MAX_SAFE_INTEGER }).optional(),
|
|
30
|
+
}),
|
|
31
|
+
responses: {
|
|
32
|
+
200: OrganizationPolicyHistoryResponseSchema,
|
|
33
|
+
202: PrincipalHistoryPreparationResponseSchema,
|
|
34
|
+
},
|
|
35
|
+
runtimeRefinements: [principalHistoryRollbackRefinement],
|
|
22
36
|
});
|
|
23
37
|
//# sourceMappingURL=organizationPolicyHistory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizationPolicyHistory.js","sourceRoot":"","sources":["organizationPolicyHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,uCAAuC,EACvC,6CAA6C,EAC7C,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;
|
|
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,EACL,mBAAmB,EACnB,uCAAuC,EACvC,6CAA6C,EAC7C,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gDAAgD,EAChD,yCAAyC,EACzC,kCAAkC,GACnC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAE5E,MAAM,CAAC,MAAM,qCAAqC,GAAG,mBAAmB,CAAC;IACvE,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE;QAChB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,6CAA6C;QAClD,GAAG,EAAE,6CAA6C;QAClD,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,gDAAgD;KACtD;IACD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IACpD,EAAE,EAAE,iCAAiC;IACrC,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,4BAA4B;IACpC,IAAI,EAAE,gDAAgD;IACtD,KAAK,EAAE,CAAC,CAAC,YAAY,CAAC;QACpB,SAAS,EAAE,oBAAoB;QAC/B,aAAa,EAAE,0BAA0B,CACvC,8BAA8B,CAAC,KAAK,CAAC,YAAY;aAC9C,MAAM,EAAE;aACR,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,EAChC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAClE,CAAC,QAAQ,EAAE;KACb,CAAC;IACF,SAAS,EAAE;QACT,GAAG,EAAE,uCAAuC;QAC5C,GAAG,EAAE,yCAAyC;KAC/C;IACD,kBAAkB,EAAE,CAAC,kCAAkC,CAAC;CACzD,CAAC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { registerJsonSchemaFragment } from \"../jsonSchema\";\nimport {\n ErrorResponseSchema,\n OrganizationPolicyHistoryResponseSchema,\n OrganizationPresentationFailureResponseSchema,\n SessionFailureResponseSchema,\n} from \"../response\";\nimport {\n PrincipalHistoryPreparationFailureResponseSchema,\n PrincipalHistoryPreparationResponseSchema,\n principalHistoryRollbackRefinement,\n} from \"../response/principalHistoryPreparation\";\nimport { nonEmptyStringSchema } from \"../schema\";\nimport { defineJsonOperation } from \"./definition\";\nimport { OrganizationPathParamsSchema } from \"./organizations\";\nimport { PrincipalPolicyPageQuerySchema } from \"./principalPolicyPageQuery\";\n\nexport const getOrganizationPolicyHistoryOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 403: OrganizationPresentationFailureResponseSchema,\n 404: OrganizationPresentationFailureResponseSchema,\n 409: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n 503: PrincipalHistoryPreparationFailureResponseSchema,\n },\n failureStatuses: [400, 401, 403, 404, 409, 500, 503],\n id: \"organizations.policyHistory.get\",\n method: \"GET\",\n params: OrganizationPathParamsSchema,\n path: \"/organizations/{organizationId}/policy-history\",\n query: z.strictObject({\n stateHash: nonEmptyStringSchema,\n beforeVersion: registerJsonSchemaFragment(\n PrincipalPolicyPageQuerySchema.shape.afterVersion\n .unwrap()\n .refine((value) => value >= 2),\n { type: \"integer\", minimum: 2, maximum: Number.MAX_SAFE_INTEGER },\n ).optional(),\n }),\n responses: {\n 200: OrganizationPolicyHistoryResponseSchema,\n 202: PrincipalHistoryPreparationResponseSchema,\n },\n runtimeRefinements: [principalHistoryRollbackRefinement],\n});\n"]}
|