@amerged/ohmyhost-sdk 0.1.41 → 0.1.42

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.
@@ -910,29 +910,22 @@ export type ProjectDatabaseAccessRequest = {
910
910
  label?: string | null;
911
911
  };
912
912
 
913
- export type ProjectDatabaseAccess = (
914
- | {
915
- database?: "neondb";
916
- }
917
- | {
918
- database?: unknown;
919
- }
920
- ) & {
913
+ export type ProjectDatabaseAccess = {
921
914
  access_id: Ulid;
922
915
  environment: "dev" | "prod";
923
916
  mode: "read" | "write";
924
917
  role_name: string;
925
918
  host: string;
926
919
  /**
927
- * neondb for a transitional Neon credential; the exact 20-character PGCF database identity for WSS.
920
+ * The exact 20-character PGCF database identity for WSS.
928
921
  */
929
922
  database: string;
930
- provider?: "pgcf";
931
- transport?: "wss";
923
+ provider: "pgcf";
924
+ transport: "wss";
932
925
  /**
933
926
  * Verified WSS origin ending in / and matching host. The local bridge adds /v2 and the bound database and user; no public PostgreSQL TCP endpoint.
934
927
  */
935
- websocket_url?: string;
928
+ websocket_url: string;
936
929
  label: string | null;
937
930
  state: "active" | "expired" | "revoked";
938
931
  issued_at: string;
@@ -941,29 +934,22 @@ export type ProjectDatabaseAccess = (
941
934
  revocation_reason: "principal" | "expired" | "budget" | "creation_failed" | "data_change" | null;
942
935
  };
943
936
 
944
- export type ProjectDatabaseAccessCredential = (
945
- | {
946
- database?: "neondb";
947
- }
948
- | {
949
- database?: unknown;
950
- }
951
- ) & {
937
+ export type ProjectDatabaseAccessCredential = {
952
938
  access_id: Ulid;
953
939
  environment: "dev" | "prod";
954
940
  mode: "read" | "write";
955
941
  role_name: string;
956
942
  host: string;
957
943
  /**
958
- * neondb for a transitional Neon credential; the exact 20-character PGCF database identity for WSS.
944
+ * The exact 20-character PGCF database identity for WSS.
959
945
  */
960
946
  database: string;
961
- provider?: "pgcf";
962
- transport?: "wss";
947
+ provider: "pgcf";
948
+ transport: "wss";
963
949
  /**
964
950
  * Verified WSS origin ending in / and matching host. The local bridge adds /v2 and the bound database and user; no public PostgreSQL TCP endpoint.
965
951
  */
966
- websocket_url?: string;
952
+ websocket_url: string;
967
953
  label: string | null;
968
954
  state: "active" | "expired" | "revoked";
969
955
  issued_at: string;
@@ -975,7 +961,7 @@ export type ProjectDatabaseAccessCredential = (
975
961
  */
976
962
  connection_uri: string;
977
963
  /**
978
- * For PGCF, a secret-free ohmyhost database psql invocation that obtains and revokes its own session credential. Transitional Neon responses retain their original direct invocation.
964
+ * For PGCF, a secret-free ohmyhost database psql invocation that obtains and revokes its own session credential.
979
965
  */
980
966
  psql_command: string;
981
967
  };
@@ -984,6 +970,201 @@ export type ProjectDatabaseAccessPage = {
984
970
  items: Array<ProjectDatabaseAccess>;
985
971
  };
986
972
 
973
+ export type DatabaseWebhookEventType =
974
+ | "database.created"
975
+ | "database.ready"
976
+ | "database.woke"
977
+ | "database.slept"
978
+ | "database.suspended"
979
+ | "database.resized"
980
+ | "database.deleted";
981
+
982
+ export type DatabaseWebhookCreateRequest = {
983
+ /**
984
+ * HTTPS receiver URL.
985
+ */
986
+ url: string;
987
+ event_types: Array<DatabaseWebhookEventType>;
988
+ /**
989
+ * Extra headers sent with every delivery. Names are case-insensitive and must be unique; content-type, host, content-length, connection, transfer-encoding, user-agent, te, upgrade, expect and any name starting with pgcf-, cf- or x-forwarded- are refused.
990
+ */
991
+ headers?: {
992
+ [key: string]: string;
993
+ };
994
+ };
995
+
996
+ export type DatabaseWebhook = {
997
+ id: string;
998
+ environment: "dev" | "prod";
999
+ url: string;
1000
+ event_types: Array<DatabaseWebhookEventType>;
1001
+ /**
1002
+ * Names of the extra headers only; their values are never returned.
1003
+ */
1004
+ header_names: Array<string>;
1005
+ created_at: string;
1006
+ };
1007
+
1008
+ export type DatabaseWebhookCreated = {
1009
+ id: string;
1010
+ environment: "dev" | "prod";
1011
+ url: string;
1012
+ event_types: Array<DatabaseWebhookEventType>;
1013
+ header_names: Array<string>;
1014
+ created_at: string;
1015
+ /**
1016
+ * Signing secret, returned only by this creation answer.
1017
+ */
1018
+ secret: string;
1019
+ };
1020
+
1021
+ export type DatabaseWebhookPage = {
1022
+ items: Array<DatabaseWebhook>;
1023
+ };
1024
+
1025
+ export type DatabaseWebhookDeleted = {
1026
+ id: string;
1027
+ deleted: true;
1028
+ };
1029
+
1030
+ export type DatabaseWebhookDelivery = {
1031
+ id: string;
1032
+ event_id: string;
1033
+ event_type: DatabaseWebhookEventType;
1034
+ webhook_id: string;
1035
+ state: "pending" | "delivered" | "dead_lettered";
1036
+ attempts: number;
1037
+ created_at: string;
1038
+ next_attempt_at: string | null;
1039
+ delivered_at: string | null;
1040
+ last_status: number | null;
1041
+ last_error: "timeout" | "network" | "http" | "expired" | "permanent" | null;
1042
+ };
1043
+
1044
+ export type DatabaseWebhookDeliveryPage = {
1045
+ items: Array<DatabaseWebhookDelivery>;
1046
+ next_cursor: string | null;
1047
+ };
1048
+
1049
+ export type DatabaseWebhookTestResult = {
1050
+ delivered: boolean;
1051
+ status: number | null;
1052
+ error: "timeout" | "network" | "http" | null;
1053
+ duration_ms: number;
1054
+ };
1055
+
1056
+ export type DatabaseWebhookReplayAccepted = {
1057
+ delivery_id: string;
1058
+ state: "pending";
1059
+ };
1060
+
1061
+ export type DatabaseScheduleSetRequest = unknown & {
1062
+ /**
1063
+ * Five-field cron expression evaluated in UTC. Send exactly one of cron or every_seconds.
1064
+ */
1065
+ cron?: string;
1066
+ /**
1067
+ * Interval in seconds between runs. Send exactly one of cron or every_seconds.
1068
+ */
1069
+ every_seconds?: number;
1070
+ /**
1071
+ * Statements run in order by the application's runtime role. At most 16 KiB per statement and 64 KiB in total.
1072
+ */
1073
+ statements: Array<string>;
1074
+ timeout_ms?: number;
1075
+ enabled?: boolean;
1076
+ /**
1077
+ * Confirms that the statements run with the application's runtime role.
1078
+ */
1079
+ confirm: true;
1080
+ };
1081
+
1082
+ export type DatabaseSchedule = (
1083
+ | {
1084
+ cron?: string;
1085
+ every_seconds?: null;
1086
+ }
1087
+ | {
1088
+ cron?: null;
1089
+ every_seconds?: number;
1090
+ }
1091
+ ) & {
1092
+ name: string;
1093
+ environment: "dev" | "prod";
1094
+ cron: string | null;
1095
+ every_seconds: number | null;
1096
+ statements: Array<string>;
1097
+ timeout_ms: number;
1098
+ enabled: boolean;
1099
+ next_run_at: string | null;
1100
+ created_at: string;
1101
+ };
1102
+
1103
+ export type DatabaseSchedulePage = {
1104
+ items: Array<DatabaseSchedule>;
1105
+ };
1106
+
1107
+ export type DatabaseScheduleDeleted = {
1108
+ name: string;
1109
+ deleted: true;
1110
+ };
1111
+
1112
+ export type DatabaseScheduleRun = {
1113
+ id: number;
1114
+ schedule: string;
1115
+ scheduled_at: string;
1116
+ started_at: string | null;
1117
+ finished_at: string;
1118
+ outcome:
1119
+ | "succeeded"
1120
+ | "failed"
1121
+ | "timed_out"
1122
+ | "outcome_unknown"
1123
+ | "rejected"
1124
+ | "skipped_capacity"
1125
+ | "skipped_suspended"
1126
+ | "skipped_deleted"
1127
+ | "skipped_missed";
1128
+ sqlstate: string | null;
1129
+ attempts: number;
1130
+ manual: boolean;
1131
+ };
1132
+
1133
+ export type DatabaseScheduleRunPage = {
1134
+ items: Array<DatabaseScheduleRun>;
1135
+ };
1136
+
1137
+ export type DatabaseScheduleRunAccepted = {
1138
+ schedule: string;
1139
+ state: "queued";
1140
+ };
1141
+
1142
+ export type DatabaseExecutionMetrics = {
1143
+ schedule_runs_succeeded: number;
1144
+ schedule_runs_failed: number;
1145
+ schedule_runs_timed_out: number;
1146
+ schedule_runs_outcome_unknown: number;
1147
+ schedule_runs_rejected: number;
1148
+ schedule_runs_skipped: number;
1149
+ events_emitted: number;
1150
+ event_bytes: number;
1151
+ webhook_attempts: number;
1152
+ webhook_deliveries_delivered: number;
1153
+ webhook_deliveries_dead_lettered: number;
1154
+ };
1155
+
1156
+ export type DatabaseExecutionUsageRow = {
1157
+ start: string;
1158
+ end: string;
1159
+ final: boolean;
1160
+ metrics: DatabaseExecutionMetrics;
1161
+ };
1162
+
1163
+ export type DatabaseExecutionUsagePage = {
1164
+ items: Array<DatabaseExecutionUsageRow>;
1165
+ next_cursor: string | null;
1166
+ };
1167
+
987
1168
  export type SetDevAccessModeRequest = {
988
1169
  mode: "protected" | "public";
989
1170
  };
@@ -1442,6 +1623,10 @@ export type ProblemDetails = {
1442
1623
  | "compute_performance_unavailable"
1443
1624
  | "database_write_pending"
1444
1625
  | "database_access_limit"
1626
+ | "database_webhook_limit"
1627
+ | "database_schedule_limit"
1628
+ | "database_schedule_not_runnable"
1629
+ | "database_webhook_delivery_pending"
1445
1630
  | "compute_change_pending"
1446
1631
  | "compute_change_conflict"
1447
1632
  | "billing_purchase_conflict"
@@ -1816,11 +2001,36 @@ export type ProjectId = Ulid;
1816
2001
  */
1817
2002
  export type DatabaseAccessId = Ulid;
1818
2003
 
2004
+ /**
2005
+ * Application environment to read; dev when omitted.
2006
+ */
2007
+ export type DatabaseEnvironmentRead = "dev" | "prod";
2008
+
1819
2009
  /**
1820
2010
  * Restrict the listing to one application environment.
1821
2011
  */
1822
2012
  export type DatabaseEnvironmentFilter = "dev" | "prod";
1823
2013
 
2014
+ /**
2015
+ * Application environment the mutation applies to.
2016
+ */
2017
+ export type DatabaseEnvironment = "dev" | "prod";
2018
+
2019
+ /**
2020
+ * Database webhook identifier.
2021
+ */
2022
+ export type DatabaseWebhookId = string;
2023
+
2024
+ /**
2025
+ * Database webhook delivery identifier.
2026
+ */
2027
+ export type DatabaseWebhookDeliveryId = string;
2028
+
2029
+ /**
2030
+ * Database schedule name, unique per project environment.
2031
+ */
2032
+ export type DatabaseScheduleName = string;
2033
+
1824
2034
  /**
1825
2035
  * Opaque continuation cursor returned by the preceding project page.
1826
2036
  */
@@ -7928,6 +8138,924 @@ export type RevokeProjectDatabaseAccessResponses = {
7928
8138
  export type RevokeProjectDatabaseAccessResponse =
7929
8139
  RevokeProjectDatabaseAccessResponses[keyof RevokeProjectDatabaseAccessResponses];
7930
8140
 
8141
+ export type ListProjectDatabaseWebhooksData = {
8142
+ body?: never;
8143
+ headers?: {
8144
+ /**
8145
+ * Optional caller-provided correlation identifier.
8146
+ */
8147
+ "X-Request-Id"?: string;
8148
+ };
8149
+ path: {
8150
+ /**
8151
+ * Project identifier.
8152
+ */
8153
+ project_id: Ulid;
8154
+ };
8155
+ query?: {
8156
+ /**
8157
+ * Application environment to read; dev when omitted.
8158
+ */
8159
+ environment?: "dev" | "prod";
8160
+ };
8161
+ url: "/v1/projects/{project_id}/database/webhooks";
8162
+ };
8163
+
8164
+ export type ListProjectDatabaseWebhooksErrors = {
8165
+ /**
8166
+ * The request failed.
8167
+ */
8168
+ 400: ProblemDetails;
8169
+ /**
8170
+ * The request failed.
8171
+ */
8172
+ 401: ProblemDetails;
8173
+ /**
8174
+ * The resource does not exist or is not visible to the authenticated principal.
8175
+ */
8176
+ 404: ProblemDetails;
8177
+ /**
8178
+ * The request failed.
8179
+ */
8180
+ 429: ProblemDetails;
8181
+ /**
8182
+ * The request failed.
8183
+ */
8184
+ 503: ProblemDetails;
8185
+ };
8186
+
8187
+ export type ListProjectDatabaseWebhooksError =
8188
+ ListProjectDatabaseWebhooksErrors[keyof ListProjectDatabaseWebhooksErrors];
8189
+
8190
+ export type ListProjectDatabaseWebhooksResponses = {
8191
+ /**
8192
+ * The database webhooks of the environment.
8193
+ */
8194
+ 200: DatabaseWebhookPage;
8195
+ };
8196
+
8197
+ export type ListProjectDatabaseWebhooksResponse =
8198
+ ListProjectDatabaseWebhooksResponses[keyof ListProjectDatabaseWebhooksResponses];
8199
+
8200
+ export type CreateProjectDatabaseWebhookData = {
8201
+ body: DatabaseWebhookCreateRequest;
8202
+ headers: {
8203
+ /**
8204
+ * Optional caller-provided correlation identifier.
8205
+ */
8206
+ "X-Request-Id"?: string;
8207
+ /**
8208
+ * Identifies one mutation and its canonical request payload.
8209
+ */
8210
+ "Idempotency-Key": string;
8211
+ };
8212
+ path: {
8213
+ /**
8214
+ * Project identifier.
8215
+ */
8216
+ project_id: Ulid;
8217
+ };
8218
+ query: {
8219
+ /**
8220
+ * Application environment the mutation applies to.
8221
+ */
8222
+ environment: "dev" | "prod";
8223
+ };
8224
+ url: "/v1/projects/{project_id}/database/webhooks";
8225
+ };
8226
+
8227
+ export type CreateProjectDatabaseWebhookErrors = {
8228
+ /**
8229
+ * The request failed.
8230
+ */
8231
+ 400: ProblemDetails;
8232
+ /**
8233
+ * The request failed.
8234
+ */
8235
+ 401: ProblemDetails;
8236
+ /**
8237
+ * The resource does not exist or is not visible to the authenticated principal.
8238
+ */
8239
+ 404: ProblemDetails;
8240
+ /**
8241
+ * The request failed.
8242
+ */
8243
+ 409: ProblemDetails;
8244
+ /**
8245
+ * The request failed.
8246
+ */
8247
+ 429: ProblemDetails;
8248
+ /**
8249
+ * The request failed.
8250
+ */
8251
+ 503: ProblemDetails;
8252
+ };
8253
+
8254
+ export type CreateProjectDatabaseWebhookError =
8255
+ CreateProjectDatabaseWebhookErrors[keyof CreateProjectDatabaseWebhookErrors];
8256
+
8257
+ export type CreateProjectDatabaseWebhookResponses = {
8258
+ /**
8259
+ * The webhook with its signing secret, returned once and never persisted in plaintext.
8260
+ */
8261
+ 201: DatabaseWebhookCreated;
8262
+ };
8263
+
8264
+ export type CreateProjectDatabaseWebhookResponse =
8265
+ CreateProjectDatabaseWebhookResponses[keyof CreateProjectDatabaseWebhookResponses];
8266
+
8267
+ export type DeleteProjectDatabaseWebhookData = {
8268
+ body?: never;
8269
+ headers?: {
8270
+ /**
8271
+ * Optional caller-provided correlation identifier.
8272
+ */
8273
+ "X-Request-Id"?: string;
8274
+ };
8275
+ path: {
8276
+ /**
8277
+ * Project identifier.
8278
+ */
8279
+ project_id: Ulid;
8280
+ /**
8281
+ * Database webhook identifier.
8282
+ */
8283
+ webhook_id: string;
8284
+ };
8285
+ query: {
8286
+ /**
8287
+ * Application environment the mutation applies to.
8288
+ */
8289
+ environment: "dev" | "prod";
8290
+ };
8291
+ url: "/v1/projects/{project_id}/database/webhooks/{webhook_id}";
8292
+ };
8293
+
8294
+ export type DeleteProjectDatabaseWebhookErrors = {
8295
+ /**
8296
+ * The request failed.
8297
+ */
8298
+ 400: ProblemDetails;
8299
+ /**
8300
+ * The request failed.
8301
+ */
8302
+ 401: ProblemDetails;
8303
+ /**
8304
+ * The resource does not exist or is not visible to the authenticated principal.
8305
+ */
8306
+ 404: ProblemDetails;
8307
+ /**
8308
+ * The request failed.
8309
+ */
8310
+ 429: ProblemDetails;
8311
+ /**
8312
+ * The request failed.
8313
+ */
8314
+ 503: ProblemDetails;
8315
+ };
8316
+
8317
+ export type DeleteProjectDatabaseWebhookError =
8318
+ DeleteProjectDatabaseWebhookErrors[keyof DeleteProjectDatabaseWebhookErrors];
8319
+
8320
+ export type DeleteProjectDatabaseWebhookResponses = {
8321
+ /**
8322
+ * The identifier of the deleted webhook.
8323
+ */
8324
+ 200: DatabaseWebhookDeleted;
8325
+ };
8326
+
8327
+ export type DeleteProjectDatabaseWebhookResponse =
8328
+ DeleteProjectDatabaseWebhookResponses[keyof DeleteProjectDatabaseWebhookResponses];
8329
+
8330
+ export type GetProjectDatabaseWebhookData = {
8331
+ body?: never;
8332
+ headers?: {
8333
+ /**
8334
+ * Optional caller-provided correlation identifier.
8335
+ */
8336
+ "X-Request-Id"?: string;
8337
+ };
8338
+ path: {
8339
+ /**
8340
+ * Project identifier.
8341
+ */
8342
+ project_id: Ulid;
8343
+ /**
8344
+ * Database webhook identifier.
8345
+ */
8346
+ webhook_id: string;
8347
+ };
8348
+ query?: {
8349
+ /**
8350
+ * Application environment to read; dev when omitted.
8351
+ */
8352
+ environment?: "dev" | "prod";
8353
+ };
8354
+ url: "/v1/projects/{project_id}/database/webhooks/{webhook_id}";
8355
+ };
8356
+
8357
+ export type GetProjectDatabaseWebhookErrors = {
8358
+ /**
8359
+ * The request failed.
8360
+ */
8361
+ 400: ProblemDetails;
8362
+ /**
8363
+ * The request failed.
8364
+ */
8365
+ 401: ProblemDetails;
8366
+ /**
8367
+ * The resource does not exist or is not visible to the authenticated principal.
8368
+ */
8369
+ 404: ProblemDetails;
8370
+ /**
8371
+ * The request failed.
8372
+ */
8373
+ 429: ProblemDetails;
8374
+ /**
8375
+ * The request failed.
8376
+ */
8377
+ 503: ProblemDetails;
8378
+ };
8379
+
8380
+ export type GetProjectDatabaseWebhookError =
8381
+ GetProjectDatabaseWebhookErrors[keyof GetProjectDatabaseWebhookErrors];
8382
+
8383
+ export type GetProjectDatabaseWebhookResponses = {
8384
+ /**
8385
+ * The database webhook.
8386
+ */
8387
+ 200: DatabaseWebhook;
8388
+ };
8389
+
8390
+ export type GetProjectDatabaseWebhookResponse =
8391
+ GetProjectDatabaseWebhookResponses[keyof GetProjectDatabaseWebhookResponses];
8392
+
8393
+ export type TestProjectDatabaseWebhookData = {
8394
+ body?: never;
8395
+ headers?: {
8396
+ /**
8397
+ * Optional caller-provided correlation identifier.
8398
+ */
8399
+ "X-Request-Id"?: string;
8400
+ };
8401
+ path: {
8402
+ /**
8403
+ * Project identifier.
8404
+ */
8405
+ project_id: Ulid;
8406
+ /**
8407
+ * Database webhook identifier.
8408
+ */
8409
+ webhook_id: string;
8410
+ };
8411
+ query: {
8412
+ /**
8413
+ * Application environment the mutation applies to.
8414
+ */
8415
+ environment: "dev" | "prod";
8416
+ };
8417
+ url: "/v1/projects/{project_id}/database/webhooks/{webhook_id}/test";
8418
+ };
8419
+
8420
+ export type TestProjectDatabaseWebhookErrors = {
8421
+ /**
8422
+ * The request failed.
8423
+ */
8424
+ 400: ProblemDetails;
8425
+ /**
8426
+ * The request failed.
8427
+ */
8428
+ 401: ProblemDetails;
8429
+ /**
8430
+ * The resource does not exist or is not visible to the authenticated principal.
8431
+ */
8432
+ 404: ProblemDetails;
8433
+ /**
8434
+ * The request failed.
8435
+ */
8436
+ 429: ProblemDetails;
8437
+ /**
8438
+ * The request failed.
8439
+ */
8440
+ 503: ProblemDetails;
8441
+ };
8442
+
8443
+ export type TestProjectDatabaseWebhookError =
8444
+ TestProjectDatabaseWebhookErrors[keyof TestProjectDatabaseWebhookErrors];
8445
+
8446
+ export type TestProjectDatabaseWebhookResponses = {
8447
+ /**
8448
+ * The outcome of the test request.
8449
+ */
8450
+ 200: DatabaseWebhookTestResult;
8451
+ };
8452
+
8453
+ export type TestProjectDatabaseWebhookResponse =
8454
+ TestProjectDatabaseWebhookResponses[keyof TestProjectDatabaseWebhookResponses];
8455
+
8456
+ export type ListProjectDatabaseWebhookDeliveriesData = {
8457
+ body?: never;
8458
+ headers?: {
8459
+ /**
8460
+ * Optional caller-provided correlation identifier.
8461
+ */
8462
+ "X-Request-Id"?: string;
8463
+ };
8464
+ path: {
8465
+ /**
8466
+ * Project identifier.
8467
+ */
8468
+ project_id: Ulid;
8469
+ };
8470
+ query?: {
8471
+ /**
8472
+ * Application environment to read; dev when omitted.
8473
+ */
8474
+ environment?: "dev" | "prod";
8475
+ /**
8476
+ * Restrict the listing to the deliveries of one webhook.
8477
+ */
8478
+ webhook_id?: string;
8479
+ /**
8480
+ * Maximum number of deliveries in this page.
8481
+ */
8482
+ limit?: number;
8483
+ /**
8484
+ * Opaque cursor returned by the previous page.
8485
+ */
8486
+ cursor?: string;
8487
+ };
8488
+ url: "/v1/projects/{project_id}/database/webhook-deliveries";
8489
+ };
8490
+
8491
+ export type ListProjectDatabaseWebhookDeliveriesErrors = {
8492
+ /**
8493
+ * The request failed.
8494
+ */
8495
+ 400: ProblemDetails;
8496
+ /**
8497
+ * The request failed.
8498
+ */
8499
+ 401: ProblemDetails;
8500
+ /**
8501
+ * The resource does not exist or is not visible to the authenticated principal.
8502
+ */
8503
+ 404: ProblemDetails;
8504
+ /**
8505
+ * The request failed.
8506
+ */
8507
+ 429: ProblemDetails;
8508
+ /**
8509
+ * The request failed.
8510
+ */
8511
+ 503: ProblemDetails;
8512
+ };
8513
+
8514
+ export type ListProjectDatabaseWebhookDeliveriesError =
8515
+ ListProjectDatabaseWebhookDeliveriesErrors[keyof ListProjectDatabaseWebhookDeliveriesErrors];
8516
+
8517
+ export type ListProjectDatabaseWebhookDeliveriesResponses = {
8518
+ /**
8519
+ * One page of database webhook deliveries.
8520
+ */
8521
+ 200: DatabaseWebhookDeliveryPage;
8522
+ };
8523
+
8524
+ export type ListProjectDatabaseWebhookDeliveriesResponse =
8525
+ ListProjectDatabaseWebhookDeliveriesResponses[keyof ListProjectDatabaseWebhookDeliveriesResponses];
8526
+
8527
+ export type ReplayProjectDatabaseWebhookDeliveryData = {
8528
+ body?: never;
8529
+ headers?: {
8530
+ /**
8531
+ * Optional caller-provided correlation identifier.
8532
+ */
8533
+ "X-Request-Id"?: string;
8534
+ };
8535
+ path: {
8536
+ /**
8537
+ * Project identifier.
8538
+ */
8539
+ project_id: Ulid;
8540
+ /**
8541
+ * Database webhook delivery identifier.
8542
+ */
8543
+ delivery_id: string;
8544
+ };
8545
+ query: {
8546
+ /**
8547
+ * Application environment the mutation applies to.
8548
+ */
8549
+ environment: "dev" | "prod";
8550
+ };
8551
+ url: "/v1/projects/{project_id}/database/webhook-deliveries/{delivery_id}/replay";
8552
+ };
8553
+
8554
+ export type ReplayProjectDatabaseWebhookDeliveryErrors = {
8555
+ /**
8556
+ * The request failed.
8557
+ */
8558
+ 400: ProblemDetails;
8559
+ /**
8560
+ * The request failed.
8561
+ */
8562
+ 401: ProblemDetails;
8563
+ /**
8564
+ * The resource does not exist or is not visible to the authenticated principal.
8565
+ */
8566
+ 404: ProblemDetails;
8567
+ /**
8568
+ * The request failed.
8569
+ */
8570
+ 409: ProblemDetails;
8571
+ /**
8572
+ * The request failed.
8573
+ */
8574
+ 429: ProblemDetails;
8575
+ /**
8576
+ * The request failed.
8577
+ */
8578
+ 503: ProblemDetails;
8579
+ };
8580
+
8581
+ export type ReplayProjectDatabaseWebhookDeliveryError =
8582
+ ReplayProjectDatabaseWebhookDeliveryErrors[keyof ReplayProjectDatabaseWebhookDeliveryErrors];
8583
+
8584
+ export type ReplayProjectDatabaseWebhookDeliveryResponses = {
8585
+ /**
8586
+ * The delivery was queued for another attempt.
8587
+ */
8588
+ 202: DatabaseWebhookReplayAccepted;
8589
+ };
8590
+
8591
+ export type ReplayProjectDatabaseWebhookDeliveryResponse =
8592
+ ReplayProjectDatabaseWebhookDeliveryResponses[keyof ReplayProjectDatabaseWebhookDeliveryResponses];
8593
+
8594
+ export type ListProjectDatabaseSchedulesData = {
8595
+ body?: never;
8596
+ headers?: {
8597
+ /**
8598
+ * Optional caller-provided correlation identifier.
8599
+ */
8600
+ "X-Request-Id"?: string;
8601
+ };
8602
+ path: {
8603
+ /**
8604
+ * Project identifier.
8605
+ */
8606
+ project_id: Ulid;
8607
+ };
8608
+ query?: {
8609
+ /**
8610
+ * Application environment to read; dev when omitted.
8611
+ */
8612
+ environment?: "dev" | "prod";
8613
+ };
8614
+ url: "/v1/projects/{project_id}/database/schedules";
8615
+ };
8616
+
8617
+ export type ListProjectDatabaseSchedulesErrors = {
8618
+ /**
8619
+ * The request failed.
8620
+ */
8621
+ 400: ProblemDetails;
8622
+ /**
8623
+ * The request failed.
8624
+ */
8625
+ 401: ProblemDetails;
8626
+ /**
8627
+ * The resource does not exist or is not visible to the authenticated principal.
8628
+ */
8629
+ 404: ProblemDetails;
8630
+ /**
8631
+ * The request failed.
8632
+ */
8633
+ 429: ProblemDetails;
8634
+ /**
8635
+ * The request failed.
8636
+ */
8637
+ 503: ProblemDetails;
8638
+ };
8639
+
8640
+ export type ListProjectDatabaseSchedulesError =
8641
+ ListProjectDatabaseSchedulesErrors[keyof ListProjectDatabaseSchedulesErrors];
8642
+
8643
+ export type ListProjectDatabaseSchedulesResponses = {
8644
+ /**
8645
+ * The database schedules of the environment.
8646
+ */
8647
+ 200: DatabaseSchedulePage;
8648
+ };
8649
+
8650
+ export type ListProjectDatabaseSchedulesResponse =
8651
+ ListProjectDatabaseSchedulesResponses[keyof ListProjectDatabaseSchedulesResponses];
8652
+
8653
+ export type DeleteProjectDatabaseScheduleData = {
8654
+ body?: never;
8655
+ headers?: {
8656
+ /**
8657
+ * Optional caller-provided correlation identifier.
8658
+ */
8659
+ "X-Request-Id"?: string;
8660
+ };
8661
+ path: {
8662
+ /**
8663
+ * Project identifier.
8664
+ */
8665
+ project_id: Ulid;
8666
+ /**
8667
+ * Database schedule name, unique per project environment.
8668
+ */
8669
+ name: string;
8670
+ };
8671
+ query: {
8672
+ /**
8673
+ * Application environment the mutation applies to.
8674
+ */
8675
+ environment: "dev" | "prod";
8676
+ };
8677
+ url: "/v1/projects/{project_id}/database/schedules/{name}";
8678
+ };
8679
+
8680
+ export type DeleteProjectDatabaseScheduleErrors = {
8681
+ /**
8682
+ * The request failed.
8683
+ */
8684
+ 400: ProblemDetails;
8685
+ /**
8686
+ * The request failed.
8687
+ */
8688
+ 401: ProblemDetails;
8689
+ /**
8690
+ * The resource does not exist or is not visible to the authenticated principal.
8691
+ */
8692
+ 404: ProblemDetails;
8693
+ /**
8694
+ * The request failed.
8695
+ */
8696
+ 429: ProblemDetails;
8697
+ /**
8698
+ * The request failed.
8699
+ */
8700
+ 503: ProblemDetails;
8701
+ };
8702
+
8703
+ export type DeleteProjectDatabaseScheduleError =
8704
+ DeleteProjectDatabaseScheduleErrors[keyof DeleteProjectDatabaseScheduleErrors];
8705
+
8706
+ export type DeleteProjectDatabaseScheduleResponses = {
8707
+ /**
8708
+ * The name of the deleted schedule.
8709
+ */
8710
+ 200: DatabaseScheduleDeleted;
8711
+ };
8712
+
8713
+ export type DeleteProjectDatabaseScheduleResponse =
8714
+ DeleteProjectDatabaseScheduleResponses[keyof DeleteProjectDatabaseScheduleResponses];
8715
+
8716
+ export type GetProjectDatabaseScheduleData = {
8717
+ body?: never;
8718
+ headers?: {
8719
+ /**
8720
+ * Optional caller-provided correlation identifier.
8721
+ */
8722
+ "X-Request-Id"?: string;
8723
+ };
8724
+ path: {
8725
+ /**
8726
+ * Project identifier.
8727
+ */
8728
+ project_id: Ulid;
8729
+ /**
8730
+ * Database schedule name, unique per project environment.
8731
+ */
8732
+ name: string;
8733
+ };
8734
+ query?: {
8735
+ /**
8736
+ * Application environment to read; dev when omitted.
8737
+ */
8738
+ environment?: "dev" | "prod";
8739
+ };
8740
+ url: "/v1/projects/{project_id}/database/schedules/{name}";
8741
+ };
8742
+
8743
+ export type GetProjectDatabaseScheduleErrors = {
8744
+ /**
8745
+ * The request failed.
8746
+ */
8747
+ 400: ProblemDetails;
8748
+ /**
8749
+ * The request failed.
8750
+ */
8751
+ 401: ProblemDetails;
8752
+ /**
8753
+ * The resource does not exist or is not visible to the authenticated principal.
8754
+ */
8755
+ 404: ProblemDetails;
8756
+ /**
8757
+ * The request failed.
8758
+ */
8759
+ 429: ProblemDetails;
8760
+ /**
8761
+ * The request failed.
8762
+ */
8763
+ 503: ProblemDetails;
8764
+ };
8765
+
8766
+ export type GetProjectDatabaseScheduleError =
8767
+ GetProjectDatabaseScheduleErrors[keyof GetProjectDatabaseScheduleErrors];
8768
+
8769
+ export type GetProjectDatabaseScheduleResponses = {
8770
+ /**
8771
+ * The database schedule.
8772
+ */
8773
+ 200: DatabaseSchedule;
8774
+ };
8775
+
8776
+ export type GetProjectDatabaseScheduleResponse =
8777
+ GetProjectDatabaseScheduleResponses[keyof GetProjectDatabaseScheduleResponses];
8778
+
8779
+ export type SetProjectDatabaseScheduleData = {
8780
+ body: DatabaseScheduleSetRequest;
8781
+ headers?: {
8782
+ /**
8783
+ * Optional caller-provided correlation identifier.
8784
+ */
8785
+ "X-Request-Id"?: string;
8786
+ };
8787
+ path: {
8788
+ /**
8789
+ * Project identifier.
8790
+ */
8791
+ project_id: Ulid;
8792
+ /**
8793
+ * Database schedule name, unique per project environment.
8794
+ */
8795
+ name: string;
8796
+ };
8797
+ query: {
8798
+ /**
8799
+ * Application environment the mutation applies to.
8800
+ */
8801
+ environment: "dev" | "prod";
8802
+ };
8803
+ url: "/v1/projects/{project_id}/database/schedules/{name}";
8804
+ };
8805
+
8806
+ export type SetProjectDatabaseScheduleErrors = {
8807
+ /**
8808
+ * The request failed.
8809
+ */
8810
+ 400: ProblemDetails;
8811
+ /**
8812
+ * The request failed.
8813
+ */
8814
+ 401: ProblemDetails;
8815
+ /**
8816
+ * The resource does not exist or is not visible to the authenticated principal.
8817
+ */
8818
+ 404: ProblemDetails;
8819
+ /**
8820
+ * The request failed.
8821
+ */
8822
+ 409: ProblemDetails;
8823
+ /**
8824
+ * The request failed.
8825
+ */
8826
+ 429: ProblemDetails;
8827
+ /**
8828
+ * The request failed.
8829
+ */
8830
+ 503: ProblemDetails;
8831
+ };
8832
+
8833
+ export type SetProjectDatabaseScheduleError =
8834
+ SetProjectDatabaseScheduleErrors[keyof SetProjectDatabaseScheduleErrors];
8835
+
8836
+ export type SetProjectDatabaseScheduleResponses = {
8837
+ /**
8838
+ * The schedule as stored.
8839
+ */
8840
+ 200: DatabaseSchedule;
8841
+ };
8842
+
8843
+ export type SetProjectDatabaseScheduleResponse =
8844
+ SetProjectDatabaseScheduleResponses[keyof SetProjectDatabaseScheduleResponses];
8845
+
8846
+ export type ListProjectDatabaseScheduleRunsData = {
8847
+ body?: never;
8848
+ headers?: {
8849
+ /**
8850
+ * Optional caller-provided correlation identifier.
8851
+ */
8852
+ "X-Request-Id"?: string;
8853
+ };
8854
+ path: {
8855
+ /**
8856
+ * Project identifier.
8857
+ */
8858
+ project_id: Ulid;
8859
+ /**
8860
+ * Database schedule name, unique per project environment.
8861
+ */
8862
+ name: string;
8863
+ };
8864
+ query?: {
8865
+ /**
8866
+ * Application environment to read; dev when omitted.
8867
+ */
8868
+ environment?: "dev" | "prod";
8869
+ /**
8870
+ * Maximum number of runs in this page.
8871
+ */
8872
+ limit?: number;
8873
+ };
8874
+ url: "/v1/projects/{project_id}/database/schedules/{name}/runs";
8875
+ };
8876
+
8877
+ export type ListProjectDatabaseScheduleRunsErrors = {
8878
+ /**
8879
+ * The request failed.
8880
+ */
8881
+ 400: ProblemDetails;
8882
+ /**
8883
+ * The request failed.
8884
+ */
8885
+ 401: ProblemDetails;
8886
+ /**
8887
+ * The resource does not exist or is not visible to the authenticated principal.
8888
+ */
8889
+ 404: ProblemDetails;
8890
+ /**
8891
+ * The request failed.
8892
+ */
8893
+ 429: ProblemDetails;
8894
+ /**
8895
+ * The request failed.
8896
+ */
8897
+ 503: ProblemDetails;
8898
+ };
8899
+
8900
+ export type ListProjectDatabaseScheduleRunsError =
8901
+ ListProjectDatabaseScheduleRunsErrors[keyof ListProjectDatabaseScheduleRunsErrors];
8902
+
8903
+ export type ListProjectDatabaseScheduleRunsResponses = {
8904
+ /**
8905
+ * The newest runs of the schedule, newest first.
8906
+ */
8907
+ 200: DatabaseScheduleRunPage;
8908
+ };
8909
+
8910
+ export type ListProjectDatabaseScheduleRunsResponse =
8911
+ ListProjectDatabaseScheduleRunsResponses[keyof ListProjectDatabaseScheduleRunsResponses];
8912
+
8913
+ export type RunProjectDatabaseScheduleData = {
8914
+ body?: never;
8915
+ headers?: {
8916
+ /**
8917
+ * Optional caller-provided correlation identifier.
8918
+ */
8919
+ "X-Request-Id"?: string;
8920
+ };
8921
+ path: {
8922
+ /**
8923
+ * Project identifier.
8924
+ */
8925
+ project_id: Ulid;
8926
+ /**
8927
+ * Database schedule name, unique per project environment.
8928
+ */
8929
+ name: string;
8930
+ };
8931
+ query: {
8932
+ /**
8933
+ * Application environment the mutation applies to.
8934
+ */
8935
+ environment: "dev" | "prod";
8936
+ };
8937
+ url: "/v1/projects/{project_id}/database/schedules/{name}/run";
8938
+ };
8939
+
8940
+ export type RunProjectDatabaseScheduleErrors = {
8941
+ /**
8942
+ * The request failed.
8943
+ */
8944
+ 400: ProblemDetails;
8945
+ /**
8946
+ * The request failed.
8947
+ */
8948
+ 401: ProblemDetails;
8949
+ /**
8950
+ * The resource does not exist or is not visible to the authenticated principal.
8951
+ */
8952
+ 404: ProblemDetails;
8953
+ /**
8954
+ * The request failed.
8955
+ */
8956
+ 409: ProblemDetails;
8957
+ /**
8958
+ * The request failed.
8959
+ */
8960
+ 429: ProblemDetails;
8961
+ /**
8962
+ * The request failed.
8963
+ */
8964
+ 503: ProblemDetails;
8965
+ };
8966
+
8967
+ export type RunProjectDatabaseScheduleError =
8968
+ RunProjectDatabaseScheduleErrors[keyof RunProjectDatabaseScheduleErrors];
8969
+
8970
+ export type RunProjectDatabaseScheduleResponses = {
8971
+ /**
8972
+ * The run was queued.
8973
+ */
8974
+ 202: DatabaseScheduleRunAccepted;
8975
+ };
8976
+
8977
+ export type RunProjectDatabaseScheduleResponse =
8978
+ RunProjectDatabaseScheduleResponses[keyof RunProjectDatabaseScheduleResponses];
8979
+
8980
+ export type GetProjectDatabaseExecutionUsageData = {
8981
+ body?: never;
8982
+ headers?: {
8983
+ /**
8984
+ * Optional caller-provided correlation identifier.
8985
+ */
8986
+ "X-Request-Id"?: string;
8987
+ };
8988
+ path: {
8989
+ /**
8990
+ * Project identifier.
8991
+ */
8992
+ project_id: Ulid;
8993
+ };
8994
+ query: {
8995
+ /**
8996
+ * Application environment to read; dev when omitted.
8997
+ */
8998
+ environment?: "dev" | "prod";
8999
+ /**
9000
+ * Inclusive window start in UTC, aligned to the granularity.
9001
+ */
9002
+ from: string;
9003
+ /**
9004
+ * Exclusive window end in UTC, aligned to the granularity.
9005
+ */
9006
+ to: string;
9007
+ /**
9008
+ * Length of each returned window.
9009
+ */
9010
+ granularity: "hour" | "day";
9011
+ /**
9012
+ * Maximum number of windows in this page.
9013
+ */
9014
+ limit?: number;
9015
+ /**
9016
+ * Opaque cursor returned by the previous page.
9017
+ */
9018
+ cursor?: string;
9019
+ };
9020
+ url: "/v1/projects/{project_id}/database/execution-usage";
9021
+ };
9022
+
9023
+ export type GetProjectDatabaseExecutionUsageErrors = {
9024
+ /**
9025
+ * The request failed.
9026
+ */
9027
+ 400: ProblemDetails;
9028
+ /**
9029
+ * The request failed.
9030
+ */
9031
+ 401: ProblemDetails;
9032
+ /**
9033
+ * The resource does not exist or is not visible to the authenticated principal.
9034
+ */
9035
+ 404: ProblemDetails;
9036
+ /**
9037
+ * The request failed.
9038
+ */
9039
+ 429: ProblemDetails;
9040
+ /**
9041
+ * The request failed.
9042
+ */
9043
+ 503: ProblemDetails;
9044
+ };
9045
+
9046
+ export type GetProjectDatabaseExecutionUsageError =
9047
+ GetProjectDatabaseExecutionUsageErrors[keyof GetProjectDatabaseExecutionUsageErrors];
9048
+
9049
+ export type GetProjectDatabaseExecutionUsageResponses = {
9050
+ /**
9051
+ * One page of execution usage windows.
9052
+ */
9053
+ 200: DatabaseExecutionUsagePage;
9054
+ };
9055
+
9056
+ export type GetProjectDatabaseExecutionUsageResponse =
9057
+ GetProjectDatabaseExecutionUsageResponses[keyof GetProjectDatabaseExecutionUsageResponses];
9058
+
7931
9059
  export type PlanDeploymentRollbackData = {
7932
9060
  body?: never;
7933
9061
  headers?: {