(slug: IntegrationSlug)
| 21 | const unique = (prefix: string): string => `${prefix}-${randomBytes(4).toString("hex")}`; |
| 22 | |
| 23 | const specPayload = (slug: IntegrationSlug) => ({ |
| 24 | spec: { |
| 25 | kind: "blob" as const, |
| 26 | value: JSON.stringify({ |
| 27 | openapi: "3.0.3", |
| 28 | info: { title: `Permissions ${slug}`, version: "1.0.0" }, |
| 29 | paths: { |
| 30 | "/ping": { |
| 31 | get: { |
| 32 | operationId: "ping", |
| 33 | tags: ["ping"], |
| 34 | responses: { "200": { description: "pong" } }, |
| 35 | }, |
| 36 | }, |
| 37 | }, |
| 38 | }), |
| 39 | }, |
| 40 | slug, |
| 41 | baseUrl: "http://127.0.0.1:59999", |
| 42 | authenticationTemplate: [ |
| 43 | { |
| 44 | slug: TEMPLATE, |
| 45 | type: "apiKey" as const, |
| 46 | headers: { authorization: ["Bearer ", { type: "variable" as const, name: "token" }] }, |
| 47 | }, |
| 48 | ], |
| 49 | }); |
| 50 | |
| 51 | const request = ( |
| 52 | target: TargetShape, |
no outgoing calls
no test coverage detected