@amerged/ohmyhost-sdk 0.1.44 → 0.1.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.d.ts.map +1 -1
- package/dist/generated/index.js +1 -1
- package/dist/generated/index.js.map +1 -1
- package/dist/generated/sdk.gen.d.ts +34 -1
- package/dist/generated/sdk.gen.d.ts.map +1 -1
- package/dist/generated/sdk.gen.js +77 -0
- package/dist/generated/sdk.gen.js.map +1 -1
- package/dist/generated/types.gen.d.ts +234 -5
- package/dist/generated/types.gen.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/index.ts +25 -0
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +150 -0
- package/src/packages/sdk-ts/src/generated/types.gen.ts +266 -4
|
@@ -805,12 +805,58 @@ export type ProjectDatabaseAccessPage = {
|
|
|
805
805
|
items: Array<ProjectDatabaseAccess>;
|
|
806
806
|
};
|
|
807
807
|
export type DatabaseWebhookEventType = "database.created" | "database.ready" | "database.woke" | "database.slept" | "database.suspended" | "database.resized" | "database.deleted";
|
|
808
|
+
/**
|
|
809
|
+
* A platform event type, data.<topic> for the rows of one watched table, or data.* for every watched table. A bare * is not accepted and never matches data events.
|
|
810
|
+
*/
|
|
811
|
+
export type DatabaseWebhookEventPattern = DatabaseWebhookEventType | string;
|
|
812
|
+
export type DatabaseWatchCreateRequest = {
|
|
813
|
+
environment: "dev" | "prod";
|
|
814
|
+
/**
|
|
815
|
+
* Schema of the table, public when omitted. The schemas pgcf, ohmyhost, information_schema and pg_* cannot be watched.
|
|
816
|
+
*/
|
|
817
|
+
schema?: string;
|
|
818
|
+
/**
|
|
819
|
+
* Ordinary table owned by the application, created by a deployed migration.
|
|
820
|
+
*/
|
|
821
|
+
table: string;
|
|
822
|
+
/**
|
|
823
|
+
* Columns published with every event, exactly as written; names are case-sensitive.
|
|
824
|
+
*/
|
|
825
|
+
columns: Array<string>;
|
|
826
|
+
/**
|
|
827
|
+
* Row changes that publish an event; all three when omitted.
|
|
828
|
+
*/
|
|
829
|
+
operations?: Array<"insert" | "update" | "delete">;
|
|
830
|
+
};
|
|
831
|
+
export type DatabaseWatch = {
|
|
832
|
+
id: string;
|
|
833
|
+
environment: "dev" | "prod";
|
|
834
|
+
schema: string;
|
|
835
|
+
table: string;
|
|
836
|
+
columns: Array<string>;
|
|
837
|
+
operations: Array<"insert" | "update" | "delete">;
|
|
838
|
+
/**
|
|
839
|
+
* Topic of the watched table, derived by the platform from its name.
|
|
840
|
+
*/
|
|
841
|
+
topic: string;
|
|
842
|
+
/**
|
|
843
|
+
* Event type of the rows of the table; pass it to a database webhook.
|
|
844
|
+
*/
|
|
845
|
+
event_type: string;
|
|
846
|
+
};
|
|
847
|
+
export type DatabaseWatchPage = {
|
|
848
|
+
items: Array<DatabaseWatch>;
|
|
849
|
+
};
|
|
850
|
+
export type DatabaseWatchDeleted = {
|
|
851
|
+
id: string;
|
|
852
|
+
deleted: true;
|
|
853
|
+
};
|
|
808
854
|
export type DatabaseWebhookCreateRequest = {
|
|
809
855
|
/**
|
|
810
856
|
* HTTPS receiver URL.
|
|
811
857
|
*/
|
|
812
858
|
url: string;
|
|
813
|
-
event_types: Array<
|
|
859
|
+
event_types: Array<DatabaseWebhookEventPattern>;
|
|
814
860
|
/**
|
|
815
861
|
* 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.
|
|
816
862
|
*/
|
|
@@ -822,7 +868,7 @@ export type DatabaseWebhook = {
|
|
|
822
868
|
id: string;
|
|
823
869
|
environment: "dev" | "prod";
|
|
824
870
|
url: string;
|
|
825
|
-
event_types: Array<
|
|
871
|
+
event_types: Array<DatabaseWebhookEventPattern>;
|
|
826
872
|
/**
|
|
827
873
|
* Names of the extra headers only; their values are never returned.
|
|
828
874
|
*/
|
|
@@ -833,7 +879,7 @@ export type DatabaseWebhookCreated = {
|
|
|
833
879
|
id: string;
|
|
834
880
|
environment: "dev" | "prod";
|
|
835
881
|
url: string;
|
|
836
|
-
event_types: Array<
|
|
882
|
+
event_types: Array<DatabaseWebhookEventPattern>;
|
|
837
883
|
header_names: Array<string>;
|
|
838
884
|
created_at: string;
|
|
839
885
|
/**
|
|
@@ -851,7 +897,7 @@ export type DatabaseWebhookDeleted = {
|
|
|
851
897
|
export type DatabaseWebhookDelivery = {
|
|
852
898
|
id: string;
|
|
853
899
|
event_id: string;
|
|
854
|
-
event_type: DatabaseWebhookEventType;
|
|
900
|
+
event_type: DatabaseWebhookEventType | string;
|
|
855
901
|
webhook_id: string;
|
|
856
902
|
state: "pending" | "delivered" | "dead_lettered";
|
|
857
903
|
attempts: number;
|
|
@@ -1329,7 +1375,7 @@ export type ProblemDetails = {
|
|
|
1329
1375
|
status: number;
|
|
1330
1376
|
detail?: string;
|
|
1331
1377
|
instance?: string;
|
|
1332
|
-
code: "invalid_request" | "unauthenticated" | "forbidden" | "organization_required" | "resource_not_found" | "idempotency_key_reused" | "project_handle_unavailable" | "project_identity_unavailable" | "deployment_plan_expired" | "deployment_plan_incompatible" | "confirmation_expired" | "confirmation_invalid" | "etag_mismatch" | "promotion_source_stale" | "promotion_target_stale" | "promotion_invalid_target" | "mail_domain_conflict" | "mail_domain_required" | "mail_capacity_unavailable" | "storage_jurisdiction_conflict" | "shared_data_requires_promotion" | "production_deployment_required" | "framework_conversion_required" | "repository_configuration_missing" | "migration_filename_noncanonical" | "environment_secret_mutation_blocked" | "workers_runtime_incompatible" | "project_handle_invalid" | "project_handle_taken" | "project_handle_unchanged" | "project_rename_blocked" | "payload_too_large" | "rate_limited" | "insufficient_organization_credits" | "paid_plan_required" | "project_budget_exceeded" | "compute_performance_paid_required" | "compute_paid_required" | "compute_storage_shrink_requires_migration" | "compute_performance_unavailable" | "database_write_pending" | "database_access_limit" | "database_webhook_limit" | "database_schedule_limit" | "database_schedule_not_runnable" | "database_webhook_delivery_pending" | "compute_change_pending" | "compute_change_conflict" | "billing_purchase_conflict" | "billing_recharge_conflict" | "github_connection_required" | "github_connection_revoked" | "repository_not_installed" | "cloudflare_zone_not_bound" | "cloudflare_authorization_closed" | "project_notes_conflict" | "project_export_not_ready" | "powered_by_flag_required" | "interactive_login_required" | "api_key_creation_uncertain" | "api_key_permissions_unavailable" | "reconciliation_exhausted" | "service_unavailable" | "source_commit_not_found" | "domain_hostname_taken" | "domain_dns_conflict" | "data_change_blocked" | "data_change_in_progress" | "data_change_not_applicable" | "rollback_target_data_changed" | "project_domain_delete_required";
|
|
1378
|
+
code: "invalid_request" | "unauthenticated" | "forbidden" | "organization_required" | "resource_not_found" | "idempotency_key_reused" | "project_handle_unavailable" | "project_identity_unavailable" | "deployment_plan_expired" | "deployment_plan_incompatible" | "confirmation_expired" | "confirmation_invalid" | "etag_mismatch" | "promotion_source_stale" | "promotion_target_stale" | "promotion_invalid_target" | "mail_domain_conflict" | "mail_domain_required" | "mail_capacity_unavailable" | "storage_jurisdiction_conflict" | "shared_data_requires_promotion" | "production_deployment_required" | "framework_conversion_required" | "repository_configuration_missing" | "migration_filename_noncanonical" | "environment_secret_mutation_blocked" | "workers_runtime_incompatible" | "project_handle_invalid" | "project_handle_taken" | "project_handle_unchanged" | "project_rename_blocked" | "payload_too_large" | "rate_limited" | "insufficient_organization_credits" | "paid_plan_required" | "project_budget_exceeded" | "compute_performance_paid_required" | "compute_paid_required" | "compute_storage_shrink_requires_migration" | "compute_performance_unavailable" | "database_write_pending" | "database_access_limit" | "database_webhook_limit" | "database_schedule_limit" | "database_schedule_not_runnable" | "database_webhook_delivery_pending" | "database_watch_limit" | "database_watch_table_unavailable" | "database_watch_column_unavailable" | "database_watch_events_unavailable" | "database_watch_conflict" | "compute_change_pending" | "compute_change_conflict" | "billing_purchase_conflict" | "billing_recharge_conflict" | "github_connection_required" | "github_connection_revoked" | "repository_not_installed" | "cloudflare_zone_not_bound" | "cloudflare_authorization_closed" | "project_notes_conflict" | "project_export_not_ready" | "powered_by_flag_required" | "interactive_login_required" | "api_key_creation_uncertain" | "api_key_permissions_unavailable" | "reconciliation_exhausted" | "service_unavailable" | "source_commit_not_found" | "domain_hostname_taken" | "domain_dns_conflict" | "data_change_blocked" | "data_change_in_progress" | "data_change_not_applicable" | "rollback_target_data_changed" | "project_domain_delete_required";
|
|
1333
1379
|
request_id: string;
|
|
1334
1380
|
retryable: boolean;
|
|
1335
1381
|
/**
|
|
@@ -1545,6 +1591,10 @@ export type ProjectDataChangePlan = {
|
|
|
1545
1591
|
created_at: string;
|
|
1546
1592
|
expires_at: string;
|
|
1547
1593
|
};
|
|
1594
|
+
/**
|
|
1595
|
+
* A platform event type, data.<topic> for the rows of one watched table, or data.* for every watched table. A bare * is not accepted and never matches data events.
|
|
1596
|
+
*/
|
|
1597
|
+
export type DatabaseWebhookEventPatternWritable = DatabaseWebhookEventType | string;
|
|
1548
1598
|
/**
|
|
1549
1599
|
* Immutable pre-build deployment plan. It expires exactly 24 hours after creation.
|
|
1550
1600
|
*/
|
|
@@ -1625,6 +1675,10 @@ export type DatabaseWebhookId = string;
|
|
|
1625
1675
|
* Database webhook delivery identifier.
|
|
1626
1676
|
*/
|
|
1627
1677
|
export type DatabaseWebhookDeliveryId = string;
|
|
1678
|
+
/**
|
|
1679
|
+
* Database watch identifier, derived from the watched schema and table.
|
|
1680
|
+
*/
|
|
1681
|
+
export type DatabaseWatchId = string;
|
|
1628
1682
|
/**
|
|
1629
1683
|
* Database schedule name, unique per project environment.
|
|
1630
1684
|
*/
|
|
@@ -7078,6 +7132,181 @@ export type RevokeProjectDatabaseAccessResponses = {
|
|
|
7078
7132
|
200: ProjectDatabaseAccess;
|
|
7079
7133
|
};
|
|
7080
7134
|
export type RevokeProjectDatabaseAccessResponse = RevokeProjectDatabaseAccessResponses[keyof RevokeProjectDatabaseAccessResponses];
|
|
7135
|
+
export type ListProjectDatabaseWatchesData = {
|
|
7136
|
+
body?: never;
|
|
7137
|
+
headers?: {
|
|
7138
|
+
/**
|
|
7139
|
+
* Optional caller-provided correlation identifier.
|
|
7140
|
+
*/
|
|
7141
|
+
"X-Request-Id"?: string;
|
|
7142
|
+
};
|
|
7143
|
+
path: {
|
|
7144
|
+
/**
|
|
7145
|
+
* Project identifier.
|
|
7146
|
+
*/
|
|
7147
|
+
project_id: Ulid;
|
|
7148
|
+
};
|
|
7149
|
+
query?: {
|
|
7150
|
+
/**
|
|
7151
|
+
* Application environment to read; dev when omitted.
|
|
7152
|
+
*/
|
|
7153
|
+
environment?: "dev" | "prod";
|
|
7154
|
+
};
|
|
7155
|
+
url: "/v1/projects/{project_id}/database/watches";
|
|
7156
|
+
};
|
|
7157
|
+
export type ListProjectDatabaseWatchesErrors = {
|
|
7158
|
+
/**
|
|
7159
|
+
* The request failed.
|
|
7160
|
+
*/
|
|
7161
|
+
400: ProblemDetails;
|
|
7162
|
+
/**
|
|
7163
|
+
* The request failed.
|
|
7164
|
+
*/
|
|
7165
|
+
401: ProblemDetails;
|
|
7166
|
+
/**
|
|
7167
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
7168
|
+
*/
|
|
7169
|
+
404: ProblemDetails;
|
|
7170
|
+
/**
|
|
7171
|
+
* The request failed.
|
|
7172
|
+
*/
|
|
7173
|
+
429: ProblemDetails;
|
|
7174
|
+
/**
|
|
7175
|
+
* The request failed.
|
|
7176
|
+
*/
|
|
7177
|
+
503: ProblemDetails;
|
|
7178
|
+
};
|
|
7179
|
+
export type ListProjectDatabaseWatchesError = ListProjectDatabaseWatchesErrors[keyof ListProjectDatabaseWatchesErrors];
|
|
7180
|
+
export type ListProjectDatabaseWatchesResponses = {
|
|
7181
|
+
/**
|
|
7182
|
+
* The database watches of the environment.
|
|
7183
|
+
*/
|
|
7184
|
+
200: DatabaseWatchPage;
|
|
7185
|
+
};
|
|
7186
|
+
export type ListProjectDatabaseWatchesResponse = ListProjectDatabaseWatchesResponses[keyof ListProjectDatabaseWatchesResponses];
|
|
7187
|
+
export type CreateProjectDatabaseWatchData = {
|
|
7188
|
+
body: DatabaseWatchCreateRequest;
|
|
7189
|
+
headers: {
|
|
7190
|
+
/**
|
|
7191
|
+
* Optional caller-provided correlation identifier.
|
|
7192
|
+
*/
|
|
7193
|
+
"X-Request-Id"?: string;
|
|
7194
|
+
/**
|
|
7195
|
+
* Identifies one mutation and its canonical request payload.
|
|
7196
|
+
*/
|
|
7197
|
+
"Idempotency-Key": string;
|
|
7198
|
+
};
|
|
7199
|
+
path: {
|
|
7200
|
+
/**
|
|
7201
|
+
* Project identifier.
|
|
7202
|
+
*/
|
|
7203
|
+
project_id: Ulid;
|
|
7204
|
+
};
|
|
7205
|
+
query?: never;
|
|
7206
|
+
url: "/v1/projects/{project_id}/database/watches";
|
|
7207
|
+
};
|
|
7208
|
+
export type CreateProjectDatabaseWatchErrors = {
|
|
7209
|
+
/**
|
|
7210
|
+
* The request failed.
|
|
7211
|
+
*/
|
|
7212
|
+
400: ProblemDetails;
|
|
7213
|
+
/**
|
|
7214
|
+
* The request failed.
|
|
7215
|
+
*/
|
|
7216
|
+
401: ProblemDetails;
|
|
7217
|
+
/**
|
|
7218
|
+
* The request failed.
|
|
7219
|
+
*/
|
|
7220
|
+
402: ProblemDetails;
|
|
7221
|
+
/**
|
|
7222
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
7223
|
+
*/
|
|
7224
|
+
404: ProblemDetails;
|
|
7225
|
+
/**
|
|
7226
|
+
* The request failed.
|
|
7227
|
+
*/
|
|
7228
|
+
409: ProblemDetails;
|
|
7229
|
+
/**
|
|
7230
|
+
* The request failed.
|
|
7231
|
+
*/
|
|
7232
|
+
429: ProblemDetails;
|
|
7233
|
+
/**
|
|
7234
|
+
* The request failed.
|
|
7235
|
+
*/
|
|
7236
|
+
503: ProblemDetails;
|
|
7237
|
+
};
|
|
7238
|
+
export type CreateProjectDatabaseWatchError = CreateProjectDatabaseWatchErrors[keyof CreateProjectDatabaseWatchErrors];
|
|
7239
|
+
export type CreateProjectDatabaseWatchResponses = {
|
|
7240
|
+
/**
|
|
7241
|
+
* The watch with the event type its deliveries carry.
|
|
7242
|
+
*/
|
|
7243
|
+
201: DatabaseWatch;
|
|
7244
|
+
};
|
|
7245
|
+
export type CreateProjectDatabaseWatchResponse = CreateProjectDatabaseWatchResponses[keyof CreateProjectDatabaseWatchResponses];
|
|
7246
|
+
export type DeleteProjectDatabaseWatchData = {
|
|
7247
|
+
body?: never;
|
|
7248
|
+
headers: {
|
|
7249
|
+
/**
|
|
7250
|
+
* Optional caller-provided correlation identifier.
|
|
7251
|
+
*/
|
|
7252
|
+
"X-Request-Id"?: string;
|
|
7253
|
+
/**
|
|
7254
|
+
* Identifies one mutation and its canonical request payload.
|
|
7255
|
+
*/
|
|
7256
|
+
"Idempotency-Key": string;
|
|
7257
|
+
};
|
|
7258
|
+
path: {
|
|
7259
|
+
/**
|
|
7260
|
+
* Project identifier.
|
|
7261
|
+
*/
|
|
7262
|
+
project_id: Ulid;
|
|
7263
|
+
/**
|
|
7264
|
+
* Database watch identifier, derived from the watched schema and table.
|
|
7265
|
+
*/
|
|
7266
|
+
watch_id: string;
|
|
7267
|
+
};
|
|
7268
|
+
query: {
|
|
7269
|
+
/**
|
|
7270
|
+
* Application environment the mutation applies to.
|
|
7271
|
+
*/
|
|
7272
|
+
environment: "dev" | "prod";
|
|
7273
|
+
};
|
|
7274
|
+
url: "/v1/projects/{project_id}/database/watches/{watch_id}";
|
|
7275
|
+
};
|
|
7276
|
+
export type DeleteProjectDatabaseWatchErrors = {
|
|
7277
|
+
/**
|
|
7278
|
+
* The request failed.
|
|
7279
|
+
*/
|
|
7280
|
+
400: ProblemDetails;
|
|
7281
|
+
/**
|
|
7282
|
+
* The request failed.
|
|
7283
|
+
*/
|
|
7284
|
+
401: ProblemDetails;
|
|
7285
|
+
/**
|
|
7286
|
+
* The request failed.
|
|
7287
|
+
*/
|
|
7288
|
+
402: ProblemDetails;
|
|
7289
|
+
/**
|
|
7290
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
7291
|
+
*/
|
|
7292
|
+
404: ProblemDetails;
|
|
7293
|
+
/**
|
|
7294
|
+
* The request failed.
|
|
7295
|
+
*/
|
|
7296
|
+
429: ProblemDetails;
|
|
7297
|
+
/**
|
|
7298
|
+
* The request failed.
|
|
7299
|
+
*/
|
|
7300
|
+
503: ProblemDetails;
|
|
7301
|
+
};
|
|
7302
|
+
export type DeleteProjectDatabaseWatchError = DeleteProjectDatabaseWatchErrors[keyof DeleteProjectDatabaseWatchErrors];
|
|
7303
|
+
export type DeleteProjectDatabaseWatchResponses = {
|
|
7304
|
+
/**
|
|
7305
|
+
* The identifier of the deleted watch.
|
|
7306
|
+
*/
|
|
7307
|
+
200: DatabaseWatchDeleted;
|
|
7308
|
+
};
|
|
7309
|
+
export type DeleteProjectDatabaseWatchResponse = DeleteProjectDatabaseWatchResponses[keyof DeleteProjectDatabaseWatchResponses];
|
|
7081
7310
|
export type ListProjectDatabaseWebhooksData = {
|
|
7082
7311
|
body?: never;
|
|
7083
7312
|
headers?: {
|