@amerged/ohmyhost-cli 0.1.60 → 0.1.63
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/README.md +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-DYRDZNIR.js → chunk-NRFJFQTV.js} +468 -85
- package/dist/index.js +3 -1
- package/package.json +1 -1
- package/src/apps/product-cli/package.json +1 -1
- package/src/apps/product-cli/src/cli.ts +29 -0
- package/src/apps/product-cli/src/command.ts +210 -0
- package/src/apps/product-cli/src/product-api.ts +109 -0
- package/src/packages/contracts/package.json +5 -0
- package/src/packages/contracts/src/connection-management.ts +107 -0
- package/src/packages/contracts/src/index.ts +2 -0
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/index.ts +53 -0
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +314 -0
- package/src/packages/sdk-ts/src/generated/types.gen.ts +463 -0
|
@@ -19,6 +19,75 @@ 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 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;
|
|
39
|
+
project_id: Ulid;
|
|
40
|
+
environment_id: Ulid;
|
|
41
|
+
provider_organization_id: number;
|
|
42
|
+
team_id: number;
|
|
43
|
+
connection_id: number;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type ConnectionHandoff = {
|
|
47
|
+
request_id: string;
|
|
48
|
+
url: string;
|
|
49
|
+
expires_at: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type ConnectionRequestStatus = {
|
|
53
|
+
state: "pending" | "consumed" | "expired";
|
|
54
|
+
expires_at: string;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type ConnectionDisconnection = {
|
|
58
|
+
state: "disconnected" | "revocation_pending";
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type ConnectionGrant = {
|
|
62
|
+
id: Ulid;
|
|
63
|
+
provider: "make";
|
|
64
|
+
state: "active" | "refreshing" | "reconnect_required" | "disconnecting" | "disconnected";
|
|
65
|
+
created_at: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type ConnectionGrantList = {
|
|
69
|
+
connections: Array<ConnectionGrant>;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type ConnectionProviders = {
|
|
73
|
+
providers: Array<{
|
|
74
|
+
provider: "make";
|
|
75
|
+
status: "available" | "unavailable";
|
|
76
|
+
}>;
|
|
77
|
+
catalog_available: boolean;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type ConnectionDiscoveryItem = {
|
|
81
|
+
id: number;
|
|
82
|
+
name: string;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export type ConnectionDiscovery = {
|
|
86
|
+
organizations: Array<ConnectionDiscoveryItem>;
|
|
87
|
+
teams: Array<ConnectionDiscoveryItem>;
|
|
88
|
+
connections: Array<ConnectionDiscoveryItem>;
|
|
89
|
+
};
|
|
90
|
+
|
|
22
91
|
export type NativeAuthConfiguration = {
|
|
23
92
|
/**
|
|
24
93
|
* Persistent Owner setting; source deployment cannot clear a pause.
|
|
@@ -2713,6 +2782,400 @@ export type RotateProjectPreviewTokenResponses = {
|
|
|
2713
2782
|
export type RotateProjectPreviewTokenResponse =
|
|
2714
2783
|
RotateProjectPreviewTokenResponses[keyof RotateProjectPreviewTokenResponses];
|
|
2715
2784
|
|
|
2785
|
+
export type ListConnectionsData = {
|
|
2786
|
+
body?: never;
|
|
2787
|
+
headers?: {
|
|
2788
|
+
/**
|
|
2789
|
+
* Optional caller-provided correlation identifier.
|
|
2790
|
+
*/
|
|
2791
|
+
"X-Request-Id"?: string;
|
|
2792
|
+
};
|
|
2793
|
+
path: {
|
|
2794
|
+
organization_id: Ulid;
|
|
2795
|
+
};
|
|
2796
|
+
query?: {
|
|
2797
|
+
/**
|
|
2798
|
+
* Select workspace grants; omit for the legacy unfiltered list.
|
|
2799
|
+
*/
|
|
2800
|
+
scope?: "workspace";
|
|
2801
|
+
};
|
|
2802
|
+
url: "/v1/organizations/{organization_id}/connections";
|
|
2803
|
+
};
|
|
2804
|
+
|
|
2805
|
+
export type ListConnectionsErrors = {
|
|
2806
|
+
/**
|
|
2807
|
+
* The request failed.
|
|
2808
|
+
*/
|
|
2809
|
+
400: ProblemDetails;
|
|
2810
|
+
/**
|
|
2811
|
+
* The request failed.
|
|
2812
|
+
*/
|
|
2813
|
+
401: ProblemDetails;
|
|
2814
|
+
/**
|
|
2815
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
2816
|
+
*/
|
|
2817
|
+
404: ProblemDetails;
|
|
2818
|
+
/**
|
|
2819
|
+
* The request failed.
|
|
2820
|
+
*/
|
|
2821
|
+
429: ProblemDetails;
|
|
2822
|
+
/**
|
|
2823
|
+
* The request failed.
|
|
2824
|
+
*/
|
|
2825
|
+
503: ProblemDetails;
|
|
2826
|
+
};
|
|
2827
|
+
|
|
2828
|
+
export type ListConnectionsError = ListConnectionsErrors[keyof ListConnectionsErrors];
|
|
2829
|
+
|
|
2830
|
+
export type ListConnectionsResponses = {
|
|
2831
|
+
/**
|
|
2832
|
+
* Connection result.
|
|
2833
|
+
*/
|
|
2834
|
+
200: ConnectionGrantList;
|
|
2835
|
+
};
|
|
2836
|
+
|
|
2837
|
+
export type ListConnectionsResponse = ListConnectionsResponses[keyof ListConnectionsResponses];
|
|
2838
|
+
|
|
2839
|
+
export type ListConnectionProvidersData = {
|
|
2840
|
+
body?: never;
|
|
2841
|
+
headers?: {
|
|
2842
|
+
/**
|
|
2843
|
+
* Optional caller-provided correlation identifier.
|
|
2844
|
+
*/
|
|
2845
|
+
"X-Request-Id"?: string;
|
|
2846
|
+
};
|
|
2847
|
+
path: {
|
|
2848
|
+
organization_id: Ulid;
|
|
2849
|
+
};
|
|
2850
|
+
query?: never;
|
|
2851
|
+
url: "/v1/organizations/{organization_id}/connections/providers";
|
|
2852
|
+
};
|
|
2853
|
+
|
|
2854
|
+
export type ListConnectionProvidersErrors = {
|
|
2855
|
+
/**
|
|
2856
|
+
* The request failed.
|
|
2857
|
+
*/
|
|
2858
|
+
400: ProblemDetails;
|
|
2859
|
+
/**
|
|
2860
|
+
* The request failed.
|
|
2861
|
+
*/
|
|
2862
|
+
401: ProblemDetails;
|
|
2863
|
+
/**
|
|
2864
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
2865
|
+
*/
|
|
2866
|
+
404: ProblemDetails;
|
|
2867
|
+
/**
|
|
2868
|
+
* The request failed.
|
|
2869
|
+
*/
|
|
2870
|
+
429: ProblemDetails;
|
|
2871
|
+
/**
|
|
2872
|
+
* The request failed.
|
|
2873
|
+
*/
|
|
2874
|
+
503: ProblemDetails;
|
|
2875
|
+
};
|
|
2876
|
+
|
|
2877
|
+
export type ListConnectionProvidersError =
|
|
2878
|
+
ListConnectionProvidersErrors[keyof ListConnectionProvidersErrors];
|
|
2879
|
+
|
|
2880
|
+
export type ListConnectionProvidersResponses = {
|
|
2881
|
+
/**
|
|
2882
|
+
* Connection result.
|
|
2883
|
+
*/
|
|
2884
|
+
200: ConnectionProviders;
|
|
2885
|
+
};
|
|
2886
|
+
|
|
2887
|
+
export type ListConnectionProvidersResponse =
|
|
2888
|
+
ListConnectionProvidersResponses[keyof ListConnectionProvidersResponses];
|
|
2889
|
+
|
|
2890
|
+
export type BeginConnectionData = {
|
|
2891
|
+
body: ConnectionBegin;
|
|
2892
|
+
headers: {
|
|
2893
|
+
/**
|
|
2894
|
+
* Optional caller-provided correlation identifier.
|
|
2895
|
+
*/
|
|
2896
|
+
"X-Request-Id"?: string;
|
|
2897
|
+
/**
|
|
2898
|
+
* Identifies one mutation and its canonical request payload.
|
|
2899
|
+
*/
|
|
2900
|
+
"Idempotency-Key": string;
|
|
2901
|
+
};
|
|
2902
|
+
path: {
|
|
2903
|
+
organization_id: Ulid;
|
|
2904
|
+
};
|
|
2905
|
+
query?: never;
|
|
2906
|
+
url: "/v1/organizations/{organization_id}/connections/begin";
|
|
2907
|
+
};
|
|
2908
|
+
|
|
2909
|
+
export type BeginConnectionErrors = {
|
|
2910
|
+
/**
|
|
2911
|
+
* The request failed.
|
|
2912
|
+
*/
|
|
2913
|
+
400: ProblemDetails;
|
|
2914
|
+
/**
|
|
2915
|
+
* The request failed.
|
|
2916
|
+
*/
|
|
2917
|
+
401: ProblemDetails;
|
|
2918
|
+
/**
|
|
2919
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
2920
|
+
*/
|
|
2921
|
+
404: ProblemDetails;
|
|
2922
|
+
/**
|
|
2923
|
+
* The request failed.
|
|
2924
|
+
*/
|
|
2925
|
+
409: ProblemDetails;
|
|
2926
|
+
/**
|
|
2927
|
+
* The request failed.
|
|
2928
|
+
*/
|
|
2929
|
+
429: ProblemDetails;
|
|
2930
|
+
/**
|
|
2931
|
+
* The request failed.
|
|
2932
|
+
*/
|
|
2933
|
+
503: ProblemDetails;
|
|
2934
|
+
};
|
|
2935
|
+
|
|
2936
|
+
export type BeginConnectionError = BeginConnectionErrors[keyof BeginConnectionErrors];
|
|
2937
|
+
|
|
2938
|
+
export type BeginConnectionResponses = {
|
|
2939
|
+
/**
|
|
2940
|
+
* Connection result.
|
|
2941
|
+
*/
|
|
2942
|
+
201: ConnectionHandoff;
|
|
2943
|
+
};
|
|
2944
|
+
|
|
2945
|
+
export type BeginConnectionResponse = BeginConnectionResponses[keyof BeginConnectionResponses];
|
|
2946
|
+
|
|
2947
|
+
export type GetConnectionRequestData = {
|
|
2948
|
+
body?: never;
|
|
2949
|
+
headers?: {
|
|
2950
|
+
/**
|
|
2951
|
+
* Optional caller-provided correlation identifier.
|
|
2952
|
+
*/
|
|
2953
|
+
"X-Request-Id"?: string;
|
|
2954
|
+
};
|
|
2955
|
+
path: {
|
|
2956
|
+
organization_id: Ulid;
|
|
2957
|
+
request_id: string;
|
|
2958
|
+
};
|
|
2959
|
+
query?: never;
|
|
2960
|
+
url: "/v1/organizations/{organization_id}/connections/requests/{request_id}";
|
|
2961
|
+
};
|
|
2962
|
+
|
|
2963
|
+
export type GetConnectionRequestErrors = {
|
|
2964
|
+
/**
|
|
2965
|
+
* The request failed.
|
|
2966
|
+
*/
|
|
2967
|
+
400: ProblemDetails;
|
|
2968
|
+
/**
|
|
2969
|
+
* The request failed.
|
|
2970
|
+
*/
|
|
2971
|
+
401: ProblemDetails;
|
|
2972
|
+
/**
|
|
2973
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
2974
|
+
*/
|
|
2975
|
+
404: ProblemDetails;
|
|
2976
|
+
/**
|
|
2977
|
+
* The request failed.
|
|
2978
|
+
*/
|
|
2979
|
+
429: ProblemDetails;
|
|
2980
|
+
/**
|
|
2981
|
+
* The request failed.
|
|
2982
|
+
*/
|
|
2983
|
+
503: ProblemDetails;
|
|
2984
|
+
};
|
|
2985
|
+
|
|
2986
|
+
export type GetConnectionRequestError =
|
|
2987
|
+
GetConnectionRequestErrors[keyof GetConnectionRequestErrors];
|
|
2988
|
+
|
|
2989
|
+
export type GetConnectionRequestResponses = {
|
|
2990
|
+
/**
|
|
2991
|
+
* Connection result.
|
|
2992
|
+
*/
|
|
2993
|
+
200: ConnectionRequestStatus;
|
|
2994
|
+
};
|
|
2995
|
+
|
|
2996
|
+
export type GetConnectionRequestResponse =
|
|
2997
|
+
GetConnectionRequestResponses[keyof GetConnectionRequestResponses];
|
|
2998
|
+
|
|
2999
|
+
export type DiscoverConnectionData = {
|
|
3000
|
+
body?: never;
|
|
3001
|
+
headers?: {
|
|
3002
|
+
/**
|
|
3003
|
+
* Optional caller-provided correlation identifier.
|
|
3004
|
+
*/
|
|
3005
|
+
"X-Request-Id"?: string;
|
|
3006
|
+
};
|
|
3007
|
+
path: {
|
|
3008
|
+
organization_id: Ulid;
|
|
3009
|
+
grant_id: string;
|
|
3010
|
+
};
|
|
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;
|
|
3020
|
+
provider_organization_id?: number;
|
|
3021
|
+
team_id?: number;
|
|
3022
|
+
};
|
|
3023
|
+
url: "/v1/organizations/{organization_id}/connections/{grant_id}/catalog";
|
|
3024
|
+
};
|
|
3025
|
+
|
|
3026
|
+
export type DiscoverConnectionErrors = {
|
|
3027
|
+
/**
|
|
3028
|
+
* The request failed.
|
|
3029
|
+
*/
|
|
3030
|
+
400: ProblemDetails;
|
|
3031
|
+
/**
|
|
3032
|
+
* The request failed.
|
|
3033
|
+
*/
|
|
3034
|
+
401: ProblemDetails;
|
|
3035
|
+
/**
|
|
3036
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
3037
|
+
*/
|
|
3038
|
+
404: ProblemDetails;
|
|
3039
|
+
/**
|
|
3040
|
+
* The request failed.
|
|
3041
|
+
*/
|
|
3042
|
+
429: ProblemDetails;
|
|
3043
|
+
/**
|
|
3044
|
+
* The request failed.
|
|
3045
|
+
*/
|
|
3046
|
+
503: ProblemDetails;
|
|
3047
|
+
};
|
|
3048
|
+
|
|
3049
|
+
export type DiscoverConnectionError = DiscoverConnectionErrors[keyof DiscoverConnectionErrors];
|
|
3050
|
+
|
|
3051
|
+
export type DiscoverConnectionResponses = {
|
|
3052
|
+
/**
|
|
3053
|
+
* Connection result.
|
|
3054
|
+
*/
|
|
3055
|
+
200: ConnectionDiscovery;
|
|
3056
|
+
};
|
|
3057
|
+
|
|
3058
|
+
export type DiscoverConnectionResponse =
|
|
3059
|
+
DiscoverConnectionResponses[keyof DiscoverConnectionResponses];
|
|
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
|
+
|
|
3119
|
+
export type DisconnectConnectionData = {
|
|
3120
|
+
body?: never;
|
|
3121
|
+
headers: {
|
|
3122
|
+
/**
|
|
3123
|
+
* Optional caller-provided correlation identifier.
|
|
3124
|
+
*/
|
|
3125
|
+
"X-Request-Id"?: string;
|
|
3126
|
+
/**
|
|
3127
|
+
* Identifies one mutation and its canonical request payload.
|
|
3128
|
+
*/
|
|
3129
|
+
"Idempotency-Key": string;
|
|
3130
|
+
};
|
|
3131
|
+
path: {
|
|
3132
|
+
organization_id: Ulid;
|
|
3133
|
+
grant_id: string;
|
|
3134
|
+
};
|
|
3135
|
+
query?: never;
|
|
3136
|
+
url: "/v1/organizations/{organization_id}/connections/{grant_id}";
|
|
3137
|
+
};
|
|
3138
|
+
|
|
3139
|
+
export type DisconnectConnectionErrors = {
|
|
3140
|
+
/**
|
|
3141
|
+
* The request failed.
|
|
3142
|
+
*/
|
|
3143
|
+
400: ProblemDetails;
|
|
3144
|
+
/**
|
|
3145
|
+
* The request failed.
|
|
3146
|
+
*/
|
|
3147
|
+
401: ProblemDetails;
|
|
3148
|
+
/**
|
|
3149
|
+
* The resource does not exist or is not visible to the authenticated principal.
|
|
3150
|
+
*/
|
|
3151
|
+
404: ProblemDetails;
|
|
3152
|
+
/**
|
|
3153
|
+
* The request failed.
|
|
3154
|
+
*/
|
|
3155
|
+
409: ProblemDetails;
|
|
3156
|
+
/**
|
|
3157
|
+
* The request failed.
|
|
3158
|
+
*/
|
|
3159
|
+
429: ProblemDetails;
|
|
3160
|
+
/**
|
|
3161
|
+
* The request failed.
|
|
3162
|
+
*/
|
|
3163
|
+
503: ProblemDetails;
|
|
3164
|
+
};
|
|
3165
|
+
|
|
3166
|
+
export type DisconnectConnectionError =
|
|
3167
|
+
DisconnectConnectionErrors[keyof DisconnectConnectionErrors];
|
|
3168
|
+
|
|
3169
|
+
export type DisconnectConnectionResponses = {
|
|
3170
|
+
/**
|
|
3171
|
+
* Connection result.
|
|
3172
|
+
*/
|
|
3173
|
+
200: ConnectionDisconnection;
|
|
3174
|
+
};
|
|
3175
|
+
|
|
3176
|
+
export type DisconnectConnectionResponse =
|
|
3177
|
+
DisconnectConnectionResponses[keyof DisconnectConnectionResponses];
|
|
3178
|
+
|
|
2716
3179
|
export type GetNativeAuthConfigurationData = {
|
|
2717
3180
|
body?: never;
|
|
2718
3181
|
headers?: {
|