scribase 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +220 -0
- package/dist/cli/credentials.d.ts +35 -0
- package/dist/cli/credentials.d.ts.map +1 -0
- package/dist/cli/credentials.js +125 -0
- package/dist/cli/credentials.js.map +1 -0
- package/dist/cli/envfile.d.ts +20 -0
- package/dist/cli/envfile.d.ts.map +1 -0
- package/dist/cli/envfile.js +86 -0
- package/dist/cli/envfile.js.map +1 -0
- package/dist/cli/framework.d.ts +45 -0
- package/dist/cli/framework.d.ts.map +1 -0
- package/dist/cli/framework.js +107 -0
- package/dist/cli/framework.js.map +1 -0
- package/dist/cli/index.d.ts +8 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +239 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.d.ts +118 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +455 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/login.d.ts +104 -0
- package/dist/cli/login.d.ts.map +1 -0
- package/dist/cli/login.js +306 -0
- package/dist/cli/login.js.map +1 -0
- package/dist/cli/pow.d.ts +9 -0
- package/dist/cli/pow.d.ts.map +1 -0
- package/dist/cli/pow.js +31 -0
- package/dist/cli/pow.js.map +1 -0
- package/dist/cli/vercel.d.ts +92 -0
- package/dist/cli/vercel.d.ts.map +1 -0
- package/dist/cli/vercel.js +230 -0
- package/dist/cli/vercel.js.map +1 -0
- package/dist/client.d.ts +137 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +311 -0
- package/dist/client.js.map +1 -0
- package/dist/errors.d.ts +79 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +139 -0
- package/dist/errors.js.map +1 -0
- package/dist/evidence.d.ts +78 -0
- package/dist/evidence.d.ts.map +1 -0
- package/dist/evidence.js +36 -0
- package/dist/evidence.js.map +1 -0
- package/dist/idempotency.d.ts +24 -0
- package/dist/idempotency.d.ts.map +1 -0
- package/dist/idempotency.js +59 -0
- package/dist/idempotency.js.map +1 -0
- package/dist/importers/firebase.d.ts +101 -0
- package/dist/importers/firebase.d.ts.map +1 -0
- package/dist/importers/firebase.js +251 -0
- package/dist/importers/firebase.js.map +1 -0
- package/dist/importers/index.d.ts +11 -0
- package/dist/importers/index.d.ts.map +1 -0
- package/dist/importers/index.js +9 -0
- package/dist/importers/index.js.map +1 -0
- package/dist/importers/instantdb.d.ts +76 -0
- package/dist/importers/instantdb.d.ts.map +1 -0
- package/dist/importers/instantdb.js +152 -0
- package/dist/importers/instantdb.js.map +1 -0
- package/dist/index.d.ts +78 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/pagination.d.ts +33 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +68 -0
- package/dist/pagination.js.map +1 -0
- package/dist/resources/account.d.ts +156 -0
- package/dist/resources/account.d.ts.map +1 -0
- package/dist/resources/account.js +114 -0
- package/dist/resources/account.js.map +1 -0
- package/dist/resources/audit.d.ts +26 -0
- package/dist/resources/audit.d.ts.map +1 -0
- package/dist/resources/audit.js +43 -0
- package/dist/resources/audit.js.map +1 -0
- package/dist/resources/auth.d.ts +149 -0
- package/dist/resources/auth.d.ts.map +1 -0
- package/dist/resources/auth.js +70 -0
- package/dist/resources/auth.js.map +1 -0
- package/dist/resources/backups.d.ts +117 -0
- package/dist/resources/backups.d.ts.map +1 -0
- package/dist/resources/backups.js +92 -0
- package/dist/resources/backups.js.map +1 -0
- package/dist/resources/branches.d.ts +151 -0
- package/dist/resources/branches.d.ts.map +1 -0
- package/dist/resources/branches.js +62 -0
- package/dist/resources/branches.js.map +1 -0
- package/dist/resources/database.d.ts +107 -0
- package/dist/resources/database.d.ts.map +1 -0
- package/dist/resources/database.js +54 -0
- package/dist/resources/database.js.map +1 -0
- package/dist/resources/environments.d.ts +106 -0
- package/dist/resources/environments.d.ts.map +1 -0
- package/dist/resources/environments.js +131 -0
- package/dist/resources/environments.js.map +1 -0
- package/dist/resources/export.d.ts +101 -0
- package/dist/resources/export.d.ts.map +1 -0
- package/dist/resources/export.js +89 -0
- package/dist/resources/export.js.map +1 -0
- package/dist/resources/functions.d.ts +75 -0
- package/dist/resources/functions.d.ts.map +1 -0
- package/dist/resources/functions.js +58 -0
- package/dist/resources/functions.js.map +1 -0
- package/dist/resources/imports.d.ts +183 -0
- package/dist/resources/imports.d.ts.map +1 -0
- package/dist/resources/imports.js +168 -0
- package/dist/resources/imports.js.map +1 -0
- package/dist/resources/insights.d.ts +50 -0
- package/dist/resources/insights.d.ts.map +1 -0
- package/dist/resources/insights.js +21 -0
- package/dist/resources/insights.js.map +1 -0
- package/dist/resources/metrics.d.ts +61 -0
- package/dist/resources/metrics.d.ts.map +1 -0
- package/dist/resources/metrics.js +23 -0
- package/dist/resources/metrics.js.map +1 -0
- package/dist/resources/migrations.d.ts +24 -0
- package/dist/resources/migrations.d.ts.map +1 -0
- package/dist/resources/migrations.js +29 -0
- package/dist/resources/migrations.js.map +1 -0
- package/dist/resources/operations.d.ts +37 -0
- package/dist/resources/operations.d.ts.map +1 -0
- package/dist/resources/operations.js +81 -0
- package/dist/resources/operations.js.map +1 -0
- package/dist/resources/organizations.d.ts +171 -0
- package/dist/resources/organizations.d.ts.map +1 -0
- package/dist/resources/organizations.js +180 -0
- package/dist/resources/organizations.js.map +1 -0
- package/dist/resources/previews.d.ts +49 -0
- package/dist/resources/previews.d.ts.map +1 -0
- package/dist/resources/previews.js +62 -0
- package/dist/resources/previews.js.map +1 -0
- package/dist/resources/projects.d.ts +73 -0
- package/dist/resources/projects.d.ts.map +1 -0
- package/dist/resources/projects.js +84 -0
- package/dist/resources/projects.js.map +1 -0
- package/dist/resources/queues.d.ts +100 -0
- package/dist/resources/queues.d.ts.map +1 -0
- package/dist/resources/queues.js +77 -0
- package/dist/resources/queues.js.map +1 -0
- package/dist/resources/realtime.d.ts +37 -0
- package/dist/resources/realtime.d.ts.map +1 -0
- package/dist/resources/realtime.js +23 -0
- package/dist/resources/realtime.js.map +1 -0
- package/dist/resources/restores.d.ts +67 -0
- package/dist/resources/restores.d.ts.map +1 -0
- package/dist/resources/restores.js +90 -0
- package/dist/resources/restores.js.map +1 -0
- package/dist/resources/storage.d.ts +50 -0
- package/dist/resources/storage.d.ts.map +1 -0
- package/dist/resources/storage.js +38 -0
- package/dist/resources/storage.js.map +1 -0
- package/dist/resources/usage.d.ts +85 -0
- package/dist/resources/usage.d.ts.map +1 -0
- package/dist/resources/usage.js +37 -0
- package/dist/resources/usage.js.map +1 -0
- package/dist/types.gen.d.ts +473 -0
- package/dist/types.gen.d.ts.map +1 -0
- package/dist/types.gen.js +8 -0
- package/dist/types.gen.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { environmentPath } from './environments.js';
|
|
2
|
+
/** Usage (per environment) and billing (per organization). */
|
|
3
|
+
export class UsageResource {
|
|
4
|
+
#http;
|
|
5
|
+
constructor(http) {
|
|
6
|
+
this.#http = http;
|
|
7
|
+
}
|
|
8
|
+
/** `GET …/environments/{env}/usage` — the environment's flat-price envelope. */
|
|
9
|
+
async get(ref) {
|
|
10
|
+
const result = await this.#http.send({
|
|
11
|
+
method: 'GET',
|
|
12
|
+
path: `${environmentPath(ref)}/usage`,
|
|
13
|
+
});
|
|
14
|
+
return result.data;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Lines at or above a utilization threshold (default 0.8) of their cap — the
|
|
18
|
+
* console's "approaching a cap, consider a pack" signal.
|
|
19
|
+
*/
|
|
20
|
+
async capsNearingLimit(ref, threshold = 0.8) {
|
|
21
|
+
const envelope = await this.get(ref);
|
|
22
|
+
return linesNearingCap(envelope, threshold);
|
|
23
|
+
}
|
|
24
|
+
/** `GET /v1/organizations/{org}/billing` — provider status and invoices. */
|
|
25
|
+
async billing(organizationId) {
|
|
26
|
+
const result = await this.#http.send({
|
|
27
|
+
method: 'GET',
|
|
28
|
+
path: `/v1/organizations/${encodeURIComponent(organizationId)}/billing`,
|
|
29
|
+
});
|
|
30
|
+
return result.data;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
/** Pure form of {@link UsageResource.capsNearingLimit} for an envelope in hand. */
|
|
34
|
+
export function linesNearingCap(envelope, threshold = 0.8) {
|
|
35
|
+
return envelope.lines.filter((line) => line.cap > 0 && line.used / line.cap >= threshold);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/resources/usage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AA0EpD,8DAA8D;AAC9D,MAAM,OAAO,aAAa;IACf,KAAK,CAAgB;IAE9B,YAAY,IAAmB;QAC7B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACpB,CAAC;IAED,gFAAgF;IAChF,KAAK,CAAC,GAAG,CAAC,GAAmB;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAgB;YAClD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,GAAG,eAAe,CAAC,GAAG,CAAC,QAAQ;SACtC,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,gBAAgB,CAAC,GAAmB,EAAE,SAAS,GAAG,GAAG;QACzD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACrC,OAAO,eAAe,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC9C,CAAC;IAED,4EAA4E;IAC5E,KAAK,CAAC,OAAO,CAAC,cAAkC;QAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAkB;YACpD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,qBAAqB,kBAAkB,CAAC,cAAc,CAAC,UAAU;SACxE,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,IAAI,CAAC;IACrB,CAAC;CACF;AAED,mFAAmF;AACnF,MAAM,UAAU,eAAe,CAAC,QAAuB,EAAE,SAAS,GAAG,GAAG;IACtE,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,SAAS,CAAC,CAAC;AAC5F,CAAC"}
|
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DO NOT EDIT BY HAND.
|
|
3
|
+
*
|
|
4
|
+
* Generated from `api/openapi.yaml` by `scripts/generate.ts`.
|
|
5
|
+
* Run `pnpm generate` to refresh after the contract changes.
|
|
6
|
+
*/
|
|
7
|
+
export interface TokenIntrospection {
|
|
8
|
+
active: boolean;
|
|
9
|
+
kind: "personal_access_token" | "organization_api_key" | "oidc" | "sso_session" | "builtin_session";
|
|
10
|
+
subject: string;
|
|
11
|
+
organization_id?: string;
|
|
12
|
+
role?: "owner" | "admin" | "developer" | "viewer" | null;
|
|
13
|
+
}
|
|
14
|
+
export type QuotaMetric = "database_gb" | "storage_gb" | "backup_gb" | "preview_environments" | "egress_gb" | "compute_hours" | "rows" | "function_invocations";
|
|
15
|
+
export interface ProjectQuotaOverride {
|
|
16
|
+
metric: QuotaMetric;
|
|
17
|
+
label: string;
|
|
18
|
+
unit: string;
|
|
19
|
+
cap: number;
|
|
20
|
+
updated_by: string;
|
|
21
|
+
updated_at_epoch_seconds: number;
|
|
22
|
+
}
|
|
23
|
+
export interface ProjectQuotas {
|
|
24
|
+
organization_id: string;
|
|
25
|
+
project_id: string;
|
|
26
|
+
overrides: ProjectQuotaOverride[];
|
|
27
|
+
metrics: {
|
|
28
|
+
metric: QuotaMetric;
|
|
29
|
+
label: string;
|
|
30
|
+
unit: string;
|
|
31
|
+
}[];
|
|
32
|
+
/** Fraction of the cap at which usage.threshold_reached fires. */
|
|
33
|
+
threshold: number;
|
|
34
|
+
}
|
|
35
|
+
export interface PutProjectQuotasRequest {
|
|
36
|
+
/** metric -> cap (non-negative number) or null to remove the override. */
|
|
37
|
+
overrides: {};
|
|
38
|
+
}
|
|
39
|
+
export interface EventDelivery {
|
|
40
|
+
delivery_id: string;
|
|
41
|
+
event_id: string;
|
|
42
|
+
event_type: string;
|
|
43
|
+
target_url: string;
|
|
44
|
+
status: "pending" | "delivered" | "failed";
|
|
45
|
+
attempts: number;
|
|
46
|
+
last_status_code?: number;
|
|
47
|
+
last_error?: string;
|
|
48
|
+
created_epoch_seconds: number;
|
|
49
|
+
delivered_epoch_seconds?: number;
|
|
50
|
+
next_attempt_epoch_seconds?: number;
|
|
51
|
+
/** The signed body: {id, type, created_epoch_seconds, organization_id, project_id, environment_id, data}. */
|
|
52
|
+
payload: {};
|
|
53
|
+
}
|
|
54
|
+
export interface EventDeliveryList {
|
|
55
|
+
deliveries: EventDelivery[];
|
|
56
|
+
webhook_configured: boolean;
|
|
57
|
+
max_attempts: number;
|
|
58
|
+
}
|
|
59
|
+
export interface EventSigningSecret {
|
|
60
|
+
secret: string;
|
|
61
|
+
rotated: boolean;
|
|
62
|
+
header: string;
|
|
63
|
+
scheme: string;
|
|
64
|
+
}
|
|
65
|
+
export interface EnvironmentTypes {
|
|
66
|
+
/** The TypeScript module source. */
|
|
67
|
+
types: string;
|
|
68
|
+
schemas: string[];
|
|
69
|
+
}
|
|
70
|
+
export interface JsonObject {
|
|
71
|
+
}
|
|
72
|
+
export interface ItemPage {
|
|
73
|
+
items: {}[];
|
|
74
|
+
}
|
|
75
|
+
export interface Teardown {
|
|
76
|
+
organization_id: PortableIdentifier;
|
|
77
|
+
project_id?: PortableIdentifier;
|
|
78
|
+
scheduled: boolean;
|
|
79
|
+
deleted: boolean;
|
|
80
|
+
state: "deleted" | "deleting_environments";
|
|
81
|
+
environments: {
|
|
82
|
+
project_id?: string;
|
|
83
|
+
environment_id?: string;
|
|
84
|
+
phase?: string;
|
|
85
|
+
}[];
|
|
86
|
+
}
|
|
87
|
+
export interface CreateInvitationRequest {
|
|
88
|
+
email: string;
|
|
89
|
+
role?: "owner" | "admin" | "developer" | "viewer";
|
|
90
|
+
}
|
|
91
|
+
export interface Invitation {
|
|
92
|
+
invitation_id?: string;
|
|
93
|
+
organization_id?: string;
|
|
94
|
+
email?: string;
|
|
95
|
+
role?: string;
|
|
96
|
+
invited_by?: string;
|
|
97
|
+
created_at_epoch_seconds?: number;
|
|
98
|
+
expires_at_epoch_seconds?: number;
|
|
99
|
+
status?: "pending" | "accepted" | "revoked" | "expired";
|
|
100
|
+
accept_url?: string;
|
|
101
|
+
token?: string;
|
|
102
|
+
delivery?: "email" | "link";
|
|
103
|
+
}
|
|
104
|
+
export interface EnvironmentApiKeys {
|
|
105
|
+
organization_id?: string;
|
|
106
|
+
project_id?: string;
|
|
107
|
+
environment_id?: string;
|
|
108
|
+
api_url?: unknown;
|
|
109
|
+
/** Legacy anon JWT; works as the client key of any supabase-js v2 app. */
|
|
110
|
+
anon_key: string;
|
|
111
|
+
/** Opaque `sb_publishable_` key; the project router swaps it for the anon JWT. */
|
|
112
|
+
publishable_key?: string;
|
|
113
|
+
/** Bypasses row-level security. Null for viewers. */
|
|
114
|
+
service_role_key?: unknown;
|
|
115
|
+
/** Opaque `sb_secret_` key for the service role. Null for viewers. */
|
|
116
|
+
secret_key?: unknown;
|
|
117
|
+
jwt_secret_version: number;
|
|
118
|
+
jwt_secret_source: "control_plane" | "operator";
|
|
119
|
+
jwt_secret?: string;
|
|
120
|
+
}
|
|
121
|
+
export interface AuthUserActionResult {
|
|
122
|
+
user_id: string;
|
|
123
|
+
applied: boolean;
|
|
124
|
+
}
|
|
125
|
+
export interface WebhookConfig {
|
|
126
|
+
url: string;
|
|
127
|
+
method?: "POST";
|
|
128
|
+
headers?: {};
|
|
129
|
+
timeout_ms?: number;
|
|
130
|
+
retry_count?: number;
|
|
131
|
+
}
|
|
132
|
+
export interface CreateWebhookRequest {
|
|
133
|
+
name: string;
|
|
134
|
+
table_schema: string;
|
|
135
|
+
table_name: string;
|
|
136
|
+
events: "INSERT" | "UPDATE" | "DELETE" | "TRUNCATE"[];
|
|
137
|
+
config: WebhookConfig;
|
|
138
|
+
}
|
|
139
|
+
export interface Webhook {
|
|
140
|
+
webhook_id?: string;
|
|
141
|
+
name?: string;
|
|
142
|
+
table_schema?: string;
|
|
143
|
+
table_name?: string;
|
|
144
|
+
events?: string[];
|
|
145
|
+
config?: WebhookConfig;
|
|
146
|
+
status?: "active" | "paused" | "error";
|
|
147
|
+
created_at_epoch_seconds?: number;
|
|
148
|
+
last_fired_epoch_seconds?: number;
|
|
149
|
+
failure_count?: number;
|
|
150
|
+
}
|
|
151
|
+
export interface WebhookList {
|
|
152
|
+
webhooks: Webhook[];
|
|
153
|
+
notes: unknown;
|
|
154
|
+
}
|
|
155
|
+
export type PortableIdentifier = string;
|
|
156
|
+
export type Role = "owner" | "admin" | "developer" | "viewer";
|
|
157
|
+
export interface PutOrganizationRequest {
|
|
158
|
+
display_name: string;
|
|
159
|
+
}
|
|
160
|
+
export interface Organization {
|
|
161
|
+
organization_id: PortableIdentifier;
|
|
162
|
+
display_name: string;
|
|
163
|
+
}
|
|
164
|
+
export interface PutMembershipRequest {
|
|
165
|
+
subject: string;
|
|
166
|
+
role: Role;
|
|
167
|
+
}
|
|
168
|
+
export interface Membership {
|
|
169
|
+
organization_id: PortableIdentifier;
|
|
170
|
+
subject: string;
|
|
171
|
+
role: Role;
|
|
172
|
+
}
|
|
173
|
+
export interface PutProjectRequest {
|
|
174
|
+
region: PortableIdentifier;
|
|
175
|
+
postgres_major: 17;
|
|
176
|
+
}
|
|
177
|
+
export interface Project {
|
|
178
|
+
organization_id: PortableIdentifier;
|
|
179
|
+
project_id: PortableIdentifier;
|
|
180
|
+
region: PortableIdentifier;
|
|
181
|
+
postgres_major: 17;
|
|
182
|
+
}
|
|
183
|
+
export interface CreateEnvironmentRequest {
|
|
184
|
+
organization_id: PortableIdentifier;
|
|
185
|
+
project_id: PortableIdentifier;
|
|
186
|
+
environment_id: PortableIdentifier;
|
|
187
|
+
kind: EnvironmentKind;
|
|
188
|
+
data_mode: DataMode;
|
|
189
|
+
region: PortableIdentifier;
|
|
190
|
+
postgres_major: 17;
|
|
191
|
+
ttl_hours?: number;
|
|
192
|
+
}
|
|
193
|
+
export type EnvironmentKind = "preview" | "staging" | "production";
|
|
194
|
+
export type DataMode = "schema_only" | "sanitized" | "snapshot";
|
|
195
|
+
export type EnvironmentPhase = "requested" | "provisioning" | "ready" | "updating" | "suspended" | "failed_recoverable" | "deleting" | "deleted";
|
|
196
|
+
export interface Environment {
|
|
197
|
+
organization_id: PortableIdentifier;
|
|
198
|
+
project_id: PortableIdentifier;
|
|
199
|
+
environment_id: PortableIdentifier;
|
|
200
|
+
kind: EnvironmentKind;
|
|
201
|
+
data_mode: DataMode;
|
|
202
|
+
region: PortableIdentifier;
|
|
203
|
+
postgres_major: number;
|
|
204
|
+
ttl_hours?: number;
|
|
205
|
+
phase: EnvironmentPhase;
|
|
206
|
+
desired_generation: number;
|
|
207
|
+
observed_generation: number;
|
|
208
|
+
retry_count: number;
|
|
209
|
+
last_error?: ProviderError;
|
|
210
|
+
last_activity_epoch_seconds: number;
|
|
211
|
+
/** Present only for expiring preview environments. */
|
|
212
|
+
expires_at_epoch_seconds?: number;
|
|
213
|
+
finalizers: string[];
|
|
214
|
+
}
|
|
215
|
+
export type OperationState = "pending" | "running" | "waiting_retry" | "succeeded" | "failed" | "cancelled";
|
|
216
|
+
export interface Operation {
|
|
217
|
+
id: PortableIdentifier;
|
|
218
|
+
kind: "create_environment" | "suspend_environment" | "resume_environment" | "delete_environment" | "rollout_environment";
|
|
219
|
+
environment: EnvironmentReference;
|
|
220
|
+
state: OperationState;
|
|
221
|
+
attempt_count: number;
|
|
222
|
+
error?: string;
|
|
223
|
+
}
|
|
224
|
+
export interface EnvironmentReference {
|
|
225
|
+
organization_id: PortableIdentifier;
|
|
226
|
+
project_id: PortableIdentifier;
|
|
227
|
+
environment_id: PortableIdentifier;
|
|
228
|
+
}
|
|
229
|
+
export interface ProviderError {
|
|
230
|
+
code: string;
|
|
231
|
+
message: string;
|
|
232
|
+
retryable: boolean;
|
|
233
|
+
}
|
|
234
|
+
export interface AuditEvent {
|
|
235
|
+
sequence: number;
|
|
236
|
+
actor_subject: string;
|
|
237
|
+
action: string;
|
|
238
|
+
organization_id: PortableIdentifier;
|
|
239
|
+
project_id?: PortableIdentifier;
|
|
240
|
+
environment_id?: PortableIdentifier;
|
|
241
|
+
operation_id?: PortableIdentifier;
|
|
242
|
+
detail: string;
|
|
243
|
+
}
|
|
244
|
+
export interface Problem {
|
|
245
|
+
type: string;
|
|
246
|
+
title: string;
|
|
247
|
+
status: number;
|
|
248
|
+
code: string;
|
|
249
|
+
detail?: string;
|
|
250
|
+
request_id?: string;
|
|
251
|
+
}
|
|
252
|
+
export interface ImportDestination {
|
|
253
|
+
organizationId: PortableIdentifier;
|
|
254
|
+
projectId: PortableIdentifier;
|
|
255
|
+
environmentId: PortableIdentifier;
|
|
256
|
+
}
|
|
257
|
+
export interface CreateImportRequest {
|
|
258
|
+
/** The source Supabase project reference. */
|
|
259
|
+
sourceProjectRef: string;
|
|
260
|
+
/** Source Postgres connection string; used once, never returned. */
|
|
261
|
+
sourceConnectionString: string;
|
|
262
|
+
/** Source service key; used once, never returned. */
|
|
263
|
+
sourceServiceKey: string;
|
|
264
|
+
destination: ImportDestination;
|
|
265
|
+
/** When true, plan the move and report — nothing is written. */
|
|
266
|
+
dryRun: boolean;
|
|
267
|
+
}
|
|
268
|
+
export type ImportCategory = "schema" | "auth users" | "data" | "policies" | "storage" | "edge functions" | "secrets";
|
|
269
|
+
export type ImportSeverity = "info" | "action" | "warning";
|
|
270
|
+
export interface ImportFinding {
|
|
271
|
+
category: ImportCategory;
|
|
272
|
+
severity: ImportSeverity;
|
|
273
|
+
detail: string;
|
|
274
|
+
}
|
|
275
|
+
export interface ImportTally {
|
|
276
|
+
tables: number;
|
|
277
|
+
rows: number;
|
|
278
|
+
authUsers: number;
|
|
279
|
+
identities: number;
|
|
280
|
+
mfaFactors: number;
|
|
281
|
+
policies: number;
|
|
282
|
+
buckets: number;
|
|
283
|
+
objects: number;
|
|
284
|
+
objectBytes: number;
|
|
285
|
+
edgeFunctions: number;
|
|
286
|
+
/** Signing keys reissued (never copied). */
|
|
287
|
+
signingKeysReissued: number;
|
|
288
|
+
/** User secrets left for the operator to re-enter. */
|
|
289
|
+
secretsDeferred: number;
|
|
290
|
+
}
|
|
291
|
+
export type ImportCheckStatus = "pass" | "fail" | "warn" | "skipped";
|
|
292
|
+
export interface ImportVerificationCheck {
|
|
293
|
+
name: string;
|
|
294
|
+
status: ImportCheckStatus;
|
|
295
|
+
detail: string;
|
|
296
|
+
}
|
|
297
|
+
export interface ImportVerification {
|
|
298
|
+
checks: ImportVerificationCheck[];
|
|
299
|
+
}
|
|
300
|
+
export interface ImportDryRun {
|
|
301
|
+
projectRef: string;
|
|
302
|
+
destination: string;
|
|
303
|
+
planned: ImportTally;
|
|
304
|
+
tables: string[];
|
|
305
|
+
findings: ImportFinding[];
|
|
306
|
+
}
|
|
307
|
+
export interface ImportReport {
|
|
308
|
+
projectRef: string;
|
|
309
|
+
destination: string;
|
|
310
|
+
moved: ImportTally;
|
|
311
|
+
findings: ImportFinding[];
|
|
312
|
+
/** Populated once the verifier has run; null when unverifiable. */
|
|
313
|
+
verification?: ImportVerification | null;
|
|
314
|
+
}
|
|
315
|
+
export interface ImportJobError {
|
|
316
|
+
code: string;
|
|
317
|
+
detail: string;
|
|
318
|
+
}
|
|
319
|
+
export interface ImportJob {
|
|
320
|
+
import_id: string;
|
|
321
|
+
status: "running" | "succeeded" | "failed" | "interrupted";
|
|
322
|
+
/** The phase in progress: schema, auth_users, data, policies, storage_objects, edge_functions, secrets, verify, done. */
|
|
323
|
+
phase: string;
|
|
324
|
+
/** Every phase in run order. */
|
|
325
|
+
phases?: string[];
|
|
326
|
+
organization_id?: string;
|
|
327
|
+
project_id?: string;
|
|
328
|
+
environment_id?: string;
|
|
329
|
+
source?: "supabase" | "firebase" | "instantdb";
|
|
330
|
+
source_ref?: string;
|
|
331
|
+
dry_run?: boolean;
|
|
332
|
+
counts?: ImportTally;
|
|
333
|
+
/** Findings raised so far. */
|
|
334
|
+
findings?: number;
|
|
335
|
+
errors: ImportJobError[];
|
|
336
|
+
/** Whether `POST /v1/imports/{import_id}/resume` can continue the run (it stopped after at least one committed step). */
|
|
337
|
+
resumable?: boolean;
|
|
338
|
+
/** How many times the run has been started (1 + resumes). */
|
|
339
|
+
attempts?: number;
|
|
340
|
+
/** Epoch seconds. */
|
|
341
|
+
started_at: number;
|
|
342
|
+
/** Epoch seconds. */
|
|
343
|
+
updated_at: number;
|
|
344
|
+
/** Epoch seconds of the running replica's last liveness signal (durable progress only). */
|
|
345
|
+
heartbeat_at?: number;
|
|
346
|
+
/** Epoch seconds; absent while running. */
|
|
347
|
+
finished_at?: number;
|
|
348
|
+
/** Whether the fail-closed parity verdict passed. */
|
|
349
|
+
passed?: boolean;
|
|
350
|
+
/** Whether the report was stored in the import history under `import_id` (readable at /v1/organizations/{org}/imports/{id}). */
|
|
351
|
+
report_recorded?: boolean;
|
|
352
|
+
report?: ImportReport;
|
|
353
|
+
}
|
|
354
|
+
export interface OrganizationPlanProjects {
|
|
355
|
+
used?: number;
|
|
356
|
+
limit?: number;
|
|
357
|
+
}
|
|
358
|
+
export interface OrganizationPlanUpgrade {
|
|
359
|
+
plan: string;
|
|
360
|
+
name: string;
|
|
361
|
+
price_usd?: number;
|
|
362
|
+
projects?: number;
|
|
363
|
+
}
|
|
364
|
+
export interface OrganizationPlan {
|
|
365
|
+
organization_id: string;
|
|
366
|
+
plan: string;
|
|
367
|
+
name: string;
|
|
368
|
+
/** Always false; Scribase has no project cap. */
|
|
369
|
+
project_limits_enforced: boolean;
|
|
370
|
+
projects: OrganizationPlanProjects;
|
|
371
|
+
}
|
|
372
|
+
export interface MigrationInput {
|
|
373
|
+
version: string;
|
|
374
|
+
name: string;
|
|
375
|
+
up: string;
|
|
376
|
+
down?: string;
|
|
377
|
+
}
|
|
378
|
+
export interface RunMigrationsRequest {
|
|
379
|
+
migrations: MigrationInput[];
|
|
380
|
+
/** When false, plan and lint only — nothing is executed. */
|
|
381
|
+
apply: boolean;
|
|
382
|
+
}
|
|
383
|
+
export interface AppendMigrationRequest {
|
|
384
|
+
migration: MigrationInput;
|
|
385
|
+
/** When false or absent, lint only — nothing is executed. */
|
|
386
|
+
apply?: boolean;
|
|
387
|
+
}
|
|
388
|
+
export interface MigrationLedger {
|
|
389
|
+
migrations: {
|
|
390
|
+
version: number;
|
|
391
|
+
name: string;
|
|
392
|
+
sha256: string;
|
|
393
|
+
applied_at?: unknown;
|
|
394
|
+
}[];
|
|
395
|
+
}
|
|
396
|
+
export type MigrationDirection = "up" | "down";
|
|
397
|
+
export interface MigrationPlanStep {
|
|
398
|
+
version: number;
|
|
399
|
+
name: string;
|
|
400
|
+
direction: MigrationDirection;
|
|
401
|
+
checksum: string;
|
|
402
|
+
}
|
|
403
|
+
export interface MigrationPlan {
|
|
404
|
+
steps: MigrationPlanStep[];
|
|
405
|
+
}
|
|
406
|
+
export type MigrationLintSeverity = "BLOCK" | "WARN";
|
|
407
|
+
export interface MigrationLintFinding {
|
|
408
|
+
rule: string;
|
|
409
|
+
severity: MigrationLintSeverity;
|
|
410
|
+
message: string;
|
|
411
|
+
subject: string;
|
|
412
|
+
line: number;
|
|
413
|
+
}
|
|
414
|
+
export interface RunMigrationsResult {
|
|
415
|
+
plan: MigrationPlan;
|
|
416
|
+
lintFindings: MigrationLintFinding[];
|
|
417
|
+
/** Versions actually applied; empty when apply was false or a finding blocked. */
|
|
418
|
+
applied: number[];
|
|
419
|
+
}
|
|
420
|
+
export type ExportFormat = "compose" | "kustomize";
|
|
421
|
+
export interface CreateExportRequest {
|
|
422
|
+
format: ExportFormat;
|
|
423
|
+
}
|
|
424
|
+
export interface ExportIntegrityClaim {
|
|
425
|
+
path: string;
|
|
426
|
+
sha256: string;
|
|
427
|
+
size_bytes: number;
|
|
428
|
+
}
|
|
429
|
+
export interface ExportDatabaseArtifact {
|
|
430
|
+
path: string;
|
|
431
|
+
format: string;
|
|
432
|
+
sha256: string;
|
|
433
|
+
size_bytes: number;
|
|
434
|
+
postgres_major: number;
|
|
435
|
+
}
|
|
436
|
+
export interface ExportStorageSummary {
|
|
437
|
+
root: string;
|
|
438
|
+
object_count: number;
|
|
439
|
+
total_bytes: number;
|
|
440
|
+
}
|
|
441
|
+
export interface ExportManifestSignature {
|
|
442
|
+
algorithm: string;
|
|
443
|
+
/** Non-secret identifier of the key used, so a verifier can select it. */
|
|
444
|
+
key_id: string;
|
|
445
|
+
value: string;
|
|
446
|
+
}
|
|
447
|
+
export interface ExportManifest {
|
|
448
|
+
schema_version: number;
|
|
449
|
+
bundle_id: string;
|
|
450
|
+
organization_id: string;
|
|
451
|
+
project_id: string;
|
|
452
|
+
environment_id: string;
|
|
453
|
+
created_at_epoch_seconds: number;
|
|
454
|
+
database: ExportDatabaseArtifact;
|
|
455
|
+
storage: ExportStorageSummary;
|
|
456
|
+
render_targets: string[];
|
|
457
|
+
artifacts: ExportIntegrityClaim[];
|
|
458
|
+
signature?: ExportManifestSignature;
|
|
459
|
+
}
|
|
460
|
+
export interface ExportResult {
|
|
461
|
+
manifest: ExportManifest;
|
|
462
|
+
/** Reference to the assembled bundle (its addressable root/id). */
|
|
463
|
+
bundleRef: string;
|
|
464
|
+
}
|
|
465
|
+
/** Inline 200 body of `listEnvironments`. */
|
|
466
|
+
export interface ListEnvironmentsResponse {
|
|
467
|
+
environments: Environment[];
|
|
468
|
+
}
|
|
469
|
+
/** Inline 200 body of `listAuditEvents`. */
|
|
470
|
+
export interface ListAuditEventsResponse {
|
|
471
|
+
items: AuditEvent[];
|
|
472
|
+
}
|
|
473
|
+
//# sourceMappingURL=types.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../src/types.gen.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,uBAAuB,GAAG,sBAAsB,GAAG,MAAM,GAAG,aAAa,GAAG,iBAAiB,CAAC;IACpG,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,GAAG,IAAI,CAAC;CAC1D;AAED,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,GAAG,sBAAsB,GAAG,WAAW,GAAG,eAAe,GAAG,MAAM,GAAG,sBAAsB,CAAC;AAEhK,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,WAAW,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,wBAAwB,EAAE,MAAM,CAAC;CAClC;AAED,MAAM,WAAW,aAAa;IAC5B,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,oBAAoB,EAAE,CAAC;IAClC,OAAO,EAAE;QACP,MAAM,EAAE,WAAW,CAAC;QACpB,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;IACJ,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,uBAAuB;IACtC,0EAA0E;IAC1E,SAAS,EAAE,EAEV,CAAC;CACH;AAED,MAAM,WAAW,a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YAAY,EAAE,WAAW,EAAE,CAAC;CAC7B;AAED,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.gen.js","sourceRoot":"","sources":["../src/types.gen.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "scribase",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Typed, fetch-based TypeScript client for the Scribase control-plane /v1 API (agent-native, flat-priced Supabase-compatible application cloud).",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=22.13"
|
|
10
|
+
},
|
|
11
|
+
"main": "./dist/index.js",
|
|
12
|
+
"module": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"bin": {
|
|
15
|
+
"scribase": "./dist/cli/index.js"
|
|
16
|
+
},
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./importers": {
|
|
23
|
+
"types": "./dist/importers/index.d.ts",
|
|
24
|
+
"import": "./dist/importers/index.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc -p tsconfig.json",
|
|
33
|
+
"generate": "tsx scripts/generate.ts",
|
|
34
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
35
|
+
"test": "node --import tsx/esm --test tests/client.test.ts tests/resources.test.ts tests/importers.test.ts tests/cli.test.ts tests/login.test.ts tests/vercel.test.ts",
|
|
36
|
+
"prepublishOnly": "npm run build"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"scribase",
|
|
40
|
+
"supabase",
|
|
41
|
+
"postgres",
|
|
42
|
+
"control-plane",
|
|
43
|
+
"sdk",
|
|
44
|
+
"agent-native"
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@types/node": "^22.10.0",
|
|
49
|
+
"tsx": "^4.19.0",
|
|
50
|
+
"typescript": "^5.7.0",
|
|
51
|
+
"yaml": "^2.6.0"
|
|
52
|
+
}
|
|
53
|
+
}
|