@rikalabs/akter-cli 0.1.0-alpha.3 → 0.1.0-alpha.5

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.
@@ -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", "storage"]>;
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", "storage-overage", "storage-cap", "byo-database", "dedicated-database", "checkout"]>>;
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.Literals<readonly ["runnerHours", "storageGb"]>;
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", "storage"]>;
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.Literals<readonly ["managed", "customer"]>;
27
- readonly state: Schema.Literals<readonly ["provisioning", "ready", "read-only", "failed"]>;
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.Literals<readonly ["managed", "customer"]>;
61
- readonly state: Schema.Literals<readonly ["provisioning", "ready", "read-only", "failed"]>;
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.Literals<readonly ["managed", "customer"]>;
81
- readonly state: Schema.Literals<readonly ["provisioning", "ready", "read-only", "failed"]>;
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, StorageSample, HostedSession, Invoice, LinkPaymentMethod, PaymentMethod, Plan, SetSpendLimit, SpendLimit, StartCheckout, PlanChange, Usage, UsageMeter, UsageMeterName, UsagePricing, } from "./billing.ts";
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";
@@ -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.Literals(["managed", "customer"]),
314
- state: Schema5.Literals(["provisioning", "ready", "read-only", "failed"])
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", "storage"]),
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.Literals(["runnerHours", "storageGb"]);
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
- * `database` says only whose database the environment runs on and its state:
32
- * Akter's `managed` one, which can be provisioning, ready, read-only or
33
- * failed, or the `customer`'s own, which is always ready once set. It carries
34
- * no URL or URL-derived field.
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.Literals<readonly ["managed", "customer"]>;
42
- readonly state: Schema.Literals<readonly ["provisioning", "ready", "read-only", "failed"]>;
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", "storage", "connections", "spend"]>;
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;