(input: {
readonly integration: string;
readonly slug: string;
readonly clientId: string;
readonly authorizationUrl: string;
readonly tokenUrl: string;
})
| 68 | // --------------------------------------------------------------------------- |
| 69 | |
| 70 | const createHandoffCode = (input: { |
| 71 | readonly integration: string; |
| 72 | readonly slug: string; |
| 73 | readonly clientId: string; |
| 74 | readonly authorizationUrl: string; |
| 75 | readonly tokenUrl: string; |
| 76 | }) => ` |
| 77 | const handoff = await tools.executor.coreTools.oauth.clients.createHandoff({ |
| 78 | integration: ${JSON.stringify(input.integration)}, |
| 79 | owner: "user", |
| 80 | slug: ${JSON.stringify(input.slug)}, |
| 81 | grant: "client_credentials", |
| 82 | clientId: ${JSON.stringify(input.clientId)}, |
| 83 | authorizationUrl: ${JSON.stringify(input.authorizationUrl)}, |
| 84 | tokenUrl: ${JSON.stringify(input.tokenUrl)}, |
| 85 | }); |
| 86 | return handoff.ok |
| 87 | ? { ok: true, url: handoff.data.url, instructions: handoff.data.instructions } |
| 88 | : { ok: false, error: handoff.error }; |
| 89 | `; |
| 90 | |
| 91 | // The same call, but with a `clientSecret` the tool does not declare. Whatever |
| 92 | // the boundary does with the excess field (drop or reject), the secret VALUE |
no outgoing calls
no test coverage detected