@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.
- package/README.md +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-OMMRWO6A.js → chunk-YVN3AGQD.js} +307 -136
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/apps/product-cli/package.json +1 -1
- package/src/apps/product-cli/src/cli.ts +11 -1
- package/src/apps/product-cli/src/command.ts +86 -1
- package/src/apps/product-cli/src/product-api.ts +25 -0
- package/src/packages/contracts/src/connection-management.ts +106 -2
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/index.ts +16 -0
- package/src/packages/sdk-ts/src/generated/mcp-remote.gen.ts +223 -2
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +116 -0
- package/src/packages/sdk-ts/src/generated/types.gen.ts +147 -0
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -375,6 +375,10 @@ const HELP_USAGE = Object.freeze({
|
|
|
375
375
|
"ohmyhost connection import --organization ULID --grant ULID --project ULID --environment ULID --provider-organization ID --team ID --connection ID --idempotency-key KEY --json",
|
|
376
376
|
"connection disconnect":
|
|
377
377
|
"ohmyhost connection disconnect --organization ULID --grant ULID --idempotency-key KEY --yes --json",
|
|
378
|
+
"connection credential-request-create":
|
|
379
|
+
"ohmyhost connection credential-request-create --organization ULID --grant ULID --provider-organization ID --team ID --selections JSON --idempotency-key KEY --json",
|
|
380
|
+
"connection credential-request-status":
|
|
381
|
+
"ohmyhost connection credential-request-status --organization ULID --grant ULID --request HASH --json",
|
|
378
382
|
"github connect":
|
|
379
383
|
"ohmyhost github connect --organization ULID --idempotency-key KEY --json (connect once, then link covered repositories without another browser consent)",
|
|
380
384
|
"github status": "ohmyhost github status --organization ULID --json",
|
|
@@ -949,7 +953,9 @@ export class ProductCli {
|
|
|
949
953
|
command.kind === "connection-status" ||
|
|
950
954
|
command.kind === "connection-discover" ||
|
|
951
955
|
command.kind === "connection-import" ||
|
|
952
|
-
command.kind === "connection-disconnect"
|
|
956
|
+
command.kind === "connection-disconnect" ||
|
|
957
|
+
command.kind === "connection-credential-request-create" ||
|
|
958
|
+
command.kind === "connection-credential-request-status"
|
|
953
959
|
) {
|
|
954
960
|
const api = await this.authenticatedApi(command.credentialStore, signal);
|
|
955
961
|
if (!api.connection) throw new ResponseContractError();
|
|
@@ -4036,6 +4042,10 @@ const parsedCommandName = (command: ProductCliCommand): CommandLabel => {
|
|
|
4036
4042
|
if (command.kind === "connection-discover") return "connection discover";
|
|
4037
4043
|
if (command.kind === "connection-import") return "connection import";
|
|
4038
4044
|
if (command.kind === "connection-disconnect") return "connection disconnect";
|
|
4045
|
+
if (command.kind === "connection-credential-request-create")
|
|
4046
|
+
return "connection credential-request-create";
|
|
4047
|
+
if (command.kind === "connection-credential-request-status")
|
|
4048
|
+
return "connection credential-request-status";
|
|
4039
4049
|
if (command.kind === "organization-mcp-connections-list")
|
|
4040
4050
|
return "organization mcp-connections list";
|
|
4041
4051
|
if (command.kind === "organization-mcp-connection-revoke")
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { isUserSecretName } from "@ohmyhost/contracts/secret-names";
|
|
2
|
+
import {
|
|
3
|
+
parseMakeCredentialSelections,
|
|
4
|
+
type MakeCredentialSelection,
|
|
5
|
+
} from "@ohmyhost/contracts/connection-management";
|
|
2
6
|
import { MCP_CONNECTION_ID_PATTERN } from "@ohmyhost/contracts/organization-mcp-connections";
|
|
3
7
|
import {
|
|
4
8
|
DATABASE_PAGE_MAX_ITEMS,
|
|
@@ -180,6 +184,23 @@ export type ProductCliCommand =
|
|
|
180
184
|
readonly yes: true;
|
|
181
185
|
readonly credentialStore: "native";
|
|
182
186
|
}
|
|
187
|
+
| {
|
|
188
|
+
readonly kind: "connection-credential-request-create";
|
|
189
|
+
readonly organizationId: string;
|
|
190
|
+
readonly grantId: string;
|
|
191
|
+
readonly providerOrganizationId: number;
|
|
192
|
+
readonly teamId: number;
|
|
193
|
+
readonly selections: MakeCredentialSelection[];
|
|
194
|
+
readonly idempotencyKey: string;
|
|
195
|
+
readonly credentialStore: "native";
|
|
196
|
+
}
|
|
197
|
+
| {
|
|
198
|
+
readonly kind: "connection-credential-request-status";
|
|
199
|
+
readonly organizationId: string;
|
|
200
|
+
readonly grantId: string;
|
|
201
|
+
readonly requestId: string;
|
|
202
|
+
readonly credentialStore: "native";
|
|
203
|
+
}
|
|
183
204
|
| {
|
|
184
205
|
readonly kind: "organization-mcp-connections-list";
|
|
185
206
|
readonly organizationId: string;
|
|
@@ -1203,6 +1224,8 @@ export type RecognizedCommandLabel =
|
|
|
1203
1224
|
| "connection discover"
|
|
1204
1225
|
| "connection import"
|
|
1205
1226
|
| "connection disconnect"
|
|
1227
|
+
| "connection credential-request-create"
|
|
1228
|
+
| "connection credential-request-status"
|
|
1206
1229
|
| "github connect"
|
|
1207
1230
|
| "github status"
|
|
1208
1231
|
| "github disconnect"
|
|
@@ -1341,7 +1364,16 @@ export const recognizedCommandLabel = (argv: readonly string[]): RecognizedComma
|
|
|
1341
1364
|
if (value === "profile" && values[0] === "list") return "profile list";
|
|
1342
1365
|
if (
|
|
1343
1366
|
value === "connection" &&
|
|
1344
|
-
[
|
|
1367
|
+
[
|
|
1368
|
+
"begin",
|
|
1369
|
+
"list",
|
|
1370
|
+
"status",
|
|
1371
|
+
"discover",
|
|
1372
|
+
"import",
|
|
1373
|
+
"disconnect",
|
|
1374
|
+
"credential-request-create",
|
|
1375
|
+
"credential-request-status",
|
|
1376
|
+
].includes(values[0] ?? "")
|
|
1345
1377
|
)
|
|
1346
1378
|
return `connection ${values[0]}` as RecognizedCommandLabel;
|
|
1347
1379
|
if (value === "github" && values[0] === "connect") return "github connect";
|
|
@@ -2197,6 +2229,7 @@ export const parseProductCliCommand = (argv: readonly string[]): ProductCliComma
|
|
|
2197
2229
|
"--provider-organization",
|
|
2198
2230
|
"--team",
|
|
2199
2231
|
"--connection",
|
|
2232
|
+
"--selections",
|
|
2200
2233
|
] as const);
|
|
2201
2234
|
const org = options["--organization"];
|
|
2202
2235
|
if (!org || !ORGANIZATION_ULID.test(org)) throw new InvalidCommandError();
|
|
@@ -2208,6 +2241,58 @@ export const parseProductCliCommand = (argv: readonly string[]): ProductCliComma
|
|
|
2208
2241
|
options["--environment"] &&
|
|
2209
2242
|
ORGANIZATION_ULID.test(options["--project"]) &&
|
|
2210
2243
|
ORGANIZATION_ULID.test(options["--environment"]);
|
|
2244
|
+
if (
|
|
2245
|
+
operation === "credential-request-create" &&
|
|
2246
|
+
exact([
|
|
2247
|
+
"--organization",
|
|
2248
|
+
"--grant",
|
|
2249
|
+
"--provider-organization",
|
|
2250
|
+
"--team",
|
|
2251
|
+
"--selections",
|
|
2252
|
+
"--idempotency-key",
|
|
2253
|
+
])
|
|
2254
|
+
) {
|
|
2255
|
+
const grantId = options["--grant"] ?? "";
|
|
2256
|
+
const idempotencyKey = options["--idempotency-key"] ?? "";
|
|
2257
|
+
const providerOrganization = options["--provider-organization"] ?? "";
|
|
2258
|
+
const team = options["--team"] ?? "";
|
|
2259
|
+
if (
|
|
2260
|
+
!ORGANIZATION_ULID.test(grantId) ||
|
|
2261
|
+
!/^[A-Za-z0-9._:-]{1,128}$/u.test(idempotencyKey) ||
|
|
2262
|
+
[providerOrganization, team].some(
|
|
2263
|
+
(id) => !/^[1-9][0-9]{0,15}$/u.test(id) || !Number.isSafeInteger(Number(id)),
|
|
2264
|
+
)
|
|
2265
|
+
)
|
|
2266
|
+
throw new InvalidCommandError();
|
|
2267
|
+
try {
|
|
2268
|
+
const json = options["--selections"] ?? "";
|
|
2269
|
+
return {
|
|
2270
|
+
kind: "connection-credential-request-create",
|
|
2271
|
+
organizationId: org,
|
|
2272
|
+
grantId,
|
|
2273
|
+
providerOrganizationId: Number(providerOrganization),
|
|
2274
|
+
teamId: Number(team),
|
|
2275
|
+
selections: parseMakeCredentialSelections(JSON.parse(json)),
|
|
2276
|
+
idempotencyKey,
|
|
2277
|
+
credentialStore,
|
|
2278
|
+
};
|
|
2279
|
+
} catch {
|
|
2280
|
+
throw new InvalidCommandError();
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
if (
|
|
2284
|
+
operation === "credential-request-status" &&
|
|
2285
|
+
exact(["--organization", "--grant", "--request"]) &&
|
|
2286
|
+
ORGANIZATION_ULID.test(options["--grant"] ?? "") &&
|
|
2287
|
+
/^[a-f0-9]{64}$/u.test(options["--request"] ?? "")
|
|
2288
|
+
)
|
|
2289
|
+
return {
|
|
2290
|
+
kind: "connection-credential-request-status",
|
|
2291
|
+
organizationId: org,
|
|
2292
|
+
grantId: options["--grant"] ?? "",
|
|
2293
|
+
requestId: options["--request"] ?? "",
|
|
2294
|
+
credentialStore,
|
|
2295
|
+
};
|
|
2211
2296
|
if (operation === "list" && exact(["--organization"]))
|
|
2212
2297
|
return { kind: "connection-list", organizationId: org, credentialStore };
|
|
2213
2298
|
if (
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
getConnectionRequest,
|
|
7
7
|
discoverConnection,
|
|
8
8
|
disconnectConnection,
|
|
9
|
+
createMakeCredentialRequest,
|
|
10
|
+
getMakeCredentialRequest,
|
|
9
11
|
} from "@ohmyhost/sdk-ts";
|
|
10
12
|
import type { ProductCliCommand } from "./command.js";
|
|
11
13
|
import { randomUUID } from "node:crypto";
|
|
@@ -312,6 +314,8 @@ export type ConnectionCommand = Extract<
|
|
|
312
314
|
| "connection-status"
|
|
313
315
|
| "connection-discover"
|
|
314
316
|
| "connection-disconnect"
|
|
317
|
+
| "connection-credential-request-create"
|
|
318
|
+
| "connection-credential-request-status"
|
|
315
319
|
| "connection-import";
|
|
316
320
|
}
|
|
317
321
|
>;
|
|
@@ -869,6 +873,27 @@ export async function executeConnectionCommand(
|
|
|
869
873
|
{ client: client },
|
|
870
874
|
);
|
|
871
875
|
break;
|
|
876
|
+
case "connection-credential-request-create":
|
|
877
|
+
result = await createMakeCredentialRequest(
|
|
878
|
+
{
|
|
879
|
+
organization_id,
|
|
880
|
+
grant_id: command.grantId,
|
|
881
|
+
"Idempotency-Key": command.idempotencyKey,
|
|
882
|
+
makeCredentialRequestCreate: {
|
|
883
|
+
provider_organization_id: command.providerOrganizationId,
|
|
884
|
+
team_id: command.teamId,
|
|
885
|
+
selections: command.selections,
|
|
886
|
+
},
|
|
887
|
+
},
|
|
888
|
+
{ client },
|
|
889
|
+
);
|
|
890
|
+
break;
|
|
891
|
+
case "connection-credential-request-status":
|
|
892
|
+
result = await getMakeCredentialRequest(
|
|
893
|
+
{ organization_id, grant_id: command.grantId, request_id: command.requestId },
|
|
894
|
+
{ client },
|
|
895
|
+
);
|
|
896
|
+
break;
|
|
872
897
|
}
|
|
873
898
|
return parseConnectionResponse(command.kind, result, origin);
|
|
874
899
|
}
|
|
@@ -1,4 +1,101 @@
|
|
|
1
1
|
const ulid = /^[0-7][0-9A-HJKMNP-TV-Z]{25}$/u;
|
|
2
|
+
const requestId = /^[a-f0-9]{64}$/u;
|
|
3
|
+
const appName = /^[A-Za-z0-9_-]{1,128}$/u;
|
|
4
|
+
const moduleId = /^[A-Za-z0-9_.:-]{1,128}$/u;
|
|
5
|
+
const makeOrigins = new Set([
|
|
6
|
+
"https://eu1.make.com",
|
|
7
|
+
"https://eu2.make.com",
|
|
8
|
+
"https://us1.make.com",
|
|
9
|
+
"https://us2.make.com",
|
|
10
|
+
"https://we.make.com",
|
|
11
|
+
"https://eu1.make.celonis.com",
|
|
12
|
+
"https://us1.make.celonis.com",
|
|
13
|
+
]);
|
|
14
|
+
|
|
15
|
+
export interface MakeCredentialSelection {
|
|
16
|
+
app_name: string;
|
|
17
|
+
app_version: number;
|
|
18
|
+
module_ids?: string[];
|
|
19
|
+
endpoint_names?: string[];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function selectors(raw: unknown, format: RegExp): boolean {
|
|
23
|
+
return (
|
|
24
|
+
Array.isArray(raw) &&
|
|
25
|
+
raw.length >= 1 &&
|
|
26
|
+
raw.length <= 64 &&
|
|
27
|
+
raw.every(
|
|
28
|
+
(value) =>
|
|
29
|
+
typeof value === "string" &&
|
|
30
|
+
format.test(value) &&
|
|
31
|
+
value.replaceAll(/[-_.:]/gu, "").toLowerCase() !== "arbitrarycall",
|
|
32
|
+
) &&
|
|
33
|
+
new Set(raw).size === raw.length
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function parseMakeCredentialSelections(raw: unknown): MakeCredentialSelection[] {
|
|
38
|
+
if (!Array.isArray(raw) || raw.length < 1 || raw.length > 64)
|
|
39
|
+
throw new TypeError("Invalid Make credential selections");
|
|
40
|
+
for (const entry of raw) {
|
|
41
|
+
if (!entry || typeof entry !== "object" || Array.isArray(entry))
|
|
42
|
+
throw new TypeError("Invalid Make credential selection");
|
|
43
|
+
const value = entry as Record<string, unknown>;
|
|
44
|
+
if (
|
|
45
|
+
Object.keys(value).some(
|
|
46
|
+
(key) => !["app_name", "app_version", "module_ids", "endpoint_names"].includes(key),
|
|
47
|
+
) ||
|
|
48
|
+
typeof value["app_name"] !== "string" ||
|
|
49
|
+
!appName.test(value["app_name"]) ||
|
|
50
|
+
!Number.isSafeInteger(value["app_version"]) ||
|
|
51
|
+
Number(value["app_version"]) < 1 ||
|
|
52
|
+
!(Object.hasOwn(value, "module_ids") || Object.hasOwn(value, "endpoint_names")) ||
|
|
53
|
+
(Object.hasOwn(value, "module_ids") && !selectors(value["module_ids"], moduleId)) ||
|
|
54
|
+
(Object.hasOwn(value, "endpoint_names") && !selectors(value["endpoint_names"], appName))
|
|
55
|
+
)
|
|
56
|
+
throw new TypeError("Invalid Make credential selection");
|
|
57
|
+
}
|
|
58
|
+
return raw as MakeCredentialSelection[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function parseMakeCredentialResult(raw: unknown, create: boolean): void {
|
|
62
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
63
|
+
throw new TypeError("Invalid connection response");
|
|
64
|
+
const value = raw as Record<string, unknown>;
|
|
65
|
+
const state = value["state"];
|
|
66
|
+
if (
|
|
67
|
+
Object.keys(value).some(
|
|
68
|
+
(key) =>
|
|
69
|
+
!["state", "request_id", "provider_status", "authorization_url", "expires_at"].includes(
|
|
70
|
+
key,
|
|
71
|
+
),
|
|
72
|
+
) ||
|
|
73
|
+
!["created", "running", "uncertain", "reconnect_required"].includes(String(state)) ||
|
|
74
|
+
((state === "created" || value["request_id"] !== undefined) &&
|
|
75
|
+
(typeof value["request_id"] !== "string" || !requestId.test(value["request_id"]))) ||
|
|
76
|
+
(state === "created"
|
|
77
|
+
? typeof value["provider_status"] !== "string" ||
|
|
78
|
+
!/^[a-z_]{1,64}$/u.test(value["provider_status"])
|
|
79
|
+
: value["provider_status"] !== undefined || value["expires_at"] !== undefined)
|
|
80
|
+
)
|
|
81
|
+
throw new TypeError("Invalid connection response");
|
|
82
|
+
if (value["expires_at"] !== null && value["expires_at"] !== undefined) date(value["expires_at"]);
|
|
83
|
+
if (value["authorization_url"] === undefined) return;
|
|
84
|
+
if (!create || state !== "created" || typeof value["authorization_url"] !== "string")
|
|
85
|
+
throw new TypeError("Invalid connection response");
|
|
86
|
+
const url = new URL(value["authorization_url"]);
|
|
87
|
+
if (
|
|
88
|
+
!makeOrigins.has(url.origin) ||
|
|
89
|
+
url.username ||
|
|
90
|
+
url.password ||
|
|
91
|
+
url.hash ||
|
|
92
|
+
!/^\/[1-9][0-9]*\/credentials-requests\/inbox$/u.test(url.pathname) ||
|
|
93
|
+
url.searchParams.size !== 1 ||
|
|
94
|
+
!/^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/u.test(url.searchParams.get("requestId") ?? "")
|
|
95
|
+
)
|
|
96
|
+
throw new TypeError("Invalid connection response");
|
|
97
|
+
}
|
|
98
|
+
|
|
2
99
|
function record(raw: unknown, keys: readonly string[]): Record<string, unknown> {
|
|
3
100
|
if (!raw || typeof raw !== "object" || Array.isArray(raw))
|
|
4
101
|
throw new TypeError("Invalid connection response");
|
|
@@ -32,11 +129,18 @@ export function parseConnectionResponse(
|
|
|
32
129
|
| "connection-status"
|
|
33
130
|
| "connection-discover"
|
|
34
131
|
| "connection-disconnect"
|
|
35
|
-
| "connection-import"
|
|
132
|
+
| "connection-import"
|
|
133
|
+
| "connection-credential-request-create"
|
|
134
|
+
| "connection-credential-request-status",
|
|
36
135
|
raw: unknown,
|
|
37
136
|
expectedOrigin?: string,
|
|
38
137
|
): unknown {
|
|
39
|
-
if (
|
|
138
|
+
if (
|
|
139
|
+
kind === "connection-credential-request-create" ||
|
|
140
|
+
kind === "connection-credential-request-status"
|
|
141
|
+
) {
|
|
142
|
+
parseMakeCredentialResult(raw, kind === "connection-credential-request-create");
|
|
143
|
+
} else if (kind === "connection-begin") {
|
|
40
144
|
const v = record(raw, ["request_id", "url", "expires_at"]);
|
|
41
145
|
date(v["expires_at"]);
|
|
42
146
|
if (
|
|
@@ -23,6 +23,7 @@ export {
|
|
|
23
23
|
createCloudflareDnsAuthorization,
|
|
24
24
|
createDeployment,
|
|
25
25
|
createMakeActionBinding,
|
|
26
|
+
createMakeCredentialRequest,
|
|
26
27
|
createManagedSourceUpload,
|
|
27
28
|
createNativeAuthUser,
|
|
28
29
|
createOrganization,
|
|
@@ -69,6 +70,7 @@ export {
|
|
|
69
70
|
getFeatureInterests,
|
|
70
71
|
getFeedback,
|
|
71
72
|
getGithubOrganizationConnection,
|
|
73
|
+
getMakeCredentialRequest,
|
|
72
74
|
getManagedMailAttachment,
|
|
73
75
|
getManagedMailDomain,
|
|
74
76
|
getManagedMailMessage,
|
|
@@ -324,6 +326,11 @@ export type {
|
|
|
324
326
|
CreateMakeActionBindingErrors,
|
|
325
327
|
CreateMakeActionBindingResponse,
|
|
326
328
|
CreateMakeActionBindingResponses,
|
|
329
|
+
CreateMakeCredentialRequestData,
|
|
330
|
+
CreateMakeCredentialRequestError,
|
|
331
|
+
CreateMakeCredentialRequestErrors,
|
|
332
|
+
CreateMakeCredentialRequestResponse,
|
|
333
|
+
CreateMakeCredentialRequestResponses,
|
|
327
334
|
CreateManagedSourceUploadData,
|
|
328
335
|
CreateManagedSourceUploadError,
|
|
329
336
|
CreateManagedSourceUploadErrors,
|
|
@@ -630,6 +637,11 @@ export type {
|
|
|
630
637
|
GetGithubOrganizationConnectionErrors,
|
|
631
638
|
GetGithubOrganizationConnectionResponse,
|
|
632
639
|
GetGithubOrganizationConnectionResponses,
|
|
640
|
+
GetMakeCredentialRequestData,
|
|
641
|
+
GetMakeCredentialRequestError,
|
|
642
|
+
GetMakeCredentialRequestErrors,
|
|
643
|
+
GetMakeCredentialRequestResponse,
|
|
644
|
+
GetMakeCredentialRequestResponses,
|
|
633
645
|
GetManagedMailAttachmentData,
|
|
634
646
|
GetManagedMailAttachmentError,
|
|
635
647
|
GetManagedMailAttachmentErrors,
|
|
@@ -920,6 +932,10 @@ export type {
|
|
|
920
932
|
MakeActionRunSuccess,
|
|
921
933
|
MakeActionUnavailable,
|
|
922
934
|
MakeActionUncertain,
|
|
935
|
+
MakeCredentialRequestCreate,
|
|
936
|
+
MakeCredentialRequestResult,
|
|
937
|
+
MakeCredentialRequestStatus,
|
|
938
|
+
MakeCredentialSelection,
|
|
923
939
|
ManagedMailContent,
|
|
924
940
|
ManagedMailContentResult,
|
|
925
941
|
ManagedMailDisabled,
|
|
@@ -72,9 +72,9 @@ import {
|
|
|
72
72
|
writeProjectDatabase,
|
|
73
73
|
} from "./sdk.gen.js";
|
|
74
74
|
export const remoteMcpContractSha256 =
|
|
75
|
-
"
|
|
75
|
+
"99da3b404be30539e086a7972dca78e3d0270117abf06d1b83522d5b095d571d";
|
|
76
76
|
export const remoteMcpContractVersion = "0.0.0";
|
|
77
|
-
export const remoteMcpReleaseVersion = "0.1.
|
|
77
|
+
export const remoteMcpReleaseVersion = "0.1.72";
|
|
78
78
|
export interface RemoteMcpOperation {
|
|
79
79
|
operationId: string;
|
|
80
80
|
method: string;
|
|
@@ -807,6 +807,227 @@ export const remoteMcpOperations: readonly RemoteMcpOperation[] = [
|
|
|
807
807
|
},
|
|
808
808
|
},
|
|
809
809
|
},
|
|
810
|
+
{
|
|
811
|
+
inputSchema: {
|
|
812
|
+
type: "object",
|
|
813
|
+
additionalProperties: false,
|
|
814
|
+
required: [
|
|
815
|
+
"organization_id",
|
|
816
|
+
"grant_id",
|
|
817
|
+
"idempotency_key",
|
|
818
|
+
"provider_organization_id",
|
|
819
|
+
"team_id",
|
|
820
|
+
"selections",
|
|
821
|
+
],
|
|
822
|
+
properties: {
|
|
823
|
+
organization_id: { type: "string", pattern: "^[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
824
|
+
grant_id: { type: "string", pattern: "^[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
825
|
+
idempotency_key: {
|
|
826
|
+
type: "string",
|
|
827
|
+
minLength: 1,
|
|
828
|
+
maxLength: 128,
|
|
829
|
+
pattern: "^[A-Za-z0-9._:-]+$",
|
|
830
|
+
description:
|
|
831
|
+
"Identifies one mutation and its canonical request payload; only letters, digits and the characters . _ : - are accepted.",
|
|
832
|
+
},
|
|
833
|
+
provider_organization_id: { type: "integer", minimum: 1, maximum: 9007199254740991 },
|
|
834
|
+
team_id: { type: "integer", minimum: 1, maximum: 9007199254740991 },
|
|
835
|
+
selections: {
|
|
836
|
+
type: "array",
|
|
837
|
+
minItems: 1,
|
|
838
|
+
maxItems: 64,
|
|
839
|
+
items: {
|
|
840
|
+
type: "object",
|
|
841
|
+
additionalProperties: false,
|
|
842
|
+
required: ["app_name", "app_version"],
|
|
843
|
+
anyOf: [{ required: ["module_ids"] }, { required: ["endpoint_names"] }],
|
|
844
|
+
properties: {
|
|
845
|
+
app_name: {
|
|
846
|
+
type: "string",
|
|
847
|
+
pattern: "^[A-Za-z0-9_-]{1,128}$",
|
|
848
|
+
description: "A Make standard app identifier.",
|
|
849
|
+
},
|
|
850
|
+
app_version: { type: "integer", minimum: 1, maximum: 9007199254740991 },
|
|
851
|
+
module_ids: {
|
|
852
|
+
type: "array",
|
|
853
|
+
minItems: 1,
|
|
854
|
+
maxItems: 64,
|
|
855
|
+
uniqueItems: true,
|
|
856
|
+
items: { type: "string", pattern: "^[A-Za-z0-9_.:-]{1,128}$" },
|
|
857
|
+
},
|
|
858
|
+
endpoint_names: {
|
|
859
|
+
type: "array",
|
|
860
|
+
minItems: 1,
|
|
861
|
+
maxItems: 64,
|
|
862
|
+
uniqueItems: true,
|
|
863
|
+
items: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" },
|
|
864
|
+
},
|
|
865
|
+
},
|
|
866
|
+
},
|
|
867
|
+
},
|
|
868
|
+
},
|
|
869
|
+
},
|
|
870
|
+
operationId: "createMakeCredentialRequest",
|
|
871
|
+
method: "POST",
|
|
872
|
+
path: "/v1/organizations/{organization_id}/connections/{grant_id}/credential-requests",
|
|
873
|
+
summary: "Create a native Make Credential Request",
|
|
874
|
+
description:
|
|
875
|
+
"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.",
|
|
876
|
+
disposition: "named",
|
|
877
|
+
toolNames: ["integration_credential_request_create"],
|
|
878
|
+
requestBody: {
|
|
879
|
+
required: true,
|
|
880
|
+
content: {
|
|
881
|
+
"application/json": {
|
|
882
|
+
schema: {
|
|
883
|
+
type: "object",
|
|
884
|
+
additionalProperties: false,
|
|
885
|
+
required: ["provider_organization_id", "team_id", "selections"],
|
|
886
|
+
properties: {
|
|
887
|
+
provider_organization_id: { type: "integer", minimum: 1, maximum: 9007199254740991 },
|
|
888
|
+
team_id: { type: "integer", minimum: 1, maximum: 9007199254740991 },
|
|
889
|
+
selections: {
|
|
890
|
+
type: "array",
|
|
891
|
+
minItems: 1,
|
|
892
|
+
maxItems: 64,
|
|
893
|
+
items: {
|
|
894
|
+
type: "object",
|
|
895
|
+
additionalProperties: false,
|
|
896
|
+
required: ["app_name", "app_version"],
|
|
897
|
+
anyOf: [{ required: ["module_ids"] }, { required: ["endpoint_names"] }],
|
|
898
|
+
properties: {
|
|
899
|
+
app_name: {
|
|
900
|
+
type: "string",
|
|
901
|
+
pattern: "^[A-Za-z0-9_-]{1,128}$",
|
|
902
|
+
description: "A Make standard app identifier.",
|
|
903
|
+
},
|
|
904
|
+
app_version: { type: "integer", minimum: 1, maximum: 9007199254740991 },
|
|
905
|
+
module_ids: {
|
|
906
|
+
type: "array",
|
|
907
|
+
minItems: 1,
|
|
908
|
+
maxItems: 64,
|
|
909
|
+
uniqueItems: true,
|
|
910
|
+
items: { type: "string", pattern: "^[A-Za-z0-9_.:-]{1,128}$" },
|
|
911
|
+
},
|
|
912
|
+
endpoint_names: {
|
|
913
|
+
type: "array",
|
|
914
|
+
minItems: 1,
|
|
915
|
+
maxItems: 64,
|
|
916
|
+
uniqueItems: true,
|
|
917
|
+
items: { type: "string", pattern: "^[A-Za-z0-9_-]{1,128}$" },
|
|
918
|
+
},
|
|
919
|
+
},
|
|
920
|
+
},
|
|
921
|
+
},
|
|
922
|
+
},
|
|
923
|
+
},
|
|
924
|
+
},
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
parameters: [
|
|
928
|
+
{
|
|
929
|
+
name: "X-Request-Id",
|
|
930
|
+
in: "header",
|
|
931
|
+
description: "Optional caller-provided correlation identifier.",
|
|
932
|
+
required: false,
|
|
933
|
+
schema: { type: "string", minLength: 1, maxLength: 128 },
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
name: "organization_id",
|
|
937
|
+
in: "path",
|
|
938
|
+
required: true,
|
|
939
|
+
schema: { type: "string", pattern: "^[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: "grant_id",
|
|
943
|
+
in: "path",
|
|
944
|
+
required: true,
|
|
945
|
+
schema: { type: "string", pattern: "^[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
name: "Idempotency-Key",
|
|
949
|
+
in: "header",
|
|
950
|
+
description:
|
|
951
|
+
"Identifies one mutation and its canonical request payload; only letters, digits and the characters . _ : - are accepted.",
|
|
952
|
+
required: true,
|
|
953
|
+
schema: { type: "string", minLength: 1, maxLength: 128, pattern: "^[A-Za-z0-9._:-]+$" },
|
|
954
|
+
},
|
|
955
|
+
],
|
|
956
|
+
outputSchema: {
|
|
957
|
+
type: "object",
|
|
958
|
+
additionalProperties: false,
|
|
959
|
+
required: ["state"],
|
|
960
|
+
properties: {
|
|
961
|
+
state: { enum: ["created", "running", "uncertain", "reconnect_required"] },
|
|
962
|
+
request_id: { type: "string", pattern: "^[a-f0-9]{64}$" },
|
|
963
|
+
provider_status: { type: "string", minLength: 1, maxLength: 64 },
|
|
964
|
+
authorization_url: {
|
|
965
|
+
type: "string",
|
|
966
|
+
format: "uri",
|
|
967
|
+
description: "Private Make link available only on create or replay.",
|
|
968
|
+
},
|
|
969
|
+
expires_at: { type: ["string", "null"], format: "date-time" },
|
|
970
|
+
},
|
|
971
|
+
},
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
inputSchema: {
|
|
975
|
+
type: "object",
|
|
976
|
+
properties: {
|
|
977
|
+
organization_id: { type: "string", pattern: "^[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
978
|
+
grant_id: { type: "string", pattern: "^[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
979
|
+
request_id: { type: "string", pattern: "^[a-f0-9]{64}$" },
|
|
980
|
+
},
|
|
981
|
+
required: ["organization_id", "grant_id", "request_id"],
|
|
982
|
+
additionalProperties: false,
|
|
983
|
+
},
|
|
984
|
+
operationId: "getMakeCredentialRequest",
|
|
985
|
+
method: "GET",
|
|
986
|
+
path: "/v1/organizations/{organization_id}/connections/{grant_id}/credential-requests/{request_id}",
|
|
987
|
+
summary: "Read native Make Credential Request status",
|
|
988
|
+
description:
|
|
989
|
+
"Reads the current Make status for the owning workspace grant. The private authorization link is available in the create response.",
|
|
990
|
+
disposition: "named",
|
|
991
|
+
toolNames: ["integration_credential_request_status"],
|
|
992
|
+
parameters: [
|
|
993
|
+
{
|
|
994
|
+
name: "X-Request-Id",
|
|
995
|
+
in: "header",
|
|
996
|
+
description: "Optional caller-provided correlation identifier.",
|
|
997
|
+
required: false,
|
|
998
|
+
schema: { type: "string", minLength: 1, maxLength: 128 },
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
name: "organization_id",
|
|
1002
|
+
in: "path",
|
|
1003
|
+
required: true,
|
|
1004
|
+
schema: { type: "string", pattern: "^[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
name: "grant_id",
|
|
1008
|
+
in: "path",
|
|
1009
|
+
required: true,
|
|
1010
|
+
schema: { type: "string", pattern: "^[0-9A-HJKMNP-TV-Z]{26}$" },
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
name: "request_id",
|
|
1014
|
+
in: "path",
|
|
1015
|
+
required: true,
|
|
1016
|
+
schema: { type: "string", pattern: "^[a-f0-9]{64}$" },
|
|
1017
|
+
},
|
|
1018
|
+
],
|
|
1019
|
+
outputSchema: {
|
|
1020
|
+
type: "object",
|
|
1021
|
+
additionalProperties: false,
|
|
1022
|
+
required: ["state"],
|
|
1023
|
+
properties: {
|
|
1024
|
+
state: { enum: ["created", "running", "uncertain", "reconnect_required"] },
|
|
1025
|
+
request_id: { type: "string", pattern: "^[a-f0-9]{64}$" },
|
|
1026
|
+
provider_status: { type: "string", minLength: 1, maxLength: 64 },
|
|
1027
|
+
expires_at: { type: ["string", "null"], format: "date-time" },
|
|
1028
|
+
},
|
|
1029
|
+
},
|
|
1030
|
+
},
|
|
810
1031
|
{
|
|
811
1032
|
inputSchema: {
|
|
812
1033
|
type: "object",
|