@ericminassian/platform-core 0.3.0 → 0.4.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.
Files changed (88) hide show
  1. package/dist/api.d.ts +942 -45
  2. package/dist/api.js +372 -13
  3. package/dist/api.js.map +1 -1
  4. package/dist/auth.js +5 -2
  5. package/dist/auth.js.map +1 -1
  6. package/dist/base64url.d.ts +3 -0
  7. package/dist/base64url.js +15 -0
  8. package/dist/base64url.js.map +1 -0
  9. package/dist/bindings.d.ts +62 -12
  10. package/dist/bindings.js +1 -1
  11. package/dist/bindings.js.map +1 -1
  12. package/dist/cloudfront-function.d.ts +5 -1
  13. package/dist/cloudfront-function.js +64 -2
  14. package/dist/cloudfront-function.js.map +1 -1
  15. package/dist/compute.d.ts +52 -0
  16. package/dist/compute.js +65 -0
  17. package/dist/compute.js.map +1 -0
  18. package/dist/config.d.ts +18 -0
  19. package/dist/config.js +9 -0
  20. package/dist/config.js.map +1 -1
  21. package/dist/constants.d.ts +56 -1
  22. package/dist/constants.js +56 -1
  23. package/dist/constants.js.map +1 -1
  24. package/dist/email.d.ts +84 -0
  25. package/dist/email.js +111 -0
  26. package/dist/email.js.map +1 -0
  27. package/dist/fingerprint.d.ts +9 -0
  28. package/dist/fingerprint.js +19 -0
  29. package/dist/fingerprint.js.map +1 -0
  30. package/dist/index.d.ts +6 -0
  31. package/dist/index.js +6 -0
  32. package/dist/index.js.map +1 -1
  33. package/dist/jobs.d.ts +111 -0
  34. package/dist/jobs.js +214 -0
  35. package/dist/jobs.js.map +1 -0
  36. package/dist/manifest.d.ts +270 -29
  37. package/dist/manifest.js +190 -22
  38. package/dist/manifest.js.map +1 -1
  39. package/dist/naming.d.ts +83 -7
  40. package/dist/naming.js +89 -8
  41. package/dist/naming.js.map +1 -1
  42. package/dist/platform-api.d.ts +3733 -1278
  43. package/dist/platform-api.js +120 -8
  44. package/dist/platform-api.js.map +1 -1
  45. package/dist/realtime.d.ts +139 -0
  46. package/dist/realtime.js +201 -0
  47. package/dist/realtime.js.map +1 -0
  48. package/dist/router/decide.d.ts +2 -0
  49. package/dist/router/decide.js +38 -6
  50. package/dist/router.d.ts +35 -13
  51. package/dist/router.js +36 -0
  52. package/dist/router.js.map +1 -1
  53. package/dist/runtime-config.d.ts +57 -0
  54. package/dist/runtime-config.js +12 -0
  55. package/dist/runtime-config.js.map +1 -1
  56. package/dist/storage.d.ts +55 -0
  57. package/dist/storage.js +112 -0
  58. package/dist/storage.js.map +1 -0
  59. package/dist/telemetry.d.ts +124 -19
  60. package/dist/telemetry.js +97 -21
  61. package/dist/telemetry.js.map +1 -1
  62. package/dist/web-compute.d.ts +191 -0
  63. package/dist/web-compute.js +257 -0
  64. package/dist/web-compute.js.map +1 -0
  65. package/package.json +19 -7
  66. package/src/api.ts +445 -15
  67. package/src/auth.ts +6 -2
  68. package/src/base64url.ts +13 -0
  69. package/src/bindings.ts +67 -6
  70. package/src/cloudfront-function.ts +64 -2
  71. package/src/compute.ts +86 -0
  72. package/src/config.ts +31 -1
  73. package/src/constants.ts +64 -1
  74. package/src/email.ts +168 -0
  75. package/src/fingerprint.ts +20 -0
  76. package/src/index.ts +6 -0
  77. package/src/jobs.ts +281 -0
  78. package/src/manifest.ts +415 -45
  79. package/src/naming.ts +93 -9
  80. package/src/platform-api.ts +134 -8
  81. package/src/realtime.ts +298 -0
  82. package/src/router/decide.d.ts +2 -0
  83. package/src/router/decide.js +38 -6
  84. package/src/router.ts +33 -13
  85. package/src/runtime-config.ts +70 -0
  86. package/src/storage.ts +120 -0
  87. package/src/telemetry.ts +104 -21
  88. package/src/web-compute.ts +342 -0
package/dist/api.d.ts CHANGED
@@ -21,6 +21,30 @@ export declare const AppRecord: Schema.Struct<{
21
21
  export type AppRecord = typeof AppRecord.Type;
22
22
  export declare const StageStatus: Schema.Literals<readonly ["active", "deploying", "failed", "destroying", "destroyed"]>;
23
23
  export type StageStatus = typeof StageStatus.Type;
24
+ /** How a server runs (`WebCompute`). */
25
+ export declare const WebComputeMode: Schema.Literals<readonly ["request", "instance"]>;
26
+ /** Days in a row the other mode was cheaper enough to switch to (`ComputeStreak`). */
27
+ export declare const ComputeStreakSchema: Schema.Struct<{
28
+ readonly to: Schema.Literals<readonly ["request", "instance"]>;
29
+ readonly days: Schema.Finite;
30
+ readonly day: Schema.String;
31
+ }>;
32
+ /** A prod stage's monthly cost in each mode, estimated daily from its traffic (`simulateWebCompute`). */
33
+ export declare const ComputeEstimate: Schema.Struct<{
34
+ readonly at: Schema.String;
35
+ readonly request: Schema.Struct<{
36
+ readonly monthlyUsd: Schema.Finite;
37
+ readonly coldStartsPerMonth: Schema.Finite;
38
+ }>;
39
+ readonly instance: Schema.Struct<{
40
+ readonly monthlyUsd: Schema.Finite;
41
+ readonly environmentHoursPerMonth: Schema.Finite;
42
+ }>;
43
+ readonly requestsPerMonth: Schema.Finite;
44
+ /** Days of traffic the month is extrapolated from. */
45
+ readonly days: Schema.Finite;
46
+ }>;
47
+ export type ComputeEstimate = typeof ComputeEstimate.Type;
24
48
  export declare const StageRecord: Schema.Struct<{
25
49
  readonly app: Schema.String;
26
50
  readonly stage: Schema.String;
@@ -30,9 +54,32 @@ export declare const StageRecord: Schema.Struct<{
30
54
  readonly preview: Schema.Boolean;
31
55
  readonly currentDeployment: Schema.optional<Schema.String>;
32
56
  readonly previousDeployment: Schema.optional<Schema.String>;
33
- /** Web Function revision ids, for instant rollback. */
57
+ /** The server builds: Web Function revision ids, or request-mode function versions. */
34
58
  readonly currentRevision: Schema.optional<Schema.String>;
35
59
  readonly previousRevision: Schema.optional<Schema.String>;
60
+ /** How the live deployment's server runs. */
61
+ readonly compute: Schema.optional<Schema.Literals<readonly ["request", "instance"]>>;
62
+ /** Prod stages with a server: what each mode would cost a month. */
63
+ readonly computeEstimate: Schema.optional<Schema.Struct<{
64
+ readonly at: Schema.String;
65
+ readonly request: Schema.Struct<{
66
+ readonly monthlyUsd: Schema.Finite;
67
+ readonly coldStartsPerMonth: Schema.Finite;
68
+ }>;
69
+ readonly instance: Schema.Struct<{
70
+ readonly monthlyUsd: Schema.Finite;
71
+ readonly environmentHoursPerMonth: Schema.Finite;
72
+ }>;
73
+ readonly requestsPerMonth: Schema.Finite;
74
+ /** Days of traffic the month is extrapolated from. */
75
+ readonly days: Schema.Finite;
76
+ }>>;
77
+ /** Set while the other mode is cheaper enough; at three days the platform switches. */
78
+ readonly computeStreak: Schema.optional<Schema.Struct<{
79
+ readonly to: Schema.Literals<readonly ["request", "instance"]>;
80
+ readonly days: Schema.Finite;
81
+ readonly day: Schema.String;
82
+ }>>;
36
83
  readonly createdAt: Schema.String;
37
84
  readonly updatedAt: Schema.String;
38
85
  }>;
@@ -52,11 +99,13 @@ export declare const DeploymentRecord: Schema.Struct<{
52
99
  readonly app: Schema.String;
53
100
  readonly stage: Schema.String;
54
101
  readonly status: Schema.Literals<readonly ["awaiting_upload", "queued", "running", "succeeded", "failed", "rolled_back"]>;
55
- /** GitHub username, or `ci:<repo>` for OIDC deploys. */
102
+ /** GitHub username, `ci:<repo>` for OIDC deploys, or `platform` for a compute switch. */
56
103
  readonly actor: Schema.String;
57
104
  readonly commit: Schema.optional<Schema.String>;
58
105
  readonly ref: Schema.optional<Schema.String>;
59
106
  readonly message: Schema.optional<Schema.String>;
107
+ /** The `@ericminassian/platform` version its bundles were built with; absent before 0.4.0. */
108
+ readonly sdk: Schema.optional<Schema.String>;
60
109
  readonly manifest: Schema.optional<Schema.Struct<{
61
110
  readonly name: Schema.String;
62
111
  readonly description: Schema.optional<Schema.String>;
@@ -72,6 +121,9 @@ export declare const DeploymentRecord: Schema.Struct<{
72
121
  readonly serverRoutes: Schema.withDecodingDefault<Schema.$Array<Schema.String>, never>;
73
122
  readonly timeoutSeconds: Schema.withDecodingDefault<Schema.Int, never>;
74
123
  readonly concurrency: Schema.withDecodingDefault<Schema.Int, never>;
124
+ readonly compute: Schema.withDecodingDefault<Schema.Literals<readonly ["auto", "request", "instance"]>, never>;
125
+ readonly memoryMb: Schema.withDecodingDefault<Schema.Int, never>;
126
+ readonly maxEnvironments: Schema.optional<Schema.Int>;
75
127
  }>>;
76
128
  readonly worker: Schema.optional<Schema.Struct<{
77
129
  readonly entry: Schema.withDecodingDefault<Schema.String, never>;
@@ -84,20 +136,54 @@ export declare const DeploymentRecord: Schema.Struct<{
84
136
  }>;
85
137
  readonly db: Schema.Boolean;
86
138
  readonly queues: Schema.$Record<Schema.String, Schema.Struct<{
87
- readonly batchSize: Schema.withDecodingDefault<Schema.Int, never>;
88
- readonly maxReceiveCount: Schema.withDecodingDefault<Schema.Int, never>;
89
- readonly concurrency: Schema.optional<Schema.Int>;
90
- readonly visibilityTimeoutSeconds: Schema.Finite;
139
+ timeoutSeconds: Schema.optional<Schema.Int>;
140
+ memoryMb: Schema.optional<Schema.Int>;
141
+ maxAttempts: Schema.withDecodingDefault<Schema.Int, never>;
142
+ concurrency: Schema.optional<Schema.Int>;
91
143
  }>>;
92
144
  readonly events: Schema.$Array<Schema.String>;
145
+ readonly eventOptions: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
146
+ readonly timeoutSeconds: Schema.optional<Schema.Int>;
147
+ readonly memoryMb: Schema.optional<Schema.Int>;
148
+ readonly maxAttempts: Schema.optional<Schema.Int>;
149
+ }>>, never>;
93
150
  readonly crons: Schema.$Record<Schema.String, Schema.Struct<{
151
+ readonly timeoutSeconds: Schema.optional<Schema.Int>;
152
+ readonly memoryMb: Schema.optional<Schema.Int>;
94
153
  readonly schedule: Schema.String;
95
154
  readonly timezone: Schema.optional<Schema.String>;
155
+ readonly maxAttempts: Schema.optional<Schema.Int>;
96
156
  }>>;
97
157
  readonly storage: Schema.$Array<Schema.String>;
158
+ readonly storageOptions: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
159
+ readonly public: Schema.Boolean;
160
+ readonly expireAfterDays: Schema.optional<Schema.Finite>;
161
+ }>>, never>;
98
162
  readonly secrets: Schema.$Array<Schema.String>;
99
163
  readonly env: Schema.$Record<Schema.String, Schema.String>;
164
+ readonly realtime: Schema.optional<Schema.Struct<{
165
+ readonly subscribe: Schema.Literals<readonly ["public", "signed-in"]>;
166
+ readonly channels: Schema.$Array<Schema.String>;
167
+ }>>;
168
+ readonly email: Schema.optional<Schema.Struct<{
169
+ readonly name: Schema.optional<Schema.String>;
170
+ readonly dailyLimit: Schema.Finite;
171
+ }>>;
172
+ readonly services: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
173
+ readonly entry: Schema.String;
174
+ readonly cpu: Schema.withDecodingDefault<Schema.Literals<readonly [0.25, 0.5, 1, 2, 4]>, never>;
175
+ readonly memoryMb: Schema.withDecodingDefault<Schema.Int, never>;
176
+ readonly spot: Schema.withDecodingDefault<Schema.Boolean, never>;
177
+ readonly previewMinutes: Schema.withDecodingDefault<Schema.Int, never>;
178
+ }>>, never>;
100
179
  }>>;
180
+ /** How it runs the server. */
181
+ readonly compute: Schema.optional<Schema.Literals<readonly ["request", "instance"]>>;
182
+ /**
183
+ * A switch of the server's mode that the platform made (actor `platform`):
184
+ * the deployment whose build this one runs again, in `compute`.
185
+ */
186
+ readonly computeSwitchOf: Schema.optional<Schema.String>;
101
187
  readonly url: Schema.optional<Schema.String>;
102
188
  readonly error: Schema.optional<Schema.String>;
103
189
  readonly events: Schema.$Array<Schema.Struct<{
@@ -172,9 +258,32 @@ export declare const AppSummary: Schema.Struct<{
172
258
  readonly preview: Schema.Boolean;
173
259
  readonly currentDeployment: Schema.optional<Schema.String>;
174
260
  readonly previousDeployment: Schema.optional<Schema.String>;
175
- /** Web Function revision ids, for instant rollback. */
261
+ /** The server builds: Web Function revision ids, or request-mode function versions. */
176
262
  readonly currentRevision: Schema.optional<Schema.String>;
177
263
  readonly previousRevision: Schema.optional<Schema.String>;
264
+ /** How the live deployment's server runs. */
265
+ readonly compute: Schema.optional<Schema.Literals<readonly ["request", "instance"]>>;
266
+ /** Prod stages with a server: what each mode would cost a month. */
267
+ readonly computeEstimate: Schema.optional<Schema.Struct<{
268
+ readonly at: Schema.String;
269
+ readonly request: Schema.Struct<{
270
+ readonly monthlyUsd: Schema.Finite;
271
+ readonly coldStartsPerMonth: Schema.Finite;
272
+ }>;
273
+ readonly instance: Schema.Struct<{
274
+ readonly monthlyUsd: Schema.Finite;
275
+ readonly environmentHoursPerMonth: Schema.Finite;
276
+ }>;
277
+ readonly requestsPerMonth: Schema.Finite;
278
+ /** Days of traffic the month is extrapolated from. */
279
+ readonly days: Schema.Finite;
280
+ }>>;
281
+ /** Set while the other mode is cheaper enough; at three days the platform switches. */
282
+ readonly computeStreak: Schema.optional<Schema.Struct<{
283
+ readonly to: Schema.Literals<readonly ["request", "instance"]>;
284
+ readonly days: Schema.Finite;
285
+ readonly day: Schema.String;
286
+ }>>;
178
287
  readonly createdAt: Schema.String;
179
288
  readonly updatedAt: Schema.String;
180
289
  }>>;
@@ -191,11 +300,13 @@ export declare const AppSummary: Schema.Struct<{
191
300
  readonly app: Schema.String;
192
301
  readonly stage: Schema.String;
193
302
  readonly status: Schema.Literals<readonly ["awaiting_upload", "queued", "running", "succeeded", "failed", "rolled_back"]>;
194
- /** GitHub username, or `ci:<repo>` for OIDC deploys. */
303
+ /** GitHub username, `ci:<repo>` for OIDC deploys, or `platform` for a compute switch. */
195
304
  readonly actor: Schema.String;
196
305
  readonly commit: Schema.optional<Schema.String>;
197
306
  readonly ref: Schema.optional<Schema.String>;
198
307
  readonly message: Schema.optional<Schema.String>;
308
+ /** The `@ericminassian/platform` version its bundles were built with; absent before 0.4.0. */
309
+ readonly sdk: Schema.optional<Schema.String>;
199
310
  readonly manifest: Schema.optional<Schema.Struct<{
200
311
  readonly name: Schema.String;
201
312
  readonly description: Schema.optional<Schema.String>;
@@ -211,6 +322,9 @@ export declare const AppSummary: Schema.Struct<{
211
322
  readonly serverRoutes: Schema.withDecodingDefault<Schema.$Array<Schema.String>, never>;
212
323
  readonly timeoutSeconds: Schema.withDecodingDefault<Schema.Int, never>;
213
324
  readonly concurrency: Schema.withDecodingDefault<Schema.Int, never>;
325
+ readonly compute: Schema.withDecodingDefault<Schema.Literals<readonly ["auto", "request", "instance"]>, never>;
326
+ readonly memoryMb: Schema.withDecodingDefault<Schema.Int, never>;
327
+ readonly maxEnvironments: Schema.optional<Schema.Int>;
214
328
  }>>;
215
329
  readonly worker: Schema.optional<Schema.Struct<{
216
330
  readonly entry: Schema.withDecodingDefault<Schema.String, never>;
@@ -223,20 +337,54 @@ export declare const AppSummary: Schema.Struct<{
223
337
  }>;
224
338
  readonly db: Schema.Boolean;
225
339
  readonly queues: Schema.$Record<Schema.String, Schema.Struct<{
226
- readonly batchSize: Schema.withDecodingDefault<Schema.Int, never>;
227
- readonly maxReceiveCount: Schema.withDecodingDefault<Schema.Int, never>;
228
- readonly concurrency: Schema.optional<Schema.Int>;
229
- readonly visibilityTimeoutSeconds: Schema.Finite;
340
+ timeoutSeconds: Schema.optional<Schema.Int>;
341
+ memoryMb: Schema.optional<Schema.Int>;
342
+ maxAttempts: Schema.withDecodingDefault<Schema.Int, never>;
343
+ concurrency: Schema.optional<Schema.Int>;
230
344
  }>>;
231
345
  readonly events: Schema.$Array<Schema.String>;
346
+ readonly eventOptions: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
347
+ readonly timeoutSeconds: Schema.optional<Schema.Int>;
348
+ readonly memoryMb: Schema.optional<Schema.Int>;
349
+ readonly maxAttempts: Schema.optional<Schema.Int>;
350
+ }>>, never>;
232
351
  readonly crons: Schema.$Record<Schema.String, Schema.Struct<{
352
+ readonly timeoutSeconds: Schema.optional<Schema.Int>;
353
+ readonly memoryMb: Schema.optional<Schema.Int>;
233
354
  readonly schedule: Schema.String;
234
355
  readonly timezone: Schema.optional<Schema.String>;
356
+ readonly maxAttempts: Schema.optional<Schema.Int>;
235
357
  }>>;
236
358
  readonly storage: Schema.$Array<Schema.String>;
359
+ readonly storageOptions: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
360
+ readonly public: Schema.Boolean;
361
+ readonly expireAfterDays: Schema.optional<Schema.Finite>;
362
+ }>>, never>;
237
363
  readonly secrets: Schema.$Array<Schema.String>;
238
364
  readonly env: Schema.$Record<Schema.String, Schema.String>;
365
+ readonly realtime: Schema.optional<Schema.Struct<{
366
+ readonly subscribe: Schema.Literals<readonly ["public", "signed-in"]>;
367
+ readonly channels: Schema.$Array<Schema.String>;
368
+ }>>;
369
+ readonly email: Schema.optional<Schema.Struct<{
370
+ readonly name: Schema.optional<Schema.String>;
371
+ readonly dailyLimit: Schema.Finite;
372
+ }>>;
373
+ readonly services: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
374
+ readonly entry: Schema.String;
375
+ readonly cpu: Schema.withDecodingDefault<Schema.Literals<readonly [0.25, 0.5, 1, 2, 4]>, never>;
376
+ readonly memoryMb: Schema.withDecodingDefault<Schema.Int, never>;
377
+ readonly spot: Schema.withDecodingDefault<Schema.Boolean, never>;
378
+ readonly previewMinutes: Schema.withDecodingDefault<Schema.Int, never>;
379
+ }>>, never>;
239
380
  }>>;
381
+ /** How it runs the server. */
382
+ readonly compute: Schema.optional<Schema.Literals<readonly ["request", "instance"]>>;
383
+ /**
384
+ * A switch of the server's mode that the platform made (actor `platform`):
385
+ * the deployment whose build this one runs again, in `compute`.
386
+ */
387
+ readonly computeSwitchOf: Schema.optional<Schema.String>;
240
388
  readonly url: Schema.optional<Schema.String>;
241
389
  readonly error: Schema.optional<Schema.String>;
242
390
  readonly events: Schema.$Array<Schema.Struct<{
@@ -252,7 +400,8 @@ export declare const AppSummary: Schema.Struct<{
252
400
  }>>;
253
401
  }>;
254
402
  export type AppSummary = typeof AppSummary.Type;
255
- export declare const ArtifactFile: Schema.Literals<readonly ["manifest.json", "server.zip", "worker.zip", "static.zip"]>;
403
+ /** `services.zip` holds `<service>/index.mjs` (+ `.map`) for each long-running service. */
404
+ export declare const ArtifactFile: Schema.Literals<readonly ["manifest.json", "server.zip", "worker.zip", "static.zip", "services.zip"]>;
256
405
  export type ArtifactFile = typeof ArtifactFile.Type;
257
406
  export declare const PresignedPost: Schema.Struct<{
258
407
  readonly url: Schema.String;
@@ -267,10 +416,12 @@ export declare const CreateDeploymentRequest: Schema.Struct<{
267
416
  */
268
417
  readonly manifest: Schema.Unknown;
269
418
  /** Which artifacts the CLI will upload (manifest.json is always uploaded). */
270
- readonly files: Schema.optional<Schema.$Array<Schema.Literals<readonly ["manifest.json", "server.zip", "worker.zip", "static.zip"]>>>;
419
+ readonly files: Schema.optional<Schema.$Array<Schema.Literals<readonly ["manifest.json", "server.zip", "worker.zip", "static.zip", "services.zip"]>>>;
271
420
  readonly commit: Schema.optional<Schema.String>;
272
421
  readonly ref: Schema.optional<Schema.String>;
273
422
  readonly message: Schema.optional<Schema.String>;
423
+ /** The `@ericminassian/platform` version the bundles were built with (`MIN_SDK_VERSION`). */
424
+ readonly sdk: Schema.optional<Schema.String>;
274
425
  }>;
275
426
  export type CreateDeploymentRequest = typeof CreateDeploymentRequest.Encoded;
276
427
  export declare const CreateDeploymentResponse: Schema.Struct<{
@@ -279,11 +430,13 @@ export declare const CreateDeploymentResponse: Schema.Struct<{
279
430
  readonly app: Schema.String;
280
431
  readonly stage: Schema.String;
281
432
  readonly status: Schema.Literals<readonly ["awaiting_upload", "queued", "running", "succeeded", "failed", "rolled_back"]>;
282
- /** GitHub username, or `ci:<repo>` for OIDC deploys. */
433
+ /** GitHub username, `ci:<repo>` for OIDC deploys, or `platform` for a compute switch. */
283
434
  readonly actor: Schema.String;
284
435
  readonly commit: Schema.optional<Schema.String>;
285
436
  readonly ref: Schema.optional<Schema.String>;
286
437
  readonly message: Schema.optional<Schema.String>;
438
+ /** The `@ericminassian/platform` version its bundles were built with; absent before 0.4.0. */
439
+ readonly sdk: Schema.optional<Schema.String>;
287
440
  readonly manifest: Schema.optional<Schema.Struct<{
288
441
  readonly name: Schema.String;
289
442
  readonly description: Schema.optional<Schema.String>;
@@ -299,6 +452,9 @@ export declare const CreateDeploymentResponse: Schema.Struct<{
299
452
  readonly serverRoutes: Schema.withDecodingDefault<Schema.$Array<Schema.String>, never>;
300
453
  readonly timeoutSeconds: Schema.withDecodingDefault<Schema.Int, never>;
301
454
  readonly concurrency: Schema.withDecodingDefault<Schema.Int, never>;
455
+ readonly compute: Schema.withDecodingDefault<Schema.Literals<readonly ["auto", "request", "instance"]>, never>;
456
+ readonly memoryMb: Schema.withDecodingDefault<Schema.Int, never>;
457
+ readonly maxEnvironments: Schema.optional<Schema.Int>;
302
458
  }>>;
303
459
  readonly worker: Schema.optional<Schema.Struct<{
304
460
  readonly entry: Schema.withDecodingDefault<Schema.String, never>;
@@ -311,20 +467,54 @@ export declare const CreateDeploymentResponse: Schema.Struct<{
311
467
  }>;
312
468
  readonly db: Schema.Boolean;
313
469
  readonly queues: Schema.$Record<Schema.String, Schema.Struct<{
314
- readonly batchSize: Schema.withDecodingDefault<Schema.Int, never>;
315
- readonly maxReceiveCount: Schema.withDecodingDefault<Schema.Int, never>;
316
- readonly concurrency: Schema.optional<Schema.Int>;
317
- readonly visibilityTimeoutSeconds: Schema.Finite;
470
+ timeoutSeconds: Schema.optional<Schema.Int>;
471
+ memoryMb: Schema.optional<Schema.Int>;
472
+ maxAttempts: Schema.withDecodingDefault<Schema.Int, never>;
473
+ concurrency: Schema.optional<Schema.Int>;
318
474
  }>>;
319
475
  readonly events: Schema.$Array<Schema.String>;
476
+ readonly eventOptions: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
477
+ readonly timeoutSeconds: Schema.optional<Schema.Int>;
478
+ readonly memoryMb: Schema.optional<Schema.Int>;
479
+ readonly maxAttempts: Schema.optional<Schema.Int>;
480
+ }>>, never>;
320
481
  readonly crons: Schema.$Record<Schema.String, Schema.Struct<{
482
+ readonly timeoutSeconds: Schema.optional<Schema.Int>;
483
+ readonly memoryMb: Schema.optional<Schema.Int>;
321
484
  readonly schedule: Schema.String;
322
485
  readonly timezone: Schema.optional<Schema.String>;
486
+ readonly maxAttempts: Schema.optional<Schema.Int>;
323
487
  }>>;
324
488
  readonly storage: Schema.$Array<Schema.String>;
489
+ readonly storageOptions: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
490
+ readonly public: Schema.Boolean;
491
+ readonly expireAfterDays: Schema.optional<Schema.Finite>;
492
+ }>>, never>;
325
493
  readonly secrets: Schema.$Array<Schema.String>;
326
494
  readonly env: Schema.$Record<Schema.String, Schema.String>;
495
+ readonly realtime: Schema.optional<Schema.Struct<{
496
+ readonly subscribe: Schema.Literals<readonly ["public", "signed-in"]>;
497
+ readonly channels: Schema.$Array<Schema.String>;
498
+ }>>;
499
+ readonly email: Schema.optional<Schema.Struct<{
500
+ readonly name: Schema.optional<Schema.String>;
501
+ readonly dailyLimit: Schema.Finite;
502
+ }>>;
503
+ readonly services: Schema.withDecodingDefault<Schema.$Record<Schema.String, Schema.Struct<{
504
+ readonly entry: Schema.String;
505
+ readonly cpu: Schema.withDecodingDefault<Schema.Literals<readonly [0.25, 0.5, 1, 2, 4]>, never>;
506
+ readonly memoryMb: Schema.withDecodingDefault<Schema.Int, never>;
507
+ readonly spot: Schema.withDecodingDefault<Schema.Boolean, never>;
508
+ readonly previewMinutes: Schema.withDecodingDefault<Schema.Int, never>;
509
+ }>>, never>;
327
510
  }>>;
511
+ /** How it runs the server. */
512
+ readonly compute: Schema.optional<Schema.Literals<readonly ["request", "instance"]>>;
513
+ /**
514
+ * A switch of the server's mode that the platform made (actor `platform`):
515
+ * the deployment whose build this one runs again, in `compute`.
516
+ */
517
+ readonly computeSwitchOf: Schema.optional<Schema.String>;
328
518
  readonly url: Schema.optional<Schema.String>;
329
519
  readonly error: Schema.optional<Schema.String>;
330
520
  readonly events: Schema.$Array<Schema.Struct<{
@@ -356,6 +546,10 @@ export declare const CreateDeploymentResponse: Schema.Struct<{
356
546
  readonly url: Schema.String;
357
547
  readonly fields: Schema.$Record<Schema.String, Schema.String>;
358
548
  }>>;
549
+ readonly 'services.zip': Schema.optional<Schema.Struct<{
550
+ readonly url: Schema.String;
551
+ readonly fields: Schema.$Record<Schema.String, Schema.String>;
552
+ }>>;
359
553
  }>;
360
554
  }>;
361
555
  export type CreateDeploymentResponse = typeof CreateDeploymentResponse.Type;
@@ -425,10 +619,10 @@ export declare const RouteStats: Schema.Struct<{
425
619
  readonly p95: Schema.NullOr<Schema.Finite>;
426
620
  }>;
427
621
  export type RouteStats = typeof RouteStats.Type;
428
- export declare const JobKind: Schema.Literals<readonly ["queue", "event", "cron", "invoke"]>;
622
+ export declare const JobKind: Schema.Literals<readonly ["queue", "event", "cron", "invoke", "service"]>;
429
623
  export type JobKind = typeof JobKind.Type;
430
624
  export declare const JobStats: Schema.Struct<{
431
- readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke"]>;
625
+ readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke", "service"]>;
432
626
  readonly name: Schema.String;
433
627
  readonly ok: Schema.Finite;
434
628
  readonly error: Schema.Finite;
@@ -438,7 +632,7 @@ export declare const JobStats: Schema.Struct<{
438
632
  export type JobStats = typeof JobStats.Type;
439
633
  export declare const JobsResponse: Schema.Struct<{
440
634
  readonly jobs: Schema.$Array<Schema.Struct<{
441
- readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke"]>;
635
+ readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke", "service"]>;
442
636
  readonly name: Schema.String;
443
637
  readonly ok: Schema.Finite;
444
638
  readonly error: Schema.Finite;
@@ -451,14 +645,272 @@ export declare const JobsResponse: Schema.Struct<{
451
645
  }>>;
452
646
  }>;
453
647
  export type JobsResponse = typeof JobsResponse.Type;
648
+ /** A queue's jobs that aren't running: waiting for their time, and given up on. */
454
649
  export declare const QueueStats: Schema.Struct<{
455
650
  readonly name: Schema.String;
456
- readonly visible: Schema.Finite;
457
- readonly inFlight: Schema.Finite;
651
+ /** Retries and delayed sends scheduled for later. */
652
+ readonly scheduled: Schema.Finite;
653
+ /** Its messages in the stage's dead-letter queue (of those `deadLetters` reads). */
458
654
  readonly deadLetter: Schema.Finite;
459
- readonly oldestAgeSeconds: Schema.NullOr<Schema.Finite>;
460
655
  }>;
461
656
  export type QueueStats = typeof QueueStats.Type;
657
+ /** One message in the stage's dead-letter queue (core `readDeadLetter`). */
658
+ export declare const DeadLetterItem: Schema.Struct<{
659
+ /** The SQS message id: what redrive and discard take. */
660
+ readonly id: Schema.String;
661
+ /** `unknown`: a message the platform didn't write; it can only be discarded. */
662
+ readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke", "unknown"]>;
663
+ readonly name: Schema.String;
664
+ readonly attempts: Schema.NullOr<Schema.Finite>;
665
+ readonly error: Schema.Struct<{
666
+ readonly name: Schema.String;
667
+ readonly message: Schema.String;
668
+ }>;
669
+ /** ISO time, when the writer recorded one. */
670
+ readonly failedAt: Schema.NullOr<Schema.String>;
671
+ /** Who gave up on it: the SDK, Lambda, Scheduler or EventBridge. */
672
+ readonly source: Schema.Literals<readonly ["sdk", "lambda", "scheduler", "eventbridge", "unknown"]>;
673
+ /** The message body, event detail or invoke payload, as JSON, cut to a few hundred chars. */
674
+ readonly preview: Schema.String;
675
+ }>;
676
+ export type DeadLetterItem = typeof DeadLetterItem.Type;
677
+ export declare const DeadLettersResponse: Schema.Struct<{
678
+ /** Messages in the queue (SQS's approximate count). */
679
+ readonly total: Schema.Finite;
680
+ /** Up to `DEAD_LETTERS_READ` of them. */
681
+ readonly items: Schema.$Array<Schema.Struct<{
682
+ /** The SQS message id: what redrive and discard take. */
683
+ readonly id: Schema.String;
684
+ /** `unknown`: a message the platform didn't write; it can only be discarded. */
685
+ readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke", "unknown"]>;
686
+ readonly name: Schema.String;
687
+ readonly attempts: Schema.NullOr<Schema.Finite>;
688
+ readonly error: Schema.Struct<{
689
+ readonly name: Schema.String;
690
+ readonly message: Schema.String;
691
+ }>;
692
+ /** ISO time, when the writer recorded one. */
693
+ readonly failedAt: Schema.NullOr<Schema.String>;
694
+ /** Who gave up on it: the SDK, Lambda, Scheduler or EventBridge. */
695
+ readonly source: Schema.Literals<readonly ["sdk", "lambda", "scheduler", "eventbridge", "unknown"]>;
696
+ /** The message body, event detail or invoke payload, as JSON, cut to a few hundred chars. */
697
+ readonly preview: Schema.String;
698
+ }>>;
699
+ }>;
700
+ export type DeadLettersResponse = typeof DeadLettersResponse.Type;
701
+ /** How many dead letters the API reads for a list. */
702
+ export declare const DEAD_LETTERS_READ = 100;
703
+ /** Redrive or discard: the given dead letters, or (no `ids`) all of them. */
704
+ export declare const DeadLetterAction: Schema.Struct<{
705
+ readonly ids: Schema.optional<Schema.$Array<Schema.String>>;
706
+ }>;
707
+ export type DeadLetterAction = typeof DeadLetterAction.Encoded;
708
+ export declare const DeadLetterActionResponse: Schema.Struct<{
709
+ readonly count: Schema.Finite;
710
+ }>;
711
+ export type DeadLetterActionResponse = typeof DeadLetterActionResponse.Type;
712
+ /** Per-namespace AppSync Events counts in one bucket (CloudWatch `Sum`s). */
713
+ export declare const RealtimePoint: Schema.Struct<{
714
+ readonly ts: Schema.String;
715
+ /** Events published (`InboundMessages`; each 5 KB counts once). */
716
+ readonly events: Schema.Finite;
717
+ /** Successful publish requests (up to 5 events each). */
718
+ readonly publishes: Schema.Finite;
719
+ /** Successful subscribes. */
720
+ readonly subscribes: Schema.Finite;
721
+ /** Publishes and subscribes refused or failed (client and server errors). */
722
+ readonly errors: Schema.Finite;
723
+ }>;
724
+ export type RealtimePoint = typeof RealtimePoint.Type;
725
+ /**
726
+ * A stage's realtime activity. AppSync reports deliveries (`OutboundMessages`)
727
+ * and connections only for the whole Event API, not per namespace, so they
728
+ * can't be shown per app.
729
+ */
730
+ export declare const RealtimeStatsResponse: Schema.Struct<{
731
+ readonly app: Schema.String;
732
+ readonly stage: Schema.String;
733
+ /** False when the live deployment declares no `realtime`; the rest is then empty. */
734
+ readonly enabled: Schema.Boolean;
735
+ readonly subscribe: Schema.optional<Schema.Literals<readonly ["public", "signed-in"]>>;
736
+ readonly channels: Schema.$Array<Schema.String>;
737
+ readonly res: Schema.Literals<readonly ["1m", "1h", "1d"]>;
738
+ readonly totals: Schema.Struct<{
739
+ readonly events: Schema.Finite;
740
+ readonly publishes: Schema.Finite;
741
+ readonly subscribes: Schema.Finite;
742
+ readonly errors: Schema.Finite;
743
+ }>;
744
+ readonly points: Schema.$Array<Schema.Struct<{
745
+ readonly ts: Schema.String;
746
+ /** Events published (`InboundMessages`; each 5 KB counts once). */
747
+ readonly events: Schema.Finite;
748
+ /** Successful publish requests (up to 5 events each). */
749
+ readonly publishes: Schema.Finite;
750
+ /** Successful subscribes. */
751
+ readonly subscribes: Schema.Finite;
752
+ /** Publishes and subscribes refused or failed (client and server errors). */
753
+ readonly errors: Schema.Finite;
754
+ }>>;
755
+ }>;
756
+ export type RealtimeStatsResponse = typeof RealtimeStatsResponse.Type;
757
+ /** One custom metric (`Metrics.count`/`value`) in one bucket: how many values, and their sum. */
758
+ export declare const CustomMetricPoint: Schema.Struct<{
759
+ readonly ts: Schema.String;
760
+ readonly count: Schema.Finite;
761
+ readonly sum: Schema.Finite;
762
+ }>;
763
+ export type CustomMetricPoint = typeof CustomMetricPoint.Type;
764
+ /**
765
+ * A custom metric over the range. `Metrics.count(name, n)` records `n` with
766
+ * unit `count`, so `sum` is the total; for `Metrics.value`, `sum / count` is
767
+ * the average.
768
+ */
769
+ export declare const CustomMetricStats: Schema.Struct<{
770
+ readonly name: Schema.String;
771
+ readonly unit: Schema.optional<Schema.String>;
772
+ readonly count: Schema.Finite;
773
+ readonly sum: Schema.Finite;
774
+ /** One per bucket in the range, zero-filled. */
775
+ readonly points: Schema.$Array<Schema.Struct<{
776
+ readonly ts: Schema.String;
777
+ readonly count: Schema.Finite;
778
+ readonly sum: Schema.Finite;
779
+ }>>;
780
+ }>;
781
+ export type CustomMetricStats = typeof CustomMetricStats.Type;
782
+ /** A stage's custom metrics recorded in the range, by name. */
783
+ export declare const CustomMetricsResponse: Schema.Struct<{
784
+ readonly app: Schema.String;
785
+ readonly stage: Schema.String;
786
+ readonly res: Schema.Literals<readonly ["1m", "1h", "1d"]>;
787
+ readonly metrics: Schema.$Array<Schema.Struct<{
788
+ readonly name: Schema.String;
789
+ readonly unit: Schema.optional<Schema.String>;
790
+ readonly count: Schema.Finite;
791
+ readonly sum: Schema.Finite;
792
+ /** One per bucket in the range, zero-filled. */
793
+ readonly points: Schema.$Array<Schema.Struct<{
794
+ readonly ts: Schema.String;
795
+ readonly count: Schema.Finite;
796
+ readonly sum: Schema.Finite;
797
+ }>>;
798
+ }>>;
799
+ }>;
800
+ export type CustomMetricsResponse = typeof CustomMetricsResponse.Type;
801
+ /** One rate limit's checks in one bucket. */
802
+ export declare const LimitPoint: Schema.Struct<{
803
+ readonly ts: Schema.String;
804
+ readonly allowed: Schema.Finite;
805
+ readonly denied: Schema.Finite;
806
+ }>;
807
+ export type LimitPoint = typeof LimitPoint.Type;
808
+ /** A rate limit's checks over the range, by its name in `RateLimits`. */
809
+ export declare const LimitStats: Schema.Struct<{
810
+ readonly name: Schema.String;
811
+ readonly allowed: Schema.Finite;
812
+ readonly denied: Schema.Finite;
813
+ /** One per bucket in the range, zero-filled. */
814
+ readonly points: Schema.$Array<Schema.Struct<{
815
+ readonly ts: Schema.String;
816
+ readonly allowed: Schema.Finite;
817
+ readonly denied: Schema.Finite;
818
+ }>>;
819
+ }>;
820
+ export type LimitStats = typeof LimitStats.Type;
821
+ /** A stage's rate limits that were checked in the range, most denied first. */
822
+ export declare const LimitsResponse: Schema.Struct<{
823
+ readonly app: Schema.String;
824
+ readonly stage: Schema.String;
825
+ readonly res: Schema.Literals<readonly ["1m", "1h", "1d"]>;
826
+ readonly limits: Schema.$Array<Schema.Struct<{
827
+ readonly name: Schema.String;
828
+ readonly allowed: Schema.Finite;
829
+ readonly denied: Schema.Finite;
830
+ /** One per bucket in the range, zero-filled. */
831
+ readonly points: Schema.$Array<Schema.Struct<{
832
+ readonly ts: Schema.String;
833
+ readonly allowed: Schema.Finite;
834
+ readonly denied: Schema.Finite;
835
+ }>>;
836
+ }>>;
837
+ }>;
838
+ export type LimitsResponse = typeof LimitsResponse.Type;
839
+ /** Per-tenant SES counts in one bucket (CloudWatch `Sum`s of `AWS/SES` by tenant). */
840
+ export declare const EmailPoint: Schema.Struct<{
841
+ readonly ts: Schema.String;
842
+ readonly sends: Schema.Finite;
843
+ readonly deliveries: Schema.Finite;
844
+ readonly bounces: Schema.Finite;
845
+ readonly complaints: Schema.Finite;
846
+ }>;
847
+ export type EmailPoint = typeof EmailPoint.Type;
848
+ /**
849
+ * Whether SES lets a stage send. `paused` comes with who paused it: `policy`
850
+ * (the tenant's reputation policy, after bad bounce or complaint rates),
851
+ * `manual` (someone changed it in SES), or `aws` (only AWS Support can lift
852
+ * that one).
853
+ */
854
+ export declare const EmailSending: Schema.Struct<{
855
+ readonly status: Schema.Literals<readonly ["enabled", "paused"]>;
856
+ readonly pausedBy: Schema.optional<Schema.Literals<readonly ["policy", "manual", "aws"]>>;
857
+ /** SES's reason, when paused. */
858
+ readonly cause: Schema.optional<Schema.String>;
859
+ readonly since: Schema.optional<Schema.String>;
860
+ }>;
861
+ export type EmailSending = typeof EmailSending.Type;
862
+ /** A stage's email: its sender, whether it can send, today's usage and SES's counts over the range. */
863
+ export declare const EmailStatsResponse: Schema.Struct<{
864
+ readonly app: Schema.String;
865
+ readonly stage: Schema.String;
866
+ /** False when the live deployment declares no `email`; the rest is then empty. */
867
+ readonly enabled: Schema.Boolean;
868
+ /** `"Todo" <todo@mail…>`. */
869
+ readonly from: Schema.optional<Schema.String>;
870
+ readonly sending: Schema.optional<Schema.Struct<{
871
+ readonly status: Schema.Literals<readonly ["enabled", "paused"]>;
872
+ readonly pausedBy: Schema.optional<Schema.Literals<readonly ["policy", "manual", "aws"]>>;
873
+ /** SES's reason, when paused. */
874
+ readonly cause: Schema.optional<Schema.String>;
875
+ readonly since: Schema.optional<Schema.String>;
876
+ }>>;
877
+ /** Recipients sent today (UTC) and the stage's daily limit. */
878
+ readonly today: Schema.optional<Schema.Struct<{
879
+ readonly sent: Schema.Finite;
880
+ readonly limit: Schema.Finite;
881
+ }>>;
882
+ readonly res: Schema.Literals<readonly ["1m", "1h", "1d"]>;
883
+ readonly totals: Schema.Struct<{
884
+ readonly sends: Schema.Finite;
885
+ readonly deliveries: Schema.Finite;
886
+ readonly bounces: Schema.Finite;
887
+ readonly complaints: Schema.Finite;
888
+ }>;
889
+ readonly points: Schema.$Array<Schema.Struct<{
890
+ readonly ts: Schema.String;
891
+ readonly sends: Schema.Finite;
892
+ readonly deliveries: Schema.Finite;
893
+ readonly bounces: Schema.Finite;
894
+ readonly complaints: Schema.Finite;
895
+ }>>;
896
+ }>;
897
+ export type EmailStatsResponse = typeof EmailStatsResponse.Type;
898
+ /** An address on a stage's suppression list: SES no longer sends to it from this stage. */
899
+ export declare const SuppressedAddress: Schema.Struct<{
900
+ readonly address: Schema.String;
901
+ readonly reason: Schema.Literals<readonly ["bounce", "complaint"]>;
902
+ readonly since: Schema.String;
903
+ }>;
904
+ export type SuppressedAddress = typeof SuppressedAddress.Type;
905
+ export declare const SuppressedResponse: Schema.Struct<{
906
+ readonly items: Schema.$Array<Schema.Struct<{
907
+ readonly address: Schema.String;
908
+ readonly reason: Schema.Literals<readonly ["bounce", "complaint"]>;
909
+ readonly since: Schema.String;
910
+ }>>;
911
+ readonly next: Schema.optional<Schema.String>;
912
+ }>;
913
+ export type SuppressedResponse = typeof SuppressedResponse.Type;
462
914
  export declare const ErrorStatus: Schema.Literals<readonly ["open", "resolved", "ignored"]>;
463
915
  export type ErrorStatus = typeof ErrorStatus.Type;
464
916
  export declare const ErrorGroup: Schema.Struct<{
@@ -484,9 +936,12 @@ export declare const UpdateErrorRequest: Schema.Struct<{
484
936
  readonly status: Schema.Literals<readonly ["open", "resolved", "ignored"]>;
485
937
  }>;
486
938
  export type UpdateErrorRequest = typeof UpdateErrorRequest.Type;
939
+ /** Log stream of a line: `web`, `worker`, or `service:<name>` for a long-running service. */
940
+ export declare const LogStream: Schema.String;
941
+ export type LogStream = typeof LogStream.Type;
487
942
  export declare const LogLine: Schema.Struct<{
488
943
  readonly ts: Schema.String;
489
- readonly stream: Schema.Literals<readonly ["web", "worker"]>;
944
+ readonly stream: Schema.String;
490
945
  readonly level: Schema.optional<Schema.String>;
491
946
  readonly message: Schema.String;
492
947
  readonly trace: Schema.optional<Schema.String>;
@@ -499,10 +954,12 @@ export declare const LogLine: Schema.Struct<{
499
954
  readonly trace: Schema.optional<Schema.String>;
500
955
  readonly span: Schema.optional<Schema.String>;
501
956
  readonly parent: Schema.optional<Schema.String>;
957
+ readonly calls: Schema.optional<Schema.Finite>;
958
+ readonly callMs: Schema.optional<Schema.Finite>;
502
959
  readonly t: Schema.Literal<"req">;
503
960
  readonly method: Schema.String;
504
961
  readonly route: Schema.String;
505
- readonly path: Schema.String;
962
+ readonly path: Schema.optional<Schema.String>;
506
963
  readonly status: Schema.Finite;
507
964
  readonly dur: Schema.Finite;
508
965
  readonly bytes: Schema.optional<Schema.Finite>;
@@ -519,7 +976,7 @@ export declare const LogLine: Schema.Struct<{
519
976
  readonly span: Schema.optional<Schema.String>;
520
977
  readonly parent: Schema.optional<Schema.String>;
521
978
  readonly t: Schema.Literal<"err">;
522
- readonly source: Schema.Literals<readonly ["http", "job", "unhandled", "log"]>;
979
+ readonly source: Schema.Literals<readonly ["http", "job", "unhandled", "log", "service"]>;
523
980
  readonly name: Schema.String;
524
981
  readonly message: Schema.String;
525
982
  readonly stack: Schema.optional<Schema.String>;
@@ -535,12 +992,15 @@ export declare const LogLine: Schema.Struct<{
535
992
  readonly trace: Schema.optional<Schema.String>;
536
993
  readonly span: Schema.optional<Schema.String>;
537
994
  readonly parent: Schema.optional<Schema.String>;
995
+ readonly calls: Schema.optional<Schema.Finite>;
996
+ readonly callMs: Schema.optional<Schema.Finite>;
538
997
  readonly t: Schema.Literal<"job">;
539
- readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke"]>;
998
+ readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke", "service"]>;
540
999
  readonly name: Schema.String;
541
1000
  readonly status: Schema.Literals<readonly ["ok", "error"]>;
542
1001
  readonly dur: Schema.Finite;
543
1002
  readonly attempt: Schema.optional<Schema.Finite>;
1003
+ readonly next: Schema.optional<Schema.Literals<readonly ["retry", "dead"]>>;
544
1004
  }>, Schema.Struct<{
545
1005
  readonly _p: Schema.Literal<1>;
546
1006
  readonly ts: Schema.Finite;
@@ -581,6 +1041,18 @@ export declare const LogLine: Schema.Struct<{
581
1041
  readonly name: Schema.String;
582
1042
  readonly value: Schema.Finite;
583
1043
  readonly unit: Schema.optional<Schema.String>;
1044
+ }>, Schema.Struct<{
1045
+ readonly _p: Schema.Literal<1>;
1046
+ readonly ts: Schema.Finite;
1047
+ readonly app: Schema.String;
1048
+ readonly stage: Schema.String;
1049
+ readonly rev: Schema.String;
1050
+ readonly trace: Schema.optional<Schema.String>;
1051
+ readonly span: Schema.optional<Schema.String>;
1052
+ readonly parent: Schema.optional<Schema.String>;
1053
+ readonly t: Schema.Literal<"limit">;
1054
+ readonly name: Schema.String;
1055
+ readonly ok: Schema.Boolean;
584
1056
  }>, Schema.Struct<{
585
1057
  readonly _p: Schema.Literal<1>;
586
1058
  readonly ts: Schema.Finite;
@@ -592,7 +1064,10 @@ export declare const LogLine: Schema.Struct<{
592
1064
  readonly parent: Schema.optional<Schema.String>;
593
1065
  readonly t: Schema.Literal<"env">;
594
1066
  readonly event: Schema.Literals<readonly ["start", "stop"]>;
595
- readonly runtime: Schema.Literals<readonly ["web", "worker"]>;
1067
+ readonly runtime: Schema.Literals<readonly ["web", "worker", "service"]>;
1068
+ readonly compute: Schema.optional<Schema.Literals<readonly ["request", "instance"]>>;
1069
+ readonly name: Schema.optional<Schema.String>;
1070
+ readonly reason: Schema.optional<Schema.String>;
596
1071
  readonly initMs: Schema.optional<Schema.Finite>;
597
1072
  }>]>>;
598
1073
  }>;
@@ -600,7 +1075,7 @@ export type LogLine = typeof LogLine.Type;
600
1075
  export declare const LogsResponse: Schema.Struct<{
601
1076
  readonly lines: Schema.$Array<Schema.Struct<{
602
1077
  readonly ts: Schema.String;
603
- readonly stream: Schema.Literals<readonly ["web", "worker"]>;
1078
+ readonly stream: Schema.String;
604
1079
  readonly level: Schema.optional<Schema.String>;
605
1080
  readonly message: Schema.String;
606
1081
  readonly trace: Schema.optional<Schema.String>;
@@ -613,10 +1088,12 @@ export declare const LogsResponse: Schema.Struct<{
613
1088
  readonly trace: Schema.optional<Schema.String>;
614
1089
  readonly span: Schema.optional<Schema.String>;
615
1090
  readonly parent: Schema.optional<Schema.String>;
1091
+ readonly calls: Schema.optional<Schema.Finite>;
1092
+ readonly callMs: Schema.optional<Schema.Finite>;
616
1093
  readonly t: Schema.Literal<"req">;
617
1094
  readonly method: Schema.String;
618
1095
  readonly route: Schema.String;
619
- readonly path: Schema.String;
1096
+ readonly path: Schema.optional<Schema.String>;
620
1097
  readonly status: Schema.Finite;
621
1098
  readonly dur: Schema.Finite;
622
1099
  readonly bytes: Schema.optional<Schema.Finite>;
@@ -633,7 +1110,7 @@ export declare const LogsResponse: Schema.Struct<{
633
1110
  readonly span: Schema.optional<Schema.String>;
634
1111
  readonly parent: Schema.optional<Schema.String>;
635
1112
  readonly t: Schema.Literal<"err">;
636
- readonly source: Schema.Literals<readonly ["http", "job", "unhandled", "log"]>;
1113
+ readonly source: Schema.Literals<readonly ["http", "job", "unhandled", "log", "service"]>;
637
1114
  readonly name: Schema.String;
638
1115
  readonly message: Schema.String;
639
1116
  readonly stack: Schema.optional<Schema.String>;
@@ -649,12 +1126,15 @@ export declare const LogsResponse: Schema.Struct<{
649
1126
  readonly trace: Schema.optional<Schema.String>;
650
1127
  readonly span: Schema.optional<Schema.String>;
651
1128
  readonly parent: Schema.optional<Schema.String>;
1129
+ readonly calls: Schema.optional<Schema.Finite>;
1130
+ readonly callMs: Schema.optional<Schema.Finite>;
652
1131
  readonly t: Schema.Literal<"job">;
653
- readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke"]>;
1132
+ readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke", "service"]>;
654
1133
  readonly name: Schema.String;
655
1134
  readonly status: Schema.Literals<readonly ["ok", "error"]>;
656
1135
  readonly dur: Schema.Finite;
657
1136
  readonly attempt: Schema.optional<Schema.Finite>;
1137
+ readonly next: Schema.optional<Schema.Literals<readonly ["retry", "dead"]>>;
658
1138
  }>, Schema.Struct<{
659
1139
  readonly _p: Schema.Literal<1>;
660
1140
  readonly ts: Schema.Finite;
@@ -695,6 +1175,18 @@ export declare const LogsResponse: Schema.Struct<{
695
1175
  readonly name: Schema.String;
696
1176
  readonly value: Schema.Finite;
697
1177
  readonly unit: Schema.optional<Schema.String>;
1178
+ }>, Schema.Struct<{
1179
+ readonly _p: Schema.Literal<1>;
1180
+ readonly ts: Schema.Finite;
1181
+ readonly app: Schema.String;
1182
+ readonly stage: Schema.String;
1183
+ readonly rev: Schema.String;
1184
+ readonly trace: Schema.optional<Schema.String>;
1185
+ readonly span: Schema.optional<Schema.String>;
1186
+ readonly parent: Schema.optional<Schema.String>;
1187
+ readonly t: Schema.Literal<"limit">;
1188
+ readonly name: Schema.String;
1189
+ readonly ok: Schema.Boolean;
698
1190
  }>, Schema.Struct<{
699
1191
  readonly _p: Schema.Literal<1>;
700
1192
  readonly ts: Schema.Finite;
@@ -706,7 +1198,10 @@ export declare const LogsResponse: Schema.Struct<{
706
1198
  readonly parent: Schema.optional<Schema.String>;
707
1199
  readonly t: Schema.Literal<"env">;
708
1200
  readonly event: Schema.Literals<readonly ["start", "stop"]>;
709
- readonly runtime: Schema.Literals<readonly ["web", "worker"]>;
1201
+ readonly runtime: Schema.Literals<readonly ["web", "worker", "service"]>;
1202
+ readonly compute: Schema.optional<Schema.Literals<readonly ["request", "instance"]>>;
1203
+ readonly name: Schema.optional<Schema.String>;
1204
+ readonly reason: Schema.optional<Schema.String>;
710
1205
  readonly initMs: Schema.optional<Schema.Finite>;
711
1206
  }>]>>;
712
1207
  }>>;
@@ -724,10 +1219,12 @@ export declare const TraceResponse: Schema.Struct<{
724
1219
  readonly trace: Schema.optional<Schema.String>;
725
1220
  readonly span: Schema.optional<Schema.String>;
726
1221
  readonly parent: Schema.optional<Schema.String>;
1222
+ readonly calls: Schema.optional<Schema.Finite>;
1223
+ readonly callMs: Schema.optional<Schema.Finite>;
727
1224
  readonly t: Schema.Literal<"req">;
728
1225
  readonly method: Schema.String;
729
1226
  readonly route: Schema.String;
730
- readonly path: Schema.String;
1227
+ readonly path: Schema.optional<Schema.String>;
731
1228
  readonly status: Schema.Finite;
732
1229
  readonly dur: Schema.Finite;
733
1230
  readonly bytes: Schema.optional<Schema.Finite>;
@@ -744,7 +1241,7 @@ export declare const TraceResponse: Schema.Struct<{
744
1241
  readonly span: Schema.optional<Schema.String>;
745
1242
  readonly parent: Schema.optional<Schema.String>;
746
1243
  readonly t: Schema.Literal<"err">;
747
- readonly source: Schema.Literals<readonly ["http", "job", "unhandled", "log"]>;
1244
+ readonly source: Schema.Literals<readonly ["http", "job", "unhandled", "log", "service"]>;
748
1245
  readonly name: Schema.String;
749
1246
  readonly message: Schema.String;
750
1247
  readonly stack: Schema.optional<Schema.String>;
@@ -760,12 +1257,15 @@ export declare const TraceResponse: Schema.Struct<{
760
1257
  readonly trace: Schema.optional<Schema.String>;
761
1258
  readonly span: Schema.optional<Schema.String>;
762
1259
  readonly parent: Schema.optional<Schema.String>;
1260
+ readonly calls: Schema.optional<Schema.Finite>;
1261
+ readonly callMs: Schema.optional<Schema.Finite>;
763
1262
  readonly t: Schema.Literal<"job">;
764
- readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke"]>;
1263
+ readonly kind: Schema.Literals<readonly ["queue", "event", "cron", "invoke", "service"]>;
765
1264
  readonly name: Schema.String;
766
1265
  readonly status: Schema.Literals<readonly ["ok", "error"]>;
767
1266
  readonly dur: Schema.Finite;
768
1267
  readonly attempt: Schema.optional<Schema.Finite>;
1268
+ readonly next: Schema.optional<Schema.Literals<readonly ["retry", "dead"]>>;
769
1269
  }>, Schema.Struct<{
770
1270
  readonly _p: Schema.Literal<1>;
771
1271
  readonly ts: Schema.Finite;
@@ -806,6 +1306,18 @@ export declare const TraceResponse: Schema.Struct<{
806
1306
  readonly name: Schema.String;
807
1307
  readonly value: Schema.Finite;
808
1308
  readonly unit: Schema.optional<Schema.String>;
1309
+ }>, Schema.Struct<{
1310
+ readonly _p: Schema.Literal<1>;
1311
+ readonly ts: Schema.Finite;
1312
+ readonly app: Schema.String;
1313
+ readonly stage: Schema.String;
1314
+ readonly rev: Schema.String;
1315
+ readonly trace: Schema.optional<Schema.String>;
1316
+ readonly span: Schema.optional<Schema.String>;
1317
+ readonly parent: Schema.optional<Schema.String>;
1318
+ readonly t: Schema.Literal<"limit">;
1319
+ readonly name: Schema.String;
1320
+ readonly ok: Schema.Boolean;
809
1321
  }>, Schema.Struct<{
810
1322
  readonly _p: Schema.Literal<1>;
811
1323
  readonly ts: Schema.Finite;
@@ -817,18 +1329,99 @@ export declare const TraceResponse: Schema.Struct<{
817
1329
  readonly parent: Schema.optional<Schema.String>;
818
1330
  readonly t: Schema.Literal<"env">;
819
1331
  readonly event: Schema.Literals<readonly ["start", "stop"]>;
820
- readonly runtime: Schema.Literals<readonly ["web", "worker"]>;
1332
+ readonly runtime: Schema.Literals<readonly ["web", "worker", "service"]>;
1333
+ readonly compute: Schema.optional<Schema.Literals<readonly ["request", "instance"]>>;
1334
+ readonly name: Schema.optional<Schema.String>;
1335
+ readonly reason: Schema.optional<Schema.String>;
821
1336
  readonly initMs: Schema.optional<Schema.Finite>;
822
1337
  }>]>>;
823
1338
  }>;
824
1339
  export type TraceResponse = typeof TraceResponse.Type;
825
- export declare const UptimePoint: Schema.Struct<{
1340
+ /** A GET of the stage's health path, for a stage that served nothing lately or has no server. */
1341
+ export declare const UptimeCheck: Schema.Struct<{
826
1342
  readonly ts: Schema.String;
827
1343
  readonly ok: Schema.Boolean;
1344
+ readonly source: Schema.Literal<"check">;
1345
+ /** The HTTP status; 0 when nothing answered within 10 s. */
828
1346
  readonly status: Schema.Finite;
829
1347
  readonly ms: Schema.Finite;
830
1348
  }>;
1349
+ export type UptimeCheck = typeof UptimeCheck.Type;
1350
+ /** The stage's own requests in the 10 minutes before `ts`: down when at least 3, half of them 5xx. */
1351
+ export declare const UptimeTraffic: Schema.Struct<{
1352
+ readonly ts: Schema.String;
1353
+ readonly ok: Schema.Boolean;
1354
+ readonly source: Schema.Literal<"traffic">;
1355
+ readonly req: Schema.Finite;
1356
+ readonly s5xx: Schema.Finite;
1357
+ }>;
1358
+ export type UptimeTraffic = typeof UptimeTraffic.Type;
1359
+ export declare const UptimePoint: Schema.Union<readonly [Schema.Struct<{
1360
+ readonly ts: Schema.String;
1361
+ readonly ok: Schema.Boolean;
1362
+ readonly source: Schema.Literal<"check">;
1363
+ /** The HTTP status; 0 when nothing answered within 10 s. */
1364
+ readonly status: Schema.Finite;
1365
+ readonly ms: Schema.Finite;
1366
+ }>, Schema.Struct<{
1367
+ readonly ts: Schema.String;
1368
+ readonly ok: Schema.Boolean;
1369
+ readonly source: Schema.Literal<"traffic">;
1370
+ readonly req: Schema.Finite;
1371
+ readonly s5xx: Schema.Finite;
1372
+ }>]>;
831
1373
  export type UptimePoint = typeof UptimePoint.Type;
1374
+ /** Monthly cost of one container if it runs all month (`estimateContainerCost`). */
1375
+ export declare const MonthlyContainerCost: Schema.Struct<{
1376
+ readonly computeUsd: Schema.Finite;
1377
+ readonly publicIpv4Usd: Schema.Finite;
1378
+ readonly totalUsd: Schema.Finite;
1379
+ }>;
1380
+ /**
1381
+ * Something billed for as long as it runs, estimated from its size because
1382
+ * Cost Explorer lags a day and doesn't attribute every part of it to the
1383
+ * app (a container's public IPv4 address).
1384
+ */
1385
+ export declare const AlwaysOnCost: Schema.Struct<{
1386
+ readonly stage: Schema.String;
1387
+ readonly kind: Schema.Literal<"service">;
1388
+ readonly name: Schema.String;
1389
+ /** `0.25 vCPU · 512 MB · Spot`. */
1390
+ readonly detail: Schema.String;
1391
+ readonly monthly: Schema.Struct<{
1392
+ readonly computeUsd: Schema.Finite;
1393
+ readonly publicIpv4Usd: Schema.Finite;
1394
+ readonly totalUsd: Schema.Finite;
1395
+ }>;
1396
+ }>;
1397
+ export type AlwaysOnCost = typeof AlwaysOnCost.Type;
1398
+ /** A non-preview stage's server: how it runs, and (prod) what each mode would cost. */
1399
+ export declare const StageCompute: Schema.Struct<{
1400
+ readonly stage: Schema.String;
1401
+ /** `web.compute` of the live deployment. */
1402
+ readonly setting: Schema.Literals<readonly ["auto", "request", "instance"]>;
1403
+ readonly compute: Schema.Literals<readonly ["request", "instance"]>;
1404
+ readonly estimate: Schema.optional<Schema.Struct<{
1405
+ readonly at: Schema.String;
1406
+ readonly request: Schema.Struct<{
1407
+ readonly monthlyUsd: Schema.Finite;
1408
+ readonly coldStartsPerMonth: Schema.Finite;
1409
+ }>;
1410
+ readonly instance: Schema.Struct<{
1411
+ readonly monthlyUsd: Schema.Finite;
1412
+ readonly environmentHoursPerMonth: Schema.Finite;
1413
+ }>;
1414
+ readonly requestsPerMonth: Schema.Finite;
1415
+ /** Days of traffic the month is extrapolated from. */
1416
+ readonly days: Schema.Finite;
1417
+ }>>;
1418
+ readonly streak: Schema.optional<Schema.Struct<{
1419
+ readonly to: Schema.Literals<readonly ["request", "instance"]>;
1420
+ readonly days: Schema.Finite;
1421
+ readonly day: Schema.String;
1422
+ }>>;
1423
+ }>;
1424
+ export type StageCompute = typeof StageCompute.Type;
832
1425
  export declare const CostResponse: Schema.Struct<{
833
1426
  readonly app: Schema.String;
834
1427
  readonly currency: Schema.Literal<"USD">;
@@ -837,6 +1430,45 @@ export declare const CostResponse: Schema.Struct<{
837
1430
  readonly usd: Schema.Finite;
838
1431
  }>>;
839
1432
  readonly monthToDateUsd: Schema.Finite;
1433
+ /** Services of the app's non-preview stages (previews run theirs for minutes after a deploy). */
1434
+ readonly alwaysOn: Schema.optional<Schema.$Array<Schema.Struct<{
1435
+ readonly stage: Schema.String;
1436
+ readonly kind: Schema.Literal<"service">;
1437
+ readonly name: Schema.String;
1438
+ /** `0.25 vCPU · 512 MB · Spot`. */
1439
+ readonly detail: Schema.String;
1440
+ readonly monthly: Schema.Struct<{
1441
+ readonly computeUsd: Schema.Finite;
1442
+ readonly publicIpv4Usd: Schema.Finite;
1443
+ readonly totalUsd: Schema.Finite;
1444
+ }>;
1445
+ }>>>;
1446
+ /** Servers of the app's non-preview stages (previews run request mode). */
1447
+ readonly compute: Schema.optional<Schema.$Array<Schema.Struct<{
1448
+ readonly stage: Schema.String;
1449
+ /** `web.compute` of the live deployment. */
1450
+ readonly setting: Schema.Literals<readonly ["auto", "request", "instance"]>;
1451
+ readonly compute: Schema.Literals<readonly ["request", "instance"]>;
1452
+ readonly estimate: Schema.optional<Schema.Struct<{
1453
+ readonly at: Schema.String;
1454
+ readonly request: Schema.Struct<{
1455
+ readonly monthlyUsd: Schema.Finite;
1456
+ readonly coldStartsPerMonth: Schema.Finite;
1457
+ }>;
1458
+ readonly instance: Schema.Struct<{
1459
+ readonly monthlyUsd: Schema.Finite;
1460
+ readonly environmentHoursPerMonth: Schema.Finite;
1461
+ }>;
1462
+ readonly requestsPerMonth: Schema.Finite;
1463
+ /** Days of traffic the month is extrapolated from. */
1464
+ readonly days: Schema.Finite;
1465
+ }>>;
1466
+ readonly streak: Schema.optional<Schema.Struct<{
1467
+ readonly to: Schema.Literals<readonly ["request", "instance"]>;
1468
+ readonly days: Schema.Finite;
1469
+ readonly day: Schema.String;
1470
+ }>>;
1471
+ }>>>;
840
1472
  }>;
841
1473
  export type CostResponse = typeof CostResponse.Type;
842
1474
  export declare const SecretInfo: Schema.Struct<{
@@ -887,9 +1519,13 @@ export declare const StoredObjectInfo: Schema.Struct<{
887
1519
  readonly lastModified: Schema.optional<Schema.String>;
888
1520
  }>;
889
1521
  export type StoredObjectInfo = typeof StoredObjectInfo.Type;
890
- /** `GET /v1/apps/:app/storage`: the declared stores without `?store=`, a listing with it. */
1522
+ /**
1523
+ * `GET /v1/apps/:app/storage`: the declared stores (and which of them the
1524
+ * edge serves) without `?store=`, a listing with it.
1525
+ */
891
1526
  export declare const StorageResponse: Schema.Union<readonly [Schema.Struct<{
892
1527
  readonly stores: Schema.$Array<Schema.String>;
1528
+ readonly public: Schema.optional<Schema.$Array<Schema.String>>;
893
1529
  }>, Schema.Struct<{
894
1530
  readonly objects: Schema.$Array<Schema.Struct<{
895
1531
  readonly key: Schema.String;
@@ -906,11 +1542,122 @@ export type UrlResponse = typeof UrlResponse.Type;
906
1542
  export declare const CronRunResponse: Schema.Struct<{
907
1543
  readonly started: Schema.String;
908
1544
  }>;
909
- export type CronRunResponse = typeof CronRunResponse.Type;
910
- export declare const RedriveResponse: Schema.Struct<{
911
- readonly taskHandle: Schema.String;
1545
+ /**
1546
+ * - `running`: every desired task is up and the latest rollout finished
1547
+ * - `starting`: a rollout or replacement is under way
1548
+ * - `failing`: tasks keep stopping before they settle, or the last rollout failed
1549
+ * - `stopped`: scaled to zero (a preview past its minutes, or `plat services stop`)
1550
+ */
1551
+ export declare const ServiceState: Schema.Literals<readonly ["running", "starting", "failing", "stopped"]>;
1552
+ export type ServiceState = typeof ServiceState.Type;
1553
+ export declare const ServiceInfo: Schema.Struct<{
1554
+ readonly name: Schema.String;
1555
+ /** Size and capacity the live deployment declares. */
1556
+ readonly cpu: Schema.Finite;
1557
+ readonly memoryMb: Schema.Finite;
1558
+ readonly spot: Schema.Boolean;
1559
+ readonly state: Schema.Literals<readonly ["running", "starting", "failing", "stopped"]>;
1560
+ readonly desired: Schema.Finite;
1561
+ readonly running: Schema.Finite;
1562
+ readonly pending: Schema.Finite;
1563
+ /** Deployment whose build the service runs. */
1564
+ readonly deployment: Schema.optional<Schema.String>;
1565
+ /** When the current task started. */
1566
+ readonly startedAt: Schema.optional<Schema.String>;
1567
+ /** When a preview's stop schedule scales it to zero. */
1568
+ readonly stopsAt: Schema.optional<Schema.String>;
1569
+ /** The task that stopped most recently (ECS keeps stopped tasks for about an hour). */
1570
+ readonly lastStop: Schema.optional<Schema.Struct<{
1571
+ readonly at: Schema.String;
1572
+ readonly reason: Schema.String;
1573
+ readonly exitCode: Schema.optional<Schema.Finite>;
1574
+ }>>;
1575
+ /** Recent ECS service events, newest first. */
1576
+ readonly events: Schema.$Array<Schema.Struct<{
1577
+ readonly at: Schema.String;
1578
+ readonly message: Schema.String;
1579
+ }>>;
1580
+ /** Containers started in the range: deploys, crashes, Spot replacements. */
1581
+ readonly starts: Schema.Finite;
1582
+ /** Runs of `run` that failed and were rerun in the same container, in the range. */
1583
+ readonly failedRuns: Schema.Finite;
1584
+ /** CPU and memory use, % of the task's size (ECS's per-service CloudWatch metrics). */
1585
+ readonly points: Schema.$Array<Schema.Struct<{
1586
+ readonly ts: Schema.String;
1587
+ readonly cpu: Schema.NullOr<Schema.Finite>;
1588
+ readonly memory: Schema.NullOr<Schema.Finite>;
1589
+ }>>;
1590
+ /** If it ran all month. */
1591
+ readonly monthly: Schema.Struct<{
1592
+ readonly computeUsd: Schema.Finite;
1593
+ readonly publicIpv4Usd: Schema.Finite;
1594
+ readonly totalUsd: Schema.Finite;
1595
+ }>;
912
1596
  }>;
913
- export type RedriveResponse = typeof RedriveResponse.Type;
1597
+ export type ServiceInfo = typeof ServiceInfo.Type;
1598
+ export declare const ServicesResponse: Schema.Struct<{
1599
+ readonly app: Schema.String;
1600
+ readonly stage: Schema.String;
1601
+ readonly res: Schema.Literals<readonly ["1m", "1h", "1d"]>;
1602
+ readonly services: Schema.$Array<Schema.Struct<{
1603
+ readonly name: Schema.String;
1604
+ /** Size and capacity the live deployment declares. */
1605
+ readonly cpu: Schema.Finite;
1606
+ readonly memoryMb: Schema.Finite;
1607
+ readonly spot: Schema.Boolean;
1608
+ readonly state: Schema.Literals<readonly ["running", "starting", "failing", "stopped"]>;
1609
+ readonly desired: Schema.Finite;
1610
+ readonly running: Schema.Finite;
1611
+ readonly pending: Schema.Finite;
1612
+ /** Deployment whose build the service runs. */
1613
+ readonly deployment: Schema.optional<Schema.String>;
1614
+ /** When the current task started. */
1615
+ readonly startedAt: Schema.optional<Schema.String>;
1616
+ /** When a preview's stop schedule scales it to zero. */
1617
+ readonly stopsAt: Schema.optional<Schema.String>;
1618
+ /** The task that stopped most recently (ECS keeps stopped tasks for about an hour). */
1619
+ readonly lastStop: Schema.optional<Schema.Struct<{
1620
+ readonly at: Schema.String;
1621
+ readonly reason: Schema.String;
1622
+ readonly exitCode: Schema.optional<Schema.Finite>;
1623
+ }>>;
1624
+ /** Recent ECS service events, newest first. */
1625
+ readonly events: Schema.$Array<Schema.Struct<{
1626
+ readonly at: Schema.String;
1627
+ readonly message: Schema.String;
1628
+ }>>;
1629
+ /** Containers started in the range: deploys, crashes, Spot replacements. */
1630
+ readonly starts: Schema.Finite;
1631
+ /** Runs of `run` that failed and were rerun in the same container, in the range. */
1632
+ readonly failedRuns: Schema.Finite;
1633
+ /** CPU and memory use, % of the task's size (ECS's per-service CloudWatch metrics). */
1634
+ readonly points: Schema.$Array<Schema.Struct<{
1635
+ readonly ts: Schema.String;
1636
+ readonly cpu: Schema.NullOr<Schema.Finite>;
1637
+ readonly memory: Schema.NullOr<Schema.Finite>;
1638
+ }>>;
1639
+ /** If it ran all month. */
1640
+ readonly monthly: Schema.Struct<{
1641
+ readonly computeUsd: Schema.Finite;
1642
+ readonly publicIpv4Usd: Schema.Finite;
1643
+ readonly totalUsd: Schema.Finite;
1644
+ }>;
1645
+ }>>;
1646
+ }>;
1647
+ export type ServicesResponse = typeof ServicesResponse.Type;
1648
+ export declare const StartServiceRequest: Schema.Struct<{
1649
+ /** Stop it again after this many minutes. Previews default to the service's `previewMinutes`. */
1650
+ readonly minutes: Schema.optional<Schema.Int>;
1651
+ }>;
1652
+ export type StartServiceRequest = typeof StartServiceRequest.Encoded;
1653
+ export declare const ServiceActionResponse: Schema.Struct<{
1654
+ readonly name: Schema.String;
1655
+ /** Tasks the service now asks for (1 running, 0 stopped). */
1656
+ readonly desired: Schema.Finite;
1657
+ readonly stopsAt: Schema.optional<Schema.String>;
1658
+ }>;
1659
+ export type ServiceActionResponse = typeof ServiceActionResponse.Type;
1660
+ export type CronRunResponse = typeof CronRunResponse.Type;
914
1661
  export declare const AdminOverview: Schema.Struct<{
915
1662
  readonly members: Schema.$Array<Schema.Struct<{
916
1663
  readonly github: Schema.String;
@@ -919,6 +1666,10 @@ export declare const AdminOverview: Schema.Struct<{
919
1666
  readonly limits: Schema.Struct<{
920
1667
  readonly appsPerMember: Schema.Finite;
921
1668
  readonly stagesPerApp: Schema.Finite;
1669
+ readonly emailsPerDay: Schema.Finite;
1670
+ readonly edgeRequestsPerMinute: Schema.optional<Schema.Finite>;
1671
+ readonly edgeFloorAt: Schema.optional<Schema.Finite>;
1672
+ readonly servicesPerApp: Schema.Finite;
922
1673
  }>;
923
1674
  readonly apps: Schema.Finite;
924
1675
  readonly stages: Schema.Finite;
@@ -934,6 +1685,45 @@ export declare const AdminOverview: Schema.Struct<{
934
1685
  readonly usd: Schema.Finite;
935
1686
  }>>;
936
1687
  readonly monthToDateUsd: Schema.Finite;
1688
+ /** Services of the app's non-preview stages (previews run theirs for minutes after a deploy). */
1689
+ readonly alwaysOn: Schema.optional<Schema.$Array<Schema.Struct<{
1690
+ readonly stage: Schema.String;
1691
+ readonly kind: Schema.Literal<"service">;
1692
+ readonly name: Schema.String;
1693
+ /** `0.25 vCPU · 512 MB · Spot`. */
1694
+ readonly detail: Schema.String;
1695
+ readonly monthly: Schema.Struct<{
1696
+ readonly computeUsd: Schema.Finite;
1697
+ readonly publicIpv4Usd: Schema.Finite;
1698
+ readonly totalUsd: Schema.Finite;
1699
+ }>;
1700
+ }>>>;
1701
+ /** Servers of the app's non-preview stages (previews run request mode). */
1702
+ readonly compute: Schema.optional<Schema.$Array<Schema.Struct<{
1703
+ readonly stage: Schema.String;
1704
+ /** `web.compute` of the live deployment. */
1705
+ readonly setting: Schema.Literals<readonly ["auto", "request", "instance"]>;
1706
+ readonly compute: Schema.Literals<readonly ["request", "instance"]>;
1707
+ readonly estimate: Schema.optional<Schema.Struct<{
1708
+ readonly at: Schema.String;
1709
+ readonly request: Schema.Struct<{
1710
+ readonly monthlyUsd: Schema.Finite;
1711
+ readonly coldStartsPerMonth: Schema.Finite;
1712
+ }>;
1713
+ readonly instance: Schema.Struct<{
1714
+ readonly monthlyUsd: Schema.Finite;
1715
+ readonly environmentHoursPerMonth: Schema.Finite;
1716
+ }>;
1717
+ readonly requestsPerMonth: Schema.Finite;
1718
+ /** Days of traffic the month is extrapolated from. */
1719
+ readonly days: Schema.Finite;
1720
+ }>>;
1721
+ readonly streak: Schema.optional<Schema.Struct<{
1722
+ readonly to: Schema.Literals<readonly ["request", "instance"]>;
1723
+ readonly days: Schema.Finite;
1724
+ readonly day: Schema.String;
1725
+ }>>;
1726
+ }>>>;
937
1727
  }>>;
938
1728
  readonly shared: Schema.NullOr<Schema.Struct<{
939
1729
  readonly app: Schema.String;
@@ -943,10 +1733,117 @@ export declare const AdminOverview: Schema.Struct<{
943
1733
  readonly usd: Schema.Finite;
944
1734
  }>>;
945
1735
  readonly monthToDateUsd: Schema.Finite;
1736
+ /** Services of the app's non-preview stages (previews run theirs for minutes after a deploy). */
1737
+ readonly alwaysOn: Schema.optional<Schema.$Array<Schema.Struct<{
1738
+ readonly stage: Schema.String;
1739
+ readonly kind: Schema.Literal<"service">;
1740
+ readonly name: Schema.String;
1741
+ /** `0.25 vCPU · 512 MB · Spot`. */
1742
+ readonly detail: Schema.String;
1743
+ readonly monthly: Schema.Struct<{
1744
+ readonly computeUsd: Schema.Finite;
1745
+ readonly publicIpv4Usd: Schema.Finite;
1746
+ readonly totalUsd: Schema.Finite;
1747
+ }>;
1748
+ }>>>;
1749
+ /** Servers of the app's non-preview stages (previews run request mode). */
1750
+ readonly compute: Schema.optional<Schema.$Array<Schema.Struct<{
1751
+ readonly stage: Schema.String;
1752
+ /** `web.compute` of the live deployment. */
1753
+ readonly setting: Schema.Literals<readonly ["auto", "request", "instance"]>;
1754
+ readonly compute: Schema.Literals<readonly ["request", "instance"]>;
1755
+ readonly estimate: Schema.optional<Schema.Struct<{
1756
+ readonly at: Schema.String;
1757
+ readonly request: Schema.Struct<{
1758
+ readonly monthlyUsd: Schema.Finite;
1759
+ readonly coldStartsPerMonth: Schema.Finite;
1760
+ }>;
1761
+ readonly instance: Schema.Struct<{
1762
+ readonly monthlyUsd: Schema.Finite;
1763
+ readonly environmentHoursPerMonth: Schema.Finite;
1764
+ }>;
1765
+ readonly requestsPerMonth: Schema.Finite;
1766
+ /** Days of traffic the month is extrapolated from. */
1767
+ readonly days: Schema.Finite;
1768
+ }>>;
1769
+ readonly streak: Schema.optional<Schema.Struct<{
1770
+ readonly to: Schema.Literals<readonly ["request", "instance"]>;
1771
+ readonly days: Schema.Finite;
1772
+ readonly day: Schema.String;
1773
+ }>>;
1774
+ }>>>;
946
1775
  }>>;
947
1776
  }>;
948
1777
  }>;
949
1778
  export type AdminOverview = typeof AdminOverview.Type;
1779
+ /** Requests the edge's web ACL handled in one bucket (CloudWatch `Sum`s). */
1780
+ export declare const EdgeFloorPoint: Schema.Struct<{
1781
+ readonly ts: Schema.String;
1782
+ /** Blocked by the per-client floor. */
1783
+ readonly blocked: Schema.Finite;
1784
+ /** Let through (every request the web ACL saw and allowed). */
1785
+ readonly allowed: Schema.Finite;
1786
+ }>;
1787
+ export type EdgeFloorPoint = typeof EdgeFloorPoint.Type;
1788
+ /** A request the floor blocked, from WAF's sample of the last three hours. */
1789
+ export declare const EdgeFloorSample: Schema.Struct<{
1790
+ readonly at: Schema.String;
1791
+ readonly host: Schema.String;
1792
+ readonly client: Schema.String;
1793
+ readonly country: Schema.optional<Schema.String>;
1794
+ readonly method: Schema.String;
1795
+ readonly path: Schema.String;
1796
+ }>;
1797
+ export type EdgeFloorSample = typeof EdgeFloorSample.Type;
1798
+ /** Whether the edge floor is on, since when, and why it turned on or off. */
1799
+ export declare const EdgeFloorState: Schema.Struct<{
1800
+ readonly on: Schema.Boolean;
1801
+ /** Absent until it first turns on. */
1802
+ readonly since: Schema.optional<Schema.String>;
1803
+ readonly why: Schema.optional<Schema.String>;
1804
+ }>;
1805
+ export type EdgeFloorState = typeof EdgeFloorState.Type;
1806
+ /**
1807
+ * The edge's per-client request floor across every app: on only while the
1808
+ * whole edge is busy (`limits.edgeFloorAt`), then `limits.edgeRequestsPerMinute`
1809
+ * per client and host. Counts cover the range whether or not it was on then.
1810
+ */
1811
+ export declare const EdgeFloorResponse: Schema.Struct<{
1812
+ /** False when the platform has no floor; the rest is then empty. */
1813
+ readonly enabled: Schema.Boolean;
1814
+ readonly state: Schema.Struct<{
1815
+ readonly on: Schema.Boolean;
1816
+ /** Absent until it first turns on. */
1817
+ readonly since: Schema.optional<Schema.String>;
1818
+ readonly why: Schema.optional<Schema.String>;
1819
+ }>;
1820
+ /** Requests per client per host per minute while it's on. */
1821
+ readonly limit: Schema.optional<Schema.Finite>;
1822
+ /** Requests per minute across the edge that turn it on. */
1823
+ readonly threshold: Schema.optional<Schema.Finite>;
1824
+ readonly res: Schema.Literals<readonly ["1m", "1h", "1d"]>;
1825
+ readonly totals: Schema.Struct<{
1826
+ readonly blocked: Schema.Finite;
1827
+ readonly allowed: Schema.Finite;
1828
+ }>;
1829
+ readonly points: Schema.$Array<Schema.Struct<{
1830
+ readonly ts: Schema.String;
1831
+ /** Blocked by the per-client floor. */
1832
+ readonly blocked: Schema.Finite;
1833
+ /** Let through (every request the web ACL saw and allowed). */
1834
+ readonly allowed: Schema.Finite;
1835
+ }>>;
1836
+ /** Newest first. WAF samples a share of requests, so counts here undercount. */
1837
+ readonly samples: Schema.$Array<Schema.Struct<{
1838
+ readonly at: Schema.String;
1839
+ readonly host: Schema.String;
1840
+ readonly client: Schema.String;
1841
+ readonly country: Schema.optional<Schema.String>;
1842
+ readonly method: Schema.String;
1843
+ readonly path: Schema.String;
1844
+ }>>;
1845
+ }>;
1846
+ export type EdgeFloorResponse = typeof EdgeFloorResponse.Type;
950
1847
  /** Body of every API error, whatever the status. */
951
1848
  export declare const ApiErrorBody: Schema.Struct<{
952
1849
  readonly error: Schema.Struct<{