@fernir2/saas-kit 0.0.203 → 0.0.204
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/flint/index.d.ts +0 -1
- package/flint/index.js +0 -1
- package/generated/crud-handler-map.js +1 -1
- package/package.json +15 -10
- package/packages/base-repo/app-constants/aliases.js +1 -1
- package/packages/base-repo/app-constants/app-packages-names.d.ts +5 -0
- package/packages/base-repo/app-constants/app-packages-names.js +2 -2
- package/packages/base-repo/app-constants/command-names.d.ts +3 -0
- package/packages/base-repo/app-constants/command-names.js +2 -2
- package/packages/base-repo/app-constants/project-paths.d.ts +1 -1
- package/packages/base-repo/app-constants/project-paths.js +3 -2
- package/packages/base-repo/app-constants/system-constants.d.ts +2 -0
- package/packages/base-repo/app-constants/system-constants.js +2 -2
- package/packages/base-repo/constants/extensions.d.ts +2 -1
- package/packages/base-repo/constants/extensions.js +2 -2
- package/packages/base-repo/constants/http-methods.d.ts +3 -0
- package/packages/base-repo/constants/http-methods.js +1 -1
- package/packages/base-repo/constants/playwright.d.ts +7 -0
- package/packages/base-repo/constants/playwright.js +4 -0
- package/packages/base-repo/constants/string-duplication-constants.d.ts +3 -3
- package/packages/base-repo/constants/string-duplication-constants.js +1 -1
- package/packages/base-repo/constants/tools-constants.d.ts +22 -1
- package/packages/base-repo/constants/tools-constants.js +2 -2
- package/packages/base-repo/constants.d.ts +1 -1
- package/packages/base-repo/constants.js +2 -2
- package/packages/base-repo/tools/git/pre-commit-script.js +5 -5
- package/packages/cluster/contants/cluster-constants.d.ts +0 -1
- package/packages/cluster/contants/cluster-constants.js +1 -1
- package/packages/cluster/gitlab-runner.js +2 -2
- package/packages/cluster/networking.js +2 -2
- package/packages/cluster/postgres.js +3 -2
- package/packages/cluster/registry.js +2 -2
- package/packages/fd-toolbox/api/api-client.js +1 -1
- package/packages/fd-toolbox/api/api-path-names.js +2 -1
- package/packages/fd-toolbox/api/api-paths.js +2 -1
- package/packages/fd-toolbox/api/base-api.js +3 -2
- package/packages/fd-toolbox/api/cache-headers.js +1 -1
- package/packages/fd-toolbox/api/hooks/use-api.js +2 -2
- package/packages/fd-toolbox/auth/login-states.js +1 -1
- package/packages/fd-toolbox/auth/permissions/permission-notifiers.js +1 -1
- package/packages/fd-toolbox/auth/session-storage.js +1 -1
- package/packages/fd-toolbox/auth/tokens.js +1 -1
- package/packages/fd-toolbox/base-resource/base-resource.js +1 -1
- package/packages/fd-toolbox/base-resource/optional-user-id-base-resource.js +1 -1
- package/packages/fd-toolbox/base-resource/props/user-id-base-props-resource-props.js +2 -1
- package/packages/fd-toolbox/base-resource/props/with-optional-user-id-props.js +2 -1
- package/packages/fd-toolbox/base-resource/user-id-base-resource.js +1 -1
- package/packages/fd-toolbox/cache/cache.js +1 -1
- package/packages/fd-toolbox/collections/arrays.d.ts +1 -0
- package/packages/fd-toolbox/collections/arrays.js +2 -2
- package/packages/fd-toolbox/collections/enums.js +1 -1
- package/packages/fd-toolbox/constants/constants.d.ts +1 -0
- package/packages/fd-toolbox/constants/constants.js +2 -2
- package/packages/fd-toolbox/constants/element-suffixes.js +3 -1
- package/packages/fd-toolbox/constants/elements.js +3 -1
- package/packages/fd-toolbox/constants/environment-constants.d.ts +2 -1
- package/packages/fd-toolbox/constants/environment-constants.js +4 -1
- package/packages/fd-toolbox/constants/fd-resource-ids.js +2 -1
- package/packages/fd-toolbox/constants/file-constants.js +3 -1
- package/packages/fd-toolbox/constants/file-loader-data-types.js +1 -1
- package/packages/fd-toolbox/constants/header-names.d.ts +0 -1
- package/packages/fd-toolbox/constants/header-names.js +1 -1
- package/packages/fd-toolbox/constants/html-element-attributes.d.ts +1 -1
- package/packages/fd-toolbox/constants/html-element-attributes.js +3 -1
- package/packages/fd-toolbox/constants/keyboard-keys.js +3 -1
- package/packages/fd-toolbox/constants/odata-helper-constants.js +1 -1
- package/packages/fd-toolbox/constants/resource-folders.js +3 -1
- package/packages/fd-toolbox/constants/resource-id-constants.d.ts +1 -0
- package/packages/fd-toolbox/constants/resource-id-constants.js +1 -1
- package/packages/fd-toolbox/dates/date-formats.js +1 -1
- package/packages/fd-toolbox/dates/date-time.js +8 -8
- package/packages/fd-toolbox/enums/enums.js +1 -1
- package/packages/fd-toolbox/errors/error-handler.js +1 -1
- package/packages/fd-toolbox/errors/errors.js +1 -1
- package/packages/fd-toolbox/errors/problem-details.js +1 -1
- package/packages/fd-toolbox/functions/condition-check-functions.js +1 -1
- package/packages/fd-toolbox/functions/value-checking-functions.js +1 -1
- package/packages/fd-toolbox/hooks/use-async-effect.js +1 -1
- package/packages/fd-toolbox/hooks/use-element-id.js +1 -1
- package/packages/fd-toolbox/hooks/use-empty-ref.js +1 -1
- package/packages/fd-toolbox/hooks/use-enter-key.js +1 -1
- package/packages/fd-toolbox/hooks/use-is-client.js +1 -1
- package/packages/fd-toolbox/hooks/use-is-mobile.js +1 -1
- package/packages/fd-toolbox/hooks/use-keyboard-navigation.js +1 -1
- package/packages/fd-toolbox/hooks/use-media-query.js +1 -1
- package/packages/fd-toolbox/hooks/use-optional-promise.js +1 -1
- package/packages/fd-toolbox/html/element-ids.js +1 -1
- package/packages/fd-toolbox/html/extract-emails-from-html.js +1 -1
- package/packages/fd-toolbox/html/markdown-renderer.js +1 -1
- package/packages/fd-toolbox/http/http.js +1 -1
- package/packages/fd-toolbox/http/url/url-builder.js +1 -1
- package/packages/fd-toolbox/http/url/urls.js +1 -1
- package/packages/fd-toolbox/infra/env-config.js +2 -2
- package/packages/fd-toolbox/infra/env-functions.js +2 -2
- package/packages/fd-toolbox/infra/env-schema.d.ts +6 -6
- package/packages/fd-toolbox/infra/env-schema.js +6 -3
- package/packages/fd-toolbox/infra/env-store.js +1 -1
- package/packages/fd-toolbox/infra/toolbox-env-setting-keys.d.ts +3 -0
- package/packages/fd-toolbox/infra/toolbox-env-setting-keys.js +1 -1
- package/packages/fd-toolbox/io/io.js +1 -1
- package/packages/fd-toolbox/lib/environments.d.ts +1 -1
- package/packages/fd-toolbox/lib/environments.js +1 -1
- package/packages/fd-toolbox/lib/utils.js +2 -1
- package/packages/fd-toolbox/local-storage/local-storage.js +1 -1
- package/packages/fd-toolbox/logging/cli-logger.js +3 -1
- package/packages/fd-toolbox/logging/loggers.d.ts +1 -1
- package/packages/fd-toolbox/logging/loggers.js +1 -1
- package/packages/fd-toolbox/notifications.js +2 -2
- package/packages/fd-toolbox/numbers/numbers.js +1 -1
- package/packages/fd-toolbox/objects/property-value.js +1 -1
- package/packages/fd-toolbox/odata/odata-builder-funcs.js +1 -1
- package/packages/fd-toolbox/odata/odata-builders.js +1 -1
- package/packages/fd-toolbox/odata/odata-constants.js +1 -1
- package/packages/fd-toolbox/odata/odata.js +4 -1
- package/packages/fd-toolbox/odata/odataconfig.js +1 -1
- package/packages/fd-toolbox/odata/services/odata-filters.js +1 -1
- package/packages/fd-toolbox/odata/services/odata-parsers.js +1 -1
- package/packages/fd-toolbox/path.js +1 -1
- package/packages/fd-toolbox/paths/ensure.js +1 -1
- package/packages/fd-toolbox/paths/paths-names.js +1 -1
- package/packages/fd-toolbox/permissions/constants/crud-action-to-permission-prefix.js +2 -1
- package/packages/fd-toolbox/property/calculate-total-property-value.js +1 -1
- package/packages/fd-toolbox/redirect/redirect-functions.js +1 -1
- package/packages/fd-toolbox/routing/login-routers.js +1 -1
- package/packages/fd-toolbox/routing/paths.js +1 -1
- package/packages/fd-toolbox/routing/public-routes.js +1 -1
- package/packages/fd-toolbox/routing/routers.js +2 -1
- package/packages/fd-toolbox/routing/routes.js +1 -1
- package/packages/fd-toolbox/server/api/query-params.js +3 -1
- package/packages/fd-toolbox/server/auth/cookies.js +1 -1
- package/packages/fd-toolbox/server/cachings/core-cache.js +1 -1
- package/packages/fd-toolbox/server/cachings/fd-memory-cache.js +1 -1
- package/packages/fd-toolbox/server/cachings/fd-remote-cache.js +2 -2
- package/packages/fd-toolbox/server/collections/single-funcs.js +1 -1
- package/packages/fd-toolbox/server/configs/configs.js +2 -1
- package/packages/fd-toolbox/server/constants/crud-actions-constants.js +3 -1
- package/packages/fd-toolbox/server/constants/fd-server-cache-keys.js +3 -1
- package/packages/fd-toolbox/server/entities/base-objects.js +1 -1
- package/packages/fd-toolbox/server/errors/error-dtos.js +1 -1
- package/packages/fd-toolbox/server/framework/index.js +1 -1
- package/packages/fd-toolbox/server/logging/latest-logs-store.js +1 -1
- package/packages/fd-toolbox/server/logging/log-dtos.js +1 -1
- package/packages/fd-toolbox/server/logging/logger.js +1 -1
- package/packages/fd-toolbox/server/objects/keys-case-converters.js +1 -1
- package/packages/fd-toolbox/server/random.js +1 -1
- package/packages/fd-toolbox/server/services/dictionaries.js +1 -1
- package/packages/fd-toolbox/server/strings/casing.js +1 -1
- package/packages/fd-toolbox/server/strings/strings.js +3 -1
- package/packages/fd-toolbox/server/time/duration-service.js +1 -1
- package/packages/fd-toolbox/server/web/errors.js +1 -1
- package/packages/fd-toolbox/state/component-states.js +1 -1
- package/packages/fd-toolbox/strings/case-converters.js +1 -1
- package/packages/fd-toolbox/strings/casing-converter.js +1 -1
- package/packages/fd-toolbox/strings/plural-converters.js +3 -1
- package/packages/fd-toolbox/strings/strings-constants.d.ts +6 -1
- package/packages/fd-toolbox/strings/strings-constants.js +2 -2
- package/packages/fd-toolbox/strings/strings.js +2 -2
- package/packages/fd-toolbox/time/date-time.js +1 -1
- package/packages/fd-toolbox/types/crud/crud-results.js +1 -1
- package/packages/fd-toolbox/types/ensure-type.js +3 -1
- package/packages/fd-toolbox/types/react-types.d.ts +1 -2
- package/packages/fd-toolbox/types/with-user-id.js +2 -1
- package/packages/fd-toolbox/url/urls.js +1 -1
- package/packages/fd-toolbox/uuids.d.ts +0 -1
- package/packages/fd-toolbox/uuids.js +3 -2
- package/packages/fd-toolbox/value-checkers.js +1 -1
- package/packages/fd-toolbox-core/constants/base-dev-url.js +1 -1
- package/packages/fd-toolbox-core/core/name-of.js +1 -1
- package/packages/fd-toolbox-core/types/resource-with-id.js +1 -1
- package/packages/flint/dist/rules/index.d.ts +9 -1
- package/packages/flint/dist/rules/index.js +10 -9
- package/packages/flint/eslint-base.config.js +13 -13
- package/packages/flint/eslint-next-web-vitals-temp.config.js +2 -2
- package/packages/flint/infra/analysis/array-analysis.js +8 -0
- package/packages/flint/infra/analysis/casing-analysis.js +4 -0
- package/packages/flint/infra/analysis/enum-analysis.js +12 -0
- package/packages/flint/infra/analysis/eslint-analysis.js +6 -0
- package/packages/flint/infra/analysis/expression-analysis.js +7 -0
- package/packages/flint/infra/analysis/formatting-analysis.js +6 -0
- package/packages/flint/infra/{ast-helpers → analysis}/function-analysis.d.ts +1 -0
- package/packages/flint/infra/analysis/function-analysis.js +8 -0
- package/packages/flint/infra/analysis/jsx-analysis.js +8 -0
- package/packages/flint/infra/analysis/module-analysis.js +11 -0
- package/packages/flint/infra/{ast-helpers → analysis}/name-analysis.d.ts +1 -1
- package/packages/flint/infra/analysis/name-analysis.js +10 -0
- package/packages/flint/infra/analysis/nullish-analysis.js +7 -0
- package/packages/flint/infra/analysis/number-analysis.js +8 -0
- package/packages/flint/infra/{ast-helpers → analysis}/object-analysis.d.ts +1 -1
- package/packages/flint/infra/analysis/object-analysis.js +6 -0
- package/packages/flint/infra/analysis/return-analysis.d.ts +6 -0
- package/packages/flint/infra/analysis/return-analysis.js +7 -0
- package/packages/flint/infra/analysis/scope-analysis.js +11 -0
- package/packages/flint/infra/analysis/string-analysis.js +10 -0
- package/packages/flint/infra/analysis/tree-analysis.js +6 -0
- package/packages/flint/infra/{ast-helpers → analysis}/type-analysis.d.ts +17 -1
- package/packages/flint/infra/analysis/type-analysis.js +9 -0
- package/packages/flint/infra/{ast-helpers → analysis}/type-guards.d.ts +10 -4
- package/packages/flint/infra/analysis/type-guards.js +12 -0
- package/packages/flint/infra/analysis/variable-analysis.d.ts +4 -0
- package/packages/flint/infra/analysis/variable-analysis.js +8 -0
- package/packages/flint/infra/{ast-helpers → analysis}/visitors.d.ts +2 -1
- package/packages/flint/infra/analysis/visitors.js +6 -0
- package/packages/flint/infra/config-edited-checker.d.ts +2 -0
- package/packages/flint/infra/config-edited-checker.js +7 -0
- package/packages/flint/infra/constants/rules-meta.d.ts +6 -0
- package/packages/flint/infra/constants/rules-meta.js +2 -2
- package/packages/flint/infra/create-eslint-rule.js +7 -0
- package/packages/flint/infra/git-readers.d.ts +1 -0
- package/packages/flint/infra/git-readers.js +10 -0
- package/packages/flint/non-level-two-eslint-config.js +1 -1
- package/packages/flint/project-specific-eslint-configs.js +7 -7
- package/packages/flint/rules/code-duplication/must-avoid-code-duplication-in-functions.d.ts +1 -0
- package/packages/flint/rules/code-duplication/must-avoid-code-duplication-in-functions.js +4 -3
- package/packages/flint/rules/code-duplication/no-duplicate-imports.d.ts +1 -0
- package/packages/flint/rules/code-duplication/no-duplicate-imports.js +4 -3
- package/packages/flint/rules/code-duplication/no-literal-duplication.js +3 -3
- package/packages/flint/rules/consistency/enum-type-immediate-definition.js +3 -3
- package/packages/flint/rules/consistency/must-not-needlessly-copy-arrays.js +3 -3
- package/packages/flint/rules/consistency/must-not-use-anonymous-objects-only-with-explicit-typization.js +3 -3
- package/packages/flint/rules/consistency/must-not-use-process-env.js +3 -3
- package/packages/flint/rules/consistency/must-use-nameof-for-props.d.ts +1 -0
- package/packages/flint/rules/consistency/must-use-nameof-for-props.js +4 -3
- package/packages/flint/rules/consistency/must-use-typed-resources-for-crud-update.d.ts +3 -0
- package/packages/flint/rules/consistency/must-use-typed-resources-for-crud-update.js +9 -0
- package/packages/flint/rules/consistency/must-use-typescript.js +3 -3
- package/packages/flint/rules/consistency/no-index-import-in-ast-helpers.d.ts +3 -0
- package/packages/flint/rules/consistency/no-index-import-in-ast-helpers.js +6 -0
- package/packages/flint/rules/consistency/no-new-date.d.ts +1 -0
- package/packages/flint/rules/consistency/no-new-date.js +4 -3
- package/packages/flint/rules/consistency/no-redundant-type-alias.d.ts +1 -0
- package/packages/flint/rules/consistency/no-redundant-type-alias.js +4 -3
- package/packages/flint/rules/consistency/no-use-type-undefined-for-optional.d.ts +1 -0
- package/packages/flint/rules/consistency/no-use-type-undefined-for-optional.js +4 -3
- package/packages/flint/rules/css/must-not-use-important.js +2 -2
- package/packages/flint/rules/css/no-array-destructuring-from-function-calls.d.ts +1 -0
- package/packages/flint/rules/css/no-array-destructuring-from-function-calls.js +4 -3
- package/packages/flint/rules/css/no-px-in-tailwind.js +2 -2
- package/packages/flint/rules/css/no-tailwind-colors.d.ts +1 -0
- package/packages/flint/rules/css/no-tailwind-colors.js +4 -3
- package/packages/flint/rules/flint/must-add-custom-rule-in-config.d.ts +1 -0
- package/packages/flint/rules/flint/must-add-custom-rule-in-config.js +8 -5
- package/packages/flint/rules/flint/must-have-both-rule-and-tests.d.ts +1 -0
- package/packages/flint/rules/flint/must-have-both-rule-and-tests.js +5 -4
- package/packages/flint/rules/flint/must-match-rule-name-with-file-name.js +4 -4
- package/packages/flint/rules/flint/must-not-declare-fixer-without-calling-it.js +2 -2
- package/packages/flint/rules/flint/must-not-import-ast-node-types.js +3 -3
- package/packages/flint/rules/flint/must-not-use-eslint-deprecated-methods.js +2 -2
- package/packages/flint/rules/flint/must-use-better-error-message-for-custom-rules.d.ts +14 -0
- package/packages/flint/rules/flint/must-use-better-error-message-for-custom-rules.js +4 -4
- package/packages/flint/rules/flint/must-use-constants-for-message-ids.js +3 -4
- package/packages/flint/rules/flint/must-use-create-eslint-rule.js +3 -3
- package/packages/flint/rules/flint/must-use-link-for-camel-or-pascal-case-names.d.ts +1 -0
- package/packages/flint/rules/flint/must-use-link-for-camel-or-pascal-case-names.js +6 -5
- package/packages/flint/rules/flint/must-use-nodetypes-structure-instead-of-string-node-type.d.ts +4 -0
- package/packages/flint/rules/flint/must-use-nodetypes-structure-instead-of-string-node-type.js +8 -0
- package/packages/flint/rules/flint/must-use-unique-filenames-with-comment-in-tests.js +2 -2
- package/packages/flint/rules/general/group-consts-as-const.js +3 -3
- package/packages/flint/rules/general/must-add-space-for-comments.d.ts +1 -0
- package/packages/flint/rules/general/must-add-space-for-comments.js +3 -2
- package/packages/flint/rules/general/must-create-resources-in-src-dir.d.ts +1 -0
- package/packages/flint/rules/general/must-create-resources-in-src-dir.js +3 -2
- package/packages/flint/rules/general/must-not-define-functions-in-constants-files.js +3 -3
- package/packages/flint/rules/general/must-not-pass-full-objects-into-functions-needlessly.d.ts +1 -0
- package/packages/flint/rules/general/must-not-pass-full-objects-into-functions-needlessly.js +5 -4
- package/packages/flint/rules/general/must-start-comments-with-uppercase.d.ts +1 -0
- package/packages/flint/rules/general/must-start-comments-with-uppercase.js +3 -2
- package/packages/flint/rules/general/must-use-native-private.d.ts +1 -0
- package/packages/flint/rules/general/must-use-native-private.js +4 -3
- package/packages/flint/rules/general/must-use-strict-dependency-version.d.ts +1 -0
- package/packages/flint/rules/general/must-use-strict-dependency-version.js +3 -2
- package/packages/flint/rules/general/no-empty-files.d.ts +1 -0
- package/packages/flint/rules/general/no-empty-files.js +4 -3
- package/packages/flint/rules/general/no-eslint-disable-without-approved.d.ts +1 -0
- package/packages/flint/rules/general/no-eslint-disable-without-approved.js +4 -4
- package/packages/flint/rules/general/no-import-from-temp-dev.d.ts +1 -0
- package/packages/flint/rules/general/no-import-from-temp-dev.js +4 -3
- package/packages/flint/rules/general/no-specify-return-type.d.ts +1 -0
- package/packages/flint/rules/general/no-specify-return-type.js +4 -3
- package/packages/flint/rules/general/no-todo.d.ts +1 -0
- package/packages/flint/rules/general/no-todo.js +3 -2
- package/packages/flint/rules/general/use-of-only-english-in-repository.d.ts +1 -0
- package/packages/flint/rules/general/use-of-only-english-in-repository.js +4 -3
- package/packages/flint/rules/index.js +138 -130
- package/packages/flint/rules/must-always-specify-types-for-api-responses.d.ts +3 -0
- package/packages/flint/rules/must-always-specify-types-for-api-responses.js +7 -0
- package/packages/flint/rules/must-declare-module-members-in-consistent-order.js +3 -3
- package/packages/flint/rules/must-not-modify-data-or-workspace-in-readonly-tests.js +3 -3
- package/packages/flint/rules/must-not-return-empty-strings.js +3 -3
- package/packages/flint/rules/must-not-use-all-caps-constants.js +3 -3
- package/packages/flint/rules/must-not-use-fetch.js +3 -3
- package/packages/flint/rules/must-not-use-inline-object-type-parameters.js +2 -2
- package/packages/flint/rules/must-not-use-placeholders-in-eslint-rule-titles.js +3 -3
- package/packages/flint/rules/must-not-use-see-link-in-docs-if-type-available.js +3 -4
- package/packages/flint/rules/must-separate-unrelated-tests-into-different-files.js +3 -3
- package/packages/flint/rules/must-specify-second-generic-parameter-in-apipost-and-apiput.d.ts +4 -0
- package/packages/flint/rules/must-specify-second-generic-parameter-in-apipost-and-apiput.js +7 -0
- package/packages/flint/rules/must-use-color-variables-instead-of-hardcoded-values.js +3 -3
- package/packages/flint/rules/must-use-functions-for-component-ids.js +3 -3
- package/packages/flint/rules/must-use-odata-builder.d.ts +3 -0
- package/packages/flint/rules/must-use-odata-builder.js +7 -0
- package/packages/flint/rules/must-use-only-crud-operations.js +3 -3
- package/packages/flint/rules/naming/filename-kebab-case.d.ts +1 -0
- package/packages/flint/rules/naming/filename-kebab-case.js +4 -3
- package/packages/flint/rules/naming/must-add-empty-line-before-assert-act-arrange.js +1 -1
- package/packages/flint/rules/naming/must-add-prefix-to-po-functions.d.ts +1 -0
- package/packages/flint/rules/naming/must-add-prefix-to-po-functions.js +4 -3
- package/packages/flint/rules/naming/must-avoid-non-null-assertions.js +2 -2
- package/packages/flint/rules/naming/must-create-assert-functions-in-asserts-files.d.ts +1 -0
- package/packages/flint/rules/naming/must-create-assert-functions-in-asserts-files.js +4 -3
- package/packages/flint/rules/naming/must-get-elements-in-tests-only-by-id.d.ts +1 -0
- package/packages/flint/rules/naming/must-get-elements-in-tests-only-by-id.js +4 -3
- package/packages/flint/rules/naming/must-name-ui-tests-component-condition-expected-result.d.ts +1 -0
- package/packages/flint/rules/naming/must-name-ui-tests-component-condition-expected-result.js +4 -3
- package/packages/flint/rules/naming/must-not-add-files-and-code-in-lib-folder.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-add-files-and-code-in-lib-folder.js +4 -3
- package/packages/flint/rules/naming/must-not-create-funcs-files-for-non-components.js +3 -3
- package/packages/flint/rules/naming/must-not-declare-func-inside-another-func.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-declare-func-inside-another-func.js +4 -3
- package/packages/flint/rules/naming/must-not-import-react.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-import-react.js +5 -4
- package/packages/flint/rules/naming/must-not-use-emojis.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-use-emojis.js +4 -3
- package/packages/flint/rules/naming/must-not-use-indexed-access-type-in-function-params.js +3 -3
- package/packages/flint/rules/naming/must-not-use-location-href.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-use-location-href.js +4 -3
- package/packages/flint/rules/naming/must-not-use-negation-with-enums.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-use-negation-with-enums.js +4 -3
- package/packages/flint/rules/naming/must-not-use-null.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-use-null.js +4 -3
- package/packages/flint/rules/naming/must-not-use-po-in-assert-functions.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-use-po-in-assert-functions.js +4 -3
- package/packages/flint/rules/naming/must-not-use-redundant-string.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-use-redundant-string.js +4 -3
- package/packages/flint/rules/naming/must-not-use-ternary-operator-for-complicated-conditions.d.ts +1 -0
- package/packages/flint/rules/naming/must-not-use-ternary-operator-for-complicated-conditions.js +4 -3
- package/packages/flint/rules/naming/must-put-empty-line.d.ts +1 -0
- package/packages/flint/rules/naming/must-put-empty-line.js +4 -3
- package/packages/flint/rules/naming/must-throw-full-error-objects.js +2 -2
- package/packages/flint/rules/naming/must-use-camelcase-for-html-items-id-attribute.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-camelcase-for-html-items-id-attribute.js +4 -4
- package/packages/flint/rules/naming/must-use-descriptive-names-for-functions-and-parameters.js +3 -3
- package/packages/flint/rules/naming/must-use-env-keys-from-constant.js +3 -3
- package/packages/flint/rules/naming/must-use-example-domain.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-example-domain.js +4 -3
- package/packages/flint/rules/naming/must-use-filename-in-assert-functions.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-filename-in-assert-functions.js +4 -3
- package/packages/flint/rules/naming/must-use-func-declaration-for-named-func.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-func-declaration-for-named-func.js +4 -3
- package/packages/flint/rules/naming/must-use-function-for-component.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-function-for-component.js +4 -3
- package/packages/flint/rules/naming/must-use-interface-for-props.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-interface-for-props.js +4 -3
- package/packages/flint/rules/naming/must-use-new-url-constructor.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-new-url-constructor.js +5 -3
- package/packages/flint/rules/naming/must-use-pascal-case-for-types-and-interfaces.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-pascal-case-for-types-and-interfaces.js +4 -3
- package/packages/flint/rules/naming/must-use-plural-enum-const-and-singular-type.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-plural-enum-const-and-singular-type.js +5 -4
- package/packages/flint/rules/naming/must-use-plural-in-function-names-if-returns-array.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-plural-in-function-names-if-returns-array.js +6 -5
- package/packages/flint/rules/naming/must-use-plural-names-of-files-for-arrays.js +5 -5
- package/packages/flint/rules/naming/must-use-resource-name-instead-of-resource.d.ts +3 -0
- package/packages/flint/rules/naming/must-use-resource-name-instead-of-resource.js +7 -0
- package/packages/flint/rules/naming/must-use-s-ending-for-natural-plurals.d.ts +1 -0
- package/packages/flint/rules/naming/must-use-s-ending-for-natural-plurals.js +5 -4
- package/packages/flint/rules/naming/must-use-the-fd-prefix-for-env-variables.js +2 -2
- package/packages/flint/rules/naming/must-use-wrappers-to-access-first-element.d.ts +3 -0
- package/packages/flint/rules/naming/must-use-wrappers-to-access-first-element.js +7 -0
- package/packages/flint/rules/naming/no-conflicting-props.d.ts +1 -0
- package/packages/flint/rules/naming/no-conflicting-props.js +4 -3
- package/packages/flint/rules/naming/no-default-props.d.ts +1 -0
- package/packages/flint/rules/naming/no-default-props.js +4 -3
- package/packages/flint/rules/naming/no-delays-in-ui-tests.d.ts +1 -0
- package/packages/flint/rules/naming/no-delays-in-ui-tests.js +4 -3
- package/packages/flint/rules/naming/no-fd-prefix-in-folders.d.ts +1 -0
- package/packages/flint/rules/naming/no-fd-prefix-in-folders.js +4 -3
- package/packages/flint/rules/naming/no-get-in-function-names-without-return.d.ts +6 -0
- package/packages/flint/rules/naming/no-get-in-function-names-without-return.js +4 -3
- package/packages/flint/rules/naming/no-integers-instead-of-enums.d.ts +1 -0
- package/packages/flint/rules/naming/no-integers-instead-of-enums.js +5 -4
- package/packages/flint/rules/naming/no-nullable-check.d.ts +1 -0
- package/packages/flint/rules/naming/no-nullable-check.js +4 -3
- package/packages/flint/rules/naming/no-untyped-objects-between-components.d.ts +1 -0
- package/packages/flint/rules/naming/no-untyped-objects-between-components.js +5 -4
- package/packages/flint/rules/naming/no-use-conditional-logic-in-test-assertions.d.ts +1 -0
- package/packages/flint/rules/naming/no-use-conditional-logic-in-test-assertions.js +4 -3
- package/packages/flint/rules/naming/no-use-enum.d.ts +1 -0
- package/packages/flint/rules/naming/no-use-enum.js +3 -2
- package/packages/flint/rules/naming/no-use-id.d.ts +1 -0
- package/packages/flint/rules/naming/no-use-id.js +4 -3
- package/packages/flint/rules/naming/no-utils-helpers-naming.d.ts +3 -0
- package/packages/flint/rules/naming/no-utils-helpers-naming.js +7 -0
- package/packages/flint/rules/naming/use-on-prefix.d.ts +1 -0
- package/packages/flint/rules/naming/use-on-prefix.js +4 -3
- package/packages/flint/rules/performance/must-clean-up-event-listeners.d.ts +1 -0
- package/packages/flint/rules/performance/must-clean-up-event-listeners.js +4 -3
- package/packages/flint/rules/readability/component-function-max-lines.js +3 -3
- package/packages/flint/rules/readability/exported-func-above-regular.js +3 -3
- package/packages/flint/rules/readability/for-each-max-lines.d.ts +1 -0
- package/packages/flint/rules/readability/for-each-max-lines.js +4 -3
- package/packages/flint/rules/readability/max-lines-per-function.d.ts +1 -0
- package/packages/flint/rules/readability/max-lines-per-function.js +4 -3
- package/packages/flint/rules/readability/must-consolidate-conditional-expressions.d.ts +1 -0
- package/packages/flint/rules/readability/must-consolidate-conditional-expressions.js +4 -3
- package/packages/flint/rules/readability/must-do-await-data-in-one-line.js +2 -2
- package/packages/flint/rules/readability/must-limit-lines-without-comments.d.ts +1 -0
- package/packages/flint/rules/readability/must-limit-lines-without-comments.js +3 -2
- package/packages/flint/rules/readability/must-not-destructure-function-parameters.js +3 -3
- package/packages/flint/rules/readability/must-not-use-empty-lines-in-html.js +3 -3
- package/packages/flint/rules/readability/must-not-use-inline-await.js +3 -3
- package/packages/flint/rules/readability/must-return-empty-array.d.ts +3 -0
- package/packages/flint/rules/readability/must-return-empty-array.js +7 -0
- package/packages/flint/rules/readability/must-use-alt-to-describe-images.d.ts +1 -0
- package/packages/flint/rules/readability/must-use-alt-to-describe-images.js +4 -4
- package/packages/flint/rules/readability/must-use-create-error.d.ts +1 -0
- package/packages/flint/rules/readability/must-use-create-error.js +4 -3
- package/packages/flint/rules/readability/must-use-interfaces-for-complex-types.d.ts +1 -0
- package/packages/flint/rules/readability/must-use-interfaces-for-complex-types.js +4 -3
- package/packages/flint/rules/readability/must-use-single-return-in-function.js +3 -3
- package/packages/flint/rules/readability/must-use-test-comments.d.ts +1 -0
- package/packages/flint/rules/readability/must-use-test-comments.js +4 -3
- package/packages/flint/rules/readability/no-centralized-error-messages.js +2 -2
- package/packages/flint/rules/readability/no-constructor-name-for-resource.d.ts +1 -0
- package/packages/flint/rules/readability/no-constructor-name-for-resource.js +4 -3
- package/packages/flint/rules/readability/no-long-filter-map.d.ts +1 -0
- package/packages/flint/rules/readability/no-long-filter-map.js +4 -3
- package/packages/flint/rules/readability/no-naked-query-return.js +3 -3
- package/packages/flint/rules/readability/no-string-length-check.d.ts +1 -0
- package/packages/flint/rules/readability/no-string-length-check.js +4 -3
- package/packages/flint/rules/readability/no-then.d.ts +1 -0
- package/packages/flint/rules/readability/no-then.js +4 -3
- package/packages/flint/rules/readability/no-to-lower-case-with-resource-name.js +3 -3
- package/packages/flint/rules/readability/no-useless-destructing.js +3 -3
- package/packages/flint/rules/readability/use-function-without-parameter-shortcut.js +3 -3
- package/packages/flint/rules/readability/use-nullish-coalescing-for-default.d.ts +1 -0
- package/packages/flint/rules/readability/use-nullish-coalescing-for-default.js +5 -4
- package/packages/infra/ci/constants/ci-constants.js +1 -1
- package/packages/infra/ci/constants/git-commands.d.ts +0 -5
- package/packages/infra/ci/constants/git-commands.js +2 -2
- package/packages/infra/ci/constants/npm-commands.d.ts +1 -1
- package/packages/infra/ci/constants/npm-commands.js +1 -1
- package/packages/infra/ci/jobs/build-and-test.js +1 -2
- package/packages/infra/ci/jobs/build-db-connection-string.js +1 -1
- package/packages/infra/ci/jobs/build-package.js +1 -1
- package/packages/infra/ci/jobs/ci-auto-merge.js +1 -1
- package/packages/infra/ci/jobs/clear-nx-cache.js +1 -1
- package/packages/infra/ci/jobs/cli-create-test.js +2 -2
- package/packages/infra/ci/jobs/deploy-to-vercel.js +2 -2
- package/packages/infra/ci/jobs/drop-all-db.js +2 -2
- package/packages/infra/ci/jobs/lint.js +3 -2
- package/packages/infra/ci/jobs/manual-cleanup.js +1 -1
- package/packages/infra/ci/jobs/publish-package.js +1 -1
- package/packages/infra/ci/jobs/ranksters-build-and-test.js +1 -1
- package/packages/infra/ci/jobs/saas-kit-test-build-and-test.js +2 -2
- package/packages/infra/ci/jobs/sync-saas-kit-version-to-main.js +2 -2
- package/packages/infra/ci/jobs/unpublish-package.js +2 -2
- package/packages/infra/ci/jobs/update-submodules.js +2 -2
- package/packages/infra/ci/setup/checkout-and-sync-submodules.js +2 -2
- package/packages/infra/ci/setup/cleanup.js +2 -2
- package/packages/infra/ci/setup/clear-nx-cache-environment.js +1 -1
- package/packages/infra/ci/setup/copy-playwright-report.js +3 -3
- package/packages/infra/ci/setup/get-build-package-info.js +1 -1
- package/packages/infra/ci/setup/get-latest-npm-package-info.js +1 -1
- package/packages/infra/ci/setup/init-db.js +1 -1
- package/packages/infra/ci/setup/install-local-saaskit.js +3 -3
- package/packages/infra/ci/setup/npm-auth.js +2 -2
- package/packages/infra/ci/setup/prepare-environment.js +2 -2
- package/packages/infra/ci/setup/prettier.js +2 -2
- package/packages/infra/ci/setup/resolve-and-checkout-submodule-branch.js +2 -2
- package/packages/infra/ci/setup/resolve-main-repo-branch.js +2 -2
- package/packages/infra/ci/setup/rollup-cache-cloud.js +2 -2
- package/packages/infra/ci/setup/setup-submodules.js +2 -2
- package/packages/infra/ci/setup/spawn-background-server.js +1 -1
- package/packages/infra/ci/setup/sync-build-artifacts.js +1 -1
- package/packages/infra/ci/setup/update-workspace-dependencies.js +1 -1
- package/packages/infra/ci/setup/verify-published-version.js +1 -1
- package/packages/infra/ci/utils/cloud-client.js +1 -1
- package/packages/infra/ci/utils/create-early-infra-error.js +1 -1
- package/packages/infra/ci/utils/exec.js +1 -1
- package/packages/infra/ci/utils/git-command-funcs.js +1 -1
- package/packages/infra/ci/utils/git.js +5 -5
- package/packages/infra/ci/utils/npm-command-funcs.js +2 -2
- package/packages/infra/deploy/cluster/cluster-deploy-setup.js +1 -1
- package/packages/infra/git/gitlab/gitlab.js +1 -1
- package/packages/infra/plugins/dirname-plugin.js +1 -1
- package/packages/level2/ai/server/ai-deepinfra.js +1 -1
- package/packages/level2/ai/server/ai-google.js +1 -1
- package/packages/level2/ai/server/ai-groq.js +1 -1
- package/packages/level2/ai/vercel-ai-sdk/ai.js +1 -1
- package/packages/level2/cli/create/configs/drizzle-cli-config.js +2 -1
- package/packages/level2/cli/create/configs/next-cli-config.d.ts +11 -31
- package/packages/level2/cli/create/configs/next-cli-config.js +1 -3
- package/packages/level2/cli/create/configs/playwright-cli-config.js +4 -1
- package/packages/level2/client/component-configs/configure-default-config.js +1 -1
- package/packages/level2/client/component-configs/edit-resource-configs.js +1 -1
- package/packages/level2/client/component-configs/multi-list-config.js +1 -1
- package/packages/level2/client/component-configs/resource-list-configs.js +1 -1
- package/packages/level2/client/component-configs/workspace-settings-config.js +1 -1
- package/packages/level2/client/components/subscription-plan/SubscriptionPlan.funcs.js +1 -1
- package/packages/level2/client/components/subscription-plan/SubscriptionPlan.js +2 -5
- package/packages/level2/client/components/subscription-plan/subscription-plan-config.js +1 -1
- package/packages/level2/client/components/subscription-plan/subscriptions.js +1 -1
- package/packages/level2/client/components/wizard/Wizard.funcs.js +1 -1
- package/packages/level2/client/components/wizard/WizardStepper.funcs.js +1 -1
- package/packages/level2/client/components/wizard/config/wizard-edit-resource-config.js +1 -1
- package/packages/level2/client/pages/dashboard-page/DashboardPage.funcs.js +1 -1
- package/packages/level2/client/pages/edit-user-by-id-page/EditUserByIdPage.js +4 -3
- package/packages/level2/client/pages/microsoft-page/MicrosoftPage.funcs.js +1 -1
- package/packages/level2/client/pages/screenshot-page/TestScreenshotPage.funcs.js +1 -1
- package/packages/level2/client/pages/view-page/ViewPage.funcs.js +3 -4
- package/packages/level2/client/payments/change-payment-method-field/ChangePaymentMethodField.funcs.js +1 -1
- package/packages/level2/client/payments/checkout-form/CheckoutForm.funcs.d.ts +1 -0
- package/packages/level2/client/payments/checkout-form/CheckoutForm.funcs.js +3 -2
- package/packages/level2/client/payments/checkout-form/CheckoutForm.js +70 -83
- package/packages/level2/client/payments/checkout-form/CheckoutFormSubmit.js +3 -12
- package/packages/level2/client/payments/payments.js +1 -1
- package/packages/level2/client/products/reject-action-funcs.js +1 -1
- package/packages/level2/client/website-scan/website-scan-result-social-media.js +1 -1
- package/packages/level2/common/addresses/address.resource.js +1 -1
- package/packages/level2/common/addresses/country.resource.js +1 -1
- package/packages/level2/common/customers/customer.resource.js +1 -1
- package/packages/level2/common/demo/company.resource.js +1 -1
- package/packages/level2/common/demo/contact.resource.js +1 -1
- package/packages/level2/common/demo/deal.resource.js +1 -1
- package/packages/level2/common/demo/ticket.resource.js +1 -1
- package/packages/level2/common/dev/ai-assistent/ai-assistant.resource.js +1 -1
- package/packages/level2/common/dev/custom-permission-resource/custom-permission-resource.resource.js +1 -1
- package/packages/level2/common/dev/dev-report.resource.js +1 -1
- package/packages/level2/common/dev/friends/friend.resource.js +1 -1
- package/packages/level2/common/dev/jobs/job.resource.js +1 -1
- package/packages/level2/common/dev/no-permission.resource.js +1 -1
- package/packages/level2/common/dev/persons/dev-greeting.resource.js +1 -1
- package/packages/level2/common/dev/persons/paper-plane.resource.js +1 -1
- package/packages/level2/common/dev/persons/person-to-job.resource.js +1 -1
- package/packages/level2/common/dev/persons/person-to-person.resource.js +1 -1
- package/packages/level2/common/dev/persons/person.resource-ext.js +1 -1
- package/packages/level2/common/dev/persons/person.resource.js +1 -1
- package/packages/level2/common/dev/persons/phone-brand.resource.js +1 -1
- package/packages/level2/common/dev/persons/ping.resource.js +1 -1
- package/packages/level2/common/dev/singleton-dev-sandbox.resource.js +1 -1
- package/packages/level2/common/fd/fd-meta-toolbox/status-board/status-board.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/forms/form-field-bank.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/forms/form-field-category.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/forms/form-field-submission.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/forms/form-field-to-form-section.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/forms/form-field.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/forms/form-section.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/forms/form-submission.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/forms/form.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/localization/language.resource.js +1 -1
- package/packages/level2/common/fd/fd-toolbox-web/localization/localization-string.resource.js +1 -1
- package/packages/level2/common/hd/resources/hd-product.resource.js +1 -1
- package/packages/level2/common/leads/google-place.resource.js +1 -1
- package/packages/level2/common/leads/lead-category.resource.js +1 -1
- package/packages/level2/common/leads/lead-email.resource.js +1 -1
- package/packages/level2/common/leads/lead-group.resource.js +1 -1
- package/packages/level2/common/leads/lead-to-lead-category.resource.js +1 -1
- package/packages/level2/common/leads/lead-to-lead-group.resource.js +1 -1
- package/packages/level2/common/leads/lead.resource.js +1 -1
- package/packages/level2/common/leads/lm/google-place.resource-ext.js +1 -1
- package/packages/level2/common/models/create-user-input.js +1 -1
- package/packages/level2/common/models/edit-other-user-dto.js +1 -1
- package/packages/level2/common/models/user-created.js +1 -1
- package/packages/level2/common/payments/feature-to-payment-plan.resource.js +1 -1
- package/packages/level2/common/payments/payment.resource.js +1 -1
- package/packages/level2/common/payments/system-invoice/payment-system-invoice.resource.js +1 -1
- package/packages/level2/common/products/product-parameter.resource.js +1 -1
- package/packages/level2/common/resources/case.resource2.js +1 -1
- package/packages/level2/common/resources/dashboard-report.resource.js +1 -1
- package/packages/level2/common/resources/dashboard.resource.js +1 -1
- package/packages/level2/common/resources/feed-entry.resource.js +1 -1
- package/packages/level2/common/resources/integration-subscription.resource.js +1 -1
- package/packages/level2/common/resources/item.resource.js +1 -1
- package/packages/level2/common/resources/oauth-service.resource.js +1 -1
- package/packages/level2/common/resources/order-line.resource.js +1 -1
- package/packages/level2/common/resources/order-transaction.resource.js +1 -1
- package/packages/level2/common/resources/order.resource.js +1 -1
- package/packages/level2/common/resources/product-category.resource.js +1 -1
- package/packages/level2/common/resources/product-media.resource.js +1 -1
- package/packages/level2/common/resources/product.resource.js +1 -1
- package/packages/level2/common/resources/search.resource.js +1 -1
- package/packages/level2/common/resources/searchable-resource.resource.js +1 -1
- package/packages/level2/common/resources/system-setting.resource.js +1 -1
- package/packages/level2/common/resources/website-scan-result.resource.js +1 -1
- package/packages/level2/common/resources/workspace-setting.resource.js +1 -1
- package/packages/level2/common/shipment/shipment-provider.resource.js +1 -1
- package/packages/level2/common/shipment/shipment.resource.js +1 -1
- package/packages/level2/common/stores/store.resource.js +1 -1
- package/packages/level2/common/tutorial/student.resource.js +1 -1
- package/packages/level2/common/website-scan/analytics-scan.js +1 -1
- package/packages/level2/common/website-scan/website-platform-checking.js +1 -1
- package/packages/level2/db/adapters/postgres-adapter.js +2 -2
- package/packages/level2/db/adapters/sqlite-adapter.js +2 -2
- package/packages/level2/db/constants/db-constants.js +1 -1
- package/packages/level2/db/db-config.js +1 -1
- package/packages/level2/db/db-connection.js +1 -1
- package/packages/level2/db/db-schema.js +1 -1
- package/packages/level2/db/drizzle-queries.js +1 -1
- package/packages/level2/db/guards/db-type-guards.js +1 -1
- package/packages/level2/db/utils/run-migration-command.js +1 -1
- package/packages/level2/enricher/integrations/google-spreadsheet.js +2 -2
- package/packages/level2/fd-app-toolbox/edit-password-form/EditPasswordForm.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/edit-password-form/EditPasswordForm.js +36 -47
- package/packages/level2/fd-app-toolbox/edit-user-form/EditUserForm.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/edit-user-form/EditUserForm.js +46 -55
- package/packages/level2/fd-app-toolbox/edit-user-sheet/EditUserSheet.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/forgot-password-form/ForgotPasswordForm.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/forgot-password-form/ForgotPasswordForm.js +7 -16
- package/packages/level2/fd-app-toolbox/layout/client-layout/client-layout-config.js +1 -1
- package/packages/level2/fd-app-toolbox/layout/client-root/ClientRoot.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/layout/sidebar/Sidebar.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-dropdown-menu/SidebarDropdownMenu.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-resource-names-cache.js +1 -1
- package/packages/level2/fd-app-toolbox/layout/toolbar/Toolbar.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/login-form/LoginForm.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/login-form/LoginForm.js +50 -49
- package/packages/level2/fd-app-toolbox/login-form/facebook-login.js +1 -1
- package/packages/level2/fd-app-toolbox/login-form/google-login.js +1 -1
- package/packages/level2/fd-app-toolbox/login-form/microsoft-login.js +1 -1
- package/packages/level2/fd-app-toolbox/login-form/standard-login.js +1 -1
- package/packages/level2/fd-app-toolbox/menu/notifications-menu/NotificationMenu.funcs.js +2 -2
- package/packages/level2/fd-app-toolbox/menu/notifications-menu/notification-list/NotificationList.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/menu/top-menu/top-menu-item/TopMenuItem.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/UserDropdownMenu.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/user-dropdown-menu-item/UserDropdownMenuItem.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/menu/visible-workspace-picker/VisibleWorkspacePicker.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/menu/workspace-picker/WorkspacePicker.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/models/screens-result.js +1 -1
- package/packages/level2/fd-app-toolbox/models/searchable-resource-result.js +1 -1
- package/packages/level2/fd-app-toolbox/passwords/passwords-api.js +1 -1
- package/packages/level2/fd-app-toolbox/providers/ThemeProvider/theme.js +1 -1
- package/packages/level2/fd-app-toolbox/register-form/RegisterForm.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/register-form/RegisterForm.js +40 -51
- package/packages/level2/fd-app-toolbox/report/Chart.js +2 -2
- package/packages/level2/fd-app-toolbox/report/ReportCard.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/report/ReportChart.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/report/ReportComponent.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/reports/dashboard-report-data.resource.js +1 -1
- package/packages/level2/fd-app-toolbox/reports/report-chart-series.resource.js +1 -1
- package/packages/level2/fd-app-toolbox/reports/report-with-data.resource.js +1 -1
- package/packages/level2/fd-app-toolbox/reports/report.resource.js +1 -1
- package/packages/level2/fd-app-toolbox/reset-password-form/ResetPasswordForm.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/reset-password-form/ResetPasswordForm.js +10 -18
- package/packages/level2/fd-app-toolbox/resources/notification/notification.resource.js +1 -1
- package/packages/level2/fd-app-toolbox/resources/status-board/status-board-item.resource.js +1 -1
- package/packages/level2/fd-app-toolbox/resources/status-board/status-board-status.resource.js +1 -1
- package/packages/level2/fd-app-toolbox/search/Search.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/search/search-dialog/SearchDialog.funcs.js +2 -2
- package/packages/level2/fd-app-toolbox/search/search-result/SearchResult.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/search/search-searchable-resource-results/SearchSearchableResourceResult.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/server/base-resources/props/fill-base-resource-props.js +1 -1
- package/packages/level2/fd-app-toolbox/server/base-resources/props/fill-workspace-resource-props.js +1 -1
- package/packages/level2/fd-app-toolbox/server/infra/workspaces/workspace-db.js +1 -1
- package/packages/level2/fd-app-toolbox/server/layout/sidebar/sidebar-resources.js +1 -1
- package/packages/level2/fd-app-toolbox/server/users/user-db.js +1 -1
- package/packages/level2/fd-app-toolbox/server/workspace/visible-workspaces.js +1 -1
- package/packages/level2/fd-app-toolbox/services/web-socket-client.js +1 -1
- package/packages/level2/fd-app-toolbox/status-board/StatusBoard.funcs.js +1 -1
- package/packages/level2/fd-app-toolbox/user-list/UserList.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/badge-toggle-list/BadgeToggleList.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/big-calendar/BigCalendar.funcs.js +4 -7
- package/packages/level2/fd-component-toolbox/button/Button.d.ts +2 -2
- package/packages/level2/fd-component-toolbox/button/Button.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/calendar/Calendar.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/client/framework/index.js +3 -3
- package/packages/level2/fd-component-toolbox/datepicker/DatePicker.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/dialog/YesOrNoDialog.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/dynamic-layout/DynamicLayoutDragAndDrop.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/fade-out-text/FadeOutText.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/form/Form.js +6 -9
- package/packages/level2/fd-component-toolbox/image-radio-group/ImageRadioGroup.js +2 -2
- package/packages/level2/fd-component-toolbox/image-radio-group/ImageRadioGroupDialog.js +2 -2
- package/packages/level2/fd-component-toolbox/input/Input.d.ts +3 -3
- package/packages/level2/fd-component-toolbox/input/Input.funcs.d.ts +2 -2
- package/packages/level2/fd-component-toolbox/input/Input.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/list/list-item/ListItem.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/markdown/Markdown.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/markdown/Markdown.js +2 -2
- package/packages/level2/fd-component-toolbox/multiselect/Multiselect.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/multiselect/hooks/use-multi-select.js +1 -1
- package/packages/level2/fd-component-toolbox/navigation/navigation-item/NavigationItem.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/rich-text/RichText.funcs.js +3 -3
- package/packages/level2/fd-component-toolbox/rich-text/rich-text-constants.js +1 -1
- package/packages/level2/fd-component-toolbox/sizing/sizing.js +1 -1
- package/packages/level2/fd-component-toolbox/switch/Switch.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/textarea/TextArea.funcs.js +1 -1
- package/packages/level2/fd-component-toolbox/toaster/Toaster.funcs.js +1 -1
- package/packages/level2/meta/api/hooks/use-ui-resource-meta.js +1 -1
- package/packages/level2/meta/api/meta-odata.js +1 -1
- package/packages/level2/meta/auth/auth-guards.js +1 -1
- package/packages/level2/meta/auth/auth-handler.js +1 -1
- package/packages/level2/meta/auth/logins.js +1 -1
- package/packages/level2/meta/auth/permissions/permission-checker.js +1 -1
- package/packages/level2/meta/browsers/base-multi-browser/BaseMultiBrowser.funcs.js +1 -1
- package/packages/level2/meta/browsers/base-multi-browser/base-multi-browser-dialog/BaseMultiBrowserDialog.funcs.js +1 -1
- package/packages/level2/meta/browsers/browser/Browser.funcs.js +1 -1
- package/packages/level2/meta/browsers/browser/browser-dialog/BrowserDialog.funcs.js +1 -1
- package/packages/level2/meta/browsers/many-to-many-browser/ManyToManyBrowser.funcs.js +1 -1
- package/packages/level2/meta/browsers/multi-browser/MultiBrowser.funcs.js +1 -1
- package/packages/level2/meta/card-list/CardList.funcs.js +1 -1
- package/packages/level2/meta/card-list/config/card-config.js +1 -1
- package/packages/level2/meta/card-list/data-card/DataCard.funcs.js +1 -1
- package/packages/level2/meta/card-list/data-card/data-card-content/DataCardContent.funcs.js +1 -1
- package/packages/level2/meta/client/framework/hooks.js +1 -1
- package/packages/level2/meta/client/framework/index.js +1 -1
- package/packages/level2/meta/client/layout.js +1 -1
- package/packages/level2/meta/comment/CommentList.funcs.js +1 -1
- package/packages/level2/meta/components/edit-image/EditImage.funcs.js +1 -1
- package/packages/level2/meta/components/file-upload/FileUpload.funcs.js +1 -1
- package/packages/level2/meta/components/multi-list/MultiList.funcs.js +1 -1
- package/packages/level2/meta/components/multi-list/MultiList.js +2 -2
- package/packages/level2/meta/components/multi-list/use-multi-list-edit-resource-config.js +1 -1
- package/packages/level2/meta/components/related-resources/RelatedResources.funcs.js +1 -1
- package/packages/level2/meta/components/related-resources/related-property.js +1 -1
- package/packages/level2/meta/components/related-resources/related-resources-component.js +1 -1
- package/packages/level2/meta/constants/toolbox-users.js +1 -1
- package/packages/level2/meta/core/auth-resource-meta.js +1 -1
- package/packages/level2/meta/core/property-meta.js +1 -1
- package/packages/level2/meta/core/property-types.js +1 -1
- package/packages/level2/meta/core/relation.js +1 -1
- package/packages/level2/meta/core/resource-description/resource-description.js +1 -1
- package/packages/level2/meta/core/resource-description/resource-descriptions.js +1 -1
- package/packages/level2/meta/core/resource-meta.js +1 -1
- package/packages/level2/meta/core/resource-singletons.js +1 -1
- package/packages/level2/meta/core/resources/blob/blob-urls.js +1 -1
- package/packages/level2/meta/core/resources/blob/blob.resource.js +1 -1
- package/packages/level2/meta/core/resources/comment.resource.js +1 -1
- package/packages/level2/meta/core/resources/features/feature.resource.js +1 -1
- package/packages/level2/meta/core/resources/payment-plan-feature.resource.js +1 -1
- package/packages/level2/meta/core/resources/payment-plan.resource.js +1 -1
- package/packages/level2/meta/core/resources/permissions/permission-package-to-permission.resource.js +1 -1
- package/packages/level2/meta/core/resources/permissions/permission-package.resource.js +1 -1
- package/packages/level2/meta/core/resources/pricing.resource.js +1 -1
- package/packages/level2/meta/core/resources/resources/resource-property.resource.js +1 -1
- package/packages/level2/meta/core/resources/resources/resource.resource.js +1 -1
- package/packages/level2/meta/core/resources/roles/role-feature.resource.js +1 -1
- package/packages/level2/meta/core/resources/roles/role-to-permission-package.resource.js +1 -1
- package/packages/level2/meta/core/resources/roles/role-to-permission.resource.js +1 -1
- package/packages/level2/meta/core/resources/roles/role.resource.js +1 -1
- package/packages/level2/meta/core/resources/usage-limit/usage-limit.resource.js +1 -1
- package/packages/level2/meta/core/resources/users/user-activity-overview.resource.js +1 -1
- package/packages/level2/meta/core/resources/users/user-feature.resource.js +1 -1
- package/packages/level2/meta/core/resources/users/user-role.resource.js +1 -1
- package/packages/level2/meta/core/resources/users/user-setting.resource.js +1 -1
- package/packages/level2/meta/core/resources/users/user-to-workspace.resource.js +1 -1
- package/packages/level2/meta/core/resources/users/user-visible-workspace.resource.js +1 -1
- package/packages/level2/meta/core/resources/users/user-workspace-invite.resource.js +1 -1
- package/packages/level2/meta/core/resources/users/user.resource.js +1 -1
- package/packages/level2/meta/core/resources/workspace/workspace-resource.js +1 -1
- package/packages/level2/meta/core/resources/workspace/workspace-to-workspace.resource.js +1 -1
- package/packages/level2/meta/core/resources/workspace/workspace.resource.js +1 -1
- package/packages/level2/meta/core/ui-property-meta-old.js +1 -1
- package/packages/level2/meta/crud/permissions/crud-permission-checker.js +1 -1
- package/packages/level2/meta/decorators/access-by-user-id.js +1 -1
- package/packages/level2/meta/decorators/access-by-workspace-id.js +1 -1
- package/packages/level2/meta/decorators/allowed-crud-actions.js +1 -1
- package/packages/level2/meta/decorators/big-text.js +1 -1
- package/packages/level2/meta/decorators/blob-image.js +1 -1
- package/packages/level2/meta/decorators/colorful.js +1 -1
- package/packages/level2/meta/decorators/concat-description.js +1 -1
- package/packages/level2/meta/decorators/create-only-resource.js +1 -1
- package/packages/level2/meta/decorators/currency.js +1 -1
- package/packages/level2/meta/decorators/date-only.js +1 -1
- package/packages/level2/meta/decorators/db-index.js +1 -1
- package/packages/level2/meta/decorators/default-sort.js +1 -1
- package/packages/level2/meta/decorators/description-based-on-property-value.js +1 -1
- package/packages/level2/meta/decorators/description-property.js +1 -1
- package/packages/level2/meta/decorators/display-name.js +1 -1
- package/packages/level2/meta/decorators/dynamic.js +1 -1
- package/packages/level2/meta/decorators/email.js +1 -1
- package/packages/level2/meta/decorators/expand-description-properties.js +1 -1
- package/packages/level2/meta/decorators/file-upload.js +1 -1
- package/packages/level2/meta/decorators/flags-enum.js +1 -1
- package/packages/level2/meta/decorators/get-only-resource.js +1 -1
- package/packages/level2/meta/decorators/icon.js +1 -1
- package/packages/level2/meta/decorators/integer.js +1 -1
- package/packages/level2/meta/decorators/label.js +1 -1
- package/packages/level2/meta/decorators/markdown.js +1 -1
- package/packages/level2/meta/decorators/not-a-resource.js +1 -1
- package/packages/level2/meta/decorators/not-colorful.js +1 -1
- package/packages/level2/meta/decorators/not-displayable.js +1 -1
- package/packages/level2/meta/decorators/not-edit-displayable.js +1 -1
- package/packages/level2/meta/decorators/not-editable-from-outside.js +1 -1
- package/packages/level2/meta/decorators/not-filter-displayable.js +1 -1
- package/packages/level2/meta/decorators/not-list-displayable.js +1 -1
- package/packages/level2/meta/decorators/not-relation.js +1 -1
- package/packages/level2/meta/decorators/outside-excluded.js +1 -1
- package/packages/level2/meta/decorators/permission-checker-for.js +1 -1
- package/packages/level2/meta/decorators/phone-number.js +1 -1
- package/packages/level2/meta/decorators/plural-name.js +1 -1
- package/packages/level2/meta/decorators/prefer-plural-name.js +1 -1
- package/packages/level2/meta/decorators/prefer-singular-name.js +1 -1
- package/packages/level2/meta/decorators/priority.js +1 -1
- package/packages/level2/meta/decorators/required-if-other-are-present.js +1 -1
- package/packages/level2/meta/decorators/required-if-prop-has-value.js +1 -1
- package/packages/level2/meta/decorators/required.js +1 -1
- package/packages/level2/meta/decorators/resource-id.js +1 -1
- package/packages/level2/meta/decorators/resource-property-id.js +1 -1
- package/packages/level2/meta/decorators/rich-text.js +1 -1
- package/packages/level2/meta/decorators/searchable.js +1 -1
- package/packages/level2/meta/decorators/singleton.js +1 -1
- package/packages/level2/meta/decorators/transient-resource.js +1 -1
- package/packages/level2/meta/decorators/ui-priority.js +1 -1
- package/packages/level2/meta/decorators/ui-relation-priority.js +1 -1
- package/packages/level2/meta/decorators/unique.js +1 -1
- package/packages/level2/meta/decorators/url.js +1 -1
- package/packages/level2/meta/edit-resource/EditResource.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/EditResourceHeader.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/EditResourceSheet.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/EditResourceTabs.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/apply-value-changes.js +1 -1
- package/packages/level2/meta/edit-resource/config/custom-filter-config-provider.d.ts +4 -0
- package/packages/level2/meta/edit-resource/config/custom-filter-config-provider.js +4 -0
- package/packages/level2/meta/edit-resource/config/edit-resource-config.js +1 -1
- package/packages/level2/meta/edit-resource/config/edit-resource-configs.js +1 -1
- package/packages/level2/meta/edit-resource/config/edit-resource-property-config.js +1 -1
- package/packages/level2/meta/edit-resource/config/resource-list-config.js +1 -1
- package/packages/level2/meta/edit-resource/edit-link/EditLink.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/edit-resource-dialog/EditResourceDialog.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourceBlobField.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourceEnumField.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourceFlagsEnumField.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourceImageField.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourcePropertyBlock.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/edit-resource-property-field/EditResourcePropertyField.funcs.js +1 -1
- package/packages/level2/meta/edit-resource/edit-resource-validation.js +1 -1
- package/packages/level2/meta/edit-resource/edit-resources-constants.js +1 -1
- package/packages/level2/meta/edit-resource/hooks/use-edit-resource-ref.js +1 -1
- package/packages/level2/meta/edit-resource/save-complete-context.js +1 -1
- package/packages/level2/meta/edit-resource/services/blob-components.js +1 -1
- package/packages/level2/meta/edit-resource/services/edit-resource-components.js +1 -1
- package/packages/level2/meta/edit-resource/services/edit-resource-relations.js +1 -1
- package/packages/level2/meta/edit-resource/services/edit-resources.js +1 -1
- package/packages/level2/meta/edit-resource/services/form-validations.js +1 -1
- package/packages/level2/meta/edit-resource/services/property-metas.js +1 -1
- package/packages/level2/meta/edit-resource/services/use-edit-resource-config.js +1 -1
- package/packages/level2/meta/fd-meta-toolbox-service.js +1 -1
- package/packages/level2/meta/filtering/filter/Filter.funcs.js +1 -1
- package/packages/level2/meta/filtering/filter/filters/boolean-filter/BooleanFilter.funcs.js +1 -1
- package/packages/level2/meta/filtering/resource-filter-list/ResourceFilterList.funcs.js +1 -1
- package/packages/level2/meta/filtering/resource-filter-list/resource-filter-list-ids.js +1 -1
- package/packages/level2/meta/filtering/resource-filter-list/resource-filter-lists.js +1 -1
- package/packages/level2/meta/filtering/resource-filter-list/use-resource-filter-list-display.js +1 -1
- package/packages/level2/meta/layout/events.js +1 -1
- package/packages/level2/meta/meta-providers.js +1 -1
- package/packages/level2/meta/meta-sort.js +1 -1
- package/packages/level2/meta/models/user-base-resource.js +1 -1
- package/packages/level2/meta/models/user-workspace-base-resource.js +1 -1
- package/packages/level2/meta/odata/expands.js +1 -1
- package/packages/level2/meta/odata/odata-selects.js +1 -1
- package/packages/level2/meta/one-to-many-relations.js +1 -1
- package/packages/level2/meta/page/use-set-title.js +1 -1
- package/packages/level2/meta/page/use-title.js +1 -1
- package/packages/level2/meta/public-api.d.ts +14 -0
- package/packages/level2/meta/public-api.js +15 -0
- package/packages/level2/meta/relations/many-to-many-info.js +1 -1
- package/packages/level2/meta/relations/meta-relations.js +1 -1
- package/packages/level2/meta/resource-list/ResourceList.funcs.js +4 -3
- package/packages/level2/meta/resource-list/ResourceList.js +6 -11
- package/packages/level2/meta/resource-list/resource-list-cell-element-ids.js +1 -1
- package/packages/level2/meta/resource-list/resource-list-checkers.js +1 -1
- package/packages/level2/meta/resource-list/resource-list-configs.js +1 -1
- package/packages/level2/meta/resource-list/resource-list-header/ResourceListHeader.funcs.js +1 -1
- package/packages/level2/meta/resource-list/resource-list-hooks.js +1 -1
- package/packages/level2/meta/resource-list/resource-list-persist-state.js +1 -1
- package/packages/level2/meta/resource-list/resource-lists.js +1 -1
- package/packages/level2/meta/resource-list/use-resource-list-config.js +1 -1
- package/packages/level2/meta/resource-providers.js +1 -1
- package/packages/level2/meta/resources/session/session.resource.js +1 -1
- package/packages/level2/meta/server/api/odata/odata-expression-operators.js +1 -1
- package/packages/level2/meta/server/api/odata/odata-expressions.js +1 -1
- package/packages/level2/meta/server/api/odata/odata-filters-helpers.js +1 -1
- package/packages/level2/meta/server/api/odata/odata-filters.js +1 -1
- package/packages/level2/meta/server/api/odata/odata-metas.js +1 -1
- package/packages/level2/meta/server/api/odata/odata-parsers.js +1 -1
- package/packages/level2/meta/server/api/odata/odata.js +1 -1
- package/packages/level2/meta/server/auth/auth-guard.js +1 -1
- package/packages/level2/meta/server/auth/fd-sessions.js +1 -1
- package/packages/level2/meta/server/auth/permissions/resource-permission-checker-provider.js +1 -1
- package/packages/level2/meta/server/auth/role-db/get-all-including-user-to-roles.js +1 -1
- package/packages/level2/meta/server/auth/session-access.js +1 -1
- package/packages/level2/meta/server/auth/session-validation.js +1 -1
- package/packages/level2/meta/server/auth/session.js +1 -1
- package/packages/level2/meta/server/auth/users/current-user-id-provider.js +1 -1
- package/packages/level2/meta/server/basic-crud/crud-api.js +1 -1
- package/packages/level2/meta/server/basic-crud/crud.js +1 -1
- package/packages/level2/meta/server/basic-crud/cruds.js +1 -1
- package/packages/level2/meta/server/basic-crud/helpers/crud-event-handler.js +1 -1
- package/packages/level2/meta/server/basic-crud/helpers/cruds-permission-checker.js +1 -1
- package/packages/level2/meta/server/basic-crud/helpers/prepare-many-to-many-resource.js +1 -1
- package/packages/level2/meta/server/basic-crud/related-resource-db.js +1 -1
- package/packages/level2/meta/server/basic-crud/relation-syncs.js +1 -1
- package/packages/level2/meta/server/basic-crud/resource-crud-handlers.js +1 -1
- package/packages/level2/meta/server/basic-crud/resource-meta-handlers.js +1 -1
- package/packages/level2/meta/server/controllers/generic-controllers/crud-controller.js +1 -1
- package/packages/level2/meta/server/db/db.js +1 -1
- package/packages/level2/meta/server/db/init-db.js +1 -1
- package/packages/level2/meta/server/db/schema/schema-adapter.js +1 -1
- package/packages/level2/meta/server/entities/edit-base-resources.js +1 -1
- package/packages/level2/meta/server/entities/edit-workspace.js +1 -1
- package/packages/level2/meta/server/integration-platforms/fd-integration-cache.js +1 -1
- package/packages/level2/meta/server/integration-platforms/integration-db.js +1 -1
- package/packages/level2/meta/server/integration-platforms/integration-events.js +1 -1
- package/packages/level2/meta/server/messaging/messages.js +1 -1
- package/packages/level2/meta/server/meta-core/constants/metas.js +1 -1
- package/packages/level2/meta/server/meta-core/constants/resource-ids.js +1 -1
- package/packages/level2/meta/server/meta-core/crud/crud-update-config.js +1 -1
- package/packages/level2/meta/server/meta-core/crud/search.js +1 -1
- package/packages/level2/meta/server/meta-core/display-name.js +1 -1
- package/packages/level2/meta/server/meta-url-service.js +1 -1
- package/packages/level2/meta/server/models/roles/role-to-permission-package-db.js +1 -1
- package/packages/level2/meta/server/permission/permission-checker.js +1 -1
- package/packages/level2/meta/server/permission/permission-data-provider.js +1 -1
- package/packages/level2/meta/server/permission/permission-package-to-permission-db.js +1 -1
- package/packages/level2/meta/server/permission/permissions.js +1 -1
- package/packages/level2/meta/server/permission/user-permissions-builder.js +1 -1
- package/packages/level2/meta/server/props/meta-property-filters.js +1 -1
- package/packages/level2/meta/server/props/property-meta-config-provider.js +1 -1
- package/packages/level2/meta/server/props/property-names.js +1 -1
- package/packages/level2/meta/server/props/required-properties.js +1 -1
- package/packages/level2/meta/server/providers/current-workspace-id-provider.js +1 -1
- package/packages/level2/meta/server/relations/many-to-many-relations.js +1 -1
- package/packages/level2/meta/server/relations/relations.js +1 -1
- package/packages/level2/meta/server/repositories/odata-db.js +1 -1
- package/packages/level2/meta/server/resources/crud-resources.js +1 -1
- package/packages/level2/meta/server/resources/dynamic-properties.js +1 -1
- package/packages/level2/meta/server/resources/init-internal-resource-metas-from-json.js +2 -2
- package/packages/level2/meta/server/resources/internal-resource-meta.js +1 -1
- package/packages/level2/meta/server/resources/resource-checker.js +1 -1
- package/packages/level2/meta/server/resources/resource-meta-plugin.js +2 -2
- package/packages/level2/meta/server/resources/searchable-resources-api.js +1 -1
- package/packages/level2/meta/server/resources/searchable-resources.js +1 -1
- package/packages/level2/meta/server/services/crud-actions.js +1 -1
- package/packages/level2/meta/server/services/metas.js +1 -1
- package/packages/level2/meta/server/services/permission-check-config-provider.js +1 -1
- package/packages/level2/meta/server/services/property-meta.js +1 -1
- package/packages/level2/meta/server/services/property-metas.js +1 -1
- package/packages/level2/meta/server/services/resource-name-converter.js +1 -1
- package/packages/level2/meta/server/services/resource-provider-db.js +1 -1
- package/packages/level2/meta/server/services/resource-provider-defaults.js +1 -1
- package/packages/level2/meta/server/services/resource-provider-expands.js +1 -1
- package/packages/level2/meta/server/services/resource-provider-permissions.js +1 -1
- package/packages/level2/meta/server/services/resource-provider.js +1 -1
- package/packages/level2/meta/server/ui/meta-api.js +1 -1
- package/packages/level2/meta/server/ui/ui-metas-api.js +1 -1
- package/packages/level2/meta/server/ui/ui-metas.js +1 -1
- package/packages/level2/meta/server/validations/meta-validations.js +2 -2
- package/packages/level2/meta/server/value-checker.js +2 -2
- package/packages/level2/meta/server/web/current-url.js +1 -1
- package/packages/level2/meta/server/web/drizzle-guards.js +1 -1
- package/packages/level2/meta/server/web/drizzle.js +1 -1
- package/packages/level2/meta/server/web/http-api-wrapper.js +1 -1
- package/packages/level2/meta/server/web/reduce-data.js +1 -1
- package/packages/level2/meta/server/web/responses.js +1 -1
- package/packages/level2/meta/server/workspace/get-visible-workspaces-cache-key.js +1 -1
- package/packages/level2/meta/services/client-environment.js +1 -1
- package/packages/level2/meta/services/filter-components.js +1 -1
- package/packages/level2/meta/services/meta-navigations.js +1 -1
- package/packages/level2/meta/services/property-values.js +1 -1
- package/packages/level2/meta/services/resource-filters.js +1 -1
- package/packages/level2/meta/services/resource-name-client-converter.js +1 -1
- package/packages/level2/meta/services/window.js +1 -1
- package/packages/level2/meta/state/base-state-functions.js +1 -1
- package/packages/level2/meta/subscription-plan/fetch-active-or-trial-subscription.js +1 -1
- package/packages/level2/meta/subscription-plan/subscription.resource.js +1 -1
- package/packages/level2/meta/table/Table.funcs.js +1 -1
- package/packages/level2/meta/table/body/TableBody.funcs.d.ts +1 -1
- package/packages/level2/meta/table/body/TableBody.funcs.js +1 -1
- package/packages/level2/meta/table/body/TableBody.js +2 -2
- package/packages/level2/meta/table/body-cell/ActionBodyCell.funcs.js +1 -1
- package/packages/level2/meta/table/body-cell/BlobBodyCell.funcs.js +1 -1
- package/packages/level2/meta/table/body-cell/BodyCell.funcs.js +1 -1
- package/packages/level2/meta/table/body-cell/BodyCellArrayTooltip.funcs.js +1 -1
- package/packages/level2/meta/table/body-cell/BodyCellArrayTooltip.js +9 -6
- package/packages/level2/meta/table/body-cell/MultiselectCellTemplate.funcs.js +1 -1
- package/packages/level2/meta/table/body-cell/ViewCell.funcs.js +1 -1
- package/packages/level2/meta/table/body-row/TableBodyRow.funcs.js +1 -1
- package/packages/level2/meta/table/csv-converter.js +1 -1
- package/packages/level2/meta/table/header/TableHeader.funcs.js +1 -1
- package/packages/level2/meta/table/header-cell/TableHeaderActionCell.funcs.js +1 -1
- package/packages/level2/meta/table/header-cell/TableHeaderCell.funcs.js +1 -1
- package/packages/level2/meta/table/pager/Pager.funcs.js +1 -1
- package/packages/level2/meta/table/services/fd-private-paging.js +1 -1
- package/packages/level2/meta/table/services/fd-table-private-column-calculation.js +1 -1
- package/packages/level2/meta/table/services/fd-table-private-columns.js +1 -1
- package/packages/level2/meta/table/services/fd-table-private-create-columns.js +1 -1
- package/packages/level2/meta/table/services/fd-table-private-properties.js +1 -1
- package/packages/level2/meta/table/services/fd-table-private-resize-columns.js +1 -1
- package/packages/level2/meta/table/services/fd-table-private-rows.js +1 -1
- package/packages/level2/meta/table/services/fd-table-private-sorting.js +1 -1
- package/packages/level2/meta/table/services/table-private-cell.js +1 -1
- package/packages/level2/meta/table/table-constants.js +1 -1
- package/packages/level2/meta/table/table-custom-action/TableCustomAction.funcs.js +1 -1
- package/packages/level2/meta/ui/ui-relation.js +1 -1
- package/packages/level2/meta/ui-meta-providers.js +1 -1
- package/packages/level2/meta/ui-resource-meta.js +1 -1
- package/packages/level2/meta/view/ViewSheet.funcs.js +1 -1
- package/packages/level2/npm-commands/gen-dynamic-handlers-map/generate-dynamic-handlers-map.js +3 -3
- package/packages/level2/npm-commands/gen-meta/generate-meta.js +2 -2
- package/packages/level2/npm-commands/gen-meta/generate-tsconfig.js +2 -2
- package/packages/level2/npm-commands/gen-schema/gen-schema.js +1 -1
- package/packages/level2/npm-commands/gen-schema/transpile-schema.js +1 -1
- package/packages/level2/npm-commands/migrate-db/migrate-db.js +1 -1
- package/packages/level2/npm-commands/run-command/index.js +3 -3
- package/packages/level2/npm-commands/seed-db/seed-db.js +1 -1
- package/packages/level2/npm-commands/server/db/fd-db-initializer.js +1 -1
- package/packages/level2/other/scrapping/scrape.command.js +1 -1
- package/packages/level2/other/scrapping/scrapper-config.js +1 -1
- package/packages/level2/other/scrapping/scrappers.js +2 -2
- package/packages/level2/server/addresses/address-db.js +1 -1
- package/packages/level2/server/addresses/address-master-data.js +1 -1
- package/packages/level2/server/addresses/country-db.js +1 -1
- package/packages/level2/server/addresses/country-master-data.js +1 -1
- package/packages/level2/server/ai/ai-generated-text.js +1 -1
- package/packages/level2/server/auth/dev-demo-permissions.js +1 -1
- package/packages/level2/server/auth/lm-permission-master-data.js +1 -1
- package/packages/level2/server/auth/oauth-service-db.js +1 -1
- package/packages/level2/server/auth/permission-master-data.js +1 -1
- package/packages/level2/server/auth/permission-role-mapping.js +1 -1
- package/packages/level2/server/auth/role-db.js +1 -1
- package/packages/level2/server/auth/role-master-data.js +1 -1
- package/packages/level2/server/auth/role-to-permission-master-data.js +1 -1
- package/packages/level2/server/auth/role-to-permission-package.handlers.js +1 -1
- package/packages/level2/server/auth/role-to-permission.handlers.js +1 -1
- package/packages/level2/server/auth/role.handlers.js +1 -1
- package/packages/level2/server/auth/sign-in-api.js +1 -1
- package/packages/level2/server/auth/sign-out-api.js +1 -1
- package/packages/level2/server/auth/sign-up-api.js +1 -1
- package/packages/level2/server/blob/blob-db.js +2 -2
- package/packages/level2/server/business-profile/business-profile-api.js +1 -1
- package/packages/level2/server/comments/comment-db.js +1 -1
- package/packages/level2/server/comments/comment-master-data.js +1 -1
- package/packages/level2/server/customers/customer-db.js +1 -1
- package/packages/level2/server/customers/customer-master-data.js +1 -1
- package/packages/level2/server/dashboards/dashboard-db.js +1 -1
- package/packages/level2/server/dashboards/dashboard-master-data.js +1 -1
- package/packages/level2/server/dashboards/dashboard-report-db.js +1 -1
- package/packages/level2/server/dashboards/dashboard-report-master-data.js +1 -1
- package/packages/level2/server/db/db.js +1 -1
- package/packages/level2/server/demo/companies/company-db.js +1 -1
- package/packages/level2/server/demo/companies/company-master-data.js +1 -1
- package/packages/level2/server/demo/contacts/contact-db.js +1 -1
- package/packages/level2/server/demo/contacts/contact-master-data.js +1 -1
- package/packages/level2/server/demo/deals/deal-db.js +1 -1
- package/packages/level2/server/demo/deals/deal-master-data.js +1 -1
- package/packages/level2/server/demo/tickets/ticket-db.js +1 -1
- package/packages/level2/server/demo/tickets/ticket-master-data.js +1 -1
- package/packages/level2/server/dev/ai-assistant/ai-assistant-db.js +1 -1
- package/packages/level2/server/dev/ai-assistant/ai-assistant-master-data.js +1 -1
- package/packages/level2/server/dev/ai-assistant/ai-assistant-mother.js +1 -1
- package/packages/level2/server/dev/dev-greeting/dev-greeting-master-data.js +1 -1
- package/packages/level2/server/dev/dev-greeting/dev-greeting-mother.js +1 -1
- package/packages/level2/server/dev/friends/friend-db.js +1 -1
- package/packages/level2/server/dev/friends/friend-master-data.js +1 -1
- package/packages/level2/server/dev/friends/friend-mother.js +1 -1
- package/packages/level2/server/dev/friends/friend-utils.js +1 -1
- package/packages/level2/server/dev/jobs/job-db.js +1 -1
- package/packages/level2/server/dev/jobs/job-master-data.js +1 -1
- package/packages/level2/server/dev/jobs/job-mother.js +1 -1
- package/packages/level2/server/dev/paper-planes/paper-plane-db.js +1 -1
- package/packages/level2/server/dev/paper-planes/paper-plane-master-data.js +1 -1
- package/packages/level2/server/dev/paper-planes/paper-plane-mother.js +1 -1
- package/packages/level2/server/dev/paper-planes/paper-plane.handlers.js +1 -1
- package/packages/level2/server/dev/persons/person-db.js +1 -1
- package/packages/level2/server/dev/persons/person-master-data.js +1 -1
- package/packages/level2/server/dev/persons/person-mother.js +1 -1
- package/packages/level2/server/dev/persons/person-to-job-db.js +1 -1
- package/packages/level2/server/dev/persons/person-to-job-master-data.js +1 -1
- package/packages/level2/server/dev/persons/person-to-job-mother.js +1 -1
- package/packages/level2/server/dev/persons/person-to-person-db.js +1 -1
- package/packages/level2/server/dev/persons/person-to-person-master-data.js +1 -1
- package/packages/level2/server/dev/persons/person-to-person-mother.js +1 -1
- package/packages/level2/server/dev/persons/person.handlers.js +1 -1
- package/packages/level2/server/dev/phone-brands/phone-brand-db.js +1 -1
- package/packages/level2/server/dev/phone-brands/phone-brand-master-data.js +1 -1
- package/packages/level2/server/dev/phone-brands/phone-brand-mother.js +1 -1
- package/packages/level2/server/dev/pings/ping-db.js +1 -1
- package/packages/level2/server/dev/pings/ping-master-data.js +1 -1
- package/packages/level2/server/dev/pings/ping-mother.js +1 -1
- package/packages/level2/server/example/example-api.js +1 -1
- package/packages/level2/server/export/csv-data-formatter.js +1 -1
- package/packages/level2/server/export/export-api.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-asp-net/models/roles/role-to-permission-db.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-db.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-package-db.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-package-to-db.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-package-to-permission.handlers.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-package.handlers.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission.handlers.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/http/base-http-client.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/localization/language/language-db.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/localization/language/language-master-data.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/logging/log-api.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/mailing/fd-emails.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/models/reset-password-request.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/notifications/notification-db.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/permissions/fd-permission-master-data.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/permissions/permission-api.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/resources/resource-property-db.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/seeding/notification-master-data.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/seeding/resource-master-data.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/seeding/resource-property-master-data.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/seeding/workspace-master-data.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/services/notifications.js +1 -1
- package/packages/level2/server/fd/fd-toolbox-web/services/socket/web-socket-server.js +1 -1
- package/packages/level2/server/features/feature-db.js +1 -1
- package/packages/level2/server/features/feature-master-data.js +1 -1
- package/packages/level2/server/features/feature-mother.js +1 -1
- package/packages/level2/server/features/features.js +1 -1
- package/packages/level2/server/features/payment-plan-feature-data.js +1 -1
- package/packages/level2/server/features/payment-plan-feature-db.js +1 -1
- package/packages/level2/server/features/status-board-master-data.js +1 -1
- package/packages/level2/server/features/user-feature.handlers.js +1 -1
- package/packages/level2/server/feeds/feed-entry-data.js +1 -1
- package/packages/level2/server/hd/plaid/plaid.js +1 -1
- package/packages/level2/server/html/email.js +1 -1
- package/packages/level2/server/infra/background-jobs/background-jobs.js +2 -2
- package/packages/level2/server/infra/background-jobs/init-jobs.js +1 -1
- package/packages/level2/server/infra/workspaces/workspace-setting-db.js +1 -1
- package/packages/level2/server/integration/data/deleted/integration-deleted-api.js +1 -1
- package/packages/level2/server/integration/data/dynamicfields/integration-dynamicfields-api.js +1 -1
- package/packages/level2/server/integration/integration-api.js +1 -1
- package/packages/level2/server/integration-platforms/integration-resource.js +1 -1
- package/packages/level2/server/integration-platforms/subscription-odata.js +1 -1
- package/packages/level2/server/integrations/aio/blobs.js +2 -2
- package/packages/level2/server/integrations/blob/blob-storage.js +1 -1
- package/packages/level2/server/integrations/google-place/google-place-helpers.js +1 -1
- package/packages/level2/server/integrations/google-place/google-place.handlers.js +1 -1
- package/packages/level2/server/integrations/google-place/google-place.js +1 -1
- package/packages/level2/server/integrations/remote-blob/remote-blob-storage.js +1 -1
- package/packages/level2/server/integrations/screenshot/get-website-screenshots.js +1 -1
- package/packages/level2/server/integrations/screenshot/screenshot-controller.js +1 -1
- package/packages/level2/server/integrations/screenshot/screenshotone/screenshotone-client.js +2 -2
- package/packages/level2/server/integrations/website-scan/scan-social-media-and-email.js +1 -1
- package/packages/level2/server/integrations/website-scan/website-scan-initializer.js +1 -1
- package/packages/level2/server/items/item-db.js +1 -1
- package/packages/level2/server/leads/lead-category-db.js +1 -1
- package/packages/level2/server/leads/lead-category-master-data.js +1 -1
- package/packages/level2/server/leads/lead-db.js +1 -1
- package/packages/level2/server/leads/lead-email-db.js +1 -1
- package/packages/level2/server/leads/lead-email-master-data.js +1 -1
- package/packages/level2/server/leads/lead-group-db.js +1 -1
- package/packages/level2/server/leads/lead-group-master-data.js +1 -1
- package/packages/level2/server/leads/lead-master-data.js +1 -1
- package/packages/level2/server/leads/lead-to-lead-category-db.js +1 -1
- package/packages/level2/server/leads/lead-to-lead-category-master-data.js +1 -1
- package/packages/level2/server/leads/lead-to-lead-group-db.js +1 -1
- package/packages/level2/server/leads/lead-to-lead-group-master-data.js +1 -1
- package/packages/level2/server/leads/lead-to-lead-group.handlers.js +1 -1
- package/packages/level2/server/leads/lead.handlers.js +1 -1
- package/packages/level2/server/leads/services/ai-scan-result-delete.js +1 -1
- package/packages/level2/server/lm/google-place/google-place-to-lead.js +1 -1
- package/packages/level2/server/lm/google-place/save-to-group/save-to-group-api.js +1 -1
- package/packages/level2/server/lm/google-place-scan-website/google-place-scan-website-api.js +1 -1
- package/packages/level2/server/lm/lead-scan-website/lead-scan-website-api.js +1 -1
- package/packages/level2/server/markdown/markdown-api.js +1 -1
- package/packages/level2/server/markdown/markdown.js +1 -1
- package/packages/level2/server/media/media-api.js +2 -2
- package/packages/level2/server/media/media-master-data.js +3 -3
- package/packages/level2/server/notifications/notification.handlers.js +1 -1
- package/packages/level2/server/orders/order-db.js +1 -1
- package/packages/level2/server/orders/order-master-data.js +1 -1
- package/packages/level2/server/orders/order-utils.js +1 -1
- package/packages/level2/server/orders/order.handlers.js +1 -1
- package/packages/level2/server/otheruser/id/otheruser-id-api.js +1 -1
- package/packages/level2/server/otheruser/otheruser-api.js +1 -1
- package/packages/level2/server/password/editpassword/editpassword-api.js +1 -1
- package/packages/level2/server/password/forgotpassword/forgotpassword-api.js +1 -1
- package/packages/level2/server/password/resetpassword/resetpassword-api.js +1 -1
- package/packages/level2/server/payment/method/payment-method-api.js +1 -1
- package/packages/level2/server/payment/verify-fail/payment-verify-fail-api.js +1 -1
- package/packages/level2/server/payment/verify-success/payment-verify-success.js +1 -1
- package/packages/level2/server/payments/payment-plan.handlers.js +2 -2
- package/packages/level2/server/payments/payments/payment-plan-db.js +1 -1
- package/packages/level2/server/payments/payments/payment-plan-master-data.js +1 -1
- package/packages/level2/server/payments/payments/payment-plans.js +1 -1
- package/packages/level2/server/payments/payments/payments-api.js +1 -1
- package/packages/level2/server/payments/payments/payments.js +1 -1
- package/packages/level2/server/payments/payments/pricing-seeding.js +1 -1
- package/packages/level2/server/payments/pricing.handlers.js +1 -1
- package/packages/level2/server/payments/stripe/stripe-sync.js +2 -2
- package/packages/level2/server/payments/stripe/stripes.js +2 -2
- package/packages/level2/server/payments/subscriptions/subscription-db.js +1 -1
- package/packages/level2/server/payments/subscriptions/subscriptions.js +1 -1
- package/packages/level2/server/payments/system-invoice/payment-system-invoice.handlers.js +1 -1
- package/packages/level2/server/product-setup/website-analysiz.js +2 -2
- package/packages/level2/server/products/product-db.js +1 -1
- package/packages/level2/server/products/product-master-data.js +1 -1
- package/packages/level2/server/products/product-media/product-media-db.js +1 -1
- package/packages/level2/server/products/product-media/product-media-master-data.js +1 -1
- package/packages/level2/server/products/product-parameters/product-parameter-mother.js +1 -1
- package/packages/level2/server/reports/report-chart-series-master-data.js +1 -1
- package/packages/level2/server/reports/report-chart-series-mother.js +1 -1
- package/packages/level2/server/reports/report-db.js +1 -1
- package/packages/level2/server/reports/report-master-data.js +1 -1
- package/packages/level2/server/reports/report-mother.js +1 -1
- package/packages/level2/server/reports/report-with-data.handlers.js +1 -1
- package/packages/level2/server/search/search-result-api.js +1 -1
- package/packages/level2/server/search/search-result.js +1 -1
- package/packages/level2/server/search/search.handlers.js +1 -1
- package/packages/level2/server/search/searchable-resource.handlers.js +1 -1
- package/packages/level2/server/seeding/seed-master-data.js +1 -1
- package/packages/level2/server/shipment/shipment-api.js +1 -1
- package/packages/level2/server/shipment/shipment-db.js +1 -1
- package/packages/level2/server/shipment/shipment-master-data.js +1 -1
- package/packages/level2/server/shipment/shipment.handlers.js +1 -1
- package/packages/level2/server/statusboard/statusboard-api.js +1 -1
- package/packages/level2/server/store/store-db.js +1 -1
- package/packages/level2/server/store/store-master-data.js +2 -2
- package/packages/level2/server/subscription/cancel/subscription-cancel-api.js +1 -1
- package/packages/level2/server/subscription/create/subscription-create-api.js +1 -1
- package/packages/level2/server/subscription/update/subscription-update-api.js +1 -1
- package/packages/level2/server/system-settings/system-master-data.js +1 -1
- package/packages/level2/server/system-settings/system-setting-db.js +1 -1
- package/packages/level2/server/test/data/test-data-api.js +1 -1
- package/packages/level2/server/test/data/test-data.js +1 -1
- package/packages/level2/server/upload/upload-api.js +1 -1
- package/packages/level2/server/usage-limit/usage-limit.js +1 -1
- package/packages/level2/server/user-settings/user-setting.handlers.js +1 -1
- package/packages/level2/server/userfeature/isenabled/userfeature-isenabled-api.js +1 -1
- package/packages/level2/server/users/admin-edit-admin.js +1 -1
- package/packages/level2/server/users/auth.js +1 -1
- package/packages/level2/server/users/edit-other-users.js +1 -1
- package/packages/level2/server/users/tokens.js +2 -2
- package/packages/level2/server/users/user-creation-service.js +1 -1
- package/packages/level2/server/users/user-db.js +1 -1
- package/packages/level2/server/users/user-deletions.js +1 -1
- package/packages/level2/server/users/user-feature-db.js +1 -1
- package/packages/level2/server/users/user-feature-predicates.js +1 -1
- package/packages/level2/server/users/user-manager.js +2 -2
- package/packages/level2/server/users/user-master-data.js +1 -1
- package/packages/level2/server/users/user-mother.js +1 -1
- package/packages/level2/server/users/user-role.handlers.js +1 -1
- package/packages/level2/server/users/user-role.js +1 -1
- package/packages/level2/server/users/user-service.js +1 -1
- package/packages/level2/server/users/user-settings/user-setting-db.js +1 -1
- package/packages/level2/server/users/user.handlers.js +1 -1
- package/packages/level2/server/utils/base-resource-properties.js +1 -1
- package/packages/level2/server/utils/check-resource-access-permission.js +1 -1
- package/packages/level2/server/utils/get-user-and-workspace-ids.js +1 -1
- package/packages/level2/server/utils/map-subscription-status-to-db-format.js +1 -1
- package/packages/level2/server/web/http-wrapper.js +1 -1
- package/packages/level2/server/web/initialize.js +1 -1
- package/packages/level2/server/web/responses/create-remote-blob-response.js +1 -1
- package/packages/level2/server/workspace/change-current-workspace.js +1 -1
- package/packages/level2/server/workspace/visible-workspace-api.js +1 -1
- package/packages/level2/server/workspace/workspace-api.js +1 -1
- package/packages/level2/server/workspace/workspace-invite/user-workspace-invite.handlers.js +1 -1
- package/packages/level2/server/workspace/workspace-invite/workspace-user-invites.js +1 -1
- package/packages/test-infra/asserters/edit-asserts.js +1 -1
- package/packages/test-infra/asserters/forgot-password-asserts.js +1 -1
- package/packages/test-infra/asserters/navigation-asserts.js +1 -1
- package/packages/test-infra/asserters/notification-asserts.js +1 -1
- package/packages/test-infra/asserters/search-asserts.js +1 -1
- package/packages/test-infra/asserters/table-asserts.d.ts +1 -0
- package/packages/test-infra/asserters/table-asserts.js +2 -2
- package/packages/test-infra/asserters/ui-asserts.js +1 -1
- package/packages/test-infra/constants/test-data/input-fields-values.js +3 -1
- package/packages/test-infra/constants/ui-tester/checkout-form-test-data.js +2 -1
- package/packages/test-infra/fixtures/custom-test-functions.js +1 -1
- package/packages/test-infra/fixtures/error-tracking-fixture.js +1 -1
- package/packages/test-infra/fixtures/extend-test.js +1 -1
- package/packages/test-infra/monorepo-global-setup.js +1 -1
- package/packages/test-infra/monorepo-global-teardown.js +1 -1
- package/packages/test-infra/page-objects/account-setup-po.js +1 -1
- package/packages/test-infra/page-objects/browser-po.js +1 -1
- package/packages/test-infra/page-objects/checkout-form-po.js +1 -1
- package/packages/test-infra/page-objects/edit-po.js +1 -1
- package/packages/test-infra/page-objects/filter-po.js +1 -1
- package/packages/test-infra/page-objects/forgot-password-po.js +1 -1
- package/packages/test-infra/page-objects/list-po.js +1 -1
- package/packages/test-infra/page-objects/login-po.js +1 -1
- package/packages/test-infra/page-objects/multi-browser-po.js +1 -1
- package/packages/test-infra/page-objects/notification-po.js +1 -1
- package/packages/test-infra/page-objects/payment-plan-po.js +1 -1
- package/packages/test-infra/page-objects/reset-password-po.js +1 -1
- package/packages/test-infra/page-objects/search-po.js +1 -1
- package/packages/test-infra/page-objects/select-workspace-po.js +1 -1
- package/packages/test-infra/page-objects/sidebar-po.js +1 -1
- package/packages/test-infra/page-objects/table-asserts.d.ts +2 -0
- package/packages/test-infra/page-objects/table-asserts.js +2 -2
- package/packages/test-infra/page-objects/toolbar-po.js +1 -1
- package/packages/test-infra/page-objects/user-menu-po.js +1 -1
- package/packages/test-infra/page-objects/user-setting-po.js +1 -1
- package/packages/test-infra/page-objects/view-po.js +1 -1
- package/packages/test-infra/playwright-setup/global-setup.js +1 -1
- package/packages/test-infra/playwright-setup/global-teardown.js +1 -1
- package/packages/test-infra/test-data/crud-tests/crud-test-data-factory.js +1 -1
- package/packages/test-infra/test-data/crud-tests/crud-test-data.js +1 -1
- package/packages/test-infra/test-data/crud-tests/relation-sync-info-provider.js +1 -1
- package/packages/test-infra/test-data/dev/friends/friends-mother.js +1 -1
- package/packages/test-infra/test-data/dev/persons/person-mother.js +1 -1
- package/packages/test-infra/test-data/dev/persons/phone-brand-mother.js +1 -1
- package/packages/test-infra/test-data/integration-tests/base-http-client.js +2 -2
- package/packages/test-infra/test-data/integration-tests/http-client.js +2 -2
- package/packages/test-infra/test-data/integration-tests/result-comparer.js +1 -1
- package/packages/test-infra/test-data/integration-tests/workspace.js +1 -1
- package/packages/test-infra/test-data/meta/person-property-metas.js +1 -1
- package/packages/test-infra/test-data/meta/resource-meta-mother.js +1 -1
- package/packages/test-infra/test-data/meta/ui-meta-mother.js +1 -1
- package/packages/test-infra/test-data/meta/ui-property-meta-mother.js +1 -1
- package/packages/test-infra/test-data/seed-test-data.js +1 -1
- package/packages/test-infra/ui-tester/global-ui-test.js +1 -1
- package/packages/test-infra/ui-tester/ui-tester.js +3 -3
- package/packages/tools/string-duplication/handlers.js +1 -1
- package/packages/tools/string-duplication/index.d.ts +13 -1
- package/packages/tools/string-duplication/index.js +11 -49
- package/packages/tools/string-duplication/normalizer.js +1 -1
- package/packages/tools/string-duplication/reporter.js +3 -1
- package/packages/tools/string-duplication/resolver.js +3 -2
- package/packages/tools/string-duplication/string-extractor.js +3 -2
- package/src/app/loading.js +3 -2
- package/src/hd/footer/HdFooter.js +3 -2
- package/src/lm/ai-scan/AiScanAction.funcs.js +1 -1
- package/src/lm/google-place/action-dropdown/GooglePlaceActionDropdown.funcs.js +1 -1
- package/src/lm/google-place/actions/GooglePlaceSaveToGroupAction.funcs.js +1 -1
- package/src/lm/google-place/actions/google-place-delete-action.js +1 -1
- package/src/lm/google-place/actions/google-place-take-screenshot-action.js +1 -1
- package/src/lm/google-place/cell-templates/GooglePlaceEmailsCellTemplate.funcs.js +1 -1
- package/src/lm/google-place/cell-templates/GooglePlaceScanAction.funcs.js +1 -1
- package/src/lm/lead/action-dropdown/LeadActionDropdown.funcs.js +1 -1
- package/src/lm/lead/action-dropdown/lead-dropdown-actions.js +1 -1
- package/src/lm/lead/actions/export-leads-action/export-leads-action.js +1 -1
- package/src/lm/lead/actions/move-to-group-action/LeadMoveToGroupAction.funcs.js +1 -1
- package/src/lm/lead/actions/save-to-group-action/lead-save-to-group-action.js +1 -1
- package/src/lm/lead/actions/take-screenshot-action/lead-take-screenshot-action.js +1 -1
- package/src/lm/lead/cell-templates/LeadScanAction.funcs.js +1 -1
- package/src/lm/lead-group/table-custom-action/lead-group-table-custom-action.js +1 -1
- package/src/lm/pages/HomePage.funcs.js +1 -1
- package/test-infra/index.d.ts +2 -2
- package/test-infra/index.js +2 -2
- package/undocumented/index.d.ts +236 -136
- package/undocumented/index.js +181 -168
- package/packages/fd-toolbox/infra/env-setting-types.d.ts +0 -5
- package/packages/fd-toolbox/infra/env-setting-types.js +0 -4
- package/packages/flint/infra/ast-helpers/array-analysis.js +0 -8
- package/packages/flint/infra/ast-helpers/casing-analysis.js +0 -4
- package/packages/flint/infra/ast-helpers/enum-analysis.js +0 -12
- package/packages/flint/infra/ast-helpers/eslint-analysis.js +0 -6
- package/packages/flint/infra/ast-helpers/expression-analysis.js +0 -7
- package/packages/flint/infra/ast-helpers/formatting-analysis.js +0 -6
- package/packages/flint/infra/ast-helpers/function-analysis.js +0 -7
- package/packages/flint/infra/ast-helpers/jsx-analysis.js +0 -7
- package/packages/flint/infra/ast-helpers/module-analysis.js +0 -11
- package/packages/flint/infra/ast-helpers/name-analysis.js +0 -9
- package/packages/flint/infra/ast-helpers/nullish-analysis.js +0 -6
- package/packages/flint/infra/ast-helpers/number-analysis.js +0 -7
- package/packages/flint/infra/ast-helpers/object-analysis.js +0 -6
- package/packages/flint/infra/ast-helpers/scope-analysis.js +0 -10
- package/packages/flint/infra/ast-helpers/string-analysis.js +0 -9
- package/packages/flint/infra/ast-helpers/tree-analysis.js +0 -6
- package/packages/flint/infra/ast-helpers/type-analysis.js +0 -8
- package/packages/flint/infra/ast-helpers/type-guards.js +0 -10
- package/packages/flint/infra/ast-helpers/variable-analysis.d.ts +0 -2
- package/packages/flint/infra/ast-helpers/variable-analysis.js +0 -7
- package/packages/flint/infra/ast-helpers/visitors.js +0 -4
- package/packages/flint/infra/utils/create-eslint-rule.js +0 -6
- package/packages/flint/rules/naming/must-use-singlewithwarning-instead-of-indexing-first-element.d.ts +0 -3
- package/packages/flint/rules/naming/must-use-singlewithwarning-instead-of-indexing-first-element.js +0 -8
- /package/packages/flint/infra/{ast-helpers → analysis}/array-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/casing-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/enum-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/eslint-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/formatting-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/jsx-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/module-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/nullish-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/number-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/string-analysis.d.ts +0 -0
- /package/packages/flint/infra/{ast-helpers → analysis}/tree-analysis.d.ts +0 -0
- /package/packages/flint/infra/{utils/create-eslint-rule.d.ts → create-eslint-rule.d.ts} +0 -0
|
@@ -8,6 +8,6 @@ import { userSettingProps } from '../../meta/core/resources/users/props/user-set
|
|
|
8
8
|
import { createUserWithSettings, editUser } from '../users/edit-other-users.js';
|
|
9
9
|
import { parseJsonBodyFromRequest } from '../../../fd-toolbox/lib/utils.js';
|
|
10
10
|
|
|
11
|
-
const otheruserPostRoute=httpApiWrapper(async
|
|
11
|
+
const otheruserPostRoute=httpApiWrapper(async _0x29c0a3=>{const _0x5e099a=await parseJsonBodyFromRequest(_0x29c0a3);return await createUserWithSettings(_0x5e099a),apiCreatedResponse(_0x5e099a);});const otheruserPutRoute=httpApiWrapper(async _0x430373=>{const _0x31c003=await parseJsonBodyFromRequest(_0x430373),_0x3af72c=await editUser(_0x31c003);return apiOkResponse(_0x3af72c);});const otheruserGetRoute=httpApiWrapper(async _0x4854d5=>{const _0x501655=new URL(_0x4854d5['url'])['searchParams']['get'](userSettingProps['userId']);if(!_0x501655)throw apiNotFoundError(responseMessages['notFoundError']);const _0x2e19a=await getUserSettingByUserId(_0x501655);if(!_0x2e19a)throw apiNotFoundError(responseMessages['notFoundError']);return apiOkResponse(_0x2e19a);});
|
|
12
12
|
|
|
13
13
|
export { otheruserGetRoute, otheruserPostRoute, otheruserPutRoute };
|
|
@@ -5,6 +5,6 @@ import { changeUserPassword } from '../../users/user-service.js';
|
|
|
5
5
|
import { parseJsonBodyFromRequest } from '../../../../fd-toolbox/lib/utils.js';
|
|
6
6
|
import { getUserId } from '../../../meta/server/auth/users/current-user-id-provider.js';
|
|
7
7
|
|
|
8
|
-
const editpasswordPutRoute=httpApiWrapper(async
|
|
8
|
+
const editpasswordPutRoute=httpApiWrapper(async _0x460d46=>{const _0x41619f=await parseJsonBodyFromRequest(_0x460d46),_0x536f24=await getUserId();if(!_0x536f24)return apiBadRequestResponse('User\x20not\x20found');if(!_0x41619f['currentPassword'])return apiBadRequestResponse('Current\x20password\x20is\x20required');if(!_0x41619f['newPassword'])return apiBadRequestResponse('New\x20password\x20is\x20required');const _0x1e4d53=await changeUserPassword(_0x41619f,_0x536f24);return _0x1e4d53['isSuccess']?apiOkResponse('Password\x20successfully\x20changed'):apiBadRequestResponse(_0x1e4d53['userFriendlyMessage']);});
|
|
9
9
|
|
|
10
10
|
export { editpasswordPutRoute };
|
|
@@ -15,6 +15,6 @@ import { routes } from '../../../../fd-toolbox/routing/routes.js';
|
|
|
15
15
|
import { getUserByEmail } from '../../users/user-db.js';
|
|
16
16
|
import { getHtmlTemplatesPath } from '../../html/email.js';
|
|
17
17
|
|
|
18
|
-
const forgotpasswordPostRoute=httpApiWrapper(async
|
|
18
|
+
const forgotpasswordPostRoute=httpApiWrapper(async _0x2b14a4=>{const _0x45a8f4=await parseJsonBodyFromRequest(_0x2b14a4);if(!_0x45a8f4['email'])throw apiBadRequestError(passwordMessages['emailRequired']);const _0x434a6b=await getUserByEmail(_0x45a8f4['email']);if(!_0x434a6b)throw apiNotFoundError();const _0x5b0150=generatePasswordResetToken(_0x434a6b);await setTestData(testDataKeys['lastForgotPasswordToken'],_0x5b0150);const _0xb5d444=new URL(_0x2b14a4['url']),_0x2f9884=_0xb5d444['origin']+'/'+routes['resetPassword']+'?'+codeParam+'='+_0x5b0150+'&'+emailParam+'='+_0x434a6b['email'],_0x4648bb=getHtmlTemplatesPath('send-email-form.html'),_0x397fc4=await readFile(_0x4648bb,{'encoding':'utf-8'}),_0x140b52=_0x397fc4['replace']('{{callbackUrl}}',_0x2f9884),_0xf82bac={'to':[_0x45a8f4['email']],'from':emails['from']['replace']('{0}',_0xb5d444['hostname']),'subject':emails['resetPasswordSubject'],'body':_0x140b52};return await sendEmail(_0xf82bac),apiNoContentResponse();},{'anonymous':!![]});
|
|
19
19
|
|
|
20
20
|
export { forgotpasswordPostRoute };
|
|
@@ -6,6 +6,6 @@ import { resetPassword } from '../../users/user-manager.js';
|
|
|
6
6
|
import { parseJsonBodyFromRequest } from '../../../../fd-toolbox/lib/utils.js';
|
|
7
7
|
import { getUserByEmail } from '../../users/user-db.js';
|
|
8
8
|
|
|
9
|
-
const resetpasswordPostRoute=httpApiWrapper(async
|
|
9
|
+
const resetpasswordPostRoute=httpApiWrapper(async _0x4c84f7=>{const _0x22b5db=await parseJsonBodyFromRequest(_0x4c84f7);if(!_0x22b5db['password'])return apiBadRequestResponse(passwordMessages['passwordRequired']);if(!_0x22b5db['token'])return apiBadRequestResponse(passwordMessages['tokenRequired']);if(!_0x22b5db['email'])return apiBadRequestResponse(passwordMessages['emailRequired']);if(_0x22b5db['password']!==_0x22b5db['confirmPassword'])return apiBadRequestResponse(passwordMessages['passwordsDontMatch']);const _0x1e1d4a=await getUserByEmail(_0x22b5db['email']);if(!_0x1e1d4a)return apiNotFoundResponse(void(-0x25e9+0xacc+0x1*0x1b1d));const _0x5d0b43=await resetPassword(_0x22b5db['token'],_0x1e1d4a,_0x22b5db['password']);return _0x5d0b43['isSuccess']?apiOkResponse(_0x5d0b43['userFriendlyMessage']):apiBadRequestResponse(_0x5d0b43['userFriendlyMessage']);},{'anonymous':!![]});
|
|
10
10
|
|
|
11
11
|
export { resetpasswordPostRoute };
|
|
@@ -3,6 +3,6 @@ import { httpApiWrapper } from '../../../meta/server/web/http-api-wrapper.js';
|
|
|
3
3
|
import { changeCurrentUserDefaultPaymentMethod, getCurrentDefaultPaymentMethod } from '../../payments/payments/payments.js';
|
|
4
4
|
import { parseJsonBodyFromRequest } from '../../../../fd-toolbox/lib/utils.js';
|
|
5
5
|
|
|
6
|
-
const paymentMethodPutRoute=httpApiWrapper(async
|
|
6
|
+
const paymentMethodPutRoute=httpApiWrapper(async _0x54ed7f=>{const {paymentMethodId:_0x2fd3a7}=await parseJsonBodyFromRequest(_0x54ed7f);return changeCurrentUserDefaultPaymentMethod(_0x2fd3a7);});const paymentMethodGetRoute=httpApiWrapper(async()=>{return getCurrentDefaultPaymentMethod();});
|
|
7
7
|
|
|
8
8
|
export { paymentMethodGetRoute, paymentMethodPutRoute };
|
|
@@ -5,6 +5,6 @@ import { cancelIncompleteSubscription } from '../../payments/payments/payments.j
|
|
|
5
5
|
import { paymentErrors } from '../../../common/payments/payment-constants.js';
|
|
6
6
|
import { parseJsonBodyFromRequest } from '../../../../fd-toolbox/lib/utils.js';
|
|
7
7
|
|
|
8
|
-
const paymentVerifyFailPostRoute=httpApiWrapper(async
|
|
8
|
+
const paymentVerifyFailPostRoute=httpApiWrapper(async _0x2de062=>{const {subscriptionId:_0x3e48ab}=await parseJsonBodyFromRequest(_0x2de062);await cancelIncompleteSubscription(_0x3e48ab);throw apiBadRequestError(paymentErrors['paymentFailed']);});
|
|
9
9
|
|
|
10
10
|
export { paymentVerifyFailPostRoute };
|
|
@@ -7,6 +7,6 @@ import { apiCreatedResponse } from '../../../meta/server/web/responses.js';
|
|
|
7
7
|
import { subscriptionStatuses } from '../../../meta/core/resources/enums/payment-enums.js';
|
|
8
8
|
import { parseJsonBodyFromRequest } from '../../../../fd-toolbox/lib/utils.js';
|
|
9
9
|
|
|
10
|
-
const paymentVerifySuccessPostRoute=httpApiWrapper(async
|
|
10
|
+
const paymentVerifySuccessPostRoute=httpApiWrapper(async _0x22b2ea=>{const {paymentIntentId:_0x196d98,pricingId:_0x3fae7d}=await parseJsonBodyFromRequest(_0x22b2ea),_0x432116=await getCurrentWorkspaceId(),_0x5bb6ef=await getSubscriptionFromTransactionId(_0x196d98),_0x4bad4d=await getActiveSubscriptionByWorkspaceId(_0x432116);return _0x4bad4d&&await changeSubscriptionStatus(_0x4bad4d['id'],subscriptionStatuses['paused']),await storePaymentData(_0x196d98,_0x5bb6ef,_0x3fae7d),apiCreatedResponse({'isPaymentCompleted':!![]});});
|
|
11
11
|
|
|
12
12
|
export { paymentVerifySuccessPostRoute };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import
|
|
2
|
+
import _0x2b5aae from 'stripe';
|
|
3
3
|
import { userFacingErrorMessages, paymentErrorMessages } from '../../common/payments/payment-constants.js';
|
|
4
4
|
import { paymentPlanProps } from '../../meta/core/resources/props/payment-plan-props.js';
|
|
5
5
|
import { httpStatusCodes } from '../../../fd-toolbox/constants/http-status-codes.js';
|
|
@@ -12,6 +12,6 @@ import { crudUpdate } from '../../meta/server/basic-crud/cruds.js';
|
|
|
12
12
|
import { getUserId } from '../../meta/server/auth/users/current-user-id-provider.js';
|
|
13
13
|
import { createInvalidValidationResult } from '../../../fd-toolbox/types/crud/crud-results.js';
|
|
14
14
|
|
|
15
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
15
|
+
var __defProp=Object['defineProperty'],__name=(_0x4e711b,_0x21f624)=>__defProp(_0x4e711b,'name',{'value':_0x21f624,'configurable':!![]});async function preUpdate(_0x4b4e9c){const _0x4d6360=_0x4b4e9c['modifiedResource'],_0x7444cc=_0x4b4e9c['originalResource'],_0x1b9935=_0x4b4e9c['crudUpdateConfig'];_0x1b9935['isCreate']&&await syncNewPaymentPlanWithPaymentSystem(_0x4d6360,_0x1b9935);if(!_0x7444cc?.['paymentSystemId']||!_0x4d6360['paymentSystemId'])return;const _0x326f9b=_0x4d6360['name'],_0x4d72f6=_0x7444cc['name'],_0x889426=_0x4d6360['isActive'],_0x4c7566=_0x7444cc['isActive'];if(_0x326f9b===_0x4d72f6&&_0x889426===_0x4c7566)return;try{_0x326f9b!==_0x4d72f6&&await changePaymentSystemPlanName(_0x4d6360['paymentSystemId'],_0x326f9b);}catch(_0x575077){processError(_0x575077,userFacingErrorMessages['paymentPlanNameChangeError'],paymentErrorMessages['paymentPlanNameChangeError'],paymentPlanProps['name'],_0x4b4e9c);return;}try{_0x889426!==_0x4c7566&&await changePaymentSystemPlanStatus(_0x4d6360['paymentSystemId'],_0x889426);}catch(_0x2af20a){processError(_0x2af20a,userFacingErrorMessages['productPriceIdNotFound'],paymentErrorMessages['productPriceIdNotFound'],paymentPlanProps['isActive'],_0x4b4e9c);}}__name(preUpdate,'preUpdate');async function afterDelete(_0x319753){await deactivatePaymentPlan(_0x319753['deleteResource']['name']);}__name(afterDelete,'afterDelete');async function syncNewPaymentPlanWithPaymentSystem(_0x11f37b,_0x56afe4){const _0xa34733=await createStripeProduct(_0x11f37b['name'],_0x11f37b['id']);_0x11f37b['paymentSystemId']=_0xa34733['id'];if(_0x56afe4['propertyRelationSyncInfos'])for(const _0x3559a0 of _0x56afe4['propertyRelationSyncInfos']){if(_0x3559a0['propertyName']===paymentPlanProps['pricingList'])for(const _0x350121 of _0x3559a0['relatedResourceIds']){const _0xb2a35f=await getResource({'resourceName':resourceNames['pricing'],'id':_0x350121}),_0xdb1886=await createStripeProductPricing(_0xa34733['id'],_0xb2a35f['currency'],_0xb2a35f['price'],_0xb2a35f['id'],_0xb2a35f['billingInterval']);await crudUpdate({'resourceName':resourceNames['pricing'],'resource':{..._0xb2a35f,'paymentSystemPriceId':_0xdb1886['id']},'userId':await getUserId()});}}}__name(syncNewPaymentPlanWithPaymentSystem,'syncNewPaymentPlanWithPaymentSystem');function processError(_0x33ad49,_0x2fc78e,_0x2a4f50,_0x59378e,_0x5da5d4){if(_0x33ad49 instanceof _0x2b5aae['errors']['StripeError']||_0x33ad49 instanceof Error){const _0x216323=_0x33ad49 instanceof _0x2b5aae['errors']['StripeError']?httpStatusCodes['badRequest']:httpStatusCodes['internalServerError'],_0x291b7f=createValidationDetailResult(_0x2a4f50,_0x2fc78e,_0x59378e,_0x216323);_0x5da5d4['crudServiceResult']['validationResult']=createInvalidValidationResult([_0x291b7f]);}}__name(processError,'processError');
|
|
16
16
|
|
|
17
17
|
export { afterDelete as afterDeletePaymentPlan, preUpdate as preUpdatePaymentPlan };
|
|
@@ -16,6 +16,6 @@ import { getResources } from '../../../meta/server/services/resource-provider.js
|
|
|
16
16
|
import { getODataBuilder } from '../../../../fd-toolbox/odata/odata-builder-funcs.js';
|
|
17
17
|
import { createResource } from '../../../meta/server/resources/crud-resources.js';
|
|
18
18
|
|
|
19
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
19
|
+
var __defProp=Object['defineProperty'],__name=(_0x1dcdd8,_0xa2d37b)=>__defProp(_0x1dcdd8,'name',{'value':_0xa2d37b,'configurable':!![]});function getOnePaymentPlan(_0x36de2a){return getResource({'resourceName':resourceNames['paymentPlan'],'id':_0x36de2a});}__name(getOnePaymentPlan,'getOnePaymentPlan');function createPaymentPlan(_0x2671ae){return createResource(_0x2671ae,resourceNames['paymentPlan']);}__name(createPaymentPlan,'createPaymentPlan');async function getPaymentPlans(){const _0x19e3de=await getResourcesByName(resourceNames['paymentPlan']);return _0x19e3de;}__name(getPaymentPlans,'getPaymentPlans');async function getBasicPaymentPlanData(){const _0x1b2f6b=createDynamicSelect(paymentPlanSchema);dbWhere(_0x1b2f6b,eq(paymentPlanSchema,paymentPlanNames['basic']));const _0xdd5df9=await runQuery(_0x1b2f6b);return _0xdd5df9[0x1ccc*-0x1+-0x10*0x64+-0x1*-0x230c];}__name(getBasicPaymentPlanData,'getBasicPaymentPlanData');async function getPaymentPlanByPricingId(_0x2651a5){const _0x2d68ec=getODataBuilder();_0x2d68ec['expand'](pricingProps['paymentPlan'])['filter'](withIdProps['id'],_0x2651a5,oDataOperators['equal'],{'comparisonType':oDataComparisonTypes['equal']});const _0x44ac67=singleWithWarning(await getResources(resourceNames['pricing'],toolboxUserConstants['workerBotId'],_0x2d68ec['build']()));if(!_0x44ac67)return void(0x1d6*-0x8+-0x19a9+-0x1*-0x2859);return _0x44ac67['paymentPlan'];}__name(getPaymentPlanByPricingId,'getPaymentPlanByPricingId');
|
|
20
20
|
|
|
21
21
|
export { createPaymentPlan, getBasicPaymentPlanData, getOnePaymentPlan, getPaymentPlanByPricingId, getPaymentPlans };
|
|
@@ -13,6 +13,6 @@ import { getBooleanEnvSetting } from '../../../../fd-toolbox/infra/env-functions
|
|
|
13
13
|
import { toolboxEnvSettingKeys } from '../../../../fd-toolbox/infra/toolbox-env-setting-keys.js';
|
|
14
14
|
import { seedEnterprisePlanFeatures } from '../../features/feature-master-data.js';
|
|
15
15
|
|
|
16
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
16
|
+
var __defProp=Object['defineProperty'],__name=(_0x3aaf35,_0x467ad1)=>__defProp(_0x3aaf35,'name',{'value':_0x467ad1,'configurable':!![]});async function seedPaymentPlans(){!getBooleanEnvSetting(toolboxEnvSettingKeys['seedDemoResources'])&&await seedEnterprisePlanFeatures(),await seedThirdPaymentPlan(),await seedAdvancedPaymentPlan();}__name(seedPaymentPlans,'seedPaymentPlans');async function seedDemoPaymentPlans(){await seedBasicPaymentPlan();}__name(seedDemoPaymentPlans,'seedDemoPaymentPlans');async function internalSeedPaymentPlan(_0x2df3be,_0x100bec,_0x1e2cc2,_0x2c33e7,_0x2b0288,_0x2a0190,_0x336857){const _0x448ceb={...createBaseResourceProperties(_0x2df3be),'name':_0x100bec,'isActive':_0x1e2cc2,'paymentSystemId':_0x2c33e7,'isContactUs':_0x2b0288,'contactUsUrl':_0x2a0190,'pricingDescription':_0x336857};return createPaymentPlan(_0x448ceb);}__name(internalSeedPaymentPlan,'internalSeedPaymentPlan');async function seedPaymentPlan(_0x33878d){const _0x1c0179=await internalSeedPaymentPlan(_0x33878d['paymentPlanId']??getNewUuid(),_0x33878d['name'],!![],_0x33878d['paymentSystemId'],!!_0x33878d['contactUsUrl'],_0x33878d['contactUsUrl'],_0x33878d['pricingDescription']),_0x3c1006=_0x33878d['pricingConfigs'];for(const _0x24b5d1 of _0x3c1006){await seedPricing(getNewUuid(),_0x1c0179['id'],_0x24b5d1['price'],_0x24b5d1['currency'],_0x24b5d1['billingInterval']);}if(_0x33878d['featureIds'])for(const _0x58ffc8 of _0x33878d['featureIds']){await seedPaymentPlanFeature(getNewUuid(),_0x58ffc8,_0x1c0179['id']);}}__name(seedPaymentPlan,'seedPaymentPlan');async function seedBasicPaymentPlan(){const _0x4fa0eb=[featureIds['userSupportId'],featureIds['contactManagementId'],featureIds['tasksAndRemindersId'],featureIds['calendarAndSchedulingId'],featureIds['analyticsAndReportingId']],_0x2ea3c0=[{'billingInterval':billingIntervals['month'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']},{'billingInterval':billingIntervals['year'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']}];await seedPaymentPlan({'name':paymentPlanNames['basic'],'pricingConfigs':_0x2ea3c0,'paymentPlanId':paymentPlanIds['basicId'],'featureIds':_0x4fa0eb});}__name(seedBasicPaymentPlan,'seedBasicPaymentPlan');async function seedThirdPaymentPlan(){const _0x5dc8fd=[featureIds['unlimitedUsersId'],featureIds['fullCustomizationId'],featureIds['scalableAutomationId'],featureIds['backupAndRecoveryId'],featureIds['advancedAnalyticsAndReportingId']],_0xe0ef3c=[{'billingInterval':billingIntervals['month'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['thirdPrice']},{'billingInterval':billingIntervals['year'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['thirdPrice']}];await seedPaymentPlan({'name':paymentPlanNames['professional'],'pricingConfigs':_0xe0ef3c,'paymentPlanId':paymentPlanIds['thirdId'],'featureIds':_0x5dc8fd});}__name(seedThirdPaymentPlan,'seedThirdPaymentPlan');async function seedAdvancedPaymentPlan(){const _0x443ad8=[{'billingInterval':billingIntervals['month'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']},{'billingInterval':billingIntervals['year'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']}];await seedPaymentPlan({'name':paymentPlanNames['advanced'],'pricingConfigs':_0x443ad8,'contactUsUrl':'#','paymentPlanId':paymentPlanIds['advancedId'],'pricingDescription':'Let`s\x20tailor\x20your\x20package.\x20Contact\x20us\x20for\x20personalized\x20pricing.'});}__name(seedAdvancedPaymentPlan,'seedAdvancedPaymentPlan');
|
|
17
17
|
|
|
18
18
|
export { internalSeedPaymentPlan, seedDemoPaymentPlans, seedPaymentPlan, seedPaymentPlans };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { paymentPlanNames } from '../../../common/subscription-plan/subscription-plan-constants.js';
|
|
3
3
|
|
|
4
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
4
|
+
var __defProp=Object['defineProperty'],__name=(_0x4407a7,_0x5f9e0b)=>__defProp(_0x4407a7,'name',{'value':_0x5f9e0b,'configurable':!![]});function isPaymentPlanTrial(_0x140a5c){return _0x140a5c['name']===paymentPlanNames['trial'];}__name(isPaymentPlanTrial,'isPaymentPlanTrial');
|
|
5
5
|
|
|
6
6
|
export { isPaymentPlanTrial };
|
|
@@ -3,6 +3,6 @@ import { httpApiWrapper } from '../../../meta/server/web/http-api-wrapper.js';
|
|
|
3
3
|
import { registerPaymentCustomerAndCreateWorkspaceSubscription } from './payments.js';
|
|
4
4
|
import { parseJsonBodyFromRequest } from '../../../../fd-toolbox/lib/utils.js';
|
|
5
5
|
|
|
6
|
-
const registerPaymentCustomerAndCreateWorkspaceSubscriptionApi=httpApiWrapper(async
|
|
6
|
+
const registerPaymentCustomerAndCreateWorkspaceSubscriptionApi=httpApiWrapper(async _0x2dd20e=>{const {name:_0x2aae16,email:_0x42e3a9,pricingId:_0x4505d3,paymentMethodId:_0x33a647}=await parseJsonBodyFromRequest(_0x2dd20e),_0x5bcb04=await registerPaymentCustomerAndCreateWorkspaceSubscription(_0x2aae16,_0x42e3a9,_0x4505d3,_0x33a647);return _0x5bcb04;});
|
|
7
7
|
|
|
8
8
|
export { registerPaymentCustomerAndCreateWorkspaceSubscriptionApi };
|
|
@@ -22,6 +22,6 @@ import { isPaymentPlanTrial } from './payment-plans.js';
|
|
|
22
22
|
import { toolboxUserConstants } from '../../../meta/constants/toolbox-users.js';
|
|
23
23
|
import { currencyCodes } from '../../../../fd-toolbox/constants/currency-constants.js';
|
|
24
24
|
|
|
25
|
-
var __defProp=Object['defineProperty'],__name=(_0x82b8af,_0x553b1c)=>__defProp(_0x82b8af,'name',{'value':_0x553b1c,'configurable':!![]});async function registerPaymentCustomerAndCreateWorkspaceSubscription(_0x9957d7,_0x4a4421,_0x46b4e3,_0xfbec4c){let _0x48f5c7;_0x48f5c7=await getCurrentPaymentSystemCustomerId(),_0x48f5c7??=await createPaymentSystemCustomer(_0x9957d7,_0x4a4421),await attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x48f5c7,_0xfbec4c),await setPaymentMethodAsDefault(_0xfbec4c,_0x48f5c7);const _0x126e0d=await getPaymentPlanByPricingId(_0x46b4e3);if(!_0x126e0d)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(!isPaymentPlanTrial(_0x126e0d))return createSubscriptionWithInstantPayment(_0x46b4e3,_0xfbec4c,_0x48f5c7);else {if(await hasPaidOrTrialSubscription())throw apiBadRequestError(paymentErrorMessages['trialCannotBeCreated']);return createTrialSubscription(_0x46b4e3,_0xfbec4c,_0x48f5c7);}}__name(registerPaymentCustomerAndCreateWorkspaceSubscription,'registerPaymentCustomerAndCreateWorkspaceSubscription');async function changeCurrentUserDefaultPaymentMethod(_0x4cc071){if(!areEnvSettingsConfiguredForPaymentSystem())return apiNotFoundResponse(paymentErrorMessages['environmentSettingsForPaymentSystemAreNotConfigured']);const _0x2c8aac=await getCurrentPaymentSystemCustomerId();if(!_0x2c8aac)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);return await attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x2c8aac,_0x4cc071),await setPaymentMethodAsDefault(_0x4cc071,_0x2c8aac),apiNoContentResponse();}__name(changeCurrentUserDefaultPaymentMethod,'changeCurrentUserDefaultPaymentMethod');async function getCurrentDefaultPaymentMethod(){if(!areEnvSettingsConfiguredForPaymentSystem())return apiNotFoundResponse(paymentErrorMessages['environmentSettingsForPaymentSystemAreNotConfigured']);const _0x2a1560=await getCurrentPaymentSystemCustomerId();if(!_0x2a1560)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);const _0x244155=await getStripeDefaultPaymentMethod(_0x2a1560);if(!_0x244155)throw apiNotFoundError(paymentErrorMessages['defaultPaymentMethodNotFound']);if(!_0x244155['card'])throw apiNotFoundError(paymentErrorMessages['cardAttachedToPaymentMethodNotFound']);const _0x49dd3b={'brand':_0x244155['card']['brand'],'safeCardNumber':_0x244155['card']['last4'],'expMonth':_0x244155['card']['exp_month'],'expYear':_0x244155['card']['exp_year']};return apiOkResponse(_0x49dd3b);}__name(getCurrentDefaultPaymentMethod,'getCurrentDefaultPaymentMethod');async function createTrialSubscription(_0x285383,_0x289db2,_0x3d828c){const _0xff8109=await getCurrentWorkspaceId(),_0x546875=await subscribeTrial(_0x285383,_0x289db2,_0x3d828c),_0x4c248e=await getActiveSubscriptionByWorkspaceId(_0xff8109);return _0x4c248e&&await changeSubscriptionStatus(_0x4c248e['id'],subscriptionStatuses['paused']),await updateWorkspacePricingId(_0xff8109,_0x285383),await storeTrialSubscription(_0x546875,_0x285383),apiCreatedResponse({'isPaymentCompleted':!![]});}__name(createTrialSubscription,'createTrialSubscription');async function createSubscriptionWithInstantPayment(_0x3ef3d0,_0x30fb7d,_0x440e40){const _0x3cfe4e=await getCurrentWorkspaceId(),{transactionId:_0x2153e4,confirmedPaymentStatus:_0xa975ae,clientSecret:_0x512b77,subscriptionId:_0x50f2d4}=await subscribeAndPay(_0x3ef3d0,_0x30fb7d,_0x440e40);if(_0xa975ae===paymentStatus['requiresAction']&&_0x512b77)return apiOkResponse({'isPaymentCompleted':![],'clientSecret':_0x512b77,'subscriptionId':_0x50f2d4});const _0x73ce97=await getSubscriptionFromTransactionId(_0x2153e4),_0x5ae0b1=await getActiveSubscriptionByWorkspaceId(_0x3cfe4e);return _0x5ae0b1&&await changeSubscriptionStatus(_0x5ae0b1['id'],subscriptionStatuses['paused']),await updateWorkspacePricingId(_0x3cfe4e,_0x3ef3d0),await storePaymentData(_0x2153e4,_0x73ce97,_0x3ef3d0),apiCreatedResponse({'isPaymentCompleted':!![]});}__name(createSubscriptionWithInstantPayment,'createSubscriptionWithInstantPayment');async function subscribeAndPay(_0x10d52d,_0x1ebad6,_0x5d0265){const {paymentSystemPriceId:_0xd3033}=await getResource({'resourceName':resourceNames['pricing'],'id':_0x10d52d},!![]);if(!_0xd3033)throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x253955=await hasPaymentSystemSubscription(_0x5d0265,_0xd3033);if(_0x253955)throw apiConflictError(paymentErrors['alreadyPaid']);const _0x308b31=await createPaymentSystemSubscription(_0x5d0265,_0xd3033,_0x1ebad6),_0x5a7ca2=await getInvoiceToPaySubscription(_0x308b31),{transactionId:_0x3c4c05,confirmedPaymentStatus:_0x2edb3b,clientSecret:_0x5d05d8}=await completePayment(_0x5a7ca2,_0x1ebad6,_0x308b31);return {'transactionId':_0x3c4c05,'confirmedPaymentStatus':_0x2edb3b,'clientSecret':_0x5d05d8,'subscriptionId':_0x308b31};}__name(subscribeAndPay,'subscribeAndPay');async function subscribeTrial(_0x555816,_0x2d894a,_0x4a955f){const {paymentSystemPriceId:_0x1257da}=await getResource({'resourceName':resourceNames['pricing'],'id':_0x555816});if(!_0x1257da)throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x572896=await hasPaymentSystemSubscription(_0x4a955f,_0x1257da);if(_0x572896)throw apiConflictError(paymentErrors['alreadyPaid']);const _0x11cd3f=await createPaymentSystemTrialSubscription(_0x4a955f,_0x1257da,_0x2d894a);return _0x11cd3f;}__name(subscribeTrial,'subscribeTrial');async function createPaymentSystemCustomer(_0x544f38,_0xb8dda2){const _0xd9f3af=await getCurrentWorkspaceId();if(isProd()){const _0x5bf2d8=await findStripeCustomerByEmail(_0xb8dda2);if(_0x5bf2d8)throw apiConflictError(paymentErrors['emailAlreadyUsed']['replace']('{0}',_0xb8dda2));}const _0x4400d0=await createStripeCustomer(_0x544f38,_0xb8dda2,_0xd9f3af);if(!_0x4400d0?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return await setWorkspacePaymentSystemId(_0x4400d0['id']),_0x4400d0['id'];}__name(createPaymentSystemCustomer,'createPaymentSystemCustomer');async function createPaymentSystemSubscription(_0x404584,_0xdc1055,_0x556b16){const _0xa05b4e=await createStripeSubscription(_0x404584,_0xdc1055,_0x556b16);if(!_0xa05b4e?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return _0xa05b4e['id'];}__name(createPaymentSystemSubscription,'createPaymentSystemSubscription');async function createPaymentSystemTrialSubscription(_0x56eab6,_0x447d73,_0x32b520){const _0x4a4256=await createStripeTrialSubscription(_0x56eab6,_0x447d73,_0x32b520);if(!_0x4a4256?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return _0x4a4256['id'];}__name(createPaymentSystemTrialSubscription,'createPaymentSystemTrialSubscription');async function getInvoiceToPaySubscription(_0x5b6287){const _0x2930b8=await retrievePaymentIntentFromSubscription(_0x5b6287);if(!_0x2930b8?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x40218c=_0x2930b8['id'];return _0x40218c;}__name(getInvoiceToPaySubscription,'getInvoiceToPaySubscription');async function completePayment(_0x404b8e,_0x2993b8,_0x5145ef){const _0x5005b5=await confirmStripePayment(_0x404b8e,_0x2993b8,_0x5145ef);return {'transactionId':_0x5005b5['id'],'confirmedPaymentStatus':_0x5005b5['status'],'clientSecret':_0x5005b5['client_secret']};}__name(completePayment,'completePayment');async function hasPaymentSystemSubscription(_0x1d647f,_0x3eb834){return hasStripeSubscription(_0x1d647f,_0x3eb834);}__name(hasPaymentSystemSubscription,'hasPaymentSystemSubscription');async function getSubscriptionPeriodEndDate(_0x33e9da){const {currentPeriodEndDate:_0x17ea76}=await getStripeSubscriptionData(_0x33e9da);return unixTimestampToDate(_0x17ea76);}__name(getSubscriptionPeriodEndDate,'getSubscriptionPeriodEndDate');async function getSubscriptionTrialEndDate(_0x4db708){const {trialEnd:_0x3ed0f2}=await getStripeSubscriptionData(_0x4db708);if(!_0x3ed0f2)throw apiConflictError(paymentErrorMessages['trialSubscriptionDataNotFound']);return unixTimestampToDate(_0x3ed0f2);}__name(getSubscriptionTrialEndDate,'getSubscriptionTrialEndDate');async function getSubscriptionFromTransactionId(_0x353800){const _0x54c362=await getSubscriptionFromPaymentIntent(_0x353800);return _0x54c362;}__name(getSubscriptionFromTransactionId,'getSubscriptionFromTransactionId');async function storePaymentData(_0x26468e,_0x266eb5,_0x591fdd){const _0x43f528=new Subscription();_0x43f528['pricingId']=_0x591fdd,_0x43f528['status']=subscriptionStatuses['active'],_0x43f528['paymentSystemSubscriptionId']=_0x266eb5,_0x43f528['currentPeriodStartDate']=getNow(),_0x43f528['currentPeriodEndDate']=await getSubscriptionPeriodEndDate(_0x266eb5);const _0x4df117=await crudCreate({'userId':toolboxUserConstants['workerBotId'],'resourceName':resourceNames['subscription'],'resource':_0x43f528,'throwOnNonSuccess':!![]}),{amount:_0x42212c,currency:_0x1312c4,paymentMethodId:_0x14613f}=await getAfterPaymentDetails(_0x26468e),_0x1f8007=new Payment();_0x1f8007['amount']=_0x42212c,_0x1f8007['currency']=_0x1312c4,_0x1f8007['paymentMethodId']=_0x14613f,_0x1f8007['subscriptionId']=_0x4df117['result']['id'],_0x1f8007['paymentTransactionId']=_0x26468e,await crudCreate({'userId':toolboxUserConstants['workerBotId'],'resourceName':resourceNames['payment'],'resource':_0x1f8007,'throwOnNonSuccess':!![]});}__name(storePaymentData,'storePaymentData');async function storeTrialSubscription(_0x11e9a1,_0xbbf71f){const _0x43eb46=new Subscription();_0x43eb46['pricingId']=_0xbbf71f,_0x43eb46['status']=subscriptionStatuses['trialing'],_0x43eb46['paymentSystemSubscriptionId']=_0x11e9a1,_0x43eb46['currentPeriodStartDate']=getNow(),_0x43eb46['currentPeriodEndDate']=await getSubscriptionTrialEndDate(_0x11e9a1),await crudCreate({'userId':await getUserId(),'resourceName':resourceNames['subscription'],'resource':_0x43eb46,'throwOnNonSuccess':!![]});}__name(storeTrialSubscription,'storeTrialSubscription');async function getAfterPaymentDetails(_0x3e03f9){const {amount:_0x1eb8a6,currency:_0x28797f,paymentMethodId:_0x174cea,status:_0x2fd7df}=await getStripePaymentData(_0x3e03f9);if(_0x2fd7df!==paymentStatus['succeeded'])throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x195913=getObjectValues(currencyCodes)['find'](_0x566f33=>_0x566f33===_0x28797f['toUpperCase']());if(!_0x195913)throw apiBadRequestError(paymentErrors['paymentFailed']);if(!_0x174cea||typeof _0x174cea!=='string')throw apiBadRequestError(paymentErrors['paymentFailed']);return {'paymentMethodId':_0x174cea,'amount':_0x1eb8a6,'currency':_0x195913};}__name(getAfterPaymentDetails,'getAfterPaymentDetails');async function cancelIncompleteSubscription(_0x2d41db){await cancelStripeSubscriptionById(_0x2d41db);}__name(cancelIncompleteSubscription,'cancelIncompleteSubscription');async function changePaymentSystemPlanName(_0xb5bd9d,_0x44822f){return changeStripeProductName(_0xb5bd9d,_0x44822f);}__name(changePaymentSystemPlanName,'changePaymentSystemPlanName');async function deactivatePaymentPlan(_0x130ad2){return deactivateStripeProduct(_0x130ad2);}__name(deactivatePaymentPlan,'deactivatePaymentPlan');async function changePaymentSystemPlanStatus(_0x1e0bb6,_0x59417b){return changeStripeProductStatus(_0x1e0bb6,_0x59417b);}__name(changePaymentSystemPlanStatus,'changePaymentSystemPlanStatus');async function getPaymentPlanIdByPriceId(_0x4012b5){return getStripeProductIdByPriceId(_0x4012b5);}__name(getPaymentPlanIdByPriceId,'getPaymentPlanIdByPriceId');async function getCurrentPaymentSystemCustomerId(){const _0x10f3b0=await getCurrentWorkspace();return _0x10f3b0['paymentSystemCustomerId'];}__name(getCurrentPaymentSystemCustomerId,'getCurrentPaymentSystemCustomerId');function detachPaymentMethod(_0x3afec3){return stripe['paymentMethods']['detach'](_0x3afec3);}__name(detachPaymentMethod,'detachPaymentMethod');async function setPaymentMethodAsDefault(_0x4e77e7,_0x3f29c8){await setCustomerDefaultPaymentMethod(_0x4e77e7,_0x3f29c8);}__name(setPaymentMethodAsDefault,'setPaymentMethodAsDefault');async function attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x2c0e1c,_0x1733d9){await attachPaymentMethodToCustomer(_0x2c0e1c,_0x1733d9),await updateCustomerEmailIfNeeded(_0x2c0e1c,_0x1733d9);}__name(attachPaymentSystemPaymentMethodToPaymentSystemCustomer,'attachPaymentSystemPaymentMethodToPaymentSystemCustomer');
|
|
25
|
+
var __defProp=Object['defineProperty'],__name=(_0x560df9,_0x36d9e8)=>__defProp(_0x560df9,'name',{'value':_0x36d9e8,'configurable':!![]});async function registerPaymentCustomerAndCreateWorkspaceSubscription(_0x21ff5f,_0x2c7161,_0x428be0,_0x437dab){let _0x5c8042;_0x5c8042=await getCurrentPaymentSystemCustomerId(),_0x5c8042??=await createPaymentSystemCustomer(_0x21ff5f,_0x2c7161),await attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x5c8042,_0x437dab),await setPaymentMethodAsDefault(_0x437dab,_0x5c8042);const _0x136d17=await getPaymentPlanByPricingId(_0x428be0);if(!_0x136d17)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(!isPaymentPlanTrial(_0x136d17))return createSubscriptionWithInstantPayment(_0x428be0,_0x437dab,_0x5c8042);else {if(await hasPaidOrTrialSubscription())throw apiBadRequestError(paymentErrorMessages['trialCannotBeCreated']);return createTrialSubscription(_0x428be0,_0x437dab,_0x5c8042);}}__name(registerPaymentCustomerAndCreateWorkspaceSubscription,'registerPaymentCustomerAndCreateWorkspaceSubscription');async function changeCurrentUserDefaultPaymentMethod(_0x1fbdb5){if(!areEnvSettingsConfiguredForPaymentSystem())return apiNotFoundResponse(paymentErrorMessages['environmentSettingsForPaymentSystemAreNotConfigured']);const _0x146b8b=await getCurrentPaymentSystemCustomerId();if(!_0x146b8b)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);return await attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x146b8b,_0x1fbdb5),await setPaymentMethodAsDefault(_0x1fbdb5,_0x146b8b),apiNoContentResponse();}__name(changeCurrentUserDefaultPaymentMethod,'changeCurrentUserDefaultPaymentMethod');async function getCurrentDefaultPaymentMethod(){if(!areEnvSettingsConfiguredForPaymentSystem())return apiNotFoundResponse(paymentErrorMessages['environmentSettingsForPaymentSystemAreNotConfigured']);const _0x5ba73b=await getCurrentPaymentSystemCustomerId();if(!_0x5ba73b)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);const _0x152150=await getStripeDefaultPaymentMethod(_0x5ba73b);if(!_0x152150)throw apiNotFoundError(paymentErrorMessages['defaultPaymentMethodNotFound']);if(!_0x152150['card'])throw apiNotFoundError(paymentErrorMessages['cardAttachedToPaymentMethodNotFound']);const _0x2fdaf7={'brand':_0x152150['card']['brand'],'safeCardNumber':_0x152150['card']['last4'],'expMonth':_0x152150['card']['exp_month'],'expYear':_0x152150['card']['exp_year']};return apiOkResponse(_0x2fdaf7);}__name(getCurrentDefaultPaymentMethod,'getCurrentDefaultPaymentMethod');async function createTrialSubscription(_0x1ffaf0,_0x4faf4c,_0x15ee89){const _0x36a745=await getCurrentWorkspaceId(),_0x1c4033=await subscribeTrial(_0x1ffaf0,_0x4faf4c,_0x15ee89),_0x58cad8=await getActiveSubscriptionByWorkspaceId(_0x36a745);return _0x58cad8&&await changeSubscriptionStatus(_0x58cad8['id'],subscriptionStatuses['paused']),await updateWorkspacePricingId(_0x36a745,_0x1ffaf0),await storeTrialSubscription(_0x1c4033,_0x1ffaf0),apiCreatedResponse({'isPaymentCompleted':!![]});}__name(createTrialSubscription,'createTrialSubscription');async function createSubscriptionWithInstantPayment(_0x131212,_0x1eeb60,_0x2096be){const _0x4cf211=await getCurrentWorkspaceId(),{transactionId:_0x5a11cc,confirmedPaymentStatus:_0x3c103d,clientSecret:_0x366ed3,subscriptionId:_0x2318b8}=await subscribeAndPay(_0x131212,_0x1eeb60,_0x2096be);if(_0x3c103d===paymentStatus['requiresAction']&&_0x366ed3)return apiOkResponse({'isPaymentCompleted':![],'clientSecret':_0x366ed3,'subscriptionId':_0x2318b8});const _0x2be657=await getSubscriptionFromTransactionId(_0x5a11cc),_0x3698a5=await getActiveSubscriptionByWorkspaceId(_0x4cf211);return _0x3698a5&&await changeSubscriptionStatus(_0x3698a5['id'],subscriptionStatuses['paused']),await updateWorkspacePricingId(_0x4cf211,_0x131212),await storePaymentData(_0x5a11cc,_0x2be657,_0x131212),apiCreatedResponse({'isPaymentCompleted':!![]});}__name(createSubscriptionWithInstantPayment,'createSubscriptionWithInstantPayment');async function subscribeAndPay(_0x21a76d,_0x17a0b8,_0x1e1336){const {paymentSystemPriceId:_0x173e02}=await getResource({'resourceName':resourceNames['pricing'],'id':_0x21a76d},!![]);if(!_0x173e02)throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x4f8eef=await hasPaymentSystemSubscription(_0x1e1336,_0x173e02);if(_0x4f8eef)throw apiConflictError(paymentErrors['alreadyPaid']);const _0x68c4a7=await createPaymentSystemSubscription(_0x1e1336,_0x173e02,_0x17a0b8),_0x573847=await getInvoiceToPaySubscription(_0x68c4a7),{transactionId:_0x28c376,confirmedPaymentStatus:_0x560925,clientSecret:_0x23ce54}=await completePayment(_0x573847,_0x17a0b8,_0x68c4a7);return {'transactionId':_0x28c376,'confirmedPaymentStatus':_0x560925,'clientSecret':_0x23ce54,'subscriptionId':_0x68c4a7};}__name(subscribeAndPay,'subscribeAndPay');async function subscribeTrial(_0x440135,_0x208334,_0xa173c4){const {paymentSystemPriceId:_0x5f4436}=await getResource({'resourceName':resourceNames['pricing'],'id':_0x440135});if(!_0x5f4436)throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x10bb41=await hasPaymentSystemSubscription(_0xa173c4,_0x5f4436);if(_0x10bb41)throw apiConflictError(paymentErrors['alreadyPaid']);const _0x4b4ed9=await createPaymentSystemTrialSubscription(_0xa173c4,_0x5f4436,_0x208334);return _0x4b4ed9;}__name(subscribeTrial,'subscribeTrial');async function createPaymentSystemCustomer(_0x2d363d,_0x35d0b7){const _0x1a4548=await getCurrentWorkspaceId();if(isProd()){const _0x3facdd=await findStripeCustomerByEmail(_0x35d0b7);if(_0x3facdd)throw apiConflictError(paymentErrors['emailAlreadyUsed']['replace']('{0}',_0x35d0b7));}const _0x1347be=await createStripeCustomer(_0x2d363d,_0x35d0b7,_0x1a4548);if(!_0x1347be?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return await setWorkspacePaymentSystemId(_0x1347be['id']),_0x1347be['id'];}__name(createPaymentSystemCustomer,'createPaymentSystemCustomer');async function createPaymentSystemSubscription(_0x398886,_0x5049bf,_0x4fdad1){const _0x47b2f3=await createStripeSubscription(_0x398886,_0x5049bf,_0x4fdad1);if(!_0x47b2f3?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return _0x47b2f3['id'];}__name(createPaymentSystemSubscription,'createPaymentSystemSubscription');async function createPaymentSystemTrialSubscription(_0x35f392,_0x3f7a1f,_0x5141ef){const _0x3886b1=await createStripeTrialSubscription(_0x35f392,_0x3f7a1f,_0x5141ef);if(!_0x3886b1?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return _0x3886b1['id'];}__name(createPaymentSystemTrialSubscription,'createPaymentSystemTrialSubscription');async function getInvoiceToPaySubscription(_0x315011){const _0x3adfe0=await retrievePaymentIntentFromSubscription(_0x315011);if(!_0x3adfe0?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x359cf3=_0x3adfe0['id'];return _0x359cf3;}__name(getInvoiceToPaySubscription,'getInvoiceToPaySubscription');async function completePayment(_0x246694,_0x3036b7,_0x3073df){const _0x56d988=await confirmStripePayment(_0x246694,_0x3036b7,_0x3073df);return {'transactionId':_0x56d988['id'],'confirmedPaymentStatus':_0x56d988['status'],'clientSecret':_0x56d988['client_secret']};}__name(completePayment,'completePayment');async function hasPaymentSystemSubscription(_0x47952b,_0x41b8ad){return hasStripeSubscription(_0x47952b,_0x41b8ad);}__name(hasPaymentSystemSubscription,'hasPaymentSystemSubscription');async function getSubscriptionPeriodEndDate(_0x59f012){const {currentPeriodEndDate:_0x7c1c35}=await getStripeSubscriptionData(_0x59f012);return unixTimestampToDate(_0x7c1c35);}__name(getSubscriptionPeriodEndDate,'getSubscriptionPeriodEndDate');async function getSubscriptionTrialEndDate(_0x10879e){const {trialEnd:_0x2f9504}=await getStripeSubscriptionData(_0x10879e);if(!_0x2f9504)throw apiConflictError(paymentErrorMessages['trialSubscriptionDataNotFound']);return unixTimestampToDate(_0x2f9504);}__name(getSubscriptionTrialEndDate,'getSubscriptionTrialEndDate');async function getSubscriptionFromTransactionId(_0x2a31b2){const _0x3fdf7b=await getSubscriptionFromPaymentIntent(_0x2a31b2);return _0x3fdf7b;}__name(getSubscriptionFromTransactionId,'getSubscriptionFromTransactionId');async function storePaymentData(_0x13df79,_0x48a954,_0x5b5059){const _0xea7e76=new Subscription();_0xea7e76['pricingId']=_0x5b5059,_0xea7e76['status']=subscriptionStatuses['active'],_0xea7e76['paymentSystemSubscriptionId']=_0x48a954,_0xea7e76['currentPeriodStartDate']=getNow(),_0xea7e76['currentPeriodEndDate']=await getSubscriptionPeriodEndDate(_0x48a954);const _0x40aadd=await crudCreate({'userId':toolboxUserConstants['workerBotId'],'resourceName':resourceNames['subscription'],'resource':_0xea7e76,'throwOnNonSuccess':!![]}),{amount:_0x40e315,currency:_0x451bfd,paymentMethodId:_0x6efe9d}=await getAfterPaymentDetails(_0x13df79),_0x3942af=new Payment();_0x3942af['amount']=_0x40e315,_0x3942af['currency']=_0x451bfd,_0x3942af['paymentMethodId']=_0x6efe9d,_0x3942af['subscriptionId']=_0x40aadd['result']['id'],_0x3942af['paymentTransactionId']=_0x13df79,await crudCreate({'userId':toolboxUserConstants['workerBotId'],'resourceName':resourceNames['payment'],'resource':_0x3942af,'throwOnNonSuccess':!![]});}__name(storePaymentData,'storePaymentData');async function storeTrialSubscription(_0x1afd4d,_0x27603c){const _0x44dd72=new Subscription();_0x44dd72['pricingId']=_0x27603c,_0x44dd72['status']=subscriptionStatuses['trialing'],_0x44dd72['paymentSystemSubscriptionId']=_0x1afd4d,_0x44dd72['currentPeriodStartDate']=getNow(),_0x44dd72['currentPeriodEndDate']=await getSubscriptionTrialEndDate(_0x1afd4d),await crudCreate({'userId':await getUserId(),'resourceName':resourceNames['subscription'],'resource':_0x44dd72,'throwOnNonSuccess':!![]});}__name(storeTrialSubscription,'storeTrialSubscription');async function getAfterPaymentDetails(_0x5a7bda){const {amount:_0x2e2ea7,currency:_0x2b858e,paymentMethodId:_0x5cfd3f,status:_0x435b5c}=await getStripePaymentData(_0x5a7bda);if(_0x435b5c!==paymentStatus['succeeded'])throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x4e3aa8=getObjectValues(currencyCodes)['find'](_0x3f0a11=>_0x3f0a11===_0x2b858e['toUpperCase']());if(!_0x4e3aa8)throw apiBadRequestError(paymentErrors['paymentFailed']);if(!_0x5cfd3f||typeof _0x5cfd3f!=='string')throw apiBadRequestError(paymentErrors['paymentFailed']);return {'paymentMethodId':_0x5cfd3f,'amount':_0x2e2ea7,'currency':_0x4e3aa8};}__name(getAfterPaymentDetails,'getAfterPaymentDetails');async function cancelIncompleteSubscription(_0x546791){await cancelStripeSubscriptionById(_0x546791);}__name(cancelIncompleteSubscription,'cancelIncompleteSubscription');async function changePaymentSystemPlanName(_0x5b94dd,_0x43a04e){return changeStripeProductName(_0x5b94dd,_0x43a04e);}__name(changePaymentSystemPlanName,'changePaymentSystemPlanName');async function deactivatePaymentPlan(_0x528283){return deactivateStripeProduct(_0x528283);}__name(deactivatePaymentPlan,'deactivatePaymentPlan');async function changePaymentSystemPlanStatus(_0x37459c,_0x43dc55){return changeStripeProductStatus(_0x37459c,_0x43dc55);}__name(changePaymentSystemPlanStatus,'changePaymentSystemPlanStatus');async function getPaymentPlanIdByPriceId(_0x46dc9b){return getStripeProductIdByPriceId(_0x46dc9b);}__name(getPaymentPlanIdByPriceId,'getPaymentPlanIdByPriceId');async function getCurrentPaymentSystemCustomerId(){const _0x591924=await getCurrentWorkspace();return _0x591924['paymentSystemCustomerId'];}__name(getCurrentPaymentSystemCustomerId,'getCurrentPaymentSystemCustomerId');function detachPaymentMethod(_0x1aa51c){return stripe['paymentMethods']['detach'](_0x1aa51c);}__name(detachPaymentMethod,'detachPaymentMethod');async function setPaymentMethodAsDefault(_0x59c5d1,_0x32de1d){await setCustomerDefaultPaymentMethod(_0x59c5d1,_0x32de1d);}__name(setPaymentMethodAsDefault,'setPaymentMethodAsDefault');async function attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x43ff38,_0x7aec2b){await attachPaymentMethodToCustomer(_0x43ff38,_0x7aec2b),await updateCustomerEmailIfNeeded(_0x43ff38,_0x7aec2b);}__name(attachPaymentSystemPaymentMethodToPaymentSystemCustomer,'attachPaymentSystemPaymentMethodToPaymentSystemCustomer');
|
|
26
26
|
|
|
27
27
|
export { cancelIncompleteSubscription, changeCurrentUserDefaultPaymentMethod, changePaymentSystemPlanName, changePaymentSystemPlanStatus, completePayment, createPaymentSystemCustomer, createPaymentSystemSubscription, createPaymentSystemTrialSubscription, createSubscriptionWithInstantPayment, createTrialSubscription, deactivatePaymentPlan, detachPaymentMethod, getAfterPaymentDetails, getCurrentDefaultPaymentMethod, getCurrentPaymentSystemCustomerId, getInvoiceToPaySubscription, getPaymentPlanIdByPriceId, getSubscriptionFromTransactionId, getSubscriptionPeriodEndDate, getSubscriptionTrialEndDate, hasPaymentSystemSubscription, registerPaymentCustomerAndCreateWorkspaceSubscription, storePaymentData, storeTrialSubscription, subscribeAndPay, subscribeTrial };
|
|
@@ -6,6 +6,6 @@ import { resourceNames } from '../../../../fd-toolbox/resources/resource-names.j
|
|
|
6
6
|
import { currencyCodes } from '../../../../fd-toolbox/constants/currency-constants.js';
|
|
7
7
|
import { createResource } from '../../../meta/server/resources/crud-resources.js';
|
|
8
8
|
|
|
9
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
9
|
+
var __defProp=Object['defineProperty'],__name=(_0x344319,_0x59c75d)=>__defProp(_0x344319,'name',{'value':_0x59c75d,'configurable':!![]});const monthsPerYear=-0x12*0x21+0x6b0+-0x452;async function seedPricings(){await seedMonthlyPricings(),await seedAnnualPricings();}__name(seedPricings,'seedPricings');async function seedPricing(_0x1cd0e6,_0x21c791,_0x424dad,_0xb3f2d4,_0x44819c){const _0x3f6103={...createBaseResourceProperties(_0x1cd0e6),'paymentPlanId':_0x21c791,'price':_0x424dad,'currency':_0xb3f2d4,'billingInterval':_0x44819c};return createResource(_0x3f6103,resourceNames['pricing']);}__name(seedPricing,'seedPricing');async function seedMonthlyPricings(){await seedPricing(pricingIds['thirdId'],paymentPlanIds['thirdId'],paymentPlanPrices['thirdPrice'],currencyCodes['usd'],billingIntervals['month']),await seedPricing(pricingIds['advancedId'],paymentPlanIds['advancedId'],paymentPlanPrices['basicPrice'],currencyCodes['usd'],billingIntervals['month']),await seedPricing(pricingIds['basicId'],paymentPlanIds['basicId'],paymentPlanPrices['basicPrice'],currencyCodes['usd'],billingIntervals['month']);}__name(seedMonthlyPricings,'seedMonthlyPricings');async function seedAnnualPricings(){await seedPricing(pricingIds['thirdAnnualId'],paymentPlanIds['thirdId'],paymentPlanPrices['thirdPrice']*monthsPerYear,currencyCodes['usd'],billingIntervals['year']),await seedPricing(pricingIds['advancedAnnualId'],paymentPlanIds['advancedId'],paymentPlanPrices['basicPrice'],currencyCodes['usd'],billingIntervals['year']);}__name(seedAnnualPricings,'seedAnnualPricings');
|
|
10
10
|
|
|
11
11
|
export { seedPricing, seedPricings };
|
|
@@ -5,6 +5,6 @@ import { createStripeProductPricing, deactivateStripeProductPricing } from './st
|
|
|
5
5
|
import { createError } from '../../../fd-toolbox/errors/errors.js';
|
|
6
6
|
import { paymentErrorMessages } from '../../common/payments/payment-constants.js';
|
|
7
7
|
|
|
8
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
8
|
+
var __defProp=Object['defineProperty'],__name=(_0x220ea8,_0x586fd5)=>__defProp(_0x220ea8,'name',{'value':_0x586fd5,'configurable':!![]});async function preUpdate(_0x3a8f90){const _0x5ebc12=_0x3a8f90['modifiedResource'],_0x2c768e=_0x3a8f90['originalResource'],_0x5f4fc0=_0x3a8f90['crudUpdateConfig'],_0x5a3477=await getResource({'resourceName':resourceNames['paymentPlan'],'id':_0x5ebc12['paymentPlanId']});if(_0x5a3477['paymentSystemId']){if(_0x5f4fc0['isCreate']){const _0x585143=await createStripeProductPricing(_0x5a3477['paymentSystemId'],_0x5ebc12['currency'],_0x5ebc12['price'],_0x5ebc12['id'],_0x5ebc12['billingInterval']);_0x5ebc12['paymentSystemPriceId']=_0x585143['id'];return;}const _0x3e313a=_0x5ebc12['currency'],_0x134dc9=_0x2c768e?.['currency'],_0x1c9349=_0x5ebc12['price'],_0x1fa66a=_0x2c768e?.['price'];if(_0x3e313a===_0x134dc9&&_0x1c9349===_0x1fa66a)return;try{if(_0x2c768e?.['paymentSystemPriceId']&&(_0x3e313a!==_0x134dc9||_0x1c9349!==_0x1fa66a)){await deactivateStripeProductPricing(_0x2c768e['paymentSystemPriceId']);const _0x22598c=await createStripeProductPricing(_0x5a3477['paymentSystemId'],_0x5ebc12['currency'],_0x5ebc12['price'],_0x5ebc12['id'],_0x5ebc12['billingInterval']);_0x5ebc12['paymentSystemPriceId']=_0x22598c['id'];}}catch{createError(paymentErrorMessages['errorWhileEditingPrice']);}}}__name(preUpdate,'preUpdate');async function afterDelete(_0x76aeac){return _0x76aeac['deleteResource']['paymentSystemPriceId']?deactivateStripeProductPricing(_0x76aeac['deleteResource']['paymentSystemPriceId']):createError(paymentErrorMessages['noPaymentSystemIdAttachedToPricing']);}__name(afterDelete,'afterDelete');
|
|
9
9
|
|
|
10
10
|
export { afterDelete as afterDeletePricing, preUpdate as preUpdatePricing };
|
|
@@ -5,8 +5,8 @@ import { stripe, createStripeProduct, createStripeProductPricing } from './strip
|
|
|
5
5
|
import { pricingProps } from '../../../meta/core/resources/props/payment-plan-price-props.js';
|
|
6
6
|
import { logWarning } from '../../../../fd-toolbox/server/logging/logger.js';
|
|
7
7
|
import { stripeAuthenticationError } from './stripe-messages.js';
|
|
8
|
-
import
|
|
8
|
+
import _0x2b5aae from 'stripe';
|
|
9
9
|
|
|
10
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
10
|
+
var __defProp=Object['defineProperty'],__name=(_0x53e255,_0x57477e)=>__defProp(_0x53e255,'name',{'value':_0x57477e,'configurable':!![]});async function syncPaymentPlansWithStripeAfterSeeding(){const _0x378d14=await getResourcesByName(resourceNames['paymentPlan']),_0x333110=await stripe['products']['list']({'limit':0x64,'active':!![]});for(const _0x2e9f27 of _0x378d14){let _0x268c4b=_0x333110['data']['find'](_0x3f6ebc=>_0x3f6ebc['metadata']&&_0x3f6ebc['metadata'][pricingProps['paymentPlanId']]===_0x2e9f27['id']);_0x268c4b??=await createStripeProduct(_0x2e9f27['name'],_0x2e9f27['id']),_0x2e9f27['paymentSystemId']!==_0x268c4b['id']&&await updateResource({'id':_0x2e9f27['id'],'paymentSystemId':_0x268c4b['id']},resourceNames['paymentPlan']);}}__name(syncPaymentPlansWithStripeAfterSeeding,'syncPaymentPlansWithStripeAfterSeeding');async function syncPricingsWithStripeAfterSeeding(){const _0x189d9e=await getResourcesByName(resourceNames['pricing']),_0x21b181=await stripe['products']['list']({'limit':0x64,'active':!![]}),_0x8ef3c8=await stripe['prices']['list']({'limit':0x64,'active':!![]});for(const _0x2472ff of _0x189d9e){const _0x12f1e3=_0x8ef3c8['data']['find'](_0x42f3ad=>_0x42f3ad['metadata']&&_0x42f3ad['metadata'][pricingProps['id']]===_0x2472ff['id']);if(_0x12f1e3)_0x2472ff['paymentSystemPriceId']!==_0x12f1e3['id']&&await updateResource({'id':_0x2472ff['id'],'paymentSystemPriceId':_0x12f1e3['id']},resourceNames['pricing']);else {let _0x36d494=_0x21b181['data']['find'](_0x1417e4=>_0x1417e4['metadata']&&_0x1417e4['metadata'][pricingProps['paymentPlanId']]===_0x2472ff['paymentPlanId']);const _0x214bda=await createStripeProductPricing(_0x36d494['id'],_0x2472ff['currency'],_0x2472ff['price'],_0x2472ff['id'],_0x2472ff['billingInterval'],![]);await updateResource({'id':_0x2472ff['id'],'paymentSystemPriceId':_0x214bda['id']},resourceNames['pricing']);}}}__name(syncPricingsWithStripeAfterSeeding,'syncPricingsWithStripeAfterSeeding');async function syncPaymentPlansAndPricesAfterSeeding(){try{await syncPaymentPlansWithStripeAfterSeeding(),await syncPricingsWithStripeAfterSeeding();}catch(_0x2a6215){if(_0x2a6215 instanceof _0x2b5aae['errors']['StripeAuthenticationError']){logWarning(stripeAuthenticationError);return;}throw _0x2a6215;}}__name(syncPaymentPlansAndPricesAfterSeeding,'syncPaymentPlansAndPricesAfterSeeding');
|
|
11
11
|
|
|
12
12
|
export { syncPaymentPlansAndPricesAfterSeeding, syncPaymentPlansWithStripeAfterSeeding, syncPricingsWithStripeAfterSeeding };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
import
|
|
2
|
+
import _0x2b5aae from 'stripe';
|
|
3
3
|
import { apiBadRequestError } from '../../../../fd-toolbox/server/web/errors.js';
|
|
4
4
|
import { getNow, unixTimestampToDate } from '../../../../fd-toolbox/time/date-time.js';
|
|
5
5
|
import { logSeverities } from '../../../../fd-toolbox-core/enums/log-severities.js';
|
|
@@ -13,6 +13,6 @@ import { billingIntervals } from '../../../meta/core/resources/enums/payment-enu
|
|
|
13
13
|
import { detachPaymentMethod } from '../payments/payments.js';
|
|
14
14
|
import { isNullOrUndefined } from '../../../../fd-toolbox/functions/value-checking-functions.js';
|
|
15
15
|
|
|
16
|
-
var __defProp=Object['defineProperty'],__name=(_0x28be6c,_0x249900)=>__defProp(_0x28be6c,'name',{'value':_0x249900,'configurable':!![]});const stripeKey=getStringEnvSetting(envSettingKeys['stripeSecretKey']),centsInADollar=-0x4a6+-0x1d58+-0x1*-0x2262;const stripe=new _0xf98359(stripeKey,{'apiVersion':'2024-06-20'});function areEnvSettingsConfiguredForPaymentSystem(){return !!stripeKey;}__name(areEnvSettingsConfiguredForPaymentSystem,'areEnvSettingsConfiguredForPaymentSystem');async function findStripeCustomerById(_0x2bb3ac){return stripe['customers']['retrieve'](_0x2bb3ac);}__name(findStripeCustomerById,'findStripeCustomerById');async function findStripeCustomerByEmail(_0x3f9af1){const _0x51264b=await stripe['customers']['list']({'email':_0x3f9af1}),_0x381c19=_0x51264b['data'];return _0x381c19['length']>-0x2263*0x1+0x25c4+-0x361?_0x381c19[-0x1*-0x5f2+0x1b1e+-0x2110]:void(-0x1942*0x1+-0x2420+0x1476*0x3);}__name(findStripeCustomerByEmail,'findStripeCustomerByEmail');async function createStripeCustomer(_0x10024a,_0x3d6fab,_0x4895eb){return stripe['customers']['create']({'email':_0x3d6fab,'name':_0x10024a,'metadata':{'workspaceId':_0x4895eb}});}__name(createStripeCustomer,'createStripeCustomer');async function hasStripeSubscription(_0x23313d,_0x25c1d1){const _0x2fddd4=await stripe['subscriptions']['list']({'customer':_0x23313d});return _0x2fddd4['data']['some'](_0x49b720=>_0x49b720?.['items']?.['data']['some'](_0x3699d2=>_0x3699d2['plan']['id']===_0x25c1d1));}__name(hasStripeSubscription,'hasStripeSubscription');async function createStripeSubscription(_0x23fadd,_0x57dfe8,_0x5dda27){return stripe['subscriptions']['create']({'customer':_0x23fadd,'items':[{'price':_0x57dfe8}],'payment_behavior':'default_incomplete','expand':['latest_invoice.payment_intent'],'default_payment_method':_0x5dda27});}__name(createStripeSubscription,'createStripeSubscription');async function createStripeTrialSubscription(_0x294631,_0x4918aa,_0xb549a8){return stripe['subscriptions']['create']({'customer':_0x294631,'items':[{'price':_0x4918aa}],'payment_behavior':'default_incomplete','trial_period_days':0x1e,'trial_settings':{'end_behavior':{'missing_payment_method':'create_invoice'}},'default_payment_method':_0xb549a8});}__name(createStripeTrialSubscription,'createStripeTrialSubscription');async function updateCustomerEmailIfNeeded(_0x1604e9,_0x4bff78){const _0x49fb1b=await findStripeCustomerById(_0x1604e9),_0x31af39=await stripe['paymentMethods']['retrieve'](_0x4bff78);!_0x49fb1b['deleted']&&_0x31af39['billing_details']['email']&&_0x49fb1b['email']!==_0x31af39['billing_details']['email']&&await changeCustomerEmail(_0x1604e9,_0x31af39['billing_details']['email']);}__name(updateCustomerEmailIfNeeded,'updateCustomerEmailIfNeeded');async function attachPaymentMethodToCustomer(_0x3360da,_0x4d04a4){await detachAllPaymentMethodsFromCustomer(_0x3360da),await stripe['paymentMethods']['attach'](_0x4d04a4,{'customer':_0x3360da});}__name(attachPaymentMethodToCustomer,'attachPaymentMethodToCustomer');async function retrievePaymentIntentFromSubscription(_0x1e8d81){const _0x52bce5=await stripe['subscriptions']['retrieve'](_0x1e8d81,{'expand':['latest_invoice.payment_intent']}),_0xd4f80c=_0x52bce5['latest_invoice'];if(typeof _0xd4f80c==='object'&&!isNullOrUndefined(_0xd4f80c)){const _0x35e994=_0xd4f80c;if(_0x35e994['payment_intent']&&typeof _0x35e994['payment_intent']!=='string')return _0x35e994['payment_intent'];else throw apiBadRequestError(stripeErrorConstants['paymentIntentError']);}if(typeof _0xd4f80c==='string'){const _0x541540=await stripe['invoices']['retrieve'](_0xd4f80c,{'expand':['payment_intent']});if(_0x541540['payment_intent']&&typeof _0x541540['payment_intent']!=='string')return _0x541540['payment_intent'];else throw apiBadRequestError(stripeErrorConstants['paymentIntentError']);}throw apiBadRequestError(stripeErrorConstants['noLatestInvoice']);}__name(retrievePaymentIntentFromSubscription,'retrievePaymentIntentFromSubscription');async function confirmStripePayment(_0x1e5fd2,_0x18defb,_0x4faafe){try{return await stripe['paymentIntents']['confirm'](_0x1e5fd2,{'payment_method':_0x18defb});}catch(_0x4e476e){await cancelStripeSubscriptionById(_0x4faafe);throw _0x4e476e;}}__name(confirmStripePayment,'confirmStripePayment');async function cancelStripeSubscription(_0x328186){const _0x3f0de6=await stripe['subscriptions']['retrieve'](_0x328186),_0x45de30=getNow(),_0x43ff99=unixTimestampToDate(_0x3f0de6['current_period_end']),_0x31d870=_0x3f0de6['status']===stripeSubscriptionStatuses['active'],_0x24bfee=_0x31d870&&_0x43ff99>_0x45de30;let _0x3f79ab;return _0x24bfee?_0x3f79ab=await stripe['subscriptions']['update'](_0x328186,{'cancel_at_period_end':!![]}):_0x3f79ab=await stripe['subscriptions']['cancel'](_0x328186),{'subscriptionId':_0x3f79ab['id'],'subscriptionStatus':_0x3f79ab['status'],'currentPeriodEndDate':_0x3f79ab['current_period_end'],'endDate':_0x24bfee?_0x3f79ab['cancel_at']:_0x3f79ab['canceled_at']};}__name(cancelStripeSubscription,'cancelStripeSubscription');async function instantUpdateStripeSubscription(_0x21b018,_0x50c7d3){const _0x3bd332=await stripe['subscriptions']['retrieve'](_0x21b018);return stripe['subscriptions']['update'](_0x3bd332['id'],{'items':[{'id':_0x3bd332['items']['data'][0x1ab9+-0x2*0xe28+0x197]['id'],'price':_0x50c7d3}],'proration_behavior':'always_invoice'});}__name(instantUpdateStripeSubscription,'instantUpdateStripeSubscription');async function updateStripeSubscriptionWithoutProration(_0x3c4937,_0x3d3cd6){const _0x23ec50=await stripe['subscriptions']['retrieve'](_0x3c4937);return stripe['subscriptions']['update'](_0x23ec50['id'],{'items':[{'id':_0x23ec50['items']['data'][0x1*-0x1efc+-0x239e+0x429a]['id'],'price':_0x3d3cd6}],'proration_behavior':'none','billing_cycle_anchor':'unchanged'});}__name(updateStripeSubscriptionWithoutProration,'updateStripeSubscriptionWithoutProration');async function getSubscriptionFromPaymentIntent(_0x1f42fd){const _0x3fb293=await stripe['paymentIntents']['retrieve'](_0x1f42fd);if(_0x3fb293['invoice']&&typeof _0x3fb293['invoice']==='string'){const _0x4a0c16=await stripe['invoices']['retrieve'](_0x3fb293['invoice']);if(_0x4a0c16['subscription']&&typeof _0x4a0c16['subscription']==='string'){const _0x4973d3=await stripe['subscriptions']['retrieve'](_0x4a0c16['subscription']);return _0x4973d3['id'];}}throw createError(stripeErrorConstants['noAssociatedSubscription']);}__name(getSubscriptionFromPaymentIntent,'getSubscriptionFromPaymentIntent');async function getStripeSubscriptionData(_0x1d422b){const _0x57d6f5=await stripe['subscriptions']['retrieve'](_0x1d422b),{status:_0x89aa9,current_period_end:_0x428de4,canceled_at:_0x5ef73b,trial_end:_0x933cd1}=_0x57d6f5;return {'status':_0x89aa9,'currentPeriodEndDate':_0x428de4,'endDate':_0x5ef73b??void(-0x17*-0xe1+-0x7b*-0x31+0x3*-0xe96),'trialEnd':_0x933cd1};}__name(getStripeSubscriptionData,'getStripeSubscriptionData');async function cancelStripeSubscriptionById(_0xa60115){return stripe['subscriptions']['cancel'](_0xa60115);}__name(cancelStripeSubscriptionById,'cancelStripeSubscriptionById');async function processPaymentFailureAndCancelSubscription(_0x5dc40e){const _0x5b2f85=_0x5dc40e['payment_intent']?.['invoice'];if(!_0x5b2f85||typeof _0x5b2f85!=='string')return;const _0x193790=await stripe['invoices']['retrieve'](_0x5b2f85),_0x3f36dd=_0x193790['subscription'];_0x3f36dd&&typeof _0x3f36dd==='string'&&await stripe['subscriptions']['cancel'](_0x3f36dd);}__name(processPaymentFailureAndCancelSubscription,'processPaymentFailureAndCancelSubscription');async function getStripePaymentData(_0x184d4f){const {currency:_0xc4b919,status:_0x15b9f2,amount:_0x47ec8d,payment_method:_0x4c3c0b}=await stripe['paymentIntents']['retrieve'](_0x184d4f);return {'currency':_0xc4b919,'status':_0x15b9f2,'amount':_0x47ec8d,'paymentMethodId':_0x4c3c0b};}__name(getStripePaymentData,'getStripePaymentData');async function getStripeSubscriptionStatus(_0x538a95){try{const _0x15db69=await stripe['subscriptions']['retrieve'](_0x538a95);return _0x15db69['status'];}catch(_0xbb21c5){if(_0xbb21c5 instanceof Error){const _0x35066b={'severity':logSeverities['warning'],'message':_0xbb21c5 instanceof _0xf98359['errors']['StripeError']?_0xbb21c5['type']:_0xbb21c5['name'],'errorMessage':_0xbb21c5['message'],'stackTrace':_0xbb21c5['stack']};addLog(_0x35066b);}return void(-0x20a3+0x1*0x656+0x1a4d);}}__name(getStripeSubscriptionStatus,'getStripeSubscriptionStatus');async function changeStripeProductName(_0x50cc3d,_0x5d009e){return stripe['products']['update'](_0x50cc3d,{'name':_0x5d009e});}__name(changeStripeProductName,'changeStripeProductName');async function changeStripeProductStatus(_0x53130a,_0x22740a){return stripe['products']['update'](_0x53130a,{'active':_0x22740a});}__name(changeStripeProductStatus,'changeStripeProductStatus');async function createStripeProductPricing(_0x13e733,_0x10fa67,_0x27e02c,_0x2ccfac,_0x5629ff,_0x3ea2b7=!![]){const _0x1fd29f=_0x3ea2b7?_0x27e02c*centsInADollar:_0x27e02c;return !_0x5629ff||_0x5629ff===billingIntervals['lifetime']?stripe['prices']['create']({'currency':_0x10fa67,'unit_amount':_0x1fd29f,'product':_0x13e733,'metadata':{'id':_0x2ccfac}}):stripe['prices']['create']({'currency':_0x10fa67,'unit_amount':_0x1fd29f,'product':_0x13e733,'metadata':{'id':_0x2ccfac},'recurring':{'interval':billingIntervalsToStripeBillingIntervals[_0x5629ff]}});}__name(createStripeProductPricing,'createStripeProductPricing');async function deactivateStripeProductPricing(_0x4468d8){return stripe['prices']['update'](_0x4468d8,{'active':![]});}__name(deactivateStripeProductPricing,'deactivateStripeProductPricing');async function createStripeProduct(_0x372f32,_0x5c8f24){const _0x2a1c82=await stripe['products']['create']({'name':_0x372f32,'metadata':{'paymentPlanId':_0x5c8f24}});return _0x2a1c82;}__name(createStripeProduct,'createStripeProduct');async function deactivateStripeProduct(_0x30def7){const _0x5b0c0c=await stripe['products']['list'](),_0x1dbf54=_0x5b0c0c['data']['filter'](_0x5e82b6=>{return _0x5e82b6['name']===_0x30def7;});for(const _0xb41641 of _0x1dbf54){await stripe['products']['update'](_0xb41641['id'],{'active':![]});}}__name(deactivateStripeProduct,'deactivateStripeProduct');async function getStripeProducts(){const _0x3cbe1d=await stripe['products']['list']();return _0x3cbe1d['data'];}__name(getStripeProducts,'getStripeProducts');async function getStripeProductIdByPriceId(_0x292218){const {product:_0x2d879f}=await stripe['prices']['retrieve'](_0x292218);return isString(_0x2d879f)?_0x2d879f:_0x2d879f['id'];}__name(getStripeProductIdByPriceId,'getStripeProductIdByPriceId');async function setCustomerDefaultPaymentMethod(_0x33db92,_0x3a434e){await stripe['customers']['update'](_0x3a434e,{'invoice_settings':{'default_payment_method':_0x33db92}});}__name(setCustomerDefaultPaymentMethod,'setCustomerDefaultPaymentMethod');async function changeCustomerEmail(_0x18771a,_0x235dff){await stripe['customers']['update'](_0x18771a,{'email':_0x235dff});}__name(changeCustomerEmail,'changeCustomerEmail');async function getStripeDefaultPaymentMethod(_0x1d35a0){const _0x4e8d1f=await findStripeCustomerById(_0x1d35a0);if(_0x4e8d1f['deleted']||!_0x4e8d1f['invoice_settings']['default_payment_method'])return void(0xd1*-0x15+0xf67*0x1+0x1be);const _0x4ed022=isString(_0x4e8d1f['invoice_settings']['default_payment_method'])?_0x4e8d1f['invoice_settings']['default_payment_method']:_0x4e8d1f['invoice_settings']['default_payment_method']['id'],_0x4d4a15=await stripe['paymentMethods']['retrieve'](_0x4ed022);return _0x4d4a15;}__name(getStripeDefaultPaymentMethod,'getStripeDefaultPaymentMethod');async function detachAllPaymentMethodsFromCustomer(_0x2250af){const _0x5511f2=await stripe['customers']['listPaymentMethods'](_0x2250af),_0x34517f=_0x5511f2['data']['map'](_0x2463ac=>_0x2463ac['id']);await Promise['all'](_0x34517f['map'](detachPaymentMethod));}__name(detachAllPaymentMethodsFromCustomer,'detachAllPaymentMethodsFromCustomer');
|
|
16
|
+
var __defProp=Object['defineProperty'],__name=(_0x49f41b,_0x253054)=>__defProp(_0x49f41b,'name',{'value':_0x253054,'configurable':!![]});const stripeKey=getStringEnvSetting(envSettingKeys['stripeSecretKey']),centsInADollar=0x182f*0x1+-0x17f5+0x2a;const stripe=new _0x2b5aae(stripeKey,{'apiVersion':'2024-06-20'});function areEnvSettingsConfiguredForPaymentSystem(){return !!stripeKey;}__name(areEnvSettingsConfiguredForPaymentSystem,'areEnvSettingsConfiguredForPaymentSystem');async function findStripeCustomerById(_0x32bdea){return stripe['customers']['retrieve'](_0x32bdea);}__name(findStripeCustomerById,'findStripeCustomerById');async function findStripeCustomerByEmail(_0x213562){const _0x53e3db=await stripe['customers']['list']({'email':_0x213562});return _0x53e3db['data']['length']>0x7f1+0x190+0x981*-0x1?_0x53e3db['data'][0x40*0x51+0x31*0x62+-0x2702]:void(-0x2625+-0x8*-0x4c0+0x25);}__name(findStripeCustomerByEmail,'findStripeCustomerByEmail');async function createStripeCustomer(_0x4532ee,_0x376100,_0x29cbc3){return stripe['customers']['create']({'email':_0x376100,'name':_0x4532ee,'metadata':{'workspaceId':_0x29cbc3}});}__name(createStripeCustomer,'createStripeCustomer');async function hasStripeSubscription(_0x27b114,_0x423cf2){const _0x44ea13=await stripe['subscriptions']['list']({'customer':_0x27b114});return _0x44ea13['data']['some'](_0x389fde=>_0x389fde?.['items']?.['data']['some'](_0x19daab=>_0x19daab['plan']['id']===_0x423cf2));}__name(hasStripeSubscription,'hasStripeSubscription');async function createStripeSubscription(_0x328587,_0x142633,_0x556578){return stripe['subscriptions']['create']({'customer':_0x328587,'items':[{'price':_0x142633}],'payment_behavior':'default_incomplete','expand':['latest_invoice.payment_intent'],'default_payment_method':_0x556578});}__name(createStripeSubscription,'createStripeSubscription');async function createStripeTrialSubscription(_0x18f80f,_0x4a9685,_0x151a87){return stripe['subscriptions']['create']({'customer':_0x18f80f,'items':[{'price':_0x4a9685}],'payment_behavior':'default_incomplete','trial_period_days':0x1e,'trial_settings':{'end_behavior':{'missing_payment_method':'create_invoice'}},'default_payment_method':_0x151a87});}__name(createStripeTrialSubscription,'createStripeTrialSubscription');async function updateCustomerEmailIfNeeded(_0x38e601,_0x25ae15){const _0x55b95d=await findStripeCustomerById(_0x38e601),_0x6284d4=await stripe['paymentMethods']['retrieve'](_0x25ae15);!_0x55b95d['deleted']&&_0x6284d4['billing_details']['email']&&_0x55b95d['email']!==_0x6284d4['billing_details']['email']&&await changeCustomerEmail(_0x38e601,_0x6284d4['billing_details']['email']);}__name(updateCustomerEmailIfNeeded,'updateCustomerEmailIfNeeded');async function attachPaymentMethodToCustomer(_0x2b8cff,_0x187c90){await detachAllPaymentMethodsFromCustomer(_0x2b8cff),await stripe['paymentMethods']['attach'](_0x187c90,{'customer':_0x2b8cff});}__name(attachPaymentMethodToCustomer,'attachPaymentMethodToCustomer');async function retrievePaymentIntentFromSubscription(_0x211b86){const _0x4389bf=await stripe['subscriptions']['retrieve'](_0x211b86,{'expand':['latest_invoice.payment_intent']}),_0x3a6c86=_0x4389bf['latest_invoice'];if(typeof _0x3a6c86==='object'&&!isNullOrUndefined(_0x3a6c86)){const _0xe42f78=_0x3a6c86;if(_0xe42f78['payment_intent']&&typeof _0xe42f78['payment_intent']!=='string')return _0xe42f78['payment_intent'];else throw apiBadRequestError(stripeErrorConstants['paymentIntentError']);}if(typeof _0x3a6c86==='string'){const _0xf89dbb=await stripe['invoices']['retrieve'](_0x3a6c86,{'expand':['payment_intent']});if(_0xf89dbb['payment_intent']&&typeof _0xf89dbb['payment_intent']!=='string')return _0xf89dbb['payment_intent'];else throw apiBadRequestError(stripeErrorConstants['paymentIntentError']);}throw apiBadRequestError(stripeErrorConstants['noLatestInvoice']);}__name(retrievePaymentIntentFromSubscription,'retrievePaymentIntentFromSubscription');async function confirmStripePayment(_0x41baf5,_0xca99fb,_0x2669ec){try{return await stripe['paymentIntents']['confirm'](_0x41baf5,{'payment_method':_0xca99fb});}catch(_0x30f237){await cancelStripeSubscriptionById(_0x2669ec);throw _0x30f237;}}__name(confirmStripePayment,'confirmStripePayment');async function cancelStripeSubscription(_0x1c3b3a){const _0x456c47=await stripe['subscriptions']['retrieve'](_0x1c3b3a),_0x1ede68=getNow(),_0x6c337d=unixTimestampToDate(_0x456c47['current_period_end']),_0x4b8868=_0x456c47['status']===stripeSubscriptionStatuses['active'],_0x1f91df=_0x4b8868&&_0x6c337d>_0x1ede68;let _0x28b82e;return _0x1f91df?_0x28b82e=await stripe['subscriptions']['update'](_0x1c3b3a,{'cancel_at_period_end':!![]}):_0x28b82e=await stripe['subscriptions']['cancel'](_0x1c3b3a),{'subscriptionId':_0x28b82e['id'],'subscriptionStatus':_0x28b82e['status'],'currentPeriodEndDate':_0x28b82e['current_period_end'],'endDate':_0x1f91df?_0x28b82e['cancel_at']:_0x28b82e['canceled_at']};}__name(cancelStripeSubscription,'cancelStripeSubscription');async function instantUpdateStripeSubscription(_0x464002,_0x484a38){const _0x38ac6f=await stripe['subscriptions']['retrieve'](_0x464002);return stripe['subscriptions']['update'](_0x38ac6f['id'],{'items':[{'id':_0x38ac6f['items']['data'][0x151*0x5+0x1315+-0x88e*0x3]['id'],'price':_0x484a38}],'proration_behavior':'always_invoice'});}__name(instantUpdateStripeSubscription,'instantUpdateStripeSubscription');async function updateStripeSubscriptionWithoutProration(_0x1bd407,_0x4f8d67){const _0x3db968=await stripe['subscriptions']['retrieve'](_0x1bd407);return stripe['subscriptions']['update'](_0x3db968['id'],{'items':[{'id':_0x3db968['items']['data'][-0x1*-0x21f8+-0x4da+0x1d1e*-0x1]['id'],'price':_0x4f8d67}],'proration_behavior':'none','billing_cycle_anchor':'unchanged'});}__name(updateStripeSubscriptionWithoutProration,'updateStripeSubscriptionWithoutProration');async function getSubscriptionFromPaymentIntent(_0x3addd9){const _0x670f1a=await stripe['paymentIntents']['retrieve'](_0x3addd9);if(_0x670f1a['invoice']&&typeof _0x670f1a['invoice']==='string'){const _0x40d3c8=await stripe['invoices']['retrieve'](_0x670f1a['invoice']);if(_0x40d3c8['subscription']&&typeof _0x40d3c8['subscription']==='string'){const _0x5d8d89=await stripe['subscriptions']['retrieve'](_0x40d3c8['subscription']);return _0x5d8d89['id'];}}throw createError(stripeErrorConstants['noAssociatedSubscription']);}__name(getSubscriptionFromPaymentIntent,'getSubscriptionFromPaymentIntent');async function getStripeSubscriptionData(_0x725b6d){const _0x52e208=await stripe['subscriptions']['retrieve'](_0x725b6d);return {'status':_0x52e208['status'],'currentPeriodEndDate':_0x52e208['current_period_end'],'endDate':_0x52e208['canceled_at']??void(0x148e+0x1208+0x16*-0x1c1),'trialEnd':_0x52e208['trial_end']};}__name(getStripeSubscriptionData,'getStripeSubscriptionData');async function cancelStripeSubscriptionById(_0x540098){return stripe['subscriptions']['cancel'](_0x540098);}__name(cancelStripeSubscriptionById,'cancelStripeSubscriptionById');async function processPaymentFailureAndCancelSubscription(_0xab9746){const _0x22c922=_0xab9746['payment_intent']?.['invoice'];if(!_0x22c922||typeof _0x22c922!=='string')return;const _0x20e165=await stripe['invoices']['retrieve'](_0x22c922),_0x11dad6=_0x20e165['subscription'];_0x11dad6&&typeof _0x11dad6==='string'&&await stripe['subscriptions']['cancel'](_0x11dad6);}__name(processPaymentFailureAndCancelSubscription,'processPaymentFailureAndCancelSubscription');async function getStripePaymentData(_0x140526){const {currency:_0x4ed9e3,status:_0x477c8b,amount:_0x2a45e6,payment_method:_0x2a5d19}=await stripe['paymentIntents']['retrieve'](_0x140526);return {'currency':_0x4ed9e3,'status':_0x477c8b,'amount':_0x2a45e6,'paymentMethodId':_0x2a5d19};}__name(getStripePaymentData,'getStripePaymentData');async function getStripeSubscriptionStatus(_0x2a55b4){try{const _0x227cf5=await stripe['subscriptions']['retrieve'](_0x2a55b4);return _0x227cf5['status'];}catch(_0x131294){if(_0x131294 instanceof Error){const _0x386131={'severity':logSeverities['warning'],'message':_0x131294 instanceof _0x2b5aae['errors']['StripeError']?_0x131294['type']:_0x131294['name'],'errorMessage':_0x131294['message'],'stackTrace':_0x131294['stack']};addLog(_0x386131);}return void(-0x1*-0x62b+0x1c1+-0x7ec);}}__name(getStripeSubscriptionStatus,'getStripeSubscriptionStatus');async function changeStripeProductName(_0x402ba1,_0x24e267){return stripe['products']['update'](_0x402ba1,{'name':_0x24e267});}__name(changeStripeProductName,'changeStripeProductName');async function changeStripeProductStatus(_0x2818d3,_0x251907){return stripe['products']['update'](_0x2818d3,{'active':_0x251907});}__name(changeStripeProductStatus,'changeStripeProductStatus');async function createStripeProductPricing(_0x35430f,_0x5532f1,_0xa7dafd,_0xab9d42,_0x2231a1,_0x1b5a4c=!![]){const _0x35273f=_0x1b5a4c?_0xa7dafd*centsInADollar:_0xa7dafd;return !_0x2231a1||_0x2231a1===billingIntervals['lifetime']?stripe['prices']['create']({'currency':_0x5532f1,'unit_amount':_0x35273f,'product':_0x35430f,'metadata':{'id':_0xab9d42}}):stripe['prices']['create']({'currency':_0x5532f1,'unit_amount':_0x35273f,'product':_0x35430f,'metadata':{'id':_0xab9d42},'recurring':{'interval':billingIntervalsToStripeBillingIntervals[_0x2231a1]}});}__name(createStripeProductPricing,'createStripeProductPricing');async function deactivateStripeProductPricing(_0x13dc54){return stripe['prices']['update'](_0x13dc54,{'active':![]});}__name(deactivateStripeProductPricing,'deactivateStripeProductPricing');async function createStripeProduct(_0x3a4e07,_0x345c35){const _0x5d872d=await stripe['products']['create']({'name':_0x3a4e07,'metadata':{'paymentPlanId':_0x345c35}});return _0x5d872d;}__name(createStripeProduct,'createStripeProduct');async function deactivateStripeProduct(_0xe78f56){const _0x4a1e3a=await stripe['products']['list'](),_0x386a9c=_0x4a1e3a['data']['filter'](_0x5a09f6=>{return _0x5a09f6['name']===_0xe78f56;});for(const _0x17c7a4 of _0x386a9c){await stripe['products']['update'](_0x17c7a4['id'],{'active':![]});}}__name(deactivateStripeProduct,'deactivateStripeProduct');async function getStripeProducts(){const _0x2e48e7=await stripe['products']['list']();return _0x2e48e7['data'];}__name(getStripeProducts,'getStripeProducts');async function getStripeProductIdByPriceId(_0x519394){const {product:_0x274cbc}=await stripe['prices']['retrieve'](_0x519394);return isString(_0x274cbc)?_0x274cbc:_0x274cbc['id'];}__name(getStripeProductIdByPriceId,'getStripeProductIdByPriceId');async function setCustomerDefaultPaymentMethod(_0x2400f3,_0x1f55cd){await stripe['customers']['update'](_0x1f55cd,{'invoice_settings':{'default_payment_method':_0x2400f3}});}__name(setCustomerDefaultPaymentMethod,'setCustomerDefaultPaymentMethod');async function changeCustomerEmail(_0x43b627,_0x57ba2c){await stripe['customers']['update'](_0x43b627,{'email':_0x57ba2c});}__name(changeCustomerEmail,'changeCustomerEmail');async function getStripeDefaultPaymentMethod(_0x446c25){const _0x41c2d2=await findStripeCustomerById(_0x446c25);if(_0x41c2d2['deleted']||!_0x41c2d2['invoice_settings']['default_payment_method'])return void(-0x1e79+-0x4d5+-0x2*-0x11a7);const _0x10a489=isString(_0x41c2d2['invoice_settings']['default_payment_method'])?_0x41c2d2['invoice_settings']['default_payment_method']:_0x41c2d2['invoice_settings']['default_payment_method']['id'],_0x337590=await stripe['paymentMethods']['retrieve'](_0x10a489);return _0x337590;}__name(getStripeDefaultPaymentMethod,'getStripeDefaultPaymentMethod');async function detachAllPaymentMethodsFromCustomer(_0xfd18c4){const _0x556ca5=await stripe['customers']['listPaymentMethods'](_0xfd18c4),_0x2a14f9=_0x556ca5['data']['map'](_0x500a86=>_0x500a86['id']);await Promise['all'](_0x2a14f9['map'](detachPaymentMethod));}__name(detachAllPaymentMethodsFromCustomer,'detachAllPaymentMethodsFromCustomer');
|
|
17
17
|
|
|
18
18
|
export { areEnvSettingsConfiguredForPaymentSystem, attachPaymentMethodToCustomer, cancelStripeSubscription, cancelStripeSubscriptionById, changeCustomerEmail, changeStripeProductName, changeStripeProductStatus, confirmStripePayment, createStripeCustomer, createStripeProduct, createStripeProductPricing, createStripeSubscription, createStripeTrialSubscription, deactivateStripeProduct, deactivateStripeProductPricing, findStripeCustomerByEmail, findStripeCustomerById, getStripeDefaultPaymentMethod, getStripePaymentData, getStripeProductIdByPriceId, getStripeProducts, getStripeSubscriptionData, getStripeSubscriptionStatus, getSubscriptionFromPaymentIntent, hasStripeSubscription, instantUpdateStripeSubscription, processPaymentFailureAndCancelSubscription, retrievePaymentIntentFromSubscription, setCustomerDefaultPaymentMethod, stripe, updateCustomerEmailIfNeeded, updateStripeSubscriptionWithoutProration };
|
|
@@ -8,6 +8,6 @@ import { subscriptionStatuses } from '../../../meta/core/resources/enums/payment
|
|
|
8
8
|
import { resourceNames } from '../../../../fd-toolbox/resources/resource-names.js';
|
|
9
9
|
import { createResource } from '../../../meta/server/resources/crud-resources.js';
|
|
10
10
|
|
|
11
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
11
|
+
var __defProp=Object['defineProperty'],__name=(_0x104807,_0x39b84d)=>__defProp(_0x104807,'name',{'value':_0x39b84d,'configurable':!![]});async function createSubscription(_0x1a7e17){return createResource(_0x1a7e17,resourceNames['subscription']);}__name(createSubscription,'createSubscription');async function getOneSubscription(_0x1034c4){const _0x540fbd=createDynamicSelect(subscriptionSchema);dbWhere(_0x540fbd,eq(subscriptionSchema['workspaceId'],_0x1034c4));const _0x2a5366=await runQuery(_0x540fbd);return _0x2a5366[-0x17b7+-0x1a41+0x31f8];}__name(getOneSubscription,'getOneSubscription');async function getSubscriptionsByWorkspaceId(_0x790aad){const _0x158c15=createDynamicSelect(subscriptionSchema);return dbWhere(_0x158c15,eq(subscriptionSchema['workspaceId'],_0x790aad)),runQuery(_0x158c15);}__name(getSubscriptionsByWorkspaceId,'getSubscriptionsByWorkspaceId');async function getFreeSubscriptionByWorkspaceId(_0x127033){const _0xe7e49=createDynamicSelect(subscriptionSchema);dbWhere(_0xe7e49,and(eq(subscriptionSchema['workspaceId'],_0x127033),isNull(subscriptionSchema['paymentSystemSubscriptionId'])));const _0x3f1aed=await runQuery(_0xe7e49);return _0x3f1aed[-0x5f2+-0x153+-0x1*-0x745];}__name(getFreeSubscriptionByWorkspaceId,'getFreeSubscriptionByWorkspaceId');async function changeSubscriptionStatusById(_0x406bbf,_0x40a3cc){const _0x3dfd7d={'status':_0x40a3cc};await dbUpdate(subscriptionSchema)['set'](_0x3dfd7d)['where'](eq(subscriptionSchema['id'],_0x406bbf));const _0x5320aa=await selectSubscription(eq(subscriptionSchema['id'],_0x406bbf));return _0x5320aa[0x4*0x43b+-0x1ea9+0xdbd];}__name(changeSubscriptionStatusById,'changeSubscriptionStatusById');async function selectSubscription(_0x140bb2){const _0x2f55bf=createDynamicSelect(subscriptionSchema,{'id':subscriptionSchema['id'],'paymentPlanName':paymentPlanSchema['name'],'status':subscriptionSchema['status'],'currentPeriodEndDate':subscriptionSchema['currentPeriodEndDate'],'endDate':subscriptionSchema['endDate'],'price':pricingSchema['price'],'currency':pricingSchema['currency'],'billingInterval':pricingSchema['billingInterval'],'paymentSystemSubscriptionId':subscriptionSchema['paymentSystemSubscriptionId']});return dbInnerJoin(_0x2f55bf,pricingSchema,eq(subscriptionSchema['pricingId'],pricingSchema['id'])),dbInnerJoin(_0x2f55bf,paymentPlanSchema,eq(pricingSchema['paymentPlanId'],paymentPlanSchema['id'])),dbWhere(_0x2f55bf,_0x140bb2),runQuery(_0x2f55bf);}__name(selectSubscription,'selectSubscription');async function getSubscriptionsDueForCheck(){const _0x287721=createDynamicSelect(subscriptionSchema);return dbWhere(_0x287721,and(isNotNull(subscriptionSchema['paymentSystemSubscriptionId']),eq(subscriptionSchema['status'],subscriptionStatuses['active']),lt(subscriptionSchema['currentPeriodEndDate'],getNowUtc()))),runQuery(_0x287721);}__name(getSubscriptionsDueForCheck,'getSubscriptionsDueForCheck');async function getSubscriptionByPaymentSystemSubscrId(_0x3152b9){const _0x2423b1=await selectSubscription(eq(subscriptionSchema['paymentSystemSubscriptionId'],_0x3152b9));return _0x2423b1[-0x13*0x3e+-0xcbb*-0x3+-0x2197];}__name(getSubscriptionByPaymentSystemSubscrId,'getSubscriptionByPaymentSystemSubscrId');
|
|
12
12
|
|
|
13
13
|
export { changeSubscriptionStatusById, createSubscription, getFreeSubscriptionByWorkspaceId, getOneSubscription, getSubscriptionByPaymentSystemSubscrId, getSubscriptionsByWorkspaceId, getSubscriptionsDueForCheck, selectSubscription };
|
|
@@ -14,6 +14,6 @@ import { getCurrentPaymentSystemCustomerId, createSubscriptionWithInstantPayment
|
|
|
14
14
|
import { getPaymentPlanByPricingId } from '../payments/payment-plan-db.js';
|
|
15
15
|
import { isPaymentPlanTrial } from '../payments/payment-plans.js';
|
|
16
16
|
|
|
17
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
17
|
+
var __defProp=Object['defineProperty'],__name=(_0x2f0269,_0x55d9fc)=>__defProp(_0x2f0269,'name',{'value':_0x55d9fc,'configurable':!![]});async function cancelPaidSubscription(_0x330331,_0x4d4b34){const _0x25fad2=await getSubscriptionsByWorkspaceId(_0x4d4b34),_0x1dfbd6=_0x25fad2['some'](_0x5a6e95=>_0x5a6e95['id']===_0x330331);if(!_0x1dfbd6)throw apiForbiddenError();const _0x22a5d1=_0x25fad2['find'](_0x469cbe=>_0x469cbe['id']===_0x330331);if(!_0x22a5d1?.['paymentSystemSubscriptionId'])throw apiBadRequestError();if(_0x22a5d1['pendingPricingId']){const _0x7033ec=await updateSubscriptionById(_0x330331,{'pendingPricingId':void(-0x1ddd+0x1a7d+0x360),'endDate':_0x22a5d1['currentPeriodEndDate']}),_0x41412a=await getResource({'resourceName':resourceNames['pricing'],'id':_0x22a5d1['pricingId']});return updateStripeSubscriptionWithoutProration(_0x22a5d1['paymentSystemSubscriptionId'],_0x41412a['paymentSystemPriceId']),_0x7033ec;}const _0x43e526=await cancelStripeSubscription(_0x22a5d1['paymentSystemSubscriptionId']),_0x5d5c83={'status':mapSubscriptionStatusToDbFormat(_0x43e526['subscriptionStatus']),'currentPeriodEndDate':unixTimestampToDate(_0x43e526?.['currentPeriodEndDate']),'endDate':_0x43e526?.['endDate']?unixTimestampToDate(_0x43e526['endDate']):void(0x5f0+0x3f7+-0x9e7),'pendingPricingId':void(0x23b7+-0xea5*-0x1+-0x325c)};return updateSubscriptionById(_0x330331,_0x5d5c83);}__name(cancelPaidSubscription,'cancelPaidSubscription');async function updatePaymentPlan(_0x3496e0,_0x577ac9){const _0x86e84=await getResource({'resourceName':resourceNames['subscription'],'id':_0x3496e0}),_0x1c66cd=await getResource({'resourceName':resourceNames['pricing'],'id':_0x577ac9}),_0x2309d9=_0x86e84['paymentSystemSubscriptionId'],_0x46f2f0=_0x1c66cd['paymentSystemPriceId'];if(_0x86e84['status']===subscriptionStatuses['trialing'])throw apiForbiddenError(paymentErrorMessages['subscriptionCannotBeUpdatedDueToTrial']);const _0x58ed90=await getPaymentPlanByPricingId(_0x577ac9);if(!_0x58ed90)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(isPaymentPlanTrial(_0x58ed90))throw apiBadRequestError(paymentErrorMessages['subscriptionCannotBeUpgradedToTrial']);const _0x1c5396=await getResource({'resourceName':resourceNames['pricing'],'id':_0x577ac9}),_0x931010=await getResource({'resourceName':resourceNames['pricing'],'id':_0x86e84['pricingId']});_0x1c5396['price']>=_0x931010['price']?await upgradePaymentPlan(_0x3496e0,_0x2309d9,_0x46f2f0,_0x577ac9):await downgradePaymentPlan(_0x3496e0,_0x2309d9,_0x46f2f0,_0x577ac9);}__name(updatePaymentPlan,'updatePaymentPlan');async function changeSubscriptionStatus(_0x49a1ad,_0x35fb1d){return changeSubscriptionStatusById(_0x49a1ad,_0x35fb1d);}__name(changeSubscriptionStatus,'changeSubscriptionStatus');async function getActiveSubscriptionByWorkspaceId(_0x33dc8c){const _0x479998=await getSubscriptionsByWorkspaceId(_0x33dc8c),_0x310a37=_0x479998['find'](_0x11fa56=>_0x11fa56['status']===subscriptionStatuses['active']||_0x11fa56['status']===subscriptionStatuses['trialing']);return _0x310a37;}__name(getActiveSubscriptionByWorkspaceId,'getActiveSubscriptionByWorkspaceId');async function syncInactiveSubscriptions(){const _0x31c728=await getSubscriptionsDueForCheck();if(!_0x31c728['length'])return;for(const _0x48f1a6 of _0x31c728){if(_0x48f1a6?.['paymentSystemSubscriptionId']){const _0x51b82a=await getFreeSubscriptionByWorkspaceId(_0x48f1a6['workspaceId']),_0x35235f=await getStripeSubscriptionData(_0x48f1a6['paymentSystemSubscriptionId']),_0x4fc838=mapSubscriptionStatusToDbFormat(_0x35235f['status']);_0x4fc838!==_0x48f1a6['status']&&_0x4fc838!==subscriptionStatuses['active']&&_0x4fc838!==subscriptionStatuses['pastDue']&&await processInactiveSubscriptionSync(_0x48f1a6['id'],_0x51b82a['id'],_0x35235f);}}}__name(syncInactiveSubscriptions,'syncInactiveSubscriptions');async function processInactiveSubscriptionSync(_0x32b53d,_0x298294,_0xe0d452){const _0x47cbd5={'status':subscriptionStatuses['canceled'],'currentPeriodEndDate':unixTimestampToDate(_0xe0d452['currentPeriodEndDate']),'endDate':_0xe0d452['endDate']?unixTimestampToDate(_0xe0d452['endDate']):void(-0xd3f+0x1e75+-0x1136)};await updateSubscriptionById(_0x32b53d,_0x47cbd5),await changeSubscriptionStatusById(_0x298294,subscriptionStatuses['active']);}__name(processInactiveSubscriptionSync,'processInactiveSubscriptionSync');async function hasPaidOrTrialSubscription(){const _0xd6772e=await getResourcesByName(resourceNames['subscription']);return _0xd6772e['some'](_0x246dfd=>_0x246dfd['pricingId']!==pricingIds['basicId']);}__name(hasPaidOrTrialSubscription,'hasPaidOrTrialSubscription');async function createSubscriptionForCurrentWorkspace(_0x878374){const _0x502473=await getCurrentPaymentSystemCustomerId();if(!_0x502473)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);const _0x312678=await getStripeDefaultPaymentMethod(_0x502473),_0x125466=_0x312678?.['id'];if(!_0x125466)throw apiNotFoundError(paymentErrorMessages['defaultPaymentMethodNotFound']);const _0x4dbea7=await getPaymentPlanByPricingId(_0x878374);if(!_0x4dbea7)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(isPaymentPlanTrial(_0x4dbea7))throw apiBadRequestError(paymentErrorMessages['trialCannotBeCreated']);return createSubscriptionWithInstantPayment(_0x878374,_0x125466,_0x502473);}__name(createSubscriptionForCurrentWorkspace,'createSubscriptionForCurrentWorkspace');async function downgradePaymentPlan(_0x6e71f7,_0xdad4c4,_0x35b81f,_0x507eb6){await updateStripeSubscriptionWithoutProration(_0xdad4c4,_0x35b81f);const _0x5326ea={'pendingPricingId':_0x507eb6,'endDate':void(-0x26b*0xb+-0xe08+0x3*0xd8b)};return updateSubscriptionById(_0x6e71f7,_0x5326ea);}__name(downgradePaymentPlan,'downgradePaymentPlan');async function upgradePaymentPlan(_0x34a196,_0x52dcf9,_0x1cc5d8,_0x5cc731){await instantUpdateStripeSubscription(_0x52dcf9,_0x1cc5d8);const _0xc79beb={'pricingId':_0x5cc731,'endDate':void(0x1ceb+0x6*0x33d+-0x3059*0x1),'pendingPricingId':void(0x4*-0x321+0x18fb+0x1*-0xc77)};return updateSubscriptionById(_0x34a196,_0xc79beb);}__name(upgradePaymentPlan,'upgradePaymentPlan');async function updateSubscriptionById(_0x58a577,_0x3ac8b6){const _0x37f0a2=await getUserId(),_0x580a1d={'id':_0x58a577,..._0x3ac8b6},_0x23e7f4={'resourceName':resourceNames['subscription'],'resource':_0x580a1d,'isCreate':![],'throwOnNonSuccess':!![],'userId':_0x37f0a2};await crudUpdate(_0x23e7f4);}__name(updateSubscriptionById,'updateSubscriptionById');
|
|
18
18
|
|
|
19
19
|
export { cancelPaidSubscription, changeSubscriptionStatus, createSubscriptionForCurrentWorkspace, getActiveSubscriptionByWorkspaceId, hasPaidOrTrialSubscription, processInactiveSubscriptionSync, syncInactiveSubscriptions, updatePaymentPlan };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
import { stripe } from '../stripe/stripes.js';
|
|
3
3
|
|
|
4
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
4
|
+
var __defProp=Object['defineProperty'],__name=(_0x5d65e8,_0xbbd406)=>__defProp(_0x5d65e8,'name',{'value':_0xbbd406,'configurable':!![]});async function get(){const _0x405f62=await stripe['invoices']['list']();return _0x405f62['data']['map'](transformInvoice);}__name(get,'get');function transformInvoice(_0x169460){return {'id':_0x169460['id'],'date':_0x169460['created'],'invoiceNumber':_0x169460['number']??void(-0x1b68+-0x2a*0xe4+0x8*0x81a),'amount':_0x169460['amount_due'],'status':_0x169460['status']??void(0x1d3e*0x1+-0x18d0+-0x46e),'downloadUrl':_0x169460['invoice_pdf']??void(-0x22d7+-0xe3f+0x3116),'viewUrl':_0x169460['hosted_invoice_url']??void(0x1*-0x109f+0x79*-0x4+0x1283)};}__name(transformInvoice,'transformInvoice');
|
|
5
5
|
|
|
6
6
|
export { get };
|
|
@@ -3,8 +3,8 @@ import { safeParseJson } from '../../../fd-toolbox/lib/utils.js';
|
|
|
3
3
|
import { generateAiText } from '../../ai/vercel-ai-sdk/ai.js';
|
|
4
4
|
import { createError } from '../../../fd-toolbox/errors/errors.js';
|
|
5
5
|
import { enricherErrorMessages } from '../../enricher/constants/enricher-error-message-constants.js';
|
|
6
|
-
import * as
|
|
6
|
+
import * as _0x5113ce from 'cheerio';
|
|
7
7
|
|
|
8
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
8
|
+
var __defProp=Object['defineProperty'],__name=(_0x5aeec8,_0x1ccd53)=>__defProp(_0x5aeec8,'name',{'value':_0x1ccd53,'configurable':!![]});function extractText(_0x517fb0,_0x344019){const _0x493a39=_0x5113ce['load'](_0x517fb0),_0x23f8b1=[];_0x493a39('p,\x20h1,\x20h2,\x20h3,\x20h4,\x20h5,\x20h6,\x20li,\x20td,\x20th,\x20article')['each']((_0x1b068c,_0x3781c3)=>{_0x23f8b1['push'](_0x493a39(_0x3781c3)['text']()['trim']());});const _0x1933db=_0x23f8b1['join']('\x0a')['trim']();return _0x1933db['slice'](0x68*0x5+-0x51b+0x1*0x313,_0x344019);}__name(extractText,'extractText');async function fetchHtml(_0x308d49){const _0x306420=await fetch(_0x308d49),_0x1ae741=await _0x306420['text']();if(!_0x306420['ok'])throw createError(enricherErrorMessages['errorFetching']['replace']('{0}',_0x306420['status']+':\x20'+_0x1ae741));return _0x1ae741;}__name(fetchHtml,'fetchHtml');async function analyzeWebsite(_0x611093){const _0x451e98=await fetchHtml(_0x611093),_0x1b223b=extractText(_0x451e98,-0x13*-0x20c+-0x4*0x4bc+-0x20f*0x4),_0x4ee649=buildUserPrompt(_0x611093,_0x1b223b),_0x5f0fda=buildSeoCompetitorsPrompt(_0x611093,_0x1b223b),[_0x22136a,_0x96c411]=await Promise['all']([generateAiText({'prompt':_0x4ee649,'systemPrompt':systemPrompt}),generateAiText({'prompt':_0x5f0fda,'systemPrompt':systemPrompt})]),_0x58f253=safeParseJson(_0x22136a['text']),_0x447ce0=safeParseJson(_0x96c411['text']),_0x2cec32={..._0x58f253,'competitors':_0x447ce0['competitors'],'targetAudiences':_0x58f253['targetAudiences']};return _0x2cec32;}__name(analyzeWebsite,'analyzeWebsite');const systemPrompt='\x0a#\x20System\x20Prompt\x0a\x0aYou\x20are\x20an\x20expert\x20business\x20analyst\x20specializing\x20in\x20competitive\x20research\x20and\x20market\x20positioning.\x0aYour\x20task\x20is\x20to\x20analyze\x20website\x20content\x20and\x20extract\x20the\x20most\x20accurate,\x20concise\x20description\x0aof\x20the\x20company\x20behind\x20the\x20website.\x0a\x0a##\x20Rules:\x0a\x0a-\x20Base\x20your\x20answer\x20ONLY\x20on\x20the\x20provided\x20website\x20text.\x0a-\x20Do\x20not\x20guess\x20or\x20invent\x20information.\x0a-\x20If\x20something\x20is\x20unclear\x20or\x20missing,\x20return\x20\x22unknown\x22\x20for\x20that\x20field.\x0a-\x20For\x20the\x20`language`\x20field,\x20return\x20the\x20IETF\x20BCP\x2047\x20language\x20tag\x20(e.g.,\x20\x22en-US\x22,\x20\x22de-DE\x22,\x20\x22uk-UA\x22,\x20\x22pl-PL\x22).\x0a-\x20For\x20the\x20`country`\x20field,\x20return\x20the\x20ISO\x203166-1\x20alpha-2\x20country\x20code\x20(e.g.,\x20\x22US\x22,\x20\x22DE\x22,\x20\x22UA\x22,\x20\x22PL\x22).\x0a-\x20Respond\x20in\x20valid\x20JSON\x20only,\x20with\x20no\x20extra\x20text,\x20no\x20markdown\x20fences,\x20no\x20explanations.\x0a';function buildUserPrompt(_0x5115ed,_0x28660b){return '\x0a#\x20User\x20Prompt\x0a\x0aAnalyze\x20the\x20following\x20website\x20content\x20and\x20determine:\x0a\x0a1.\x20**Core\x20business**\x20-\x20A\x20clear\x20one-sentence\x20description\x20of\x20what\x20the\x20company\x20primarily\x20does.\x0a\x20\x20\x20Focus\x20on\x20the\x20value\x20proposition,\x20not\x20just\x20the\x20industry.\x0a2.\x20**Unique\x20selling\x20propositions\x20(USPs)**\x20-\x20A\x20list\x20of\x203-5\x20main\x20differentiators\x20or\x20competitive\x20strengths\x0a\x20\x20\x20that\x20set\x20this\x20company\x20apart.\x0a3.\x20**Language**\x20-\x20The\x20primary\x20language\x20used\x20on\x20the\x20site\x20as\x20an\x20IETF\x20BCP\x2047\x20tag\x20(e.g.,\x20\x22en-US\x22,\x20\x22de-DE\x22).\x0a4.\x20**Country**\x20-\x20The\x20main\x20country\x20or\x20region\x20the\x20business\x20serves\x20as\x20an\x20ISO\x203166-1\x20alpha-2\x20code\x20(e.g.,\x20\x22US\x22,\x20\x22DE\x22).\x0a5.\x20**Target\x20audiences**\x20-\x20Exactly\x206\x20distinct\x20customer\x20segments\x20the\x20company\x20is\x20trying\x20to\x20reach.\x0a\x20\x20\x20Each\x20audience\x20should\x20be\x20a\x20specific,\x20actionable\x20persona\x20description\x0a\x20\x20\x20(e.g.,\x20\x22Small\x20business\x20owners\x20looking\x20for\x20affordable\x20CRM\x20solutions\x22\x20instead\x20of\x20just\x20\x22Small\x20businesses\x22).\x0a\x0aReturn\x20the\x20result\x20in\x20this\x20exact\x20JSON\x20structure:\x0a\x0a```json\x0a{\x0a\x20\x20\x20\x20\x22name\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x22coreBusiness\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x22usps\x22:\x20[],\x0a\x20\x20\x20\x20\x22language\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x22country\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x22targetAudiences\x22:\x20[]\x0a}\x0a```\x0a\x0a**Website\x20URL:**\x20'+_0x5115ed+'\x0a\x0a**Website\x20content:**\x0a'+_0x28660b+'\x0a';}__name(buildUserPrompt,'buildUserPrompt');function buildSeoCompetitorsPrompt(_0x5b646c,_0x175339){return '\x0a#\x20SEO\x20Competitors\x20Analysis\x20Prompt\x0a\x0aRole:\x0aYou\x20are\x20an\x20experienced\x20SEO\x20analyst\x20specializing\x20in\x20organic\x20search\x20and\x20competitor\x20research.\x0a\x0aContext:\x0aThe\x20user\x20owns\x20the\x20website\x20'+_0x5b646c+'.\x0a\x0aTask:\x0aIdentify\x20the\x20top\x205\x20organic\x20search\x20competitors\x20of\x20'+_0x5b646c+'\x20based\x20on\x20the\x20most\x20important\x20keywords\x20this\x20site\x20targets\x20\x0aor\x20is\x20likely\x20to\x20rank\x20for.\x0a\x0aInstructions:\x0a1.\x20Determine\x20the\x20primary\x20keywords\x20and\x20keyword\x20themes\x20relevant\x20to\x20'+_0x5b646c+',\x20including\x20core\x20and\x20long-tail\x20queries.\x0a2.\x20Analyze\x20Google’s\x20organic\x20search\x20results\x20for\x20these\x20keywords.\x0a3.\x20Identify\x20websites\x20that\x20consistently\x20rank\x20for\x20multiple\x20of\x20these\x20keywords\x20and\x20compete\x20for\x20the\x20same\x20search\x20visibility.\x0a4.\x20Output\x20a\x20list\x20of\x205\x20competitors.\x0a\x0aReturn\x20the\x20result\x20in\x20this\x20exact\x20JSON\x20structure:\x0a\x0a```json\x0a{\x0a\x20\x20\x20\x20\x22competitors\x22:\x20[\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22domain\x22:\x20\x22\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22reason\x22:\x20\x22\x22\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20]\x0a}\x0a```\x0a\x0a**Website\x20URL:**\x20'+_0x5b646c+'\x0a\x0a**Website\x20content:**\x0a'+_0x175339+'\x0a';}__name(buildSeoCompetitorsPrompt,'buildSeoCompetitorsPrompt');
|
|
9
9
|
|
|
10
10
|
export { analyzeWebsite, extractText, fetchHtml };
|
|
@@ -3,6 +3,6 @@ import { getResourcesByName } from '../../meta/server/db/db.js';
|
|
|
3
3
|
import { resourceNames } from '../../../fd-toolbox/resources/resource-names.js';
|
|
4
4
|
import { createResource } from '../../meta/server/resources/crud-resources.js';
|
|
5
5
|
|
|
6
|
-
var __defProp=Object['defineProperty'],__name=(
|
|
6
|
+
var __defProp=Object['defineProperty'],__name=(_0x4caeca,_0x20996b)=>__defProp(_0x4caeca,'name',{'value':_0x20996b,'configurable':!![]});function createProduct(_0x4db867){return createResource(_0x4db867,resourceNames['product']);}__name(createProduct,'createProduct');function createProductCategory(_0x5c6020){return createResource(_0x5c6020,resourceNames['productCategory']);}__name(createProductCategory,'createProductCategory');function getAllProducts(){return getResourcesByName(resourceNames['product']);}__name(getAllProducts,'getAllProducts');
|
|
7
7
|
|
|
8
8
|
export { createProduct, createProductCategory, getAllProducts };
|