@amerged/ohmyhost-sdk 0.1.62 → 0.1.64

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.62",
3
+ "version": "0.1.64",
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.62",
3
+ "version": "0.1.64",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -98,6 +98,7 @@ export {
98
98
  getPublicDeploymentStats,
99
99
  getWorkspaceMailDomain,
100
100
  getWorkspaceMailDomainDnsAuthorization,
101
+ importConnection,
101
102
  initializeManagedSource,
102
103
  linkProjectSource,
103
104
  listAuditEvents,
@@ -289,6 +290,8 @@ export type {
289
290
  ConnectionGrant,
290
291
  ConnectionGrantList,
291
292
  ConnectionHandoff,
293
+ ConnectionImport,
294
+ ConnectionImportRequest,
292
295
  ConnectionProviders,
293
296
  ConnectionRequestStatus,
294
297
  CostEstimate,
@@ -782,6 +785,11 @@ export type {
782
785
  IdempotencyConflictProblem,
783
786
  IdempotencyKey,
784
787
  IfMatch,
788
+ ImportConnectionData,
789
+ ImportConnectionError,
790
+ ImportConnectionErrors,
791
+ ImportConnectionResponse,
792
+ ImportConnectionResponses,
785
793
  InitializeManagedSourceData,
786
794
  InitializeManagedSourceError,
787
795
  InitializeManagedSourceErrors,
@@ -50,6 +50,7 @@ import type {
50
50
  ConnectGithubOrganizationRequest,
51
51
  ConnectGithubOrganizationResponses,
52
52
  ConnectionBegin,
53
+ ConnectionImportRequest,
53
54
  CreateBillingCheckoutErrors,
54
55
  CreateBillingCheckoutResponses,
55
56
  CreateBillingPortalErrors,
@@ -220,6 +221,8 @@ import type {
220
221
  GetWorkspaceMailDomainDnsAuthorizationResponses,
221
222
  GetWorkspaceMailDomainErrors,
222
223
  GetWorkspaceMailDomainResponses,
224
+ ImportConnectionErrors,
225
+ ImportConnectionResponses,
223
226
  InitializeManagedSourceErrors,
224
227
  InitializeManagedSourceResponses,
225
228
  LinkProjectSourceErrors,
@@ -597,6 +600,7 @@ export const listConnections = <ThrowOnError extends boolean = true>(
597
600
  parameters: {
598
601
  "X-Request-Id"?: string;
599
602
  organization_id: Ulid;
603
+ scope?: "workspace";
600
604
  },
601
605
  options?: Options<never, ThrowOnError>,
602
606
  ): RequestResult<ListConnectionsResponses, ListConnectionsErrors, ThrowOnError, "data"> => {
@@ -607,6 +611,7 @@ export const listConnections = <ThrowOnError extends boolean = true>(
607
611
  args: [
608
612
  { in: "headers", key: "X-Request-Id" },
609
613
  { in: "path", key: "organization_id" },
614
+ { in: "query", key: "scope" },
610
615
  ],
611
616
  },
612
617
  ],
@@ -759,8 +764,8 @@ export const discoverConnection = <ThrowOnError extends boolean = true>(
759
764
  "X-Request-Id"?: string;
760
765
  organization_id: Ulid;
761
766
  grant_id: string;
762
- project_id: Ulid;
763
- environment_id: Ulid;
767
+ project_id?: Ulid;
768
+ environment_id?: Ulid;
764
769
  provider_organization_id?: number;
765
770
  team_id?: number;
766
771
  },
@@ -796,6 +801,52 @@ export const discoverConnection = <ThrowOnError extends boolean = true>(
796
801
  });
797
802
  };
798
803
 
804
+ /**
805
+ * Import a Make connection into a project environment
806
+ */
807
+ export const importConnection = <ThrowOnError extends boolean = true>(
808
+ parameters: {
809
+ "X-Request-Id"?: string;
810
+ "Idempotency-Key": string;
811
+ organization_id: Ulid;
812
+ grant_id: string;
813
+ connectionImportRequest: ConnectionImportRequest;
814
+ },
815
+ options?: Options<never, ThrowOnError>,
816
+ ): RequestResult<ImportConnectionResponses, ImportConnectionErrors, ThrowOnError, "data"> => {
817
+ const params = buildClientParams(
818
+ [parameters],
819
+ [
820
+ {
821
+ args: [
822
+ { in: "headers", key: "X-Request-Id" },
823
+ { in: "headers", key: "Idempotency-Key" },
824
+ { in: "path", key: "organization_id" },
825
+ { in: "path", key: "grant_id" },
826
+ { key: "connectionImportRequest", map: "body" },
827
+ ],
828
+ },
829
+ ],
830
+ );
831
+ return (options?.client ?? client).post<
832
+ ImportConnectionResponses,
833
+ ImportConnectionErrors,
834
+ ThrowOnError,
835
+ "data"
836
+ >({
837
+ responseStyle: "data",
838
+ security: [{ scheme: "bearer", type: "http" }],
839
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/imports",
840
+ ...options,
841
+ ...params,
842
+ headers: {
843
+ "Content-Type": "application/json",
844
+ ...options?.headers,
845
+ ...params.headers,
846
+ },
847
+ });
848
+ };
849
+
799
850
  /**
800
851
  * Disconnect a connection grant
801
852
  */
@@ -21,8 +21,26 @@ export type Preview = {
21
21
 
22
22
  export type ConnectionBegin = {
23
23
  provider: "make";
24
+ project_id?: Ulid;
25
+ environment_id?: Ulid;
26
+ };
27
+
28
+ export type ConnectionImportRequest = {
29
+ project_id: Ulid;
30
+ environment_id: Ulid;
31
+ provider_organization_id: number;
32
+ team_id: number;
33
+ connection_id: number;
34
+ };
35
+
36
+ export type ConnectionImport = {
37
+ id: Ulid;
38
+ grant_id: Ulid;
24
39
  project_id: Ulid;
25
40
  environment_id: Ulid;
41
+ provider_organization_id: number;
42
+ team_id: number;
43
+ connection_id: number;
26
44
  };
27
45
 
28
46
  export type ConnectionHandoff = {
@@ -2775,7 +2793,12 @@ export type ListConnectionsData = {
2775
2793
  path: {
2776
2794
  organization_id: Ulid;
2777
2795
  };
2778
- query?: never;
2796
+ query?: {
2797
+ /**
2798
+ * Select workspace grants; omit for the legacy unfiltered list.
2799
+ */
2800
+ scope?: "workspace";
2801
+ };
2779
2802
  url: "/v1/organizations/{organization_id}/connections";
2780
2803
  };
2781
2804
 
@@ -2985,9 +3008,15 @@ export type DiscoverConnectionData = {
2985
3008
  organization_id: Ulid;
2986
3009
  grant_id: string;
2987
3010
  };
2988
- query: {
2989
- project_id: Ulid;
2990
- environment_id: Ulid;
3011
+ query?: {
3012
+ /**
3013
+ * Supply together with environment_id only for a legacy project-bound grant.
3014
+ */
3015
+ project_id?: Ulid;
3016
+ /**
3017
+ * Supply together with project_id only for a legacy project-bound grant.
3018
+ */
3019
+ environment_id?: Ulid;
2991
3020
  provider_organization_id?: number;
2992
3021
  team_id?: number;
2993
3022
  };
@@ -3029,6 +3058,64 @@ export type DiscoverConnectionResponses = {
3029
3058
  export type DiscoverConnectionResponse =
3030
3059
  DiscoverConnectionResponses[keyof DiscoverConnectionResponses];
3031
3060
 
3061
+ export type ImportConnectionData = {
3062
+ body: ConnectionImportRequest;
3063
+ headers: {
3064
+ /**
3065
+ * Optional caller-provided correlation identifier.
3066
+ */
3067
+ "X-Request-Id"?: string;
3068
+ /**
3069
+ * Identifies one mutation and its canonical request payload.
3070
+ */
3071
+ "Idempotency-Key": string;
3072
+ };
3073
+ path: {
3074
+ organization_id: Ulid;
3075
+ grant_id: string;
3076
+ };
3077
+ query?: never;
3078
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/imports";
3079
+ };
3080
+
3081
+ export type ImportConnectionErrors = {
3082
+ /**
3083
+ * The request failed.
3084
+ */
3085
+ 400: ProblemDetails;
3086
+ /**
3087
+ * The request failed.
3088
+ */
3089
+ 401: ProblemDetails;
3090
+ /**
3091
+ * The resource does not exist or is not visible to the authenticated principal.
3092
+ */
3093
+ 404: ProblemDetails;
3094
+ /**
3095
+ * The request failed.
3096
+ */
3097
+ 409: ProblemDetails;
3098
+ /**
3099
+ * The request failed.
3100
+ */
3101
+ 429: ProblemDetails;
3102
+ /**
3103
+ * The request failed.
3104
+ */
3105
+ 503: ProblemDetails;
3106
+ };
3107
+
3108
+ export type ImportConnectionError = ImportConnectionErrors[keyof ImportConnectionErrors];
3109
+
3110
+ export type ImportConnectionResponses = {
3111
+ /**
3112
+ * Imported project connection reference.
3113
+ */
3114
+ 201: ConnectionImport;
3115
+ };
3116
+
3117
+ export type ImportConnectionResponse = ImportConnectionResponses[keyof ImportConnectionResponses];
3118
+
3032
3119
  export type DisconnectConnectionData = {
3033
3120
  body?: never;
3034
3121
  headers: {