@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amerged/ohmyhost-sdk",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohmyhost/sdk-ts",
3
- "version": "0.1.56",
3
+ "version": "0.1.57",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,8 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
3
  export {
4
+ activateDatabaseWebhookSubscription,
5
+ addProjectDevelopmentEnvironment,
4
6
  applyPaidProjectDomain,
5
7
  authorizeApplicationDomainIdentityDns,
6
8
  authorizeWorkspaceMailDomainDns,
@@ -33,6 +35,7 @@ export {
33
35
  createProjectExportDownloadLink,
34
36
  createUserApiKey,
35
37
  createWorkspaceMailDomain,
38
+ deactivateDatabaseWebhookSubscription,
36
39
  declareApplicationDomainIdentity,
37
40
  deleteEnvironmentSecret,
38
41
  deleteManagedMailDomain,
@@ -55,6 +58,7 @@ export {
55
58
  getCloudflareDnsAuthorizationStatus,
56
59
  getCurrentIdentity,
57
60
  getDatabaseCompute,
61
+ getDatabaseWebhookSubscription,
58
62
  getDeployment,
59
63
  getDeploymentLogs,
60
64
  getFeatureInterests,
@@ -165,6 +169,16 @@ export {
165
169
  } from "./sdk.gen.js";
166
170
  export type {
167
171
  AccountProfile,
172
+ ActivateDatabaseWebhookSubscriptionData,
173
+ ActivateDatabaseWebhookSubscriptionError,
174
+ ActivateDatabaseWebhookSubscriptionErrors,
175
+ ActivateDatabaseWebhookSubscriptionResponse,
176
+ ActivateDatabaseWebhookSubscriptionResponses,
177
+ AddProjectDevelopmentEnvironmentData,
178
+ AddProjectDevelopmentEnvironmentError,
179
+ AddProjectDevelopmentEnvironmentErrors,
180
+ AddProjectDevelopmentEnvironmentResponse,
181
+ AddProjectDevelopmentEnvironmentResponses,
168
182
  ApplicationDomainIdentity,
169
183
  ApplicationDomainIdentityRequest,
170
184
  ApplicationDomainIdentitySummary,
@@ -388,10 +402,19 @@ export type {
388
402
  DatabaseWebhookEventPattern,
389
403
  DatabaseWebhookEventPatternWritable,
390
404
  DatabaseWebhookEventType,
405
+ DatabaseWebhookGeneration,
391
406
  DatabaseWebhookId,
392
407
  DatabaseWebhookPage,
393
408
  DatabaseWebhookReplayAccepted,
409
+ DatabaseWebhookSubscription,
410
+ DatabaseWebhookSubscriptionActivation,
411
+ DatabaseWebhookSubscriptionId,
394
412
  DatabaseWebhookTestResult,
413
+ DeactivateDatabaseWebhookSubscriptionData,
414
+ DeactivateDatabaseWebhookSubscriptionError,
415
+ DeactivateDatabaseWebhookSubscriptionErrors,
416
+ DeactivateDatabaseWebhookSubscriptionResponse,
417
+ DeactivateDatabaseWebhookSubscriptionResponses,
395
418
  DeclareApplicationDomainIdentityData,
396
419
  DeclareApplicationDomainIdentityError,
397
420
  DeclareApplicationDomainIdentityErrors,
@@ -444,6 +467,7 @@ export type {
444
467
  DeploymentDiagnosticPage,
445
468
  DeploymentId,
446
469
  DeploymentLimit,
470
+ DeploymentMailProgress,
447
471
  DeploymentPage,
448
472
  DeploymentPlan,
449
473
  DeploymentPlanWritable,
@@ -527,6 +551,11 @@ export type {
527
551
  GetDatabaseComputeErrors,
528
552
  GetDatabaseComputeResponse,
529
553
  GetDatabaseComputeResponses,
554
+ GetDatabaseWebhookSubscriptionData,
555
+ GetDatabaseWebhookSubscriptionError,
556
+ GetDatabaseWebhookSubscriptionErrors,
557
+ GetDatabaseWebhookSubscriptionResponse,
558
+ GetDatabaseWebhookSubscriptionResponses,
530
559
  GetDeploymentData,
531
560
  GetDeploymentError,
532
561
  GetDeploymentErrors,
@@ -838,6 +867,7 @@ export type {
838
867
  ManagedSourceUploadReceipt,
839
868
  ManagedSourceUploadRequest,
840
869
  ManagedSourceVersions,
870
+ MigrationFailureDiagnostic,
841
871
  NativeAuthConfiguration,
842
872
  NativeAuthConfigurationUpdate,
843
873
  NativeAuthProviderStatus,
@@ -11,6 +11,10 @@ import {
11
11
  type TDataShape,
12
12
  } from "./client/index.js";
13
13
  import type {
14
+ ActivateDatabaseWebhookSubscriptionErrors,
15
+ ActivateDatabaseWebhookSubscriptionResponses,
16
+ AddProjectDevelopmentEnvironmentErrors,
17
+ AddProjectDevelopmentEnvironmentResponses,
14
18
  ApplicationDomainIdentityRequest,
15
19
  ApplyPaidProjectDomainErrors,
16
20
  ApplyPaidProjectDomainResponses,
@@ -88,6 +92,8 @@ import type {
88
92
  DatabaseTableCreateRequest,
89
93
  DatabaseWatchCreateRequest,
90
94
  DatabaseWebhookCreateRequest,
95
+ DeactivateDatabaseWebhookSubscriptionErrors,
96
+ DeactivateDatabaseWebhookSubscriptionResponses,
91
97
  DeclareApplicationDomainIdentityErrors,
92
98
  DeclareApplicationDomainIdentityResponses,
93
99
  DeleteEnvironmentSecretErrors,
@@ -133,6 +139,8 @@ import type {
133
139
  GetCurrentIdentityResponses,
134
140
  GetDatabaseComputeErrors,
135
141
  GetDatabaseComputeResponses,
142
+ GetDatabaseWebhookSubscriptionErrors,
143
+ GetDatabaseWebhookSubscriptionResponses,
136
144
  GetDeploymentErrors,
137
145
  GetDeploymentLogsErrors,
138
146
  GetDeploymentLogsResponses,
@@ -3495,6 +3503,59 @@ export const setProjectNotes = <ThrowOnError extends boolean = true>(
3495
3503
  });
3496
3504
  };
3497
3505
 
3506
+ /**
3507
+ * Add Dev to a production-only project
3508
+ *
3509
+ * Creates a Dev environment without changing Prod. Shared data reuses the current Prod data assignment; isolated data receives its own assignment. An identical idempotent retry returns the original accepted operation. Projects that already have Dev return development_environment_exists.
3510
+ */
3511
+ export const addProjectDevelopmentEnvironment = <ThrowOnError extends boolean = true>(
3512
+ parameters: {
3513
+ "X-Request-Id"?: string;
3514
+ "Idempotency-Key": string;
3515
+ project_id: Ulid;
3516
+ body: {
3517
+ [key: string]: never;
3518
+ };
3519
+ },
3520
+ options?: Options<never, ThrowOnError>,
3521
+ ): RequestResult<
3522
+ AddProjectDevelopmentEnvironmentResponses,
3523
+ AddProjectDevelopmentEnvironmentErrors,
3524
+ ThrowOnError,
3525
+ "data"
3526
+ > => {
3527
+ const params = buildClientParams(
3528
+ [parameters],
3529
+ [
3530
+ {
3531
+ args: [
3532
+ { in: "headers", key: "X-Request-Id" },
3533
+ { in: "headers", key: "Idempotency-Key" },
3534
+ { in: "path", key: "project_id" },
3535
+ { key: "body", map: "body" },
3536
+ ],
3537
+ },
3538
+ ],
3539
+ );
3540
+ return (options?.client ?? client).post<
3541
+ AddProjectDevelopmentEnvironmentResponses,
3542
+ AddProjectDevelopmentEnvironmentErrors,
3543
+ ThrowOnError,
3544
+ "data"
3545
+ >({
3546
+ responseStyle: "data",
3547
+ security: [{ scheme: "bearer", type: "http" }],
3548
+ url: "/v1/projects/{project_id}/environments/dev",
3549
+ ...options,
3550
+ ...params,
3551
+ headers: {
3552
+ "Content-Type": "application/json",
3553
+ ...options?.headers,
3554
+ ...params.headers,
3555
+ },
3556
+ });
3557
+ };
3558
+
3498
3559
  /**
3499
3560
  * Get the current project deployment status
3500
3561
  *
@@ -4986,7 +5047,7 @@ export const applyPaidProjectDomain = <ThrowOnError extends boolean = true>(
4986
5047
  /**
4987
5048
  * Plan a deployment
4988
5049
  *
4989
- * Resolves immutable inputs and estimates effects without provider mutation or billable work. The plan targets Dev unless `environment` is `prod`; a Prod plan builds straight into Prod, except that a project with shared data and a database only reaches Prod through promotion. Managed mail requires a confirmed Paid service period; it is checked again before build reservation. Selecting the managed Better Auth bridge does not require managed mail or Paid access. An old sender configuration is not Paid authority. A commit the platform does not admit answers 409 with a nonretryable problem code; for framework_conversion_required, detail is a fixed catalog sentence that names the file, the rule and the required change whenever the refusal is typed.
5050
+ * Resolves immutable inputs and estimates effects without provider mutation or billable work. An omitted `environment` selects Dev when it exists, otherwise Prod. A Prod plan builds straight into Prod, including for a project with shared data; database migrations then affect both environments when Dev exists. Managed mail requires a confirmed Paid service period; it is checked again before build reservation. Selecting the managed Better Auth bridge does not require managed mail or Paid access. An old sender configuration is not Paid authority. A commit the platform does not admit answers 409 with a nonretryable problem code; for framework_conversion_required, detail is a fixed catalog sentence that names the file, the rule and the required change whenever the refusal is typed.
4990
5051
  */
4991
5052
  export const planDeployment = <ThrowOnError extends boolean = true>(
4992
5053
  parameters: {
@@ -5755,6 +5816,159 @@ export const deleteProjectDatabaseWatch = <ThrowOnError extends boolean = true>(
5755
5816
  });
5756
5817
  };
5757
5818
 
5819
+ /**
5820
+ * Read a database webhook subscription
5821
+ *
5822
+ * Returns the current activation generation and state. This read never returns a signing secret.
5823
+ */
5824
+ export const getDatabaseWebhookSubscription = <ThrowOnError extends boolean = true>(
5825
+ parameters: {
5826
+ "X-Request-Id"?: string;
5827
+ project_id: Ulid;
5828
+ subscription_id: Ulid;
5829
+ environment: "dev" | "prod";
5830
+ },
5831
+ options?: Options<never, ThrowOnError>,
5832
+ ): RequestResult<
5833
+ GetDatabaseWebhookSubscriptionResponses,
5834
+ GetDatabaseWebhookSubscriptionErrors,
5835
+ ThrowOnError,
5836
+ "data"
5837
+ > => {
5838
+ const params = buildClientParams(
5839
+ [parameters],
5840
+ [
5841
+ {
5842
+ args: [
5843
+ { in: "headers", key: "X-Request-Id" },
5844
+ { in: "path", key: "project_id" },
5845
+ { in: "path", key: "subscription_id" },
5846
+ { in: "query", key: "environment" },
5847
+ ],
5848
+ },
5849
+ ],
5850
+ );
5851
+ return (options?.client ?? client).get<
5852
+ GetDatabaseWebhookSubscriptionResponses,
5853
+ GetDatabaseWebhookSubscriptionErrors,
5854
+ ThrowOnError,
5855
+ "data"
5856
+ >({
5857
+ responseStyle: "data",
5858
+ security: [{ scheme: "bearer", type: "http" }],
5859
+ url: "/v1/projects/{project_id}/database/webhook-subscriptions/{subscription_id}",
5860
+ ...options,
5861
+ ...params,
5862
+ });
5863
+ };
5864
+
5865
+ /**
5866
+ * Deactivate one webhook subscription generation
5867
+ *
5868
+ * Deactivation is confirmed before a new generation can start. Repeat the same key after an uncertain response. Pending deliveries have no delivery guarantee while the generation is deactivating or inactive.
5869
+ */
5870
+ export const deactivateDatabaseWebhookSubscription = <ThrowOnError extends boolean = true>(
5871
+ parameters: {
5872
+ "X-Request-Id"?: string;
5873
+ "Idempotency-Key": string;
5874
+ project_id: Ulid;
5875
+ subscription_id: Ulid;
5876
+ generation: number;
5877
+ environment: "dev" | "prod";
5878
+ },
5879
+ options?: Options<never, ThrowOnError>,
5880
+ ): RequestResult<
5881
+ DeactivateDatabaseWebhookSubscriptionResponses,
5882
+ DeactivateDatabaseWebhookSubscriptionErrors,
5883
+ ThrowOnError,
5884
+ "data"
5885
+ > => {
5886
+ const params = buildClientParams(
5887
+ [parameters],
5888
+ [
5889
+ {
5890
+ args: [
5891
+ { in: "headers", key: "X-Request-Id" },
5892
+ { in: "headers", key: "Idempotency-Key" },
5893
+ { in: "path", key: "project_id" },
5894
+ { in: "path", key: "subscription_id" },
5895
+ { in: "path", key: "generation" },
5896
+ { in: "query", key: "environment" },
5897
+ ],
5898
+ },
5899
+ ],
5900
+ );
5901
+ return (options?.client ?? client).delete<
5902
+ DeactivateDatabaseWebhookSubscriptionResponses,
5903
+ DeactivateDatabaseWebhookSubscriptionErrors,
5904
+ ThrowOnError,
5905
+ "data"
5906
+ >({
5907
+ responseStyle: "data",
5908
+ security: [{ scheme: "bearer", type: "http" }],
5909
+ url: "/v1/projects/{project_id}/database/webhook-subscriptions/{subscription_id}/activations/{generation}",
5910
+ ...options,
5911
+ ...params,
5912
+ });
5913
+ };
5914
+
5915
+ /**
5916
+ * Activate or reconcile one webhook subscription generation
5917
+ *
5918
+ * The client chooses a stable subscription ULID and starts with generation 1. Repeat the identical request and Idempotency-Key after an uncertain reply to recover the original signing secret. A new generation needs a new key and is accepted only after the previous one is confirmed inactive. A late retry of an old generation is refused. Status reads never reveal the secret; save this authorized response privately. If the provider outcome remains unknown near the end of its 24-hour idempotency window, the operation stays pending rather than risk creating a duplicate. The five-webhook database limit includes existing webhooks.
5919
+ */
5920
+ export const activateDatabaseWebhookSubscription = <ThrowOnError extends boolean = true>(
5921
+ parameters: {
5922
+ "X-Request-Id"?: string;
5923
+ "Idempotency-Key": string;
5924
+ project_id: Ulid;
5925
+ subscription_id: Ulid;
5926
+ generation: number;
5927
+ environment: "dev" | "prod";
5928
+ databaseWebhookCreateRequest: DatabaseWebhookCreateRequest;
5929
+ },
5930
+ options?: Options<never, ThrowOnError>,
5931
+ ): RequestResult<
5932
+ ActivateDatabaseWebhookSubscriptionResponses,
5933
+ ActivateDatabaseWebhookSubscriptionErrors,
5934
+ ThrowOnError,
5935
+ "data"
5936
+ > => {
5937
+ const params = buildClientParams(
5938
+ [parameters],
5939
+ [
5940
+ {
5941
+ args: [
5942
+ { in: "headers", key: "X-Request-Id" },
5943
+ { in: "headers", key: "Idempotency-Key" },
5944
+ { in: "path", key: "project_id" },
5945
+ { in: "path", key: "subscription_id" },
5946
+ { in: "path", key: "generation" },
5947
+ { in: "query", key: "environment" },
5948
+ { key: "databaseWebhookCreateRequest", map: "body" },
5949
+ ],
5950
+ },
5951
+ ],
5952
+ );
5953
+ return (options?.client ?? client).put<
5954
+ ActivateDatabaseWebhookSubscriptionResponses,
5955
+ ActivateDatabaseWebhookSubscriptionErrors,
5956
+ ThrowOnError,
5957
+ "data"
5958
+ >({
5959
+ responseStyle: "data",
5960
+ security: [{ scheme: "bearer", type: "http" }],
5961
+ url: "/v1/projects/{project_id}/database/webhook-subscriptions/{subscription_id}/activations/{generation}",
5962
+ ...options,
5963
+ ...params,
5964
+ headers: {
5965
+ "Content-Type": "application/json",
5966
+ ...options?.headers,
5967
+ ...params.headers,
5968
+ },
5969
+ });
5970
+ };
5971
+
5758
5972
  /**
5759
5973
  * List the project's database webhooks
5760
5974
  *
@@ -6796,7 +7010,7 @@ export const putEnvironmentSecret = <ThrowOnError extends boolean = true>(
6796
7010
  /**
6797
7011
  * Rotate an installed platform key
6798
7012
  *
6799
- * Replaces the value of an installed platform key (OHMYHOST_AI_KEY, OHMYHOST_MAIL_KEY, OHMYHOST_STORAGE_KEY or BETTER_AUTH_SECRET) with a value the platform generates. The request has no body and the value is never returned. The earlier value stops authorizing at once, and the new value reaches the running environment without a deployment. Other names answer 400; an installed key the environment does not hold answers 404. Repeating the same idempotency key replays the stored metadata.
7013
+ * Replaces the value of an installed platform key (OHMYHOST_AI_KEY, OHMYHOST_BROWSER_KEY, OHMYHOST_MAIL_KEY, OHMYHOST_STORAGE_KEY or BETTER_AUTH_SECRET) with a value the platform generates. The request has no body and the value is never returned. The earlier value stops authorizing at once, and the new value reaches the running environment without a deployment. Other names answer 400; an installed key the environment does not hold answers 404. Repeating the same idempotency key replays the stored metadata.
6800
7014
  */
6801
7015
  export const rotateEnvironmentSecret = <ThrowOnError extends boolean = true>(
6802
7016
  parameters: {