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

Function registerIntegration

e2e/cloud/admin-users-console.test.ts:54–72  ·  view source on GitHub ↗
(client: Client, label: string)

Source from the content-addressed store, hash-verified

52
53/** Registers a fresh apiKey-authenticated integration for connections to bind to. */
54const registerIntegration = (client: Client, label: string) =>
55 Effect.gen(function* () {
56 const slug = IntegrationSlug.make(`${label}-${randomBytes(4).toString("hex")}`);
57 yield* client.openapi.addSpec({
58 payload: {
59 spec: { kind: "blob", value: pingSpec },
60 slug,
61 baseUrl: "http://127.0.0.1:59999", // never contacted during registration
62 authenticationTemplate: [
63 {
64 slug: "apiKey",
65 type: "apiKey",
66 headers: { authorization: ["Bearer ", { type: "variable", name: "token" }] },
67 },
68 ],
69 },
70 });
71 return slug;
72 });
73
74const freshConnectionName = () => ConnectionName.make(`conn${randomBytes(4).toString("hex")}`);
75

Callers 1

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected