@serve.zone/interfaces 31.8.0 → 32.0.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/.smartconfig.json +1 -0
- package/changelog.md +512 -0
- package/dist_ts/00_commitinfo_data.js +3 -3
- package/dist_ts/appstore/types.d.ts +4 -6
- package/dist_ts/appstore/types.js +5 -5
- package/dist_ts/data/backup.d.ts +3 -26
- package/dist_ts/data/cluster.d.ts +36 -11
- package/dist_ts/data/cluster.js +33 -22
- package/dist_ts/data/clusteringress.d.ts +8 -0
- package/dist_ts/data/clusteringress.js +13 -8
- package/dist_ts/data/clusternode.d.ts +121 -74
- package/dist_ts/data/clusternode.js +109 -132
- package/dist_ts/data/clusterruntime.d.ts +39 -0
- package/dist_ts/data/clusterruntime.js +11 -0
- package/dist_ts/data/coremail.d.ts +3 -7
- package/dist_ts/data/coremail.js +2 -2
- package/dist_ts/data/coremail.runtime.d.ts +0 -1
- package/dist_ts/data/coremail.runtime.js +5 -22
- package/dist_ts/data/deploymentadoption.d.ts +0 -2
- package/dist_ts/data/deploymentadoption.js +40 -6
- package/dist_ts/data/deploymentoperation.js +16 -3
- package/dist_ts/data/deploymentpreflight.d.ts +0 -2
- package/dist_ts/data/deploymentpreflight.js +1 -1
- package/dist_ts/data/immutableimage.d.ts +38 -21
- package/dist_ts/data/immutableimage.js +45 -5
- package/dist_ts/data/index.d.ts +5 -1
- package/dist_ts/data/index.js +5 -1
- package/dist_ts/data/isolatedrestore.d.ts +139 -21
- package/dist_ts/data/isolatedrestore.golden.d.ts +0 -1
- package/dist_ts/data/isolatedrestore.golden.js +6 -9
- package/dist_ts/data/isolatedrestore.js +176 -40
- package/dist_ts/data/mail.d.ts +1 -1
- package/dist_ts/data/networkaddressplan.d.ts +78 -0
- package/dist_ts/data/networkaddressplan.js +114 -0
- package/dist_ts/data/networkauthority.d.ts +20 -22
- package/dist_ts/data/networkauthority.js +29 -43
- package/dist_ts/data/networkcredential.d.ts +10 -10
- package/dist_ts/data/networkcredential.js +16 -16
- package/dist_ts/data/networkdelivery.d.ts +18 -18
- package/dist_ts/data/networkdelivery.js +16 -16
- package/dist_ts/data/networklease.d.ts +18 -7
- package/dist_ts/data/networklease.js +29 -7
- package/dist_ts/data/networknode.d.ts +37 -0
- package/dist_ts/data/networknode.js +6 -0
- package/dist_ts/data/networkprojection.d.ts +59 -60
- package/dist_ts/data/networkprojection.js +53 -57
- package/dist_ts/data/networkprotection.d.ts +27 -28
- package/dist_ts/data/networkprotection.js +36 -36
- package/dist_ts/data/networkrouter.d.ts +11 -11
- package/dist_ts/data/networkrouter.js +1 -1
- package/dist_ts/data/networksigning.d.ts +16 -18
- package/dist_ts/data/networksigning.js +20 -21
- package/dist_ts/data/nodecredential.d.ts +4 -6
- package/dist_ts/data/nodeenrollment.d.ts +35 -40
- package/dist_ts/data/nodeenrollment.js +57 -72
- package/dist_ts/data/privatenetwork.d.ts +21 -24
- package/dist_ts/data/privatenetwork.js +39 -54
- package/dist_ts/data/runtimeassignment.d.ts +50 -34
- package/dist_ts/data/runtimeassignment.js +79 -45
- package/dist_ts/data/runtimeconfig.d.ts +21 -22
- package/dist_ts/data/runtimeconfig.js +37 -100
- package/dist_ts/data/runtimesession.d.ts +100 -62
- package/dist_ts/data/runtimesession.js +98 -79
- package/dist_ts/data/runtimeterminalreceipt.d.ts +28 -29
- package/dist_ts/data/runtimeterminalreceipt.js +42 -42
- package/dist_ts/data/secret.d.ts +18 -25
- package/dist_ts/data/secret.js +12 -52
- package/dist_ts/data/servicecredential.d.ts +14 -16
- package/dist_ts/data/servicecredential.js +17 -28
- package/dist_ts/data/serviceruntime.d.ts +128 -0
- package/dist_ts/data/serviceruntime.js +92 -0
- package/dist_ts/data/sparknodereport.d.ts +27 -14
- package/dist_ts/data/sparknodereport.js +35 -28
- package/dist_ts/data/webpush.d.ts +0 -1
- package/dist_ts/index.d.ts +2 -1
- package/dist_ts/index.js +3 -2
- package/dist_ts/platform/objectstorageretention.d.ts +21 -24
- package/dist_ts/platform/objectstorageretention.js +6 -18
- package/dist_ts/platform/storage.d.ts +1 -3
- package/dist_ts/platform/storagemigration.d.ts +0 -7
- package/dist_ts/platform/storagemigration.golden.d.ts +0 -1
- package/dist_ts/platform/storagemigration.golden.js +8 -12
- package/dist_ts/platform/storagemigration.js +6 -51
- package/dist_ts/platform/types.d.ts +2 -2
- package/dist_ts/private/canonicaljson.d.ts +9 -1
- package/dist_ts/private/canonicaljson.js +14 -2
- package/dist_ts/private/dataproperties.d.ts +62 -0
- package/dist_ts/private/dataproperties.js +117 -0
- package/dist_ts/private/networkcontract.d.ts +14 -10
- package/dist_ts/private/networkcontract.js +15 -1
- package/dist_ts/private/producercontract.d.ts +11 -0
- package/dist_ts/private/producercontract.js +21 -0
- package/dist_ts/private/releaseversion.d.ts +37 -0
- package/dist_ts/private/releaseversion.js +48 -0
- package/dist_ts/private/runtimepolicy.d.ts +31 -0
- package/dist_ts/private/runtimepolicy.js +90 -0
- package/dist_ts/private/tokenlist.d.ts +9 -0
- package/dist_ts/private/tokenlist.js +23 -0
- package/dist_ts/protocol.d.ts +137 -0
- package/dist_ts/protocol.js +255 -0
- package/dist_ts/requests/admin.d.ts +8 -8
- package/dist_ts/requests/backup.d.ts +102 -112
- package/dist_ts/requests/cluster.d.ts +47 -10
- package/dist_ts/requests/cluster.js +1 -1
- package/dist_ts/requests/clusteringress.d.ts +9 -0
- package/dist_ts/requests/clusteringress.js +1 -1
- package/dist_ts/requests/config.d.ts +3 -3
- package/dist_ts/requests/corestore.d.ts +0 -3
- package/dist_ts/requests/corestore.js +5 -9
- package/dist_ts/requests/network.d.ts +87 -31
- package/dist_ts/requests/node.d.ts +15 -28
- package/dist_ts/requests/pallet.d.ts +13 -13
- package/dist_ts/requests/runtimesession.d.ts +53 -41
- package/dist_ts/requests/secret.d.ts +4 -5
- package/dist_ts/requests/secret.js +1 -5
- package/dist_ts/requests/service.d.ts +60 -0
- package/dist_ts/runtime.corestore.d.ts +56 -74
- package/dist_ts/runtime.corestore.databaseexportpackage.d.ts +30 -36
- package/dist_ts/runtime.corestore.databaseexportpackage.golden.d.ts +11 -12
- package/dist_ts/runtime.corestore.databaseexportpackage.golden.js +54 -71
- package/dist_ts/runtime.corestore.databaseexportpackage.js +9 -25
- package/dist_ts/runtime.corestore.js +35 -135
- package/dist_ts/runtime.corestore.relay.js +2 -7
- package/dist_ts/runtime.d.ts +38 -48
- package/dist_ts/runtime.js +20 -77
- package/dist_ts/runtime.networkprojection.d.ts +4 -4
- package/dist_ts/runtime.networkprojection.js +18 -18
- package/dist_ts/runtime.workloadinit.d.ts +23 -24
- package/dist_ts/runtime.workloadinit.js +6 -13
- package/package.json +2 -2
- package/readme.md +540 -269
- package/ts/00_commitinfo_data.ts +3 -3
- package/ts/appstore/types.ts +4 -6
- package/ts/data/backup.ts +3 -38
- package/ts/data/cluster.ts +51 -34
- package/ts/data/clusteringress.ts +12 -12
- package/ts/data/clusternode.ts +204 -232
- package/ts/data/clusterruntime.ts +45 -0
- package/ts/data/coremail.runtime.ts +4 -21
- package/ts/data/coremail.ts +3 -7
- package/ts/data/deploymentadoption.ts +46 -4
- package/ts/data/deploymentoperation.ts +16 -1
- package/ts/data/deploymentpreflight.ts +0 -2
- package/ts/data/immutableimage.ts +71 -24
- package/ts/data/index.ts +5 -1
- package/ts/data/isolatedrestore.golden.ts +5 -9
- package/ts/data/isolatedrestore.ts +339 -54
- package/ts/data/mail.ts +1 -1
- package/ts/data/networkaddressplan.ts +175 -0
- package/ts/data/networkauthority.ts +45 -61
- package/ts/data/networkcredential.ts +24 -24
- package/ts/data/networkdelivery.ts +27 -27
- package/ts/data/networklease.ts +40 -13
- package/ts/data/networknode.ts +37 -0
- package/ts/data/networkprojection.ts +119 -124
- package/ts/data/networkprotection.ts +54 -55
- package/ts/data/networkrouter.ts +14 -14
- package/ts/data/networksigning.ts +29 -32
- package/ts/data/nodecredential.ts +4 -6
- package/ts/data/nodeenrollment.ts +96 -114
- package/ts/data/privatenetwork.ts +58 -74
- package/ts/data/runtimeassignment.ts +143 -94
- package/ts/data/runtimeconfig.ts +62 -122
- package/ts/data/runtimesession.ts +185 -138
- package/ts/data/runtimeterminalreceipt.ts +72 -73
- package/ts/data/secret.ts +28 -76
- package/ts/data/servicecredential.ts +33 -43
- package/ts/data/serviceruntime.ts +208 -0
- package/ts/data/sparknodereport.ts +48 -36
- package/ts/data/webpush.ts +0 -1
- package/ts/index.ts +2 -0
- package/ts/platform/objectstorageretention.ts +36 -55
- package/ts/platform/storage.ts +1 -3
- package/ts/platform/storagemigration.golden.ts +7 -11
- package/ts/platform/storagemigration.ts +5 -55
- package/ts/platform/types.ts +2 -2
- package/ts/private/canonicaljson.ts +13 -1
- package/ts/private/dataproperties.ts +139 -0
- package/ts/private/networkcontract.ts +23 -9
- package/ts/private/producercontract.ts +19 -0
- package/ts/private/releaseversion.ts +70 -0
- package/ts/private/runtimepolicy.ts +105 -0
- package/ts/private/tokenlist.ts +30 -0
- package/ts/protocol.ts +364 -0
- package/ts/requests/admin.ts +11 -11
- package/ts/requests/backup.ts +112 -117
- package/ts/requests/cluster.ts +58 -13
- package/ts/requests/clusteringress.ts +9 -0
- package/ts/requests/config.ts +3 -3
- package/ts/requests/corestore.ts +4 -16
- package/ts/requests/network.ts +90 -41
- package/ts/requests/node.ts +21 -38
- package/ts/requests/pallet.ts +17 -17
- package/ts/requests/runtimesession.ts +63 -51
- package/ts/requests/secret.ts +5 -10
- package/ts/requests/service.ts +81 -0
- package/ts/runtime.corestore.databaseexportpackage.golden.ts +77 -95
- package/ts/runtime.corestore.databaseexportpackage.ts +51 -73
- package/ts/runtime.corestore.relay.ts +1 -10
- package/ts/runtime.corestore.ts +118 -268
- package/ts/runtime.networkprojection.ts +30 -30
- package/ts/runtime.ts +83 -158
- package/ts/runtime.workloadinit.ts +36 -48
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.d.ts +0 -902
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.golden.d.ts +0 -35
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.golden.js +0 -315
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.js +0 -3315
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.d.ts +0 -291
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.golden.d.ts +0 -30
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.golden.js +0 -408
- package/dist_ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.js +0 -1126
- package/ts/runtime.cloudlylegacydeploymentsettlement.golden.ts +0 -421
- package/ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.golden.ts +0 -510
- package/ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.ts +0 -2470
- package/ts/runtime.cloudlylegacydeploymentsettlement.ts +0 -6630
|
@@ -45,7 +45,7 @@ export class CorestoreDatabaseExportPackageCodecError extends Error {
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export interface
|
|
48
|
+
export interface ICorestoreDatabaseExportPackageInputIdentity {
|
|
49
49
|
format: 'smartdb.database.export.v1';
|
|
50
50
|
databaseName: string;
|
|
51
51
|
byteLength: number;
|
|
@@ -53,39 +53,37 @@ export interface ICorestoreDatabaseExportPackageInputIdentityV1 {
|
|
|
53
53
|
lineFeedTerminator: 'single-lf';
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
export interface
|
|
56
|
+
export interface ICorestoreDatabaseExportPackageApprovedBackupIdentity {
|
|
57
57
|
backupId: string;
|
|
58
58
|
sourceServiceId: string;
|
|
59
59
|
snapshotId: string;
|
|
60
60
|
backupReceiptSha256: string;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
export interface
|
|
63
|
+
export interface ICorestoreDatabaseExportPackageAllocationAbsentExpectation {
|
|
64
64
|
expectation: 'absent';
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
export interface
|
|
67
|
+
export interface ICorestoreDatabaseExportPackageAllocationExactExpectation {
|
|
68
68
|
expectation: 'exact';
|
|
69
69
|
allocation: ICorestoreDatabaseAllocationReference;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
export type
|
|
73
|
-
|
|
|
74
|
-
|
|
|
72
|
+
export type TCorestoreDatabaseExportPackageAllocationExpectation =
|
|
73
|
+
| ICorestoreDatabaseExportPackageAllocationAbsentExpectation
|
|
74
|
+
| ICorestoreDatabaseExportPackageAllocationExactExpectation;
|
|
75
75
|
|
|
76
|
-
export interface
|
|
77
|
-
schemaVersion: 1;
|
|
76
|
+
export interface ICorestoreDatabaseExportPackageRequest {
|
|
78
77
|
kind: 'corestore-database-export-package-request';
|
|
79
78
|
packageAttemptId: string;
|
|
80
79
|
packageBackupId: string;
|
|
81
|
-
input:
|
|
82
|
-
approvedSourceBackup:
|
|
80
|
+
input: ICorestoreDatabaseExportPackageInputIdentity;
|
|
81
|
+
approvedSourceBackup: ICorestoreDatabaseExportPackageApprovedBackupIdentity;
|
|
83
82
|
completeOutputReceiptSha256: string;
|
|
84
|
-
allocationExpectation:
|
|
83
|
+
allocationExpectation: TCorestoreDatabaseExportPackageAllocationExpectation;
|
|
85
84
|
}
|
|
86
85
|
|
|
87
|
-
export interface
|
|
88
|
-
schemaVersion: 1;
|
|
86
|
+
export interface ICorestoreDatabaseExportPackageCompletion {
|
|
89
87
|
kind: 'corestore-database-export-package-completion';
|
|
90
88
|
packageAttemptId: string;
|
|
91
89
|
requestSha256: string;
|
|
@@ -96,15 +94,13 @@ export interface ICorestoreDatabaseExportPackageCompletionV1 {
|
|
|
96
94
|
closureSha256: string;
|
|
97
95
|
}
|
|
98
96
|
|
|
99
|
-
export interface
|
|
100
|
-
schemaVersion: 1;
|
|
97
|
+
export interface ICorestoreDatabaseExportPackageResponse {
|
|
101
98
|
kind: 'corestore-database-export-package-response';
|
|
102
|
-
completion:
|
|
99
|
+
completion: ICorestoreDatabaseExportPackageCompletion;
|
|
103
100
|
replayed: boolean;
|
|
104
101
|
}
|
|
105
102
|
|
|
106
|
-
export interface
|
|
107
|
-
schemaVersion: 1;
|
|
103
|
+
export interface ICorestoreDatabaseExportPackageReleaseRequest {
|
|
108
104
|
kind: 'corestore-database-export-package-release-request';
|
|
109
105
|
packageAttemptId: string;
|
|
110
106
|
requestSha256: string;
|
|
@@ -116,8 +112,7 @@ export interface ICorestoreDatabaseExportPackageReleaseRequestV1 {
|
|
|
116
112
|
callerFsyncedAt: number;
|
|
117
113
|
}
|
|
118
114
|
|
|
119
|
-
export interface
|
|
120
|
-
schemaVersion: 1;
|
|
115
|
+
export interface ICorestoreDatabaseExportPackageReleaseCompletion {
|
|
121
116
|
kind: 'corestore-database-export-package-release-completion';
|
|
122
117
|
packageAttemptId: string;
|
|
123
118
|
requestSha256: string;
|
|
@@ -126,10 +121,9 @@ export interface ICorestoreDatabaseExportPackageReleaseCompletionV1 {
|
|
|
126
121
|
releasedAt: number;
|
|
127
122
|
}
|
|
128
123
|
|
|
129
|
-
export interface
|
|
130
|
-
schemaVersion: 1;
|
|
124
|
+
export interface ICorestoreDatabaseExportPackageReleaseResponse {
|
|
131
125
|
kind: 'corestore-database-export-package-release-response';
|
|
132
|
-
release:
|
|
126
|
+
release: ICorestoreDatabaseExportPackageReleaseCompletion;
|
|
133
127
|
replayed: boolean;
|
|
134
128
|
}
|
|
135
129
|
|
|
@@ -151,7 +145,6 @@ const approvedBackupIdentityKeys = [
|
|
|
151
145
|
'backupReceiptSha256',
|
|
152
146
|
] as const;
|
|
153
147
|
const requestKeys = [
|
|
154
|
-
'schemaVersion',
|
|
155
148
|
'kind',
|
|
156
149
|
'packageAttemptId',
|
|
157
150
|
'packageBackupId',
|
|
@@ -161,7 +154,6 @@ const requestKeys = [
|
|
|
161
154
|
'allocationExpectation',
|
|
162
155
|
] as const;
|
|
163
156
|
const completionKeys = [
|
|
164
|
-
'schemaVersion',
|
|
165
157
|
'kind',
|
|
166
158
|
'packageAttemptId',
|
|
167
159
|
'requestSha256',
|
|
@@ -171,9 +163,8 @@ const completionKeys = [
|
|
|
171
163
|
'closureByteLength',
|
|
172
164
|
'closureSha256',
|
|
173
165
|
] as const;
|
|
174
|
-
const responseKeys = ['
|
|
166
|
+
const responseKeys = ['kind', 'completion', 'replayed'] as const;
|
|
175
167
|
const releaseRequestKeys = [
|
|
176
|
-
'schemaVersion',
|
|
177
168
|
'kind',
|
|
178
169
|
'packageAttemptId',
|
|
179
170
|
'requestSha256',
|
|
@@ -185,7 +176,6 @@ const releaseRequestKeys = [
|
|
|
185
176
|
'callerFsyncedAt',
|
|
186
177
|
] as const;
|
|
187
178
|
const releaseCompletionKeys = [
|
|
188
|
-
'schemaVersion',
|
|
189
179
|
'kind',
|
|
190
180
|
'packageAttemptId',
|
|
191
181
|
'requestSha256',
|
|
@@ -193,7 +183,7 @@ const releaseCompletionKeys = [
|
|
|
193
183
|
'releaseRequestSha256',
|
|
194
184
|
'releasedAt',
|
|
195
185
|
] as const;
|
|
196
|
-
const releaseResponseKeys = ['
|
|
186
|
+
const releaseResponseKeys = ['kind', 'release', 'replayed'] as const;
|
|
197
187
|
|
|
198
188
|
const identifierPattern = /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,255}$/;
|
|
199
189
|
const packageAttemptIdPattern = /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/;
|
|
@@ -335,7 +325,7 @@ const canonicalEqual = (leftArg: unknown, rightArg: unknown, pathArg: string): b
|
|
|
335
325
|
const normalizeInputIdentityInternal = (
|
|
336
326
|
valueArg: unknown,
|
|
337
327
|
pathArg: string,
|
|
338
|
-
):
|
|
328
|
+
): ICorestoreDatabaseExportPackageInputIdentity => {
|
|
339
329
|
const value = readRecord(valueArg, pathArg);
|
|
340
330
|
assertExactKeys(value, inputIdentityKeys, pathArg);
|
|
341
331
|
if (value.format !== 'smartdb.database.export.v1'
|
|
@@ -358,7 +348,7 @@ const normalizeInputIdentityInternal = (
|
|
|
358
348
|
|
|
359
349
|
export const normalizeCorestoreDatabaseExportPackageInputIdentity = (
|
|
360
350
|
valueArg: unknown,
|
|
361
|
-
): Readonly<
|
|
351
|
+
): Readonly<ICorestoreDatabaseExportPackageInputIdentity> => finalize(
|
|
362
352
|
normalizeInputIdentityInternal(valueArg, 'databaseExportPackageInput'),
|
|
363
353
|
'databaseExportPackageInput',
|
|
364
354
|
);
|
|
@@ -366,7 +356,7 @@ export const normalizeCorestoreDatabaseExportPackageInputIdentity = (
|
|
|
366
356
|
const normalizeApprovedBackupIdentityInternal = (
|
|
367
357
|
valueArg: unknown,
|
|
368
358
|
pathArg: string,
|
|
369
|
-
):
|
|
359
|
+
): ICorestoreDatabaseExportPackageApprovedBackupIdentity => {
|
|
370
360
|
const value = readRecord(valueArg, pathArg);
|
|
371
361
|
assertExactKeys(value, approvedBackupIdentityKeys, pathArg);
|
|
372
362
|
return {
|
|
@@ -382,7 +372,7 @@ const normalizeApprovedBackupIdentityInternal = (
|
|
|
382
372
|
|
|
383
373
|
export const normalizeCorestoreDatabaseExportPackageApprovedBackupIdentity = (
|
|
384
374
|
valueArg: unknown,
|
|
385
|
-
): Readonly<
|
|
375
|
+
): Readonly<ICorestoreDatabaseExportPackageApprovedBackupIdentity> => finalize(
|
|
386
376
|
normalizeApprovedBackupIdentityInternal(valueArg, 'databaseExportPackageApprovedBackup'),
|
|
387
377
|
'databaseExportPackageApprovedBackup',
|
|
388
378
|
);
|
|
@@ -390,7 +380,7 @@ export const normalizeCorestoreDatabaseExportPackageApprovedBackupIdentity = (
|
|
|
390
380
|
const normalizeAllocationExpectationInternal = (
|
|
391
381
|
valueArg: unknown,
|
|
392
382
|
pathArg: string,
|
|
393
|
-
):
|
|
383
|
+
): TCorestoreDatabaseExportPackageAllocationExpectation => {
|
|
394
384
|
const value = readRecord(valueArg, pathArg);
|
|
395
385
|
if (value.expectation === 'absent') {
|
|
396
386
|
assertExactKeys(value, ['expectation'], pathArg);
|
|
@@ -411,22 +401,20 @@ const normalizeAllocationExpectationInternal = (
|
|
|
411
401
|
|
|
412
402
|
export const normalizeCorestoreDatabaseExportPackageAllocationExpectation = (
|
|
413
403
|
valueArg: unknown,
|
|
414
|
-
): Readonly<
|
|
404
|
+
): Readonly<TCorestoreDatabaseExportPackageAllocationExpectation> => finalize(
|
|
415
405
|
normalizeAllocationExpectationInternal(valueArg, 'databaseExportPackageAllocationExpectation'),
|
|
416
406
|
'databaseExportPackageAllocationExpectation',
|
|
417
407
|
);
|
|
418
408
|
|
|
419
409
|
export const normalizeCorestoreDatabaseExportPackageRequest = (
|
|
420
410
|
valueArg: unknown,
|
|
421
|
-
): Readonly<
|
|
411
|
+
): Readonly<ICorestoreDatabaseExportPackageRequest> => {
|
|
422
412
|
const value = readRecord(valueArg, 'databaseExportPackageRequest');
|
|
423
413
|
assertExactKeys(value, requestKeys, 'databaseExportPackageRequest');
|
|
424
|
-
if (value.
|
|
425
|
-
|| value.kind !== 'corestore-database-export-package-request') {
|
|
414
|
+
if (value.kind !== 'corestore-database-export-package-request') {
|
|
426
415
|
fail('INVALID_VALUE', 'databaseExportPackageRequest.kind');
|
|
427
416
|
}
|
|
428
417
|
return finalize({
|
|
429
|
-
schemaVersion: 1,
|
|
430
418
|
kind: 'corestore-database-export-package-request',
|
|
431
419
|
packageAttemptId: readPackageAttemptId(
|
|
432
420
|
value.packageAttemptId,
|
|
@@ -449,7 +437,7 @@ export const normalizeCorestoreDatabaseExportPackageRequest = (
|
|
|
449
437
|
value.allocationExpectation,
|
|
450
438
|
'databaseExportPackageRequest.allocationExpectation',
|
|
451
439
|
),
|
|
452
|
-
} satisfies
|
|
440
|
+
} satisfies ICorestoreDatabaseExportPackageRequest, 'databaseExportPackageRequest');
|
|
453
441
|
};
|
|
454
442
|
|
|
455
443
|
export const encodeCorestoreDatabaseExportPackageRequest = (
|
|
@@ -482,11 +470,10 @@ export const classifyCorestoreDatabaseExportPackageRequestReuse = (
|
|
|
482
470
|
|
|
483
471
|
export const normalizeCorestoreDatabaseExportPackageCompletion = (
|
|
484
472
|
valueArg: unknown,
|
|
485
|
-
): Readonly<
|
|
473
|
+
): Readonly<ICorestoreDatabaseExportPackageCompletion> => {
|
|
486
474
|
const value = readRecord(valueArg, 'databaseExportPackageCompletion');
|
|
487
475
|
assertExactKeys(value, completionKeys, 'databaseExportPackageCompletion');
|
|
488
|
-
if (value.
|
|
489
|
-
|| value.kind !== 'corestore-database-export-package-completion') {
|
|
476
|
+
if (value.kind !== 'corestore-database-export-package-completion') {
|
|
490
477
|
fail('INVALID_VALUE', 'databaseExportPackageCompletion.kind');
|
|
491
478
|
}
|
|
492
479
|
const receipt = normalizeBackupReceipt(
|
|
@@ -518,7 +505,6 @@ export const normalizeCorestoreDatabaseExportPackageCompletion = (
|
|
|
518
505
|
receipt.createdAt,
|
|
519
506
|
);
|
|
520
507
|
return finalize({
|
|
521
|
-
schemaVersion: 1,
|
|
522
508
|
kind: 'corestore-database-export-package-completion',
|
|
523
509
|
packageAttemptId: readPackageAttemptId(
|
|
524
510
|
value.packageAttemptId,
|
|
@@ -533,13 +519,13 @@ export const normalizeCorestoreDatabaseExportPackageCompletion = (
|
|
|
533
519
|
receiptSha256,
|
|
534
520
|
closureByteLength,
|
|
535
521
|
closureSha256,
|
|
536
|
-
} satisfies
|
|
522
|
+
} satisfies ICorestoreDatabaseExportPackageCompletion, 'databaseExportPackageCompletion');
|
|
537
523
|
};
|
|
538
524
|
|
|
539
525
|
export const normalizeCorestoreDatabaseExportPackageCompletionForRequest = (
|
|
540
526
|
completionArg: unknown,
|
|
541
527
|
requestArg: unknown,
|
|
542
|
-
): Readonly<
|
|
528
|
+
): Readonly<ICorestoreDatabaseExportPackageCompletion> => {
|
|
543
529
|
const request = normalizeCorestoreDatabaseExportPackageRequest(requestArg);
|
|
544
530
|
const completion = normalizeCorestoreDatabaseExportPackageCompletion(completionArg);
|
|
545
531
|
const receiptAllocation = completion.receipt.snapshot.databaseAllocation;
|
|
@@ -580,27 +566,25 @@ const digestCorestoreDatabaseExportPackageCompletion = (valueArg: unknown): stri
|
|
|
580
566
|
|
|
581
567
|
export const normalizeCorestoreDatabaseExportPackageResponse = (
|
|
582
568
|
valueArg: unknown,
|
|
583
|
-
): Readonly<
|
|
569
|
+
): Readonly<ICorestoreDatabaseExportPackageResponse> => {
|
|
584
570
|
const value = readRecord(valueArg, 'databaseExportPackageResponse');
|
|
585
571
|
assertExactKeys(value, responseKeys, 'databaseExportPackageResponse');
|
|
586
|
-
if (value.
|
|
587
|
-
|| value.kind !== 'corestore-database-export-package-response') {
|
|
572
|
+
if (value.kind !== 'corestore-database-export-package-response') {
|
|
588
573
|
fail('INVALID_VALUE', 'databaseExportPackageResponse.kind');
|
|
589
574
|
}
|
|
590
575
|
return finalize({
|
|
591
|
-
schemaVersion: 1,
|
|
592
576
|
kind: 'corestore-database-export-package-response',
|
|
593
577
|
completion: normalizeCorestoreDatabaseExportPackageCompletion(
|
|
594
578
|
value.completion,
|
|
595
|
-
) as
|
|
579
|
+
) as ICorestoreDatabaseExportPackageCompletion,
|
|
596
580
|
replayed: readBoolean(value.replayed, 'databaseExportPackageResponse.replayed'),
|
|
597
|
-
} satisfies
|
|
581
|
+
} satisfies ICorestoreDatabaseExportPackageResponse, 'databaseExportPackageResponse');
|
|
598
582
|
};
|
|
599
583
|
|
|
600
584
|
export const normalizeCorestoreDatabaseExportPackageResponseForRequest = (
|
|
601
585
|
responseArg: unknown,
|
|
602
586
|
requestArg: unknown,
|
|
603
|
-
): Readonly<
|
|
587
|
+
): Readonly<ICorestoreDatabaseExportPackageResponse> => {
|
|
604
588
|
const response = normalizeCorestoreDatabaseExportPackageResponse(responseArg);
|
|
605
589
|
normalizeCorestoreDatabaseExportPackageCompletionForRequest(
|
|
606
590
|
response.completion,
|
|
@@ -622,15 +606,13 @@ export const computeCorestoreDatabaseExportPackageResponseSha256 = async (
|
|
|
622
606
|
|
|
623
607
|
export const normalizeCorestoreDatabaseExportPackageReleaseRequest = (
|
|
624
608
|
valueArg: unknown,
|
|
625
|
-
): Readonly<
|
|
609
|
+
): Readonly<ICorestoreDatabaseExportPackageReleaseRequest> => {
|
|
626
610
|
const value = readRecord(valueArg, 'databaseExportPackageReleaseRequest');
|
|
627
611
|
assertExactKeys(value, releaseRequestKeys, 'databaseExportPackageReleaseRequest');
|
|
628
|
-
if (value.
|
|
629
|
-
|| value.kind !== 'corestore-database-export-package-release-request') {
|
|
612
|
+
if (value.kind !== 'corestore-database-export-package-release-request') {
|
|
630
613
|
fail('INVALID_VALUE', 'databaseExportPackageReleaseRequest.kind');
|
|
631
614
|
}
|
|
632
615
|
return finalize({
|
|
633
|
-
schemaVersion: 1,
|
|
634
616
|
kind: 'corestore-database-export-package-release-request',
|
|
635
617
|
packageAttemptId: readPackageAttemptId(
|
|
636
618
|
value.packageAttemptId,
|
|
@@ -669,7 +651,7 @@ export const normalizeCorestoreDatabaseExportPackageReleaseRequest = (
|
|
|
669
651
|
'databaseExportPackageReleaseRequest.callerFsyncedAt',
|
|
670
652
|
1,
|
|
671
653
|
),
|
|
672
|
-
} satisfies
|
|
654
|
+
} satisfies ICorestoreDatabaseExportPackageReleaseRequest,
|
|
673
655
|
'databaseExportPackageReleaseRequest');
|
|
674
656
|
};
|
|
675
657
|
|
|
@@ -677,7 +659,7 @@ export const normalizeCorestoreDatabaseExportPackageReleaseRequestForCompletion
|
|
|
677
659
|
releaseRequestArg: unknown,
|
|
678
660
|
requestArg: unknown,
|
|
679
661
|
completionArg: unknown,
|
|
680
|
-
): Readonly<
|
|
662
|
+
): Readonly<ICorestoreDatabaseExportPackageReleaseRequest> => {
|
|
681
663
|
const request = normalizeCorestoreDatabaseExportPackageRequest(requestArg);
|
|
682
664
|
const completion = normalizeCorestoreDatabaseExportPackageCompletionForRequest(
|
|
683
665
|
completionArg,
|
|
@@ -731,15 +713,13 @@ export const classifyCorestoreDatabaseExportPackageReleaseRequestReuse = (
|
|
|
731
713
|
|
|
732
714
|
export const normalizeCorestoreDatabaseExportPackageReleaseCompletion = (
|
|
733
715
|
valueArg: unknown,
|
|
734
|
-
): Readonly<
|
|
716
|
+
): Readonly<ICorestoreDatabaseExportPackageReleaseCompletion> => {
|
|
735
717
|
const value = readRecord(valueArg, 'databaseExportPackageReleaseCompletion');
|
|
736
718
|
assertExactKeys(value, releaseCompletionKeys, 'databaseExportPackageReleaseCompletion');
|
|
737
|
-
if (value.
|
|
738
|
-
|| value.kind !== 'corestore-database-export-package-release-completion') {
|
|
719
|
+
if (value.kind !== 'corestore-database-export-package-release-completion') {
|
|
739
720
|
fail('INVALID_VALUE', 'databaseExportPackageReleaseCompletion.kind');
|
|
740
721
|
}
|
|
741
722
|
return finalize({
|
|
742
|
-
schemaVersion: 1,
|
|
743
723
|
kind: 'corestore-database-export-package-release-completion',
|
|
744
724
|
packageAttemptId: readPackageAttemptId(
|
|
745
725
|
value.packageAttemptId,
|
|
@@ -762,7 +742,7 @@ export const normalizeCorestoreDatabaseExportPackageReleaseCompletion = (
|
|
|
762
742
|
'databaseExportPackageReleaseCompletion.releasedAt',
|
|
763
743
|
1,
|
|
764
744
|
),
|
|
765
|
-
} satisfies
|
|
745
|
+
} satisfies ICorestoreDatabaseExportPackageReleaseCompletion,
|
|
766
746
|
'databaseExportPackageReleaseCompletion');
|
|
767
747
|
};
|
|
768
748
|
|
|
@@ -771,7 +751,7 @@ export const normalizeCorestoreDatabaseExportPackageReleaseCompletionForRequest
|
|
|
771
751
|
releaseRequestArg: unknown,
|
|
772
752
|
requestArg: unknown,
|
|
773
753
|
completionArg: unknown,
|
|
774
|
-
): Readonly<
|
|
754
|
+
): Readonly<ICorestoreDatabaseExportPackageReleaseCompletion> => {
|
|
775
755
|
const request = normalizeCorestoreDatabaseExportPackageRequest(requestArg);
|
|
776
756
|
const completion = normalizeCorestoreDatabaseExportPackageCompletionForRequest(
|
|
777
757
|
completionArg,
|
|
@@ -812,21 +792,19 @@ export const computeCorestoreDatabaseExportPackageReleaseCompletionSha256 = asyn
|
|
|
812
792
|
|
|
813
793
|
export const normalizeCorestoreDatabaseExportPackageReleaseResponse = (
|
|
814
794
|
valueArg: unknown,
|
|
815
|
-
): Readonly<
|
|
795
|
+
): Readonly<ICorestoreDatabaseExportPackageReleaseResponse> => {
|
|
816
796
|
const value = readRecord(valueArg, 'databaseExportPackageReleaseResponse');
|
|
817
797
|
assertExactKeys(value, releaseResponseKeys, 'databaseExportPackageReleaseResponse');
|
|
818
|
-
if (value.
|
|
819
|
-
|| value.kind !== 'corestore-database-export-package-release-response') {
|
|
798
|
+
if (value.kind !== 'corestore-database-export-package-release-response') {
|
|
820
799
|
fail('INVALID_VALUE', 'databaseExportPackageReleaseResponse.kind');
|
|
821
800
|
}
|
|
822
801
|
return finalize({
|
|
823
|
-
schemaVersion: 1,
|
|
824
802
|
kind: 'corestore-database-export-package-release-response',
|
|
825
803
|
release: normalizeCorestoreDatabaseExportPackageReleaseCompletion(
|
|
826
804
|
value.release,
|
|
827
|
-
) as
|
|
805
|
+
) as ICorestoreDatabaseExportPackageReleaseCompletion,
|
|
828
806
|
replayed: readBoolean(value.replayed, 'databaseExportPackageReleaseResponse.replayed'),
|
|
829
|
-
} satisfies
|
|
807
|
+
} satisfies ICorestoreDatabaseExportPackageReleaseResponse,
|
|
830
808
|
'databaseExportPackageReleaseResponse');
|
|
831
809
|
};
|
|
832
810
|
|
|
@@ -835,7 +813,7 @@ export const normalizeCorestoreDatabaseExportPackageReleaseResponseForRequest =
|
|
|
835
813
|
releaseRequestArg: unknown,
|
|
836
814
|
requestArg: unknown,
|
|
837
815
|
completionArg: unknown,
|
|
838
|
-
): Readonly<
|
|
816
|
+
): Readonly<ICorestoreDatabaseExportPackageReleaseResponse> => {
|
|
839
817
|
const response = normalizeCorestoreDatabaseExportPackageReleaseResponse(responseArg);
|
|
840
818
|
normalizeCorestoreDatabaseExportPackageReleaseCompletionForRequest(
|
|
841
819
|
response.release,
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
corestoreDatabaseBackupRuntimeLimits,
|
|
4
4
|
normalizeCorestoreDatabaseBackupReceipt,
|
|
5
5
|
} from './runtime.corestore.js';
|
|
6
|
+
import { hasExactKeys } from './private/dataproperties.js';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Carrying a Corestore database closure through the cluster relay.
|
|
@@ -52,16 +53,6 @@ const isRecord = (valueArg: unknown): valueArg is Record<string, unknown> => (
|
|
|
52
53
|
|| Object.getPrototypeOf(valueArg) === null)
|
|
53
54
|
);
|
|
54
55
|
|
|
55
|
-
const hasExactKeys = (
|
|
56
|
-
valueArg: Record<string, unknown>,
|
|
57
|
-
keysArg: readonly string[],
|
|
58
|
-
): boolean => {
|
|
59
|
-
const actualKeys = Object.keys(valueArg).sort();
|
|
60
|
-
const expectedKeys = [...keysArg].sort();
|
|
61
|
-
return actualKeys.length === expectedKeys.length
|
|
62
|
-
&& actualKeys.every((keyArg, indexArg) => keyArg === expectedKeys[indexArg]);
|
|
63
|
-
};
|
|
64
|
-
|
|
65
56
|
/**
|
|
66
57
|
* Validates one closure descriptor and names every reason it is refused.
|
|
67
58
|
*
|