@serve.zone/interfaces 31.9.0 → 32.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/changelog.md +476 -0
  2. package/dist_ts/00_commitinfo_data.js +3 -3
  3. package/dist_ts/appstore/types.d.ts +4 -6
  4. package/dist_ts/appstore/types.js +5 -5
  5. package/dist_ts/data/backup.d.ts +3 -26
  6. package/dist_ts/data/cluster.d.ts +36 -11
  7. package/dist_ts/data/cluster.js +33 -22
  8. package/dist_ts/data/clusteringress.d.ts +8 -0
  9. package/dist_ts/data/clusteringress.js +13 -8
  10. package/dist_ts/data/clusternode.d.ts +121 -74
  11. package/dist_ts/data/clusternode.js +109 -132
  12. package/dist_ts/data/coremail.d.ts +3 -7
  13. package/dist_ts/data/coremail.js +2 -2
  14. package/dist_ts/data/coremail.runtime.d.ts +0 -1
  15. package/dist_ts/data/coremail.runtime.js +5 -22
  16. package/dist_ts/data/deploymentadoption.d.ts +0 -2
  17. package/dist_ts/data/deploymentadoption.js +40 -6
  18. package/dist_ts/data/deploymentoperation.js +16 -3
  19. package/dist_ts/data/deploymentpreflight.d.ts +0 -2
  20. package/dist_ts/data/deploymentpreflight.js +1 -1
  21. package/dist_ts/data/immutableimage.d.ts +38 -21
  22. package/dist_ts/data/immutableimage.js +45 -5
  23. package/dist_ts/data/index.d.ts +1 -1
  24. package/dist_ts/data/isolatedrestore.d.ts +139 -21
  25. package/dist_ts/data/isolatedrestore.golden.d.ts +0 -1
  26. package/dist_ts/data/isolatedrestore.golden.js +6 -9
  27. package/dist_ts/data/isolatedrestore.js +176 -40
  28. package/dist_ts/data/mail.d.ts +1 -1
  29. package/dist_ts/data/networkaddressplan.d.ts +8 -8
  30. package/dist_ts/data/networkaddressplan.js +4 -4
  31. package/dist_ts/data/networkauthority.d.ts +20 -22
  32. package/dist_ts/data/networkauthority.js +26 -28
  33. package/dist_ts/data/networkcredential.d.ts +10 -10
  34. package/dist_ts/data/networkcredential.js +16 -16
  35. package/dist_ts/data/networkdelivery.d.ts +18 -18
  36. package/dist_ts/data/networkdelivery.js +16 -16
  37. package/dist_ts/data/networklease.d.ts +18 -7
  38. package/dist_ts/data/networklease.js +29 -7
  39. package/dist_ts/data/networknode.d.ts +2 -2
  40. package/dist_ts/data/networkprojection.d.ts +59 -60
  41. package/dist_ts/data/networkprojection.js +53 -57
  42. package/dist_ts/data/networkprotection.d.ts +27 -28
  43. package/dist_ts/data/networkprotection.js +36 -36
  44. package/dist_ts/data/networkrouter.d.ts +11 -11
  45. package/dist_ts/data/networkrouter.js +1 -1
  46. package/dist_ts/data/networksigning.d.ts +16 -18
  47. package/dist_ts/data/networksigning.js +20 -21
  48. package/dist_ts/data/nodecredential.d.ts +4 -6
  49. package/dist_ts/data/nodeenrollment.d.ts +35 -40
  50. package/dist_ts/data/nodeenrollment.js +57 -72
  51. package/dist_ts/data/privatenetwork.d.ts +21 -24
  52. package/dist_ts/data/privatenetwork.js +39 -54
  53. package/dist_ts/data/runtimeassignment.d.ts +50 -34
  54. package/dist_ts/data/runtimeassignment.js +79 -45
  55. package/dist_ts/data/runtimeconfig.d.ts +21 -22
  56. package/dist_ts/data/runtimeconfig.js +24 -24
  57. package/dist_ts/data/runtimesession.d.ts +100 -62
  58. package/dist_ts/data/runtimesession.js +98 -79
  59. package/dist_ts/data/runtimeterminalreceipt.d.ts +28 -29
  60. package/dist_ts/data/runtimeterminalreceipt.js +42 -42
  61. package/dist_ts/data/secret.d.ts +18 -25
  62. package/dist_ts/data/secret.js +12 -52
  63. package/dist_ts/data/servicecredential.d.ts +14 -16
  64. package/dist_ts/data/servicecredential.js +17 -28
  65. package/dist_ts/data/serviceruntime.d.ts +7 -7
  66. package/dist_ts/data/serviceruntime.js +4 -4
  67. package/dist_ts/data/sparknodereport.d.ts +27 -14
  68. package/dist_ts/data/sparknodereport.js +35 -28
  69. package/dist_ts/data/webpush.d.ts +0 -1
  70. package/dist_ts/index.d.ts +2 -1
  71. package/dist_ts/index.js +3 -2
  72. package/dist_ts/platform/objectstorageretention.d.ts +21 -24
  73. package/dist_ts/platform/objectstorageretention.js +10 -17
  74. package/dist_ts/platform/storage.d.ts +1 -3
  75. package/dist_ts/platform/storagemigration.d.ts +0 -7
  76. package/dist_ts/platform/storagemigration.golden.d.ts +0 -1
  77. package/dist_ts/platform/storagemigration.golden.js +8 -12
  78. package/dist_ts/platform/storagemigration.js +6 -51
  79. package/dist_ts/platform/types.d.ts +2 -2
  80. package/dist_ts/private/canonicaljson.d.ts +9 -1
  81. package/dist_ts/private/canonicaljson.js +14 -2
  82. package/dist_ts/private/dataproperties.d.ts +62 -0
  83. package/dist_ts/private/dataproperties.js +117 -0
  84. package/dist_ts/private/networkcontract.d.ts +10 -10
  85. package/dist_ts/private/networkcontract.js +1 -1
  86. package/dist_ts/private/releaseversion.d.ts +37 -0
  87. package/dist_ts/private/releaseversion.js +48 -0
  88. package/dist_ts/private/runtimepolicy.d.ts +2 -2
  89. package/dist_ts/private/runtimepolicy.js +1 -1
  90. package/dist_ts/private/tokenlist.d.ts +9 -0
  91. package/dist_ts/private/tokenlist.js +23 -0
  92. package/dist_ts/protocol.d.ts +137 -0
  93. package/dist_ts/protocol.js +255 -0
  94. package/dist_ts/requests/admin.d.ts +8 -8
  95. package/dist_ts/requests/backup.d.ts +102 -112
  96. package/dist_ts/requests/cluster.d.ts +10 -10
  97. package/dist_ts/requests/clusteringress.d.ts +9 -0
  98. package/dist_ts/requests/clusteringress.js +1 -1
  99. package/dist_ts/requests/config.d.ts +3 -3
  100. package/dist_ts/requests/corestore.d.ts +0 -3
  101. package/dist_ts/requests/corestore.js +5 -9
  102. package/dist_ts/requests/network.d.ts +30 -30
  103. package/dist_ts/requests/node.d.ts +15 -28
  104. package/dist_ts/requests/pallet.d.ts +13 -13
  105. package/dist_ts/requests/runtimesession.d.ts +53 -41
  106. package/dist_ts/requests/secret.d.ts +4 -5
  107. package/dist_ts/requests/secret.js +1 -5
  108. package/dist_ts/runtime.corestore.d.ts +56 -74
  109. package/dist_ts/runtime.corestore.databaseexportpackage.d.ts +30 -36
  110. package/dist_ts/runtime.corestore.databaseexportpackage.golden.d.ts +11 -12
  111. package/dist_ts/runtime.corestore.databaseexportpackage.golden.js +54 -71
  112. package/dist_ts/runtime.corestore.databaseexportpackage.js +9 -25
  113. package/dist_ts/runtime.corestore.js +35 -135
  114. package/dist_ts/runtime.corestore.relay.js +2 -7
  115. package/dist_ts/runtime.d.ts +38 -48
  116. package/dist_ts/runtime.js +20 -77
  117. package/dist_ts/runtime.networkprojection.d.ts +4 -4
  118. package/dist_ts/runtime.networkprojection.js +18 -18
  119. package/dist_ts/runtime.workloadinit.d.ts +23 -24
  120. package/dist_ts/runtime.workloadinit.js +6 -13
  121. package/package.json +2 -2
  122. package/readme.md +421 -270
  123. package/ts/00_commitinfo_data.ts +3 -3
  124. package/ts/appstore/types.ts +4 -6
  125. package/ts/data/backup.ts +3 -38
  126. package/ts/data/cluster.ts +51 -34
  127. package/ts/data/clusteringress.ts +12 -12
  128. package/ts/data/clusternode.ts +204 -232
  129. package/ts/data/coremail.runtime.ts +4 -21
  130. package/ts/data/coremail.ts +3 -7
  131. package/ts/data/deploymentadoption.ts +46 -4
  132. package/ts/data/deploymentoperation.ts +16 -1
  133. package/ts/data/deploymentpreflight.ts +0 -2
  134. package/ts/data/immutableimage.ts +71 -24
  135. package/ts/data/index.ts +1 -1
  136. package/ts/data/isolatedrestore.golden.ts +5 -9
  137. package/ts/data/isolatedrestore.ts +339 -54
  138. package/ts/data/mail.ts +1 -1
  139. package/ts/data/networkaddressplan.ts +13 -13
  140. package/ts/data/networkauthority.ts +42 -46
  141. package/ts/data/networkcredential.ts +24 -24
  142. package/ts/data/networkdelivery.ts +27 -27
  143. package/ts/data/networklease.ts +40 -13
  144. package/ts/data/networknode.ts +2 -2
  145. package/ts/data/networkprojection.ts +119 -124
  146. package/ts/data/networkprotection.ts +54 -55
  147. package/ts/data/networkrouter.ts +14 -14
  148. package/ts/data/networksigning.ts +29 -32
  149. package/ts/data/nodecredential.ts +4 -6
  150. package/ts/data/nodeenrollment.ts +96 -114
  151. package/ts/data/privatenetwork.ts +58 -74
  152. package/ts/data/runtimeassignment.ts +143 -94
  153. package/ts/data/runtimeconfig.ts +45 -46
  154. package/ts/data/runtimesession.ts +185 -138
  155. package/ts/data/runtimeterminalreceipt.ts +72 -73
  156. package/ts/data/secret.ts +28 -76
  157. package/ts/data/servicecredential.ts +33 -43
  158. package/ts/data/serviceruntime.ts +11 -11
  159. package/ts/data/sparknodereport.ts +48 -36
  160. package/ts/data/webpush.ts +0 -1
  161. package/ts/index.ts +2 -0
  162. package/ts/platform/objectstorageretention.ts +40 -54
  163. package/ts/platform/storage.ts +1 -3
  164. package/ts/platform/storagemigration.golden.ts +7 -11
  165. package/ts/platform/storagemigration.ts +5 -55
  166. package/ts/platform/types.ts +2 -2
  167. package/ts/private/canonicaljson.ts +13 -1
  168. package/ts/private/dataproperties.ts +139 -0
  169. package/ts/private/networkcontract.ts +9 -9
  170. package/ts/private/releaseversion.ts +70 -0
  171. package/ts/private/runtimepolicy.ts +2 -2
  172. package/ts/private/tokenlist.ts +30 -0
  173. package/ts/protocol.ts +364 -0
  174. package/ts/requests/admin.ts +11 -11
  175. package/ts/requests/backup.ts +112 -117
  176. package/ts/requests/cluster.ts +13 -13
  177. package/ts/requests/clusteringress.ts +9 -0
  178. package/ts/requests/config.ts +3 -3
  179. package/ts/requests/corestore.ts +4 -16
  180. package/ts/requests/network.ts +40 -40
  181. package/ts/requests/node.ts +21 -38
  182. package/ts/requests/pallet.ts +17 -17
  183. package/ts/requests/runtimesession.ts +63 -51
  184. package/ts/requests/secret.ts +5 -10
  185. package/ts/runtime.corestore.databaseexportpackage.golden.ts +77 -95
  186. package/ts/runtime.corestore.databaseexportpackage.ts +51 -73
  187. package/ts/runtime.corestore.relay.ts +1 -10
  188. package/ts/runtime.corestore.ts +118 -268
  189. package/ts/runtime.networkprojection.ts +30 -30
  190. package/ts/runtime.ts +83 -158
  191. package/ts/runtime.workloadinit.ts +36 -48
  192. package/dist_ts/runtime.cloudlylegacydeploymentsettlement.d.ts +0 -902
  193. package/dist_ts/runtime.cloudlylegacydeploymentsettlement.golden.d.ts +0 -35
  194. package/dist_ts/runtime.cloudlylegacydeploymentsettlement.golden.js +0 -315
  195. package/dist_ts/runtime.cloudlylegacydeploymentsettlement.js +0 -3315
  196. package/dist_ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.d.ts +0 -291
  197. package/dist_ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.golden.d.ts +0 -30
  198. package/dist_ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.golden.js +0 -408
  199. package/dist_ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.js +0 -1126
  200. package/ts/runtime.cloudlylegacydeploymentsettlement.golden.ts +0 -421
  201. package/ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.golden.ts +0 -510
  202. package/ts/runtime.cloudlylegacydeploymentsettlement.offlineexport.ts +0 -2470
  203. 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 ICorestoreDatabaseExportPackageInputIdentityV1 {
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 ICorestoreDatabaseExportPackageApprovedBackupIdentityV1 {
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 ICorestoreDatabaseExportPackageAllocationAbsentExpectationV1 {
63
+ export interface ICorestoreDatabaseExportPackageAllocationAbsentExpectation {
64
64
  expectation: 'absent';
65
65
  }
66
66
 
67
- export interface ICorestoreDatabaseExportPackageAllocationExactExpectationV1 {
67
+ export interface ICorestoreDatabaseExportPackageAllocationExactExpectation {
68
68
  expectation: 'exact';
69
69
  allocation: ICorestoreDatabaseAllocationReference;
70
70
  }
71
71
 
72
- export type TCorestoreDatabaseExportPackageAllocationExpectationV1 =
73
- | ICorestoreDatabaseExportPackageAllocationAbsentExpectationV1
74
- | ICorestoreDatabaseExportPackageAllocationExactExpectationV1;
72
+ export type TCorestoreDatabaseExportPackageAllocationExpectation =
73
+ | ICorestoreDatabaseExportPackageAllocationAbsentExpectation
74
+ | ICorestoreDatabaseExportPackageAllocationExactExpectation;
75
75
 
76
- export interface ICorestoreDatabaseExportPackageRequestV1 {
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: ICorestoreDatabaseExportPackageInputIdentityV1;
82
- approvedSourceBackup: ICorestoreDatabaseExportPackageApprovedBackupIdentityV1;
80
+ input: ICorestoreDatabaseExportPackageInputIdentity;
81
+ approvedSourceBackup: ICorestoreDatabaseExportPackageApprovedBackupIdentity;
83
82
  completeOutputReceiptSha256: string;
84
- allocationExpectation: TCorestoreDatabaseExportPackageAllocationExpectationV1;
83
+ allocationExpectation: TCorestoreDatabaseExportPackageAllocationExpectation;
85
84
  }
86
85
 
87
- export interface ICorestoreDatabaseExportPackageCompletionV1 {
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 ICorestoreDatabaseExportPackageResponseV1 {
100
- schemaVersion: 1;
97
+ export interface ICorestoreDatabaseExportPackageResponse {
101
98
  kind: 'corestore-database-export-package-response';
102
- completion: ICorestoreDatabaseExportPackageCompletionV1;
99
+ completion: ICorestoreDatabaseExportPackageCompletion;
103
100
  replayed: boolean;
104
101
  }
105
102
 
106
- export interface ICorestoreDatabaseExportPackageReleaseRequestV1 {
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 ICorestoreDatabaseExportPackageReleaseCompletionV1 {
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 ICorestoreDatabaseExportPackageReleaseResponseV1 {
130
- schemaVersion: 1;
124
+ export interface ICorestoreDatabaseExportPackageReleaseResponse {
131
125
  kind: 'corestore-database-export-package-release-response';
132
- release: ICorestoreDatabaseExportPackageReleaseCompletionV1;
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 = ['schemaVersion', 'kind', 'completion', 'replayed'] as const;
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 = ['schemaVersion', 'kind', 'release', 'replayed'] as const;
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
- ): ICorestoreDatabaseExportPackageInputIdentityV1 => {
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<ICorestoreDatabaseExportPackageInputIdentityV1> => finalize(
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
- ): ICorestoreDatabaseExportPackageApprovedBackupIdentityV1 => {
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<ICorestoreDatabaseExportPackageApprovedBackupIdentityV1> => finalize(
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
- ): TCorestoreDatabaseExportPackageAllocationExpectationV1 => {
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<TCorestoreDatabaseExportPackageAllocationExpectationV1> => finalize(
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<ICorestoreDatabaseExportPackageRequestV1> => {
411
+ ): Readonly<ICorestoreDatabaseExportPackageRequest> => {
422
412
  const value = readRecord(valueArg, 'databaseExportPackageRequest');
423
413
  assertExactKeys(value, requestKeys, 'databaseExportPackageRequest');
424
- if (value.schemaVersion !== 1
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 ICorestoreDatabaseExportPackageRequestV1, 'databaseExportPackageRequest');
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<ICorestoreDatabaseExportPackageCompletionV1> => {
473
+ ): Readonly<ICorestoreDatabaseExportPackageCompletion> => {
486
474
  const value = readRecord(valueArg, 'databaseExportPackageCompletion');
487
475
  assertExactKeys(value, completionKeys, 'databaseExportPackageCompletion');
488
- if (value.schemaVersion !== 1
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 ICorestoreDatabaseExportPackageCompletionV1, 'databaseExportPackageCompletion');
522
+ } satisfies ICorestoreDatabaseExportPackageCompletion, 'databaseExportPackageCompletion');
537
523
  };
538
524
 
539
525
  export const normalizeCorestoreDatabaseExportPackageCompletionForRequest = (
540
526
  completionArg: unknown,
541
527
  requestArg: unknown,
542
- ): Readonly<ICorestoreDatabaseExportPackageCompletionV1> => {
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<ICorestoreDatabaseExportPackageResponseV1> => {
569
+ ): Readonly<ICorestoreDatabaseExportPackageResponse> => {
584
570
  const value = readRecord(valueArg, 'databaseExportPackageResponse');
585
571
  assertExactKeys(value, responseKeys, 'databaseExportPackageResponse');
586
- if (value.schemaVersion !== 1
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 ICorestoreDatabaseExportPackageCompletionV1,
579
+ ) as ICorestoreDatabaseExportPackageCompletion,
596
580
  replayed: readBoolean(value.replayed, 'databaseExportPackageResponse.replayed'),
597
- } satisfies ICorestoreDatabaseExportPackageResponseV1, 'databaseExportPackageResponse');
581
+ } satisfies ICorestoreDatabaseExportPackageResponse, 'databaseExportPackageResponse');
598
582
  };
599
583
 
600
584
  export const normalizeCorestoreDatabaseExportPackageResponseForRequest = (
601
585
  responseArg: unknown,
602
586
  requestArg: unknown,
603
- ): Readonly<ICorestoreDatabaseExportPackageResponseV1> => {
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<ICorestoreDatabaseExportPackageReleaseRequestV1> => {
609
+ ): Readonly<ICorestoreDatabaseExportPackageReleaseRequest> => {
626
610
  const value = readRecord(valueArg, 'databaseExportPackageReleaseRequest');
627
611
  assertExactKeys(value, releaseRequestKeys, 'databaseExportPackageReleaseRequest');
628
- if (value.schemaVersion !== 1
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 ICorestoreDatabaseExportPackageReleaseRequestV1,
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<ICorestoreDatabaseExportPackageReleaseRequestV1> => {
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<ICorestoreDatabaseExportPackageReleaseCompletionV1> => {
716
+ ): Readonly<ICorestoreDatabaseExportPackageReleaseCompletion> => {
735
717
  const value = readRecord(valueArg, 'databaseExportPackageReleaseCompletion');
736
718
  assertExactKeys(value, releaseCompletionKeys, 'databaseExportPackageReleaseCompletion');
737
- if (value.schemaVersion !== 1
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 ICorestoreDatabaseExportPackageReleaseCompletionV1,
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<ICorestoreDatabaseExportPackageReleaseCompletionV1> => {
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<ICorestoreDatabaseExportPackageReleaseResponseV1> => {
795
+ ): Readonly<ICorestoreDatabaseExportPackageReleaseResponse> => {
816
796
  const value = readRecord(valueArg, 'databaseExportPackageReleaseResponse');
817
797
  assertExactKeys(value, releaseResponseKeys, 'databaseExportPackageReleaseResponse');
818
- if (value.schemaVersion !== 1
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 ICorestoreDatabaseExportPackageReleaseCompletionV1,
805
+ ) as ICorestoreDatabaseExportPackageReleaseCompletion,
828
806
  replayed: readBoolean(value.replayed, 'databaseExportPackageReleaseResponse.replayed'),
829
- } satisfies ICorestoreDatabaseExportPackageReleaseResponseV1,
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<ICorestoreDatabaseExportPackageReleaseResponseV1> => {
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
  *