2
0

Add OpenAI block

Also migrate credentials to tRPC

Closes #253
This commit is contained in:
Baptiste Arnaud
2023-03-09 08:46:36 +01:00
parent 97cfdfe79f
commit ff04edf139
86 changed files with 2583 additions and 1055 deletions

View File

@ -1,25 +1,14 @@
import { z } from 'zod'
import { chatwootBlockSchema, chatwootOptionsSchema } from './chatwoot'
import {
googleAnalyticsOptionsSchema,
googleAnalyticsBlockSchema,
} from './googleAnalytics'
import {
googleSheetsOptionsSchema,
googleSheetsBlockSchema,
} from './googleSheets/schemas'
import { chatwootBlockSchema } from './chatwoot'
import { googleAnalyticsBlockSchema } from './googleAnalytics'
import { googleSheetsBlockSchema } from './googleSheets/schemas'
import { makeComBlockSchema } from './makeCom'
import { openAIBlockSchema } from './openai'
import { pabblyConnectBlockSchema } from './pabblyConnect'
import { sendEmailOptionsSchema, sendEmailBlockSchema } from './sendEmail'
import { webhookOptionsSchema, webhookBlockSchema } from './webhook'
import { sendEmailBlockSchema } from './sendEmail'
import { webhookBlockSchema } from './webhook'
import { zapierBlockSchema } from './zapier'
const integrationBlockOptionsSchema = googleSheetsOptionsSchema
.or(googleAnalyticsOptionsSchema)
.or(webhookOptionsSchema)
.or(sendEmailOptionsSchema)
.or(chatwootOptionsSchema)
export const integrationBlockSchema = googleSheetsBlockSchema
.or(googleAnalyticsBlockSchema)
.or(webhookBlockSchema)
@ -28,8 +17,7 @@ export const integrationBlockSchema = googleSheetsBlockSchema
.or(makeComBlockSchema)
.or(pabblyConnectBlockSchema)
.or(chatwootBlockSchema)
.or(openAIBlockSchema)
export type IntegrationBlock = z.infer<typeof integrationBlockSchema>
export type IntegrationBlockOptions = z.infer<
typeof integrationBlockOptionsSchema
>
export type IntegrationBlockOptions = IntegrationBlock['options']