@amerged/ohmyhost-sdk 0.1.71 → 0.1.73

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
  *
@@ -6325,7 +6441,7 @@ export const applyPaidProjectDomain = <ThrowOnError extends boolean = true>(
6325
6441
  /**
6326
6442
  * Plan a deployment
6327
6443
  *
6328
- * 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.
6444
+ * 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. Native Auth requires rollout approval for this workspace and project; a missing approval returns 409 native_auth_launch_unavailable before a build is reserved. 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.
6329
6445
  */
6330
6446
  export const planDeployment = <ThrowOnError extends boolean = true>(
6331
6447
  parameters: {
@@ -6420,7 +6536,7 @@ export const listDeployments = <ThrowOnError extends boolean = true>(
6420
6536
  /**
6421
6537
  * Create a deployment
6422
6538
  *
6423
- * Reserves the quoted build credits from the shared organization pool and starts the exact reviewed plan as one durable operation. Insufficient available credits or an explicit project stop budget rejects before operation creation or provider work. Repeating the accepted request never reserves twice.
6539
+ * Reserves the quoted build credits from the shared organization pool and starts the exact reviewed plan as one durable operation. Insufficient available credits or an explicit project stop budget rejects before operation creation or provider work. Repeating the accepted request never reserves twice. Native Auth rollout access is checked again before accepting a new request. A pre-provider loss of access during initial Native setup ends the operation with native_auth_launch_unavailable.
6424
6540
  */
6425
6541
  export const createDeployment = <ThrowOnError extends boolean = true>(
6426
6542
  parameters: {
@@ -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;
@@ -2310,6 +2344,7 @@ export type OperationFailure = {
2310
2344
  code:
2311
2345
  | "operation_failed"
2312
2346
  | "operation_abandoned"
2347
+ | "native_auth_launch_unavailable"
2313
2348
  | "authorization_changed"
2314
2349
  | "source_commit_conflict"
2315
2350
  | "source_snapshot_invalid"
@@ -3147,6 +3182,119 @@ export type DiscoverConnectionResponses = {
3147
3182
  export type DiscoverConnectionResponse =
3148
3183
  DiscoverConnectionResponses[keyof DiscoverConnectionResponses];
3149
3184
 
3185
+ export type CreateMakeCredentialRequestData = {
3186
+ body: MakeCredentialRequestCreate;
3187
+ headers: {
3188
+ /**
3189
+ * Optional caller-provided correlation identifier.
3190
+ */
3191
+ "X-Request-Id"?: string;
3192
+ /**
3193
+ * Identifies one mutation and its canonical request payload; only letters, digits and the characters . _ : - are accepted.
3194
+ */
3195
+ "Idempotency-Key": string;
3196
+ };
3197
+ path: {
3198
+ organization_id: Ulid;
3199
+ grant_id: Ulid;
3200
+ };
3201
+ query?: never;
3202
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/credential-requests";
3203
+ };
3204
+
3205
+ export type CreateMakeCredentialRequestErrors = {
3206
+ /**
3207
+ * The request failed.
3208
+ */
3209
+ 400: ProblemDetails;
3210
+ /**
3211
+ * The request failed.
3212
+ */
3213
+ 401: ProblemDetails;
3214
+ /**
3215
+ * The resource does not exist or is not visible to the authenticated principal.
3216
+ */
3217
+ 404: ProblemDetails;
3218
+ /**
3219
+ * The request failed.
3220
+ */
3221
+ 409: ProblemDetails;
3222
+ /**
3223
+ * The request failed.
3224
+ */
3225
+ 429: ProblemDetails;
3226
+ /**
3227
+ * The request failed.
3228
+ */
3229
+ 503: ProblemDetails;
3230
+ };
3231
+
3232
+ export type CreateMakeCredentialRequestError =
3233
+ CreateMakeCredentialRequestErrors[keyof CreateMakeCredentialRequestErrors];
3234
+
3235
+ export type CreateMakeCredentialRequestResponses = {
3236
+ /**
3237
+ * Credential Request result and its private Make link when available.
3238
+ */
3239
+ 200: MakeCredentialRequestResult;
3240
+ };
3241
+
3242
+ export type CreateMakeCredentialRequestResponse =
3243
+ CreateMakeCredentialRequestResponses[keyof CreateMakeCredentialRequestResponses];
3244
+
3245
+ export type GetMakeCredentialRequestData = {
3246
+ body?: never;
3247
+ headers?: {
3248
+ /**
3249
+ * Optional caller-provided correlation identifier.
3250
+ */
3251
+ "X-Request-Id"?: string;
3252
+ };
3253
+ path: {
3254
+ organization_id: Ulid;
3255
+ grant_id: Ulid;
3256
+ request_id: string;
3257
+ };
3258
+ query?: never;
3259
+ url: "/v1/organizations/{organization_id}/connections/{grant_id}/credential-requests/{request_id}";
3260
+ };
3261
+
3262
+ export type GetMakeCredentialRequestErrors = {
3263
+ /**
3264
+ * The request failed.
3265
+ */
3266
+ 400: ProblemDetails;
3267
+ /**
3268
+ * The request failed.
3269
+ */
3270
+ 401: ProblemDetails;
3271
+ /**
3272
+ * The resource does not exist or is not visible to the authenticated principal.
3273
+ */
3274
+ 404: ProblemDetails;
3275
+ /**
3276
+ * The request failed.
3277
+ */
3278
+ 429: ProblemDetails;
3279
+ /**
3280
+ * The request failed.
3281
+ */
3282
+ 503: ProblemDetails;
3283
+ };
3284
+
3285
+ export type GetMakeCredentialRequestError =
3286
+ GetMakeCredentialRequestErrors[keyof GetMakeCredentialRequestErrors];
3287
+
3288
+ export type GetMakeCredentialRequestResponses = {
3289
+ /**
3290
+ * Current Credential Request status.
3291
+ */
3292
+ 200: MakeCredentialRequestStatus;
3293
+ };
3294
+
3295
+ export type GetMakeCredentialRequestResponse =
3296
+ GetMakeCredentialRequestResponses[keyof GetMakeCredentialRequestResponses];
3297
+
3150
3298
  export type CreateMakeActionBindingData = {
3151
3299
  body: MakeActionBindingRequest;
3152
3300
  headers: {