⬆️ Upgrade dependencies
This commit is contained in:
@ -14,29 +14,29 @@
|
|||||||
"@chakra-ui/css-reset": "2.0.10",
|
"@chakra-ui/css-reset": "2.0.10",
|
||||||
"@chakra-ui/react": "2.4.1",
|
"@chakra-ui/react": "2.4.1",
|
||||||
"@codemirror/lang-css": "6.0.1",
|
"@codemirror/lang-css": "6.0.1",
|
||||||
"@codemirror/lang-html": "6.1.4",
|
"@codemirror/lang-html": "6.2.0",
|
||||||
"@codemirror/lang-javascript": "6.1.1",
|
"@codemirror/lang-javascript": "6.1.1",
|
||||||
"@codemirror/lang-json": "6.0.1",
|
"@codemirror/lang-json": "6.0.1",
|
||||||
"@codemirror/lint": "6.1.0",
|
"@codemirror/lint": "6.1.0",
|
||||||
"@codemirror/state": "6.1.3",
|
"@codemirror/state": "6.1.4",
|
||||||
"@dnd-kit/core": "6.0.5",
|
"@dnd-kit/core": "6.0.5",
|
||||||
"@dnd-kit/sortable": "7.0.1",
|
"@dnd-kit/sortable": "7.0.1",
|
||||||
"@dnd-kit/utilities": "3.2.0",
|
"@dnd-kit/utilities": "3.2.0",
|
||||||
"@emotion/react": "11.10.5",
|
"@emotion/react": "11.10.5",
|
||||||
"@emotion/styled": "11.10.5",
|
"@emotion/styled": "11.10.5",
|
||||||
"@faire/mjml-react": "2.1.4",
|
"@faire/mjml-react": "3.0.0",
|
||||||
"@giphy/js-fetch-api": "4.4.0",
|
"@giphy/js-fetch-api": "4.4.0",
|
||||||
"@giphy/js-types": "4.2.1",
|
"@giphy/js-types": "4.2.1",
|
||||||
"@giphy/react-components": "6.2.0",
|
"@giphy/react-components": "6.2.0",
|
||||||
"@googleapis/drive": "4.0.0",
|
"@googleapis/drive": "4.0.0",
|
||||||
"@sentry/nextjs": "7.19.0",
|
"@sentry/nextjs": "7.20.1",
|
||||||
"@stripe/stripe-js": "1.44.1",
|
"@stripe/stripe-js": "1.44.1",
|
||||||
"@tanstack/react-query": "^4.16.1",
|
"@tanstack/react-query": "^4.16.1",
|
||||||
"@tanstack/react-table": "8.5.28",
|
"@tanstack/react-table": "8.5.30",
|
||||||
"@trpc/client": "10.0.0-rc.8",
|
"@trpc/client": "10.0.0",
|
||||||
"@trpc/next": "10.0.0-rc.8",
|
"@trpc/next": "10.0.0",
|
||||||
"@trpc/react-query": "10.0.0-rc.8",
|
"@trpc/react-query": "10.0.0",
|
||||||
"@trpc/server": "10.0.0-rc.8",
|
"@trpc/server": "10.0.0",
|
||||||
"@udecode/plate-basic-marks": "18.9.0",
|
"@udecode/plate-basic-marks": "18.9.0",
|
||||||
"@udecode/plate-common": "^7.0.2",
|
"@udecode/plate-common": "^7.0.2",
|
||||||
"@udecode/plate-core": "18.9.0",
|
"@udecode/plate-core": "18.9.0",
|
||||||
@ -45,7 +45,7 @@
|
|||||||
"@udecode/plate-ui-link": "18.9.1",
|
"@udecode/plate-ui-link": "18.9.1",
|
||||||
"@udecode/plate-ui-toolbar": "18.9.0",
|
"@udecode/plate-ui-toolbar": "18.9.0",
|
||||||
"@use-gesture/react": "^10.2.22",
|
"@use-gesture/react": "^10.2.22",
|
||||||
"aws-sdk": "2.1254.0",
|
"aws-sdk": "2.1258.0",
|
||||||
"bot-engine": "workspace:*",
|
"bot-engine": "workspace:*",
|
||||||
"browser-image-compression": "2.0.0",
|
"browser-image-compression": "2.0.0",
|
||||||
"canvas-confetti": "1.6.0",
|
"canvas-confetti": "1.6.0",
|
||||||
@ -56,10 +56,10 @@
|
|||||||
"emails": "workspace:*",
|
"emails": "workspace:*",
|
||||||
"emojilib": "3.0.7",
|
"emojilib": "3.0.7",
|
||||||
"focus-visible": "5.2.0",
|
"focus-visible": "5.2.0",
|
||||||
"framer-motion": "7.6.6",
|
"framer-motion": "7.6.7",
|
||||||
"google-auth-library": "8.7.0",
|
"google-auth-library": "8.7.0",
|
||||||
"google-spreadsheet": "3.3.0",
|
"google-spreadsheet": "3.3.0",
|
||||||
"got": "12.5.2",
|
"got": "12.5.3",
|
||||||
"htmlparser2": "8.0.1",
|
"htmlparser2": "8.0.1",
|
||||||
"immer": "9.0.16",
|
"immer": "9.0.16",
|
||||||
"js-video-url-parser": "0.5.1",
|
"js-video-url-parser": "0.5.1",
|
||||||
@ -67,7 +67,7 @@
|
|||||||
"micro": "9.4.1",
|
"micro": "9.4.1",
|
||||||
"micro-cors": "0.1.1",
|
"micro-cors": "0.1.1",
|
||||||
"minio": "7.0.32",
|
"minio": "7.0.32",
|
||||||
"next": "13.0.3",
|
"next": "13.0.4",
|
||||||
"next-auth": "4.12.3",
|
"next-auth": "4.12.3",
|
||||||
"nodemailer": "6.8.0",
|
"nodemailer": "6.8.0",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
@ -76,11 +76,11 @@
|
|||||||
"qs": "6.11.0",
|
"qs": "6.11.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"slate": "0.85.0",
|
"slate": "0.86.0",
|
||||||
"slate-history": "0.85.0",
|
"slate-history": "0.86.0",
|
||||||
"slate-hyperscript": "0.77.0",
|
"slate-hyperscript": "0.77.0",
|
||||||
"slate-react": "0.83.2",
|
"slate-react": "0.86.0",
|
||||||
"stripe": "10.17.0",
|
"stripe": "11.1.0",
|
||||||
"styled-components": "5.3.6",
|
"styled-components": "5.3.6",
|
||||||
"svg-round-corners": "0.4.1",
|
"svg-round-corners": "0.4.1",
|
||||||
"swr": "1.3.0",
|
"swr": "1.3.0",
|
||||||
@ -92,7 +92,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.20.2",
|
"@babel/core": "7.20.2",
|
||||||
"@chakra-ui/styled-system": "2.3.5",
|
"@chakra-ui/styled-system": "2.3.5",
|
||||||
"@playwright/test": "1.27.1",
|
"@playwright/test": "1.28.0",
|
||||||
"@types/canvas-confetti": "1.6.0",
|
"@types/canvas-confetti": "1.6.0",
|
||||||
"@types/google-spreadsheet": "3.3.0",
|
"@types/google-spreadsheet": "3.3.0",
|
||||||
"@types/jsonwebtoken": "8.5.9",
|
"@types/jsonwebtoken": "8.5.9",
|
||||||
@ -112,7 +112,7 @@
|
|||||||
"next-transpile-modules": "10.0.0",
|
"next-transpile-modules": "10.0.0",
|
||||||
"superjson": "^1.11.0",
|
"superjson": "^1.11.0",
|
||||||
"tsconfig": "workspace:*",
|
"tsconfig": "workspace:*",
|
||||||
"typescript": "4.8.4",
|
"typescript": "4.9.3",
|
||||||
"utils": "workspace:*",
|
"utils": "workspace:*",
|
||||||
"zod": "3.19.1",
|
"zod": "3.19.1",
|
||||||
"eslint": "8.28.0",
|
"eslint": "8.28.0",
|
||||||
|
@ -33,7 +33,7 @@ test('should work as expected', async ({ page }) => {
|
|||||||
'src',
|
'src',
|
||||||
RegExp(`/public/typebots/${typebotId}/blocks`, 'gm')
|
RegExp(`/public/typebots/${typebotId}/blocks`, 'gm')
|
||||||
)
|
)
|
||||||
await page.getByRole('button', { name: 'Preview' }).click()
|
await page.getByRole('button', { name: 'Preview', exact: true }).click()
|
||||||
await expect(typebotViewer(page).locator('audio')).toHaveAttribute(
|
await expect(typebotViewer(page).locator('audio')).toHaveAttribute(
|
||||||
'src',
|
'src',
|
||||||
RegExp(`/public/typebots/${typebotId}/blocks`, 'gm')
|
RegExp(`/public/typebots/${typebotId}/blocks`, 'gm')
|
||||||
|
@ -29,11 +29,7 @@ test.describe.parallel('Image bubble block', () => {
|
|||||||
await page.setInputFiles('input[type="file"]', getTestAsset('avatar.jpg'))
|
await page.setInputFiles('input[type="file"]', getTestAsset('avatar.jpg'))
|
||||||
await expect(page.locator('img')).toHaveAttribute(
|
await expect(page.locator('img')).toHaveAttribute(
|
||||||
'src',
|
'src',
|
||||||
`${process.env.S3_SSL === 'false' ? 'http://' : 'https://'}${
|
new RegExp(`/public/typebots/${typebotId}/blocks/block2`, 'gm')
|
||||||
process.env.S3_ENDPOINT
|
|
||||||
}${process.env.S3_PORT ? `:${process.env.S3_PORT}` : ''}/${
|
|
||||||
process.env.S3_BUCKET
|
|
||||||
}/public/typebots/${typebotId}/blocks/block2`
|
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ test.describe('Chatwoot block', () => {
|
|||||||
await page.getByLabel('Email').fill('john@email.com')
|
await page.getByLabel('Email').fill('john@email.com')
|
||||||
await page.getByLabel('Avatar URL').fill('https://domain.com/avatar.png')
|
await page.getByLabel('Avatar URL').fill('https://domain.com/avatar.png')
|
||||||
await page.getByLabel('Phone number').fill('+33654347543')
|
await page.getByLabel('Phone number').fill('+33654347543')
|
||||||
await page.getByRole('button', { name: 'Preview' }).click()
|
await page.getByRole('button', { name: 'Preview', exact: true }).click()
|
||||||
await expect(
|
await expect(
|
||||||
page.getByText("Chatwoot won't open in preview mode").nth(0)
|
page.getByText("Chatwoot won't open in preview mode").nth(0)
|
||||||
).toBeVisible()
|
).toBeVisible()
|
||||||
|
@ -139,9 +139,9 @@ const useUndo = <T extends { updatedAt: string } | undefined>(
|
|||||||
const set = useCallback(
|
const set = useCallback(
|
||||||
(newPresent: T | ((current: T) => T), options = { updateDate: true }) => {
|
(newPresent: T | ((current: T) => T), options = { updateDate: true }) => {
|
||||||
const updatedTypebot =
|
const updatedTypebot =
|
||||||
newPresent && 'id' in newPresent
|
newPresent && typeof newPresent === 'function'
|
||||||
? newPresent
|
? newPresent(presentRef.current)
|
||||||
: (newPresent as (current: T) => T)(presentRef.current)
|
: newPresent
|
||||||
presentRef.current = updatedTypebot
|
presentRef.current = updatedTypebot
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ActionType.Set,
|
type: ActionType.Set,
|
||||||
|
@ -27,7 +27,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
|||||||
})
|
})
|
||||||
if (!workspace?.stripeId) return forbidden(res)
|
if (!workspace?.stripeId) return forbidden(res)
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
const session = await stripe.billingPortal.sessions.create({
|
const session = await stripe.billingPortal.sessions.create({
|
||||||
customer: workspace.stripeId,
|
customer: workspace.stripeId,
|
||||||
|
@ -22,7 +22,7 @@ const createCheckoutSession = async (userId: string) => {
|
|||||||
if (!process.env.STRIPE_SECRET_KEY)
|
if (!process.env.STRIPE_SECRET_KEY)
|
||||||
throw Error('STRIPE_SECRET_KEY var is missing')
|
throw Error('STRIPE_SECRET_KEY var is missing')
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
|
|
||||||
const claimableCustomPlan = await prisma.claimableCustomPlan.findFirst({
|
const claimableCustomPlan = await prisma.claimableCustomPlan.findFirst({
|
||||||
|
@ -27,7 +27,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
|||||||
})
|
})
|
||||||
if (!workspace?.stripeId) return forbidden(res)
|
if (!workspace?.stripeId) return forbidden(res)
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
const invoices = await stripe.invoices.list({
|
const invoices = await stripe.invoices.list({
|
||||||
customer: workspace.stripeId,
|
customer: workspace.stripeId,
|
||||||
|
@ -46,7 +46,7 @@ const getSubscriptionDetails =
|
|||||||
})
|
})
|
||||||
if (!workspace?.stripeId) return forbidden(res)
|
if (!workspace?.stripeId) return forbidden(res)
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
const subscriptions = await stripe.subscriptions.list({
|
const subscriptions = await stripe.subscriptions.list({
|
||||||
customer: workspace.stripeId,
|
customer: workspace.stripeId,
|
||||||
@ -70,7 +70,7 @@ const createCheckoutSession = (req: NextApiRequest) => {
|
|||||||
if (!process.env.STRIPE_SECRET_KEY)
|
if (!process.env.STRIPE_SECRET_KEY)
|
||||||
throw Error('STRIPE_SECRET_KEY var is missing')
|
throw Error('STRIPE_SECRET_KEY var is missing')
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
const {
|
const {
|
||||||
email,
|
email,
|
||||||
@ -118,7 +118,7 @@ const updateSubscription = async (req: NextApiRequest) => {
|
|||||||
if (!process.env.STRIPE_SECRET_KEY)
|
if (!process.env.STRIPE_SECRET_KEY)
|
||||||
throw Error('STRIPE_SECRET_KEY var is missing')
|
throw Error('STRIPE_SECRET_KEY var is missing')
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
const { data } = await stripe.subscriptions.list({
|
const { data } = await stripe.subscriptions.list({
|
||||||
customer: stripeId,
|
customer: stripeId,
|
||||||
@ -203,7 +203,7 @@ const cancelSubscription =
|
|||||||
})
|
})
|
||||||
if (!workspace?.stripeId) return forbidden(res)
|
if (!workspace?.stripeId) return forbidden(res)
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
const existingSubscription = await stripe.subscriptions.list({
|
const existingSubscription = await stripe.subscriptions.list({
|
||||||
customer: workspace.stripeId,
|
customer: workspace.stripeId,
|
||||||
|
@ -10,7 +10,7 @@ import { Plan } from 'db'
|
|||||||
if (!process.env.STRIPE_SECRET_KEY || !process.env.STRIPE_WEBHOOK_SECRET)
|
if (!process.env.STRIPE_SECRET_KEY || !process.env.STRIPE_WEBHOOK_SECRET)
|
||||||
throw new Error('STRIPE_SECRET_KEY or STRIPE_WEBHOOK_SECRET missing')
|
throw new Error('STRIPE_SECRET_KEY or STRIPE_WEBHOOK_SECRET missing')
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
|
|
||||||
const cors = Cors({
|
const cors = Cors({
|
||||||
|
@ -11,7 +11,7 @@ import { proWorkspaceId } from 'utils/playwright/databaseSetup'
|
|||||||
const prisma = new PrismaClient()
|
const prisma = new PrismaClient()
|
||||||
|
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? '', {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY ?? '', {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
|
|
||||||
export const addSubscriptionToWorkspace = async (
|
export const addSubscriptionToWorkspace = async (
|
||||||
|
@ -42,8 +42,8 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@algolia/client-search": "4.14.2",
|
"@algolia/client-search": "4.14.2",
|
||||||
"@types/react": "18.0.21",
|
"@types/react": "18.0.25",
|
||||||
"typescript": "4.8.4",
|
"typescript": "4.9.3",
|
||||||
"webpack": "5.74.0"
|
"webpack": "5.75.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
"bot-engine": "workspace:*",
|
"bot-engine": "workspace:*",
|
||||||
"db": "workspace:*",
|
"db": "workspace:*",
|
||||||
"focus-visible": "5.2.0",
|
"focus-visible": "5.2.0",
|
||||||
"framer-motion": "7.6.6",
|
"framer-motion": "7.6.7",
|
||||||
"models": "workspace:*",
|
"models": "workspace:*",
|
||||||
"next": "13.0.3",
|
"next": "13.0.4",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"utils": "workspace:*"
|
"utils": "workspace:*"
|
||||||
@ -28,7 +28,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.20.2",
|
"@babel/core": "7.20.2",
|
||||||
"@chakra-ui/styled-system": "2.3.5",
|
"@chakra-ui/styled-system": "2.3.5",
|
||||||
"@next/bundle-analyzer": "13.0.3",
|
"@next/bundle-analyzer": "13.0.4",
|
||||||
"@types/aos": "3.0.4",
|
"@types/aos": "3.0.4",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "18.0.25",
|
||||||
@ -40,6 +40,6 @@
|
|||||||
"postcss": "8.4.19",
|
"postcss": "8.4.19",
|
||||||
"prettier": "2.7.1",
|
"prettier": "2.7.1",
|
||||||
"tsconfig": "workspace:*",
|
"tsconfig": "workspace:*",
|
||||||
"typescript": "4.8.4"
|
"typescript": "4.9.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,26 +11,26 @@
|
|||||||
"test:report": "pnpm playwright show-report"
|
"test:report": "pnpm playwright show-report"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/nextjs": "7.19.0",
|
"@sentry/nextjs": "7.20.1",
|
||||||
"aws-sdk": "2.1254.0",
|
"aws-sdk": "2.1258.0",
|
||||||
"bot-engine": "*",
|
"bot-engine": "*",
|
||||||
"cors": "2.8.5",
|
"cors": "2.8.5",
|
||||||
"cuid": "2.1.8",
|
"cuid": "2.1.8",
|
||||||
"db": "workspace:*",
|
"db": "workspace:*",
|
||||||
"google-spreadsheet": "3.3.0",
|
"google-spreadsheet": "3.3.0",
|
||||||
"got": "12.5.2",
|
"got": "12.5.3",
|
||||||
"next": "13.0.3",
|
"next": "13.0.4",
|
||||||
"nodemailer": "6.8.0",
|
"nodemailer": "6.8.0",
|
||||||
"qs": "6.11.0",
|
"qs": "6.11.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"sanitize-html": "2.7.3",
|
"sanitize-html": "2.7.3",
|
||||||
"stripe": "10.17.0"
|
"stripe": "11.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/preset-env": "7.20.2",
|
"@babel/preset-env": "7.20.2",
|
||||||
"@faire/mjml-react": "2.1.4",
|
"@faire/mjml-react": "3.0.0",
|
||||||
"@playwright/test": "1.27.1",
|
"@playwright/test": "1.28.0",
|
||||||
"@types/cors": "2.8.12",
|
"@types/cors": "2.8.12",
|
||||||
"@types/google-spreadsheet": "3.3.0",
|
"@types/google-spreadsheet": "3.3.0",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
@ -49,7 +49,7 @@
|
|||||||
"node-fetch": "^3.3.0",
|
"node-fetch": "^3.3.0",
|
||||||
"papaparse": "5.3.2",
|
"papaparse": "5.3.2",
|
||||||
"tsconfig": "workspace:*",
|
"tsconfig": "workspace:*",
|
||||||
"typescript": "4.8.4",
|
"typescript": "4.9.3",
|
||||||
"utils": "workspace:*"
|
"utils": "workspace:*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
|||||||
isPreview && stripeKeys?.test?.secretKey
|
isPreview && stripeKeys?.test?.secretKey
|
||||||
? stripeKeys.test.secretKey
|
? stripeKeys.test.secretKey
|
||||||
: stripeKeys.live.secretKey,
|
: stripeKeys.live.secretKey,
|
||||||
{ apiVersion: '2022-08-01' }
|
{ apiVersion: '2022-11-15' }
|
||||||
)
|
)
|
||||||
const amount =
|
const amount =
|
||||||
Number(parseVariables(variables)(inputOptions.amount)) *
|
Number(parseVariables(variables)(inputOptions.amount)) *
|
||||||
|
@ -13,7 +13,8 @@ import { saveErrorLog, saveSuccessLog } from '@/features/logs/api'
|
|||||||
import Cors from 'cors'
|
import Cors from 'cors'
|
||||||
import { withSentry } from '@sentry/nextjs'
|
import { withSentry } from '@sentry/nextjs'
|
||||||
import Mail from 'nodemailer/lib/mailer'
|
import Mail from 'nodemailer/lib/mailer'
|
||||||
import { DefaultBotNotificationEmail, render } from 'emails'
|
import { DefaultBotNotificationEmail } from 'emails'
|
||||||
|
import { render } from '@faire/mjml-react/dist/src/utils/render'
|
||||||
import prisma from '@/lib/prisma'
|
import prisma from '@/lib/prisma'
|
||||||
import { getLinkedTypebots } from '@/features/typebotLink/api'
|
import { getLinkedTypebots } from '@/features/typebotLink/api'
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"tailwindcss": "3.2.4",
|
"tailwindcss": "3.2.4",
|
||||||
"typescript": "4.8.4",
|
"typescript": "4.9.3",
|
||||||
"utils": "workspace:*",
|
"utils": "workspace:*",
|
||||||
"typebot-js": "workspace:*",
|
"typebot-js": "workspace:*",
|
||||||
"tsconfig": "workspace:*"
|
"tsconfig": "workspace:*"
|
||||||
|
@ -18,6 +18,6 @@
|
|||||||
"dotenv-cli": "6.0.0",
|
"dotenv-cli": "6.0.0",
|
||||||
"prisma": "4.6.1",
|
"prisma": "4.6.1",
|
||||||
"tsconfig": "workspace:*",
|
"tsconfig": "workspace:*",
|
||||||
"typescript": "4.8.4"
|
"typescript": "4.9.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
"author": "Baptiste Arnaud",
|
"author": "Baptiste Arnaud",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@faire/mjml-react": "2.1.4",
|
"@faire/mjml-react": "3.0.0",
|
||||||
"@types/node": "18.11.9",
|
"@types/node": "18.11.9",
|
||||||
"@types/nodemailer": "6.4.6",
|
"@types/nodemailer": "6.4.6",
|
||||||
"@types/react": "18.0.25",
|
"@types/react": "18.0.25",
|
||||||
"concurrently": "7.5.0",
|
"concurrently": "7.6.0",
|
||||||
"http-server": "14.1.1",
|
"http-server": "14.1.1",
|
||||||
"nodemailer": "6.8.0",
|
"nodemailer": "6.8.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
|
@ -1,15 +1,12 @@
|
|||||||
import { MjmlImageProps, MjmlImage } from '@faire/mjml-react'
|
import { IMjmlImageProps, MjmlImage } from '@faire/mjml-react'
|
||||||
import React from 'react'
|
|
||||||
import { borderBase } from '../theme'
|
import { borderBase } from '../theme'
|
||||||
|
|
||||||
export const HeroImage = (props: MjmlImageProps) => (
|
export const HeroImage = (props: IMjmlImageProps) => (
|
||||||
<MjmlImage
|
<MjmlImage
|
||||||
cssClass="hero"
|
cssClass="hero"
|
||||||
padding="0"
|
padding="0"
|
||||||
align="left"
|
align="left"
|
||||||
borderRadius={borderBase}
|
borderRadius={borderBase}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
/>
|
||||||
{props.children}
|
|
||||||
</MjmlImage>
|
|
||||||
)
|
)
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import { MjmlText, MjmlTextProps, PaddingProps } from '@faire/mjml-react'
|
import { MjmlText, IMjmlTextProps } from '@faire/mjml-react'
|
||||||
import React from 'react'
|
|
||||||
import { leadingRelaxed, textBase } from '../theme'
|
import { leadingRelaxed, textBase } from '../theme'
|
||||||
|
|
||||||
export const Text = (props: MjmlTextProps & PaddingProps) => (
|
export const Text = (props: IMjmlTextProps) => (
|
||||||
<MjmlText
|
<MjmlText
|
||||||
padding="24px 0 0"
|
padding="24px 0 0"
|
||||||
fontSize={textBase}
|
fontSize={textBase}
|
||||||
|
@ -5,8 +5,8 @@ import {
|
|||||||
MjmlSection,
|
MjmlSection,
|
||||||
MjmlColumn,
|
MjmlColumn,
|
||||||
MjmlSpacer,
|
MjmlSpacer,
|
||||||
render,
|
|
||||||
} from '@faire/mjml-react'
|
} from '@faire/mjml-react'
|
||||||
|
import { render } from '@faire/mjml-react/dist/src/utils/render'
|
||||||
import { Button, Head, HeroImage, Text } from '../components'
|
import { Button, Head, HeroImage, Text } from '../components'
|
||||||
import { parseNumberWithCommas } from 'utils'
|
import { parseNumberWithCommas } from 'utils'
|
||||||
import { SendMailOptions } from 'nodemailer'
|
import { SendMailOptions } from 'nodemailer'
|
||||||
@ -48,7 +48,7 @@ export const AlmostReachedChatsLimitEmail = ({
|
|||||||
You currently reached 80% of {readableChatsLimit} chats.
|
You currently reached 80% of {readableChatsLimit} chats.
|
||||||
</Text>
|
</Text>
|
||||||
<Text>This limit will be reset on {readableResetDate}.</Text>
|
<Text>This limit will be reset on {readableResetDate}.</Text>
|
||||||
<Text fontWeight={800}>
|
<Text fontWeight="800">
|
||||||
Your bots won't start the chat if you reach the limit before
|
Your bots won't start the chat if you reach the limit before
|
||||||
this date❗
|
this date❗
|
||||||
</Text>
|
</Text>
|
||||||
|
@ -5,8 +5,8 @@ import {
|
|||||||
MjmlSection,
|
MjmlSection,
|
||||||
MjmlColumn,
|
MjmlColumn,
|
||||||
MjmlSpacer,
|
MjmlSpacer,
|
||||||
render,
|
|
||||||
} from '@faire/mjml-react'
|
} from '@faire/mjml-react'
|
||||||
|
import { render } from '@faire/mjml-react/dist/src/utils/render'
|
||||||
import { Button, Head, HeroImage, Text } from '../components'
|
import { Button, Head, HeroImage, Text } from '../components'
|
||||||
import { SendMailOptions } from 'nodemailer'
|
import { SendMailOptions } from 'nodemailer'
|
||||||
import { sendEmail } from '../sendEmail'
|
import { sendEmail } from '../sendEmail'
|
||||||
@ -39,7 +39,7 @@ export const AlmostReachedStorageLimitEmail = ({
|
|||||||
currently reached 80% of your {readableStorageLimit} storage
|
currently reached 80% of your {readableStorageLimit} storage
|
||||||
limit.
|
limit.
|
||||||
</Text>
|
</Text>
|
||||||
<Text fontWeight={800}>
|
<Text fontWeight="800">
|
||||||
Your bots won't collect new files once you reach the limit❗
|
Your bots won't collect new files once you reach the limit❗
|
||||||
</Text>
|
</Text>
|
||||||
<Text>
|
<Text>
|
||||||
|
@ -5,8 +5,8 @@ import {
|
|||||||
MjmlSection,
|
MjmlSection,
|
||||||
MjmlColumn,
|
MjmlColumn,
|
||||||
MjmlSpacer,
|
MjmlSpacer,
|
||||||
render,
|
|
||||||
} from '@faire/mjml-react'
|
} from '@faire/mjml-react'
|
||||||
|
import { render } from '@faire/mjml-react/dist/src/utils/render'
|
||||||
import { HeroImage, Text, Button, Head } from '../components'
|
import { HeroImage, Text, Button, Head } from '../components'
|
||||||
import { SendMailOptions } from 'nodemailer'
|
import { SendMailOptions } from 'nodemailer'
|
||||||
import { sendEmail } from '../sendEmail'
|
import { sendEmail } from '../sendEmail'
|
||||||
|
@ -5,8 +5,8 @@ import {
|
|||||||
MjmlSection,
|
MjmlSection,
|
||||||
MjmlColumn,
|
MjmlColumn,
|
||||||
MjmlSpacer,
|
MjmlSpacer,
|
||||||
render,
|
|
||||||
} from '@faire/mjml-react'
|
} from '@faire/mjml-react'
|
||||||
|
import { render } from '@faire/mjml-react/dist/src/utils/render'
|
||||||
import { Button, Head, HeroImage, Text } from '../components'
|
import { Button, Head, HeroImage, Text } from '../components'
|
||||||
import { parseNumberWithCommas } from 'utils'
|
import { parseNumberWithCommas } from 'utils'
|
||||||
import { SendMailOptions } from 'nodemailer'
|
import { SendMailOptions } from 'nodemailer'
|
||||||
@ -46,7 +46,7 @@ export const ReachedChatsLimitEmail = ({
|
|||||||
It just happened, you've reached your monthly{' '}
|
It just happened, you've reached your monthly{' '}
|
||||||
{readableChatsLimit} chats limit 😮
|
{readableChatsLimit} chats limit 😮
|
||||||
</Text>
|
</Text>
|
||||||
<Text fontWeight={800}>
|
<Text fontWeight="800">
|
||||||
It means your bots are closed until {readableResetDate}❗
|
It means your bots are closed until {readableResetDate}❗
|
||||||
</Text>
|
</Text>
|
||||||
<Text>
|
<Text>
|
||||||
|
@ -5,8 +5,8 @@ import {
|
|||||||
MjmlSection,
|
MjmlSection,
|
||||||
MjmlColumn,
|
MjmlColumn,
|
||||||
MjmlSpacer,
|
MjmlSpacer,
|
||||||
render,
|
|
||||||
} from '@faire/mjml-react'
|
} from '@faire/mjml-react'
|
||||||
|
import { render } from '@faire/mjml-react/dist/src/utils/render'
|
||||||
import { Button, Head, HeroImage, Text } from '../components'
|
import { Button, Head, HeroImage, Text } from '../components'
|
||||||
import { SendMailOptions } from 'nodemailer'
|
import { SendMailOptions } from 'nodemailer'
|
||||||
import { sendEmail } from '../sendEmail'
|
import { sendEmail } from '../sendEmail'
|
||||||
@ -37,7 +37,7 @@ export const ReachedStorageLimitEmail = ({
|
|||||||
It just happened, you've reached your {readableStorageLimit}{' '}
|
It just happened, you've reached your {readableStorageLimit}{' '}
|
||||||
storage limit 😮
|
storage limit 😮
|
||||||
</Text>
|
</Text>
|
||||||
<Text fontWeight={800}>
|
<Text fontWeight="800">
|
||||||
It means your bots won't collect new files from your users❗
|
It means your bots won't collect new files from your users❗
|
||||||
</Text>
|
</Text>
|
||||||
<Text>
|
<Text>
|
||||||
|
@ -5,8 +5,8 @@ import {
|
|||||||
MjmlSection,
|
MjmlSection,
|
||||||
MjmlColumn,
|
MjmlColumn,
|
||||||
MjmlSpacer,
|
MjmlSpacer,
|
||||||
render,
|
|
||||||
} from '@faire/mjml-react'
|
} from '@faire/mjml-react'
|
||||||
|
import { render } from '@faire/mjml-react/dist/src/utils/render'
|
||||||
import { HeroImage, Text, Button, Head } from '../components'
|
import { HeroImage, Text, Button, Head } from '../components'
|
||||||
import { SendMailOptions } from 'nodemailer'
|
import { SendMailOptions } from 'nodemailer'
|
||||||
import { sendEmail } from '../sendEmail'
|
import { sendEmail } from '../sendEmail'
|
||||||
|
@ -1,2 +1 @@
|
|||||||
export * from './emails'
|
export * from './emails'
|
||||||
export { render } from '@faire/mjml-react'
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { render } from '@faire/mjml-react'
|
import { render } from '@faire/mjml-react/dist/src/utils/render'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
import {
|
import {
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
"zod": "3.19.1"
|
"zod": "3.19.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "4.8.4",
|
"typescript": "4.9.3",
|
||||||
"next": "13.0.3",
|
"next": "13.0.4",
|
||||||
"db": "workspace:*",
|
"db": "workspace:*",
|
||||||
"tsconfig": "workspace:*"
|
"tsconfig": "workspace:*"
|
||||||
},
|
},
|
||||||
|
@ -14,11 +14,11 @@
|
|||||||
"axios": "^1.1.3",
|
"axios": "^1.1.3",
|
||||||
"db": "workspace:*",
|
"db": "workspace:*",
|
||||||
"emails": "workspace:*",
|
"emails": "workspace:*",
|
||||||
"got": "12.5.2",
|
"got": "12.5.3",
|
||||||
"models": "workspace:*",
|
"models": "workspace:*",
|
||||||
"stripe": "10.17.0",
|
"stripe": "11.1.0",
|
||||||
"tsx": "3.12.1",
|
"tsx": "3.12.1",
|
||||||
"typescript": "4.8.4",
|
"typescript": "4.9.3",
|
||||||
"utils": "workspace:*"
|
"utils": "workspace:*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ export const setCustomPlan = async () => {
|
|||||||
'STRIPE_SECRET_KEY or STRIPE_SUBSCRIPTION_ID or STRIPE_PRODUCT_ID or process.env.WORKSPACE_ID var is missing'
|
'STRIPE_SECRET_KEY or STRIPE_SUBSCRIPTION_ID or STRIPE_PRODUCT_ID or process.env.WORKSPACE_ID var is missing'
|
||||||
)
|
)
|
||||||
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY, {
|
||||||
apiVersion: '2022-08-01',
|
apiVersion: '2022-11-15',
|
||||||
})
|
})
|
||||||
|
|
||||||
const claimablePlan = await prisma.claimableCustomPlan.findFirst({
|
const claimablePlan = await prisma.claimableCustomPlan.findFirst({
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"jest-environment-jsdom": "29.3.1",
|
"jest-environment-jsdom": "29.3.1",
|
||||||
"prettier": "2.7.1",
|
"prettier": "2.7.1",
|
||||||
"ts-jest": "29.0.3",
|
"ts-jest": "29.0.3",
|
||||||
"typescript": "4.8.4",
|
"typescript": "4.9.3",
|
||||||
"tsconfig": "workspace:*"
|
"tsconfig": "workspace:*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,17 +6,17 @@
|
|||||||
"main": "./index.ts",
|
"main": "./index.ts",
|
||||||
"types": "./index.ts",
|
"types": "./index.ts",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "1.27.1",
|
"@playwright/test": "1.28.0",
|
||||||
"@types/nodemailer": "6.4.6",
|
"@types/nodemailer": "6.4.6",
|
||||||
"aws-sdk": "2.1254.0",
|
"aws-sdk": "2.1258.0",
|
||||||
"cuid": "2.1.8",
|
"cuid": "2.1.8",
|
||||||
"db": "workspace:*",
|
"db": "workspace:*",
|
||||||
"dotenv": "16.0.3",
|
"dotenv": "16.0.3",
|
||||||
"models": "workspace:*",
|
"models": "workspace:*",
|
||||||
"next": "13.0.3",
|
"next": "13.0.4",
|
||||||
"nodemailer": "6.8.0",
|
"nodemailer": "6.8.0",
|
||||||
"tsconfig": "workspace:*",
|
"tsconfig": "workspace:*",
|
||||||
"typescript": "4.8.4"
|
"typescript": "4.9.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"aws-sdk": "2.1152.0",
|
"aws-sdk": "2.1152.0",
|
||||||
|
1239
pnpm-lock.yaml
generated
1239
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user