@serve.zone/interfaces 25.1.0 → 25.2.0
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/changelog.md +19 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/secret.js +11 -4
- package/dist_ts/platform/index.d.ts +3 -1
- package/dist_ts/platform/index.js +4 -2
- package/dist_ts/platform/objectstorageretention.d.ts +63 -0
- package/dist_ts/platform/objectstorageretention.js +255 -0
- package/dist_ts/platform/types.d.ts +3 -0
- package/dist_ts/plugins.runtime.d.ts +2 -0
- package/dist_ts/plugins.runtime.js +4 -0
- package/dist_ts/requests/config.d.ts +3 -0
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.d.ts +394 -0
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.golden.d.ts +35 -0
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.golden.js +315 -0
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.js +1378 -0
- package/dist_ts/runtime.corestore.d.ts +204 -0
- package/dist_ts/runtime.corestore.js +620 -0
- package/dist_ts/runtime.d.ts +2 -0
- package/dist_ts/runtime.js +3 -1
- package/package.json +2 -2
- package/readme.md +37 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/secret.ts +12 -4
- package/ts/platform/index.ts +3 -0
- package/ts/platform/objectstorageretention.ts +372 -0
- package/ts/platform/types.ts +3 -0
- package/ts/plugins.runtime.ts +4 -0
- package/ts/requests/config.ts +3 -0
- package/ts/runtime.cloudlylegacydeploymentsettlement.golden.ts +421 -0
- package/ts/runtime.cloudlylegacydeploymentsettlement.ts +2884 -0
- package/ts/runtime.corestore.ts +909 -0
- package/ts/runtime.ts +2 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import * as plugins from './plugins.js';
|
|
2
|
+
import type { IActiveSecretRecipientMetadata, IIdentityCredential, ISecretVersionReference } from './data/index.js';
|
|
3
|
+
import type { ISecretEnvelopeAdmissionBindingV1 } from './runtime.js';
|
|
4
|
+
import type { IObjectStorageRetentionEvidenceExpectationV1, IObjectStorageRetentionEvidenceV1 } from './platform/objectstorageretention.js';
|
|
5
|
+
export type TCorestoreCredentialCapability = 'database' | 'objectstorage';
|
|
6
|
+
export declare const corestoreProviderConfigIds: Readonly<{
|
|
7
|
+
readonly database: "cloudly-corestore-database";
|
|
8
|
+
readonly objectstorage: "cloudly-corestore-objectstorage";
|
|
9
|
+
}>;
|
|
10
|
+
export declare const corestoreControlUrl: "http://corestore:3000";
|
|
11
|
+
export declare const corestoreCredentialManagementScope: "platform:cloudly-corestore";
|
|
12
|
+
export declare const corestoreControlCredentialKey: "CORESTORE_API_TOKEN";
|
|
13
|
+
export declare const corestoreCredentialEnvironment: "production";
|
|
14
|
+
export declare const corestoreCredentialRuntimeLimits: Readonly<{
|
|
15
|
+
maximumIdentifierLength: 200;
|
|
16
|
+
maximumPublicationGrants: 256;
|
|
17
|
+
maximumGrantLifetimeMs: number;
|
|
18
|
+
maximumCredentialStringBytes: number;
|
|
19
|
+
maximumSealedMaterialBytes: number;
|
|
20
|
+
minimumControlTokenBytes: 32;
|
|
21
|
+
maximumControlTokenBytes: 4096;
|
|
22
|
+
maximumSealedControlCredentialBytes: number;
|
|
23
|
+
}>;
|
|
24
|
+
export declare const getCorestoreProviderConfigId: (capabilityArg: TCorestoreCredentialCapability) => (typeof corestoreProviderConfigIds)[TCorestoreCredentialCapability];
|
|
25
|
+
export interface ICorestoreControlCredentialPlaintextV1 {
|
|
26
|
+
schemaVersion: 1;
|
|
27
|
+
key: typeof corestoreControlCredentialKey;
|
|
28
|
+
environment: typeof corestoreCredentialEnvironment;
|
|
29
|
+
value: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ICorestoreControlCredentialMaterialV1 {
|
|
32
|
+
schemaVersion: 1;
|
|
33
|
+
requestId: string;
|
|
34
|
+
clusterId: string;
|
|
35
|
+
capability: TCorestoreCredentialCapability;
|
|
36
|
+
providerConfigId: typeof corestoreProviderConfigIds[TCorestoreCredentialCapability];
|
|
37
|
+
controlUrl: typeof corestoreControlUrl;
|
|
38
|
+
managementScope: typeof corestoreCredentialManagementScope;
|
|
39
|
+
key: typeof corestoreControlCredentialKey;
|
|
40
|
+
environment: typeof corestoreCredentialEnvironment;
|
|
41
|
+
recipientKeyId: string;
|
|
42
|
+
recipientGeneration: number;
|
|
43
|
+
envelope: plugins.smartcrypto.IX25519EnvelopeV1;
|
|
44
|
+
}
|
|
45
|
+
export interface IReq_GetCorestoreControlCredentialMaterial extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_GetCorestoreControlCredentialMaterial> {
|
|
46
|
+
method: 'getCorestoreControlCredentialMaterial';
|
|
47
|
+
request: {
|
|
48
|
+
identity: IIdentityCredential;
|
|
49
|
+
requestId: string;
|
|
50
|
+
capability: TCorestoreCredentialCapability;
|
|
51
|
+
expectedRecipientKeyId: string;
|
|
52
|
+
expectedRecipientGeneration: number;
|
|
53
|
+
};
|
|
54
|
+
response: {
|
|
55
|
+
material: ICorestoreControlCredentialMaterialV1;
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export interface ICorestoreControlCredentialMaterialExpectationV1 {
|
|
59
|
+
requestId: string;
|
|
60
|
+
clusterId: string;
|
|
61
|
+
capability: TCorestoreCredentialCapability;
|
|
62
|
+
expectedRecipientKeyId: string;
|
|
63
|
+
expectedRecipientGeneration: number;
|
|
64
|
+
}
|
|
65
|
+
export interface ICorestoreControlCredentialMaterialContextInputV1 {
|
|
66
|
+
requestId: string;
|
|
67
|
+
clusterId: string;
|
|
68
|
+
capability: TCorestoreCredentialCapability;
|
|
69
|
+
recipientKeyId: string;
|
|
70
|
+
recipientGeneration: number;
|
|
71
|
+
}
|
|
72
|
+
export declare const validateGetCorestoreControlCredentialMaterialRequest: (requestArg: unknown, activeRecipientArg: IActiveSecretRecipientMetadata) => string[];
|
|
73
|
+
export declare const createCorestoreControlCredentialMaterialEnvelopeContext: (materialArg: ICorestoreControlCredentialMaterialContextInputV1) => Uint8Array;
|
|
74
|
+
export declare const validateCorestoreControlCredentialPlaintext: (plaintextArg: unknown) => string[];
|
|
75
|
+
export declare const validateCorestoreControlCredentialMaterial: (materialArg: unknown, expectedArg: ICorestoreControlCredentialMaterialExpectationV1) => Promise<string[]>;
|
|
76
|
+
export interface ICorestoreCredentialPublicationGrantV1 {
|
|
77
|
+
schemaVersion: 1;
|
|
78
|
+
operationId: string;
|
|
79
|
+
serviceId: string;
|
|
80
|
+
bindingId: string;
|
|
81
|
+
capability: TCorestoreCredentialCapability;
|
|
82
|
+
reconciliationGeneration: number;
|
|
83
|
+
expectedTargetSecretsRevision: number;
|
|
84
|
+
bindingRequestDigest: string;
|
|
85
|
+
issuedAt: number;
|
|
86
|
+
expiresAt: number;
|
|
87
|
+
}
|
|
88
|
+
export declare const validateCorestoreCredentialPublicationGrant: (grantArg: unknown, trustedNowArg?: number) => string[];
|
|
89
|
+
export declare const corestoreCredentialPublicationGrantsEqual: (leftArg: unknown, rightArg: unknown) => boolean;
|
|
90
|
+
export declare const validateCorestoreCredentialPublicationGrants: (grantsArg: unknown, trustedNowArg?: number) => string[];
|
|
91
|
+
export declare const corestoreDatabaseCredentialKeys: readonly ["MONGODB_URI", "MONGODB_URL", "MONGO_URL", "MONGODB_HOST", "MONGODB_PORT", "MONGODB_DATABASE", "MONGO_DBNAME", "MONGODB_USERNAME", "MONGO_DBUSER", "MONGODB_PASSWORD", "MONGO_DBPASS"];
|
|
92
|
+
export declare const corestoreObjectStorageCredentialKeys: readonly ["accessKeyId", "secretAccessKey"];
|
|
93
|
+
export type TCorestoreDatabaseCredentialKey = typeof corestoreDatabaseCredentialKeys[number];
|
|
94
|
+
export type TCorestoreObjectStorageCredentialKey = typeof corestoreObjectStorageCredentialKeys[number];
|
|
95
|
+
export type TCorestoreCredentialKey = TCorestoreDatabaseCredentialKey | TCorestoreObjectStorageCredentialKey;
|
|
96
|
+
export type TCorestoreDatabaseCredentialValuesV1 = {
|
|
97
|
+
[TKey in TCorestoreDatabaseCredentialKey]: string;
|
|
98
|
+
};
|
|
99
|
+
export interface ICorestoreDatabaseCredentialPlaintextMaterialV1 {
|
|
100
|
+
schemaVersion: 1;
|
|
101
|
+
capability: 'database';
|
|
102
|
+
values: TCorestoreDatabaseCredentialValuesV1;
|
|
103
|
+
}
|
|
104
|
+
export interface ICorestoreObjectStorageCredentialPlaintextMaterialV1 {
|
|
105
|
+
schemaVersion: 1;
|
|
106
|
+
capability: 'objectstorage';
|
|
107
|
+
values: {
|
|
108
|
+
accessKeyId: string;
|
|
109
|
+
secretAccessKey: string;
|
|
110
|
+
};
|
|
111
|
+
retention?: IObjectStorageRetentionEvidenceV1;
|
|
112
|
+
}
|
|
113
|
+
export type TCorestoreCredentialPlaintextMaterialV1 = ICorestoreDatabaseCredentialPlaintextMaterialV1 | ICorestoreObjectStorageCredentialPlaintextMaterialV1;
|
|
114
|
+
export declare const validateCorestoreDatabaseCredentialMaterial: (materialArg: unknown) => string[];
|
|
115
|
+
export declare const validateCorestoreObjectStorageCredentialMaterial: (materialArg: unknown, retentionExpectationArg?: IObjectStorageRetentionEvidenceExpectationV1) => Promise<string[]>;
|
|
116
|
+
export declare const validateCorestoreCredentialPlaintextMaterial: (materialArg: unknown, retentionExpectationArg?: IObjectStorageRetentionEvidenceExpectationV1) => Promise<string[]>;
|
|
117
|
+
export interface IPublishCorestoreCredentialMaterialRequestV1 {
|
|
118
|
+
identity: IIdentityCredential;
|
|
119
|
+
mutationId: string;
|
|
120
|
+
grant: ICorestoreCredentialPublicationGrantV1;
|
|
121
|
+
expectedIngressRecipientKeyId: string;
|
|
122
|
+
expectedIngressRecipientGeneration: number;
|
|
123
|
+
envelope: plugins.smartcrypto.IX25519EnvelopeV1;
|
|
124
|
+
}
|
|
125
|
+
export interface ICorestoreCredentialSecretVersionReferenceV1 extends ISecretVersionReference {
|
|
126
|
+
key: TCorestoreCredentialKey;
|
|
127
|
+
}
|
|
128
|
+
export interface ICorestoreCredentialPublicationCoverageV1 {
|
|
129
|
+
keys: TCorestoreCredentialKey[];
|
|
130
|
+
versionReferences: ICorestoreCredentialSecretVersionReferenceV1[];
|
|
131
|
+
}
|
|
132
|
+
export interface ICorestoreCredentialPublicationReceiptV1 {
|
|
133
|
+
schemaVersion: 1;
|
|
134
|
+
mutationId: string;
|
|
135
|
+
organizationId: string;
|
|
136
|
+
clusterId: string;
|
|
137
|
+
serviceId: string;
|
|
138
|
+
bindingId: string;
|
|
139
|
+
capability: TCorestoreCredentialCapability;
|
|
140
|
+
grant: ICorestoreCredentialPublicationGrantV1;
|
|
141
|
+
coverage: ICorestoreCredentialPublicationCoverageV1;
|
|
142
|
+
expectedTargetSecretsRevision: number;
|
|
143
|
+
targetSecretsRevision: number;
|
|
144
|
+
ingressAdmissionBinding: ISecretEnvelopeAdmissionBindingV1;
|
|
145
|
+
acceptedAt: number;
|
|
146
|
+
replayed: boolean;
|
|
147
|
+
}
|
|
148
|
+
export interface IReq_PublishCorestoreCredentialMaterial extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IReq_PublishCorestoreCredentialMaterial> {
|
|
149
|
+
method: 'publishCorestoreCredentialMaterial';
|
|
150
|
+
request: IPublishCorestoreCredentialMaterialRequestV1;
|
|
151
|
+
response: {
|
|
152
|
+
receipt: ICorestoreCredentialPublicationReceiptV1;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
export declare const createPublishCorestoreCredentialMaterialEnvelopeContext: (requestArg: Omit<IPublishCorestoreCredentialMaterialRequestV1, "identity" | "envelope">) => Uint8Array;
|
|
156
|
+
export declare const validatePublishCorestoreCredentialMaterialRequest: (requestArg: unknown, expectedGrantArg: ICorestoreCredentialPublicationGrantV1, activeRecipientArg: IActiveSecretRecipientMetadata, trustedNowArg: number) => Promise<string[]>;
|
|
157
|
+
export interface ICorestoreCredentialPublicationReceiptExpectationV1 {
|
|
158
|
+
request: IPublishCorestoreCredentialMaterialRequestV1;
|
|
159
|
+
organizationId: string;
|
|
160
|
+
clusterId: string;
|
|
161
|
+
}
|
|
162
|
+
export declare const validateCorestoreCredentialPublicationReceipt: (receiptArg: unknown, expectedArg: ICorestoreCredentialPublicationReceiptExpectationV1) => Promise<string[]>;
|
|
163
|
+
export declare const corestoreCredentialPublicationErrorMetadata: Readonly<{
|
|
164
|
+
readonly INVALID_IDENTITY: Readonly<{
|
|
165
|
+
retryable: false;
|
|
166
|
+
}>;
|
|
167
|
+
readonly INVALID_REQUEST: Readonly<{
|
|
168
|
+
retryable: false;
|
|
169
|
+
}>;
|
|
170
|
+
readonly GRANT_EXPIRED: Readonly<{
|
|
171
|
+
retryable: false;
|
|
172
|
+
}>;
|
|
173
|
+
readonly GRANT_SCOPE_MISMATCH: Readonly<{
|
|
174
|
+
retryable: false;
|
|
175
|
+
}>;
|
|
176
|
+
readonly GRANT_REVISION_MISMATCH: Readonly<{
|
|
177
|
+
retryable: true;
|
|
178
|
+
}>;
|
|
179
|
+
readonly INGRESS_RECIPIENT_MISMATCH: Readonly<{
|
|
180
|
+
retryable: true;
|
|
181
|
+
}>;
|
|
182
|
+
readonly ENVELOPE_INVALID: Readonly<{
|
|
183
|
+
retryable: false;
|
|
184
|
+
}>;
|
|
185
|
+
readonly MATERIAL_INVALID: Readonly<{
|
|
186
|
+
retryable: false;
|
|
187
|
+
}>;
|
|
188
|
+
readonly SECRETS_REVISION_CONFLICT: Readonly<{
|
|
189
|
+
retryable: true;
|
|
190
|
+
}>;
|
|
191
|
+
readonly REPLAY_CONFLICT: Readonly<{
|
|
192
|
+
retryable: false;
|
|
193
|
+
}>;
|
|
194
|
+
readonly INTERNAL_ERROR: Readonly<{
|
|
195
|
+
retryable: true;
|
|
196
|
+
}>;
|
|
197
|
+
}>;
|
|
198
|
+
export type TCorestoreCredentialPublicationErrorCode = keyof typeof corestoreCredentialPublicationErrorMetadata;
|
|
199
|
+
export interface ICorestoreCredentialPublicationErrorMetadataV1 {
|
|
200
|
+
schemaVersion: 1;
|
|
201
|
+
code: TCorestoreCredentialPublicationErrorCode;
|
|
202
|
+
retryable: boolean;
|
|
203
|
+
}
|
|
204
|
+
export declare const getCorestoreCredentialPublicationErrorMetadata: (codeArg: TCorestoreCredentialPublicationErrorCode) => ICorestoreCredentialPublicationErrorMetadataV1;
|