@scalix-world/sdk 1.3.5 → 1.4.1

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.
@@ -83,6 +83,50 @@ export type BandwidthStat = {
83
83
  export type BatchSqlRequest = {
84
84
  queries: Array<SqlRequest>;
85
85
  };
86
+ /**
87
+ * Connection endpoint of the branch's compute worker.
88
+ */
89
+ export type BranchTimelineEndpoint = {
90
+ host: string;
91
+ port: number;
92
+ };
93
+ /**
94
+ * Request to branch a timeline.
95
+ */
96
+ export type BranchTimelineRequest = {
97
+ /**
98
+ * Explicit id (UUID) for the new branch timeline; server-generated when
99
+ * omitted.
100
+ */
101
+ new_timeline_id?: string | null;
102
+ /**
103
+ * LSN to branch at; `0` (the default) branches at the latest recoverable
104
+ * point.
105
+ */
106
+ branch_lsn?: number;
107
+ };
108
+ /**
109
+ * A created branch, routed and ready.
110
+ */
111
+ export type BranchTimelineResponse = {
112
+ /**
113
+ * The new branch timeline id.
114
+ */
115
+ timeline_id: string;
116
+ /**
117
+ * The timeline the branch was taken from.
118
+ */
119
+ parent_timeline_id: string;
120
+ /**
121
+ * LSN the branch was taken at (`0` = latest).
122
+ */
123
+ branch_lsn: number;
124
+ endpoint: BranchTimelineEndpoint;
125
+ /**
126
+ * Always `ready` on success.
127
+ */
128
+ status: string;
129
+ };
86
130
  /**
87
131
  * Plan allowances.
88
132
  */
@@ -108,6 +152,54 @@ export type BudgetUsage = {
108
152
  storage_gb: number;
109
153
  compute_hours: number;
110
154
  };
155
+ /**
156
+ * A source build to start.
157
+ */
158
+ export type BuildCreateRequest = {
159
+ /**
160
+ * Where the source comes from: `git` or `tarball`.
161
+ */
162
+ source_type: string;
163
+ /**
164
+ * Repository or archive URL. Must be reachable from the builder.
165
+ */
166
+ source_url?: string | null;
167
+ /**
168
+ * Branch, tag or commit to build. Defaults to `main`. This is the branch
169
+ * field: `git_ref` is not recognised and is ignored if sent.
170
+ */
171
+ source_ref?: string | null;
172
+ /**
173
+ * Credential for a private repository, used as the password in the clone
174
+ * URL. A fine-grained token with read-only Contents access on that one
175
+ * repository is enough. It is held in memory for the build only: never
176
+ * stored, never written to build logs or error messages. Omit this when
177
+ * the Scalix GitHub App is installed for the project - a short-lived
178
+ * installation token is then minted per build and injected automatically.
179
+ */
180
+ auth_token?: string | null;
181
+ /**
182
+ * Path to the Dockerfile within the source tree. Auto-detected if omitted.
183
+ */
184
+ dockerfile_path?: string | null;
185
+ /**
186
+ * Tag for the resulting image. Auto-generated if omitted.
187
+ */
188
+ image_tag?: string | null;
189
+ /**
190
+ * Build-time ARGs passed to the builder. Project environment variables are
191
+ * merged in as well; values sent here win. These are stored on the build
192
+ * record and readable back from `GET /v1/build/{id}`, so treat them as
193
+ * non-secret: use them for things like a public API base URL, not tokens.
194
+ */
195
+ build_args?: {
196
+ [key: string]: unknown;
197
+ } | null;
198
+ /**
199
+ * Build timeout in seconds. Default 600, maximum 3600.
200
+ */
201
+ timeout_seconds?: number | null;
202
+ };
111
203
  /**
112
204
  * Request body for `POST /v1/env/bulk` — import many variables at once.
113
205
  */
@@ -187,6 +279,146 @@ export type ComputeDeployRequest = {
187
279
  export type ComputeStat = {
188
280
  hours_used: number;
189
281
  };
282
+ /**
283
+ * Request body for creating a Computer.
284
+ */
285
+ export type ComputerCreateRequest = {
286
+ /**
287
+ * Lowercase DNS label, max 63 characters. Unique per account.
288
+ */
289
+ name: string;
290
+ /**
291
+ * Guest image. `ubuntu24` is the only image available today.
292
+ */
293
+ image?: string | null;
294
+ resources?: null | ComputerResources;
295
+ /**
296
+ * OpenSSH public keys authorised for `root`, one per array entry, max 32.
297
+ * Optional — `exec` and the browser terminal work without one. Send the
298
+ * public half only (the `.pub` file); a private key is rejected.
299
+ */
300
+ ssh_keys?: Array<string> | null;
301
+ };
302
+ /**
303
+ * Request body for running a command inside a Computer.
304
+ */
305
+ export type ComputerExecRequest = {
306
+ command: string;
307
+ args?: Array<string> | null;
308
+ /**
309
+ * Working directory inside the guest.
310
+ */
311
+ cwd?: string | null;
312
+ env?: {
313
+ [key: string]: unknown;
314
+ };
315
+ /**
316
+ * 1000..600000, default 60000.
317
+ */
318
+ timeout_ms?: number | null;
319
+ };
320
+ /**
321
+ * Result of a command executed inside a Computer.
322
+ */
323
+ export type ComputerExecResult = {
324
+ exitCode: number;
325
+ stdout: string;
326
+ stderr: string;
327
+ };
328
+ /**
329
+ * One file read out of a Computer.
330
+ */
331
+ export type ComputerFileRead = {
332
+ exists: boolean;
333
+ /**
334
+ * Base64-encoded contents. Empty when `exists` is false.
335
+ */
336
+ content_b64: string;
337
+ /**
338
+ * Size in bytes, as a string.
339
+ */
340
+ size: string;
341
+ };
342
+ /**
343
+ * One file to write into a Computer.
344
+ */
345
+ export type ComputerFileWrite = {
346
+ path: string;
347
+ /**
348
+ * Base64-encoded contents.
349
+ */
350
+ content_b64: string;
351
+ /**
352
+ * Unix mode, default 0644.
353
+ */
354
+ mode?: number | null;
355
+ };
356
+ /**
357
+ * A Computer as returned by create/get/list.
358
+ */
359
+ export type ComputerInfo = {
360
+ id: string;
361
+ name: string;
362
+ image: string;
363
+ /**
364
+ * CREATING | RUNNING | STOPPING | STOPPED | STARTING | DELETING | FAILED
365
+ */
366
+ status: string;
367
+ /**
368
+ * Human-readable reason for the current status (set on FAILED).
369
+ */
370
+ statusReason?: string | null;
371
+ /**
372
+ * Private address inside your network. Reserved for the Computer's
373
+ * lifetime — the same address comes back after a stop/start.
374
+ */
375
+ ipAddress?: string | null;
376
+ vcpus: number;
377
+ memoryMb: number;
378
+ diskGb: number;
379
+ /**
380
+ * The OpenSSH public keys currently authorised for `root`. Public halves
381
+ * only — there is nothing secret to withhold here, and being able to read
382
+ * back what is installed is how you confirm a revocation took.
383
+ */
384
+ sshKeys?: Array<string>;
385
+ createdAt: string;
386
+ updatedAt: string;
387
+ };
388
+ /**
389
+ * Resource shape for a Computer. Fixed at create in v1 — disks do not grow.
390
+ */
391
+ export type ComputerResources = {
392
+ /**
393
+ * 1..16
394
+ */
395
+ vcpus?: number | null;
396
+ /**
397
+ * 512..32768
398
+ */
399
+ memory_mb?: number | null;
400
+ /**
401
+ * 5..200. Billed per GB-month for as long as the Computer exists,
402
+ * running or stopped.
403
+ */
404
+ disk_gb?: number | null;
405
+ };
406
+ /**
407
+ * Request body for replacing a Computer's authorised ssh keys.
408
+ */
409
+ export type ComputerSshKeysRequest = {
410
+ /**
411
+ * The complete list, max 32. Not a patch: whatever you send becomes the
412
+ * whole of `authorized_keys`, and an empty array removes every key.
413
+ */
414
+ ssh_keys: Array<string>;
415
+ };
416
+ /**
417
+ * Request body for writing files into a Computer. Max 64 files per call.
418
+ */
419
+ export type ComputerWriteFilesRequest = {
420
+ files: Array<ComputerFileWrite>;
421
+ };
190
422
  /**
191
423
  * A recorded GDPR consent decision.
192
424
  */
@@ -202,6 +434,47 @@ export type CrawlerPolicy = {
202
434
  action: ShieldAction;
203
435
  rate_limit_per_min?: number | null;
204
436
  };
437
+ /**
438
+ * Request to create a ScalixNova database.
439
+ */
440
+ export type CreateDatabaseRequest = {
441
+ /**
442
+ * Display name, unique within the org.
443
+ */
444
+ name: string;
445
+ /**
446
+ * PostgreSQL major version: `"16"` (default), `"17"`, or `"18"`. Accepts a
447
+ * string or number. Fixed for the life of the database — branches and
448
+ * point-in-time restores keep this major. Unsupported values return 400
449
+ * listing the supported set.
450
+ */
451
+ pg_version?: string | null;
452
+ /**
453
+ * Isolation tier: `"shared"` (default) or `"dedicated"` (Firecracker
454
+ * microVM; PostgreSQL 16 only, returns 501 where the tier isn't
455
+ * provisioned).
456
+ */
457
+ isolation?: string | null;
458
+ };
459
+ /**
460
+ * Response from creating a database.
461
+ */
462
+ export type CreateDatabaseResponse = {
463
+ id: string;
464
+ name: string;
465
+ pg_database: string;
466
+ tenant_id: string;
467
+ /**
468
+ * Postgres connection string (replace `YOUR_API_KEY` with an API key).
469
+ */
470
+ connection_string: string;
471
+ status: string;
472
+ isolation: string;
473
+ /**
474
+ * PostgreSQL major version the database was created on.
475
+ */
476
+ pg_version: string;
477
+ };
205
478
  export type CreateGdprRequest = {
206
479
  subject_email: string;
207
480
  request_type: GdprRequestType;
@@ -298,6 +571,47 @@ export type DataSubjectRequest = {
298
571
  created_at: string;
299
572
  completed_at?: string | null;
300
573
  };
574
+ /**
575
+ * A ScalixNova database record.
576
+ */
577
+ export type DatabaseJson = {
578
+ /**
579
+ * Database id (UUID).
580
+ */
581
+ id: string;
582
+ /**
583
+ * Display name.
584
+ */
585
+ name: string;
586
+ /**
587
+ * Physical PostgreSQL database name (`db_<hex>`).
588
+ */
589
+ pg_database?: string | null;
590
+ /**
591
+ * Tenant id backing this database on the compute plane.
592
+ */
593
+ tenant_id?: string | null;
594
+ /**
595
+ * `active` or `deleting` (soft-deleted, inside the recovery grace window).
596
+ */
597
+ status: string;
598
+ /**
599
+ * RFC 3339 creation time.
600
+ */
601
+ created_at?: string | null;
602
+ /**
603
+ * Isolation tier: `shared` or `dedicated`.
604
+ */
605
+ isolation: string;
606
+ /**
607
+ * PostgreSQL major version this database runs (`16`, `17`, or `18`).
608
+ */
609
+ pg_version: string;
610
+ /**
611
+ * Soft-delete timestamp, when `status` is `deleting`.
612
+ */
613
+ deleted_at?: string | null;
614
+ };
301
615
  export type DdosStats = {
302
616
  global_rps: number;
303
617
  tracked_ips: number;
@@ -346,6 +660,104 @@ export type DomainJson = {
346
660
  * Run service this domain serves (absent = the project's API surface).
347
661
  */
348
662
  run_service?: string | null;
663
+ /**
664
+ * Gateway IP for apex A-record setup (absent if not configured).
665
+ */
666
+ edge_ip?: string | null;
667
+ };
668
+ /**
669
+ * The domain to add to the org's sending domains.
670
+ */
671
+ export type EmailAddDomainRequest = {
672
+ /**
673
+ * Domain to add.
674
+ */
675
+ domain: string;
676
+ };
677
+ /**
678
+ * A sending domain owned by the org, with the DNS records it needs.
679
+ */
680
+ export type EmailDomain = {
681
+ /**
682
+ * Domain id.
683
+ */
684
+ id: string;
685
+ /**
686
+ * The domain itself.
687
+ */
688
+ domain: string;
689
+ /**
690
+ * Verification state of the DNS records.
691
+ */
692
+ status: string;
693
+ /**
694
+ * DNS records that must exist for the domain to verify.
695
+ */
696
+ dns_records?: {
697
+ [key: string]: unknown;
698
+ } | null;
699
+ /**
700
+ * Whether this org may actually send through the domain. Verification
701
+ * alone is not sufficient: bring-your-own delivery is a separate switch.
702
+ */
703
+ delivery_enabled?: boolean | null;
704
+ };
705
+ /**
706
+ * A one-off email with its body supplied inline.
707
+ */
708
+ export type EmailSendRawRequest = {
709
+ /**
710
+ * Recipient address.
711
+ */
712
+ to: string;
713
+ /**
714
+ * Subject line.
715
+ */
716
+ subject: string;
717
+ /**
718
+ * HTML body.
719
+ */
720
+ html: string;
721
+ };
722
+ /**
723
+ * The accepted-for-delivery receipt returned by both send endpoints.
724
+ */
725
+ export type EmailSendResponse = {
726
+ /**
727
+ * Message id, used to correlate later delivery events.
728
+ */
729
+ id: string;
730
+ /**
731
+ * Delivery state at the time of the response.
732
+ */
733
+ status: string;
734
+ /**
735
+ * Recipient the message was accepted for.
736
+ */
737
+ to: string;
738
+ /**
739
+ * Template used, echoed back on the templated send.
740
+ */
741
+ template?: string | null;
742
+ };
743
+ /**
744
+ * A templated transactional email to send.
745
+ */
746
+ export type EmailSendTxRequest = {
747
+ /**
748
+ * Name of the template to render.
749
+ */
750
+ template: string;
751
+ /**
752
+ * Recipient address.
753
+ */
754
+ to: string;
755
+ /**
756
+ * Variables substituted into the template.
757
+ */
758
+ data?: {
759
+ [key: string]: unknown;
760
+ } | null;
349
761
  };
350
762
  /**
351
763
  * A project environment variable (secret values are masked).
@@ -546,6 +958,16 @@ export type KvSetRequest = {
546
958
  */
547
959
  ttl?: number | null;
548
960
  };
961
+ /**
962
+ * Databases in the project.
963
+ */
964
+ export type ListDatabasesResponse = {
965
+ databases: Array<DatabaseJson>;
966
+ /**
967
+ * Days a soft-deleted database stays restorable.
968
+ */
969
+ delete_grace_days?: number | null;
970
+ };
549
971
  /**
550
972
  * Response for `GET /v1/domains` — all custom domains for the project.
551
973
  */
@@ -594,6 +1016,13 @@ export type MeLimits = {
594
1016
  plan: string;
595
1017
  rate_limit_rps: number;
596
1018
  api_keys_max: number;
1019
+ /**
1020
+ * OAuth-granted connected apps (ChatGPT, Claude, an IDE …). A separate pool
1021
+ * from `api_keys_max` — see `plan_limits::connected_apps_for_plan`. Reported
1022
+ * so the console reads the limit from the server that enforces it, rather
1023
+ * than from a client-side constant that can drift out of step.
1024
+ */
1025
+ connected_apps_max: number;
597
1026
  };
598
1027
  /**
599
1028
  * Effective permissions for the caller's token.
@@ -629,39 +1058,253 @@ export type RecordConsentRequest = {
629
1058
  granted: boolean;
630
1059
  };
631
1060
  export type RequestStatus = 'pending' | 'in_progress' | 'completed' | 'rejected';
632
- export type ScopeConfig = {
633
- enabled?: boolean;
1061
+ /**
1062
+ * A Scalix Run service to deploy.
1063
+ */
1064
+ export type RunServiceDeployRequest = {
634
1065
  /**
635
- * Adds `X-Robots-Tag: noai, noimageai` to proxied responses.
1066
+ * Service name, unique within the project.
636
1067
  */
637
- inject_noai_headers?: boolean;
1068
+ name: string;
638
1069
  /**
639
- * Adds `tdm-reservation: 1` (EU DSM Directive text-and-data-mining opt-out).
1070
+ * Container image to run.
640
1071
  */
641
- tdm_reservation?: boolean;
1072
+ image_ref: string;
642
1073
  /**
643
- * Block crawlers whose source IP fails verification against configured
644
- * ranges. Off by default: stale ranges must not break legitimate bots.
1074
+ * Port the app listens on inside the instance. Default 8080.
645
1075
  */
646
- block_impersonators?: boolean;
1076
+ port?: number | null;
647
1077
  /**
648
- * Per-category default action, keyed by crawler category.
1078
+ * Environment variables.
649
1079
  */
650
- category_defaults?: {
1080
+ env?: {
651
1081
  [key: string]: unknown;
652
- };
653
- };
654
- /**
655
- * Request body for `POST /v1/env` — a single project environment variable.
656
- * Fields are read by serde + utoipa; the 501-stub handlers ignore the body.
657
- */
658
- export type SetEnvBody = {
659
- key: string;
660
- value: string;
1082
+ } | null;
661
1083
  /**
662
- * Store the value as a write-only secret (masked on read).
1084
+ * Memory per instance in MB. Default 256, minimum 128.
663
1085
  */
664
- is_secret?: boolean | null;
1086
+ memory_mb?: number | null;
1087
+ /**
1088
+ * vCPUs per instance. Default 1.
1089
+ */
1090
+ vcpus?: number | null;
1091
+ /**
1092
+ * Minimum instances kept warm. Default 0 (scale to zero).
1093
+ */
1094
+ min_instances?: number | null;
1095
+ /**
1096
+ * Maximum instances. Default 10.
1097
+ */
1098
+ max_instances?: number | null;
1099
+ /**
1100
+ * Concurrent requests per instance before scaling out. Default 50.
1101
+ */
1102
+ target_concurrency?: number | null;
1103
+ /**
1104
+ * Idle seconds before scaling in. Default 300.
1105
+ */
1106
+ scale_down_delay_secs?: number | null;
1107
+ /**
1108
+ * HTTP path for the readiness probe. Omit for the default check that the
1109
+ * app is listening on `port`.
1110
+ */
1111
+ health_check_path?: string | null;
1112
+ /**
1113
+ * Per-request timeout in seconds. Default 300.
1114
+ */
1115
+ timeout_secs?: number | null;
1116
+ /**
1117
+ * `instant`, `health_gated` (default), or `canary`.
1118
+ */
1119
+ rollout_strategy?: string | null;
1120
+ /**
1121
+ * Persistent volumes. Attaching one pins the service to a single instance
1122
+ * and the `instant` strategy.
1123
+ */
1124
+ volumes?: {
1125
+ [key: string]: unknown;
1126
+ } | null;
1127
+ };
1128
+ /**
1129
+ * Changes to apply to an existing Scalix Run service.
1130
+ *
1131
+ * Every field is optional; omitted fields are left as-is. Changing
1132
+ * `image_ref` is what triggers a new revision and a rollout.
1133
+ */
1134
+ export type RunServiceUpdateRequest = {
1135
+ image_ref?: string | null;
1136
+ env?: {
1137
+ [key: string]: unknown;
1138
+ } | null;
1139
+ memory_mb?: number | null;
1140
+ vcpus?: number | null;
1141
+ min_instances?: number | null;
1142
+ max_instances?: number | null;
1143
+ target_concurrency?: number | null;
1144
+ scale_down_delay_secs?: number | null;
1145
+ health_check_path?: string | null;
1146
+ timeout_secs?: number | null;
1147
+ /**
1148
+ * Strategy for the rollout this update triggers.
1149
+ */
1150
+ rollout_strategy?: string | null;
1151
+ /**
1152
+ * Canary stages, e.g. `[{"pct":10,"soak_secs":60}]`.
1153
+ */
1154
+ rollout_stages?: {
1155
+ [key: string]: unknown;
1156
+ } | null;
1157
+ /**
1158
+ * Instances that must pass the probe before the revision is promoted.
1159
+ */
1160
+ ready_threshold?: number | null;
1161
+ /**
1162
+ * Seconds the new revision has to pass its readiness gate before it is
1163
+ * rolled back to the previous revision. Raise it for apps with a slow cold
1164
+ * start (model loading, large runtimes) - a revision that boots fine but
1165
+ * warms up slowly is otherwise reverted, leaving the older revision
1166
+ * serving with its own resource settings.
1167
+ */
1168
+ gate_deadline_secs?: number | null;
1169
+ };
1170
+ /**
1171
+ * Request body for running a command inside a sandbox.
1172
+ */
1173
+ export type SandboxCommandRequest = {
1174
+ cmd: string;
1175
+ args?: Array<string> | null;
1176
+ /**
1177
+ * Working directory inside the guest.
1178
+ */
1179
+ cwd?: string | null;
1180
+ env?: {
1181
+ [key: string]: unknown;
1182
+ };
1183
+ /**
1184
+ * Run without waiting for completion.
1185
+ */
1186
+ detached?: boolean | null;
1187
+ };
1188
+ /**
1189
+ * Result of a synchronous command execution.
1190
+ */
1191
+ export type SandboxCommandResult = {
1192
+ exit_code: number;
1193
+ stdout: string;
1194
+ stderr: string;
1195
+ duration_ms: number;
1196
+ };
1197
+ /**
1198
+ * Request body for creating an ephemeral sandbox.
1199
+ */
1200
+ export type SandboxCreateRequest = {
1201
+ /**
1202
+ * Runtime image. `node22` is available today; other values are rolling
1203
+ * out and fail placement until their images ship.
1204
+ */
1205
+ runtime?: string | null;
1206
+ /**
1207
+ * Resource shape. Defaults: 1 vCPU, 512 MB memory, 5 GB disk.
1208
+ */
1209
+ resources?: {
1210
+ [key: string]: unknown;
1211
+ };
1212
+ /**
1213
+ * Hard lifetime in milliseconds (60000..86400000, default 300000). The
1214
+ * sandbox also stops earlier at its idle timeout.
1215
+ */
1216
+ timeout_ms?: number | null;
1217
+ /**
1218
+ * Guest ports to expose.
1219
+ */
1220
+ ports?: Array<number> | null;
1221
+ /**
1222
+ * `{type: "git", url, branch?}` clones a repository into the sandbox.
1223
+ */
1224
+ source?: {
1225
+ [key: string]: unknown;
1226
+ };
1227
+ /**
1228
+ * Environment variables for the guest.
1229
+ */
1230
+ env?: {
1231
+ [key: string]: unknown;
1232
+ };
1233
+ };
1234
+ /**
1235
+ * Request body for extending a sandbox's hard deadline.
1236
+ */
1237
+ export type SandboxExtendRequest = {
1238
+ /**
1239
+ * Milliseconds to add to the current expiry.
1240
+ */
1241
+ duration_ms: number;
1242
+ };
1243
+ /**
1244
+ * A sandbox as returned by create/get/list.
1245
+ */
1246
+ export type SandboxInfo = {
1247
+ id: string;
1248
+ runtime: string;
1249
+ /**
1250
+ * PROVISIONING | RUNNING | STOPPING | STOPPED | FAILED | EXPIRED
1251
+ */
1252
+ status: string;
1253
+ /**
1254
+ * Human-readable reason for the current status (set on FAILED and
1255
+ * idle-stop transitions).
1256
+ */
1257
+ status_reason?: string | null;
1258
+ vcpus: number;
1259
+ memory_mb: number;
1260
+ disk_gb: number;
1261
+ expires_at: string;
1262
+ };
1263
+ /**
1264
+ * Request body for writing files into a sandbox. Writable roots inside the
1265
+ * guest are `/app`, `/scalix`, `/build`, and `/tmp`.
1266
+ */
1267
+ export type SandboxWriteFilesRequest = {
1268
+ /**
1269
+ * Files to write: `[{path, content}]`.
1270
+ */
1271
+ files: Array<{
1272
+ [key: string]: unknown;
1273
+ }>;
1274
+ };
1275
+ export type ScopeConfig = {
1276
+ enabled?: boolean;
1277
+ /**
1278
+ * Adds `X-Robots-Tag: noai, noimageai` to proxied responses.
1279
+ */
1280
+ inject_noai_headers?: boolean;
1281
+ /**
1282
+ * Adds `tdm-reservation: 1` (EU DSM Directive text-and-data-mining opt-out).
1283
+ */
1284
+ tdm_reservation?: boolean;
1285
+ /**
1286
+ * Block crawlers whose source IP fails verification against configured
1287
+ * ranges. Off by default: stale ranges must not break legitimate bots.
1288
+ */
1289
+ block_impersonators?: boolean;
1290
+ /**
1291
+ * Per-category default action, keyed by crawler category.
1292
+ */
1293
+ category_defaults?: {
1294
+ [key: string]: unknown;
1295
+ };
1296
+ };
1297
+ /**
1298
+ * Request body for `POST /v1/env` — a single project environment variable.
1299
+ * Fields are read by serde + utoipa; the 501-stub handlers ignore the body.
1300
+ */
1301
+ export type SetEnvBody = {
1302
+ key: string;
1303
+ value: string;
1304
+ /**
1305
+ * Store the value as a write-only secret (masked on read).
1306
+ */
1307
+ is_secret?: boolean | null;
665
1308
  };
666
1309
  export type ShieldAction = 'allow' | 'block' | 'rate_limit';
667
1310
  /**
@@ -685,6 +1328,44 @@ export type SignUpRequest = {
685
1328
  } | null;
686
1329
  captcha_token?: string | null;
687
1330
  };
1331
+ /**
1332
+ * One column of a SQL result set.
1333
+ */
1334
+ export type SqlColumnInfo = {
1335
+ /**
1336
+ * Column name.
1337
+ */
1338
+ name: string;
1339
+ /**
1340
+ * PostgreSQL type OID.
1341
+ */
1342
+ type_oid: number;
1343
+ /**
1344
+ * PostgreSQL type name.
1345
+ */
1346
+ type_name: string;
1347
+ };
1348
+ /**
1349
+ * Per-query resource cost breakdown.
1350
+ */
1351
+ export type SqlQueryCost = {
1352
+ /**
1353
+ * Compute time consumed, in milliseconds.
1354
+ */
1355
+ compute_ms: number;
1356
+ /**
1357
+ * Pages read to serve the query.
1358
+ */
1359
+ pages_read: number;
1360
+ /**
1361
+ * Bytes transferred to the client.
1362
+ */
1363
+ bytes_transferred: number;
1364
+ /**
1365
+ * Estimated cost in USD.
1366
+ */
1367
+ estimated_usd: number;
1368
+ };
688
1369
  /**
689
1370
  * A parameterized SQL query to execute against the tenant's database.
690
1371
  */
@@ -701,13 +1382,15 @@ export type SqlRequest = {
701
1382
  } | null;
702
1383
  };
703
1384
  /**
704
- * Result set returned by a SQL query.
1385
+ * Result set returned by a SQL query. Matches the wire shape produced by
1386
+ * `http.rs::SqlResponse` - `columns` entries are objects (name + Postgres
1387
+ * type), not bare strings.
705
1388
  */
706
1389
  export type SqlResponse = {
707
1390
  /**
708
- * Column names, in result order.
1391
+ * Result-set columns, in result order.
709
1392
  */
710
- columns: Array<string>;
1393
+ columns: Array<SqlColumnInfo>;
711
1394
  /**
712
1395
  * Rows; each row is an array of cell values aligned to `columns`.
713
1396
  */
@@ -718,10 +1401,18 @@ export type SqlResponse = {
718
1401
  * Number of rows returned (or affected).
719
1402
  */
720
1403
  row_count: number;
1404
+ /**
1405
+ * The SQL command tag (e.g. `SELECT`, `INSERT`).
1406
+ */
1407
+ command: string;
721
1408
  /**
722
1409
  * Server-side execution time in milliseconds.
723
1410
  */
724
1411
  duration_ms: number;
1412
+ /**
1413
+ * Resource cost of this query.
1414
+ */
1415
+ cost: SqlQueryCost;
725
1416
  };
726
1417
  /**
727
1418
  * Response for `GET /v1/user/stats`.
@@ -1503,6 +2194,10 @@ export type RestorePitrErrors = {
1503
2194
  * Missing or invalid API key
1504
2195
  */
1505
2196
  401: ErrorResponse;
2197
+ /**
2198
+ * Recovery target is beyond the archived WAL — retry with an earlier target, or omit the target to restore the latest recoverable point
2199
+ */
2200
+ 409: ErrorResponse;
1506
2201
  /**
1507
2202
  * Internal error
1508
2203
  */
@@ -1565,6 +2260,55 @@ export type RealtimeWebsocketErrors = {
1565
2260
  500: ErrorResponse;
1566
2261
  };
1567
2262
  export type RealtimeWebsocketError = RealtimeWebsocketErrors[keyof RealtimeWebsocketErrors];
2263
+ export type BranchTimelineData = {
2264
+ body: BranchTimelineRequest;
2265
+ path: {
2266
+ /**
2267
+ * Tenant id (UUID)
2268
+ */
2269
+ tenant_id: string;
2270
+ /**
2271
+ * Parent timeline id (UUID), or `main` for the primary timeline
2272
+ */
2273
+ timeline_id: string;
2274
+ };
2275
+ query?: never;
2276
+ url: '/api/v1/tenants/{tenant_id}/timelines/{timeline_id}/branch';
2277
+ };
2278
+ export type BranchTimelineErrors = {
2279
+ /**
2280
+ * Invalid tenant, timeline, or new_timeline_id
2281
+ */
2282
+ 400: ErrorResponse;
2283
+ /**
2284
+ * Missing or invalid API key
2285
+ */
2286
+ 401: ErrorResponse;
2287
+ /**
2288
+ * Branch LSN is beyond the archived WAL
2289
+ */
2290
+ 409: ErrorResponse;
2291
+ /**
2292
+ * Internal error
2293
+ */
2294
+ 500: ErrorResponse;
2295
+ /**
2296
+ * Durability is not configured for this deployment
2297
+ */
2298
+ 501: ErrorResponse;
2299
+ /**
2300
+ * No compute capacity for the branch worker
2301
+ */
2302
+ 503: ErrorResponse;
2303
+ };
2304
+ export type BranchTimelineError = BranchTimelineErrors[keyof BranchTimelineErrors];
2305
+ export type BranchTimelineResponses = {
2306
+ /**
2307
+ * Branch created and routed
2308
+ */
2309
+ 201: BranchTimelineResponse;
2310
+ };
2311
+ export type BranchTimelineResponse2 = BranchTimelineResponses[keyof BranchTimelineResponses];
1568
2312
  export type BatchUpsertVectorsData = {
1569
2313
  body: VectorUpsertRequest;
1570
2314
  path: {
@@ -3408,12 +4152,7 @@ export type ListBuildsResponses = {
3408
4152
  200: unknown;
3409
4153
  };
3410
4154
  export type CreateBuildData = {
3411
- /**
3412
- * Create-build request
3413
- */
3414
- body: {
3415
- [key: string]: unknown;
3416
- };
4155
+ body: BuildCreateRequest;
3417
4156
  path?: never;
3418
4157
  query?: never;
3419
4158
  url: '/v1/build';
@@ -3435,6 +4174,53 @@ export type CreateBuildResponses = {
3435
4174
  */
3436
4175
  200: unknown;
3437
4176
  };
4177
+ export type UploadBuildData = {
4178
+ /**
4179
+ * Gzipped tarball of the source tree
4180
+ */
4181
+ body: string;
4182
+ path?: never;
4183
+ query?: {
4184
+ /**
4185
+ * Tag for the resulting image. Auto-generated if omitted.
4186
+ */
4187
+ image_tag?: string;
4188
+ /**
4189
+ * Path to the Dockerfile within the uploaded tree. Auto-detected if omitted.
4190
+ */
4191
+ dockerfile_path?: string;
4192
+ /**
4193
+ * Build-time ARGs as a url-encoded JSON object, e.g. {"VITE_API_URL":"https://api.example.com"}
4194
+ */
4195
+ build_args?: string;
4196
+ /**
4197
+ * Build timeout in seconds. Default 600, maximum 3600.
4198
+ */
4199
+ timeout_seconds?: number;
4200
+ };
4201
+ url: '/v1/build/upload';
4202
+ };
4203
+ export type UploadBuildErrors = {
4204
+ /**
4205
+ * Body is empty, not a gzipped tarball, too large, or build_args is malformed
4206
+ */
4207
+ 400: ErrorResponse;
4208
+ /**
4209
+ * Missing or invalid API key
4210
+ */
4211
+ 401: ErrorResponse;
4212
+ /**
4213
+ * Internal error
4214
+ */
4215
+ 500: ErrorResponse;
4216
+ };
4217
+ export type UploadBuildError = UploadBuildErrors[keyof UploadBuildErrors];
4218
+ export type UploadBuildResponses = {
4219
+ /**
4220
+ * Build started
4221
+ */
4222
+ 201: unknown;
4223
+ };
3438
4224
  export type GetBuildData = {
3439
4225
  body?: never;
3440
4226
  path: {
@@ -4030,41 +4816,367 @@ export type ListDeploymentVersionsResponses = {
4030
4816
  */
4031
4817
  200: unknown;
4032
4818
  };
4033
- export type ListCronSchedulesData = {
4819
+ export type ComputerListData = {
4034
4820
  body?: never;
4035
4821
  path?: never;
4036
4822
  query?: never;
4037
- url: '/v1/cron/schedules';
4823
+ url: '/v1/computers';
4038
4824
  };
4039
- export type ListCronSchedulesErrors = {
4825
+ export type ComputerListErrors = {
4040
4826
  /**
4041
4827
  * Missing or invalid API key
4042
4828
  */
4043
4829
  401: ErrorResponse;
4044
- /**
4045
- * Internal error
4046
- */
4047
- 500: ErrorResponse;
4048
4830
  };
4049
- export type ListCronSchedulesError = ListCronSchedulesErrors[keyof ListCronSchedulesErrors];
4050
- export type ListCronSchedulesResponses = {
4831
+ export type ComputerListError = ComputerListErrors[keyof ComputerListErrors];
4832
+ export type ComputerListResponses = {
4051
4833
  /**
4052
- * Schedule list
4834
+ * Your Computers, newest first
4053
4835
  */
4054
- 200: unknown;
4836
+ 200: Array<ComputerInfo>;
4055
4837
  };
4056
- export type CreateCronScheduleData = {
4057
- /**
4058
- * Create-schedule request
4059
- */
4060
- body: {
4061
- [key: string]: unknown;
4062
- };
4838
+ export type ComputerListResponse = ComputerListResponses[keyof ComputerListResponses];
4839
+ export type ComputerCreateData = {
4840
+ body: ComputerCreateRequest;
4063
4841
  path?: never;
4064
4842
  query?: never;
4065
- url: '/v1/cron/schedules';
4843
+ url: '/v1/computers';
4066
4844
  };
4067
- export type CreateCronScheduleErrors = {
4845
+ export type ComputerCreateErrors = {
4846
+ /**
4847
+ * Invalid name or resource shape
4848
+ */
4849
+ 400: ErrorResponse;
4850
+ /**
4851
+ * Missing or invalid API key
4852
+ */
4853
+ 401: ErrorResponse;
4854
+ /**
4855
+ * Credit exhausted or plan limit reached
4856
+ */
4857
+ 402: ErrorResponse;
4858
+ /**
4859
+ * A Computer with that name already exists
4860
+ */
4861
+ 409: ErrorResponse;
4862
+ /**
4863
+ * No host has capacity for the requested resources
4864
+ */
4865
+ 503: ErrorResponse;
4866
+ };
4867
+ export type ComputerCreateError = ComputerCreateErrors[keyof ComputerCreateErrors];
4868
+ export type ComputerCreateResponses = {
4869
+ /**
4870
+ * Computer created (initially CREATING)
4871
+ */
4872
+ 201: ComputerInfo;
4873
+ };
4874
+ export type ComputerCreateResponse = ComputerCreateResponses[keyof ComputerCreateResponses];
4875
+ export type ComputerGetOrCreateByNameData = {
4876
+ body: ComputerCreateRequest;
4877
+ path: {
4878
+ /**
4879
+ * Lowercase DNS label, max 63 characters
4880
+ */
4881
+ name: string;
4882
+ };
4883
+ query?: never;
4884
+ url: '/v1/computers/by-name/{name}';
4885
+ };
4886
+ export type ComputerGetOrCreateByNameErrors = {
4887
+ /**
4888
+ * Invalid name or resource shape
4889
+ */
4890
+ 400: ErrorResponse;
4891
+ /**
4892
+ * No host has capacity for the requested resources
4893
+ */
4894
+ 503: ErrorResponse;
4895
+ };
4896
+ export type ComputerGetOrCreateByNameError = ComputerGetOrCreateByNameErrors[keyof ComputerGetOrCreateByNameErrors];
4897
+ export type ComputerGetOrCreateByNameResponses = {
4898
+ /**
4899
+ * The existing Computer
4900
+ */
4901
+ 200: ComputerInfo;
4902
+ /**
4903
+ * Computer created
4904
+ */
4905
+ 201: ComputerInfo;
4906
+ };
4907
+ export type ComputerGetOrCreateByNameResponse = ComputerGetOrCreateByNameResponses[keyof ComputerGetOrCreateByNameResponses];
4908
+ export type ComputerDeleteData = {
4909
+ body?: never;
4910
+ path: {
4911
+ /**
4912
+ * Computer id
4913
+ */
4914
+ id: string;
4915
+ };
4916
+ query?: never;
4917
+ url: '/v1/computers/{id}';
4918
+ };
4919
+ export type ComputerDeleteErrors = {
4920
+ /**
4921
+ * Not found
4922
+ */
4923
+ 404: ErrorResponse;
4924
+ };
4925
+ export type ComputerDeleteError = ComputerDeleteErrors[keyof ComputerDeleteErrors];
4926
+ export type ComputerDeleteResponses = {
4927
+ /**
4928
+ * Computer and its disk deleted
4929
+ */
4930
+ 204: void;
4931
+ };
4932
+ export type ComputerDeleteResponse = ComputerDeleteResponses[keyof ComputerDeleteResponses];
4933
+ export type ComputerGetData = {
4934
+ body?: never;
4935
+ path: {
4936
+ /**
4937
+ * Computer id
4938
+ */
4939
+ id: string;
4940
+ };
4941
+ query?: never;
4942
+ url: '/v1/computers/{id}';
4943
+ };
4944
+ export type ComputerGetErrors = {
4945
+ /**
4946
+ * Not found
4947
+ */
4948
+ 404: ErrorResponse;
4949
+ };
4950
+ export type ComputerGetError = ComputerGetErrors[keyof ComputerGetErrors];
4951
+ export type ComputerGetResponses = {
4952
+ /**
4953
+ * The Computer
4954
+ */
4955
+ 200: ComputerInfo;
4956
+ };
4957
+ export type ComputerGetResponse = ComputerGetResponses[keyof ComputerGetResponses];
4958
+ export type ComputerExecData = {
4959
+ body: ComputerExecRequest;
4960
+ path: {
4961
+ /**
4962
+ * Computer id
4963
+ */
4964
+ id: string;
4965
+ };
4966
+ query?: never;
4967
+ url: '/v1/computers/{id}/exec';
4968
+ };
4969
+ export type ComputerExecErrors = {
4970
+ /**
4971
+ * Not found
4972
+ */
4973
+ 404: ErrorResponse;
4974
+ /**
4975
+ * The Computer is not RUNNING
4976
+ */
4977
+ 409: ErrorResponse;
4978
+ };
4979
+ export type ComputerExecError = ComputerExecErrors[keyof ComputerExecErrors];
4980
+ export type ComputerExecResponses = {
4981
+ /**
4982
+ * Command finished
4983
+ */
4984
+ 200: ComputerExecResult;
4985
+ };
4986
+ export type ComputerExecResponse = ComputerExecResponses[keyof ComputerExecResponses];
4987
+ export type ComputerReadFileData = {
4988
+ body?: never;
4989
+ path: {
4990
+ /**
4991
+ * Computer id
4992
+ */
4993
+ id: string;
4994
+ };
4995
+ query: {
4996
+ /**
4997
+ * Absolute path inside the guest
4998
+ */
4999
+ path: string;
5000
+ };
5001
+ url: '/v1/computers/{id}/files';
5002
+ };
5003
+ export type ComputerReadFileErrors = {
5004
+ /**
5005
+ * Missing `path` query parameter
5006
+ */
5007
+ 400: ErrorResponse;
5008
+ /**
5009
+ * Not found
5010
+ */
5011
+ 404: ErrorResponse;
5012
+ /**
5013
+ * The Computer is not RUNNING
5014
+ */
5015
+ 409: ErrorResponse;
5016
+ };
5017
+ export type ComputerReadFileError = ComputerReadFileErrors[keyof ComputerReadFileErrors];
5018
+ export type ComputerReadFileResponses = {
5019
+ /**
5020
+ * File contents, base64-encoded
5021
+ */
5022
+ 200: ComputerFileRead;
5023
+ };
5024
+ export type ComputerReadFileResponse = ComputerReadFileResponses[keyof ComputerReadFileResponses];
5025
+ export type ComputerWriteFilesData = {
5026
+ body: ComputerWriteFilesRequest;
5027
+ path: {
5028
+ /**
5029
+ * Computer id
5030
+ */
5031
+ id: string;
5032
+ };
5033
+ query?: never;
5034
+ url: '/v1/computers/{id}/files';
5035
+ };
5036
+ export type ComputerWriteFilesErrors = {
5037
+ /**
5038
+ * No files, or more than 64
5039
+ */
5040
+ 400: ErrorResponse;
5041
+ /**
5042
+ * Not found
5043
+ */
5044
+ 404: ErrorResponse;
5045
+ /**
5046
+ * The Computer is not RUNNING
5047
+ */
5048
+ 409: ErrorResponse;
5049
+ };
5050
+ export type ComputerWriteFilesError = ComputerWriteFilesErrors[keyof ComputerWriteFilesErrors];
5051
+ export type ComputerWriteFilesResponses = {
5052
+ /**
5053
+ * Files written
5054
+ */
5055
+ 204: void;
5056
+ };
5057
+ export type ComputerWriteFilesResponse = ComputerWriteFilesResponses[keyof ComputerWriteFilesResponses];
5058
+ export type ComputerSetSshKeysData = {
5059
+ body: ComputerSshKeysRequest;
5060
+ path: {
5061
+ /**
5062
+ * Computer id
5063
+ */
5064
+ id: string;
5065
+ };
5066
+ query?: never;
5067
+ url: '/v1/computers/{id}/ssh-keys';
5068
+ };
5069
+ export type ComputerSetSshKeysErrors = {
5070
+ /**
5071
+ * Not an OpenSSH public key, or more than 32
5072
+ */
5073
+ 400: ErrorResponse;
5074
+ /**
5075
+ * Not found
5076
+ */
5077
+ 404: ErrorResponse;
5078
+ /**
5079
+ * The keys could not be delivered to the running machine
5080
+ */
5081
+ 502: ErrorResponse;
5082
+ };
5083
+ export type ComputerSetSshKeysError = ComputerSetSshKeysErrors[keyof ComputerSetSshKeysErrors];
5084
+ export type ComputerSetSshKeysResponses = {
5085
+ /**
5086
+ * The Computer, with the new key list
5087
+ */
5088
+ 200: ComputerInfo;
5089
+ };
5090
+ export type ComputerSetSshKeysResponse = ComputerSetSshKeysResponses[keyof ComputerSetSshKeysResponses];
5091
+ export type ComputerStartData = {
5092
+ body?: never;
5093
+ path: {
5094
+ /**
5095
+ * Computer id
5096
+ */
5097
+ id: string;
5098
+ };
5099
+ query?: never;
5100
+ url: '/v1/computers/{id}/start';
5101
+ };
5102
+ export type ComputerStartErrors = {
5103
+ /**
5104
+ * Not found
5105
+ */
5106
+ 404: ErrorResponse;
5107
+ /**
5108
+ * The Computer's host is unavailable
5109
+ */
5110
+ 503: ErrorResponse;
5111
+ };
5112
+ export type ComputerStartError = ComputerStartErrors[keyof ComputerStartErrors];
5113
+ export type ComputerStartResponses = {
5114
+ /**
5115
+ * The Computer, now RUNNING
5116
+ */
5117
+ 200: ComputerInfo;
5118
+ };
5119
+ export type ComputerStartResponse = ComputerStartResponses[keyof ComputerStartResponses];
5120
+ export type ComputerStopData = {
5121
+ body?: never;
5122
+ path: {
5123
+ /**
5124
+ * Computer id
5125
+ */
5126
+ id: string;
5127
+ };
5128
+ query?: never;
5129
+ url: '/v1/computers/{id}/stop';
5130
+ };
5131
+ export type ComputerStopErrors = {
5132
+ /**
5133
+ * Not found
5134
+ */
5135
+ 404: ErrorResponse;
5136
+ };
5137
+ export type ComputerStopError = ComputerStopErrors[keyof ComputerStopErrors];
5138
+ export type ComputerStopResponses = {
5139
+ /**
5140
+ * The Computer, now STOPPED
5141
+ */
5142
+ 200: ComputerInfo;
5143
+ };
5144
+ export type ComputerStopResponse = ComputerStopResponses[keyof ComputerStopResponses];
5145
+ export type ListCronSchedulesData = {
5146
+ body?: never;
5147
+ path?: never;
5148
+ query?: never;
5149
+ url: '/v1/cron/schedules';
5150
+ };
5151
+ export type ListCronSchedulesErrors = {
5152
+ /**
5153
+ * Missing or invalid API key
5154
+ */
5155
+ 401: ErrorResponse;
5156
+ /**
5157
+ * Internal error
5158
+ */
5159
+ 500: ErrorResponse;
5160
+ };
5161
+ export type ListCronSchedulesError = ListCronSchedulesErrors[keyof ListCronSchedulesErrors];
5162
+ export type ListCronSchedulesResponses = {
5163
+ /**
5164
+ * Schedule list
5165
+ */
5166
+ 200: unknown;
5167
+ };
5168
+ export type CreateCronScheduleData = {
5169
+ /**
5170
+ * Create-schedule request
5171
+ */
5172
+ body: {
5173
+ [key: string]: unknown;
5174
+ };
5175
+ path?: never;
5176
+ query?: never;
5177
+ url: '/v1/cron/schedules';
5178
+ };
5179
+ export type CreateCronScheduleErrors = {
4068
5180
  /**
4069
5181
  * Missing or invalid API key
4070
5182
  */
@@ -4226,202 +5338,898 @@ export type TriggerCronScheduleResponses = {
4226
5338
  */
4227
5339
  200: unknown;
4228
5340
  };
4229
- export type ListDomainsData = {
5341
+ export type ListDatabasesData = {
4230
5342
  body?: never;
4231
5343
  path?: never;
5344
+ query?: {
5345
+ /**
5346
+ * Also return soft-deleted databases restorable within the grace window
5347
+ */
5348
+ include_deleted?: boolean;
5349
+ };
5350
+ url: '/v1/databases';
5351
+ };
5352
+ export type ListDatabasesErrors = {
5353
+ /**
5354
+ * Missing or invalid API key
5355
+ */
5356
+ 401: ErrorResponse;
5357
+ };
5358
+ export type ListDatabasesError = ListDatabasesErrors[keyof ListDatabasesErrors];
5359
+ export type ListDatabasesResponses = {
5360
+ /**
5361
+ * Databases in the project
5362
+ */
5363
+ 200: ListDatabasesResponse;
5364
+ };
5365
+ export type ListDatabasesResponse2 = ListDatabasesResponses[keyof ListDatabasesResponses];
5366
+ export type CreateDatabaseData = {
5367
+ body: CreateDatabaseRequest;
5368
+ path?: never;
4232
5369
  query?: never;
4233
- url: '/v1/domains';
5370
+ url: '/v1/databases';
4234
5371
  };
4235
- export type ListDomainsErrors = {
5372
+ export type CreateDatabaseErrors = {
4236
5373
  /**
4237
- * Missing or invalid credentials
5374
+ * Invalid name, isolation, or pg_version (message lists the supported versions)
5375
+ */
5376
+ 400: ErrorResponse;
5377
+ /**
5378
+ * Missing or invalid API key
4238
5379
  */
4239
5380
  401: ErrorResponse;
4240
5381
  /**
4241
- * Internal error
5382
+ * A database with this name already exists in the org
4242
5383
  */
4243
- 500: ErrorResponse;
5384
+ 409: ErrorResponse;
5385
+ /**
5386
+ * Dedicated tier not provisionable on this deployment
5387
+ */
5388
+ 501: ErrorResponse;
4244
5389
  };
4245
- export type ListDomainsError = ListDomainsErrors[keyof ListDomainsErrors];
4246
- export type ListDomainsResponses = {
5390
+ export type CreateDatabaseError = CreateDatabaseErrors[keyof CreateDatabaseErrors];
5391
+ export type CreateDatabaseResponses = {
4247
5392
  /**
4248
- * All custom domains for the caller's project
5393
+ * Database created
4249
5394
  */
4250
- 200: ListDomainsResponse;
5395
+ 201: CreateDatabaseResponse;
4251
5396
  };
4252
- export type ListDomainsResponse2 = ListDomainsResponses[keyof ListDomainsResponses];
4253
- export type AddDomainData = {
4254
- body: AddDomainBody;
5397
+ export type CreateDatabaseResponse2 = CreateDatabaseResponses[keyof CreateDatabaseResponses];
5398
+ export type ProvisionDatabaseData = {
5399
+ body?: never;
5400
+ path?: never;
5401
+ query?: never;
5402
+ url: '/v1/databases/provision';
5403
+ };
5404
+ export type ProvisionDatabaseErrors = {
5405
+ /**
5406
+ * Missing or invalid API key
5407
+ */
5408
+ 401: ErrorResponse;
5409
+ };
5410
+ export type ProvisionDatabaseError = ProvisionDatabaseErrors[keyof ProvisionDatabaseErrors];
5411
+ export type ProvisionDatabaseResponses = {
5412
+ /**
5413
+ * Connection info for the project's default database
5414
+ */
5415
+ 200: unknown;
5416
+ };
5417
+ export type DeleteDatabaseData = {
5418
+ body?: never;
5419
+ path: {
5420
+ /**
5421
+ * Database id
5422
+ */
5423
+ id: string;
5424
+ };
5425
+ query?: never;
5426
+ url: '/v1/databases/{id}';
5427
+ };
5428
+ export type DeleteDatabaseErrors = {
5429
+ /**
5430
+ * Missing or invalid API key
5431
+ */
5432
+ 401: ErrorResponse;
5433
+ /**
5434
+ * Database not found
5435
+ */
5436
+ 404: ErrorResponse;
5437
+ };
5438
+ export type DeleteDatabaseError = DeleteDatabaseErrors[keyof DeleteDatabaseErrors];
5439
+ export type DeleteDatabaseResponses = {
5440
+ /**
5441
+ * Database scheduled for deletion
5442
+ */
5443
+ 200: unknown;
5444
+ };
5445
+ export type GetDatabaseData = {
5446
+ body?: never;
5447
+ path: {
5448
+ /**
5449
+ * Database id
5450
+ */
5451
+ id: string;
5452
+ };
5453
+ query?: never;
5454
+ url: '/v1/databases/{id}';
5455
+ };
5456
+ export type GetDatabaseErrors = {
5457
+ /**
5458
+ * Missing or invalid API key
5459
+ */
5460
+ 401: ErrorResponse;
5461
+ /**
5462
+ * Database not found
5463
+ */
5464
+ 404: ErrorResponse;
5465
+ };
5466
+ export type GetDatabaseError = GetDatabaseErrors[keyof GetDatabaseErrors];
5467
+ export type GetDatabaseResponses = {
5468
+ /**
5469
+ * The database
5470
+ */
5471
+ 200: DatabaseJson;
5472
+ };
5473
+ export type GetDatabaseResponse = GetDatabaseResponses[keyof GetDatabaseResponses];
5474
+ export type RestoreDatabaseData = {
5475
+ body?: never;
5476
+ path: {
5477
+ /**
5478
+ * Database id
5479
+ */
5480
+ id: string;
5481
+ };
5482
+ query?: never;
5483
+ url: '/v1/databases/{id}/restore';
5484
+ };
5485
+ export type RestoreDatabaseErrors = {
5486
+ /**
5487
+ * Missing or invalid API key
5488
+ */
5489
+ 401: ErrorResponse;
5490
+ /**
5491
+ * Database not found or past the grace window
5492
+ */
5493
+ 404: ErrorResponse;
5494
+ };
5495
+ export type RestoreDatabaseError = RestoreDatabaseErrors[keyof RestoreDatabaseErrors];
5496
+ export type RestoreDatabaseResponses = {
5497
+ /**
5498
+ * Database restored to active
5499
+ */
5500
+ 200: unknown;
5501
+ };
5502
+ export type ListDomainsData = {
5503
+ body?: never;
5504
+ path?: never;
5505
+ query?: never;
5506
+ url: '/v1/domains';
5507
+ };
5508
+ export type ListDomainsErrors = {
5509
+ /**
5510
+ * Missing or invalid credentials
5511
+ */
5512
+ 401: ErrorResponse;
5513
+ /**
5514
+ * Internal error
5515
+ */
5516
+ 500: ErrorResponse;
5517
+ };
5518
+ export type ListDomainsError = ListDomainsErrors[keyof ListDomainsErrors];
5519
+ export type ListDomainsResponses = {
5520
+ /**
5521
+ * All custom domains for the caller's project
5522
+ */
5523
+ 200: ListDomainsResponse;
5524
+ };
5525
+ export type ListDomainsResponse2 = ListDomainsResponses[keyof ListDomainsResponses];
5526
+ export type AddDomainData = {
5527
+ body: AddDomainBody;
5528
+ path?: never;
5529
+ query?: never;
5530
+ url: '/v1/domains';
5531
+ };
5532
+ export type AddDomainErrors = {
5533
+ /**
5534
+ * Invalid or platform-reserved domain
5535
+ */
5536
+ 400: ErrorResponse;
5537
+ /**
5538
+ * Missing or invalid credentials
5539
+ */
5540
+ 401: ErrorResponse;
5541
+ /**
5542
+ * Domain already registered
5543
+ */
5544
+ 409: ErrorResponse;
5545
+ /**
5546
+ * Internal error
5547
+ */
5548
+ 500: ErrorResponse;
5549
+ };
5550
+ export type AddDomainError = AddDomainErrors[keyof AddDomainErrors];
5551
+ export type AddDomainResponses = {
5552
+ /**
5553
+ * Domain registered; returns DNS setup instructions
5554
+ */
5555
+ 201: AddDomainResponse;
5556
+ };
5557
+ export type AddDomainResponse2 = AddDomainResponses[keyof AddDomainResponses];
5558
+ export type DeleteDomainData = {
5559
+ body?: never;
5560
+ path: {
5561
+ /**
5562
+ * Domain id
5563
+ */
5564
+ id: string;
5565
+ };
5566
+ query?: never;
5567
+ url: '/v1/domains/{id}';
5568
+ };
5569
+ export type DeleteDomainErrors = {
5570
+ /**
5571
+ * Missing or invalid credentials
5572
+ */
5573
+ 401: ErrorResponse;
5574
+ /**
5575
+ * Domain not found
5576
+ */
5577
+ 404: ErrorResponse;
5578
+ /**
5579
+ * Internal error
5580
+ */
5581
+ 500: ErrorResponse;
5582
+ };
5583
+ export type DeleteDomainError = DeleteDomainErrors[keyof DeleteDomainErrors];
5584
+ export type DeleteDomainResponses = {
5585
+ /**
5586
+ * Domain removed
5587
+ */
5588
+ 204: void;
5589
+ };
5590
+ export type DeleteDomainResponse = DeleteDomainResponses[keyof DeleteDomainResponses];
5591
+ export type GetDomainData = {
5592
+ body?: never;
5593
+ path: {
5594
+ /**
5595
+ * Domain id
5596
+ */
5597
+ id: string;
5598
+ };
5599
+ query?: never;
5600
+ url: '/v1/domains/{id}';
5601
+ };
5602
+ export type GetDomainErrors = {
5603
+ /**
5604
+ * Missing or invalid credentials
5605
+ */
5606
+ 401: ErrorResponse;
5607
+ /**
5608
+ * Domain not found
5609
+ */
5610
+ 404: ErrorResponse;
5611
+ /**
5612
+ * Internal error
5613
+ */
5614
+ 500: ErrorResponse;
5615
+ };
5616
+ export type GetDomainError = GetDomainErrors[keyof GetDomainErrors];
5617
+ export type GetDomainResponses = {
5618
+ /**
5619
+ * The domain
5620
+ */
5621
+ 200: DomainJson;
5622
+ };
5623
+ export type GetDomainResponse = GetDomainResponses[keyof GetDomainResponses];
5624
+ export type ProvisionDomainSslData = {
5625
+ body?: never;
5626
+ path: {
5627
+ /**
5628
+ * Domain id
5629
+ */
5630
+ id: string;
5631
+ };
5632
+ query?: never;
5633
+ url: '/v1/domains/{id}/ssl';
5634
+ };
5635
+ export type ProvisionDomainSslErrors = {
5636
+ /**
5637
+ * Domain not verified yet
5638
+ */
5639
+ 400: ErrorResponse;
5640
+ /**
5641
+ * Missing or invalid credentials
5642
+ */
5643
+ 401: ErrorResponse;
5644
+ /**
5645
+ * Domain not found
5646
+ */
5647
+ 404: ErrorResponse;
5648
+ /**
5649
+ * Internal error
5650
+ */
5651
+ 500: ErrorResponse;
5652
+ /**
5653
+ * Automatic SSL not configured on this deployment
5654
+ */
5655
+ 501: ErrorResponse;
5656
+ };
5657
+ export type ProvisionDomainSslError = ProvisionDomainSslErrors[keyof ProvisionDomainSslErrors];
5658
+ export type ProvisionDomainSslResponses = {
5659
+ /**
5660
+ * SSL provisioning started
5661
+ */
5662
+ 200: ProvisionSslResponse;
5663
+ };
5664
+ export type ProvisionDomainSslResponse = ProvisionDomainSslResponses[keyof ProvisionDomainSslResponses];
5665
+ export type VerifyDomainData = {
5666
+ body?: never;
5667
+ path: {
5668
+ /**
5669
+ * Domain id
5670
+ */
5671
+ id: string;
5672
+ };
5673
+ query?: never;
5674
+ url: '/v1/domains/{id}/verify';
5675
+ };
5676
+ export type VerifyDomainErrors = {
5677
+ /**
5678
+ * Missing or invalid credentials
5679
+ */
5680
+ 401: ErrorResponse;
5681
+ /**
5682
+ * Domain not found
5683
+ */
5684
+ 404: ErrorResponse;
5685
+ /**
5686
+ * DNS lookup failed
5687
+ */
5688
+ 500: ErrorResponse;
5689
+ };
5690
+ export type VerifyDomainError = VerifyDomainErrors[keyof VerifyDomainErrors];
5691
+ export type VerifyDomainResponses = {
5692
+ /**
5693
+ * DNS verification result
5694
+ */
5695
+ 200: VerifyDomainResponse;
5696
+ };
5697
+ export type VerifyDomainResponse2 = VerifyDomainResponses[keyof VerifyDomainResponses];
5698
+ export type GetEmailCampaignAnalyticsData = {
5699
+ body?: never;
5700
+ path: {
5701
+ /**
5702
+ * Template to report on
5703
+ */
5704
+ template_name: string;
5705
+ };
5706
+ query?: never;
5707
+ url: '/v1/email/analytics/campaign/{template_name}';
5708
+ };
5709
+ export type GetEmailCampaignAnalyticsErrors = {
5710
+ /**
5711
+ * Missing or invalid API key
5712
+ */
5713
+ 401: ErrorResponse;
5714
+ /**
5715
+ * Missing email:read scope
5716
+ */
5717
+ 403: ErrorResponse;
5718
+ /**
5719
+ * Template not found
5720
+ */
5721
+ 404: ErrorResponse;
5722
+ /**
5723
+ * Internal error
5724
+ */
5725
+ 500: ErrorResponse;
5726
+ };
5727
+ export type GetEmailCampaignAnalyticsError = GetEmailCampaignAnalyticsErrors[keyof GetEmailCampaignAnalyticsErrors];
5728
+ export type GetEmailCampaignAnalyticsResponses = {
5729
+ /**
5730
+ * Campaign analytics
5731
+ */
5732
+ 200: unknown;
5733
+ };
5734
+ export type GetEmailAnalyticsSummaryData = {
5735
+ body?: never;
5736
+ path?: never;
5737
+ query?: never;
5738
+ url: '/v1/email/analytics/summary';
5739
+ };
5740
+ export type GetEmailAnalyticsSummaryErrors = {
5741
+ /**
5742
+ * Missing or invalid API key
5743
+ */
5744
+ 401: ErrorResponse;
5745
+ /**
5746
+ * Missing email:read scope
5747
+ */
5748
+ 403: ErrorResponse;
5749
+ /**
5750
+ * Internal error
5751
+ */
5752
+ 500: ErrorResponse;
5753
+ };
5754
+ export type GetEmailAnalyticsSummaryError = GetEmailAnalyticsSummaryErrors[keyof GetEmailAnalyticsSummaryErrors];
5755
+ export type GetEmailAnalyticsSummaryResponses = {
5756
+ /**
5757
+ * Analytics summary
5758
+ */
5759
+ 200: unknown;
5760
+ };
5761
+ export type ListEmailDomainsData = {
5762
+ body?: never;
5763
+ path?: never;
5764
+ query?: never;
5765
+ url: '/v1/email/domains';
5766
+ };
5767
+ export type ListEmailDomainsErrors = {
5768
+ /**
5769
+ * Missing or invalid API key
5770
+ */
5771
+ 401: ErrorResponse;
5772
+ /**
5773
+ * Missing email:read scope
5774
+ */
5775
+ 403: ErrorResponse;
5776
+ /**
5777
+ * Internal error
5778
+ */
5779
+ 500: ErrorResponse;
5780
+ };
5781
+ export type ListEmailDomainsError = ListEmailDomainsErrors[keyof ListEmailDomainsErrors];
5782
+ export type ListEmailDomainsResponses = {
5783
+ /**
5784
+ * Sending domains
5785
+ */
5786
+ 200: unknown;
5787
+ };
5788
+ export type AddEmailDomainData = {
5789
+ body: EmailAddDomainRequest;
5790
+ path?: never;
5791
+ query?: never;
5792
+ url: '/v1/email/domains';
5793
+ };
5794
+ export type AddEmailDomainErrors = {
5795
+ /**
5796
+ * Missing or invalid API key
5797
+ */
5798
+ 401: ErrorResponse;
5799
+ /**
5800
+ * Missing email:send scope
5801
+ */
5802
+ 403: ErrorResponse;
5803
+ /**
5804
+ * Domain already registered
5805
+ */
5806
+ 409: ErrorResponse;
5807
+ /**
5808
+ * Internal error
5809
+ */
5810
+ 500: ErrorResponse;
5811
+ };
5812
+ export type AddEmailDomainError = AddEmailDomainErrors[keyof AddEmailDomainErrors];
5813
+ export type AddEmailDomainResponses = {
5814
+ /**
5815
+ * Domain added
5816
+ */
5817
+ 200: EmailDomain;
5818
+ };
5819
+ export type AddEmailDomainResponse = AddEmailDomainResponses[keyof AddEmailDomainResponses];
5820
+ export type DeleteEmailDomainData = {
5821
+ body?: never;
5822
+ path: {
5823
+ /**
5824
+ * Domain id
5825
+ */
5826
+ id: string;
5827
+ };
5828
+ query?: never;
5829
+ url: '/v1/email/domains/{id}';
5830
+ };
5831
+ export type DeleteEmailDomainErrors = {
5832
+ /**
5833
+ * Missing or invalid API key
5834
+ */
5835
+ 401: ErrorResponse;
5836
+ /**
5837
+ * Missing email:send scope
5838
+ */
5839
+ 403: ErrorResponse;
5840
+ /**
5841
+ * Domain not found
5842
+ */
5843
+ 404: ErrorResponse;
5844
+ /**
5845
+ * Internal error
5846
+ */
5847
+ 500: ErrorResponse;
5848
+ };
5849
+ export type DeleteEmailDomainError = DeleteEmailDomainErrors[keyof DeleteEmailDomainErrors];
5850
+ export type DeleteEmailDomainResponses = {
5851
+ /**
5852
+ * Domain deleted
5853
+ */
5854
+ 200: unknown;
5855
+ };
5856
+ export type VerifyEmailDomainData = {
5857
+ body?: never;
5858
+ path: {
5859
+ /**
5860
+ * Domain id
5861
+ */
5862
+ id: string;
5863
+ };
5864
+ query?: never;
5865
+ url: '/v1/email/domains/{id}/verify';
5866
+ };
5867
+ export type VerifyEmailDomainErrors = {
5868
+ /**
5869
+ * Missing or invalid API key
5870
+ */
5871
+ 401: ErrorResponse;
5872
+ /**
5873
+ * Missing email:send scope
5874
+ */
5875
+ 403: ErrorResponse;
5876
+ /**
5877
+ * Domain not found
5878
+ */
5879
+ 404: ErrorResponse;
5880
+ /**
5881
+ * Internal error
5882
+ */
5883
+ 500: ErrorResponse;
5884
+ };
5885
+ export type VerifyEmailDomainError = VerifyEmailDomainErrors[keyof VerifyEmailDomainErrors];
5886
+ export type VerifyEmailDomainResponses = {
5887
+ /**
5888
+ * Verification result
5889
+ */
5890
+ 200: EmailDomain;
5891
+ };
5892
+ export type VerifyEmailDomainResponse = VerifyEmailDomainResponses[keyof VerifyEmailDomainResponses];
5893
+ export type ListEmailEventsData = {
5894
+ body?: never;
5895
+ path?: never;
5896
+ query?: never;
5897
+ url: '/v1/email/events';
5898
+ };
5899
+ export type ListEmailEventsErrors = {
5900
+ /**
5901
+ * Missing or invalid API key
5902
+ */
5903
+ 401: ErrorResponse;
5904
+ /**
5905
+ * Missing email:read scope
5906
+ */
5907
+ 403: ErrorResponse;
5908
+ /**
5909
+ * Internal error
5910
+ */
5911
+ 500: ErrorResponse;
5912
+ };
5913
+ export type ListEmailEventsError = ListEmailEventsErrors[keyof ListEmailEventsErrors];
5914
+ export type ListEmailEventsResponses = {
5915
+ /**
5916
+ * Delivery events
5917
+ */
5918
+ 200: unknown;
5919
+ };
5920
+ export type SendRawEmailData = {
5921
+ body: EmailSendRawRequest;
5922
+ path?: never;
5923
+ query?: never;
5924
+ url: '/v1/email/send/raw';
5925
+ };
5926
+ export type SendRawEmailErrors = {
5927
+ /**
5928
+ * Missing or invalid API key
5929
+ */
5930
+ 401: ErrorResponse;
5931
+ /**
5932
+ * Missing email:send scope
5933
+ */
5934
+ 403: ErrorResponse;
5935
+ /**
5936
+ * Internal error
5937
+ */
5938
+ 500: ErrorResponse;
5939
+ /**
5940
+ * Bring-your-own delivery is not enabled for this org
5941
+ */
5942
+ 503: ErrorResponse;
5943
+ };
5944
+ export type SendRawEmailError = SendRawEmailErrors[keyof SendRawEmailErrors];
5945
+ export type SendRawEmailResponses = {
5946
+ /**
5947
+ * Email accepted for delivery
5948
+ */
5949
+ 200: EmailSendResponse;
5950
+ };
5951
+ export type SendRawEmailResponse = SendRawEmailResponses[keyof SendRawEmailResponses];
5952
+ export type SendTransactionalEmailData = {
5953
+ body: EmailSendTxRequest;
5954
+ path?: never;
5955
+ query?: never;
5956
+ url: '/v1/email/send/tx';
5957
+ };
5958
+ export type SendTransactionalEmailErrors = {
5959
+ /**
5960
+ * Missing or invalid API key
5961
+ */
5962
+ 401: ErrorResponse;
5963
+ /**
5964
+ * Missing email:send scope
5965
+ */
5966
+ 403: ErrorResponse;
5967
+ /**
5968
+ * Internal error
5969
+ */
5970
+ 500: ErrorResponse;
5971
+ /**
5972
+ * Bring-your-own delivery is not enabled for this org
5973
+ */
5974
+ 503: ErrorResponse;
5975
+ };
5976
+ export type SendTransactionalEmailError = SendTransactionalEmailErrors[keyof SendTransactionalEmailErrors];
5977
+ export type SendTransactionalEmailResponses = {
5978
+ /**
5979
+ * Email accepted for delivery
5980
+ */
5981
+ 200: EmailSendResponse;
5982
+ };
5983
+ export type SendTransactionalEmailResponse = SendTransactionalEmailResponses[keyof SendTransactionalEmailResponses];
5984
+ export type GetEmailSettingsData = {
5985
+ body?: never;
5986
+ path?: never;
5987
+ query?: never;
5988
+ url: '/v1/email/settings';
5989
+ };
5990
+ export type GetEmailSettingsErrors = {
5991
+ /**
5992
+ * Missing or invalid API key
5993
+ */
5994
+ 401: ErrorResponse;
5995
+ /**
5996
+ * Missing email:read scope
5997
+ */
5998
+ 403: ErrorResponse;
5999
+ /**
6000
+ * Internal error
6001
+ */
6002
+ 500: ErrorResponse;
6003
+ };
6004
+ export type GetEmailSettingsError = GetEmailSettingsErrors[keyof GetEmailSettingsErrors];
6005
+ export type GetEmailSettingsResponses = {
6006
+ /**
6007
+ * Email settings
6008
+ */
6009
+ 200: unknown;
6010
+ };
6011
+ export type UpdateEmailSettingsData = {
6012
+ /**
6013
+ * Settings to apply
6014
+ */
6015
+ body: {
6016
+ [key: string]: unknown;
6017
+ };
6018
+ path?: never;
6019
+ query?: never;
6020
+ url: '/v1/email/settings';
6021
+ };
6022
+ export type UpdateEmailSettingsErrors = {
6023
+ /**
6024
+ * Missing or invalid API key
6025
+ */
6026
+ 401: ErrorResponse;
6027
+ /**
6028
+ * Missing email:send scope
6029
+ */
6030
+ 403: ErrorResponse;
6031
+ /**
6032
+ * Internal error
6033
+ */
6034
+ 500: ErrorResponse;
6035
+ };
6036
+ export type UpdateEmailSettingsError = UpdateEmailSettingsErrors[keyof UpdateEmailSettingsErrors];
6037
+ export type UpdateEmailSettingsResponses = {
6038
+ /**
6039
+ * Settings updated
6040
+ */
6041
+ 200: unknown;
6042
+ };
6043
+ export type GetEmailStatsData = {
6044
+ body?: never;
6045
+ path?: never;
6046
+ query?: never;
6047
+ url: '/v1/email/stats';
6048
+ };
6049
+ export type GetEmailStatsErrors = {
6050
+ /**
6051
+ * Missing or invalid API key
6052
+ */
6053
+ 401: ErrorResponse;
6054
+ /**
6055
+ * Missing email:read scope
6056
+ */
6057
+ 403: ErrorResponse;
6058
+ /**
6059
+ * Internal error
6060
+ */
6061
+ 500: ErrorResponse;
6062
+ };
6063
+ export type GetEmailStatsError = GetEmailStatsErrors[keyof GetEmailStatsErrors];
6064
+ export type GetEmailStatsResponses = {
6065
+ /**
6066
+ * Email stats
6067
+ */
6068
+ 200: unknown;
6069
+ };
6070
+ export type ListEmailSuppressionData = {
6071
+ body?: never;
4255
6072
  path?: never;
4256
6073
  query?: never;
4257
- url: '/v1/domains';
6074
+ url: '/v1/email/suppression';
4258
6075
  };
4259
- export type AddDomainErrors = {
4260
- /**
4261
- * Invalid or platform-reserved domain
4262
- */
4263
- 400: ErrorResponse;
6076
+ export type ListEmailSuppressionErrors = {
4264
6077
  /**
4265
- * Missing or invalid credentials
6078
+ * Missing or invalid API key
4266
6079
  */
4267
6080
  401: ErrorResponse;
4268
6081
  /**
4269
- * Domain already registered
6082
+ * Missing email:read scope
4270
6083
  */
4271
- 409: ErrorResponse;
6084
+ 403: ErrorResponse;
4272
6085
  /**
4273
6086
  * Internal error
4274
6087
  */
4275
6088
  500: ErrorResponse;
4276
6089
  };
4277
- export type AddDomainError = AddDomainErrors[keyof AddDomainErrors];
4278
- export type AddDomainResponses = {
6090
+ export type ListEmailSuppressionError = ListEmailSuppressionErrors[keyof ListEmailSuppressionErrors];
6091
+ export type ListEmailSuppressionResponses = {
4279
6092
  /**
4280
- * Domain registered; returns DNS setup instructions
6093
+ * Suppression list
4281
6094
  */
4282
- 201: AddDomainResponse;
6095
+ 200: unknown;
4283
6096
  };
4284
- export type AddDomainResponse2 = AddDomainResponses[keyof AddDomainResponses];
4285
- export type DeleteDomainData = {
6097
+ export type ListEmailTemplatesData = {
4286
6098
  body?: never;
4287
- path: {
4288
- /**
4289
- * Domain id
4290
- */
4291
- id: string;
4292
- };
6099
+ path?: never;
4293
6100
  query?: never;
4294
- url: '/v1/domains/{id}';
6101
+ url: '/v1/email/templates';
4295
6102
  };
4296
- export type DeleteDomainErrors = {
6103
+ export type ListEmailTemplatesErrors = {
4297
6104
  /**
4298
- * Missing or invalid credentials
6105
+ * Missing or invalid API key
4299
6106
  */
4300
6107
  401: ErrorResponse;
4301
6108
  /**
4302
- * Domain not found
6109
+ * Missing email:read scope
4303
6110
  */
4304
- 404: ErrorResponse;
6111
+ 403: ErrorResponse;
4305
6112
  /**
4306
6113
  * Internal error
4307
6114
  */
4308
6115
  500: ErrorResponse;
4309
6116
  };
4310
- export type DeleteDomainError = DeleteDomainErrors[keyof DeleteDomainErrors];
4311
- export type DeleteDomainResponses = {
6117
+ export type ListEmailTemplatesError = ListEmailTemplatesErrors[keyof ListEmailTemplatesErrors];
6118
+ export type ListEmailTemplatesResponses = {
4312
6119
  /**
4313
- * Domain removed
6120
+ * Templates
4314
6121
  */
4315
- 204: void;
6122
+ 200: unknown;
4316
6123
  };
4317
- export type DeleteDomainResponse = DeleteDomainResponses[keyof DeleteDomainResponses];
4318
- export type GetDomainData = {
4319
- body?: never;
4320
- path: {
4321
- /**
4322
- * Domain id
4323
- */
4324
- id: string;
6124
+ export type CreateEmailTemplateData = {
6125
+ /**
6126
+ * Template definition
6127
+ */
6128
+ body: {
6129
+ [key: string]: unknown;
4325
6130
  };
6131
+ path?: never;
4326
6132
  query?: never;
4327
- url: '/v1/domains/{id}';
6133
+ url: '/v1/email/templates';
4328
6134
  };
4329
- export type GetDomainErrors = {
6135
+ export type CreateEmailTemplateErrors = {
4330
6136
  /**
4331
- * Missing or invalid credentials
6137
+ * Missing or invalid API key
4332
6138
  */
4333
6139
  401: ErrorResponse;
4334
6140
  /**
4335
- * Domain not found
6141
+ * Missing email:write scope
4336
6142
  */
4337
- 404: ErrorResponse;
6143
+ 403: ErrorResponse;
4338
6144
  /**
4339
6145
  * Internal error
4340
6146
  */
4341
6147
  500: ErrorResponse;
4342
6148
  };
4343
- export type GetDomainError = GetDomainErrors[keyof GetDomainErrors];
4344
- export type GetDomainResponses = {
6149
+ export type CreateEmailTemplateError = CreateEmailTemplateErrors[keyof CreateEmailTemplateErrors];
6150
+ export type CreateEmailTemplateResponses = {
4345
6151
  /**
4346
- * The domain
6152
+ * Template created
4347
6153
  */
4348
- 200: DomainJson;
6154
+ 200: unknown;
4349
6155
  };
4350
- export type GetDomainResponse = GetDomainResponses[keyof GetDomainResponses];
4351
- export type ProvisionDomainSslData = {
6156
+ export type DeleteEmailTemplateData = {
4352
6157
  body?: never;
4353
6158
  path: {
4354
6159
  /**
4355
- * Domain id
6160
+ * Template id
4356
6161
  */
4357
6162
  id: string;
4358
6163
  };
4359
6164
  query?: never;
4360
- url: '/v1/domains/{id}/ssl';
6165
+ url: '/v1/email/templates/{id}';
4361
6166
  };
4362
- export type ProvisionDomainSslErrors = {
6167
+ export type DeleteEmailTemplateErrors = {
4363
6168
  /**
4364
- * Domain not verified yet
6169
+ * Missing or invalid API key
4365
6170
  */
4366
- 400: ErrorResponse;
6171
+ 401: ErrorResponse;
4367
6172
  /**
4368
- * Missing or invalid credentials
6173
+ * Missing email:write scope
4369
6174
  */
4370
- 401: ErrorResponse;
6175
+ 403: ErrorResponse;
4371
6176
  /**
4372
- * Domain not found
6177
+ * Template not found
4373
6178
  */
4374
6179
  404: ErrorResponse;
4375
6180
  /**
4376
6181
  * Internal error
4377
6182
  */
4378
6183
  500: ErrorResponse;
6184
+ };
6185
+ export type DeleteEmailTemplateError = DeleteEmailTemplateErrors[keyof DeleteEmailTemplateErrors];
6186
+ export type DeleteEmailTemplateResponses = {
4379
6187
  /**
4380
- * Automatic SSL not configured on this deployment
6188
+ * Template deleted
4381
6189
  */
4382
- 501: ErrorResponse;
6190
+ 200: unknown;
4383
6191
  };
4384
- export type ProvisionDomainSslError = ProvisionDomainSslErrors[keyof ProvisionDomainSslErrors];
4385
- export type ProvisionDomainSslResponses = {
6192
+ export type UpdateEmailTemplateData = {
4386
6193
  /**
4387
- * SSL provisioning started
6194
+ * Template definition
4388
6195
  */
4389
- 200: ProvisionSslResponse;
4390
- };
4391
- export type ProvisionDomainSslResponse = ProvisionDomainSslResponses[keyof ProvisionDomainSslResponses];
4392
- export type VerifyDomainData = {
4393
- body?: never;
6196
+ body: {
6197
+ [key: string]: unknown;
6198
+ };
4394
6199
  path: {
4395
6200
  /**
4396
- * Domain id
6201
+ * Template id
4397
6202
  */
4398
6203
  id: string;
4399
6204
  };
4400
6205
  query?: never;
4401
- url: '/v1/domains/{id}/verify';
6206
+ url: '/v1/email/templates/{id}';
4402
6207
  };
4403
- export type VerifyDomainErrors = {
6208
+ export type UpdateEmailTemplateErrors = {
4404
6209
  /**
4405
- * Missing or invalid credentials
6210
+ * Missing or invalid API key
4406
6211
  */
4407
6212
  401: ErrorResponse;
4408
6213
  /**
4409
- * Domain not found
6214
+ * Missing email:write scope
6215
+ */
6216
+ 403: ErrorResponse;
6217
+ /**
6218
+ * Template not found
4410
6219
  */
4411
6220
  404: ErrorResponse;
4412
6221
  /**
4413
- * DNS lookup failed
6222
+ * Internal error
4414
6223
  */
4415
6224
  500: ErrorResponse;
4416
6225
  };
4417
- export type VerifyDomainError = VerifyDomainErrors[keyof VerifyDomainErrors];
4418
- export type VerifyDomainResponses = {
6226
+ export type UpdateEmailTemplateError = UpdateEmailTemplateErrors[keyof UpdateEmailTemplateErrors];
6227
+ export type UpdateEmailTemplateResponses = {
4419
6228
  /**
4420
- * DNS verification result
6229
+ * Template updated
4421
6230
  */
4422
- 200: VerifyDomainResponse;
6231
+ 200: unknown;
4423
6232
  };
4424
- export type VerifyDomainResponse2 = VerifyDomainResponses[keyof VerifyDomainResponses];
4425
6233
  export type ListEnvVarsData = {
4426
6234
  body?: never;
4427
6235
  path?: never;
@@ -5993,12 +7801,7 @@ export type ListServicesResponses = {
5993
7801
  200: unknown;
5994
7802
  };
5995
7803
  export type CreateServiceData = {
5996
- /**
5997
- * Service deploy request
5998
- */
5999
- body: {
6000
- [key: string]: unknown;
6001
- };
7804
+ body: RunServiceDeployRequest;
6002
7805
  path?: never;
6003
7806
  query?: never;
6004
7807
  url: '/v1/run/services';
@@ -6077,12 +7880,7 @@ export type GetServiceResponses = {
6077
7880
  200: unknown;
6078
7881
  };
6079
7882
  export type UpdateServiceData = {
6080
- /**
6081
- * Service update (e.g. scale) request
6082
- */
6083
- body: {
6084
- [key: string]: unknown;
6085
- };
7883
+ body: RunServiceUpdateRequest;
6086
7884
  path: {
6087
7885
  /**
6088
7886
  * Service id
@@ -6226,6 +8024,232 @@ export type RollbackServiceResponses = {
6226
8024
  */
6227
8025
  200: unknown;
6228
8026
  };
8027
+ export type SandboxListData = {
8028
+ body?: never;
8029
+ path?: never;
8030
+ query?: never;
8031
+ url: '/v1/sandboxes';
8032
+ };
8033
+ export type SandboxListErrors = {
8034
+ /**
8035
+ * Missing or invalid API key
8036
+ */
8037
+ 401: ErrorResponse;
8038
+ };
8039
+ export type SandboxListError = SandboxListErrors[keyof SandboxListErrors];
8040
+ export type SandboxListResponses = {
8041
+ /**
8042
+ * `{sandboxes: [...], total}`
8043
+ */
8044
+ 200: unknown;
8045
+ };
8046
+ export type SandboxCreateData = {
8047
+ body: SandboxCreateRequest;
8048
+ path?: never;
8049
+ query?: never;
8050
+ url: '/v1/sandboxes';
8051
+ };
8052
+ export type SandboxCreateErrors = {
8053
+ /**
8054
+ * Missing or invalid API key
8055
+ */
8056
+ 401: ErrorResponse;
8057
+ /**
8058
+ * Credit exhausted or plan limit reached
8059
+ */
8060
+ 402: ErrorResponse;
8061
+ /**
8062
+ * No capacity for the requested resources
8063
+ */
8064
+ 503: ErrorResponse;
8065
+ };
8066
+ export type SandboxCreateError = SandboxCreateErrors[keyof SandboxCreateErrors];
8067
+ export type SandboxCreateResponses = {
8068
+ /**
8069
+ * Sandbox created (initially PROVISIONING)
8070
+ */
8071
+ 201: SandboxInfo;
8072
+ };
8073
+ export type SandboxCreateResponse = SandboxCreateResponses[keyof SandboxCreateResponses];
8074
+ export type SandboxDeleteData = {
8075
+ body?: never;
8076
+ path: {
8077
+ /**
8078
+ * Sandbox id
8079
+ */
8080
+ id: string;
8081
+ };
8082
+ query?: never;
8083
+ url: '/v1/sandboxes/{id}';
8084
+ };
8085
+ export type SandboxDeleteErrors = {
8086
+ /**
8087
+ * Not found
8088
+ */
8089
+ 404: ErrorResponse;
8090
+ };
8091
+ export type SandboxDeleteError = SandboxDeleteErrors[keyof SandboxDeleteErrors];
8092
+ export type SandboxDeleteResponses = {
8093
+ /**
8094
+ * Deleted
8095
+ */
8096
+ 204: void;
8097
+ };
8098
+ export type SandboxDeleteResponse = SandboxDeleteResponses[keyof SandboxDeleteResponses];
8099
+ export type SandboxGetData = {
8100
+ body?: never;
8101
+ path: {
8102
+ /**
8103
+ * Sandbox id
8104
+ */
8105
+ id: string;
8106
+ };
8107
+ query?: never;
8108
+ url: '/v1/sandboxes/{id}';
8109
+ };
8110
+ export type SandboxGetErrors = {
8111
+ /**
8112
+ * Not found
8113
+ */
8114
+ 404: ErrorResponse;
8115
+ };
8116
+ export type SandboxGetError = SandboxGetErrors[keyof SandboxGetErrors];
8117
+ export type SandboxGetResponses = {
8118
+ /**
8119
+ * Sandbox details
8120
+ */
8121
+ 200: SandboxInfo;
8122
+ };
8123
+ export type SandboxGetResponse = SandboxGetResponses[keyof SandboxGetResponses];
8124
+ export type SandboxRunCommandData = {
8125
+ body: SandboxCommandRequest;
8126
+ path: {
8127
+ /**
8128
+ * Sandbox id
8129
+ */
8130
+ id: string;
8131
+ };
8132
+ query?: never;
8133
+ url: '/v1/sandboxes/{id}/commands';
8134
+ };
8135
+ export type SandboxRunCommandErrors = {
8136
+ /**
8137
+ * Sandbox is not running
8138
+ */
8139
+ 400: ErrorResponse;
8140
+ /**
8141
+ * Not found
8142
+ */
8143
+ 404: ErrorResponse;
8144
+ };
8145
+ export type SandboxRunCommandError = SandboxRunCommandErrors[keyof SandboxRunCommandErrors];
8146
+ export type SandboxRunCommandResponses = {
8147
+ /**
8148
+ * Command result
8149
+ */
8150
+ 200: SandboxCommandResult;
8151
+ };
8152
+ export type SandboxRunCommandResponse = SandboxRunCommandResponses[keyof SandboxRunCommandResponses];
8153
+ export type SandboxExtendData = {
8154
+ body: SandboxExtendRequest;
8155
+ path: {
8156
+ /**
8157
+ * Sandbox id
8158
+ */
8159
+ id: string;
8160
+ };
8161
+ query?: never;
8162
+ url: '/v1/sandboxes/{id}/extend';
8163
+ };
8164
+ export type SandboxExtendErrors = {
8165
+ /**
8166
+ * Not found
8167
+ */
8168
+ 404: ErrorResponse;
8169
+ };
8170
+ export type SandboxExtendError = SandboxExtendErrors[keyof SandboxExtendErrors];
8171
+ export type SandboxExtendResponses = {
8172
+ /**
8173
+ * Updated sandbox
8174
+ */
8175
+ 200: SandboxInfo;
8176
+ };
8177
+ export type SandboxExtendResponse = SandboxExtendResponses[keyof SandboxExtendResponses];
8178
+ export type SandboxWriteFilesData = {
8179
+ body: SandboxWriteFilesRequest;
8180
+ path: {
8181
+ /**
8182
+ * Sandbox id
8183
+ */
8184
+ id: string;
8185
+ };
8186
+ query?: never;
8187
+ url: '/v1/sandboxes/{id}/files';
8188
+ };
8189
+ export type SandboxWriteFilesErrors = {
8190
+ /**
8191
+ * Not found
8192
+ */
8193
+ 404: ErrorResponse;
8194
+ /**
8195
+ * Path outside the allowed guest roots
8196
+ */
8197
+ 502: ErrorResponse;
8198
+ };
8199
+ export type SandboxWriteFilesError = SandboxWriteFilesErrors[keyof SandboxWriteFilesErrors];
8200
+ export type SandboxWriteFilesResponses = {
8201
+ /**
8202
+ * Files written
8203
+ */
8204
+ 204: void;
8205
+ };
8206
+ export type SandboxWriteFilesResponse = SandboxWriteFilesResponses[keyof SandboxWriteFilesResponses];
8207
+ export type SandboxReadFileData = {
8208
+ body?: never;
8209
+ path: {
8210
+ /**
8211
+ * Sandbox id
8212
+ */
8213
+ id: string;
8214
+ /**
8215
+ * Guest file path, e.g. `app/output.json`
8216
+ */
8217
+ path: string;
8218
+ };
8219
+ query?: never;
8220
+ url: '/v1/sandboxes/{id}/files/{path}';
8221
+ };
8222
+ export type SandboxReadFileErrors = {
8223
+ /**
8224
+ * File or sandbox not found
8225
+ */
8226
+ 404: ErrorResponse;
8227
+ };
8228
+ export type SandboxReadFileError = SandboxReadFileErrors[keyof SandboxReadFileErrors];
8229
+ export type SandboxReadFileResponses = {
8230
+ /**
8231
+ * File content (application/octet-stream)
8232
+ */
8233
+ 200: unknown;
8234
+ };
8235
+ export type SandboxSnapshotData = {
8236
+ body?: never;
8237
+ path: {
8238
+ /**
8239
+ * Sandbox id
8240
+ */
8241
+ id: string;
8242
+ };
8243
+ query?: never;
8244
+ url: '/v1/sandboxes/{id}/snapshot';
8245
+ };
8246
+ export type SandboxSnapshotErrors = {
8247
+ /**
8248
+ * Snapshots are not available for ephemeral sandboxes
8249
+ */
8250
+ 501: ErrorResponse;
8251
+ };
8252
+ export type SandboxSnapshotError = SandboxSnapshotErrors[keyof SandboxSnapshotErrors];
6229
8253
  export type SearchIndexData = {
6230
8254
  body?: never;
6231
8255
  path?: never;