(pipeName: string)
| 235 | } |
| 236 | |
| 237 | function getApiUrls(pipeName: string) { |
| 238 | return { |
| 239 | createUrl: `https://api.langbase.com/v1/pipes`, |
| 240 | updateUrl: `https://api.langbase.com/v1/pipes/${pipeName}` |
| 241 | }; |
| 242 | } |
| 243 | |
| 244 | async function upsertPipe({ pipe, account }: { pipe: Pipe; account: Account }) { |
| 245 | const { createUrl } = getApiUrls(pipe.name); |