@amerged/ohmyhost-cli 0.1.60 → 0.1.62

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.
@@ -22,6 +22,8 @@ import type {
22
22
  AuthorizeApplicationDomainIdentityDnsResponses,
23
23
  AuthorizeWorkspaceMailDomainDnsErrors,
24
24
  AuthorizeWorkspaceMailDomainDnsResponses,
25
+ BeginConnectionErrors,
26
+ BeginConnectionResponses,
25
27
  ChangeDatabaseComputeErrors,
26
28
  ChangeDatabaseComputeResponses,
27
29
  ChangeManagedSourceErrors,
@@ -47,6 +49,7 @@ import type {
47
49
  ConnectGithubOrganizationErrors,
48
50
  ConnectGithubOrganizationRequest,
49
51
  ConnectGithubOrganizationResponses,
52
+ ConnectionBegin,
50
53
  CreateBillingCheckoutErrors,
51
54
  CreateBillingCheckoutResponses,
52
55
  CreateBillingPortalErrors,
@@ -118,8 +121,12 @@ import type {
118
121
  DiffManagedSourceResponses,
119
122
  DisableManagedMailReceivingErrors,
120
123
  DisableManagedMailReceivingResponses,
124
+ DisconnectConnectionErrors,
125
+ DisconnectConnectionResponses,
121
126
  DisconnectGithubOrganizationErrors,
122
127
  DisconnectGithubOrganizationResponses,
128
+ DiscoverConnectionErrors,
129
+ DiscoverConnectionResponses,
123
130
  EnsureProjectDevShareLinkErrors,
124
131
  EnsureProjectDevShareLinkResponses,
125
132
  FeedbackSubmission,
@@ -135,6 +142,8 @@ import type {
135
142
  GetBillingRechargeResponses,
136
143
  GetCloudflareDnsAuthorizationStatusErrors,
137
144
  GetCloudflareDnsAuthorizationStatusResponses,
145
+ GetConnectionRequestErrors,
146
+ GetConnectionRequestResponses,
138
147
  GetCurrentIdentityErrors,
139
148
  GetCurrentIdentityResponses,
140
149
  GetDatabaseComputeErrors,
@@ -218,6 +227,10 @@ import type {
218
227
  LinkProjectSourceResponses,
219
228
  ListAuditEventsErrors,
220
229
  ListAuditEventsResponses,
230
+ ListConnectionProvidersErrors,
231
+ ListConnectionProvidersResponses,
232
+ ListConnectionsErrors,
233
+ ListConnectionsResponses,
221
234
  ListDeploymentsErrors,
222
235
  ListDeploymentsResponses,
223
236
  ListEnvironmentSecretsErrors,
@@ -577,6 +590,256 @@ export const rotateProjectPreviewToken = <ThrowOnError extends boolean = true>(
577
590
  });
578
591
  };
579
592
 
593
+ /**
594
+ * List connection grants
595
+ */
596
+ export const listConnections = <ThrowOnError extends boolean = true>(
597
+ parameters: {
598
+ "X-Request-Id"?: string;
599
+ organization_id: Ulid;
600
+ },
601
+ options?: Options<never, ThrowOnError>,
602
+ ): RequestResult<ListConnectionsResponses, ListConnectionsErrors, ThrowOnError, "data"> => {
603
+ const params = buildClientParams(
604
+ [parameters],
605
+ [
606
+ {
607
+ args: [
608
+ { in: "headers", key: "X-Request-Id" },
609
+ { in: "path", key: "organization_id" },
610
+ ],
611
+ },
612
+ ],
613
+ );
614
+ return (options?.client ?? client).get<
615
+ ListConnectionsResponses,
616
+ ListConnectionsErrors,
617
+ ThrowOnError,
618
+ "data"
619
+ >({
620
+ responseStyle: "data",
621
+ security: [{ scheme: "bearer", type: "http" }],
622
+ url: "/v1/organizations/{organization_id}/connections",
623
+ ...options,
624
+ ...params,
625
+ });
626
+ };
627
+
628
+ /**
629
+ * List available connection providers
630
+ */
631
+ export const listConnectionProviders = <ThrowOnError extends boolean = true>(
632
+ parameters: {
633
+ "X-Request-Id"?: string;
634
+ organization_id: Ulid;
635
+ },
636
+ options?: Options<never, ThrowOnError>,
637
+ ): RequestResult<
638
+ ListConnectionProvidersResponses,
639
+ ListConnectionProvidersErrors,
640
+ ThrowOnError,
641
+ "data"
642
+ > => {
643
+ const params = buildClientParams(
644
+ [parameters],
645
+ [
646
+ {
647
+ args: [
648
+ { in: "headers", key: "X-Request-Id" },
649
+ { in: "path", key: "organization_id" },
650
+ ],
651
+ },
652
+ ],
653
+ );
654
+ return (options?.client ?? client).get<
655
+ ListConnectionProvidersResponses,
656
+ ListConnectionProvidersErrors,
657
+ ThrowOnError,
658
+ "data"
659
+ >({
660
+ responseStyle: "data",
661
+ security: [{ scheme: "bearer", type: "http" }],
662
+ url: "/v1/organizations/{organization_id}/connections/providers",
663
+ ...options,
664
+ ...params,
665
+ });
666
+ };
667
+
668
+ /**
669
+ * Start an owner consent handoff
670
+ */
671
+ export const beginConnection = <ThrowOnError extends boolean = true>(
672
+ parameters: {
673
+ "X-Request-Id"?: string;
674
+ "Idempotency-Key": string;
675
+ organization_id: Ulid;
676
+ connectionBegin: ConnectionBegin;
677
+ },
678
+ options?: Options<never, ThrowOnError>,
679
+ ): RequestResult<BeginConnectionResponses, BeginConnectionErrors, ThrowOnError, "data"> => {
680
+ const params = buildClientParams(
681
+ [parameters],
682
+ [
683
+ {
684
+ args: [
685
+ { in: "headers", key: "X-Request-Id" },
686
+ { in: "headers", key: "Idempotency-Key" },
687
+ { in: "path", key: "organization_id" },
688
+ { key: "connectionBegin", map: "body" },
689
+ ],
690
+ },
691
+ ],
692
+ );
693
+ return (options?.client ?? client).post<
694
+ BeginConnectionResponses,
695
+ BeginConnectionErrors,
696
+ ThrowOnError,
697
+ "data"
698
+ >({
699
+ responseStyle: "data",
700
+ security: [{ scheme: "bearer", type: "http" }],
701
+ url: "/v1/organizations/{organization_id}/connections/begin",
702
+ ...options,
703
+ ...params,
704
+ headers: {
705
+ "Content-Type": "application/json",
706
+ ...options?.headers,
707
+ ...params.headers,
708
+ },
709
+ });
710
+ };
711
+
712
+ /**
713
+ * Read a consent handoff status
714
+ */
715
+ export const getConnectionRequest = <ThrowOnError extends boolean = true>(
716
+ parameters: {
717
+ "X-Request-Id"?: string;
718
+ organization_id: Ulid;
719
+ request_id: string;
720
+ },
721
+ options?: Options<never, ThrowOnError>,
722
+ ): RequestResult<
723
+ GetConnectionRequestResponses,
724
+ GetConnectionRequestErrors,
725
+ ThrowOnError,
726
+ "data"
727
+ > => {
728
+ const params = buildClientParams(
729
+ [parameters],
730
+ [
731
+ {
732
+ args: [
733
+ { in: "headers", key: "X-Request-Id" },
734
+ { in: "path", key: "organization_id" },
735
+ { in: "path", key: "request_id" },
736
+ ],
737
+ },
738
+ ],
739
+ );
740
+ return (options?.client ?? client).get<
741
+ GetConnectionRequestResponses,
742
+ GetConnectionRequestErrors,
743
+ ThrowOnError,
744
+ "data"
745
+ >({
746
+ responseStyle: "data",
747
+ security: [{ scheme: "bearer", type: "http" }],
748
+ url: "/v1/organizations/{organization_id}/connections/requests/{request_id}",
749
+ ...options,
750
+ ...params,
751
+ });
752
+ };
753
+
754
+ /**
755
+ * Discover organizations, teams and connections
756
+ */
757
+ export const discoverConnection = <ThrowOnError extends boolean = true>(
758
+ parameters: {
759
+ "X-Request-Id"?: string;
760
+ organization_id: Ulid;
761
+ grant_id: string;
762
+ project_id: Ulid;
763
+ environment_id: Ulid;
764
+ provider_organization_id?: number;
765
+ team_id?: number;
766
+ },
767
+ options?: Options<never, ThrowOnError>,
768
+ ): RequestResult<DiscoverConnectionResponses, DiscoverConnectionErrors, ThrowOnError, "data"> => {
769
+ const params = buildClientParams(
770
+ [parameters],
771
+ [
772
+ {
773
+ args: [
774
+ { in: "headers", key: "X-Request-Id" },
775
+ { in: "path", key: "organization_id" },
776
+ { in: "path", key: "grant_id" },
777
+ { in: "query", key: "project_id" },
778
+ { in: "query", key: "environment_id" },
779
+ { in: "query", key: "provider_organization_id" },
780
+ { in: "query", key: "team_id" },
781
+ ],
782
+ },
783
+ ],
784
+ );
785
+ return (options?.client ?? client).get<
786
+ DiscoverConnectionResponses,
787
+ DiscoverConnectionErrors,
788
+ ThrowOnError,
789
+ "data"
790
+ >({
791
+ responseStyle: "data",
792
+ security: [{ scheme: "bearer", type: "http" }],
793
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/catalog",
794
+ ...options,
795
+ ...params,
796
+ });
797
+ };
798
+
799
+ /**
800
+ * Disconnect a connection grant
801
+ */
802
+ export const disconnectConnection = <ThrowOnError extends boolean = true>(
803
+ parameters: {
804
+ "X-Request-Id"?: string;
805
+ "Idempotency-Key": string;
806
+ organization_id: Ulid;
807
+ grant_id: string;
808
+ },
809
+ options?: Options<never, ThrowOnError>,
810
+ ): RequestResult<
811
+ DisconnectConnectionResponses,
812
+ DisconnectConnectionErrors,
813
+ ThrowOnError,
814
+ "data"
815
+ > => {
816
+ const params = buildClientParams(
817
+ [parameters],
818
+ [
819
+ {
820
+ args: [
821
+ { in: "headers", key: "X-Request-Id" },
822
+ { in: "headers", key: "Idempotency-Key" },
823
+ { in: "path", key: "organization_id" },
824
+ { in: "path", key: "grant_id" },
825
+ ],
826
+ },
827
+ ],
828
+ );
829
+ return (options?.client ?? client).delete<
830
+ DisconnectConnectionResponses,
831
+ DisconnectConnectionErrors,
832
+ ThrowOnError,
833
+ "data"
834
+ >({
835
+ responseStyle: "data",
836
+ security: [{ scheme: "bearer", type: "http" }],
837
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}",
838
+ ...options,
839
+ ...params,
840
+ });
841
+ };
842
+
580
843
  /**
581
844
  * Read Native Auth configuration
582
845
  *
@@ -19,6 +19,57 @@ export type Preview = {
19
19
  };
20
20
  };
21
21
 
22
+ export type ConnectionBegin = {
23
+ provider: "make";
24
+ project_id: Ulid;
25
+ environment_id: Ulid;
26
+ };
27
+
28
+ export type ConnectionHandoff = {
29
+ request_id: string;
30
+ url: string;
31
+ expires_at: string;
32
+ };
33
+
34
+ export type ConnectionRequestStatus = {
35
+ state: "pending" | "consumed" | "expired";
36
+ expires_at: string;
37
+ };
38
+
39
+ export type ConnectionDisconnection = {
40
+ state: "disconnected" | "revocation_pending";
41
+ };
42
+
43
+ export type ConnectionGrant = {
44
+ id: Ulid;
45
+ provider: "make";
46
+ state: "active" | "refreshing" | "reconnect_required" | "disconnecting" | "disconnected";
47
+ created_at: string;
48
+ };
49
+
50
+ export type ConnectionGrantList = {
51
+ connections: Array<ConnectionGrant>;
52
+ };
53
+
54
+ export type ConnectionProviders = {
55
+ providers: Array<{
56
+ provider: "make";
57
+ status: "available" | "unavailable";
58
+ }>;
59
+ catalog_available: boolean;
60
+ };
61
+
62
+ export type ConnectionDiscoveryItem = {
63
+ id: number;
64
+ name: string;
65
+ };
66
+
67
+ export type ConnectionDiscovery = {
68
+ organizations: Array<ConnectionDiscoveryItem>;
69
+ teams: Array<ConnectionDiscoveryItem>;
70
+ connections: Array<ConnectionDiscoveryItem>;
71
+ };
72
+
22
73
  export type NativeAuthConfiguration = {
23
74
  /**
24
75
  * Persistent Owner setting; source deployment cannot clear a pause.
@@ -2713,6 +2764,331 @@ export type RotateProjectPreviewTokenResponses = {
2713
2764
  export type RotateProjectPreviewTokenResponse =
2714
2765
  RotateProjectPreviewTokenResponses[keyof RotateProjectPreviewTokenResponses];
2715
2766
 
2767
+ export type ListConnectionsData = {
2768
+ body?: never;
2769
+ headers?: {
2770
+ /**
2771
+ * Optional caller-provided correlation identifier.
2772
+ */
2773
+ "X-Request-Id"?: string;
2774
+ };
2775
+ path: {
2776
+ organization_id: Ulid;
2777
+ };
2778
+ query?: never;
2779
+ url: "/v1/organizations/{organization_id}/connections";
2780
+ };
2781
+
2782
+ export type ListConnectionsErrors = {
2783
+ /**
2784
+ * The request failed.
2785
+ */
2786
+ 400: ProblemDetails;
2787
+ /**
2788
+ * The request failed.
2789
+ */
2790
+ 401: ProblemDetails;
2791
+ /**
2792
+ * The resource does not exist or is not visible to the authenticated principal.
2793
+ */
2794
+ 404: ProblemDetails;
2795
+ /**
2796
+ * The request failed.
2797
+ */
2798
+ 429: ProblemDetails;
2799
+ /**
2800
+ * The request failed.
2801
+ */
2802
+ 503: ProblemDetails;
2803
+ };
2804
+
2805
+ export type ListConnectionsError = ListConnectionsErrors[keyof ListConnectionsErrors];
2806
+
2807
+ export type ListConnectionsResponses = {
2808
+ /**
2809
+ * Connection result.
2810
+ */
2811
+ 200: ConnectionGrantList;
2812
+ };
2813
+
2814
+ export type ListConnectionsResponse = ListConnectionsResponses[keyof ListConnectionsResponses];
2815
+
2816
+ export type ListConnectionProvidersData = {
2817
+ body?: never;
2818
+ headers?: {
2819
+ /**
2820
+ * Optional caller-provided correlation identifier.
2821
+ */
2822
+ "X-Request-Id"?: string;
2823
+ };
2824
+ path: {
2825
+ organization_id: Ulid;
2826
+ };
2827
+ query?: never;
2828
+ url: "/v1/organizations/{organization_id}/connections/providers";
2829
+ };
2830
+
2831
+ export type ListConnectionProvidersErrors = {
2832
+ /**
2833
+ * The request failed.
2834
+ */
2835
+ 400: ProblemDetails;
2836
+ /**
2837
+ * The request failed.
2838
+ */
2839
+ 401: ProblemDetails;
2840
+ /**
2841
+ * The resource does not exist or is not visible to the authenticated principal.
2842
+ */
2843
+ 404: ProblemDetails;
2844
+ /**
2845
+ * The request failed.
2846
+ */
2847
+ 429: ProblemDetails;
2848
+ /**
2849
+ * The request failed.
2850
+ */
2851
+ 503: ProblemDetails;
2852
+ };
2853
+
2854
+ export type ListConnectionProvidersError =
2855
+ ListConnectionProvidersErrors[keyof ListConnectionProvidersErrors];
2856
+
2857
+ export type ListConnectionProvidersResponses = {
2858
+ /**
2859
+ * Connection result.
2860
+ */
2861
+ 200: ConnectionProviders;
2862
+ };
2863
+
2864
+ export type ListConnectionProvidersResponse =
2865
+ ListConnectionProvidersResponses[keyof ListConnectionProvidersResponses];
2866
+
2867
+ export type BeginConnectionData = {
2868
+ body: ConnectionBegin;
2869
+ headers: {
2870
+ /**
2871
+ * Optional caller-provided correlation identifier.
2872
+ */
2873
+ "X-Request-Id"?: string;
2874
+ /**
2875
+ * Identifies one mutation and its canonical request payload.
2876
+ */
2877
+ "Idempotency-Key": string;
2878
+ };
2879
+ path: {
2880
+ organization_id: Ulid;
2881
+ };
2882
+ query?: never;
2883
+ url: "/v1/organizations/{organization_id}/connections/begin";
2884
+ };
2885
+
2886
+ export type BeginConnectionErrors = {
2887
+ /**
2888
+ * The request failed.
2889
+ */
2890
+ 400: ProblemDetails;
2891
+ /**
2892
+ * The request failed.
2893
+ */
2894
+ 401: ProblemDetails;
2895
+ /**
2896
+ * The resource does not exist or is not visible to the authenticated principal.
2897
+ */
2898
+ 404: ProblemDetails;
2899
+ /**
2900
+ * The request failed.
2901
+ */
2902
+ 409: ProblemDetails;
2903
+ /**
2904
+ * The request failed.
2905
+ */
2906
+ 429: ProblemDetails;
2907
+ /**
2908
+ * The request failed.
2909
+ */
2910
+ 503: ProblemDetails;
2911
+ };
2912
+
2913
+ export type BeginConnectionError = BeginConnectionErrors[keyof BeginConnectionErrors];
2914
+
2915
+ export type BeginConnectionResponses = {
2916
+ /**
2917
+ * Connection result.
2918
+ */
2919
+ 201: ConnectionHandoff;
2920
+ };
2921
+
2922
+ export type BeginConnectionResponse = BeginConnectionResponses[keyof BeginConnectionResponses];
2923
+
2924
+ export type GetConnectionRequestData = {
2925
+ body?: never;
2926
+ headers?: {
2927
+ /**
2928
+ * Optional caller-provided correlation identifier.
2929
+ */
2930
+ "X-Request-Id"?: string;
2931
+ };
2932
+ path: {
2933
+ organization_id: Ulid;
2934
+ request_id: string;
2935
+ };
2936
+ query?: never;
2937
+ url: "/v1/organizations/{organization_id}/connections/requests/{request_id}";
2938
+ };
2939
+
2940
+ export type GetConnectionRequestErrors = {
2941
+ /**
2942
+ * The request failed.
2943
+ */
2944
+ 400: ProblemDetails;
2945
+ /**
2946
+ * The request failed.
2947
+ */
2948
+ 401: ProblemDetails;
2949
+ /**
2950
+ * The resource does not exist or is not visible to the authenticated principal.
2951
+ */
2952
+ 404: ProblemDetails;
2953
+ /**
2954
+ * The request failed.
2955
+ */
2956
+ 429: ProblemDetails;
2957
+ /**
2958
+ * The request failed.
2959
+ */
2960
+ 503: ProblemDetails;
2961
+ };
2962
+
2963
+ export type GetConnectionRequestError =
2964
+ GetConnectionRequestErrors[keyof GetConnectionRequestErrors];
2965
+
2966
+ export type GetConnectionRequestResponses = {
2967
+ /**
2968
+ * Connection result.
2969
+ */
2970
+ 200: ConnectionRequestStatus;
2971
+ };
2972
+
2973
+ export type GetConnectionRequestResponse =
2974
+ GetConnectionRequestResponses[keyof GetConnectionRequestResponses];
2975
+
2976
+ export type DiscoverConnectionData = {
2977
+ body?: never;
2978
+ headers?: {
2979
+ /**
2980
+ * Optional caller-provided correlation identifier.
2981
+ */
2982
+ "X-Request-Id"?: string;
2983
+ };
2984
+ path: {
2985
+ organization_id: Ulid;
2986
+ grant_id: string;
2987
+ };
2988
+ query: {
2989
+ project_id: Ulid;
2990
+ environment_id: Ulid;
2991
+ provider_organization_id?: number;
2992
+ team_id?: number;
2993
+ };
2994
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/catalog";
2995
+ };
2996
+
2997
+ export type DiscoverConnectionErrors = {
2998
+ /**
2999
+ * The request failed.
3000
+ */
3001
+ 400: ProblemDetails;
3002
+ /**
3003
+ * The request failed.
3004
+ */
3005
+ 401: ProblemDetails;
3006
+ /**
3007
+ * The resource does not exist or is not visible to the authenticated principal.
3008
+ */
3009
+ 404: ProblemDetails;
3010
+ /**
3011
+ * The request failed.
3012
+ */
3013
+ 429: ProblemDetails;
3014
+ /**
3015
+ * The request failed.
3016
+ */
3017
+ 503: ProblemDetails;
3018
+ };
3019
+
3020
+ export type DiscoverConnectionError = DiscoverConnectionErrors[keyof DiscoverConnectionErrors];
3021
+
3022
+ export type DiscoverConnectionResponses = {
3023
+ /**
3024
+ * Connection result.
3025
+ */
3026
+ 200: ConnectionDiscovery;
3027
+ };
3028
+
3029
+ export type DiscoverConnectionResponse =
3030
+ DiscoverConnectionResponses[keyof DiscoverConnectionResponses];
3031
+
3032
+ export type DisconnectConnectionData = {
3033
+ body?: never;
3034
+ headers: {
3035
+ /**
3036
+ * Optional caller-provided correlation identifier.
3037
+ */
3038
+ "X-Request-Id"?: string;
3039
+ /**
3040
+ * Identifies one mutation and its canonical request payload.
3041
+ */
3042
+ "Idempotency-Key": string;
3043
+ };
3044
+ path: {
3045
+ organization_id: Ulid;
3046
+ grant_id: string;
3047
+ };
3048
+ query?: never;
3049
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}";
3050
+ };
3051
+
3052
+ export type DisconnectConnectionErrors = {
3053
+ /**
3054
+ * The request failed.
3055
+ */
3056
+ 400: ProblemDetails;
3057
+ /**
3058
+ * The request failed.
3059
+ */
3060
+ 401: ProblemDetails;
3061
+ /**
3062
+ * The resource does not exist or is not visible to the authenticated principal.
3063
+ */
3064
+ 404: ProblemDetails;
3065
+ /**
3066
+ * The request failed.
3067
+ */
3068
+ 409: ProblemDetails;
3069
+ /**
3070
+ * The request failed.
3071
+ */
3072
+ 429: ProblemDetails;
3073
+ /**
3074
+ * The request failed.
3075
+ */
3076
+ 503: ProblemDetails;
3077
+ };
3078
+
3079
+ export type DisconnectConnectionError =
3080
+ DisconnectConnectionErrors[keyof DisconnectConnectionErrors];
3081
+
3082
+ export type DisconnectConnectionResponses = {
3083
+ /**
3084
+ * Connection result.
3085
+ */
3086
+ 200: ConnectionDisconnection;
3087
+ };
3088
+
3089
+ export type DisconnectConnectionResponse =
3090
+ DisconnectConnectionResponses[keyof DisconnectConnectionResponses];
3091
+
2716
3092
  export type GetNativeAuthConfigurationData = {
2717
3093
  body?: never;
2718
3094
  headers?: {