@amerged/ohmyhost-sdk 0.1.56 → 0.1.57

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.
@@ -1033,6 +1033,24 @@ export type DatabaseWebhookCreated = {
1033
1033
  */
1034
1034
  secret: string;
1035
1035
  };
1036
+ export type DatabaseWebhookSubscription = {
1037
+ id: Ulid;
1038
+ environment: "dev" | "prod";
1039
+ state: "creating" | "active" | "deactivating" | "inactive";
1040
+ generation: number;
1041
+ provider_id: string | null;
1042
+ };
1043
+ export type DatabaseWebhookSubscriptionActivation = {
1044
+ id: Ulid;
1045
+ environment: "dev" | "prod";
1046
+ state: "active";
1047
+ generation: number;
1048
+ provider_id: string;
1049
+ /**
1050
+ * Generation signing secret available only on the exact authorized activation or retry.
1051
+ */
1052
+ secret: string;
1053
+ };
1036
1054
  export type DatabaseWebhookPage = {
1037
1055
  items: Array<DatabaseWebhook>;
1038
1056
  };
@@ -1189,7 +1207,7 @@ export type DevAccessTicket = {
1189
1207
  export type PlanDeploymentRequest = {
1190
1208
  commit_sha: GitCommitSha;
1191
1209
  /**
1192
- * The environment the deployment builds into. Prod skips Dev and switches Prod traffic once activated.
1210
+ * The environment the deployment builds into. Omission selects Dev when it exists, otherwise Prod. Prod switches Prod traffic once activated.
1193
1211
  */
1194
1212
  environment?: "dev" | "prod";
1195
1213
  };
@@ -1366,6 +1384,10 @@ export type FeedbackUpdate = {
1366
1384
  * Phase 1 project creation request. The server assigns resource identifiers.
1367
1385
  */
1368
1386
  export type CreateProjectRequest = {
1387
+ /**
1388
+ * Set false to create only Prod; Dev can be added later. Omission preserves existing Dev and Prod creation behavior.
1389
+ */
1390
+ include_development_environment?: boolean;
1369
1391
  source?: {
1370
1392
  provider: "managed";
1371
1393
  template: "vite-react" | "empty";
@@ -1491,6 +1513,14 @@ export type ProjectHandleAvailability = {
1491
1513
  alternatives: Array<string>;
1492
1514
  };
1493
1515
  export type ProjectStatus = {
1516
+ /**
1517
+ * Custom hostnames of this project with their environment and current configuration state.
1518
+ */
1519
+ custom_domains?: Array<{
1520
+ hostname: string;
1521
+ environment: "prod";
1522
+ state: "awaiting_deployment" | "pending" | "active" | "deleting";
1523
+ }>;
1494
1524
  /**
1495
1525
  * Optimistic-concurrency token for changing this project address; use it as If-Match on the handle endpoint.
1496
1526
  */
@@ -1521,7 +1551,7 @@ export type ProblemDetails = {
1521
1551
  status: number;
1522
1552
  detail?: string;
1523
1553
  instance?: string;
1524
- 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_pending_limit" | "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" | "database_limit_reached" | "payload_too_large" | "rate_limited" | "build_capacity_reached" | "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" | "database_table_conflict" | "database_table_limit" | "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" | "reconciliation_not_pending" | "service_unavailable" | "source_commit_not_found" | "domain_hostname_taken" | "domain_ownership_required" | "domain_dns_conflict" | "data_change_blocked" | "data_change_in_progress" | "data_change_not_applicable" | "rollback_target_data_changed" | "project_domain_delete_required" | "native_domain_sync_pending" | "native_auth_launch_unavailable" | "native_auth_provider_unavailable" | "native_auth_epoch_exhausted" | "native_user_conflict" | "project_domains_conflict";
1554
+ 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_pending_limit" | "mail_domain_required" | "mail_capacity_unavailable" | "storage_jurisdiction_conflict" | "shared_data_requires_promotion" | "development_environment_exists" | "development_environment_missing" | "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" | "database_limit_reached" | "payload_too_large" | "rate_limited" | "build_capacity_reached" | "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" | "database_table_conflict" | "database_table_limit" | "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" | "reconciliation_not_pending" | "service_unavailable" | "source_commit_not_found" | "domain_hostname_taken" | "domain_ownership_required" | "domain_dns_conflict" | "data_change_blocked" | "data_change_in_progress" | "data_change_not_applicable" | "rollback_target_data_changed" | "project_domain_delete_required" | "native_domain_sync_pending" | "native_auth_launch_unavailable" | "native_auth_provider_unavailable" | "native_auth_epoch_exhausted" | "native_user_conflict" | "project_domains_conflict";
1525
1555
  request_id: string;
1526
1556
  retryable: boolean;
1527
1557
  /**
@@ -1557,6 +1587,7 @@ export type Operation = {
1557
1587
  * Current deployment dependency observation, separate from immutable operation history. Poll the same operation; mail readiness does not mean application activation.
1558
1588
  */
1559
1589
  export type OperationDeploymentProgress = {
1590
+ mail?: DeploymentMailProgress;
1560
1591
  /**
1561
1592
  * Actual successful build completion time when this operation ran a build; omitted for reused artifacts without a current build.
1562
1593
  */
@@ -1568,6 +1599,35 @@ export type OperationDeploymentProgress = {
1568
1599
  next_poll_after_seconds: 60;
1569
1600
  suggested_action: string;
1570
1601
  };
1602
+ /**
1603
+ * Current mail verification details, present only while waiting_for_mail. Follow these records without rebuilding the deployment.
1604
+ */
1605
+ export type DeploymentMailProgress = {
1606
+ domain: string;
1607
+ status: "configured" | "delegation_required" | "ready" | "verification_pending" | "verification_failed";
1608
+ configured_at: string;
1609
+ observed_at?: string;
1610
+ verification_issue?: "identity_missing" | "identity_verification_failed" | "dkim_verification_failed" | "dkim_records_changed" | "tenant_association_missing" | null;
1611
+ next_check_after_seconds?: 60 | 3600 | null;
1612
+ sending?: "disabled" | "pending" | "ready" | "failed";
1613
+ receiving?: "disabled" | "pending" | "ready" | "failed";
1614
+ dns_records: Array<{
1615
+ type: "MX" | "TXT" | "CNAME";
1616
+ name: string;
1617
+ value: string;
1618
+ status: string;
1619
+ priority?: number;
1620
+ }>;
1621
+ };
1622
+ /**
1623
+ * Validated migration metadata only; contains no SQL, values or PostgreSQL message. Statement index is one-based and is present only for a failed customer statement.
1624
+ */
1625
+ export type MigrationFailureDiagnostic = {
1626
+ reason: "catalog_changed" | "execution_failed" | "ledger_conflict" | "not_admitted";
1627
+ file: string | null;
1628
+ statement_index?: number;
1629
+ sqlstate?: string;
1630
+ };
1571
1631
  export type OperationReconciliation = {
1572
1632
  state: "required" | "pending";
1573
1633
  /**
@@ -1676,6 +1736,7 @@ export type ProjectExportArchive = {
1676
1736
  download_expires_at: string | null;
1677
1737
  };
1678
1738
  export type OperationFailure = {
1739
+ migration?: MigrationFailureDiagnostic;
1679
1740
  code: "operation_failed" | "operation_abandoned" | "authorization_changed" | "source_commit_conflict" | "source_snapshot_invalid" | "source_upload_expired" | "recovery_dispatch_failed" | "recovery_job_failed" | "recovery_input_expired" | "recovery_database_unavailable" | "recovery_checksum_mismatch" | "recovery_scope_unavailable" | "recovery_archive_too_large" | "build_not_started" | "build_failed" | "database_write_rejected" | "database_write_unavailable" | "database_write_outcome_unknown" | "database_compute_failed" | "database_compute_plan_changed" | "database_compute_rejected" | "database_migration_failed" | "insufficient_organization_credits" | "project_budget_exceeded" | "paid_plan_required" | "runtime_candidate_failed" | "runtime_candidate_rejected" | "storage_jurisdiction_conflict" | "provider_state_absent" | "auto_deploy_plan_rejected" | "promotion_source_stale" | "promotion_target_stale" | "project_handle_taken" | "managed_source_dispatch_failed";
1680
1741
  message: string;
1681
1742
  /**
@@ -1829,6 +1890,14 @@ export type DatabaseEnvironment = "dev" | "prod";
1829
1890
  * Database webhook identifier.
1830
1891
  */
1831
1892
  export type DatabaseWebhookId = string;
1893
+ /**
1894
+ * Stable, client-chosen subscription ULID.
1895
+ */
1896
+ export type DatabaseWebhookSubscriptionId = Ulid;
1897
+ /**
1898
+ * Positive activation generation, starting at one.
1899
+ */
1900
+ export type DatabaseWebhookGeneration = number;
1832
1901
  /**
1833
1902
  * Database webhook delivery identifier.
1834
1903
  */
@@ -5739,6 +5808,67 @@ export type SetProjectNotesResponses = {
5739
5808
  200: ProjectNotesReceipt;
5740
5809
  };
5741
5810
  export type SetProjectNotesResponse = SetProjectNotesResponses[keyof SetProjectNotesResponses];
5811
+ export type AddProjectDevelopmentEnvironmentData = {
5812
+ body: {
5813
+ [key: string]: never;
5814
+ };
5815
+ headers: {
5816
+ /**
5817
+ * Optional caller-provided correlation identifier.
5818
+ */
5819
+ "X-Request-Id"?: string;
5820
+ /**
5821
+ * Identifies one mutation and its canonical request payload.
5822
+ */
5823
+ "Idempotency-Key": string;
5824
+ };
5825
+ path: {
5826
+ /**
5827
+ * Project identifier.
5828
+ */
5829
+ project_id: Ulid;
5830
+ };
5831
+ query?: never;
5832
+ url: "/v1/projects/{project_id}/environments/dev";
5833
+ };
5834
+ export type AddProjectDevelopmentEnvironmentErrors = {
5835
+ /**
5836
+ * The request failed.
5837
+ */
5838
+ 400: ProblemDetails;
5839
+ /**
5840
+ * The request failed.
5841
+ */
5842
+ 401: ProblemDetails;
5843
+ /**
5844
+ * The request failed.
5845
+ */
5846
+ 403: ProblemDetails;
5847
+ /**
5848
+ * The resource does not exist or is not visible to the authenticated principal.
5849
+ */
5850
+ 404: ProblemDetails;
5851
+ /**
5852
+ * The request failed.
5853
+ */
5854
+ 409: ProblemDetails;
5855
+ /**
5856
+ * The request failed.
5857
+ */
5858
+ 429: ProblemDetails;
5859
+ /**
5860
+ * The request failed.
5861
+ */
5862
+ 503: ProblemDetails;
5863
+ };
5864
+ export type AddProjectDevelopmentEnvironmentError = AddProjectDevelopmentEnvironmentErrors[keyof AddProjectDevelopmentEnvironmentErrors];
5865
+ export type AddProjectDevelopmentEnvironmentResponses = {
5866
+ /**
5867
+ * The mutation was accepted for asynchronous processing.
5868
+ */
5869
+ 202: Operation;
5870
+ };
5871
+ export type AddProjectDevelopmentEnvironmentResponse = AddProjectDevelopmentEnvironmentResponses[keyof AddProjectDevelopmentEnvironmentResponses];
5742
5872
  export type GetProjectStatusData = {
5743
5873
  body?: never;
5744
5874
  headers?: {
@@ -8550,6 +8680,198 @@ export type DeleteProjectDatabaseWatchResponses = {
8550
8680
  200: DatabaseWatchDeleted;
8551
8681
  };
8552
8682
  export type DeleteProjectDatabaseWatchResponse = DeleteProjectDatabaseWatchResponses[keyof DeleteProjectDatabaseWatchResponses];
8683
+ export type GetDatabaseWebhookSubscriptionData = {
8684
+ body?: never;
8685
+ headers?: {
8686
+ /**
8687
+ * Optional caller-provided correlation identifier.
8688
+ */
8689
+ "X-Request-Id"?: string;
8690
+ };
8691
+ path: {
8692
+ /**
8693
+ * Project identifier.
8694
+ */
8695
+ project_id: Ulid;
8696
+ /**
8697
+ * Stable, client-chosen subscription ULID.
8698
+ */
8699
+ subscription_id: Ulid;
8700
+ };
8701
+ query: {
8702
+ /**
8703
+ * Application environment the mutation applies to.
8704
+ */
8705
+ environment: "dev" | "prod";
8706
+ };
8707
+ url: "/v1/projects/{project_id}/database/webhook-subscriptions/{subscription_id}";
8708
+ };
8709
+ export type GetDatabaseWebhookSubscriptionErrors = {
8710
+ /**
8711
+ * The request failed.
8712
+ */
8713
+ 400: ProblemDetails;
8714
+ /**
8715
+ * The request failed.
8716
+ */
8717
+ 401: ProblemDetails;
8718
+ /**
8719
+ * The resource does not exist or is not visible to the authenticated principal.
8720
+ */
8721
+ 404: ProblemDetails;
8722
+ /**
8723
+ * The request failed.
8724
+ */
8725
+ 429: ProblemDetails;
8726
+ /**
8727
+ * The request failed.
8728
+ */
8729
+ 503: ProblemDetails;
8730
+ };
8731
+ export type GetDatabaseWebhookSubscriptionError = GetDatabaseWebhookSubscriptionErrors[keyof GetDatabaseWebhookSubscriptionErrors];
8732
+ export type GetDatabaseWebhookSubscriptionResponses = {
8733
+ /**
8734
+ * Current subscription state, without secret.
8735
+ */
8736
+ 200: DatabaseWebhookSubscription;
8737
+ };
8738
+ export type GetDatabaseWebhookSubscriptionResponse = GetDatabaseWebhookSubscriptionResponses[keyof GetDatabaseWebhookSubscriptionResponses];
8739
+ export type DeactivateDatabaseWebhookSubscriptionData = {
8740
+ body?: never;
8741
+ headers: {
8742
+ /**
8743
+ * Optional caller-provided correlation identifier.
8744
+ */
8745
+ "X-Request-Id"?: string;
8746
+ /**
8747
+ * Identifies one mutation and its canonical request payload.
8748
+ */
8749
+ "Idempotency-Key": string;
8750
+ };
8751
+ path: {
8752
+ /**
8753
+ * Project identifier.
8754
+ */
8755
+ project_id: Ulid;
8756
+ /**
8757
+ * Stable, client-chosen subscription ULID.
8758
+ */
8759
+ subscription_id: Ulid;
8760
+ /**
8761
+ * Positive activation generation, starting at one.
8762
+ */
8763
+ generation: number;
8764
+ };
8765
+ query: {
8766
+ /**
8767
+ * Application environment the mutation applies to.
8768
+ */
8769
+ environment: "dev" | "prod";
8770
+ };
8771
+ url: "/v1/projects/{project_id}/database/webhook-subscriptions/{subscription_id}/activations/{generation}";
8772
+ };
8773
+ export type DeactivateDatabaseWebhookSubscriptionErrors = {
8774
+ /**
8775
+ * The request failed.
8776
+ */
8777
+ 400: ProblemDetails;
8778
+ /**
8779
+ * The request failed.
8780
+ */
8781
+ 401: ProblemDetails;
8782
+ /**
8783
+ * The resource does not exist or is not visible to the authenticated principal.
8784
+ */
8785
+ 404: ProblemDetails;
8786
+ /**
8787
+ * The request failed.
8788
+ */
8789
+ 409: ProblemDetails;
8790
+ /**
8791
+ * The request failed.
8792
+ */
8793
+ 429: ProblemDetails;
8794
+ /**
8795
+ * The request failed.
8796
+ */
8797
+ 503: ProblemDetails;
8798
+ };
8799
+ export type DeactivateDatabaseWebhookSubscriptionError = DeactivateDatabaseWebhookSubscriptionErrors[keyof DeactivateDatabaseWebhookSubscriptionErrors];
8800
+ export type DeactivateDatabaseWebhookSubscriptionResponses = {
8801
+ /**
8802
+ * The confirmed inactive generation, without its secret.
8803
+ */
8804
+ 200: DatabaseWebhookSubscription;
8805
+ };
8806
+ export type DeactivateDatabaseWebhookSubscriptionResponse = DeactivateDatabaseWebhookSubscriptionResponses[keyof DeactivateDatabaseWebhookSubscriptionResponses];
8807
+ export type ActivateDatabaseWebhookSubscriptionData = {
8808
+ body: DatabaseWebhookCreateRequest;
8809
+ headers: {
8810
+ /**
8811
+ * Optional caller-provided correlation identifier.
8812
+ */
8813
+ "X-Request-Id"?: string;
8814
+ /**
8815
+ * Identifies one mutation and its canonical request payload.
8816
+ */
8817
+ "Idempotency-Key": string;
8818
+ };
8819
+ path: {
8820
+ /**
8821
+ * Project identifier.
8822
+ */
8823
+ project_id: Ulid;
8824
+ /**
8825
+ * Stable, client-chosen subscription ULID.
8826
+ */
8827
+ subscription_id: Ulid;
8828
+ /**
8829
+ * Positive activation generation, starting at one.
8830
+ */
8831
+ generation: number;
8832
+ };
8833
+ query: {
8834
+ /**
8835
+ * Application environment the mutation applies to.
8836
+ */
8837
+ environment: "dev" | "prod";
8838
+ };
8839
+ url: "/v1/projects/{project_id}/database/webhook-subscriptions/{subscription_id}/activations/{generation}";
8840
+ };
8841
+ export type ActivateDatabaseWebhookSubscriptionErrors = {
8842
+ /**
8843
+ * The request failed.
8844
+ */
8845
+ 400: ProblemDetails;
8846
+ /**
8847
+ * The request failed.
8848
+ */
8849
+ 401: ProblemDetails;
8850
+ /**
8851
+ * The resource does not exist or is not visible to the authenticated principal.
8852
+ */
8853
+ 404: ProblemDetails;
8854
+ /**
8855
+ * The request failed.
8856
+ */
8857
+ 409: ProblemDetails;
8858
+ /**
8859
+ * The request failed.
8860
+ */
8861
+ 429: ProblemDetails;
8862
+ /**
8863
+ * The request failed.
8864
+ */
8865
+ 503: ProblemDetails;
8866
+ };
8867
+ export type ActivateDatabaseWebhookSubscriptionError = ActivateDatabaseWebhookSubscriptionErrors[keyof ActivateDatabaseWebhookSubscriptionErrors];
8868
+ export type ActivateDatabaseWebhookSubscriptionResponses = {
8869
+ /**
8870
+ * Active generation with its signing secret; only this exact activation or retry returns it.
8871
+ */
8872
+ 200: DatabaseWebhookSubscriptionActivation;
8873
+ };
8874
+ export type ActivateDatabaseWebhookSubscriptionResponse = ActivateDatabaseWebhookSubscriptionResponses[keyof ActivateDatabaseWebhookSubscriptionResponses];
8553
8875
  export type ListProjectDatabaseWebhooksData = {
8554
8876
  body?: never;
8555
8877
  headers?: {