@rikalabs/akter-cli 0.1.0-alpha.3 → 0.1.0-alpha.4
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 +8 -0
- package/dist/cloud-api/auth.d.ts +7 -4
- package/dist/cloud-api/billing.d.ts +17 -52
- package/dist/cloud-api/contract.d.ts +19 -19
- package/dist/cloud-api/groups/billing.d.ts +4 -13
- package/dist/cloud-api/groups/projects.d.ts +15 -6
- package/dist/cloud-api/index.d.ts +1 -1
- package/dist/cloud-api/index.js +9 -17
- package/dist/cloud-api/projects.d.ts +11 -6
- package/dist/cloud-api/runtime.d.ts +1 -1
- package/dist/inspector-client.js +1 -1
- package/dist/main.js +74 -51
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.4 (2026-10-09)
|
|
4
|
+
|
|
5
|
+
- **Breaking cloud contract:** every environment uses customer Postgres through `DATABASE_URL`. `Environment.database`, when reported, is `{ source: "customer", state: "missing" | "reachable" | "unreachable", latency, latencyWarning, runnerCap }`. Latency is nullable p50 milliseconds; runner cap is a nullable integer. The managed source and provisioning, ready, read-only and failed states are removed.
|
|
6
|
+
- **Breaking billing contract:** base subscription plus compute unit-hours only. Removes storage allowances, caps, overage prices, meters, samples, per-project storage usage and managed database features. `QuotaExceeded.cap` is now `compute`, `connections` or `spend`; storage is no longer a quota. All types remain derived from Effect schemas at `@rikalabs/akter-cli/cloud-api`.
|
|
7
|
+
- `akter env list` prints names and update times without a `managed` marker. After a deployment reaches `live`, `akter deploy` confirms success and reads the database report, printing its latency warning and non-null runner cap, including zero, only for the completed rollout. A p50 above 5 ms warns without refusing the deployment; unknown measurements stay unknown. Failed or superseded diagnostic reads warn without changing the successful exit status.
|
|
8
|
+
- `akter deploy` keeps following a rollout through a brief control-plane outage. Transport failures, typed `Unavailable` (503) answers without a known `reason` and unreadable 5xx answers such as a proxy's 502 are retried with the delays `logs --follow` uses (1, 2, 4, then 8 seconds), and six consecutive failed reads stop it as before. Refusals, including an ended session, are never retried.
|
|
9
|
+
- The cloud API contract's `Authentication` middleware declares `Unavailable` (503) alongside `Unauthorized` and `Forbidden`, so every endpoint, including `/api/me`, decodes a session-store outage as a typed `Unavailable`. `akter whoami` then reports a temporary outage (exit 1) instead of an unreachable control plane (exit 2), and never asks you to log in again. This is additive for `/cloud-api` consumers; a server may now fail authentication with `Unavailable`.
|
|
10
|
+
|
|
3
11
|
## 0.1.0-alpha.3 (2026-10-08)
|
|
4
12
|
|
|
5
13
|
The first CLI release, versioned with `@rikalabs/akter` on the `alpha` and `latest` dist-tags. This includes the unpublished alpha.2 draft and the final launch contract.
|
package/dist/cloud-api/auth.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, Schema } from "effect";
|
|
2
2
|
import { HttpApiMiddleware, HttpApiSecurity } from "effect/http-api";
|
|
3
|
-
import { Forbidden, Unauthorized } from "./errors.ts";
|
|
3
|
+
import { Forbidden, Unauthorized, Unavailable } from "./errors.ts";
|
|
4
4
|
/** The cookie that carries the Better Auth session token over plain HTTP. */
|
|
5
5
|
export declare const sessionCookieName = "better-auth.session_token";
|
|
6
6
|
/** The same cookie as Better Auth names it when served over HTTPS. */
|
|
@@ -46,7 +46,7 @@ export declare class CurrentIdentity extends CurrentIdentity_base {
|
|
|
46
46
|
declare const Authentication_base: HttpApiMiddleware.ServiceClass<Authentication, "@akter/cloud-api/Authentication", {
|
|
47
47
|
requires: never;
|
|
48
48
|
provides: CurrentIdentity;
|
|
49
|
-
error: readonly [typeof Unauthorized, typeof Forbidden];
|
|
49
|
+
error: readonly [typeof Unauthorized, typeof Forbidden, typeof Unavailable];
|
|
50
50
|
clientError: never;
|
|
51
51
|
requiredForClient: false;
|
|
52
52
|
security: {
|
|
@@ -60,14 +60,17 @@ declare const Authentication_base: HttpApiMiddleware.ServiceClass<Authentication
|
|
|
60
60
|
readonly secureSession: HttpApiSecurity.ApiKey;
|
|
61
61
|
readonly apiKey: HttpApiSecurity.ApiKey;
|
|
62
62
|
readonly bearer: HttpApiSecurity.Http;
|
|
63
|
-
}, CurrentIdentity, readonly [typeof Unauthorized, typeof Forbidden], never>>;
|
|
63
|
+
}, CurrentIdentity, readonly [typeof Unauthorized, typeof Forbidden, typeof Unavailable], never>>;
|
|
64
64
|
/**
|
|
65
65
|
* Resolves who is calling. The server implements one handler per security
|
|
66
66
|
* scheme and fails `Unauthorized` when a scheme's credential is missing or
|
|
67
67
|
* invalid; the first scheme that succeeds provides `CurrentIdentity`. A cookie
|
|
68
68
|
* browser client sends credentials automatically, so no client implementation
|
|
69
69
|
* is required. `bearer` carries the session token a CLI receives from Better
|
|
70
|
-
* Auth's device authorization grant.
|
|
70
|
+
* Auth's device authorization grant. A credential the server cannot check
|
|
71
|
+
* because its session store is down fails `Unavailable`, never
|
|
72
|
+
* `Unauthorized`, so every endpoint's client can tell an outage from a
|
|
73
|
+
* session that ended.
|
|
71
74
|
*
|
|
72
75
|
* @effect-expect-leaking HttpServerRequest | ParsedSearchParams | RouteContext
|
|
73
76
|
*/
|
|
@@ -48,16 +48,13 @@ export type SpendLimit = typeof SpendLimit.Type;
|
|
|
48
48
|
* reported, discriminated by `cap`. `limit` is null when the cap does not
|
|
49
49
|
* apply. `atCap` means usage has reached the limit; `refusing` means the edge
|
|
50
50
|
* would refuse the next new command, or for `connections` the next new
|
|
51
|
-
* connection
|
|
52
|
-
* read-only: writes fail and reads still work. `reason` is `unbound` when the
|
|
51
|
+
* connection. `reason` is `unbound` when the
|
|
53
52
|
* edge refuses everything because the organization has no billing account;
|
|
54
53
|
* such caps have no limit.
|
|
55
54
|
*
|
|
56
55
|
* `limit` and `used` are cents for `spend`, open connections for
|
|
57
56
|
* `connections`, compute unit-hours used in the current billing period for
|
|
58
|
-
* `compute
|
|
59
|
-
* managed database storage, where `used` is the latest pooled sample. A
|
|
60
|
-
* database the customer brings never counts toward it.
|
|
57
|
+
* `compute`. Customer database storage is not metered, capped or billed.
|
|
61
58
|
*/
|
|
62
59
|
export declare const CapState: Schema.Struct<{
|
|
63
60
|
readonly limit: Schema.NullOr<Schema.Finite>;
|
|
@@ -65,7 +62,7 @@ export declare const CapState: Schema.Struct<{
|
|
|
65
62
|
readonly atCap: Schema.Boolean;
|
|
66
63
|
readonly refusing: Schema.Boolean;
|
|
67
64
|
readonly reason: Schema.optionalKey<Schema.Literal<"unbound">>;
|
|
68
|
-
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"
|
|
65
|
+
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"]>;
|
|
69
66
|
}>;
|
|
70
67
|
export type CapState = typeof CapState.Type;
|
|
71
68
|
/**
|
|
@@ -104,7 +101,7 @@ export declare const BillingSummary: Schema.Struct<{
|
|
|
104
101
|
readonly atCap: Schema.Boolean;
|
|
105
102
|
readonly refusing: Schema.Boolean;
|
|
106
103
|
readonly reason: Schema.optionalKey<Schema.Literal<"unbound">>;
|
|
107
|
-
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"
|
|
104
|
+
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"]>;
|
|
108
105
|
}>>>;
|
|
109
106
|
}>;
|
|
110
107
|
export type BillingSummary = typeof BillingSummary.Type;
|
|
@@ -141,11 +138,10 @@ export declare const HostedSession: Schema.Struct<{
|
|
|
141
138
|
export type HostedSession = typeof HostedSession.Type;
|
|
142
139
|
/**
|
|
143
140
|
* What a plan offers, derived from the pricing configuration: billed compute
|
|
144
|
-
* overage, a hard compute cap,
|
|
145
|
-
*
|
|
146
|
-
* bought through checkout.
|
|
141
|
+
* overage, a hard compute cap, customer Postgres on every plan, and a paid
|
|
142
|
+
* subscription bought through checkout.
|
|
147
143
|
*/
|
|
148
|
-
export declare const PlanFeature: Schema.Literals<readonly ["compute-overage", "compute-cap", "
|
|
144
|
+
export declare const PlanFeature: Schema.Literals<readonly ["compute-overage", "compute-cap", "byo-database", "checkout"]>;
|
|
149
145
|
export type PlanFeature = typeof PlanFeature.Type;
|
|
150
146
|
/**
|
|
151
147
|
* One tier of the pricing configuration. `allowances.computeUnitHours` is the
|
|
@@ -154,12 +150,7 @@ export type PlanFeature = typeof PlanFeature.Type;
|
|
|
154
150
|
* `overage.computeCentsPerUnitHour`). A machine size's hour bills the compute
|
|
155
151
|
* unit-hours `PlanCatalog.computeSizes` gives it.
|
|
156
152
|
*
|
|
157
|
-
*
|
|
158
|
-
* plan, in decimal gigabytes, pooled across the organization's managed
|
|
159
|
-
* environment databases. `allowances.storageGbCap` is its hard stop, past
|
|
160
|
-
* which those databases are read-only, and is null when overage is billed
|
|
161
|
-
* instead at `overage.storageCentsPerGbMonth`. A provisional tier's prices
|
|
162
|
-
* are not yet published.
|
|
153
|
+
* A provisional tier's prices are not yet published.
|
|
163
154
|
*/
|
|
164
155
|
export declare const CatalogPlan: Schema.Struct<{
|
|
165
156
|
readonly id: Schema.Literals<readonly ["free", "pro", "team", "enterprise"]>;
|
|
@@ -169,15 +160,12 @@ export declare const CatalogPlan: Schema.Struct<{
|
|
|
169
160
|
readonly allowances: Schema.Struct<{
|
|
170
161
|
readonly computeUnitHours: Schema.Finite;
|
|
171
162
|
readonly computeUnitHourCap: Schema.NullOr<Schema.Finite>;
|
|
172
|
-
readonly storageGb: Schema.Finite;
|
|
173
|
-
readonly storageGbCap: Schema.NullOr<Schema.Finite>;
|
|
174
163
|
readonly concurrentConnections: Schema.Int;
|
|
175
164
|
}>;
|
|
176
165
|
readonly overage: Schema.Struct<{
|
|
177
166
|
readonly computeCentsPerUnitHour: Schema.Finite;
|
|
178
|
-
readonly storageCentsPerGbMonth: Schema.Finite;
|
|
179
167
|
}>;
|
|
180
|
-
readonly features: Schema.$Array<Schema.Literals<readonly ["compute-overage", "compute-cap", "
|
|
168
|
+
readonly features: Schema.$Array<Schema.Literals<readonly ["compute-overage", "compute-cap", "byo-database", "checkout"]>>;
|
|
181
169
|
readonly provisional: Schema.Boolean;
|
|
182
170
|
}>;
|
|
183
171
|
export type CatalogPlan = typeof CatalogPlan.Type;
|
|
@@ -207,15 +195,12 @@ export declare const PlanCatalog: Schema.Struct<{
|
|
|
207
195
|
readonly allowances: Schema.Struct<{
|
|
208
196
|
readonly computeUnitHours: Schema.Finite;
|
|
209
197
|
readonly computeUnitHourCap: Schema.NullOr<Schema.Finite>;
|
|
210
|
-
readonly storageGb: Schema.Finite;
|
|
211
|
-
readonly storageGbCap: Schema.NullOr<Schema.Finite>;
|
|
212
198
|
readonly concurrentConnections: Schema.Int;
|
|
213
199
|
}>;
|
|
214
200
|
readonly overage: Schema.Struct<{
|
|
215
201
|
readonly computeCentsPerUnitHour: Schema.Finite;
|
|
216
|
-
readonly storageCentsPerGbMonth: Schema.Finite;
|
|
217
202
|
}>;
|
|
218
|
-
readonly features: Schema.$Array<Schema.Literals<readonly ["compute-overage", "compute-cap", "
|
|
203
|
+
readonly features: Schema.$Array<Schema.Literals<readonly ["compute-overage", "compute-cap", "byo-database", "checkout"]>>;
|
|
219
204
|
readonly provisional: Schema.Boolean;
|
|
220
205
|
}>>;
|
|
221
206
|
readonly computeSizes: Schema.$Array<Schema.Struct<{
|
|
@@ -230,13 +215,12 @@ export type PlanCatalog = typeof PlanCatalog.Type;
|
|
|
230
215
|
/**
|
|
231
216
|
* `runnerHours` is measured in compute unit-hours (see `ComputeUsage`), not
|
|
232
217
|
* machine hours; raw machine hours are reported per machine size in
|
|
233
|
-
* `ComputeUsage.machineHours`.
|
|
234
|
-
* database storage over the period in decimal gigabytes, billed per GB-month.
|
|
218
|
+
* `ComputeUsage.machineHours`.
|
|
235
219
|
*/
|
|
236
|
-
export declare const UsageMeterName: Schema.
|
|
220
|
+
export declare const UsageMeterName: Schema.Literal<"runnerHours">;
|
|
237
221
|
export type UsageMeterName = typeof UsageMeterName.Type;
|
|
238
222
|
export declare const UsageMeter: Schema.Struct<{
|
|
239
|
-
readonly meter: Schema.
|
|
223
|
+
readonly meter: Schema.Literal<"runnerHours">;
|
|
240
224
|
readonly used: Schema.Finite;
|
|
241
225
|
readonly included: Schema.Finite;
|
|
242
226
|
readonly overage: Schema.Finite;
|
|
@@ -246,12 +230,10 @@ export type UsageMeter = typeof UsageMeter.Type;
|
|
|
246
230
|
/**
|
|
247
231
|
* The published rules usage is priced by, sent with every usage report.
|
|
248
232
|
* `computeCentsPerUnitHour` prices compute unit-hours beyond the plan's
|
|
249
|
-
* allowance and
|
|
250
|
-
* beyond it; each is 0 where the plan bills no overage.
|
|
233
|
+
* allowance and is 0 where the plan bills no overage.
|
|
251
234
|
*/
|
|
252
235
|
export declare const UsagePricing: Schema.Struct<{
|
|
253
236
|
readonly computeCentsPerUnitHour: Schema.Finite;
|
|
254
|
-
readonly storageCentsPerGbMonth: Schema.Finite;
|
|
255
237
|
readonly provisional: Schema.optionalKey<Schema.Boolean>;
|
|
256
238
|
}>;
|
|
257
239
|
export type UsagePricing = typeof UsagePricing.Type;
|
|
@@ -269,42 +251,27 @@ export declare const ComputeUsage: Schema.Struct<{
|
|
|
269
251
|
readonly computeUnitHours: Schema.Finite;
|
|
270
252
|
}>;
|
|
271
253
|
export type ComputeUsage = typeof ComputeUsage.Type;
|
|
272
|
-
/**
|
|
273
|
-
* The organization's latest pooled managed database storage: the sum of the
|
|
274
|
-
* sampled bytes of its managed environment databases, and when it was
|
|
275
|
-
* sampled. A database the customer brings is excluded.
|
|
276
|
-
*/
|
|
277
|
-
export declare const StorageSample: Schema.Struct<{
|
|
278
|
-
readonly bytes: Schema.Finite;
|
|
279
|
-
readonly sampledAt: Schema.DateTimeUtc;
|
|
280
|
-
}>;
|
|
281
|
-
export type StorageSample = typeof StorageSample.Type;
|
|
282
254
|
/**
|
|
283
255
|
* `caps` describe now whatever `period` is reported. A project's
|
|
284
256
|
* `computeUnitHours` is its compute for the period and `compute` breaks it
|
|
285
|
-
* down by environment and machine size
|
|
286
|
-
* databases' storage for the period.
|
|
257
|
+
* down by environment and machine size.
|
|
287
258
|
*/
|
|
288
259
|
export declare const Usage: Schema.Struct<{
|
|
289
260
|
readonly period: Schema.String;
|
|
290
261
|
readonly meters: Schema.$Array<Schema.Struct<{
|
|
291
|
-
readonly meter: Schema.
|
|
262
|
+
readonly meter: Schema.Literal<"runnerHours">;
|
|
292
263
|
readonly used: Schema.Finite;
|
|
293
264
|
readonly included: Schema.Finite;
|
|
294
265
|
readonly overage: Schema.Finite;
|
|
295
266
|
readonly overageCostCents: Schema.Finite;
|
|
296
267
|
}>>;
|
|
297
|
-
readonly latestStorageSample: Schema.NullOr<Schema.Struct<{
|
|
298
|
-
readonly bytes: Schema.Finite;
|
|
299
|
-
readonly sampledAt: Schema.DateTimeUtc;
|
|
300
|
-
}>>;
|
|
301
268
|
readonly caps: Schema.$Array<Schema.Struct<{
|
|
302
269
|
readonly limit: Schema.NullOr<Schema.Finite>;
|
|
303
270
|
readonly used: Schema.Finite;
|
|
304
271
|
readonly atCap: Schema.Boolean;
|
|
305
272
|
readonly refusing: Schema.Boolean;
|
|
306
273
|
readonly reason: Schema.optionalKey<Schema.Literal<"unbound">>;
|
|
307
|
-
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"
|
|
274
|
+
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"]>;
|
|
308
275
|
}>>;
|
|
309
276
|
readonly byProject: Schema.$Array<Schema.Struct<{
|
|
310
277
|
readonly projectId: Schema.brand<Schema.String, "ProjectId">;
|
|
@@ -318,12 +285,10 @@ export declare const Usage: Schema.Struct<{
|
|
|
318
285
|
readonly machineHours: Schema.Finite;
|
|
319
286
|
readonly computeUnitHours: Schema.Finite;
|
|
320
287
|
}>>;
|
|
321
|
-
readonly storageGbMonths: Schema.Finite;
|
|
322
288
|
readonly estimatedCostCents: Schema.Finite;
|
|
323
289
|
}>>;
|
|
324
290
|
readonly pricing: Schema.Struct<{
|
|
325
291
|
readonly computeCentsPerUnitHour: Schema.Finite;
|
|
326
|
-
readonly storageCentsPerGbMonth: Schema.Finite;
|
|
327
292
|
readonly provisional: Schema.optionalKey<Schema.Boolean>;
|
|
328
293
|
}>;
|
|
329
294
|
}>;
|
|
@@ -232,7 +232,7 @@ declare const CloudApi_base: HttpApi.HttpApi<"akter-cloud", import("effect/http-
|
|
|
232
232
|
readonly atCap: import("effect/Schema").Boolean;
|
|
233
233
|
readonly refusing: import("effect/Schema").Boolean;
|
|
234
234
|
readonly reason: import("effect/Schema").optionalKey<import("effect/Schema").Literal<"unbound">>;
|
|
235
|
-
readonly cap: import("effect/Schema").Literals<readonly ["spend", "connections", "compute"
|
|
235
|
+
readonly cap: import("effect/Schema").Literals<readonly ["spend", "connections", "compute"]>;
|
|
236
236
|
}>>>;
|
|
237
237
|
}>>, import("effect/Schema").toCodecJson<typeof import("./errors.ts").Forbidden | typeof import("./errors.ts").NotFound | typeof import("./errors.ts").NotImplemented | typeof import("./errors.ts").Unavailable>, Authentication, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listInvoices", "GET", "/api/organizations/:organizationId/billing/invoices", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
238
238
|
organizationId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
|
|
@@ -254,15 +254,12 @@ declare const CloudApi_base: HttpApi.HttpApi<"akter-cloud", import("effect/http-
|
|
|
254
254
|
readonly allowances: import("effect/Schema").Struct<{
|
|
255
255
|
readonly computeUnitHours: import("effect/Schema").Finite;
|
|
256
256
|
readonly computeUnitHourCap: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
|
|
257
|
-
readonly storageGb: import("effect/Schema").Finite;
|
|
258
|
-
readonly storageGbCap: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
|
|
259
257
|
readonly concurrentConnections: import("effect/Schema").Int;
|
|
260
258
|
}>;
|
|
261
259
|
readonly overage: import("effect/Schema").Struct<{
|
|
262
260
|
readonly computeCentsPerUnitHour: import("effect/Schema").Finite;
|
|
263
|
-
readonly storageCentsPerGbMonth: import("effect/Schema").Finite;
|
|
264
261
|
}>;
|
|
265
|
-
readonly features: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["compute-overage", "compute-cap", "
|
|
262
|
+
readonly features: import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["compute-overage", "compute-cap", "byo-database", "checkout"]>>;
|
|
266
263
|
readonly provisional: import("effect/Schema").Boolean;
|
|
267
264
|
}>>;
|
|
268
265
|
readonly computeSizes: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
@@ -902,8 +899,11 @@ declare const CloudApi_base: HttpApi.HttpApi<"akter-cloud", import("effect/http-
|
|
|
902
899
|
readonly projectId: import("effect/Schema").brand<import("effect/Schema").String, "ProjectId">;
|
|
903
900
|
readonly currentDeploymentId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "DeploymentId">>;
|
|
904
901
|
readonly database: import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
905
|
-
readonly source: import("effect/Schema").
|
|
906
|
-
readonly state: import("effect/Schema").Literals<readonly ["
|
|
902
|
+
readonly source: import("effect/Schema").Literal<"customer">;
|
|
903
|
+
readonly state: import("effect/Schema").Literals<readonly ["missing", "reachable", "unreachable"]>;
|
|
904
|
+
readonly latency: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
|
|
905
|
+
readonly latencyWarning: import("effect/Schema").Boolean;
|
|
906
|
+
readonly runnerCap: import("effect/Schema").NullOr<import("effect/Schema").Int>;
|
|
907
907
|
}>>;
|
|
908
908
|
}>>, import("effect/Schema").toCodecJson<typeof import("./errors.ts").Forbidden | typeof import("./errors.ts").NotFound | typeof import("./errors.ts").Conflict | typeof import("./errors.ts").NotImplemented | typeof import("./errors.ts").Unavailable>, Authentication, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"delete", "DELETE", "/api/projects/:projectId", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
909
909
|
projectId: import("effect/Schema").brand<import("effect/Schema").String, "ProjectId">;
|
|
@@ -936,8 +936,11 @@ declare const CloudApi_base: HttpApi.HttpApi<"akter-cloud", import("effect/http-
|
|
|
936
936
|
readonly projectId: import("effect/Schema").brand<import("effect/Schema").String, "ProjectId">;
|
|
937
937
|
readonly currentDeploymentId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "DeploymentId">>;
|
|
938
938
|
readonly database: import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
939
|
-
readonly source: import("effect/Schema").
|
|
940
|
-
readonly state: import("effect/Schema").Literals<readonly ["
|
|
939
|
+
readonly source: import("effect/Schema").Literal<"customer">;
|
|
940
|
+
readonly state: import("effect/Schema").Literals<readonly ["missing", "reachable", "unreachable"]>;
|
|
941
|
+
readonly latency: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
|
|
942
|
+
readonly latencyWarning: import("effect/Schema").Boolean;
|
|
943
|
+
readonly runnerCap: import("effect/Schema").NullOr<import("effect/Schema").Int>;
|
|
941
944
|
}>>;
|
|
942
945
|
}>>, import("effect/Schema").toCodecJson<typeof import("./errors.ts").Forbidden | typeof import("./errors.ts").NotFound | typeof import("./errors.ts").NotImplemented | typeof import("./errors.ts").Unavailable>, Authentication, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"list", "GET", "/api/organizations/:organizationId/projects", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
943
946
|
organizationId: import("effect/Schema").brand<import("effect/Schema").String, "OrganizationId">;
|
|
@@ -956,8 +959,11 @@ declare const CloudApi_base: HttpApi.HttpApi<"akter-cloud", import("effect/http-
|
|
|
956
959
|
readonly projectId: import("effect/Schema").brand<import("effect/Schema").String, "ProjectId">;
|
|
957
960
|
readonly currentDeploymentId: import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "DeploymentId">>;
|
|
958
961
|
readonly database: import("effect/Schema").optionalKey<import("effect/Schema").Struct<{
|
|
959
|
-
readonly source: import("effect/Schema").
|
|
960
|
-
readonly state: import("effect/Schema").Literals<readonly ["
|
|
962
|
+
readonly source: import("effect/Schema").Literal<"customer">;
|
|
963
|
+
readonly state: import("effect/Schema").Literals<readonly ["missing", "reachable", "unreachable"]>;
|
|
964
|
+
readonly latency: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
|
|
965
|
+
readonly latencyWarning: import("effect/Schema").Boolean;
|
|
966
|
+
readonly runnerCap: import("effect/Schema").NullOr<import("effect/Schema").Int>;
|
|
961
967
|
}>>;
|
|
962
968
|
}>>>, import("effect/Schema").toCodecJson<typeof import("./errors.ts").Forbidden | typeof import("./errors.ts").NotFound | typeof import("./errors.ts").NotImplemented | typeof import("./errors.ts").Unavailable>, Authentication, never> | import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"update", "PATCH", "/api/projects/:projectId", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
|
|
963
969
|
projectId: import("effect/Schema").brand<import("effect/Schema").String, "ProjectId">;
|
|
@@ -1505,23 +1511,19 @@ declare const CloudApi_base: HttpApi.HttpApi<"akter-cloud", import("effect/http-
|
|
|
1505
1511
|
}>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
|
|
1506
1512
|
readonly period: import("effect/Schema").String;
|
|
1507
1513
|
readonly meters: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
1508
|
-
readonly meter: import("effect/Schema").
|
|
1514
|
+
readonly meter: import("effect/Schema").Literal<"runnerHours">;
|
|
1509
1515
|
readonly used: import("effect/Schema").Finite;
|
|
1510
1516
|
readonly included: import("effect/Schema").Finite;
|
|
1511
1517
|
readonly overage: import("effect/Schema").Finite;
|
|
1512
1518
|
readonly overageCostCents: import("effect/Schema").Finite;
|
|
1513
1519
|
}>>;
|
|
1514
|
-
readonly latestStorageSample: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
1515
|
-
readonly bytes: import("effect/Schema").Finite;
|
|
1516
|
-
readonly sampledAt: import("effect/Schema").DateTimeUtc;
|
|
1517
|
-
}>>;
|
|
1518
1520
|
readonly caps: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
1519
1521
|
readonly limit: import("effect/Schema").NullOr<import("effect/Schema").Finite>;
|
|
1520
1522
|
readonly used: import("effect/Schema").Finite;
|
|
1521
1523
|
readonly atCap: import("effect/Schema").Boolean;
|
|
1522
1524
|
readonly refusing: import("effect/Schema").Boolean;
|
|
1523
1525
|
readonly reason: import("effect/Schema").optionalKey<import("effect/Schema").Literal<"unbound">>;
|
|
1524
|
-
readonly cap: import("effect/Schema").Literals<readonly ["spend", "connections", "compute"
|
|
1526
|
+
readonly cap: import("effect/Schema").Literals<readonly ["spend", "connections", "compute"]>;
|
|
1525
1527
|
}>>;
|
|
1526
1528
|
readonly byProject: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
1527
1529
|
readonly projectId: import("effect/Schema").brand<import("effect/Schema").String, "ProjectId">;
|
|
@@ -1535,12 +1537,10 @@ declare const CloudApi_base: HttpApi.HttpApi<"akter-cloud", import("effect/http-
|
|
|
1535
1537
|
readonly machineHours: import("effect/Schema").Finite;
|
|
1536
1538
|
readonly computeUnitHours: import("effect/Schema").Finite;
|
|
1537
1539
|
}>>;
|
|
1538
|
-
readonly storageGbMonths: import("effect/Schema").Finite;
|
|
1539
1540
|
readonly estimatedCostCents: import("effect/Schema").Finite;
|
|
1540
1541
|
}>>;
|
|
1541
1542
|
readonly pricing: import("effect/Schema").Struct<{
|
|
1542
1543
|
readonly computeCentsPerUnitHour: import("effect/Schema").Finite;
|
|
1543
|
-
readonly storageCentsPerGbMonth: import("effect/Schema").Finite;
|
|
1544
1544
|
readonly provisional: import("effect/Schema").optionalKey<import("effect/Schema").Boolean>;
|
|
1545
1545
|
}>;
|
|
1546
1546
|
}>>, import("effect/Schema").toCodecJson<typeof import("./errors.ts").Forbidden | typeof import("./errors.ts").NotFound | typeof import("./errors.ts").NotImplemented | typeof import("./errors.ts").Unavailable>, Authentication, never>, false>>;
|
|
@@ -40,7 +40,7 @@ declare const BillingGroup_base: HttpApiGroup.HttpApiGroup<"billing", HttpApiEnd
|
|
|
40
40
|
readonly atCap: Schema.Boolean;
|
|
41
41
|
readonly refusing: Schema.Boolean;
|
|
42
42
|
readonly reason: Schema.optionalKey<Schema.Literal<"unbound">>;
|
|
43
|
-
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"
|
|
43
|
+
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"]>;
|
|
44
44
|
}>>>;
|
|
45
45
|
}>>, Schema.toCodecJson<typeof import("../errors.ts").Forbidden | typeof import("../errors.ts").NotFound | typeof import("../errors.ts").NotImplemented | typeof import("../errors.ts").Unavailable>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listInvoices", "GET", "/organizations/:organizationId/billing/invoices", Schema.toCodecStringTree<Schema.Struct<{
|
|
46
46
|
organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
@@ -62,15 +62,12 @@ declare const BillingGroup_base: HttpApiGroup.HttpApiGroup<"billing", HttpApiEnd
|
|
|
62
62
|
readonly allowances: Schema.Struct<{
|
|
63
63
|
readonly computeUnitHours: Schema.Finite;
|
|
64
64
|
readonly computeUnitHourCap: Schema.NullOr<Schema.Finite>;
|
|
65
|
-
readonly storageGb: Schema.Finite;
|
|
66
|
-
readonly storageGbCap: Schema.NullOr<Schema.Finite>;
|
|
67
65
|
readonly concurrentConnections: Schema.Int;
|
|
68
66
|
}>;
|
|
69
67
|
readonly overage: Schema.Struct<{
|
|
70
68
|
readonly computeCentsPerUnitHour: Schema.Finite;
|
|
71
|
-
readonly storageCentsPerGbMonth: Schema.Finite;
|
|
72
69
|
}>;
|
|
73
|
-
readonly features: Schema.$Array<Schema.Literals<readonly ["compute-overage", "compute-cap", "
|
|
70
|
+
readonly features: Schema.$Array<Schema.Literals<readonly ["compute-overage", "compute-cap", "byo-database", "checkout"]>>;
|
|
74
71
|
readonly provisional: Schema.Boolean;
|
|
75
72
|
}>>;
|
|
76
73
|
readonly computeSizes: Schema.$Array<Schema.Struct<{
|
|
@@ -107,23 +104,19 @@ declare const UsageGroup_base: HttpApiGroup.HttpApiGroup<"usage", HttpApiEndpoin
|
|
|
107
104
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
108
105
|
readonly period: Schema.String;
|
|
109
106
|
readonly meters: Schema.$Array<Schema.Struct<{
|
|
110
|
-
readonly meter: Schema.
|
|
107
|
+
readonly meter: Schema.Literal<"runnerHours">;
|
|
111
108
|
readonly used: Schema.Finite;
|
|
112
109
|
readonly included: Schema.Finite;
|
|
113
110
|
readonly overage: Schema.Finite;
|
|
114
111
|
readonly overageCostCents: Schema.Finite;
|
|
115
112
|
}>>;
|
|
116
|
-
readonly latestStorageSample: Schema.NullOr<Schema.Struct<{
|
|
117
|
-
readonly bytes: Schema.Finite;
|
|
118
|
-
readonly sampledAt: Schema.DateTimeUtc;
|
|
119
|
-
}>>;
|
|
120
113
|
readonly caps: Schema.$Array<Schema.Struct<{
|
|
121
114
|
readonly limit: Schema.NullOr<Schema.Finite>;
|
|
122
115
|
readonly used: Schema.Finite;
|
|
123
116
|
readonly atCap: Schema.Boolean;
|
|
124
117
|
readonly refusing: Schema.Boolean;
|
|
125
118
|
readonly reason: Schema.optionalKey<Schema.Literal<"unbound">>;
|
|
126
|
-
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"
|
|
119
|
+
readonly cap: Schema.Literals<readonly ["spend", "connections", "compute"]>;
|
|
127
120
|
}>>;
|
|
128
121
|
readonly byProject: Schema.$Array<Schema.Struct<{
|
|
129
122
|
readonly projectId: Schema.brand<Schema.String, "ProjectId">;
|
|
@@ -137,12 +130,10 @@ declare const UsageGroup_base: HttpApiGroup.HttpApiGroup<"usage", HttpApiEndpoin
|
|
|
137
130
|
readonly machineHours: Schema.Finite;
|
|
138
131
|
readonly computeUnitHours: Schema.Finite;
|
|
139
132
|
}>>;
|
|
140
|
-
readonly storageGbMonths: Schema.Finite;
|
|
141
133
|
readonly estimatedCostCents: Schema.Finite;
|
|
142
134
|
}>>;
|
|
143
135
|
readonly pricing: Schema.Struct<{
|
|
144
136
|
readonly computeCentsPerUnitHour: Schema.Finite;
|
|
145
|
-
readonly storageCentsPerGbMonth: Schema.Finite;
|
|
146
137
|
readonly provisional: Schema.optionalKey<Schema.Boolean>;
|
|
147
138
|
}>;
|
|
148
139
|
}>>, Schema.toCodecJson<typeof import("../errors.ts").Forbidden | typeof import("../errors.ts").NotFound | typeof import("../errors.ts").NotImplemented | typeof import("../errors.ts").Unavailable>, never, never>, false>;
|
|
@@ -23,8 +23,11 @@ declare const ProjectsGroup_base: HttpApiGroup.HttpApiGroup<"projects", HttpApiE
|
|
|
23
23
|
readonly projectId: Schema.brand<Schema.String, "ProjectId">;
|
|
24
24
|
readonly currentDeploymentId: Schema.NullOr<Schema.brand<Schema.String, "DeploymentId">>;
|
|
25
25
|
readonly database: Schema.optionalKey<Schema.Struct<{
|
|
26
|
-
readonly source: Schema.
|
|
27
|
-
readonly state: Schema.Literals<readonly ["
|
|
26
|
+
readonly source: Schema.Literal<"customer">;
|
|
27
|
+
readonly state: Schema.Literals<readonly ["missing", "reachable", "unreachable"]>;
|
|
28
|
+
readonly latency: Schema.NullOr<Schema.Finite>;
|
|
29
|
+
readonly latencyWarning: Schema.Boolean;
|
|
30
|
+
readonly runnerCap: Schema.NullOr<Schema.Int>;
|
|
28
31
|
}>>;
|
|
29
32
|
}>>, Schema.toCodecJson<typeof import("../errors.ts").Forbidden | typeof import("../errors.ts").NotFound | typeof import("../errors.ts").Conflict | typeof import("../errors.ts").NotImplemented | typeof import("../errors.ts").Unavailable>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"delete", "DELETE", "/projects/:projectId", Schema.toCodecStringTree<Schema.Struct<{
|
|
30
33
|
projectId: Schema.brand<Schema.String, "ProjectId">;
|
|
@@ -57,8 +60,11 @@ declare const ProjectsGroup_base: HttpApiGroup.HttpApiGroup<"projects", HttpApiE
|
|
|
57
60
|
readonly projectId: Schema.brand<Schema.String, "ProjectId">;
|
|
58
61
|
readonly currentDeploymentId: Schema.NullOr<Schema.brand<Schema.String, "DeploymentId">>;
|
|
59
62
|
readonly database: Schema.optionalKey<Schema.Struct<{
|
|
60
|
-
readonly source: Schema.
|
|
61
|
-
readonly state: Schema.Literals<readonly ["
|
|
63
|
+
readonly source: Schema.Literal<"customer">;
|
|
64
|
+
readonly state: Schema.Literals<readonly ["missing", "reachable", "unreachable"]>;
|
|
65
|
+
readonly latency: Schema.NullOr<Schema.Finite>;
|
|
66
|
+
readonly latencyWarning: Schema.Boolean;
|
|
67
|
+
readonly runnerCap: Schema.NullOr<Schema.Int>;
|
|
62
68
|
}>>;
|
|
63
69
|
}>>, Schema.toCodecJson<typeof import("../errors.ts").Forbidden | typeof import("../errors.ts").NotFound | typeof import("../errors.ts").NotImplemented | typeof import("../errors.ts").Unavailable>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"list", "GET", "/organizations/:organizationId/projects", Schema.toCodecStringTree<Schema.Struct<{
|
|
64
70
|
organizationId: Schema.brand<Schema.String, "OrganizationId">;
|
|
@@ -77,8 +83,11 @@ declare const ProjectsGroup_base: HttpApiGroup.HttpApiGroup<"projects", HttpApiE
|
|
|
77
83
|
readonly projectId: Schema.brand<Schema.String, "ProjectId">;
|
|
78
84
|
readonly currentDeploymentId: Schema.NullOr<Schema.brand<Schema.String, "DeploymentId">>;
|
|
79
85
|
readonly database: Schema.optionalKey<Schema.Struct<{
|
|
80
|
-
readonly source: Schema.
|
|
81
|
-
readonly state: Schema.Literals<readonly ["
|
|
86
|
+
readonly source: Schema.Literal<"customer">;
|
|
87
|
+
readonly state: Schema.Literals<readonly ["missing", "reachable", "unreachable"]>;
|
|
88
|
+
readonly latency: Schema.NullOr<Schema.Finite>;
|
|
89
|
+
readonly latencyWarning: Schema.Boolean;
|
|
90
|
+
readonly runnerCap: Schema.NullOr<Schema.Int>;
|
|
82
91
|
}>>;
|
|
83
92
|
}>>>, Schema.toCodecJson<typeof import("../errors.ts").Forbidden | typeof import("../errors.ts").NotFound | typeof import("../errors.ts").NotImplemented | typeof import("../errors.ts").Unavailable>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"update", "PATCH", "/projects/:projectId", Schema.toCodecStringTree<Schema.Struct<{
|
|
84
93
|
projectId: Schema.brand<Schema.String, "ProjectId">;
|
|
@@ -5,7 +5,7 @@ export { ApiKey, ApiKeyPermission, CreateApiKey, CreateInvitation, CreateOrganiz
|
|
|
5
5
|
export { AddDomain, AddRegion, ConnectIntegration, CreateEnvironment, CreateProject, DnsRecord, Domain, DomainStatus, EnvVariable, EnvVariableName, Environment, Hostname, ImportEnvVariables, ImportEnvVariablesResult, Integration, IntegrationConnection, IntegrationKind, OwnedTable, Project, ProjectEndpoints, ProjectRegion, ProjectStatus, Region, SetEnvVariable, SetHomeRegion, UpdateProject, } from "./projects.ts";
|
|
6
6
|
export { BuildLog, BuildLogLine, CreateDeployment, DeploymentAuthor, DeploymentDetail, DeploymentRunner, DeploymentSource, DeploymentStatus, DeploymentSummary, ImageDigest, MAX_SOURCE_BYTES, RecordBuild, FailBuild, RolloutStep, RolloutStepName, SOURCE_ENTRY, SourceArchive, SourceDigest, } from "./deployments.ts";
|
|
7
7
|
export { ActorEvent, ActorInspector, ActorInstance, ActorJob, ActorTimelineEntry, ActorTypeActivity, ActorTypeSummary, CommandCaller, CommandFailed, CommandRefused, CommandExpired, RunnerDefect, CommandStreamGap, CommandLogEntry, QuotaErrors, QuotaExceeded, QuotaUnbound, CommandOutcome, CommandSent, CommandVolume, ConnectionsSummary, DeadLetter, JobStatus, JobTypeStats, JobsSummary, LatencyBucket, Overview, OwnedTableRows, Receipt, Schedule, SearchResult, SendCommand, SeriesWindow, SidebarCounts, TimersSummary, TurnLatency, Workflow, } from "./runtime.ts";
|
|
8
|
-
export { AuditEntry, BillingSummary, CapState, CardPaymentMethod, CatalogPlan, ComputeSize, ComputeUsage, PlanCatalog, PlanFeature,
|
|
8
|
+
export { AuditEntry, BillingSummary, CapState, CardPaymentMethod, CatalogPlan, ComputeSize, ComputeUsage, PlanCatalog, PlanFeature, HostedSession, Invoice, LinkPaymentMethod, PaymentMethod, Plan, SetSpendLimit, SpendLimit, StartCheckout, PlanChange, Usage, UsageMeter, UsageMeterName, UsagePricing, } from "./billing.ts";
|
|
9
9
|
export { CloudApi } from "./contract.ts";
|
|
10
10
|
export { LogCursor, LogLimit, LogWait, MAX_LOG_LINES, MAX_LOG_TEXT_BYTES, MAX_LOG_WAIT_SECONDS, MAX_LOG_WINDOW_SECONDS, RunnerLogLine, RunnerLogPage, logQuery, } from "./logs.ts";
|
|
11
11
|
export { AccountGroup, ApiKeysGroup, InvitationsGroup, MembersGroup, OrganizationsGroup, } from "./groups/account.ts";
|
package/dist/cloud-api/index.js
CHANGED
|
@@ -118,7 +118,7 @@ class Authentication extends HttpApiMiddleware.Service()("@akter/cloud-api/Authe
|
|
|
118
118
|
apiKey: HttpApiSecurity.apiKey({ key: apiKeyHeaderName, in: "header" }),
|
|
119
119
|
bearer: HttpApiSecurity.bearer
|
|
120
120
|
},
|
|
121
|
-
error: [Unauthorized, Forbidden]
|
|
121
|
+
error: [Unauthorized, Forbidden, Unavailable]
|
|
122
122
|
}) {
|
|
123
123
|
}
|
|
124
124
|
// ../../packages/cloud-api/src/identity.ts
|
|
@@ -310,8 +310,11 @@ var Environment = Schema5.Struct({
|
|
|
310
310
|
projectId: ProjectId,
|
|
311
311
|
currentDeploymentId: Schema5.NullOr(DeploymentId),
|
|
312
312
|
database: Schema5.optionalKey(Schema5.Struct({
|
|
313
|
-
source: Schema5.
|
|
314
|
-
state: Schema5.Literals(["
|
|
313
|
+
source: Schema5.Literal("customer"),
|
|
314
|
+
state: Schema5.Literals(["missing", "reachable", "unreachable"]),
|
|
315
|
+
latency: Schema5.NullOr(NonNegative),
|
|
316
|
+
latencyWarning: Schema5.Boolean,
|
|
317
|
+
runnerCap: Schema5.NullOr(Schema5.Int)
|
|
315
318
|
}))
|
|
316
319
|
});
|
|
317
320
|
var CreateEnvironment = Schema5.Struct({ name: EnvironmentName });
|
|
@@ -782,7 +785,7 @@ var capFields = {
|
|
|
782
785
|
reason: Schema8.optionalKey(Schema8.Literal("unbound"))
|
|
783
786
|
};
|
|
784
787
|
var CapState = Schema8.Struct({
|
|
785
|
-
cap: Schema8.Literals(["spend", "connections", "compute"
|
|
788
|
+
cap: Schema8.Literals(["spend", "connections", "compute"]),
|
|
786
789
|
...capFields
|
|
787
790
|
});
|
|
788
791
|
var BillingSummary = Schema8.Struct({
|
|
@@ -817,10 +820,7 @@ var machineSizeFields = {
|
|
|
817
820
|
var PlanFeature = Schema8.Literals([
|
|
818
821
|
"compute-overage",
|
|
819
822
|
"compute-cap",
|
|
820
|
-
"storage-overage",
|
|
821
|
-
"storage-cap",
|
|
822
823
|
"byo-database",
|
|
823
|
-
"dedicated-database",
|
|
824
824
|
"checkout"
|
|
825
825
|
]);
|
|
826
826
|
var CatalogPlan = Schema8.Struct({
|
|
@@ -831,13 +831,10 @@ var CatalogPlan = Schema8.Struct({
|
|
|
831
831
|
allowances: Schema8.Struct({
|
|
832
832
|
computeUnitHours: NonNegative,
|
|
833
833
|
computeUnitHourCap: Schema8.NullOr(NonNegative),
|
|
834
|
-
storageGb: NonNegative,
|
|
835
|
-
storageGbCap: Schema8.NullOr(NonNegative),
|
|
836
834
|
concurrentConnections: NonNegativeInt
|
|
837
835
|
}),
|
|
838
836
|
overage: Schema8.Struct({
|
|
839
|
-
computeCentsPerUnitHour: NonNegative
|
|
840
|
-
storageCentsPerGbMonth: NonNegative
|
|
837
|
+
computeCentsPerUnitHour: NonNegative
|
|
841
838
|
}),
|
|
842
839
|
features: Schema8.Array(PlanFeature),
|
|
843
840
|
provisional: Schema8.Boolean
|
|
@@ -851,7 +848,7 @@ var PlanCatalog = Schema8.Struct({
|
|
|
851
848
|
computeSizes: Schema8.Array(ComputeSize),
|
|
852
849
|
provisional: Schema8.Boolean
|
|
853
850
|
});
|
|
854
|
-
var UsageMeterName = Schema8.
|
|
851
|
+
var UsageMeterName = Schema8.Literal("runnerHours");
|
|
855
852
|
var UsageMeter = Schema8.Struct({
|
|
856
853
|
meter: UsageMeterName,
|
|
857
854
|
used: NonNegative,
|
|
@@ -861,7 +858,6 @@ var UsageMeter = Schema8.Struct({
|
|
|
861
858
|
});
|
|
862
859
|
var UsagePricing = Schema8.Struct({
|
|
863
860
|
computeCentsPerUnitHour: NonNegative,
|
|
864
|
-
storageCentsPerGbMonth: NonNegative,
|
|
865
861
|
provisional: Schema8.optionalKey(Schema8.Boolean)
|
|
866
862
|
});
|
|
867
863
|
var ComputeUsage = Schema8.Struct({
|
|
@@ -870,18 +866,15 @@ var ComputeUsage = Schema8.Struct({
|
|
|
870
866
|
machineHours: NonNegative,
|
|
871
867
|
computeUnitHours: NonNegative
|
|
872
868
|
});
|
|
873
|
-
var StorageSample = Schema8.Struct({ bytes: NonNegative, sampledAt: Timestamp });
|
|
874
869
|
var Usage = Schema8.Struct({
|
|
875
870
|
period: BillingPeriod,
|
|
876
871
|
meters: Schema8.Array(UsageMeter),
|
|
877
|
-
latestStorageSample: Schema8.NullOr(StorageSample),
|
|
878
872
|
caps: Schema8.Array(CapState),
|
|
879
873
|
byProject: Schema8.Array(Schema8.Struct({
|
|
880
874
|
projectId: ProjectId,
|
|
881
875
|
name: Schema8.String,
|
|
882
876
|
computeUnitHours: NonNegative,
|
|
883
877
|
compute: Schema8.Array(ComputeUsage),
|
|
884
|
-
storageGbMonths: NonNegative,
|
|
885
878
|
estimatedCostCents: NonNegative
|
|
886
879
|
})),
|
|
887
880
|
pricing: UsagePricing
|
|
@@ -1613,7 +1606,6 @@ export {
|
|
|
1613
1606
|
SourceDigest,
|
|
1614
1607
|
SpendLimit,
|
|
1615
1608
|
StartCheckout,
|
|
1616
|
-
StorageSample,
|
|
1617
1609
|
Theme,
|
|
1618
1610
|
TimersSummary,
|
|
1619
1611
|
Timestamp,
|
|
@@ -28,18 +28,23 @@ export declare const UpdateProject: Schema.Struct<{
|
|
|
28
28
|
}>;
|
|
29
29
|
export type UpdateProject = typeof UpdateProject.Type;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
31
|
+
* Every environment uses the customer's Postgres through `DATABASE_URL`.
|
|
32
|
+
* `latency` is the deploy probe's p50 in milliseconds from the runner region,
|
|
33
|
+
* null when unmeasured. Above 5 ms, `latencyWarning` warns without refusing.
|
|
34
|
+
* `runnerCap` is floor((max_connections - in_use - 10) / 9), null when unknown;
|
|
35
|
+
* a non-positive cap means no runner fits the available connection budget.
|
|
36
|
+
* The status carries no URL or URL-derived field.
|
|
35
37
|
*/
|
|
36
38
|
export declare const Environment: Schema.Struct<{
|
|
37
39
|
readonly name: Schema.Literals<readonly ["production", "staging", "dev"]>;
|
|
38
40
|
readonly projectId: Schema.brand<Schema.String, "ProjectId">;
|
|
39
41
|
readonly currentDeploymentId: Schema.NullOr<Schema.brand<Schema.String, "DeploymentId">>;
|
|
40
42
|
readonly database: Schema.optionalKey<Schema.Struct<{
|
|
41
|
-
readonly source: Schema.
|
|
42
|
-
readonly state: Schema.Literals<readonly ["
|
|
43
|
+
readonly source: Schema.Literal<"customer">;
|
|
44
|
+
readonly state: Schema.Literals<readonly ["missing", "reachable", "unreachable"]>;
|
|
45
|
+
readonly latency: Schema.NullOr<Schema.Finite>;
|
|
46
|
+
readonly latencyWarning: Schema.Boolean;
|
|
47
|
+
readonly runnerCap: Schema.NullOr<Schema.Int>;
|
|
43
48
|
}>>;
|
|
44
49
|
}>;
|
|
45
50
|
export type Environment = typeof Environment.Type;
|
|
@@ -424,7 +424,7 @@ export declare class CommandFailed extends CommandFailed_base {
|
|
|
424
424
|
declare const QuotaExceeded_base: Schema.Class<QuotaExceeded, Schema.TaggedStruct<"QuotaExceeded", {
|
|
425
425
|
readonly organizationId: Schema.String;
|
|
426
426
|
readonly period: Schema.String;
|
|
427
|
-
readonly cap: Schema.Literals<readonly ["compute", "
|
|
427
|
+
readonly cap: Schema.Literals<readonly ["compute", "connections", "spend"]>;
|
|
428
428
|
readonly limit: Schema.Finite;
|
|
429
429
|
readonly used: Schema.Finite;
|
|
430
430
|
readonly retryAfterMs: Schema.Finite;
|