@ankhorage/contracts 19.0.0 → 19.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 +12 -0
- package/README.md +1 -1
- package/dist/deployProvider.d.ts +5 -0
- package/dist/deployProvider.d.ts.map +1 -0
- package/dist/deployProvider.js +5 -0
- package/dist/deployProvider.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/infra/infraFields.d.ts +1 -0
- package/dist/infra/infraFields.d.ts.map +1 -1
- package/dist/infra/infraFields.js +2 -0
- package/dist/infra/infraFields.js.map +1 -1
- package/dist/infra/isInfraEnvironmentSpec.d.ts.map +1 -1
- package/dist/infra/isInfraEnvironmentSpec.js +6 -1
- package/dist/infra/isInfraEnvironmentSpec.js.map +1 -1
- package/dist/infra/isInfraWorkloadSpec.d.ts.map +1 -1
- package/dist/infra/isInfraWorkloadSpec.js +22 -2
- package/dist/infra/isInfraWorkloadSpec.js.map +1 -1
- package/dist/types/deployMonetization.d.ts +78 -0
- package/dist/types/deployMonetization.d.ts.map +1 -0
- package/dist/types/deployMonetization.js +2 -0
- package/dist/types/deployMonetization.js.map +1 -0
- package/dist/types/deployProvider.d.ts +266 -0
- package/dist/types/deployProvider.d.ts.map +1 -0
- package/dist/types/deployProvider.js +21 -0
- package/dist/types/deployProvider.js.map +1 -0
- package/dist/types/deployRelease.d.ts +128 -0
- package/dist/types/deployRelease.d.ts.map +1 -0
- package/dist/types/deployRelease.js +2 -0
- package/dist/types/deployRelease.js.map +1 -0
- package/dist/types/deployStoreListing.d.ts +91 -0
- package/dist/types/deployStoreListing.d.ts.map +1 -0
- package/dist/types/deployStoreListing.js +2 -0
- package/dist/types/deployStoreListing.js.map +1 -0
- package/dist/types/infraWorkload.d.ts +2 -0
- package/dist/types/infraWorkload.d.ts.map +1 -1
- package/dist/types/infraWorkload.js.map +1 -1
- package/package.json +5 -1
- package/src/deployProvider.test.ts +82 -0
- package/src/deployProvider.ts +4 -0
- package/src/index.ts +1 -0
- package/src/infra/infraFields.ts +3 -0
- package/src/infra/isInfraEnvironmentSpec.ts +13 -1
- package/src/infra/isInfraWorkloadSpec.ts +56 -33
- package/src/infra-published-port.test.ts +43 -0
- package/src/infra-workload.test.ts +1 -1
- package/src/types/deployMonetization.ts +106 -0
- package/src/types/deployProvider.ts +338 -0
- package/src/types/deployRelease.ts +153 -0
- package/src/types/deployStoreListing.ts +125 -0
- package/src/types/infraWorkload.ts +2 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
import type { AppDeployTargetId } from '../deploy';
|
|
2
|
+
import type { DeploymentMonetizationAdapter } from './deployMonetization';
|
|
3
|
+
import type { DeploymentReleaseAdapter } from './deployRelease';
|
|
4
|
+
import type { DeploymentStoreListingAdapter } from './deployStoreListing';
|
|
5
|
+
|
|
6
|
+
export const DEPLOYMENT_CAPABILITIES = [
|
|
7
|
+
'provision',
|
|
8
|
+
'prepare',
|
|
9
|
+
'build',
|
|
10
|
+
'publish',
|
|
11
|
+
'verify',
|
|
12
|
+
] as const;
|
|
13
|
+
|
|
14
|
+
export type DeploymentCapability = (typeof DEPLOYMENT_CAPABILITIES)[number];
|
|
15
|
+
|
|
16
|
+
export const DEPLOYMENT_PROVIDER_CAPABILITY_IDS = [
|
|
17
|
+
'setup',
|
|
18
|
+
'web-publish',
|
|
19
|
+
'android-build',
|
|
20
|
+
'android-publish',
|
|
21
|
+
'ios-build',
|
|
22
|
+
'ios-publish',
|
|
23
|
+
'store-listing',
|
|
24
|
+
'monetization',
|
|
25
|
+
'release',
|
|
26
|
+
] as const;
|
|
27
|
+
|
|
28
|
+
export type DeploymentProviderCapabilityId = (typeof DEPLOYMENT_PROVIDER_CAPABILITY_IDS)[number];
|
|
29
|
+
|
|
30
|
+
export interface DeploymentProviderCapabilityDescriptor {
|
|
31
|
+
readonly id: DeploymentProviderCapabilityId;
|
|
32
|
+
readonly targets: readonly AppDeployTargetId[];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface DeploymentProviderDescriptor {
|
|
36
|
+
readonly id: string;
|
|
37
|
+
readonly packageName: string;
|
|
38
|
+
readonly displayName: string;
|
|
39
|
+
readonly capabilities: readonly DeploymentProviderCapabilityDescriptor[];
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface DeploymentCredentialReference {
|
|
43
|
+
readonly provider: string;
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly kind: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type DeploymentSecretMaterial = string;
|
|
49
|
+
|
|
50
|
+
export type DeploymentSecretResolver = (
|
|
51
|
+
reference: DeploymentCredentialReference,
|
|
52
|
+
) => Promise<DeploymentSecretMaterial | null>;
|
|
53
|
+
|
|
54
|
+
export interface DeploymentFailure {
|
|
55
|
+
readonly code: string;
|
|
56
|
+
readonly message: string;
|
|
57
|
+
readonly target?: AppDeployTargetId;
|
|
58
|
+
readonly provider?: string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface DeploymentAuthenticationRequiredAction {
|
|
62
|
+
readonly type: 'authentication';
|
|
63
|
+
readonly provider: string;
|
|
64
|
+
readonly target?: AppDeployTargetId;
|
|
65
|
+
readonly code: string;
|
|
66
|
+
readonly message: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface DeploymentManualAction {
|
|
70
|
+
readonly type: 'manual-action';
|
|
71
|
+
readonly target: AppDeployTargetId;
|
|
72
|
+
readonly provider?: string;
|
|
73
|
+
readonly code: string;
|
|
74
|
+
readonly message: string;
|
|
75
|
+
readonly url?: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export type DeploymentRequiredAction =
|
|
79
|
+
DeploymentAuthenticationRequiredAction | DeploymentManualAction;
|
|
80
|
+
|
|
81
|
+
export type DeploymentProviderResult<T> =
|
|
82
|
+
| { readonly status: 'completed'; readonly value: T }
|
|
83
|
+
| { readonly status: 'action-required'; readonly action: DeploymentRequiredAction }
|
|
84
|
+
| { readonly status: 'failed'; readonly failure: DeploymentFailure };
|
|
85
|
+
|
|
86
|
+
export type DeploymentAuthenticationState =
|
|
87
|
+
| { readonly status: 'authenticated' }
|
|
88
|
+
| {
|
|
89
|
+
readonly status: 'required';
|
|
90
|
+
readonly action: DeploymentAuthenticationRequiredAction;
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
export interface DeploymentProviderCapabilityState {
|
|
94
|
+
readonly capability: DeploymentCapability;
|
|
95
|
+
readonly status: 'available' | 'unavailable';
|
|
96
|
+
readonly reason?: string;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface DeploymentAutomatedProvisioningRequirement {
|
|
100
|
+
readonly type: 'automated';
|
|
101
|
+
readonly id: string;
|
|
102
|
+
readonly provider: string;
|
|
103
|
+
readonly target?: AppDeployTargetId;
|
|
104
|
+
readonly code: string;
|
|
105
|
+
readonly message: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export type DeploymentProvisioningRequirement =
|
|
109
|
+
| DeploymentAutomatedProvisioningRequirement
|
|
110
|
+
| { readonly type: 'authentication'; readonly action: DeploymentAuthenticationRequiredAction }
|
|
111
|
+
| { readonly type: 'manual-action'; readonly action: DeploymentManualAction };
|
|
112
|
+
|
|
113
|
+
export interface DeploymentProviderSetupContext {
|
|
114
|
+
readonly target?: AppDeployTargetId;
|
|
115
|
+
readonly credentials: readonly DeploymentCredentialReference[];
|
|
116
|
+
readonly resolveSecret: DeploymentSecretResolver;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export interface DeploymentProviderSetupInspection {
|
|
120
|
+
readonly provider: string;
|
|
121
|
+
readonly authentication: DeploymentAuthenticationState;
|
|
122
|
+
readonly capabilities: readonly DeploymentProviderCapabilityState[];
|
|
123
|
+
readonly provisioning: readonly DeploymentProvisioningRequirement[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export interface DeploymentProviderSetupAdapter {
|
|
127
|
+
readonly provider: string;
|
|
128
|
+
inspectSetup(context: DeploymentProviderSetupContext): Promise<DeploymentProviderSetupInspection>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type DeploymentStoreIdentity =
|
|
132
|
+
| { readonly target: 'android'; readonly packageName: string }
|
|
133
|
+
| { readonly target: 'ios'; readonly bundleIdentifier: string };
|
|
134
|
+
|
|
135
|
+
export interface WebDeploymentPublishIntent {
|
|
136
|
+
readonly mode: 'preview' | 'production';
|
|
137
|
+
readonly alias?: string;
|
|
138
|
+
readonly environment?: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface WebDeploymentPublication {
|
|
142
|
+
readonly target: 'web';
|
|
143
|
+
readonly revision: string;
|
|
144
|
+
readonly provider: string;
|
|
145
|
+
readonly deploymentId: string;
|
|
146
|
+
readonly url: string;
|
|
147
|
+
readonly production: boolean;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export interface WebDeploymentPublishRequest {
|
|
151
|
+
readonly projectRoot: string;
|
|
152
|
+
readonly exportDirectory: string;
|
|
153
|
+
readonly revision: string;
|
|
154
|
+
readonly intent: WebDeploymentPublishIntent;
|
|
155
|
+
readonly credentials: readonly DeploymentCredentialReference[];
|
|
156
|
+
readonly resolveSecret: DeploymentSecretResolver;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface WebDeploymentPublisher {
|
|
160
|
+
publishAsync(
|
|
161
|
+
request: WebDeploymentPublishRequest,
|
|
162
|
+
): Promise<DeploymentProviderResult<WebDeploymentPublication>>;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export const ANDROID_DEPLOYMENT_TRACKS = ['internal', 'alpha', 'beta', 'production'] as const;
|
|
166
|
+
export type AndroidDeploymentTrack = (typeof ANDROID_DEPLOYMENT_TRACKS)[number];
|
|
167
|
+
|
|
168
|
+
export const ANDROID_RELEASE_STATUSES = ['draft', 'completed'] as const;
|
|
169
|
+
export type AndroidReleaseStatus = (typeof ANDROID_RELEASE_STATUSES)[number];
|
|
170
|
+
|
|
171
|
+
export interface AndroidDeploymentIntent {
|
|
172
|
+
readonly buildProfile: string;
|
|
173
|
+
readonly track: AndroidDeploymentTrack;
|
|
174
|
+
readonly releaseStatus: AndroidReleaseStatus;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export interface AndroidBuildInspectionRequest {
|
|
178
|
+
readonly projectRoot: string;
|
|
179
|
+
readonly packageName: string;
|
|
180
|
+
readonly buildProfile: string;
|
|
181
|
+
readonly credentials: readonly DeploymentCredentialReference[];
|
|
182
|
+
readonly resolveSecret: DeploymentSecretResolver;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface AndroidBuildInspection {
|
|
186
|
+
readonly fingerprint: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface AndroidBuildRequest extends AndroidBuildInspectionRequest {
|
|
190
|
+
readonly expectedFingerprint: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export interface AndroidBuildArtifact {
|
|
194
|
+
readonly provider: string;
|
|
195
|
+
readonly buildId: string;
|
|
196
|
+
readonly buildProfile: string;
|
|
197
|
+
readonly fingerprint: string;
|
|
198
|
+
readonly versionCode: number;
|
|
199
|
+
readonly archiveUrl: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export interface AndroidDeploymentBuilder {
|
|
203
|
+
inspectAsync(
|
|
204
|
+
request: AndroidBuildInspectionRequest,
|
|
205
|
+
): Promise<DeploymentProviderResult<AndroidBuildInspection>>;
|
|
206
|
+
buildAsync(request: AndroidBuildRequest): Promise<DeploymentProviderResult<AndroidBuildArtifact>>;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface AndroidPublishInspectionRequest {
|
|
210
|
+
readonly packageName: string;
|
|
211
|
+
readonly track: AndroidDeploymentTrack;
|
|
212
|
+
readonly credentials: readonly DeploymentCredentialReference[];
|
|
213
|
+
readonly resolveSecret: DeploymentSecretResolver;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface AndroidPublishInspection {
|
|
217
|
+
readonly track: AndroidDeploymentTrack;
|
|
218
|
+
readonly activeVersionCodes: readonly number[];
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export interface AndroidPublishRequest extends AndroidPublishInspectionRequest {
|
|
222
|
+
readonly revision: string;
|
|
223
|
+
readonly releaseStatus: AndroidReleaseStatus;
|
|
224
|
+
readonly artifact: AndroidBuildArtifact;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface AndroidDeploymentPublication {
|
|
228
|
+
readonly target: 'android';
|
|
229
|
+
readonly revision: string;
|
|
230
|
+
readonly buildProvider: string;
|
|
231
|
+
readonly publishProvider: string;
|
|
232
|
+
readonly buildId: string;
|
|
233
|
+
readonly versionCode: number;
|
|
234
|
+
readonly track: AndroidDeploymentTrack;
|
|
235
|
+
readonly releaseStatus: AndroidReleaseStatus;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface AndroidDeploymentPublisher {
|
|
239
|
+
inspectAsync(
|
|
240
|
+
request: AndroidPublishInspectionRequest,
|
|
241
|
+
): Promise<DeploymentProviderResult<AndroidPublishInspection>>;
|
|
242
|
+
publishAsync(
|
|
243
|
+
request: AndroidPublishRequest,
|
|
244
|
+
): Promise<DeploymentProviderResult<AndroidDeploymentPublication>>;
|
|
245
|
+
verifyAsync(
|
|
246
|
+
request: AndroidPublishRequest,
|
|
247
|
+
): Promise<DeploymentProviderResult<AndroidPublishInspection>>;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export interface IosDeploymentIntent {
|
|
251
|
+
readonly buildProfile: string;
|
|
252
|
+
readonly version: string;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface IosBuildInspectionRequest {
|
|
256
|
+
readonly projectRoot: string;
|
|
257
|
+
readonly bundleIdentifier: string;
|
|
258
|
+
readonly buildProfile: string;
|
|
259
|
+
readonly credentials: readonly DeploymentCredentialReference[];
|
|
260
|
+
readonly resolveSecret: DeploymentSecretResolver;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
export interface IosBuildInspection {
|
|
264
|
+
readonly fingerprint: string;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface IosBuildRequest extends IosBuildInspectionRequest {
|
|
268
|
+
readonly expectedFingerprint: string;
|
|
269
|
+
readonly version: string;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface IosBuildArtifact {
|
|
273
|
+
readonly provider: string;
|
|
274
|
+
readonly buildId: string;
|
|
275
|
+
readonly buildProfile: string;
|
|
276
|
+
readonly fingerprint: string;
|
|
277
|
+
readonly version: string;
|
|
278
|
+
readonly buildNumber: string;
|
|
279
|
+
readonly archiveUrl: string;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface IosDeploymentBuilder {
|
|
283
|
+
inspectAsync(
|
|
284
|
+
request: IosBuildInspectionRequest,
|
|
285
|
+
): Promise<DeploymentProviderResult<IosBuildInspection>>;
|
|
286
|
+
buildAsync(request: IosBuildRequest): Promise<DeploymentProviderResult<IosBuildArtifact>>;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
export interface IosPublishInspectionRequest {
|
|
290
|
+
readonly bundleIdentifier: string;
|
|
291
|
+
readonly version: string;
|
|
292
|
+
readonly credentials: readonly DeploymentCredentialReference[];
|
|
293
|
+
readonly resolveSecret: DeploymentSecretResolver;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface IosPublishInspection {
|
|
297
|
+
readonly bundleIdentifier: string;
|
|
298
|
+
readonly version: string | null;
|
|
299
|
+
readonly buildNumber: string | null;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface IosPublishRequest extends IosPublishInspectionRequest {
|
|
303
|
+
readonly revision: string;
|
|
304
|
+
readonly artifact: IosBuildArtifact;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export interface IosDeploymentPublication {
|
|
308
|
+
readonly target: 'ios';
|
|
309
|
+
readonly revision: string;
|
|
310
|
+
readonly buildProvider: string;
|
|
311
|
+
readonly publishProvider: string;
|
|
312
|
+
readonly buildId: string;
|
|
313
|
+
readonly version: string;
|
|
314
|
+
readonly buildNumber: string;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export interface IosDeploymentPublisher {
|
|
318
|
+
inspectAsync(
|
|
319
|
+
request: IosPublishInspectionRequest,
|
|
320
|
+
): Promise<DeploymentProviderResult<IosPublishInspection>>;
|
|
321
|
+
publishAsync(
|
|
322
|
+
request: IosPublishRequest,
|
|
323
|
+
): Promise<DeploymentProviderResult<IosDeploymentPublication>>;
|
|
324
|
+
verifyAsync(request: IosPublishRequest): Promise<DeploymentProviderResult<IosPublishInspection>>;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export interface DeploymentProviderRegistration {
|
|
328
|
+
readonly descriptor: DeploymentProviderDescriptor;
|
|
329
|
+
readonly setup?: DeploymentProviderSetupAdapter;
|
|
330
|
+
readonly webPublisher?: WebDeploymentPublisher;
|
|
331
|
+
readonly androidBuilder?: AndroidDeploymentBuilder;
|
|
332
|
+
readonly androidPublisher?: AndroidDeploymentPublisher;
|
|
333
|
+
readonly iosBuilder?: IosDeploymentBuilder;
|
|
334
|
+
readonly iosPublisher?: IosDeploymentPublisher;
|
|
335
|
+
readonly storeListing?: DeploymentStoreListingAdapter;
|
|
336
|
+
readonly monetization?: DeploymentMonetizationAdapter;
|
|
337
|
+
readonly release?: DeploymentReleaseAdapter;
|
|
338
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
DeploymentCredentialReference,
|
|
3
|
+
DeploymentProviderResult,
|
|
4
|
+
DeploymentSecretResolver,
|
|
5
|
+
DeploymentStoreIdentity,
|
|
6
|
+
} from './deployProvider';
|
|
7
|
+
|
|
8
|
+
export type ReleaseTarget = 'web' | 'android' | 'ios';
|
|
9
|
+
export type ReleaseRolloutMode = 'immediate' | 'staged';
|
|
10
|
+
|
|
11
|
+
export interface ReleaseNote {
|
|
12
|
+
readonly locale: string;
|
|
13
|
+
readonly text: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ReleaseTargetRollout {
|
|
17
|
+
readonly mode: ReleaseRolloutMode;
|
|
18
|
+
readonly initialFraction?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ReleaseRollout {
|
|
22
|
+
readonly web?: ReleaseTargetRollout;
|
|
23
|
+
readonly android?: ReleaseTargetRollout;
|
|
24
|
+
readonly ios?: ReleaseTargetRollout;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ReleaseDesiredState {
|
|
28
|
+
readonly version: string;
|
|
29
|
+
readonly targets: readonly ReleaseTarget[];
|
|
30
|
+
readonly notes: readonly ReleaseNote[];
|
|
31
|
+
readonly rollout: ReleaseRollout;
|
|
32
|
+
readonly revision: string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface ReleaseObservedWebState {
|
|
36
|
+
readonly target: 'web';
|
|
37
|
+
readonly version: string | null;
|
|
38
|
+
readonly artifactRevision: string | null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface ReleaseObservedAndroidState {
|
|
42
|
+
readonly target: 'android';
|
|
43
|
+
readonly version: string | null;
|
|
44
|
+
readonly artifactRevision: string | null;
|
|
45
|
+
readonly versionCodes: readonly string[];
|
|
46
|
+
readonly releaseNotes: readonly ReleaseNote[];
|
|
47
|
+
readonly rolloutStatus: 'missing' | 'draft' | 'inProgress' | 'halted' | 'completed';
|
|
48
|
+
readonly userFraction?: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ReleaseObservedIosState {
|
|
52
|
+
readonly target: 'ios';
|
|
53
|
+
readonly version: string | null;
|
|
54
|
+
readonly artifactRevision: string | null;
|
|
55
|
+
readonly buildNumber: string | null;
|
|
56
|
+
readonly releaseNotes: readonly ReleaseNote[];
|
|
57
|
+
readonly appVersionState?: string;
|
|
58
|
+
readonly releaseType?: string;
|
|
59
|
+
readonly reviewState?: string;
|
|
60
|
+
readonly phasedReleaseState: 'INACTIVE' | 'ACTIVE' | 'PAUSED' | 'COMPLETE' | null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type ReleaseObservedTargetState =
|
|
64
|
+
ReleaseObservedWebState | ReleaseObservedAndroidState | ReleaseObservedIosState;
|
|
65
|
+
|
|
66
|
+
export interface ReleaseObservedState {
|
|
67
|
+
readonly targets: readonly ReleaseObservedTargetState[];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export type ReleasePlanStatus = 'no-change' | 'changes' | 'waiting' | 'blocked';
|
|
71
|
+
export type ReleaseStepRetry = 'safe' | 'reinspect' | 'never';
|
|
72
|
+
export type ReleaseStepOperation =
|
|
73
|
+
| 'prepare'
|
|
74
|
+
| 'build'
|
|
75
|
+
| 'publish'
|
|
76
|
+
| 'sync-notes'
|
|
77
|
+
| 'submit-review'
|
|
78
|
+
| 'release'
|
|
79
|
+
| 'rollout'
|
|
80
|
+
| 'verify'
|
|
81
|
+
| 'record';
|
|
82
|
+
|
|
83
|
+
export interface ReleaseDiagnostic {
|
|
84
|
+
readonly severity: 'warning' | 'error';
|
|
85
|
+
readonly code: string;
|
|
86
|
+
readonly message: string;
|
|
87
|
+
readonly target?: ReleaseTarget | 'release';
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface ReleasePlanStep {
|
|
91
|
+
readonly id: string;
|
|
92
|
+
readonly target: ReleaseTarget | 'release';
|
|
93
|
+
readonly operation: ReleaseStepOperation;
|
|
94
|
+
readonly dependsOn: readonly string[];
|
|
95
|
+
readonly retry: ReleaseStepRetry;
|
|
96
|
+
readonly irreversible: boolean;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export interface ReleasePlan {
|
|
100
|
+
readonly status: ReleasePlanStatus;
|
|
101
|
+
readonly desiredRevision: string;
|
|
102
|
+
readonly currentRevision: string;
|
|
103
|
+
readonly steps: readonly ReleasePlanStep[];
|
|
104
|
+
readonly diagnostics: readonly ReleaseDiagnostic[];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type ReleaseLifecycleControl =
|
|
108
|
+
| { readonly target: 'android'; readonly action: 'halt' | 'resume' }
|
|
109
|
+
| {
|
|
110
|
+
readonly target: 'ios';
|
|
111
|
+
readonly action: 'pause-phased' | 'resume-phased' | 'cancel-phased' | 'cancel-review';
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export type ReleaseMutationResult =
|
|
115
|
+
| { readonly status: 'completed' }
|
|
116
|
+
| { readonly status: 'blocked'; readonly code: string }
|
|
117
|
+
| { readonly status: 'failed'; readonly code: string };
|
|
118
|
+
|
|
119
|
+
export type ReleaseControlExecutionResult =
|
|
120
|
+
| { readonly status: 'completed'; readonly mutationAttempted: boolean }
|
|
121
|
+
| { readonly status: 'blocked'; readonly mutationAttempted: false; readonly code: string }
|
|
122
|
+
| { readonly status: 'failed'; readonly mutationAttempted: boolean; readonly code: string };
|
|
123
|
+
|
|
124
|
+
export interface ReleaseAdapterContext {
|
|
125
|
+
readonly identity: DeploymentStoreIdentity;
|
|
126
|
+
readonly credentials: readonly DeploymentCredentialReference[];
|
|
127
|
+
readonly resolveSecret: DeploymentSecretResolver;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface ReleaseInspectionRequest extends ReleaseAdapterContext {
|
|
131
|
+
readonly version: string;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export interface ReleaseStepExecutionRequest extends ReleaseAdapterContext {
|
|
135
|
+
readonly desired: ReleaseDesiredState;
|
|
136
|
+
readonly step: ReleasePlanStep;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface ReleaseControlRequest extends ReleaseAdapterContext {
|
|
140
|
+
readonly desired: ReleaseDesiredState;
|
|
141
|
+
readonly control: ReleaseLifecycleControl;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export type ReleaseObservedNativeState = ReleaseObservedAndroidState | ReleaseObservedIosState;
|
|
145
|
+
|
|
146
|
+
export interface DeploymentReleaseAdapter {
|
|
147
|
+
readonly target: 'android' | 'ios';
|
|
148
|
+
inspectAsync(
|
|
149
|
+
request: ReleaseInspectionRequest,
|
|
150
|
+
): Promise<DeploymentProviderResult<ReleaseObservedNativeState>>;
|
|
151
|
+
executeStepAsync(request: ReleaseStepExecutionRequest): Promise<ReleaseMutationResult>;
|
|
152
|
+
controlAsync(request: ReleaseControlRequest): Promise<ReleaseControlExecutionResult>;
|
|
153
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
DeploymentCredentialReference,
|
|
3
|
+
DeploymentProviderResult,
|
|
4
|
+
DeploymentSecretResolver,
|
|
5
|
+
DeploymentStoreIdentity,
|
|
6
|
+
} from './deployProvider';
|
|
7
|
+
|
|
8
|
+
export type StoreListingTarget = 'android' | 'ios';
|
|
9
|
+
|
|
10
|
+
export type StoreListingField =
|
|
11
|
+
| 'name'
|
|
12
|
+
| 'summary'
|
|
13
|
+
| 'description'
|
|
14
|
+
| 'keywords'
|
|
15
|
+
| 'promotionalText'
|
|
16
|
+
| 'supportUrl'
|
|
17
|
+
| 'marketingUrl'
|
|
18
|
+
| 'privacyPolicyUrl'
|
|
19
|
+
| 'promoVideoUrl';
|
|
20
|
+
|
|
21
|
+
export interface StoreListingLocale {
|
|
22
|
+
readonly locale: string;
|
|
23
|
+
readonly name: string;
|
|
24
|
+
readonly summary?: string;
|
|
25
|
+
readonly description?: string;
|
|
26
|
+
readonly keywords?: readonly string[];
|
|
27
|
+
readonly promotionalText?: string;
|
|
28
|
+
readonly supportUrl?: string;
|
|
29
|
+
readonly marketingUrl?: string;
|
|
30
|
+
readonly privacyPolicyUrl?: string;
|
|
31
|
+
readonly promoVideoUrl?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type StoreListingAssetMediaType = 'image/jpeg' | 'image/png';
|
|
35
|
+
|
|
36
|
+
export interface StoreListingAsset {
|
|
37
|
+
readonly relativePath: string;
|
|
38
|
+
readonly sha256: string;
|
|
39
|
+
readonly md5: string;
|
|
40
|
+
readonly size: number;
|
|
41
|
+
readonly mediaType: StoreListingAssetMediaType;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface StoreListingAssetSet {
|
|
45
|
+
readonly target: StoreListingTarget;
|
|
46
|
+
readonly locale: string;
|
|
47
|
+
readonly variant: string;
|
|
48
|
+
readonly assets: readonly StoreListingAsset[];
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface StoreListingRemoteAssetSet {
|
|
52
|
+
readonly target: StoreListingTarget;
|
|
53
|
+
readonly locale: string;
|
|
54
|
+
readonly variant: string;
|
|
55
|
+
readonly checksum: 'md5' | 'sha256';
|
|
56
|
+
readonly hashes: readonly string[];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface StoreListingDesiredState {
|
|
60
|
+
readonly revision: string;
|
|
61
|
+
readonly locales: readonly StoreListingLocale[];
|
|
62
|
+
readonly assetSets: readonly StoreListingAssetSet[];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface StoreListingDiagnostic {
|
|
66
|
+
readonly severity: 'warning' | 'error';
|
|
67
|
+
readonly code: string;
|
|
68
|
+
readonly message: string;
|
|
69
|
+
readonly target?: StoreListingTarget;
|
|
70
|
+
readonly locale?: string;
|
|
71
|
+
readonly field?: StoreListingField;
|
|
72
|
+
readonly variant?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface StoreListingTargetState {
|
|
76
|
+
readonly target: StoreListingTarget;
|
|
77
|
+
readonly locales: readonly StoreListingLocale[];
|
|
78
|
+
readonly assetSets: readonly StoreListingRemoteAssetSet[];
|
|
79
|
+
readonly supportedFields: readonly StoreListingField[];
|
|
80
|
+
readonly diagnostics: readonly StoreListingDiagnostic[];
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type StoreListingPlanOperation = 'create-locale' | 'update-locale' | 'replace-assets';
|
|
84
|
+
|
|
85
|
+
export interface StoreListingPlanStep {
|
|
86
|
+
readonly id: string;
|
|
87
|
+
readonly target: StoreListingTarget;
|
|
88
|
+
readonly operation: StoreListingPlanOperation;
|
|
89
|
+
readonly locale: string;
|
|
90
|
+
readonly variant?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface StoreListingPlan {
|
|
94
|
+
readonly status: 'no-change' | 'changes' | 'blocked';
|
|
95
|
+
readonly desiredRevision: string;
|
|
96
|
+
readonly currentRevision: string;
|
|
97
|
+
readonly steps: readonly StoreListingPlanStep[];
|
|
98
|
+
readonly diagnostics: readonly StoreListingDiagnostic[];
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export interface StoreListingAssetReader {
|
|
102
|
+
readAsync(relativePath: string): Promise<Uint8Array>;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface StoreListingAdapterContext {
|
|
106
|
+
readonly identity: DeploymentStoreIdentity;
|
|
107
|
+
readonly credentials: readonly DeploymentCredentialReference[];
|
|
108
|
+
readonly resolveSecret: DeploymentSecretResolver;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface StoreListingSyncRequest extends StoreListingAdapterContext {
|
|
112
|
+
readonly desired: StoreListingDesiredState;
|
|
113
|
+
readonly plan: StoreListingPlan;
|
|
114
|
+
readonly assets: StoreListingAssetReader;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface DeploymentStoreListingAdapter {
|
|
118
|
+
readonly target: StoreListingTarget;
|
|
119
|
+
inspectAsync(
|
|
120
|
+
context: StoreListingAdapterContext,
|
|
121
|
+
): Promise<DeploymentProviderResult<StoreListingTargetState>>;
|
|
122
|
+
syncAsync(
|
|
123
|
+
request: StoreListingSyncRequest,
|
|
124
|
+
): Promise<DeploymentProviderResult<StoreListingTargetState>>;
|
|
125
|
+
}
|
|
@@ -28,6 +28,8 @@ export interface InfraWorkloadPort {
|
|
|
28
28
|
readonly name: string;
|
|
29
29
|
readonly port: number;
|
|
30
30
|
readonly protocol?: 'tcp' | 'udp';
|
|
31
|
+
/** Exact external listener port requested for a public single-replica workload. */
|
|
32
|
+
readonly publishedPort?: number;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
export type InfraWorkloadHealthSpec = {
|