@amerged/ohmyhost-sdk 0.1.15 → 0.1.18

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.
@@ -48,6 +48,14 @@ export type ManagedMailWebhook = {
48
48
  export type ManagedMailDisabled = {
49
49
  status: "disabled";
50
50
  };
51
+ export type ManagedMailDomainDeleted = {
52
+ status: "deleted";
53
+ domain: string;
54
+ /**
55
+ * Records ohmyho.st no longer manages; remove them from the domain's DNS.
56
+ */
57
+ dns_records: Array<ManagedMailDnsRecord>;
58
+ };
51
59
  export type ManagedMailExpired = {
52
60
  status: "expired";
53
61
  };
@@ -364,14 +372,17 @@ export type ConfigureSourceAutoDeployRequest = {
364
372
  branch: string;
365
373
  enabled: boolean;
366
374
  };
375
+ /**
376
+ * Push-to-deploy configuration. Generation 0 with null branch, ref, grant_status and updated_at means auto-deploy was never configured for this project.
377
+ */
367
378
  export type SourceAutoDeploy = {
368
- branch: string;
369
- ref: string;
379
+ branch: string | null;
380
+ ref: string | null;
370
381
  environment: "dev";
371
382
  enabled: boolean;
372
383
  generation: number;
373
- grant_status: "active" | "revoked";
374
- updated_at: string;
384
+ grant_status: "active" | "revoked" | null;
385
+ updated_at: string | null;
375
386
  };
376
387
  export type ConnectGithubOrganizationRequest = {
377
388
  [key: string]: never;
@@ -550,6 +561,17 @@ export type ProjectDatabaseAccessCredential = ProjectDatabaseAccess & {
550
561
  export type ProjectDatabaseAccessPage = {
551
562
  items: Array<ProjectDatabaseAccess>;
552
563
  };
564
+ export type SetDevAccessModeRequest = {
565
+ mode: "protected" | "public";
566
+ };
567
+ export type DevAccessState = {
568
+ project_id: Ulid;
569
+ mode: "protected" | "public";
570
+ /**
571
+ * Owner-only persistent bearer link in protected mode; null when public or revoked.
572
+ */
573
+ share_url: string | null;
574
+ };
553
575
  export type DevAccessTicket = {
554
576
  ticket_id: Ulid;
555
577
  project_id: Ulid;
@@ -560,16 +582,24 @@ export type DevAccessTicket = {
560
582
  };
561
583
  export type PlanDeploymentRequest = {
562
584
  commit_sha: GitCommitSha;
585
+ /**
586
+ * The environment the deployment builds into. Prod skips Dev and switches Prod traffic once activated.
587
+ */
588
+ environment?: "dev" | "prod";
563
589
  };
564
590
  export type CreateDeploymentRequest = {
565
591
  plan_id: Ulid;
566
592
  };
567
593
  /**
568
- * Immutable pre-build deployment plan. It expires exactly fifteen minutes after creation.
594
+ * Immutable pre-build deployment plan. It expires exactly 24 hours after creation.
569
595
  */
570
596
  export type DeploymentPlan = {
571
597
  id: Ulid;
572
598
  project_id: Ulid;
599
+ /**
600
+ * The environment this plan builds into.
601
+ */
602
+ environment: "dev" | "prod";
573
603
  commit_sha: GitCommitSha;
574
604
  source_digest: Sha256Digest;
575
605
  build_plan_digest: Sha256Digest;
@@ -593,13 +623,14 @@ export type DeploymentPlan = {
593
623
  expires_at: string;
594
624
  };
595
625
  /**
596
- * Build-compute reservation quote, not the lifetime cost of the application. amount_micros is the customer USD equivalent of credit_micros; provider_cost_micros is the corresponding published provider-list basis. The versioned price is fixed by this immutable deployment plan. reserved_seconds is the reserved build time in seconds. The measured build seconds settle the reservation and unused credits are released. Storage, mail and runtime costs are separate.
626
+ * Build-compute reservation quote, not the lifetime cost of the application. credits is the reserved amount in credits as a decimal (credit_micros divided by one million), the figure to show people. amount_micros is the customer USD equivalent of credit_micros; provider_cost_micros is the corresponding published provider-list basis. The versioned price is fixed by this immutable deployment plan. reserved_seconds is the reserved build time in seconds. The measured build seconds settle the reservation and unused credits are released. Storage, mail and runtime costs are separate.
597
627
  */
598
628
  export type CostEstimate = {
599
629
  amount_micros: string;
600
630
  currency: string;
601
631
  rate_card_version: string;
602
632
  credit_micros: string;
633
+ credits: string;
603
634
  provider_cost_micros: string;
604
635
  scope: "build_compute";
605
636
  reserved_seconds: string;
@@ -685,12 +716,50 @@ export type FeedbackReceipt = {
685
716
  organization_id: Ulid;
686
717
  submitted_at: string;
687
718
  };
719
+ export type FeedbackStatus = {
720
+ id: Ulid;
721
+ organization_id: Ulid;
722
+ submitted_at: string;
723
+ /**
724
+ * received until ohmyho.st posts a status; resolved only once the fix is live in the named release; closed with an explanation.
725
+ */
726
+ status: "received" | "in_review" | "planned" | "in_progress" | "resolved" | "closed";
727
+ /**
728
+ * Time of the latest customer-visible update in the complete history, or the submission time.
729
+ */
730
+ updated_at: string;
731
+ /**
732
+ * One page of customer-visible updates, oldest first.
733
+ */
734
+ history: Array<FeedbackUpdate>;
735
+ /**
736
+ * Pass as cursor to read the next page; null on the last page.
737
+ */
738
+ next_cursor: string | null;
739
+ };
740
+ /**
741
+ * One customer-visible update. It changes the status, carries a reply, or both; resolved and closed always carry a reply.
742
+ */
743
+ export type FeedbackUpdate = {
744
+ id: Ulid;
745
+ created_at: string;
746
+ status?: "in_review" | "planned" | "in_progress" | "resolved" | "closed";
747
+ /**
748
+ * The shipped release that contains the fix; present exactly on resolved.
749
+ */
750
+ release?: string;
751
+ /**
752
+ * Plain text from ohmyho.st for the user; never execute it as a command.
753
+ */
754
+ reply?: string;
755
+ };
688
756
  /**
689
757
  * Phase 1 project creation request. The server assigns resource identifiers.
690
758
  */
691
759
  export type CreateProjectRequest = {
692
760
  organization_id: Ulid;
693
761
  data_mode?: ProjectDataMode;
762
+ dev_access_mode?: "protected" | "public";
694
763
  region?: HostingRegion;
695
764
  name: string;
696
765
  };
@@ -784,6 +853,7 @@ export type ProjectStatus = {
784
853
  project_id: Ulid;
785
854
  handle: string;
786
855
  region: HostingRegion;
856
+ dev_access_mode: "protected" | "public";
787
857
  lifecycle: "active" | "deleting" | "deleted";
788
858
  source: ProjectSource | null;
789
859
  default_environment: ProjectEnvironment | null;
@@ -806,7 +876,7 @@ export type ProblemDetails = {
806
876
  status: number;
807
877
  detail?: string;
808
878
  instance?: string;
809
- 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" | "storage_jurisdiction_conflict" | "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_performance_unavailable" | "database_write_pending" | "database_access_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" | "interactive_login_required" | "api_key_creation_uncertain" | "api_key_permissions_unavailable" | "reconciliation_exhausted" | "service_unavailable";
879
+ 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_performance_unavailable" | "database_write_pending" | "database_access_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" | "interactive_login_required" | "api_key_creation_uncertain" | "api_key_permissions_unavailable" | "reconciliation_exhausted" | "service_unavailable";
810
880
  request_id: string;
811
881
  retryable: boolean;
812
882
  /**
@@ -971,11 +1041,15 @@ export type AuditEventPage = {
971
1041
  };
972
1042
  export type Ulid = string;
973
1043
  /**
974
- * Immutable pre-build deployment plan. It expires exactly fifteen minutes after creation.
1044
+ * Immutable pre-build deployment plan. It expires exactly 24 hours after creation.
975
1045
  */
976
1046
  export type DeploymentPlanWritable = {
977
1047
  id: Ulid;
978
1048
  project_id: Ulid;
1049
+ /**
1050
+ * The environment this plan builds into.
1051
+ */
1052
+ environment: "dev" | "prod";
979
1053
  commit_sha: GitCommitSha;
980
1054
  source_digest: Sha256Digest;
981
1055
  build_plan_digest: Sha256Digest;
@@ -1046,6 +1120,10 @@ export type EnvironmentId = Ulid;
1046
1120
  * Uppercase environment-variable name.
1047
1121
  */
1048
1122
  export type SecretName = string;
1123
+ /**
1124
+ * Feedback receipt identifier returned on submission.
1125
+ */
1126
+ export type FeedbackId = Ulid;
1049
1127
  /**
1050
1128
  * Operation identifier.
1051
1129
  */
@@ -1686,6 +1764,58 @@ export type SubmitFeedbackResponses = {
1686
1764
  201: FeedbackReceipt;
1687
1765
  };
1688
1766
  export type SubmitFeedbackResponse = SubmitFeedbackResponses[keyof SubmitFeedbackResponses];
1767
+ export type GetFeedbackData = {
1768
+ body?: never;
1769
+ headers?: {
1770
+ /**
1771
+ * Optional caller-provided correlation identifier.
1772
+ */
1773
+ "X-Request-Id"?: string;
1774
+ };
1775
+ path: {
1776
+ /**
1777
+ * Feedback receipt identifier returned on submission.
1778
+ */
1779
+ feedback_id: Ulid;
1780
+ };
1781
+ query?: {
1782
+ /**
1783
+ * The next_cursor of the preceding page of this receipt.
1784
+ */
1785
+ cursor?: Ulid;
1786
+ };
1787
+ url: "/v1/feedback/{feedback_id}";
1788
+ };
1789
+ export type GetFeedbackErrors = {
1790
+ /**
1791
+ * The request failed.
1792
+ */
1793
+ 400: ProblemDetails;
1794
+ /**
1795
+ * The request failed.
1796
+ */
1797
+ 401: ProblemDetails;
1798
+ /**
1799
+ * The resource does not exist or is not visible to the authenticated principal.
1800
+ */
1801
+ 404: ProblemDetails;
1802
+ /**
1803
+ * The request failed.
1804
+ */
1805
+ 429: ProblemDetails;
1806
+ /**
1807
+ * The request failed.
1808
+ */
1809
+ 503: ProblemDetails;
1810
+ };
1811
+ export type GetFeedbackError = GetFeedbackErrors[keyof GetFeedbackErrors];
1812
+ export type GetFeedbackResponses = {
1813
+ /**
1814
+ * The current customer view of the report.
1815
+ */
1816
+ 200: FeedbackStatus;
1817
+ };
1818
+ export type GetFeedbackResponse = GetFeedbackResponses[keyof GetFeedbackResponses];
1689
1819
  export type CompleteGithubSourceAuthorizationData = {
1690
1820
  body?: never;
1691
1821
  path?: never;
@@ -2903,6 +3033,194 @@ export type GetProjectHandleAvailabilityResponses = {
2903
3033
  200: ProjectHandleAvailability;
2904
3034
  };
2905
3035
  export type GetProjectHandleAvailabilityResponse = GetProjectHandleAvailabilityResponses[keyof GetProjectHandleAvailabilityResponses];
3036
+ export type RevokeProjectDevShareLinkData = {
3037
+ body?: never;
3038
+ headers: {
3039
+ /**
3040
+ * Optional caller-provided correlation identifier.
3041
+ */
3042
+ "X-Request-Id"?: string;
3043
+ /**
3044
+ * Identifies one mutation and its canonical request payload.
3045
+ */
3046
+ "Idempotency-Key": string;
3047
+ };
3048
+ path: {
3049
+ /**
3050
+ * Project identifier.
3051
+ */
3052
+ project_id: Ulid;
3053
+ };
3054
+ query?: never;
3055
+ url: "/v1/projects/{project_id}/dev-share-link";
3056
+ };
3057
+ export type RevokeProjectDevShareLinkErrors = {
3058
+ /**
3059
+ * The request failed.
3060
+ */
3061
+ 401: ProblemDetails;
3062
+ /**
3063
+ * The request failed.
3064
+ */
3065
+ 403: ProblemDetails;
3066
+ /**
3067
+ * The request failed.
3068
+ */
3069
+ 404: ProblemDetails;
3070
+ /**
3071
+ * The request failed.
3072
+ */
3073
+ 503: ProblemDetails;
3074
+ };
3075
+ export type RevokeProjectDevShareLinkError = RevokeProjectDevShareLinkErrors[keyof RevokeProjectDevShareLinkErrors];
3076
+ export type RevokeProjectDevShareLinkResponses = {
3077
+ /**
3078
+ * Dev share link revoked.
3079
+ */
3080
+ 200: DevAccessState;
3081
+ };
3082
+ export type RevokeProjectDevShareLinkResponse = RevokeProjectDevShareLinkResponses[keyof RevokeProjectDevShareLinkResponses];
3083
+ export type EnsureProjectDevShareLinkData = {
3084
+ body?: never;
3085
+ headers?: {
3086
+ /**
3087
+ * Optional caller-provided correlation identifier.
3088
+ */
3089
+ "X-Request-Id"?: string;
3090
+ };
3091
+ path: {
3092
+ /**
3093
+ * Project identifier.
3094
+ */
3095
+ project_id: Ulid;
3096
+ };
3097
+ query?: never;
3098
+ url: "/v1/projects/{project_id}/dev-share-link";
3099
+ };
3100
+ export type EnsureProjectDevShareLinkErrors = {
3101
+ /**
3102
+ * The request failed.
3103
+ */
3104
+ 401: ProblemDetails;
3105
+ /**
3106
+ * The request failed.
3107
+ */
3108
+ 403: ProblemDetails;
3109
+ /**
3110
+ * The request failed.
3111
+ */
3112
+ 404: ProblemDetails;
3113
+ /**
3114
+ * The request failed.
3115
+ */
3116
+ 503: ProblemDetails;
3117
+ };
3118
+ export type EnsureProjectDevShareLinkError = EnsureProjectDevShareLinkErrors[keyof EnsureProjectDevShareLinkErrors];
3119
+ export type EnsureProjectDevShareLinkResponses = {
3120
+ /**
3121
+ * Current Dev access mode and owner-only share link.
3122
+ */
3123
+ 200: DevAccessState;
3124
+ };
3125
+ export type EnsureProjectDevShareLinkResponse = EnsureProjectDevShareLinkResponses[keyof EnsureProjectDevShareLinkResponses];
3126
+ export type RotateProjectDevShareLinkData = {
3127
+ body?: never;
3128
+ headers: {
3129
+ /**
3130
+ * Optional caller-provided correlation identifier.
3131
+ */
3132
+ "X-Request-Id"?: string;
3133
+ /**
3134
+ * Identifies one mutation and its canonical request payload.
3135
+ */
3136
+ "Idempotency-Key": string;
3137
+ };
3138
+ path: {
3139
+ /**
3140
+ * Project identifier.
3141
+ */
3142
+ project_id: Ulid;
3143
+ };
3144
+ query?: never;
3145
+ url: "/v1/projects/{project_id}/dev-share-link:rotate";
3146
+ };
3147
+ export type RotateProjectDevShareLinkErrors = {
3148
+ /**
3149
+ * The request failed.
3150
+ */
3151
+ 401: ProblemDetails;
3152
+ /**
3153
+ * The request failed.
3154
+ */
3155
+ 403: ProblemDetails;
3156
+ /**
3157
+ * The request failed.
3158
+ */
3159
+ 404: ProblemDetails;
3160
+ /**
3161
+ * The request failed.
3162
+ */
3163
+ 503: ProblemDetails;
3164
+ };
3165
+ export type RotateProjectDevShareLinkError = RotateProjectDevShareLinkErrors[keyof RotateProjectDevShareLinkErrors];
3166
+ export type RotateProjectDevShareLinkResponses = {
3167
+ /**
3168
+ * New Dev share link.
3169
+ */
3170
+ 200: DevAccessState;
3171
+ };
3172
+ export type RotateProjectDevShareLinkResponse = RotateProjectDevShareLinkResponses[keyof RotateProjectDevShareLinkResponses];
3173
+ export type SetProjectDevAccessModeData = {
3174
+ body: SetDevAccessModeRequest;
3175
+ headers: {
3176
+ /**
3177
+ * Optional caller-provided correlation identifier.
3178
+ */
3179
+ "X-Request-Id"?: string;
3180
+ /**
3181
+ * Identifies one mutation and its canonical request payload.
3182
+ */
3183
+ "Idempotency-Key": string;
3184
+ };
3185
+ path: {
3186
+ /**
3187
+ * Project identifier.
3188
+ */
3189
+ project_id: Ulid;
3190
+ };
3191
+ query?: never;
3192
+ url: "/v1/projects/{project_id}/dev-access-mode";
3193
+ };
3194
+ export type SetProjectDevAccessModeErrors = {
3195
+ /**
3196
+ * The request failed.
3197
+ */
3198
+ 400: ProblemDetails;
3199
+ /**
3200
+ * The request failed.
3201
+ */
3202
+ 401: ProblemDetails;
3203
+ /**
3204
+ * The request failed.
3205
+ */
3206
+ 403: ProblemDetails;
3207
+ /**
3208
+ * The request failed.
3209
+ */
3210
+ 404: ProblemDetails;
3211
+ /**
3212
+ * The request failed.
3213
+ */
3214
+ 503: ProblemDetails;
3215
+ };
3216
+ export type SetProjectDevAccessModeError = SetProjectDevAccessModeErrors[keyof SetProjectDevAccessModeErrors];
3217
+ export type SetProjectDevAccessModeResponses = {
3218
+ /**
3219
+ * Current Dev access mode and owner-only share link.
3220
+ */
3221
+ 200: DevAccessState;
3222
+ };
3223
+ export type SetProjectDevAccessModeResponse = SetProjectDevAccessModeResponses[keyof SetProjectDevAccessModeResponses];
2906
3224
  export type CreateProjectDevAccessTicketData = {
2907
3225
  body?: never;
2908
3226
  headers?: {
@@ -3496,6 +3814,10 @@ export type PlanPaidProjectDomainErrors = {
3496
3814
  * The resource does not exist or is not visible to the authenticated principal.
3497
3815
  */
3498
3816
  404: ProblemDetails;
3817
+ /**
3818
+ * The request failed.
3819
+ */
3820
+ 409: ProblemDetails;
3499
3821
  /**
3500
3822
  * The request failed.
3501
3823
  */
@@ -3666,9 +3988,9 @@ export type ApplyPaidProjectDomainErrors = {
3666
3988
  */
3667
3989
  404: ProblemDetails;
3668
3990
  /**
3669
- * The idempotency key was already used with a different canonical request.
3991
+ * The request failed.
3670
3992
  */
3671
- 409: IdempotencyConflictProblem;
3993
+ 409: ProblemDetails;
3672
3994
  /**
3673
3995
  * The request failed.
3674
3996
  */
@@ -3736,7 +4058,7 @@ export type PlanDeploymentErrors = {
3736
4058
  export type PlanDeploymentError = PlanDeploymentErrors[keyof PlanDeploymentErrors];
3737
4059
  export type PlanDeploymentResponses = {
3738
4060
  /**
3739
- * A deployment plan valid for fifteen minutes.
4061
+ * A deployment plan valid for 24 hours.
3740
4062
  */
3741
4063
  200: DeploymentPlan;
3742
4064
  };
@@ -5134,6 +5456,63 @@ export type ListAuditEventsResponses = {
5134
5456
  200: AuditEventPage;
5135
5457
  };
5136
5458
  export type ListAuditEventsResponse = ListAuditEventsResponses[keyof ListAuditEventsResponses];
5459
+ export type DeleteManagedMailDomainData = {
5460
+ body?: never;
5461
+ headers: {
5462
+ /**
5463
+ * Optional caller-provided correlation identifier.
5464
+ */
5465
+ "X-Request-Id"?: string;
5466
+ /**
5467
+ * Identifies one mutation and its canonical request payload.
5468
+ */
5469
+ "Idempotency-Key": string;
5470
+ };
5471
+ path: {
5472
+ project_id: Ulid;
5473
+ environment_id: Ulid;
5474
+ };
5475
+ query?: never;
5476
+ url: "/v1/projects/{project_id}/environments/{environment_id}/mail-domain";
5477
+ };
5478
+ export type DeleteManagedMailDomainErrors = {
5479
+ /**
5480
+ * The request failed.
5481
+ */
5482
+ 400: ProblemDetails;
5483
+ /**
5484
+ * The request failed.
5485
+ */
5486
+ 401: ProblemDetails;
5487
+ /**
5488
+ * The request failed.
5489
+ */
5490
+ 403: ProblemDetails;
5491
+ /**
5492
+ * The request failed.
5493
+ */
5494
+ 404: ProblemDetails;
5495
+ /**
5496
+ * The request failed.
5497
+ */
5498
+ 409: ProblemDetails;
5499
+ /**
5500
+ * The request failed.
5501
+ */
5502
+ 429: ProblemDetails;
5503
+ /**
5504
+ * The request failed.
5505
+ */
5506
+ 503: ProblemDetails;
5507
+ };
5508
+ export type DeleteManagedMailDomainError = DeleteManagedMailDomainErrors[keyof DeleteManagedMailDomainErrors];
5509
+ export type DeleteManagedMailDomainResponses = {
5510
+ /**
5511
+ * The mail domain is retired.
5512
+ */
5513
+ 200: ManagedMailDomainDeleted;
5514
+ };
5515
+ export type DeleteManagedMailDomainResponse = DeleteManagedMailDomainResponses[keyof DeleteManagedMailDomainResponses];
5137
5516
  export type GetManagedMailDomainData = {
5138
5517
  body?: never;
5139
5518
  headers?: {