MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / registerIntegration

Function registerIntegration

e2e/selfhost/admin-users-console.test.ts:50–68  ·  view source on GitHub ↗
(client: Client, label = "admin-ui-sh")

Source from the content-addressed store, hash-verified

48});
49
50const registerIntegration = (client: Client, label = "admin-ui-sh") =>
51 Effect.gen(function* () {
52 const slug = IntegrationSlug.make(`${label}-${randomBytes(4).toString("hex")}`);
53 yield* client.openapi.addSpec({
54 payload: {
55 spec: { kind: "blob", value: pingSpec },
56 slug,
57 baseUrl: "http://127.0.0.1:59999", // never contacted during registration
58 authenticationTemplate: [
59 {
60 slug: "apiKey",
61 type: "apiKey",
62 headers: { authorization: ["Bearer ", { type: "variable", name: "token" }] },
63 },
64 ],
65 },
66 });
67 return slug;
68 });
69
70scenario(
71 "Admin · a self-hosted owner sees the workspace's users; an invited member is refused",

Callers 1

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected