Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form Builder - Move backend to HCMS #3645

Open
wants to merge 47 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c08f095
feat: moved createForm, listForms into HCMS
neatbyte-vnobis Oct 27, 2023
02af88f
feat: moved submission methods, revision methods, deleteForm into HCMS
neatbyte-vnobis Nov 1, 2023
be28245
fix: fixed build errors
neatbyte-vnobis Nov 1, 2023
8144935
feat: added locked form model field
neatbyte-vnobis Nov 1, 2023
44f7f10
feat: moved deleteFormRevision into HCMS
neatbyte-vnobis Nov 1, 2023
9eba393
fix: removed unused form builder context methods
neatbyte-vnobis Nov 1, 2023
63714c9
feat: add updateForm, dynamic schema for submissions
neatbyte-vnobis Nov 3, 2023
cb042fb
feat: moved publishRevision, unpublishRevision into HCMS, dynamic sch…
neatbyte-vnobis Nov 3, 2023
9c04f9b
fix: imports/exports, refactor cms storages
neatbyte-vnobis Nov 7, 2023
1d4a590
fix: fix ddb packages types
neatbyte-vnobis Nov 7, 2023
96f0783
fix: fix dependencies
neatbyte-vnobis Nov 7, 2023
59d07f6
fix: fixed api-form-builder tests
neatbyte-vnobis Nov 7, 2023
37603f3
fix: fixed api-audit-logs tests
neatbyte-vnobis Nov 8, 2023
6e6360c
fix: add interface implementation to CmsSubmissionsStorage class
neatbyte-vnobis Nov 8, 2023
eb371aa
feat: moved deleteSubmission and getSubmission into HCMS
neatbyte-vnobis Nov 8, 2023
9b203f2
Merge branch 'next' into neatbyte/form-builder-hcms
neatbyte-vnobis Nov 23, 2023
f8747c1
fix: implemented requested changes
neatbyte-vnobis Nov 23, 2023
dd4e2b2
fix: fixed issue with packages
neatbyte-vnobis Nov 23, 2023
725f673
fix: merged with next, resolved conflicts and type issues
neatbyte-vnobis Nov 27, 2023
600d9a2
Merge branch 'next' into neatbyte/form-builder-hcms
neatbyte-vnobis Nov 28, 2023
989f4e5
fix: fixed issue with settings model validation
neatbyte-vnobis Nov 28, 2023
d1549c9
Merge branch 'next' into neatbyte/form-builder-hcms
neatbyte-vnobis Nov 30, 2023
a987ff7
fix: fix tests
neatbyte-vnobis Nov 30, 2023
bc629bc
fix: revert back cwp-template-aws changes
neatbyte-vnobis Dec 1, 2023
b4de07c
fix: revert back api-headless-cms publishedOn changes
neatbyte-vnobis Dec 6, 2023
0192677
Merge branch 'next' into neatbyte/form-builder-hcms
leopuleo Dec 7, 2023
bd01907
Merge branch 'next' into neatbyte/form-builder-hcms
neatbyte-vnobis Dec 11, 2023
0033d87
fix: use entry publish status
neatbyte-vnobis Dec 11, 2023
f3da9b1
fix: requested changes and add test
neatbyte-vnobis Dec 14, 2023
6c5da6f
fix: remove reCaptcha settings fields from form entry
leopuleo Jan 9, 2024
cca3b82
fix: change Recaptcha error message field type
leopuleo Jan 10, 2024
03ad21f
Merge branch 'next' into neatbyte/form-builder-hcms
leopuleo Jan 24, 2024
2d51809
chore: merge next
leopuleo Jan 24, 2024
5f45544
test: fix ownedBy
leopuleo Jan 24, 2024
ce03eef
Merge branch 'next' into neatbyte/form-builder-hcms
leopuleo Jan 25, 2024
be376e2
chore: merge next
leopuleo Feb 5, 2024
32f071f
chore: update deps
leopuleo Feb 5, 2024
91e745c
fix: re-introduce getPublishedFormRevisionById crud operation
leopuleo Feb 13, 2024
1c24102
fix: re-introduce form parent and revision in form renderer
leopuleo Feb 13, 2024
cd35575
fix: fetch id instead of formId
leopuleo Feb 13, 2024
0064543
fix: remove version from getPublishedFormRevisionById
leopuleo Feb 13, 2024
929b9fe
refactor(api-form-builder): form statistics (#3780)
neatbyte-vnobis Feb 14, 2024
6c92b20
fix: remove ownedBy where param
leopuleo Feb 14, 2024
2ea2052
fix: revisions tests
leopuleo Feb 14, 2024
3c3ef69
Merge branch 'next' into neatbyte/form-builder-hcms
leopuleo Feb 14, 2024
01bccb0
chore: merge next
leopuleo Feb 14, 2024
e5e2160
Merge branch 'next' into neatbyte/form-builder-hcms
leopuleo Feb 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/api/graphql/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ import {
createFileModelModifier
} from "@webiny/api-file-manager";
import { createFileManagerStorageOperations } from "@webiny/api-file-manager-ddb";
import {
neatbyte-vnobis marked this conversation as resolved.
Show resolved Hide resolved
createFormBuilderContext,
createFormBuilderGraphQL
} from "@webiny/api-form-builder/cmsFormBuilderStorage/createFormBuilderContext";
import logsPlugins from "@webiny/handler-logs";
import fileManagerS3 from "@webiny/api-file-manager-s3";
import { createFormBuilder } from "@webiny/api-form-builder";
import { createFormBuilderStorageOperations } from "@webiny/api-form-builder-so-ddb";
import { createHeadlessCmsContext, createHeadlessCmsGraphQL } from "@webiny/api-headless-cms";
import { createStorageOperations as createHeadlessCmsStorageOperations } from "@webiny/api-headless-cms-ddb";
Expand Down Expand Up @@ -88,11 +91,12 @@ export const handler = createHandler({
pageBuilderImportExportPlugins({
storageOperations: createPageBuilderImportExportStorageOperations({ documentClient })
}),
createFormBuilder({
createFormBuilderContext({
storageOperations: createFormBuilderStorageOperations({
documentClient
})
}),
createFormBuilderGraphQL(),
createApwGraphQL(),
createApwPageBuilderContext({
storageOperations: createApwSaStorageOperations({ documentClient })
Expand Down
2 changes: 2 additions & 0 deletions apps/api/pageBuilder/export/combine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"dependencies": {
"@webiny/api-form-builder": "0.0.0",
"@webiny/api-form-builder-so-ddb": "0.0.0",
"@webiny/api-headless-cms": "0.0.0",
"@webiny/api-headless-cms-ddb": "0.0.0",
"@webiny/api-i18n": "0.0.0",
"@webiny/api-i18n-content": "0.0.0",
"@webiny/api-i18n-ddb": "0.0.0",
Expand Down
22 changes: 20 additions & 2 deletions apps/api/pageBuilder/export/combine/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { createHandler } from "@webiny/handler-aws/raw";
import i18nPlugins from "@webiny/api-i18n/graphql";
import i18nDynamoDbStorageOperations from "@webiny/api-i18n-ddb";
import i18nContentPlugins from "@webiny/api-i18n-content/plugins";
import { createFormBuilder } from "@webiny/api-form-builder";
import { CmsParametersPlugin, createHeadlessCmsContext } from "@webiny/api-headless-cms";
import { createStorageOperations as createHeadlessCmsStorageOperations } from "@webiny/api-headless-cms-ddb";
import {
createFormBuilderContext,
createFormBuilderGraphQL
} from "@webiny/api-form-builder/cmsFormBuilderStorage/createFormBuilderContext";
import { createFormBuilderStorageOperations } from "@webiny/api-form-builder-so-ddb";
import {
createPageBuilderGraphQL,
Expand Down Expand Up @@ -40,17 +45,30 @@ export const handler = createHandler({
i18nPlugins(),
i18nDynamoDbStorageOperations(),
i18nContentPlugins(),
new CmsParametersPlugin(async context => {
const locale = context.i18n.getCurrentLocale("content")?.code || "en-US";
return {
type: "manage",
locale
};
}),
createHeadlessCmsContext({
storageOperations: createHeadlessCmsStorageOperations({
documentClient
})
}),
createPageBuilderContext({
storageOperations: createPageBuilderStorageOperations({
documentClient
})
}),
createPageBuilderGraphQL(),
createFormBuilder({
createFormBuilderContext({
neatbyte-vnobis marked this conversation as resolved.
Show resolved Hide resolved
storageOperations: createFormBuilderStorageOperations({
documentClient
})
}),
createFormBuilderGraphQL(),
pageBuilderImportExportPlugins({
storageOperations: createPageBuilderImportExportStorageOperations({ documentClient })
}),
Expand Down
6 changes: 6 additions & 0 deletions apps/api/pageBuilder/export/combine/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"references": [
{ "path": "../../../../../packages/api-form-builder/tsconfig.build.json" },
{ "path": "../../../../../packages/api-form-builder-so-ddb/tsconfig.build.json" },
{ "path": "../../../../../packages/api-headless-cms/tsconfig.build.json" },
{ "path": "../../../../../packages/api-headless-cms-ddb/tsconfig.build.json" },
{ "path": "../../../../../packages/api-i18n/tsconfig.build.json" },
{ "path": "../../../../../packages/api-i18n-content/tsconfig.build.json" },
{ "path": "../../../../../packages/api-i18n-ddb/tsconfig.build.json" },
Expand All @@ -29,6 +31,10 @@
"../../../../../packages/api-form-builder-so-ddb/src/*"
],
"@webiny/api-form-builder-so-ddb": ["../../../../../packages/api-form-builder-so-ddb/src"],
"@webiny/api-headless-cms/*": ["../../../../../packages/api-headless-cms/src/*"],
"@webiny/api-headless-cms": ["../../../../../packages/api-headless-cms/src"],
"@webiny/api-headless-cms-ddb/*": ["../../../../../packages/api-headless-cms-ddb/src/*"],
"@webiny/api-headless-cms-ddb": ["../../../../../packages/api-headless-cms-ddb/src"],
"@webiny/api-i18n/*": ["../../../../../packages/api-i18n/src/*"],
"@webiny/api-i18n": ["../../../../../packages/api-i18n/src"],
"@webiny/api-i18n-content/*": ["../../../../../packages/api-i18n-content/src/*"],
Expand Down
4 changes: 2 additions & 2 deletions apps/api/pageBuilder/export/process/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import i18nPlugins from "@webiny/api-i18n/graphql";
import i18nDynamoDbStorageOperations from "@webiny/api-i18n-ddb";
import i18nContentPlugins from "@webiny/api-i18n-content/plugins";
import { createPageBuilderContext } from "@webiny/api-page-builder/graphql";
import { createFormBuilder } from "@webiny/api-form-builder";
import { createFormBuilderContext } from "@webiny/api-form-builder/cmsFormBuilderStorage/createFormBuilderContext";
import { createFormBuilderStorageOperations } from "@webiny/api-form-builder-so-ddb";
import { createStorageOperations as createPageBuilderStorageOperations } from "@webiny/api-page-builder-so-ddb";
import pageBuilderImportExportPlugins from "@webiny/api-page-builder-import-export/graphql";
Expand Down Expand Up @@ -61,7 +61,7 @@ export const handler = createHandler({
documentClient
})
}),
createFormBuilder({
createFormBuilderContext({
neatbyte-vnobis marked this conversation as resolved.
Show resolved Hide resolved
storageOperations: createFormBuilderStorageOperations({
documentClient
})
Expand Down
2 changes: 2 additions & 0 deletions apps/api/pageBuilder/import/create/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"dependencies": {
"@webiny/api-form-builder": "0.0.0",
"@webiny/api-form-builder-so-ddb": "0.0.0",
"@webiny/api-headless-cms": "0.0.0",
"@webiny/api-headless-cms-ddb": "0.0.0",
"@webiny/api-i18n": "0.0.0",
"@webiny/api-i18n-content": "0.0.0",
"@webiny/api-i18n-ddb": "0.0.0",
Expand Down
22 changes: 20 additions & 2 deletions apps/api/pageBuilder/import/create/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { createHandler } from "@webiny/handler-aws/raw";
import i18nPlugins from "@webiny/api-i18n/graphql";
import i18nDynamoDbStorageOperations from "@webiny/api-i18n-ddb";
import i18nContentPlugins from "@webiny/api-i18n-content/plugins";
import { createFormBuilder } from "@webiny/api-form-builder";
import { CmsParametersPlugin, createHeadlessCmsContext } from "@webiny/api-headless-cms";
import { createStorageOperations as createHeadlessCmsStorageOperations } from "@webiny/api-headless-cms-ddb";
import {
createFormBuilderContext,
createFormBuilderGraphQL
} from "@webiny/api-form-builder/cmsFormBuilderStorage/createFormBuilderContext";
import { createFormBuilderStorageOperations } from "@webiny/api-form-builder-so-ddb";
import {
createPageBuilderGraphQL,
Expand Down Expand Up @@ -38,17 +43,30 @@ export const handler = createHandler({
i18nPlugins(),
i18nDynamoDbStorageOperations(),
i18nContentPlugins(),
new CmsParametersPlugin(async context => {
const locale = context.i18n.getCurrentLocale("content")?.code || "en-US";
return {
type: "manage",
locale
};
}),
createHeadlessCmsContext({
storageOperations: createHeadlessCmsStorageOperations({
documentClient
})
}),
createPageBuilderContext({
storageOperations: createPageBuilderStorageOperations({
documentClient
})
}),
createPageBuilderGraphQL(),
createFormBuilder({
createFormBuilderContext({
leopuleo marked this conversation as resolved.
Show resolved Hide resolved
storageOperations: createFormBuilderStorageOperations({
documentClient
})
}),
createFormBuilderGraphQL(),
pageBuilderImportExportPlugins({
storageOperations: createPageBuilderImportExportStorageOperations({ documentClient })
}),
Expand Down
6 changes: 6 additions & 0 deletions apps/api/pageBuilder/import/create/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"references": [
{ "path": "../../../../../packages/api-form-builder/tsconfig.build.json" },
{ "path": "../../../../../packages/api-form-builder-so-ddb/tsconfig.build.json" },
{ "path": "../../../../../packages/api-headless-cms/tsconfig.build.json" },
{ "path": "../../../../../packages/api-headless-cms-ddb/tsconfig.build.json" },
{ "path": "../../../../../packages/api-i18n/tsconfig.build.json" },
{ "path": "../../../../../packages/api-i18n-content/tsconfig.build.json" },
{ "path": "../../../../../packages/api-i18n-ddb/tsconfig.build.json" },
Expand All @@ -29,6 +31,10 @@
"../../../../../packages/api-form-builder-so-ddb/src/*"
],
"@webiny/api-form-builder-so-ddb": ["../../../../../packages/api-form-builder-so-ddb/src"],
"@webiny/api-headless-cms/*": ["../../../../../packages/api-headless-cms/src/*"],
"@webiny/api-headless-cms": ["../../../../../packages/api-headless-cms/src"],
"@webiny/api-headless-cms-ddb/*": ["../../../../../packages/api-headless-cms-ddb/src/*"],
"@webiny/api-headless-cms-ddb": ["../../../../../packages/api-headless-cms-ddb/src"],
"@webiny/api-i18n/*": ["../../../../../packages/api-i18n/src/*"],
"@webiny/api-i18n": ["../../../../../packages/api-i18n/src"],
"@webiny/api-i18n-content/*": ["../../../../../packages/api-i18n-content/src/*"],
Expand Down
4 changes: 2 additions & 2 deletions apps/api/pageBuilder/import/process/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createHandler } from "@webiny/handler-aws/raw";
import i18nPlugins from "@webiny/api-i18n/graphql";
import i18nDynamoDbStorageOperations from "@webiny/api-i18n-ddb";
import i18nContentPlugins from "@webiny/api-i18n-content/plugins";
import { createFormBuilder } from "@webiny/api-form-builder";
import { createFormBuilderContext } from "@webiny/api-form-builder/cmsFormBuilderStorage/createFormBuilderContext";
import { createFormBuilderStorageOperations } from "@webiny/api-form-builder-so-ddb";
import { createPageBuilderContext } from "@webiny/api-page-builder/graphql";
import { createStorageOperations as createPageBuilderStorageOperations } from "@webiny/api-page-builder-so-ddb";
Expand Down Expand Up @@ -64,7 +64,7 @@ export const handler = createHandler({
documentClient
})
}),
createFormBuilder({
createFormBuilderContext({
neatbyte-vnobis marked this conversation as resolved.
Show resolved Hide resolved
storageOperations: createFormBuilderStorageOperations({
documentClient
})
Expand Down
4 changes: 2 additions & 2 deletions packages/api-audit-logs/__tests__/helpers/handlerCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { AuditLogsContext } from "~/types";
import { createAco } from "@webiny/api-aco";
import { createAuditLogs } from "~/index";
import { createContextPlugin } from "@webiny/handler";
import { createFormBuilder } from "@webiny/api-form-builder";
import { createFormBuilderContext } from "@webiny/api-form-builder/cmsFormBuilderStorage/createFormBuilderContext";
import { FormBuilderStorageOperations } from "@webiny/api-form-builder/types";
import { FileManagerStorageOperations } from "@webiny/api-file-manager/types";
import { PageBuilderStorageOperations } from "@webiny/api-page-builder/types";
Expand Down Expand Up @@ -143,7 +143,7 @@ export const createHandlerCore = (params?: CreateHandlerCoreParams) => {
createFileManagerContext({
storageOperations: fileManagerStorage.storageOperations
}),
createFormBuilder({
createFormBuilderContext({
storageOperations: formBuilderStorage.storageOperations
}),
createHeadlessCmsGraphQL(),
Expand Down
16 changes: 2 additions & 14 deletions packages/api-form-builder-so-ddb-es/src/index.ts
neatbyte-vnobis marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,7 @@ export const createFormBuilderStorageOperations: FormBuilderStorageOperationsFac
table,
entity: entities.settings
}),
...createFormStorageOperations({
elasticsearch,
table,
entity: entities.form,
esEntity: entities.esForm,
plugins
}),
...createSubmissionStorageOperations({
elasticsearch,
table,
entity: entities.submission,
esEntity: entities.esSubmission,
plugins
})
forms: createFormStorageOperations(),
submissions: createSubmissionStorageOperations()
};
};
Loading
Loading