@amerged/ohmyhost-cli 0.1.71 → 0.1.72

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.
@@ -63,6 +63,8 @@ import type {
63
63
  CreateDeploymentResponses,
64
64
  CreateMakeActionBindingErrors,
65
65
  CreateMakeActionBindingResponses,
66
+ CreateMakeCredentialRequestErrors,
67
+ CreateMakeCredentialRequestResponses,
66
68
  CreateManagedSourceUploadErrors,
67
69
  CreateManagedSourceUploadResponses,
68
70
  CreateNativeAuthUserErrors,
@@ -163,6 +165,8 @@ import type {
163
165
  GetFeedbackResponses,
164
166
  GetGithubOrganizationConnectionErrors,
165
167
  GetGithubOrganizationConnectionResponses,
168
+ GetMakeCredentialRequestErrors,
169
+ GetMakeCredentialRequestResponses,
166
170
  GetManagedMailAttachmentErrors,
167
171
  GetManagedMailAttachmentResponses,
168
172
  GetManagedMailDomainErrors,
@@ -273,6 +277,7 @@ import type {
273
277
  MailRevisionRequest,
274
278
  MakeActionBindingRequest,
275
279
  MakeActionRunRequest,
280
+ MakeCredentialRequestCreate,
276
281
  ManagedMailDomainRequest,
277
282
  ManagedMailWebhookRequest,
278
283
  ManagedSourceBlobRequest,
@@ -861,6 +866,117 @@ export const discoverConnection = <ThrowOnError extends boolean = true>(
861
866
  });
862
867
  };
863
868
 
869
+ /**
870
+ * Create a native Make Credential Request
871
+ *
872
+ * Uses the workspace owner's Make grant to create a private Make authorization link for selected standard app modules or Endpoints. Retry the same logical request with the same idempotency key and selections. Treat an uncertain result as pending investigation.
873
+ */
874
+ export const createMakeCredentialRequest = <ThrowOnError extends boolean = true>(
875
+ parameters: {
876
+ "X-Request-Id"?: string;
877
+ "Idempotency-Key": string;
878
+ organization_id: Ulid;
879
+ grant_id: Ulid;
880
+ makeCredentialRequestCreate: MakeCredentialRequestCreate;
881
+ },
882
+ options?: Options<never, ThrowOnError>,
883
+ ): RequestResult<
884
+ CreateMakeCredentialRequestResponses,
885
+ CreateMakeCredentialRequestErrors,
886
+ ThrowOnError,
887
+ "data"
888
+ > => {
889
+ const params = buildClientParams(
890
+ [parameters],
891
+ [
892
+ {
893
+ args: [
894
+ { in: "headers", key: "X-Request-Id" },
895
+ { in: "headers", key: "Idempotency-Key" },
896
+ { in: "path", key: "organization_id" },
897
+ { in: "path", key: "grant_id" },
898
+ { key: "makeCredentialRequestCreate", map: "body" },
899
+ ],
900
+ },
901
+ ],
902
+ );
903
+ return (options?.client ?? client).post<
904
+ CreateMakeCredentialRequestResponses,
905
+ CreateMakeCredentialRequestErrors,
906
+ ThrowOnError,
907
+ "data"
908
+ >({
909
+ responseStyle: "data",
910
+ security: [
911
+ {
912
+ key: "BearerAuth",
913
+ scheme: "bearer",
914
+ type: "http",
915
+ },
916
+ ],
917
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/credential-requests",
918
+ ...options,
919
+ ...params,
920
+ headers: {
921
+ "Content-Type": "application/json",
922
+ ...options?.headers,
923
+ ...params.headers,
924
+ },
925
+ });
926
+ };
927
+
928
+ /**
929
+ * Read native Make Credential Request status
930
+ *
931
+ * Reads the current Make status for the owning workspace grant. The private authorization link is available in the create response.
932
+ */
933
+ export const getMakeCredentialRequest = <ThrowOnError extends boolean = true>(
934
+ parameters: {
935
+ "X-Request-Id"?: string;
936
+ organization_id: Ulid;
937
+ grant_id: Ulid;
938
+ request_id: string;
939
+ },
940
+ options?: Options<never, ThrowOnError>,
941
+ ): RequestResult<
942
+ GetMakeCredentialRequestResponses,
943
+ GetMakeCredentialRequestErrors,
944
+ ThrowOnError,
945
+ "data"
946
+ > => {
947
+ const params = buildClientParams(
948
+ [parameters],
949
+ [
950
+ {
951
+ args: [
952
+ { in: "headers", key: "X-Request-Id" },
953
+ { in: "path", key: "organization_id" },
954
+ { in: "path", key: "grant_id" },
955
+ { in: "path", key: "request_id" },
956
+ ],
957
+ },
958
+ ],
959
+ );
960
+ return (options?.client ?? client).get<
961
+ GetMakeCredentialRequestResponses,
962
+ GetMakeCredentialRequestErrors,
963
+ ThrowOnError,
964
+ "data"
965
+ >({
966
+ responseStyle: "data",
967
+ security: [
968
+ {
969
+ key: "BearerAuth",
970
+ scheme: "bearer",
971
+ type: "http",
972
+ },
973
+ ],
974
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/credential-requests/{request_id}",
975
+ ...options,
976
+ ...params,
977
+ });
978
+ };
979
+
864
980
  /**
865
981
  * Bind one Make action to an imported connection
866
982
  *
@@ -25,6 +25,40 @@ export type ConnectionBegin = {
25
25
  environment_id?: Ulid;
26
26
  };
27
27
 
28
+ export type MakeCredentialRequestCreate = {
29
+ provider_organization_id: number;
30
+ team_id: number;
31
+ selections: Array<MakeCredentialSelection>;
32
+ };
33
+
34
+ export type MakeCredentialSelection = unknown & {
35
+ /**
36
+ * A Make standard app identifier.
37
+ */
38
+ app_name: string;
39
+ app_version: number;
40
+ module_ids?: Array<string>;
41
+ endpoint_names?: Array<string>;
42
+ };
43
+
44
+ export type MakeCredentialRequestResult = {
45
+ state: "created" | "running" | "uncertain" | "reconnect_required";
46
+ request_id?: string;
47
+ provider_status?: string;
48
+ /**
49
+ * Private Make link available only on create or replay.
50
+ */
51
+ authorization_url?: string;
52
+ expires_at?: string | null;
53
+ };
54
+
55
+ export type MakeCredentialRequestStatus = {
56
+ state: "created" | "running" | "uncertain" | "reconnect_required";
57
+ request_id?: string;
58
+ provider_status?: string;
59
+ expires_at?: string | null;
60
+ };
61
+
28
62
  export type MakeActionBindingRequest = {
29
63
  project_id: Ulid;
30
64
  environment_id: Ulid;
@@ -3147,6 +3181,119 @@ export type DiscoverConnectionResponses = {
3147
3181
  export type DiscoverConnectionResponse =
3148
3182
  DiscoverConnectionResponses[keyof DiscoverConnectionResponses];
3149
3183
 
3184
+ export type CreateMakeCredentialRequestData = {
3185
+ body: MakeCredentialRequestCreate;
3186
+ headers: {
3187
+ /**
3188
+ * Optional caller-provided correlation identifier.
3189
+ */
3190
+ "X-Request-Id"?: string;
3191
+ /**
3192
+ * Identifies one mutation and its canonical request payload; only letters, digits and the characters . _ : - are accepted.
3193
+ */
3194
+ "Idempotency-Key": string;
3195
+ };
3196
+ path: {
3197
+ organization_id: Ulid;
3198
+ grant_id: Ulid;
3199
+ };
3200
+ query?: never;
3201
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/credential-requests";
3202
+ };
3203
+
3204
+ export type CreateMakeCredentialRequestErrors = {
3205
+ /**
3206
+ * The request failed.
3207
+ */
3208
+ 400: ProblemDetails;
3209
+ /**
3210
+ * The request failed.
3211
+ */
3212
+ 401: ProblemDetails;
3213
+ /**
3214
+ * The resource does not exist or is not visible to the authenticated principal.
3215
+ */
3216
+ 404: ProblemDetails;
3217
+ /**
3218
+ * The request failed.
3219
+ */
3220
+ 409: ProblemDetails;
3221
+ /**
3222
+ * The request failed.
3223
+ */
3224
+ 429: ProblemDetails;
3225
+ /**
3226
+ * The request failed.
3227
+ */
3228
+ 503: ProblemDetails;
3229
+ };
3230
+
3231
+ export type CreateMakeCredentialRequestError =
3232
+ CreateMakeCredentialRequestErrors[keyof CreateMakeCredentialRequestErrors];
3233
+
3234
+ export type CreateMakeCredentialRequestResponses = {
3235
+ /**
3236
+ * Credential Request result and its private Make link when available.
3237
+ */
3238
+ 200: MakeCredentialRequestResult;
3239
+ };
3240
+
3241
+ export type CreateMakeCredentialRequestResponse =
3242
+ CreateMakeCredentialRequestResponses[keyof CreateMakeCredentialRequestResponses];
3243
+
3244
+ export type GetMakeCredentialRequestData = {
3245
+ body?: never;
3246
+ headers?: {
3247
+ /**
3248
+ * Optional caller-provided correlation identifier.
3249
+ */
3250
+ "X-Request-Id"?: string;
3251
+ };
3252
+ path: {
3253
+ organization_id: Ulid;
3254
+ grant_id: Ulid;
3255
+ request_id: string;
3256
+ };
3257
+ query?: never;
3258
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/credential-requests/{request_id}";
3259
+ };
3260
+
3261
+ export type GetMakeCredentialRequestErrors = {
3262
+ /**
3263
+ * The request failed.
3264
+ */
3265
+ 400: ProblemDetails;
3266
+ /**
3267
+ * The request failed.
3268
+ */
3269
+ 401: ProblemDetails;
3270
+ /**
3271
+ * The resource does not exist or is not visible to the authenticated principal.
3272
+ */
3273
+ 404: ProblemDetails;
3274
+ /**
3275
+ * The request failed.
3276
+ */
3277
+ 429: ProblemDetails;
3278
+ /**
3279
+ * The request failed.
3280
+ */
3281
+ 503: ProblemDetails;
3282
+ };
3283
+
3284
+ export type GetMakeCredentialRequestError =
3285
+ GetMakeCredentialRequestErrors[keyof GetMakeCredentialRequestErrors];
3286
+
3287
+ export type GetMakeCredentialRequestResponses = {
3288
+ /**
3289
+ * Current Credential Request status.
3290
+ */
3291
+ 200: MakeCredentialRequestStatus;
3292
+ };
3293
+
3294
+ export type GetMakeCredentialRequestResponse =
3295
+ GetMakeCredentialRequestResponses[keyof GetMakeCredentialRequestResponses];
3296
+
3150
3297
  export type CreateMakeActionBindingData = {
3151
3298
  body: MakeActionBindingRequest;
3152
3299
  headers: {