Compare commits

...

4 Commits

Author SHA1 Message Date
review-agent-prime[bot]
0880fe5b8d Edit packages/lib/constants.ts 2024-03-19 19:19:00 +00:00
Matthias Nannt
7601e377b4 chore: change caching revalidation interval to 30minutes 2024-03-19 20:17:44 +01:00
Matti Nannt
65dedfe500 chore: npm version upgrade 1.7.1 (#2285) 2024-03-19 13:35:11 +01:00
Matti Nannt
f494661235 fix: complex surveys not accepted in surveys management endpoint (#2282) 2024-03-19 12:10:18 +00:00
8 changed files with 22 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "@formbricks/api",
"license": "MIT",
"version": "1.6.0",
"version": "1.7.0",
"description": "Formbricks-api is an api wrapper for the Formbricks client API",
"keywords": [
"Formbricks",

View File

@@ -1,7 +1,7 @@
{
"name": "@formbricks/js",
"license": "MIT",
"version": "1.7.0",
"version": "1.7.1",
"description": "Formbricks-js allows you to connect your app to Formbricks, display surveys and trigger events.",
"homepage": "https://formbricks.com",
"repository": {

View File

@@ -9,7 +9,7 @@ const config = ({ mode }) => {
const isDevelopment = mode === "dev";
const formbricksSurveysScriptSrc = isDevelopment
? "http://localhost:3003/index.umd.js"
: `https://unpkg.com/@formbricks/surveys@^${surveysPackageJson.version}/dist/index.umd.js`;
: `https://unpkg.com/@formbricks/surveys@~${surveysPackageJson.version}/dist/index.umd.js`;
return defineConfig({
define: {

View File

@@ -4,9 +4,9 @@ import { env } from "./env";
export const IS_FORMBRICKS_CLOUD = env.IS_FORMBRICKS_CLOUD === "1";
export const REVALIDATION_INTERVAL = 0; //TODO: find a good way to cache and revalidate data when it changes
export const SERVICES_REVALIDATION_INTERVAL = 60 * 60 * 3; // 3 hours
export const MAU_LIMIT = IS_FORMBRICKS_CLOUD ? 9000 : 1000000;
const MINUTE = 60;
const HOUR = MINUTE * 60;
export const SERVICES_REVALIDATION_INTERVAL = MINUTE * 30; // 30 minutes
// URLs
export const WEBAPP_URL =
env.WEBAPP_URL || (env.VERCEL_URL ? `https://${env.VERCEL_URL}` : false) || "http://localhost:3000";

View File

@@ -10,7 +10,7 @@ export const validateInputs = (...pairs: ValidationPair[]): void => {
if (!inputValidation.success) {
console.error(
`Validation failed for ${JSON.stringify(value, null, 2)} and ${JSON.stringify(schema)}: ${inputValidation.error.message}`
`Validation failed for ${JSON.stringify(value)} and ${JSON.stringify(schema)}: ${inputValidation.error.message}`
);
throw new ValidationError("Validation failed");
}

View File

@@ -1,7 +1,7 @@
{
"name": "@formbricks/surveys",
"license": "MIT",
"version": "1.7.0",
"version": "1.7.1",
"description": "Formbricks-surveys is a helper library to embed surveys into your application",
"homepage": "https://formbricks.com",
"repository": {

View File

@@ -18,7 +18,7 @@ const config = ({ mode }) => {
const isDevelopment = mode === "dev";
const datePickerScriptSrc = isDevelopment
? "http://localhost:3003/question-date.umd.js"
: `https://unpkg.com/@formbricks/surveys@^${packageJson.version}/dist/question-date.umd.js`;
: `https://unpkg.com/@formbricks/surveys@~${packageJson.version}/dist/question-date.umd.js`;
return defineConfig({
define: {

View File

@@ -457,7 +457,7 @@ export const ZSurvey = z.object({
segment: ZSegment.nullable(),
singleUse: ZSurveySingleUse.nullable(),
verifyEmail: ZSurveyVerifyEmail.nullable(),
pin: z.string().nullable().optional(),
pin: z.string().nullish(),
resultShareKey: z.string().nullable(),
displayPercentage: z.number().min(1).max(100).nullable(),
languages: z.array(ZSurveyLanguage),
@@ -471,21 +471,26 @@ export const ZSurveyInput = z
.object({
name: z.string(),
type: ZSurveyType.optional(),
createdBy: z.string().cuid().optional(),
createdBy: z.string().cuid().nullish(),
status: ZSurveyStatus.optional(),
displayOption: ZSurveyDisplayOption.optional(),
autoClose: z.number().optional(),
redirectUrl: z.string().url().optional(),
recontactDays: z.number().optional(),
autoClose: z.number().nullish(),
redirectUrl: z.string().url().nullish(),
recontactDays: z.number().nullish(),
welcomeCard: ZSurveyWelcomeCard.optional(),
questions: ZSurveyQuestions.optional(),
thankYouCard: ZSurveyThankYouCard.optional(),
hiddenFields: ZSurveyHiddenFields.optional(),
delay: z.number().optional(),
autoComplete: z.number().optional(),
closeOnDate: z.date().optional(),
surveyClosedMessage: ZSurveyClosedMessage.optional(),
autoComplete: z.number().nullish(),
closeOnDate: z.date().nullish(),
styling: ZSurveyStyling.optional(),
surveyClosedMessage: ZSurveyClosedMessage.nullish(),
singleUse: ZSurveySingleUse.nullish(),
verifyEmail: ZSurveyVerifyEmail.optional(),
pin: z.string().nullish(),
resultShareKey: z.string().nullish(),
displayPercentage: z.number().min(1).max(100).nullish(),
triggers: z.array(z.string()).optional(),
inlineTriggers: ZSurveyInlineTriggers.optional(),
})