@fernir2/saas-kit 0.0.207 → 0.0.208

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.
Files changed (1831) hide show
  1. package/cli/package-template.json +13 -13
  2. package/dist/styles.css +2 -2
  3. package/flint/index.d.ts +1 -0
  4. package/flint/index.js +1 -0
  5. package/generated/crud-handler-map.js +1 -1
  6. package/generated/meta.json +5 -14
  7. package/generated/schema.d.ts +17 -0
  8. package/generated/schema.js +1 -1
  9. package/index.d.ts +9 -5
  10. package/index.js +9 -5
  11. package/internal/index.d.ts +7 -4
  12. package/internal/index.js +7 -4
  13. package/package.json +30 -47
  14. package/packages/base-repo/app-constants/alias-symbols.d.ts +1 -0
  15. package/packages/base-repo/app-constants/alias-symbols.js +1 -1
  16. package/packages/base-repo/app-constants/aliases.js +1 -1
  17. package/packages/base-repo/app-constants/project-paths.d.ts +18 -1
  18. package/packages/base-repo/app-constants/project-paths.js +1 -1
  19. package/packages/base-repo/app-constants/system-constants.d.ts +69 -0
  20. package/packages/base-repo/app-constants/system-constants.js +5 -4
  21. package/packages/base-repo/constants/basic-types.d.ts +2 -0
  22. package/packages/base-repo/constants/basic-types.js +1 -1
  23. package/packages/base-repo/constants/ci-constants.d.ts +1 -0
  24. package/packages/base-repo/constants/ci-constants.js +2 -1
  25. package/packages/base-repo/constants/common-strings.d.ts +136 -0
  26. package/packages/base-repo/constants/common-strings.js +4 -0
  27. package/packages/base-repo/constants/country-data.d.ts +30 -0
  28. package/packages/base-repo/constants/country-data.js +4 -0
  29. package/packages/base-repo/constants/display-labels.d.ts +3 -0
  30. package/packages/base-repo/constants/display-labels.js +4 -0
  31. package/packages/base-repo/constants/extensions.d.ts +4 -1
  32. package/packages/base-repo/constants/extensions.js +2 -2
  33. package/packages/base-repo/constants/html-element-names.d.ts +10 -0
  34. package/packages/base-repo/constants/html-element-names.js +6 -0
  35. package/packages/base-repo/constants/packages.d.ts +1 -0
  36. package/packages/base-repo/constants/packages.js +1 -1
  37. package/packages/base-repo/constants/playwright.js +3 -1
  38. package/packages/base-repo/constants/push-statuses.d.ts +2 -0
  39. package/packages/base-repo/constants/push-statuses.js +1 -1
  40. package/packages/base-repo/constants/string-duplication-constants.d.ts +3 -3
  41. package/packages/base-repo/constants/string-duplication-constants.js +1 -1
  42. package/packages/base-repo/constants/tools-constants.d.ts +186 -4
  43. package/packages/base-repo/constants/tools-constants.js +4 -2
  44. package/packages/cluster/ci/gitlab-runner.d.ts +2 -1
  45. package/packages/cluster/ci/gitlab-runner.js +2 -2
  46. package/packages/cluster/ci/pnpm-cache-pv-pvc.d.ts +5 -0
  47. package/packages/cluster/ci/pnpm-cache-pv-pvc.js +7 -0
  48. package/packages/cluster/constants/cluster-constants.d.ts +15 -0
  49. package/packages/cluster/constants/cluster-constants.js +2 -2
  50. package/packages/cluster/create-vm/config-dev-vm.d.ts +2 -0
  51. package/packages/cluster/create-vm/config-dev-vm.js +2 -2
  52. package/packages/cluster/create-vm/create-vm.d.ts +2 -0
  53. package/packages/cluster/create-vm/create-vm.js +16 -16
  54. package/packages/cluster/db/postgres.d.ts +2 -2
  55. package/packages/cluster/db/postgres.js +2 -2
  56. package/packages/cluster/index.js +2 -1
  57. package/packages/cluster/kube/namespaces.js +2 -2
  58. package/packages/cluster/kube/networking.js +2 -2
  59. package/packages/cluster/kube/registry.js +3 -3
  60. package/packages/code-quality/significant-line-counter/reviewable-commit-diff.d.ts +22 -0
  61. package/packages/code-quality/significant-line-counter/reviewable-commit-diff.js +7 -0
  62. package/packages/code-quality/significant-line-counter/significant-line-check-result.d.ts +18 -0
  63. package/packages/code-quality/significant-line-counter/significant-line-check-result.js +8 -0
  64. package/packages/code-quality/significant-line-counter/significant-line-check-statuses.d.ts +5 -0
  65. package/packages/code-quality/significant-line-counter/significant-line-check-statuses.js +6 -0
  66. package/packages/code-quality/significant-line-counter/significant-line-counter.d.ts +1 -0
  67. package/packages/code-quality/significant-line-counter/significant-line-counter.js +4 -0
  68. package/packages/fd-toolbox/api/api-client.js +1 -1
  69. package/packages/fd-toolbox/api/api-path-names.d.ts +0 -1
  70. package/packages/fd-toolbox/api/api-path-names.js +2 -1
  71. package/packages/fd-toolbox/api/api-paths.js +1 -1
  72. package/packages/fd-toolbox/api/base-api.js +1 -1
  73. package/packages/fd-toolbox/api/cache-headers.js +1 -1
  74. package/packages/fd-toolbox/api/hooks/use-api.js +1 -1
  75. package/packages/fd-toolbox/auth/login-states.js +1 -1
  76. package/packages/fd-toolbox/auth/oauth-service-types.d.ts +5 -0
  77. package/packages/fd-toolbox/auth/oauth-service-types.js +2 -2
  78. package/packages/fd-toolbox/auth/permissions/permission-notifiers.js +1 -1
  79. package/packages/fd-toolbox/auth/register.d.ts +0 -5
  80. package/packages/fd-toolbox/auth/register.js +2 -2
  81. package/packages/fd-toolbox/auth/session-storage.js +1 -1
  82. package/packages/fd-toolbox/auth/tokens.js +1 -1
  83. package/packages/fd-toolbox/base-resource/base-resource.js +1 -1
  84. package/packages/fd-toolbox/base-resource/optional-user-id-base-resource.js +1 -1
  85. package/packages/fd-toolbox/base-resource/user-id-base-resource.js +1 -1
  86. package/packages/fd-toolbox/cache/cache.js +1 -1
  87. package/packages/fd-toolbox/collections/arrays.d.ts +2 -0
  88. package/packages/fd-toolbox/collections/arrays.js +2 -2
  89. package/packages/fd-toolbox/collections/enums.js +1 -1
  90. package/packages/fd-toolbox/constants/auth-constants.d.ts +0 -2
  91. package/packages/fd-toolbox/constants/auth-constants.js +2 -2
  92. package/packages/fd-toolbox/constants/auth-display-labels.d.ts +4 -0
  93. package/packages/fd-toolbox/constants/auth-display-labels.js +4 -0
  94. package/packages/fd-toolbox/constants/card-list-configs.d.ts +1 -1
  95. package/packages/fd-toolbox/constants/child-process-events.d.ts +1 -0
  96. package/packages/fd-toolbox/constants/child-process-events.js +3 -1
  97. package/packages/fd-toolbox/constants/common-user-fields.d.ts +2 -0
  98. package/packages/fd-toolbox/constants/common-user-fields.js +4 -1
  99. package/packages/fd-toolbox/constants/constants.d.ts +7 -1
  100. package/packages/fd-toolbox/constants/constants.js +2 -2
  101. package/packages/fd-toolbox/constants/element-suffixes.js +2 -2
  102. package/packages/fd-toolbox/constants/file-loader-data-types.js +3 -1
  103. package/packages/fd-toolbox/constants/html-constants.d.ts +26 -0
  104. package/packages/fd-toolbox/constants/html-constants.js +6 -0
  105. package/packages/fd-toolbox/constants/keyboard-keys.js +2 -2
  106. package/packages/fd-toolbox/constants/meta-query-params.js +3 -1
  107. package/packages/fd-toolbox/constants/odata-helper-constants.js +1 -1
  108. package/packages/fd-toolbox/constants/public-files.js +2 -1
  109. package/packages/fd-toolbox/constants/scroll-position-constants.d.ts +3 -0
  110. package/packages/fd-toolbox/constants/scroll-position-constants.js +4 -0
  111. package/packages/fd-toolbox/dates/date-time.d.ts +11 -0
  112. package/packages/fd-toolbox/dates/date-time.js +9 -9
  113. package/packages/fd-toolbox/enums/enums.d.ts +2 -2
  114. package/packages/fd-toolbox/enums/enums.js +3 -2
  115. package/packages/fd-toolbox/errors/error-handler.js +2 -2
  116. package/packages/fd-toolbox/errors/errors.js +1 -1
  117. package/packages/fd-toolbox/errors/problem-details.js +1 -1
  118. package/packages/fd-toolbox/functions/condition-check-functions.js +1 -1
  119. package/packages/fd-toolbox/functions/value-checking-functions.js +2 -1
  120. package/packages/fd-toolbox/hooks/use-async-effect.js +2 -1
  121. package/packages/fd-toolbox/hooks/use-element-id.js +1 -1
  122. package/packages/fd-toolbox/hooks/use-empty-ref.js +1 -1
  123. package/packages/fd-toolbox/hooks/use-enter-key.js +1 -1
  124. package/packages/fd-toolbox/hooks/use-is-client.js +1 -1
  125. package/packages/fd-toolbox/hooks/use-is-mobile.js +1 -1
  126. package/packages/fd-toolbox/hooks/use-keyboard-navigation.js +1 -1
  127. package/packages/fd-toolbox/hooks/use-media-query.js +1 -1
  128. package/packages/fd-toolbox/hooks/use-optional-promise.js +1 -1
  129. package/packages/fd-toolbox/html/element-ids.js +1 -1
  130. package/packages/fd-toolbox/html/extract-emails-from-html.js +1 -1
  131. package/packages/fd-toolbox/html/markdown-renderer.js +1 -1
  132. package/packages/fd-toolbox/http/http.js +1 -1
  133. package/packages/fd-toolbox/http/url/url-builder.js +1 -1
  134. package/packages/fd-toolbox/http/url/urls.js +1 -1
  135. package/packages/fd-toolbox/infra/env-config.js +2 -2
  136. package/packages/fd-toolbox/infra/env-functions.js +5 -4
  137. package/packages/fd-toolbox/infra/env-schema.d.ts +2 -291
  138. package/packages/fd-toolbox/infra/env-schema.js +2 -9
  139. package/packages/fd-toolbox/io/io.js +1 -1
  140. package/packages/fd-toolbox/lib/environments.d.ts +2 -0
  141. package/packages/fd-toolbox/lib/environments.js +3 -3
  142. package/packages/fd-toolbox/lib/utils.js +1 -1
  143. package/packages/fd-toolbox/local-storage/local-storage.js +1 -1
  144. package/packages/fd-toolbox/logging/cli-logger.d.ts +2 -2
  145. package/packages/fd-toolbox/logging/cli-logger.js +2 -3
  146. package/packages/fd-toolbox/logging/format-list.d.ts +3 -0
  147. package/packages/fd-toolbox/logging/format-list.js +4 -0
  148. package/packages/fd-toolbox/logging/loggers.d.ts +1 -0
  149. package/packages/fd-toolbox/logging/loggers.js +1 -1
  150. package/packages/fd-toolbox/notifications.js +2 -2
  151. package/packages/fd-toolbox/numbers/numbers.js +1 -1
  152. package/packages/fd-toolbox/objects/property-value.js +1 -1
  153. package/packages/fd-toolbox/odata/odata-builder-funcs.js +1 -1
  154. package/packages/fd-toolbox/odata/odata-builders.js +1 -1
  155. package/packages/fd-toolbox/odata/odata-constants.js +1 -1
  156. package/packages/fd-toolbox/odata/odata.js +2 -2
  157. package/packages/fd-toolbox/odata/odataconfig.js +1 -1
  158. package/packages/fd-toolbox/odata/services/odata-filters.js +1 -1
  159. package/packages/fd-toolbox/odata/services/odata-parsers.js +1 -1
  160. package/packages/fd-toolbox/path.js +1 -1
  161. package/packages/fd-toolbox/paths/ensure.js +1 -1
  162. package/packages/fd-toolbox/paths/paths-names.js +1 -1
  163. package/packages/fd-toolbox/property/calculate-total-property-value.js +1 -1
  164. package/packages/fd-toolbox/redirect/redirect-functions.js +1 -1
  165. package/packages/fd-toolbox/routing/login-routers.js +1 -1
  166. package/packages/fd-toolbox/routing/paths.js +1 -1
  167. package/packages/fd-toolbox/routing/public-routes.d.ts +1 -1
  168. package/packages/fd-toolbox/routing/public-routes.js +1 -1
  169. package/packages/fd-toolbox/routing/routers.js +1 -1
  170. package/packages/fd-toolbox/routing/routes.d.ts +0 -6
  171. package/packages/fd-toolbox/routing/routes.js +3 -2
  172. package/packages/fd-toolbox/server/api/odata/odata-query-params.js +4 -1
  173. package/packages/fd-toolbox/server/api/public-api-routes.js +1 -1
  174. package/packages/fd-toolbox/server/api/query-params.js +1 -1
  175. package/packages/fd-toolbox/server/api-enums/content-type.d.ts +2 -2
  176. package/packages/fd-toolbox/server/api-enums/content-type.js +4 -6
  177. package/packages/fd-toolbox/server/auth/cookies.js +1 -1
  178. package/packages/fd-toolbox/server/cachings/core-cache.js +1 -1
  179. package/packages/fd-toolbox/server/cachings/fd-memory-cache.js +1 -1
  180. package/packages/fd-toolbox/server/cachings/fd-remote-cache.js +2 -2
  181. package/packages/fd-toolbox/server/collections/single-funcs.d.ts +5 -3
  182. package/packages/fd-toolbox/server/collections/single-funcs.js +2 -2
  183. package/packages/fd-toolbox/server/configs/configs.js +2 -2
  184. package/packages/fd-toolbox/server/constants/crud-actions-constants.js +2 -2
  185. package/packages/fd-toolbox/server/constants/fd-server-cache-keys.js +1 -1
  186. package/packages/fd-toolbox/server/entities/base-objects.js +1 -1
  187. package/packages/fd-toolbox/server/errors/error-dtos.js +1 -1
  188. package/packages/fd-toolbox/server/framework/index.js +1 -1
  189. package/packages/fd-toolbox/server/logging/latest-logs-store.js +1 -1
  190. package/packages/fd-toolbox/server/logging/log-dtos.js +1 -1
  191. package/packages/fd-toolbox/server/logging/logger.js +2 -2
  192. package/packages/fd-toolbox/server/objects/keys-case-converters.js +1 -1
  193. package/packages/fd-toolbox/server/random.js +1 -1
  194. package/packages/fd-toolbox/server/services/dictionaries.js +1 -1
  195. package/packages/fd-toolbox/server/strings/casing.js +1 -1
  196. package/packages/fd-toolbox/server/strings/strings.js +1 -1
  197. package/packages/fd-toolbox/server/time/duration-service.js +1 -1
  198. package/packages/fd-toolbox/server/web/errors.js +1 -1
  199. package/packages/fd-toolbox/state/component-states.js +1 -1
  200. package/packages/fd-toolbox/strings/case-converters.js +1 -1
  201. package/packages/fd-toolbox/strings/casing-converter.js +1 -1
  202. package/packages/fd-toolbox/strings/plural-converters.js +1 -1
  203. package/packages/fd-toolbox/strings/strings-constants.js +1 -1
  204. package/packages/fd-toolbox/strings/strings.js +1 -1
  205. package/packages/fd-toolbox/time/date-time.js +1 -1
  206. package/packages/fd-toolbox/types/crud/crud-results.js +1 -1
  207. package/packages/fd-toolbox/types/ensure-type.js +2 -1
  208. package/packages/fd-toolbox/url/urls.js +1 -1
  209. package/packages/fd-toolbox/uuids.js +1 -1
  210. package/packages/fd-toolbox/value-checkers.js +1 -1
  211. package/packages/fd-toolbox-core/constants/base-dev-url.js +1 -1
  212. package/packages/fd-toolbox-core/constants/meta-constants.js +3 -1
  213. package/packages/fd-toolbox-core/core/name-of.js +1 -1
  214. package/packages/fd-toolbox-core/types/resource-with-id.js +1 -1
  215. package/packages/flint/dist/rules/index.d.ts +11 -0
  216. package/packages/flint/dist/rules/index.js +9 -9
  217. package/packages/flint/eslint-base.config.d.ts +1 -0
  218. package/packages/flint/eslint-base.config.js +13 -13
  219. package/packages/flint/eslint-next-web-vitals-temp.config.d.ts +2 -2
  220. package/packages/flint/eslint-next-web-vitals-temp.config.js +2 -2
  221. package/packages/flint/infra/analysis/array-analysis.d.ts +1 -1
  222. package/packages/flint/infra/analysis/array-analysis.js +2 -2
  223. package/packages/flint/infra/analysis/callable-analysis.d.ts +4 -0
  224. package/packages/flint/infra/analysis/callable-analysis.js +7 -0
  225. package/packages/flint/infra/analysis/casing-analysis.js +1 -1
  226. package/packages/flint/infra/analysis/enum-analysis.d.ts +2 -2
  227. package/packages/flint/infra/analysis/enum-analysis.js +1 -1
  228. package/packages/flint/infra/analysis/eslint-analysis.d.ts +1 -1
  229. package/packages/flint/infra/analysis/eslint-analysis.js +1 -1
  230. package/packages/flint/infra/analysis/expression-analysis.js +5 -2
  231. package/packages/flint/infra/analysis/formatting-analysis.js +1 -1
  232. package/packages/flint/infra/analysis/function-analysis.d.ts +5 -2
  233. package/packages/flint/infra/analysis/function-analysis.js +6 -4
  234. package/packages/flint/infra/analysis/generic-analysis.d.ts +21 -0
  235. package/packages/flint/infra/analysis/generic-analysis.js +7 -0
  236. package/packages/flint/infra/analysis/jsx-analysis.d.ts +1 -1
  237. package/packages/flint/infra/analysis/jsx-analysis.js +1 -1
  238. package/packages/flint/infra/analysis/module-analysis.d.ts +5 -2
  239. package/packages/flint/infra/analysis/module-analysis.js +4 -4
  240. package/packages/flint/infra/analysis/name-analysis.d.ts +3 -2
  241. package/packages/flint/infra/analysis/name-analysis.js +5 -5
  242. package/packages/flint/infra/analysis/nullish-analysis.d.ts +1 -1
  243. package/packages/flint/infra/analysis/nullish-analysis.js +1 -1
  244. package/packages/flint/infra/analysis/number-analysis.d.ts +2 -2
  245. package/packages/flint/infra/analysis/number-analysis.js +1 -1
  246. package/packages/flint/infra/analysis/object-analysis.d.ts +1 -1
  247. package/packages/flint/infra/analysis/object-analysis.js +2 -2
  248. package/packages/flint/infra/analysis/path-analysis.d.ts +1 -0
  249. package/packages/flint/infra/analysis/path-analysis.js +4 -0
  250. package/packages/flint/infra/analysis/return-analysis.d.ts +4 -2
  251. package/packages/flint/infra/analysis/return-analysis.js +2 -2
  252. package/packages/flint/infra/analysis/scope-analysis.js +6 -5
  253. package/packages/flint/infra/analysis/string-analysis.d.ts +2 -2
  254. package/packages/flint/infra/analysis/string-analysis.js +2 -2
  255. package/packages/flint/infra/analysis/test-analysis.d.ts +2 -0
  256. package/packages/flint/infra/analysis/test-analysis.js +6 -0
  257. package/packages/flint/infra/analysis/tree-analysis.d.ts +3 -2
  258. package/packages/flint/infra/analysis/tree-analysis.js +2 -2
  259. package/packages/flint/infra/analysis/type-analysis.d.ts +2 -14
  260. package/packages/flint/infra/analysis/type-analysis.js +4 -4
  261. package/packages/flint/infra/analysis/type-guards.d.ts +10 -4
  262. package/packages/flint/infra/analysis/type-guards.js +2 -2
  263. package/packages/flint/infra/analysis/variable-analysis.d.ts +3 -1
  264. package/packages/flint/infra/analysis/variable-analysis.js +5 -4
  265. package/packages/flint/infra/analysis/visitors.d.ts +1 -1
  266. package/packages/flint/infra/analysis/visitors.js +1 -1
  267. package/packages/flint/infra/config-edited-checker.js +3 -3
  268. package/packages/flint/infra/create-eslint-rule.d.ts +3 -2
  269. package/packages/flint/infra/create-eslint-rule.js +1 -1
  270. package/packages/flint/infra/git-readers.js +3 -3
  271. package/packages/flint/project-specific-eslint-configs.js +7 -7
  272. package/packages/flint/rules/code-duplication/must-avoid-code-duplication-in-functions.js +1 -1
  273. package/packages/flint/rules/code-duplication/no-duplicate-imports.js +1 -1
  274. package/packages/flint/rules/code-duplication/no-literal-duplication.js +1 -1
  275. package/packages/flint/rules/consistency/enum-type-immediate-definition.js +1 -1
  276. package/packages/flint/rules/consistency/must-not-needlessly-copy-arrays.js +2 -2
  277. package/packages/flint/rules/consistency/must-not-use-anonymous-objects-only-with-explicit-typization.js +1 -1
  278. package/packages/flint/rules/consistency/must-not-use-process-env.js +1 -1
  279. package/packages/flint/rules/consistency/must-use-nameof-for-props.js +1 -1
  280. package/packages/flint/rules/consistency/must-use-typed-resources-for-crud-update.js +3 -2
  281. package/packages/flint/rules/consistency/must-use-typescript.js +1 -1
  282. package/packages/flint/rules/consistency/no-index-import-in-ast-helpers.js +1 -1
  283. package/packages/flint/rules/consistency/no-new-date.js +1 -1
  284. package/packages/flint/rules/consistency/no-redundant-type-alias.js +1 -1
  285. package/packages/flint/rules/consistency/no-use-type-undefined-for-optional.js +1 -1
  286. package/packages/flint/rules/css/must-not-use-important.js +1 -1
  287. package/packages/flint/rules/css/no-array-destructuring-from-function-calls.js +1 -1
  288. package/packages/flint/rules/css/no-px-in-tailwind.js +1 -1
  289. package/packages/flint/rules/css/no-tailwind-colors.js +1 -1
  290. package/packages/flint/rules/flint/must-add-custom-rule-in-config.js +3 -3
  291. package/packages/flint/rules/flint/must-have-both-rule-and-tests.js +3 -3
  292. package/packages/flint/rules/flint/must-match-rule-name-with-file-name.js +2 -2
  293. package/packages/flint/rules/flint/must-not-declare-fixer-without-calling-it.js +1 -1
  294. package/packages/flint/rules/flint/must-not-import-ast-node-types.js +1 -1
  295. package/packages/flint/rules/flint/must-not-use-eslint-deprecated-methods.js +1 -1
  296. package/packages/flint/rules/flint/must-not-use-the-single-error-property-in-test.d.ts +3 -0
  297. package/packages/flint/rules/flint/must-not-use-the-single-error-property-in-test.js +7 -0
  298. package/packages/flint/rules/flint/must-use-better-error-message-for-custom-rules.js +1 -1
  299. package/packages/flint/rules/flint/must-use-constants-for-message-ids.js +1 -1
  300. package/packages/flint/rules/flint/must-use-create-eslint-rule.js +1 -1
  301. package/packages/flint/rules/flint/must-use-generic-crud-update-config.d.ts +3 -0
  302. package/packages/flint/rules/flint/must-use-generic-crud-update-config.js +7 -0
  303. package/packages/flint/rules/flint/must-use-link-for-camel-or-pascal-case-names.js +3 -3
  304. package/packages/flint/rules/flint/must-use-nodetypes-structure-instead-of-string-node-type.js +1 -1
  305. package/packages/flint/rules/flint/must-use-rule-name-as-message-id-in-tests.js +1 -1
  306. package/packages/flint/rules/flint/must-use-unique-filenames-with-comment-in-tests.js +1 -1
  307. package/packages/flint/rules/general/group-consts-as-const.js +1 -1
  308. package/packages/flint/rules/general/must-add-space-for-comments.js +1 -1
  309. package/packages/flint/rules/general/must-create-resources-in-src-dir.js +1 -1
  310. package/packages/flint/rules/general/must-not-define-functions-in-constants-files.js +1 -1
  311. package/packages/flint/rules/general/must-not-include-unnecessary-parameters.d.ts +3 -0
  312. package/packages/flint/rules/general/must-not-include-unnecessary-parameters.js +7 -0
  313. package/packages/flint/rules/general/must-not-pass-full-objects-into-functions-needlessly.js +2 -2
  314. package/packages/flint/rules/general/must-start-comments-with-uppercase.js +1 -1
  315. package/packages/flint/rules/general/must-use-native-private.js +1 -1
  316. package/packages/flint/rules/general/must-use-path-constants-for-paths.d.ts +3 -0
  317. package/packages/flint/rules/general/must-use-path-constants-for-paths.js +8 -0
  318. package/packages/flint/rules/general/must-use-strict-dependency-version.js +1 -1
  319. package/packages/flint/rules/general/no-empty-files.js +1 -1
  320. package/packages/flint/rules/general/no-eslint-disable-without-approved.d.ts +1 -1
  321. package/packages/flint/rules/general/no-eslint-disable-without-approved.js +1 -1
  322. package/packages/flint/rules/general/no-import-from-temp-dev.js +1 -1
  323. package/packages/flint/rules/general/no-specify-return-type.js +1 -1
  324. package/packages/flint/rules/general/no-todo.js +1 -1
  325. package/packages/flint/rules/general/no-unused-properties-in-constants.d.ts +3 -0
  326. package/packages/flint/rules/general/no-unused-properties-in-constants.js +7 -0
  327. package/packages/flint/rules/general/use-of-only-english-in-repository.js +1 -1
  328. package/packages/flint/rules/index.js +150 -139
  329. package/packages/flint/rules/must-always-specify-types-for-api-responses.js +1 -1
  330. package/packages/flint/rules/must-declare-module-members-in-consistent-order.js +4 -2
  331. package/packages/flint/rules/must-not-modify-data-or-workspace-in-readonly-tests.js +3 -1
  332. package/packages/flint/rules/must-not-return-empty-strings.js +3 -1
  333. package/packages/flint/rules/must-not-use-all-caps-constants.js +3 -2
  334. package/packages/flint/rules/must-not-use-fetch.js +1 -1
  335. package/packages/flint/rules/must-not-use-inline-object-type-parameters.js +1 -1
  336. package/packages/flint/rules/must-not-use-multiple-get-id-functions-inline-in-test.d.ts +3 -0
  337. package/packages/flint/rules/must-not-use-multiple-get-id-functions-inline-in-test.js +7 -0
  338. package/packages/flint/rules/must-not-use-nullish-coalescing-empty-string.d.ts +3 -0
  339. package/packages/flint/rules/must-not-use-nullish-coalescing-empty-string.js +7 -0
  340. package/packages/flint/rules/must-not-use-placeholders-in-eslint-rule-titles.js +1 -1
  341. package/packages/flint/rules/must-not-use-see-link-in-docs-if-type-available.js +2 -1
  342. package/packages/flint/rules/must-separate-unrelated-tests-into-different-files.js +2 -1
  343. package/packages/flint/rules/must-specify-second-generic-parameter-in-apipost-and-apiput.js +2 -2
  344. package/packages/flint/rules/must-use-color-variables-instead-of-hardcoded-values.js +2 -1
  345. package/packages/flint/rules/must-use-functions-for-component-ids.js +3 -2
  346. package/packages/flint/rules/must-use-odata-builder.js +2 -1
  347. package/packages/flint/rules/must-use-only-crud-operations.js +2 -1
  348. package/packages/flint/rules/must-use-resource-provider-functions-to-get-resources-on-server.d.ts +3 -0
  349. package/packages/flint/rules/must-use-resource-provider-functions-to-get-resources-on-server.js +11 -0
  350. package/packages/flint/rules/naming/filename-kebab-case.js +1 -1
  351. package/packages/flint/rules/naming/must-add-empty-line-before-assert-act-arrange.js +1 -1
  352. package/packages/flint/rules/naming/must-add-prefix-to-po-functions.js +1 -1
  353. package/packages/flint/rules/naming/must-avoid-non-null-assertions.js +1 -1
  354. package/packages/flint/rules/naming/must-create-assert-functions-in-asserts-files.js +1 -1
  355. package/packages/flint/rules/naming/must-get-elements-in-tests-only-by-id.js +2 -2
  356. package/packages/flint/rules/naming/must-name-ui-tests-component-condition-expected-result.js +2 -2
  357. package/packages/flint/rules/naming/must-not-add-files-and-code-in-lib-folder.js +2 -2
  358. package/packages/flint/rules/naming/must-not-create-funcs-files-for-non-components.js +2 -2
  359. package/packages/flint/rules/naming/must-not-declare-func-inside-another-func.js +1 -1
  360. package/packages/flint/rules/naming/must-not-import-react.js +3 -3
  361. package/packages/flint/rules/naming/must-not-use-emojis.js +1 -1
  362. package/packages/flint/rules/naming/must-not-use-indexed-access-type-in-function-params.js +1 -1
  363. package/packages/flint/rules/naming/must-not-use-location-href.js +2 -2
  364. package/packages/flint/rules/naming/must-not-use-negation-with-enums.js +1 -1
  365. package/packages/flint/rules/naming/must-not-use-null.js +1 -1
  366. package/packages/flint/rules/naming/must-not-use-page-directly.d.ts +3 -0
  367. package/packages/flint/rules/naming/must-not-use-page-directly.js +7 -0
  368. package/packages/flint/rules/naming/must-not-use-po-in-assert-functions.js +1 -1
  369. package/packages/flint/rules/naming/must-not-use-redundant-string.js +1 -1
  370. package/packages/flint/rules/naming/must-not-use-ternary-operator-for-complicated-conditions.js +1 -1
  371. package/packages/flint/rules/naming/must-put-empty-line.js +1 -1
  372. package/packages/flint/rules/naming/must-throw-full-error-objects.js +1 -1
  373. package/packages/flint/rules/naming/must-use-camelcase-for-html-items-id-attribute.js +1 -1
  374. package/packages/flint/rules/naming/must-use-descriptive-names-for-functions-and-parameters.js +1 -1
  375. package/packages/flint/rules/naming/must-use-env-keys-from-constant.js +1 -1
  376. package/packages/flint/rules/naming/must-use-example-domain.js +1 -1
  377. package/packages/flint/rules/naming/must-use-filename-in-assert-functions.js +1 -1
  378. package/packages/flint/rules/naming/must-use-func-declaration-for-named-func.js +1 -1
  379. package/packages/flint/rules/naming/must-use-funcs-only-for-same-named-component.d.ts +3 -0
  380. package/packages/flint/rules/naming/must-use-funcs-only-for-same-named-component.js +7 -0
  381. package/packages/flint/rules/naming/must-use-function-for-component.js +1 -1
  382. package/packages/flint/rules/naming/must-use-interface-for-props.js +2 -2
  383. package/packages/flint/rules/naming/must-use-new-url-constructor.js +2 -2
  384. package/packages/flint/rules/naming/must-use-pascal-case-for-types-and-interfaces.js +1 -1
  385. package/packages/flint/rules/naming/must-use-plural-enum-const-and-singular-type.js +2 -2
  386. package/packages/flint/rules/naming/must-use-plural-in-function-names-if-returns-array.js +3 -3
  387. package/packages/flint/rules/naming/must-use-plural-names-of-files-for-arrays.js +3 -3
  388. package/packages/flint/rules/naming/must-use-resource-name-instead-of-resource.js +1 -1
  389. package/packages/flint/rules/naming/must-use-s-ending-for-natural-plurals.js +2 -2
  390. package/packages/flint/rules/naming/must-use-the-fd-prefix-for-env-variables.js +1 -1
  391. package/packages/flint/rules/naming/must-use-wrappers-to-access-first-element.js +1 -1
  392. package/packages/flint/rules/naming/no-conflicting-props.js +1 -1
  393. package/packages/flint/rules/naming/no-default-props.js +1 -1
  394. package/packages/flint/rules/naming/no-delays-in-ui-tests.js +1 -1
  395. package/packages/flint/rules/naming/no-fd-prefix-in-folders.js +2 -2
  396. package/packages/flint/rules/naming/no-get-in-function-names-without-return.js +1 -1
  397. package/packages/flint/rules/naming/no-integers-instead-of-enums.js +2 -2
  398. package/packages/flint/rules/naming/no-nullable-check.js +1 -1
  399. package/packages/flint/rules/naming/no-untyped-objects-between-components.js +2 -2
  400. package/packages/flint/rules/naming/no-use-conditional-logic-in-test-assertions.js +1 -1
  401. package/packages/flint/rules/naming/no-use-enum.js +1 -1
  402. package/packages/flint/rules/naming/no-use-id.js +1 -1
  403. package/packages/flint/rules/naming/no-utils-helpers-naming.js +2 -2
  404. package/packages/flint/rules/naming/use-on-prefix.js +2 -2
  405. package/packages/flint/rules/no-manual-resource-instantiation.d.ts +3 -0
  406. package/packages/flint/rules/no-manual-resource-instantiation.js +9 -0
  407. package/packages/flint/rules/performance/must-clean-up-event-listeners.js +1 -1
  408. package/packages/flint/rules/readability/component-function-max-lines.js +1 -1
  409. package/packages/flint/rules/readability/exported-func-above-regular.js +1 -1
  410. package/packages/flint/rules/readability/for-each-max-lines.js +1 -1
  411. package/packages/flint/rules/readability/max-lines-per-function.js +1 -1
  412. package/packages/flint/rules/readability/must-consolidate-conditional-expressions.js +1 -1
  413. package/packages/flint/rules/readability/must-do-await-data-in-one-line.js +1 -1
  414. package/packages/flint/rules/readability/must-limit-lines-without-comments.js +1 -1
  415. package/packages/flint/rules/readability/must-not-destructure-function-parameters.js +1 -1
  416. package/packages/flint/rules/readability/must-not-use-empty-lines-in-html.js +1 -1
  417. package/packages/flint/rules/readability/must-not-use-inline-await.js +1 -1
  418. package/packages/flint/rules/readability/must-return-empty-array.js +1 -1
  419. package/packages/flint/rules/readability/must-use-alt-to-describe-images.js +1 -1
  420. package/packages/flint/rules/readability/must-use-create-error.js +1 -1
  421. package/packages/flint/rules/readability/must-use-interfaces-for-complex-types.js +1 -1
  422. package/packages/flint/rules/readability/must-use-single-return-in-function.js +1 -1
  423. package/packages/flint/rules/readability/must-use-test-comments.js +1 -1
  424. package/packages/flint/rules/readability/no-centralized-error-messages.js +1 -1
  425. package/packages/flint/rules/readability/no-constructor-name-for-resource.js +1 -1
  426. package/packages/flint/rules/readability/no-long-filter-map.js +1 -1
  427. package/packages/flint/rules/readability/no-naked-query-return.js +1 -1
  428. package/packages/flint/rules/readability/no-string-length-check.js +1 -1
  429. package/packages/flint/rules/readability/no-then.js +1 -1
  430. package/packages/flint/rules/readability/no-to-lower-case-with-resource-name.js +1 -1
  431. package/packages/flint/rules/readability/no-useless-destructing.js +1 -1
  432. package/packages/flint/rules/readability/use-function-without-parameter-shortcut.js +1 -1
  433. package/packages/flint/rules/readability/use-nullish-coalescing-for-default.js +2 -2
  434. package/packages/infra/ci/ci-configs.d.ts +7 -0
  435. package/packages/infra/ci/ci-configs.js +7 -0
  436. package/packages/infra/ci/constants/ci-constants.d.ts +7 -2
  437. package/packages/infra/ci/constants/ci-constants.js +2 -1
  438. package/packages/infra/ci/constants/git-commands.d.ts +2 -0
  439. package/packages/infra/ci/constants/git-commands.js +1 -1
  440. package/packages/infra/ci/constants/job-constants.d.ts +1 -0
  441. package/packages/infra/ci/constants/job-constants.js +3 -2
  442. package/packages/infra/ci/constants/npm-commands.d.ts +12 -3
  443. package/packages/infra/ci/constants/npm-commands.js +4 -2
  444. package/packages/infra/ci/constants/paths.js +1 -1
  445. package/packages/infra/ci/external-jobs/build-and-test.d.ts +2 -0
  446. package/packages/infra/ci/external-jobs/build-and-test.js +12 -0
  447. package/packages/infra/ci/external-jobs/lint.d.ts +2 -0
  448. package/packages/infra/ci/external-jobs/lint.js +17 -0
  449. package/packages/infra/ci/external-jobs/prepare-environment.d.ts +2 -0
  450. package/packages/infra/ci/external-jobs/prepare-environment.js +13 -0
  451. package/packages/infra/ci/jobs/build-and-test.js +2 -1
  452. package/packages/infra/ci/jobs/build-db-connection-string.js +2 -1
  453. package/packages/infra/ci/jobs/build-package.js +1 -1
  454. package/packages/infra/ci/jobs/ci-auto-merge.js +1 -1
  455. package/packages/infra/ci/jobs/clear-nx-cache.js +3 -1
  456. package/packages/infra/ci/jobs/cli-create-test.js +4 -2
  457. package/packages/infra/ci/jobs/deploy-to-vercel.js +3 -2
  458. package/packages/infra/ci/jobs/drop-all-db.js +2 -2
  459. package/packages/infra/ci/jobs/lint.js +5 -4
  460. package/packages/infra/ci/jobs/manual-cleanup.js +1 -1
  461. package/packages/infra/ci/jobs/pre-action-required-check.d.ts +1 -0
  462. package/packages/infra/ci/jobs/pre-action-required-check.js +10 -0
  463. package/packages/infra/ci/jobs/publish-package.js +1 -1
  464. package/packages/infra/ci/jobs/ranksters-build-and-test.js +2 -1
  465. package/packages/infra/ci/jobs/saas-kit-test-build-and-test.js +3 -2
  466. package/packages/infra/ci/jobs/sync-saas-kit-version-to-main.js +2 -2
  467. package/packages/infra/ci/jobs/unpublish-package.js +2 -2
  468. package/packages/infra/ci/jobs/update-submodules.js +2 -2
  469. package/packages/infra/ci/setup/checkout-and-sync-submodules.js +5 -4
  470. package/packages/infra/ci/setup/cleanup.js +2 -2
  471. package/packages/infra/ci/setup/clear-nx-cache-environment.js +1 -1
  472. package/packages/infra/ci/setup/copy-playwright-report.js +3 -3
  473. package/packages/infra/ci/setup/get-build-package-info.js +1 -1
  474. package/packages/infra/ci/setup/get-latest-npm-package-info.js +1 -1
  475. package/packages/infra/ci/setup/init-db.js +1 -1
  476. package/packages/infra/ci/setup/install-local-saaskit.js +2 -2
  477. package/packages/infra/ci/setup/npm-auth.js +3 -2
  478. package/packages/infra/ci/setup/prepare-environment.js +6 -5
  479. package/packages/infra/ci/setup/prettier.js +2 -1
  480. package/packages/infra/ci/setup/resolve-and-checkout-submodule-branch.js +3 -2
  481. package/packages/infra/ci/setup/resolve-main-repo-branch.js +3 -3
  482. package/packages/infra/ci/setup/rollup-cache-cloud.js +3 -2
  483. package/packages/infra/ci/setup/setup-submodules.js +4 -2
  484. package/packages/infra/ci/setup/spawn-background-server.js +2 -2
  485. package/packages/infra/ci/setup/sync-build-artifacts.js +3 -1
  486. package/packages/infra/ci/setup/update-workspace-dependencies.js +1 -1
  487. package/packages/infra/ci/setup/verify-published-version.js +1 -1
  488. package/packages/infra/ci/submodules-config.js +2 -2
  489. package/packages/infra/ci/utils/cloud-client.js +2 -1
  490. package/packages/infra/ci/utils/create-early-infra-error.js +1 -1
  491. package/packages/infra/ci/utils/exec.d.ts +2 -2
  492. package/packages/infra/ci/utils/exec.js +1 -1
  493. package/packages/infra/ci/utils/get-submodule-dir.d.ts +1 -0
  494. package/packages/infra/ci/utils/get-submodule-dir.js +6 -0
  495. package/packages/infra/ci/utils/git-command-funcs.js +1 -1
  496. package/packages/infra/ci/utils/git.d.ts +2 -1
  497. package/packages/infra/ci/utils/git.js +6 -5
  498. package/packages/infra/ci/utils/npm-command-funcs.js +2 -2
  499. package/packages/infra/deploy/cluster/cluster-deploy-setup.js +1 -1
  500. package/packages/infra/deploy/cluster/deploy-constants.d.ts +0 -4
  501. package/packages/infra/deploy/cluster/deploy-constants.js +1 -1
  502. package/packages/infra/git/gitlab/gitlab-constants.d.ts +8 -1
  503. package/packages/infra/git/gitlab/gitlab-constants.js +4 -2
  504. package/packages/infra/git/gitlab/gitlab.js +2 -1
  505. package/packages/infra/git/labels.d.ts +2 -0
  506. package/packages/infra/git/labels.js +3 -1
  507. package/packages/infra/git/milestones.d.ts +3 -0
  508. package/packages/infra/git/milestones.js +4 -0
  509. package/packages/infra/plugins/dirname-plugin.js +1 -1
  510. package/packages/infra/tools/git/commit-msg-script.d.ts +1 -0
  511. package/packages/infra/tools/git/commit-msg-script.js +8 -0
  512. package/packages/infra/tools/git/pre-commit-script.d.ts +17 -0
  513. package/packages/infra/tools/git/pre-commit-script.js +14 -0
  514. package/packages/level2/ai/server/ai-deepinfra.js +1 -1
  515. package/packages/level2/ai/server/ai-google.js +1 -1
  516. package/packages/level2/ai/server/ai-groq.js +1 -1
  517. package/packages/level2/ai/vercel-ai-sdk/ai.js +1 -1
  518. package/packages/level2/cli/create/configs/next-cli-config.js +1 -1
  519. package/packages/level2/cli/create/configs/playwright-cli-config.js +1 -1
  520. package/packages/level2/client/component-configs/configure-default-config.js +1 -1
  521. package/packages/level2/client/component-configs/edit-resource-configs.js +2 -2
  522. package/packages/level2/client/component-configs/multi-list-config.js +1 -1
  523. package/packages/level2/client/component-configs/resource-list-configs.js +2 -2
  524. package/packages/level2/client/component-configs/workspace-settings-config.js +1 -1
  525. package/packages/level2/client/components/providers/ClientRootLayout.d.ts +8 -0
  526. package/packages/level2/client/components/providers/ClientRootLayout.js +27 -0
  527. package/packages/level2/client/components/providers/Providers.js +2 -2
  528. package/packages/level2/client/components/subscription-plan/SubscriptionPlan.funcs.d.ts +1 -1
  529. package/packages/level2/client/components/subscription-plan/SubscriptionPlan.funcs.js +1 -1
  530. package/packages/level2/client/components/subscription-plan/subscription-plan-config.js +1 -1
  531. package/packages/level2/client/components/subscription-plan/subscriptions.js +1 -1
  532. package/packages/level2/client/components/wizard/Wizard.funcs.js +1 -1
  533. package/packages/level2/client/components/wizard/WizardStepper.funcs.d.ts +10 -0
  534. package/packages/level2/client/components/wizard/WizardStepper.funcs.js +3 -2
  535. package/packages/level2/client/components/wizard/WizardStepper.js +35 -42
  536. package/packages/level2/client/components/wizard/config/wizard-edit-resource-config.js +1 -1
  537. package/packages/level2/client/components/wizard/fd-wizard-constants.d.ts +5 -0
  538. package/packages/level2/client/components/wizard/fd-wizard-constants.js +4 -2
  539. package/packages/level2/client/pages/dashboard-page/DashboardPage.funcs.js +1 -1
  540. package/packages/level2/client/pages/microsoft-page/MicrosoftPage.funcs.js +1 -1
  541. package/packages/level2/client/pages/microsoft-page/MicrosoftPage.js +2 -2
  542. package/packages/level2/client/pages/screenshot-page/TestScreenshotPage.funcs.js +1 -1
  543. package/packages/level2/client/pages/test-pages/FiltersTestPage.js +2 -2
  544. package/packages/level2/client/pages/view-page/ViewPage.funcs.js +1 -1
  545. package/packages/level2/client/payments/change-payment-method-field/ChangePaymentMethodField.funcs.js +1 -1
  546. package/packages/level2/client/payments/checkout-form/CheckoutForm.funcs.d.ts +4 -4
  547. package/packages/level2/client/payments/checkout-form/CheckoutForm.funcs.js +3 -2
  548. package/packages/level2/client/payments/payments.js +1 -1
  549. package/packages/level2/client/products/reject-action-funcs.js +1 -1
  550. package/packages/level2/client/website-scan/website-scan-data.js +2 -1
  551. package/packages/level2/client/website-scan/website-scan-result-social-media.js +2 -2
  552. package/packages/level2/common/addresses/address-types.d.ts +2 -2
  553. package/packages/level2/common/addresses/address-types.js +2 -2
  554. package/packages/level2/common/addresses/address.resource.js +1 -1
  555. package/packages/level2/common/addresses/country.resource.js +1 -1
  556. package/packages/level2/common/auth/permissions/permission-constants.d.ts +0 -2
  557. package/packages/level2/common/auth/permissions/permission-constants.js +5 -1
  558. package/packages/level2/common/auth/roles/props/role-props.js +2 -1
  559. package/packages/level2/common/auth/roles/role-ids.d.ts +0 -1
  560. package/packages/level2/common/auth/roles/role-ids.js +1 -1
  561. package/packages/level2/common/auth/roles/role-names.js +3 -1
  562. package/packages/level2/common/customers/customer-props.js +2 -1
  563. package/packages/level2/common/customers/customer.resource.js +1 -1
  564. package/packages/level2/common/demo/company.resource.js +1 -1
  565. package/packages/level2/common/demo/contact.resource.js +1 -1
  566. package/packages/level2/common/demo/deal.resource.js +1 -1
  567. package/packages/level2/common/demo/models/props/status-board-item-props.js +2 -1
  568. package/packages/level2/common/demo/models/props/status-board-props.js +2 -1
  569. package/packages/level2/common/demo/models/props/status-board-status-props.js +2 -1
  570. package/packages/level2/common/demo/props/company-props.js +2 -1
  571. package/packages/level2/common/demo/props/contact-props.js +2 -1
  572. package/packages/level2/common/demo/props/dashboard-props.js +2 -1
  573. package/packages/level2/common/demo/props/deal-props.js +2 -1
  574. package/packages/level2/common/demo/props/report-props.js +2 -1
  575. package/packages/level2/common/demo/props/ticket-props.js +2 -1
  576. package/packages/level2/common/demo/ticket.resource.js +1 -1
  577. package/packages/level2/common/dev/ai-assistent/ai-assistant.resource.js +1 -1
  578. package/packages/level2/common/dev/constants/user-ids.js +3 -1
  579. package/packages/level2/common/dev/custom-permission-resource/custom-permission-resource.resource.js +1 -1
  580. package/packages/level2/common/dev/dev-report.resource.js +1 -1
  581. package/packages/level2/common/dev/friends/friend.resource.js +1 -1
  582. package/packages/level2/common/dev/jobs/job.resource.js +1 -1
  583. package/packages/level2/common/dev/no-permission.resource.js +1 -1
  584. package/packages/level2/common/dev/persons/dev-greeting.resource.js +1 -1
  585. package/packages/level2/common/dev/persons/paper-plane.resource.js +1 -1
  586. package/packages/level2/common/dev/persons/person-to-job.resource.js +1 -1
  587. package/packages/level2/common/dev/persons/person-to-person.resource.js +1 -1
  588. package/packages/level2/common/dev/persons/person.resource-ext.js +1 -1
  589. package/packages/level2/common/dev/persons/person.resource.js +1 -1
  590. package/packages/level2/common/dev/persons/phone-brand.resource.js +1 -1
  591. package/packages/level2/common/dev/persons/ping.resource.js +1 -1
  592. package/packages/level2/common/dev/props/friend-props.js +2 -1
  593. package/packages/level2/common/dev/props/person-props.js +2 -1
  594. package/packages/level2/common/dev/singleton-dev-sandbox.resource.js +1 -1
  595. package/packages/level2/common/fd/fd-meta-toolbox/status-board/status-board.resource.js +1 -1
  596. package/packages/level2/common/fd/fd-toolbox-web/forms/form-field-bank.resource.js +1 -1
  597. package/packages/level2/common/fd/fd-toolbox-web/forms/form-field-category.resource.js +1 -1
  598. package/packages/level2/common/fd/fd-toolbox-web/forms/form-field-submission.resource.js +1 -1
  599. package/packages/level2/common/fd/fd-toolbox-web/forms/form-field-to-form-section.resource.js +1 -1
  600. package/packages/level2/common/fd/fd-toolbox-web/forms/form-field.resource.js +1 -1
  601. package/packages/level2/common/fd/fd-toolbox-web/forms/form-section.resource.js +1 -1
  602. package/packages/level2/common/fd/fd-toolbox-web/forms/form-submission.resource.js +1 -1
  603. package/packages/level2/common/fd/fd-toolbox-web/forms/form.resource.js +1 -1
  604. package/packages/level2/common/fd/fd-toolbox-web/localization/language.resource.js +1 -1
  605. package/packages/level2/common/fd/fd-toolbox-web/localization/localization-string.resource.js +1 -1
  606. package/packages/level2/common/fd/fd-toolbox-web/localization/props/localization-string-props.js +2 -1
  607. package/packages/level2/common/fd/media/screenshot-constants.d.ts +0 -1
  608. package/packages/level2/common/fd/media/screenshot-constants.js +1 -1
  609. package/packages/level2/common/infra/env-setting-keys.d.ts +1 -1
  610. package/packages/level2/common/infra/env-setting-keys.js +5 -1
  611. package/packages/level2/common/leads/google-place.resource.js +1 -1
  612. package/packages/level2/common/leads/lead-category.resource.js +1 -1
  613. package/packages/level2/common/leads/lead-email.resource.js +1 -1
  614. package/packages/level2/common/leads/lead-group.resource.js +1 -1
  615. package/packages/level2/common/leads/lead-to-lead-category.resource.js +1 -1
  616. package/packages/level2/common/leads/lead-to-lead-group.resource.js +1 -1
  617. package/packages/level2/common/leads/lead.resource.js +1 -1
  618. package/packages/level2/common/leads/props/google-place-props.js +2 -1
  619. package/packages/level2/common/leads/props/lead-category-props.js +2 -1
  620. package/packages/level2/common/leads/props/lead-email-props.js +2 -1
  621. package/packages/level2/common/leads/props/lead-group-props.js +2 -1
  622. package/packages/level2/common/leads/props/lead-props.js +3 -1
  623. package/packages/level2/common/leads/props/lead-to-lead-category-props.js +2 -1
  624. package/packages/level2/common/leads/props/lead-to-lead-group-props.js +2 -1
  625. package/packages/level2/common/models/create-user-input.js +1 -1
  626. package/packages/level2/common/models/edit-other-user-dto.js +1 -1
  627. package/packages/level2/common/models/user-created.js +1 -1
  628. package/packages/level2/common/orders/order-line-props.js +2 -1
  629. package/packages/level2/common/orders/order-props.js +2 -1
  630. package/packages/level2/common/orders/order-transaction-props.js +2 -1
  631. package/packages/level2/common/payments/feature-to-payment-plan.resource.js +1 -1
  632. package/packages/level2/common/payments/payment.resource.js +1 -1
  633. package/packages/level2/common/payments/stripe/stripe-constants.d.ts +7 -18
  634. package/packages/level2/common/payments/stripe/stripe-constants.js +5 -2
  635. package/packages/level2/common/payments/system-invoice/payment-system-invoice.resource.js +1 -1
  636. package/packages/level2/common/products/product-category-props.js +2 -1
  637. package/packages/level2/common/products/product-parameter-props.js +2 -1
  638. package/packages/level2/common/products/product-parameter.resource.js +1 -1
  639. package/packages/level2/common/products/product-props.js +2 -1
  640. package/packages/level2/common/resources/case.resource2.js +1 -1
  641. package/packages/level2/common/resources/dashboard-report.resource.js +1 -1
  642. package/packages/level2/common/resources/dashboard.resource.js +1 -1
  643. package/packages/level2/common/resources/feed-entry.resource.js +1 -1
  644. package/packages/level2/common/resources/integration-subscription.resource.js +1 -1
  645. package/packages/level2/common/resources/item.resource.js +1 -1
  646. package/packages/level2/common/resources/oauth-service.resource.js +1 -1
  647. package/packages/level2/common/resources/order-line.resource.js +1 -1
  648. package/packages/level2/common/resources/order-transaction.resource.js +1 -1
  649. package/packages/level2/common/resources/order.resource.js +1 -1
  650. package/packages/level2/common/resources/product-category.resource.js +1 -1
  651. package/packages/level2/common/resources/product-media.resource.js +1 -1
  652. package/packages/level2/common/resources/product.resource.js +1 -1
  653. package/packages/level2/common/resources/props/feed-entry-props.js +2 -1
  654. package/packages/level2/common/resources/props/oauth-service-props.js +2 -1
  655. package/packages/level2/common/resources/props/system-setting-props.js +2 -1
  656. package/packages/level2/common/resources/props/workspace-setting-props.js +2 -1
  657. package/packages/level2/common/resources/search.resource.js +1 -1
  658. package/packages/level2/common/resources/searchable-resource.resource.js +1 -1
  659. package/packages/level2/common/resources/system-setting.resource.js +1 -1
  660. package/packages/level2/common/resources/website-scan-result.resource.js +1 -1
  661. package/packages/level2/common/resources/workspace-setting.resource.js +1 -1
  662. package/packages/level2/common/shipment/shipment-provider.resource.js +1 -1
  663. package/packages/level2/common/shipment/shipment.resource.js +1 -1
  664. package/packages/level2/common/stores/store-props.js +2 -1
  665. package/packages/level2/common/stores/store.resource.js +1 -1
  666. package/packages/level2/common/tutorial/student.resource.js +1 -1
  667. package/packages/level2/common/tutorial/teacher.resource.d.ts +1 -0
  668. package/packages/level2/common/tutorial/teacher.resource.js +1 -1
  669. package/packages/level2/common/website-scan/analytics-scan.js +1 -1
  670. package/packages/level2/common/website-scan/website-platform-checking.js +1 -1
  671. package/packages/level2/db/adapters/postgres-adapter.d.ts +1 -0
  672. package/packages/level2/db/adapters/postgres-adapter.js +7 -3
  673. package/packages/level2/db/adapters/sqlite-adapter.d.ts +1 -0
  674. package/packages/level2/db/adapters/sqlite-adapter.js +4 -3
  675. package/packages/level2/db/constants/db-constants.d.ts +16 -10
  676. package/packages/level2/db/constants/db-constants.js +6 -2
  677. package/packages/level2/db/constants/schema-names.d.ts +49 -0
  678. package/packages/level2/db/constants/schema-names.js +10 -0
  679. package/packages/level2/db/db-config.d.ts +1 -1
  680. package/packages/level2/db/db-config.js +3 -3
  681. package/packages/level2/db/db-connection.d.ts +1 -0
  682. package/packages/level2/db/db-connection.js +4 -3
  683. package/packages/level2/db/db-schema.js +1 -1
  684. package/packages/level2/db/drizzle-queries.js +3 -2
  685. package/packages/level2/db/guards/db-type-guards.js +4 -1
  686. package/packages/level2/db/types/db-types.d.ts +11 -4
  687. package/packages/level2/db/utils/run-migration-command.d.ts +3 -0
  688. package/packages/level2/db/utils/run-migration-command.js +7 -4
  689. package/packages/level2/db/utils/schema-table-names.d.ts +3 -0
  690. package/packages/level2/db/utils/schema-table-names.js +8 -0
  691. package/packages/level2/enricher/integrations/google-spreadsheet.js +2 -2
  692. package/packages/level2/fd-app-toolbox/constants/form-constants.d.ts +10 -0
  693. package/packages/level2/fd-app-toolbox/constants/form-constants.js +4 -0
  694. package/packages/level2/fd-app-toolbox/constants/web-socket-methods.js +3 -1
  695. package/packages/level2/fd-app-toolbox/edit-password-form/EditPasswordForm.funcs.js +1 -1
  696. package/packages/level2/fd-app-toolbox/edit-password-form/EditPasswordForm.js +92 -138
  697. package/packages/level2/fd-app-toolbox/edit-user-form/EditUserForm.funcs.d.ts +14 -12
  698. package/packages/level2/fd-app-toolbox/edit-user-form/EditUserForm.funcs.js +4 -1
  699. package/packages/level2/fd-app-toolbox/edit-user-form/EditUserForm.js +4 -3
  700. package/packages/level2/fd-app-toolbox/edit-user-sheet/EditUserSheet.funcs.js +1 -1
  701. package/packages/level2/fd-app-toolbox/edit-user-sheet/EditUserSheet.js +2 -2
  702. package/packages/level2/fd-app-toolbox/forgot-password-form/ForgotPasswordForm.funcs.js +2 -1
  703. package/packages/level2/fd-app-toolbox/forgot-password-form/ForgotPasswordForm.js +3 -3
  704. package/packages/level2/fd-app-toolbox/forgot-password-form/forgot-password-messages-constants.js +3 -1
  705. package/packages/level2/fd-app-toolbox/layout/client-layout/client-layout-config.js +2 -2
  706. package/packages/level2/fd-app-toolbox/layout/client-root/ClientRoot.funcs.js +1 -1
  707. package/packages/level2/fd-app-toolbox/layout/client-root/ClientRoot.js +31 -20
  708. package/packages/level2/fd-app-toolbox/layout/sidebar/Sidebar.funcs.js +1 -1
  709. package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-dropdown-menu/SidebarDropdownMenu.funcs.js +1 -1
  710. package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-dropdown-menu/SidebarDropdownMenu.js +2 -2
  711. package/packages/level2/fd-app-toolbox/layout/sidebar/sidebar-resource-names-cache.js +1 -1
  712. package/packages/level2/fd-app-toolbox/layout/toolbar/Toolbar.funcs.js +1 -1
  713. package/packages/level2/fd-app-toolbox/login-form/LoginForm.funcs.js +1 -1
  714. package/packages/level2/fd-app-toolbox/login-form/LoginForm.js +7 -5
  715. package/packages/level2/fd-app-toolbox/login-form/facebook-login.js +6 -3
  716. package/packages/level2/fd-app-toolbox/login-form/google-login.d.ts +1 -0
  717. package/packages/level2/fd-app-toolbox/login-form/google-login.js +5 -3
  718. package/packages/level2/fd-app-toolbox/login-form/microsoft-login.d.ts +6 -2
  719. package/packages/level2/fd-app-toolbox/login-form/microsoft-login.js +7 -4
  720. package/packages/level2/fd-app-toolbox/login-form/standard-login.js +1 -1
  721. package/packages/level2/fd-app-toolbox/menu/notifications-menu/NotificationMenu.funcs.js +2 -2
  722. package/packages/level2/fd-app-toolbox/menu/notifications-menu/notification-list/NotificationList.funcs.js +1 -1
  723. package/packages/level2/fd-app-toolbox/menu/themes.d.ts +1 -0
  724. package/packages/level2/fd-app-toolbox/menu/themes.js +3 -1
  725. package/packages/level2/fd-app-toolbox/menu/top-menu/top-menu-item/TopMenuItem.funcs.js +1 -1
  726. package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/UserDropdownMenu.d.ts +30 -5
  727. package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/UserDropdownMenu.funcs.js +1 -1
  728. package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/user-dropdown-menu-item/UserDropdownMenuItem.d.ts +17 -8
  729. package/packages/level2/fd-app-toolbox/menu/user-dropdown-menu/user-dropdown-menu-item/UserDropdownMenuItem.funcs.js +1 -1
  730. package/packages/level2/fd-app-toolbox/menu/visible-workspace-picker/VisibleWorkspacePicker.funcs.js +1 -1
  731. package/packages/level2/fd-app-toolbox/menu/workspace-picker/WorkspacePicker.funcs.d.ts +1 -1
  732. package/packages/level2/fd-app-toolbox/menu/workspace-picker/WorkspacePicker.funcs.js +1 -1
  733. package/packages/level2/fd-app-toolbox/menu/workspace-picker/WorkspacePicker.js +10 -9
  734. package/packages/level2/fd-app-toolbox/models/screens-result.js +1 -1
  735. package/packages/level2/fd-app-toolbox/models/searchable-resource-result.js +1 -1
  736. package/packages/level2/fd-app-toolbox/passwords/edit-password-dto.js +2 -1
  737. package/packages/level2/fd-app-toolbox/passwords/passwords-api.js +1 -1
  738. package/packages/level2/fd-app-toolbox/passwords/reset-password-dto.d.ts +0 -4
  739. package/packages/level2/fd-app-toolbox/passwords/reset-password-dto.js +1 -4
  740. package/packages/level2/fd-app-toolbox/providers/ThemeProvider/theme.js +2 -1
  741. package/packages/level2/fd-app-toolbox/register-form/RegisterForm.funcs.js +1 -1
  742. package/packages/level2/fd-app-toolbox/register-form/RegisterForm.js +10 -8
  743. package/packages/level2/fd-app-toolbox/report/Chart.d.ts +1 -1
  744. package/packages/level2/fd-app-toolbox/report/Chart.js +130 -121
  745. package/packages/level2/fd-app-toolbox/report/ReportCard.funcs.js +1 -1
  746. package/packages/level2/fd-app-toolbox/report/ReportChart.funcs.js +1 -1
  747. package/packages/level2/fd-app-toolbox/report/ReportComponent.funcs.js +1 -1
  748. package/packages/level2/fd-app-toolbox/reports/dashboard-report-data.resource.js +1 -1
  749. package/packages/level2/fd-app-toolbox/reports/report-chart-series.resource.js +1 -1
  750. package/packages/level2/fd-app-toolbox/reports/report-with-data.resource.js +1 -1
  751. package/packages/level2/fd-app-toolbox/reports/report.resource.js +1 -1
  752. package/packages/level2/fd-app-toolbox/reset-password-form/ResetPasswordForm.funcs.js +1 -1
  753. package/packages/level2/fd-app-toolbox/reset-password-form/ResetPasswordForm.js +9 -8
  754. package/packages/level2/fd-app-toolbox/resources/notification/notification.resource.js +1 -1
  755. package/packages/level2/fd-app-toolbox/resources/status-board/status-board-item.resource.js +1 -1
  756. package/packages/level2/fd-app-toolbox/resources/status-board/status-board-status.resource.js +1 -1
  757. package/packages/level2/fd-app-toolbox/search/Search.funcs.js +1 -1
  758. package/packages/level2/fd-app-toolbox/search/search-dialog/SearchDialog.d.ts +7 -1
  759. package/packages/level2/fd-app-toolbox/search/search-dialog/SearchDialog.funcs.js +3 -2
  760. package/packages/level2/fd-app-toolbox/search/search-result/SearchResult.d.ts +4 -1
  761. package/packages/level2/fd-app-toolbox/search/search-result/SearchResult.funcs.js +1 -1
  762. package/packages/level2/fd-app-toolbox/search/search-searchable-resource-results/SearchSearchableResourceResult.d.ts +10 -7
  763. package/packages/level2/fd-app-toolbox/search/search-searchable-resource-results/SearchSearchableResourceResult.funcs.d.ts +1 -1
  764. package/packages/level2/fd-app-toolbox/search/search-searchable-resource-results/SearchSearchableResourceResult.funcs.js +2 -1
  765. package/packages/level2/fd-app-toolbox/search/search-searchable-resource-results/SearchSearchableResourceResults.d.ts +15 -7
  766. package/packages/level2/fd-app-toolbox/server/base-resources/props/fill-base-resource-props.js +1 -1
  767. package/packages/level2/fd-app-toolbox/server/base-resources/props/fill-workspace-resource-props.js +1 -1
  768. package/packages/level2/fd-app-toolbox/server/infra/workspaces/workspace-db.d.ts +2 -1
  769. package/packages/level2/fd-app-toolbox/server/infra/workspaces/workspace-db.js +1 -1
  770. package/packages/level2/fd-app-toolbox/server/layout/sidebar/sidebar-resources.js +1 -1
  771. package/packages/level2/fd-app-toolbox/server/layout/signed-in-layout/SignedInLayout.js +2 -2
  772. package/packages/level2/fd-app-toolbox/server/users/user-db.js +1 -1
  773. package/packages/level2/fd-app-toolbox/server/workspace/visible-workspaces.js +1 -1
  774. package/packages/level2/fd-app-toolbox/services/web-socket-client.js +1 -1
  775. package/packages/level2/fd-app-toolbox/status-board/StatusBoard.funcs.js +1 -1
  776. package/packages/level2/fd-app-toolbox/user-dto.d.ts +0 -1
  777. package/packages/level2/fd-app-toolbox/user-dto.js +5 -1
  778. package/packages/level2/fd-app-toolbox/user-list/UserList.d.ts +1 -0
  779. package/packages/level2/fd-app-toolbox/user-list/UserList.funcs.js +2 -2
  780. package/packages/level2/fd-app-toolbox/user-list/UserList.js +3 -3
  781. package/packages/level2/fd-component-toolbox/animation/LabelAnimation.d.ts +3 -9
  782. package/packages/level2/fd-component-toolbox/animation/LabelAnimation.js +3 -2
  783. package/packages/level2/fd-component-toolbox/avatar/Avatar.d.ts +9 -6
  784. package/packages/level2/fd-component-toolbox/avatar/Avatar.js +1 -1
  785. package/packages/level2/fd-component-toolbox/back-button/BackButton.d.ts +3 -3
  786. package/packages/level2/fd-component-toolbox/badge-toggle-list/BadgeToggleList.funcs.js +1 -1
  787. package/packages/level2/fd-component-toolbox/big-calendar/BigCalendar.funcs.js +3 -2
  788. package/packages/level2/fd-component-toolbox/button/Button.d.ts +18 -14
  789. package/packages/level2/fd-component-toolbox/button/Button.funcs.js +1 -1
  790. package/packages/level2/fd-component-toolbox/button/Button.js +60 -117
  791. package/packages/level2/fd-component-toolbox/calendar/Calendar.d.ts +4 -6
  792. package/packages/level2/fd-component-toolbox/calendar/Calendar.funcs.js +1 -1
  793. package/packages/level2/fd-component-toolbox/calendar/Calendar.js +3 -2
  794. package/packages/level2/fd-component-toolbox/calendar/calendar-constants.js +4 -1
  795. package/packages/level2/fd-component-toolbox/client/framework/index.js +3 -3
  796. package/packages/level2/fd-component-toolbox/datepicker/DatePicker.d.ts +13 -13
  797. package/packages/level2/fd-component-toolbox/datepicker/DatePicker.funcs.js +2 -2
  798. package/packages/level2/fd-component-toolbox/dialog/YesOrNoDialog.funcs.js +1 -1
  799. package/packages/level2/fd-component-toolbox/drag-and-drop/DragDropContext.d.ts +1 -1
  800. package/packages/level2/fd-component-toolbox/drag-and-drop/Draggable.js +7 -2
  801. package/packages/level2/fd-component-toolbox/drag-and-drop/Droppable.d.ts +1 -1
  802. package/packages/level2/fd-component-toolbox/dropdown-menu/DropdownMenu.d.ts +38 -15
  803. package/packages/level2/fd-component-toolbox/dynamic-layout/DynamicLayoutDragAndDrop.d.ts +8 -3
  804. package/packages/level2/fd-component-toolbox/dynamic-layout/DynamicLayoutDragAndDrop.funcs.d.ts +1 -1
  805. package/packages/level2/fd-component-toolbox/dynamic-layout/DynamicLayoutDragAndDrop.funcs.js +3 -2
  806. package/packages/level2/fd-component-toolbox/fade-out-text/FadeOutText.d.ts +12 -12
  807. package/packages/level2/fd-component-toolbox/fade-out-text/FadeOutText.funcs.js +1 -1
  808. package/packages/level2/fd-component-toolbox/fade-out-text/FadeOutText.js +3 -2
  809. package/packages/level2/fd-component-toolbox/form/Form.d.ts +2 -2
  810. package/packages/level2/fd-component-toolbox/image-radio-group/ImageRadioGroup.js +2 -2
  811. package/packages/level2/fd-component-toolbox/input/Input.d.ts +29 -10
  812. package/packages/level2/fd-component-toolbox/input/Input.funcs.js +1 -1
  813. package/packages/level2/fd-component-toolbox/input/Input.js +10 -7
  814. package/packages/level2/fd-component-toolbox/label/Label.d.ts +3 -2
  815. package/packages/level2/fd-component-toolbox/label/Label.js +3 -2
  816. package/packages/level2/fd-component-toolbox/label/label-constants.d.ts +6 -0
  817. package/packages/level2/fd-component-toolbox/label/label-constants.js +4 -0
  818. package/packages/level2/fd-component-toolbox/list/list-item/ListItem.funcs.js +3 -1
  819. package/packages/level2/fd-component-toolbox/list/list-item/ListItem.js +2 -2
  820. package/packages/level2/fd-component-toolbox/markdown/Markdown.funcs.js +1 -1
  821. package/packages/level2/fd-component-toolbox/markdown/Markdown.js +5 -4
  822. package/packages/level2/fd-component-toolbox/markdown/markdown-parser.js +4 -2
  823. package/packages/level2/fd-component-toolbox/multiselect/Multiselect.d.ts +2 -2
  824. package/packages/level2/fd-component-toolbox/multiselect/Multiselect.funcs.js +2 -1
  825. package/packages/level2/fd-component-toolbox/multiselect/Multiselect.js +2 -1
  826. package/packages/level2/fd-component-toolbox/multiselect/hooks/use-multi-select.js +1 -1
  827. package/packages/level2/fd-component-toolbox/navigation/Navigation.d.ts +7 -7
  828. package/packages/level2/fd-component-toolbox/navigation/navigation-item/NavigationItem.d.ts +6 -1
  829. package/packages/level2/fd-component-toolbox/navigation/navigation-item/NavigationItem.funcs.js +3 -1
  830. package/packages/level2/fd-component-toolbox/rich-text/RichText.funcs.js +3 -3
  831. package/packages/level2/fd-component-toolbox/rich-text/rich-text-constants.js +4 -1
  832. package/packages/level2/fd-component-toolbox/save-status/SaveStatus.d.ts +10 -5
  833. package/packages/level2/fd-component-toolbox/save-status/SaveStatus.js +3 -3
  834. package/packages/level2/fd-component-toolbox/select/Select.d.ts +21 -18
  835. package/packages/level2/fd-component-toolbox/select/Select.js +11 -8
  836. package/packages/level2/fd-component-toolbox/sheet/Sheet.js +4 -5
  837. package/packages/level2/fd-component-toolbox/sizing/sizing.js +2 -1
  838. package/packages/level2/fd-component-toolbox/slide-toggle/SlideToggle.d.ts +14 -9
  839. package/packages/level2/fd-component-toolbox/slide-toggle/SlideToggle.js +3 -2
  840. package/packages/level2/fd-component-toolbox/spinner/Spinner.d.ts +2 -1
  841. package/packages/level2/fd-component-toolbox/spinner/Spinner.js +6 -3
  842. package/packages/level2/fd-component-toolbox/switch/Switch.funcs.js +1 -1
  843. package/packages/level2/fd-component-toolbox/table-element-suffixes.js +4 -1
  844. package/packages/level2/fd-component-toolbox/textarea/TextArea.funcs.js +1 -1
  845. package/packages/level2/fd-component-toolbox/toaster/Toaster.funcs.js +1 -1
  846. package/packages/level2/fd-component-toolbox/tooltip/Tooltip.d.ts +3 -3
  847. package/packages/level2/fd-component-toolbox/tooltip/Tooltip.js +3 -3
  848. package/packages/level2/meta/api/hooks/use-ui-resource-meta.js +1 -1
  849. package/packages/level2/meta/api/meta-odata.js +1 -1
  850. package/packages/level2/meta/auth/auth-guards.js +1 -1
  851. package/packages/level2/meta/auth/auth-handler.js +1 -1
  852. package/packages/level2/meta/auth/login.js +2 -1
  853. package/packages/level2/meta/auth/logins.js +3 -1
  854. package/packages/level2/meta/auth/permissions/permission-checker.js +1 -1
  855. package/packages/level2/meta/browsers/base-multi-browser/BaseMultiBrowser.funcs.js +1 -1
  856. package/packages/level2/meta/browsers/base-multi-browser/base-multi-browser-dialog/BaseMultiBrowserDialog.funcs.js +2 -2
  857. package/packages/level2/meta/browsers/browser/Browser.funcs.js +1 -1
  858. package/packages/level2/meta/browsers/browser/browser-dialog/BrowserDialog.funcs.js +1 -1
  859. package/packages/level2/meta/browsers/browser-type.d.ts +1 -0
  860. package/packages/level2/meta/browsers/browser-type.js +4 -1
  861. package/packages/level2/meta/browsers/many-to-many-browser/ManyToManyBrowser.funcs.js +1 -1
  862. package/packages/level2/meta/browsers/multi-browser/MultiBrowser.funcs.js +1 -1
  863. package/packages/level2/meta/card-list/CardList.funcs.js +1 -1
  864. package/packages/level2/meta/card-list/card-models.d.ts +2 -2
  865. package/packages/level2/meta/card-list/config/card-config.js +1 -1
  866. package/packages/level2/meta/card-list/data-card/DataCard.funcs.js +1 -1
  867. package/packages/level2/meta/card-list/data-card/data-card-content/DataCardContent.funcs.d.ts +1 -2
  868. package/packages/level2/meta/card-list/data-card/data-card-content/DataCardContent.funcs.js +2 -1
  869. package/packages/level2/meta/card-list/data-card/data-card-content/DataCardContent.js +3 -79
  870. package/packages/level2/meta/card-list/data-card/data-card-content/DataCardContent.render.funcs.d.ts +4 -0
  871. package/packages/level2/meta/card-list/data-card/data-card-content/DataCardContent.render.funcs.js +86 -0
  872. package/packages/level2/meta/client/framework/hooks.js +2 -1
  873. package/packages/level2/meta/client/framework/index.js +1 -1
  874. package/packages/level2/meta/client/layout.js +1 -1
  875. package/packages/level2/meta/comment/Comment.js +2 -2
  876. package/packages/level2/meta/comment/CommentList.d.ts +5 -5
  877. package/packages/level2/meta/comment/CommentList.funcs.js +2 -2
  878. package/packages/level2/meta/components/edit-image/EditImage.funcs.js +1 -1
  879. package/packages/level2/meta/components/edit-image/EditImageActionMenu.js +6 -5
  880. package/packages/level2/meta/components/edit-image/EditImageDropdownMenu.js +6 -5
  881. package/packages/level2/meta/components/file-upload/FileUpload.d.ts +1 -8
  882. package/packages/level2/meta/components/file-upload/FileUpload.funcs.js +2 -1
  883. package/packages/level2/meta/components/multi-list/MultiList.d.ts +17 -11
  884. package/packages/level2/meta/components/multi-list/MultiList.funcs.js +1 -1
  885. package/packages/level2/meta/components/multi-list/MultiList.js +15 -12
  886. package/packages/level2/meta/components/multi-list/MultiListEditResource.d.ts +10 -1
  887. package/packages/level2/meta/components/multi-list/multi-list-constants.d.ts +6 -0
  888. package/packages/level2/meta/components/multi-list/multi-list-constants.js +4 -0
  889. package/packages/level2/meta/components/multi-list/multi-list-types.d.ts +5 -4
  890. package/packages/level2/meta/components/multi-list/multi-list-types.js +2 -2
  891. package/packages/level2/meta/components/multi-list/use-multi-list-edit-resource-config.js +1 -1
  892. package/packages/level2/meta/components/related-resources/RelatedResources.funcs.js +1 -1
  893. package/packages/level2/meta/components/related-resources/related-property.js +1 -1
  894. package/packages/level2/meta/components/related-resources/related-resources-component.js +1 -1
  895. package/packages/level2/meta/components/user-settings/RolesSettingsLinks.d.ts +2 -1
  896. package/packages/level2/meta/components/user-settings/RolesSettingsLinks.js +4 -1
  897. package/packages/level2/meta/constants/image-action-labels.d.ts +6 -0
  898. package/packages/level2/meta/constants/image-action-labels.js +6 -0
  899. package/packages/level2/meta/constants/meta-error-messages-constants.js +10 -1
  900. package/packages/level2/meta/constants/property-type-formats.d.ts +0 -3
  901. package/packages/level2/meta/constants/property-type-formats.js +5 -1
  902. package/packages/level2/meta/constants/relation-action-labels.d.ts +4 -0
  903. package/packages/level2/meta/constants/relation-action-labels.js +4 -0
  904. package/packages/level2/meta/constants/toolbox-users.js +1 -1
  905. package/packages/level2/meta/constants/user-names.d.ts +0 -8
  906. package/packages/level2/meta/constants/user-names.js +2 -2
  907. package/packages/level2/meta/core/auth-resource-meta.js +1 -1
  908. package/packages/level2/meta/core/property-meta.js +1 -1
  909. package/packages/level2/meta/core/property-types.js +1 -1
  910. package/packages/level2/meta/core/relation.js +1 -1
  911. package/packages/level2/meta/core/resource-description/resource-description.js +1 -1
  912. package/packages/level2/meta/core/resource-description/resource-descriptions.js +2 -1
  913. package/packages/level2/meta/core/resource-meta.js +1 -1
  914. package/packages/level2/meta/core/resource-singletons.js +1 -1
  915. package/packages/level2/meta/core/resources/blob/blob-urls.js +1 -1
  916. package/packages/level2/meta/core/resources/blob/blob.resource.js +1 -1
  917. package/packages/level2/meta/core/resources/comment.resource.js +1 -1
  918. package/packages/level2/meta/core/resources/features/feature.resource.js +1 -1
  919. package/packages/level2/meta/core/resources/payment-plan-feature.resource.js +1 -1
  920. package/packages/level2/meta/core/resources/payment-plan.resource.js +1 -1
  921. package/packages/level2/meta/core/resources/permissions/permission-package-to-permission.resource.js +1 -1
  922. package/packages/level2/meta/core/resources/permissions/permission-package.resource.js +1 -1
  923. package/packages/level2/meta/core/resources/pricing.resource.js +1 -1
  924. package/packages/level2/meta/core/resources/resources/resource-property.resource.js +1 -1
  925. package/packages/level2/meta/core/resources/resources/resource.resource.js +1 -1
  926. package/packages/level2/meta/core/resources/roles/role-feature.resource.js +1 -1
  927. package/packages/level2/meta/core/resources/roles/role-to-permission-package.resource.js +1 -1
  928. package/packages/level2/meta/core/resources/roles/role-to-permission.resource.js +1 -1
  929. package/packages/level2/meta/core/resources/roles/role.resource.js +1 -1
  930. package/packages/level2/meta/core/resources/usage-limit/usage-limit.resource.js +1 -1
  931. package/packages/level2/meta/core/resources/users/user-activity-overview.resource.js +1 -1
  932. package/packages/level2/meta/core/resources/users/user-feature.resource.js +1 -1
  933. package/packages/level2/meta/core/resources/users/user-role.resource.js +1 -1
  934. package/packages/level2/meta/core/resources/users/user-setting.resource.js +1 -1
  935. package/packages/level2/meta/core/resources/users/user-to-workspace.resource.js +1 -1
  936. package/packages/level2/meta/core/resources/users/user-visible-workspace.resource.js +1 -1
  937. package/packages/level2/meta/core/resources/users/user-workspace-invite.resource.js +1 -1
  938. package/packages/level2/meta/core/resources/users/user.resource.js +1 -1
  939. package/packages/level2/meta/core/resources/workspace/workspace-resource.js +1 -1
  940. package/packages/level2/meta/core/resources/workspace/workspace-to-workspace.resource.js +1 -1
  941. package/packages/level2/meta/core/resources/workspace/workspace.resource.js +1 -1
  942. package/packages/level2/meta/core/ui-property-meta-old.js +1 -1
  943. package/packages/level2/meta/crud/permissions/crud-permission-checker.js +1 -1
  944. package/packages/level2/meta/decorators/access-by-user-id.js +1 -1
  945. package/packages/level2/meta/decorators/access-by-workspace-id.js +1 -1
  946. package/packages/level2/meta/decorators/allowed-crud-actions.js +1 -1
  947. package/packages/level2/meta/decorators/big-text.js +1 -1
  948. package/packages/level2/meta/decorators/blob-image.js +1 -1
  949. package/packages/level2/meta/decorators/colorful.js +1 -1
  950. package/packages/level2/meta/decorators/concat-description.js +1 -1
  951. package/packages/level2/meta/decorators/create-only-resource.js +1 -1
  952. package/packages/level2/meta/decorators/currency.js +1 -1
  953. package/packages/level2/meta/decorators/date-only.js +1 -1
  954. package/packages/level2/meta/decorators/db-index.js +1 -1
  955. package/packages/level2/meta/decorators/default-sort.js +1 -1
  956. package/packages/level2/meta/decorators/description-based-on-property-value.js +1 -1
  957. package/packages/level2/meta/decorators/description-property.js +1 -1
  958. package/packages/level2/meta/decorators/display-name.js +1 -1
  959. package/packages/level2/meta/decorators/dynamic.js +1 -1
  960. package/packages/level2/meta/decorators/email.js +1 -1
  961. package/packages/level2/meta/decorators/expand-description-properties.js +1 -1
  962. package/packages/level2/meta/decorators/file-upload.js +1 -1
  963. package/packages/level2/meta/decorators/flags-enum.js +1 -1
  964. package/packages/level2/meta/decorators/get-only-resource.js +1 -1
  965. package/packages/level2/meta/decorators/icon.d.ts +2 -0
  966. package/packages/level2/meta/decorators/icon.js +1 -1
  967. package/packages/level2/meta/decorators/integer.js +1 -1
  968. package/packages/level2/meta/decorators/label.js +1 -1
  969. package/packages/level2/meta/decorators/markdown.js +1 -1
  970. package/packages/level2/meta/decorators/not-a-resource.js +1 -1
  971. package/packages/level2/meta/decorators/not-colorful.js +1 -1
  972. package/packages/level2/meta/decorators/not-displayable.js +1 -1
  973. package/packages/level2/meta/decorators/not-edit-displayable.js +1 -1
  974. package/packages/level2/meta/decorators/not-editable-from-outside.js +1 -1
  975. package/packages/level2/meta/decorators/not-filter-displayable.js +1 -1
  976. package/packages/level2/meta/decorators/not-list-displayable.js +1 -1
  977. package/packages/level2/meta/decorators/not-relation.js +1 -1
  978. package/packages/level2/meta/decorators/outside-excluded.js +1 -1
  979. package/packages/level2/meta/decorators/permission-checker-for.d.ts +10 -8
  980. package/packages/level2/meta/decorators/permission-checker-for.js +2 -3
  981. package/packages/level2/meta/decorators/phone-number.js +1 -1
  982. package/packages/level2/meta/decorators/plural-name.js +1 -1
  983. package/packages/level2/meta/decorators/prefer-plural-name.js +1 -1
  984. package/packages/level2/meta/decorators/prefer-singular-name.js +1 -1
  985. package/packages/level2/meta/decorators/priority.js +1 -1
  986. package/packages/level2/meta/decorators/required-if-other-are-present.js +1 -1
  987. package/packages/level2/meta/decorators/required-if-prop-has-value.js +1 -1
  988. package/packages/level2/meta/decorators/required.js +1 -1
  989. package/packages/level2/meta/decorators/resource-id.js +1 -1
  990. package/packages/level2/meta/decorators/resource-property-id.js +1 -1
  991. package/packages/level2/meta/decorators/rich-text.js +1 -1
  992. package/packages/level2/meta/decorators/searchable.js +1 -1
  993. package/packages/level2/meta/decorators/singleton.js +1 -1
  994. package/packages/level2/meta/decorators/transient-resource.js +1 -1
  995. package/packages/level2/meta/decorators/ui-priority.js +1 -1
  996. package/packages/level2/meta/decorators/ui-relation-priority.js +1 -1
  997. package/packages/level2/meta/decorators/unique.js +1 -1
  998. package/packages/level2/meta/decorators/url.js +1 -1
  999. package/packages/level2/meta/edit-resource/EditResource.funcs.d.ts +3 -1
  1000. package/packages/level2/meta/edit-resource/EditResource.funcs.js +2 -2
  1001. package/packages/level2/meta/edit-resource/EditResource.js +13 -9
  1002. package/packages/level2/meta/edit-resource/EditResourceHeader.funcs.js +1 -1
  1003. package/packages/level2/meta/edit-resource/EditResourceSheet.d.ts +7 -9
  1004. package/packages/level2/meta/edit-resource/EditResourceSheet.funcs.js +1 -1
  1005. package/packages/level2/meta/edit-resource/EditResourceTabs.funcs.js +2 -2
  1006. package/packages/level2/meta/edit-resource/apply-value-changes.js +1 -1
  1007. package/packages/level2/meta/edit-resource/config/custom-filter-config-provider.js +1 -1
  1008. package/packages/level2/meta/edit-resource/config/edit-resource-configs.d.ts +1 -0
  1009. package/packages/level2/meta/edit-resource/config/edit-resource-configs.js +6 -3
  1010. package/packages/level2/meta/edit-resource/edit-link/EditLink.funcs.js +1 -1
  1011. package/packages/level2/meta/edit-resource/edit-resource-constants.d.ts +2 -2
  1012. package/packages/level2/meta/edit-resource/edit-resource-constants.js +3 -1
  1013. package/packages/level2/meta/edit-resource/edit-resource-dialog/EditResourceDialog.funcs.js +1 -1
  1014. package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourceBlobField.funcs.js +1 -1
  1015. package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourceEnumField.funcs.js +1 -1
  1016. package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourceFlagsEnumField.funcs.js +1 -1
  1017. package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourceImageField.funcs.js +1 -1
  1018. package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourcePropertyBlock.d.ts +1 -1
  1019. package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourcePropertyBlock.funcs.js +1 -1
  1020. package/packages/level2/meta/edit-resource/edit-resource-property-block/EditResourcePropertyBlock.js +2 -1
  1021. package/packages/level2/meta/edit-resource/edit-resource-property-field/EditResourcePropertyField.funcs.js +1 -1
  1022. package/packages/level2/meta/edit-resource/edit-resource-validation.js +1 -1
  1023. package/packages/level2/meta/edit-resource/edit-resources-constants.js +1 -1
  1024. package/packages/level2/meta/edit-resource/hooks/use-edit-resource-ref.js +1 -1
  1025. package/packages/level2/meta/edit-resource/save-complete-context.js +1 -1
  1026. package/packages/level2/meta/edit-resource/services/blob-components.js +1 -1
  1027. package/packages/level2/meta/edit-resource/services/edit-resource-components.js +1 -1
  1028. package/packages/level2/meta/edit-resource/services/edit-resource-relations.js +1 -1
  1029. package/packages/level2/meta/edit-resource/services/edit-resources.js +1 -1
  1030. package/packages/level2/meta/edit-resource/services/form-validations.js +1 -1
  1031. package/packages/level2/meta/edit-resource/services/property-metas.js +1 -1
  1032. package/packages/level2/meta/edit-resource/services/use-edit-resource-config.js +1 -1
  1033. package/packages/level2/meta/fd-meta-toolbox-service.js +1 -1
  1034. package/packages/level2/meta/filtering/filter/Filter.funcs.js +1 -1
  1035. package/packages/level2/meta/filtering/filter/Filter.js +1 -1
  1036. package/packages/level2/meta/filtering/filter/filter-constants.d.ts +5 -0
  1037. package/packages/level2/meta/filtering/filter/filter-constants.js +2 -2
  1038. package/packages/level2/meta/filtering/filter/filters/boolean-filter/BooleanFilter.funcs.d.ts +10 -4
  1039. package/packages/level2/meta/filtering/filter/filters/boolean-filter/BooleanFilter.funcs.js +6 -1
  1040. package/packages/level2/meta/filtering/filter-list-positions.d.ts +3 -3
  1041. package/packages/level2/meta/filtering/filter-list-positions.js +2 -2
  1042. package/packages/level2/meta/filtering/resource-filter-list/ResourceFilterList.funcs.js +3 -2
  1043. package/packages/level2/meta/filtering/resource-filter-list/ResourceFilterList.js +6 -6
  1044. package/packages/level2/meta/filtering/resource-filter-list/resource-filter-list-ids.js +3 -1
  1045. package/packages/level2/meta/filtering/resource-filter-list/resource-filter-lists.js +1 -1
  1046. package/packages/level2/meta/filtering/resource-filter-list/use-resource-filter-list-display.d.ts +9 -1
  1047. package/packages/level2/meta/filtering/resource-filter-list/use-resource-filter-list-display.js +2 -1
  1048. package/packages/level2/meta/layout/events.js +1 -1
  1049. package/packages/level2/meta/meta-providers.js +1 -1
  1050. package/packages/level2/meta/meta-sort.js +1 -1
  1051. package/packages/level2/meta/models/user-base-resource.js +1 -1
  1052. package/packages/level2/meta/models/user-workspace-base-resource.js +1 -1
  1053. package/packages/level2/meta/odata/expands.js +2 -1
  1054. package/packages/level2/meta/odata/odata-selects.js +2 -2
  1055. package/packages/level2/meta/one-to-many-relations.js +1 -1
  1056. package/packages/level2/meta/page/title-context.d.ts +0 -1
  1057. package/packages/level2/meta/page/title-context.js +3 -2
  1058. package/packages/level2/meta/page/use-set-title.js +1 -1
  1059. package/packages/level2/meta/page/use-title.js +1 -1
  1060. package/packages/level2/meta/relations/many-to-many-info.d.ts +16 -10
  1061. package/packages/level2/meta/relations/many-to-many-info.js +1 -1
  1062. package/packages/level2/meta/relations/meta-relations.js +1 -1
  1063. package/packages/level2/meta/resource-list/ResourceList.d.ts +1 -1
  1064. package/packages/level2/meta/resource-list/ResourceList.funcs.js +7 -4
  1065. package/packages/level2/meta/resource-list/ResourceList.js +3 -2
  1066. package/packages/level2/meta/resource-list/resource-list-cell-element-ids.js +1 -1
  1067. package/packages/level2/meta/resource-list/resource-list-checkers.js +1 -1
  1068. package/packages/level2/meta/resource-list/resource-list-configs.js +2 -2
  1069. package/packages/level2/meta/resource-list/resource-list-header/ResourceListHeader.funcs.js +1 -1
  1070. package/packages/level2/meta/resource-list/resource-list-hooks.js +1 -1
  1071. package/packages/level2/meta/resource-list/resource-list-persist-state.js +1 -1
  1072. package/packages/level2/meta/resource-list/resource-lists.js +1 -1
  1073. package/packages/level2/meta/resource-list/use-resource-list-config.js +1 -1
  1074. package/packages/level2/meta/resource-providers.js +1 -1
  1075. package/packages/level2/meta/resources/session/session.resource.js +1 -1
  1076. package/packages/level2/meta/server/api/odata/odata-expression-operators.js +2 -2
  1077. package/packages/level2/meta/server/api/odata/odata-expressions.js +1 -1
  1078. package/packages/level2/meta/server/api/odata/odata-filters-helpers.js +2 -1
  1079. package/packages/level2/meta/server/api/odata/odata-filters.js +4 -2
  1080. package/packages/level2/meta/server/api/odata/odata-metas.js +2 -2
  1081. package/packages/level2/meta/server/api/odata/odata-parsers.js +3 -4
  1082. package/packages/level2/meta/server/api/odata/odata.js +1 -1
  1083. package/packages/level2/meta/server/auth/auth-guard.js +2 -2
  1084. package/packages/level2/meta/server/auth/fd-sessions.js +1 -1
  1085. package/packages/level2/meta/server/auth/permissions/resource-permission-checker-provider.d.ts +1 -0
  1086. package/packages/level2/meta/server/auth/permissions/resource-permission-checker-provider.js +3 -3
  1087. package/packages/level2/meta/server/auth/role-db/get-all-including-user-to-roles.js +2 -2
  1088. package/packages/level2/meta/server/auth/session-access.js +1 -1
  1089. package/packages/level2/meta/server/auth/session-validation.js +2 -1
  1090. package/packages/level2/meta/server/auth/session.js +1 -1
  1091. package/packages/level2/meta/server/auth/users/current-user-id-provider.js +1 -1
  1092. package/packages/level2/meta/server/basic-crud/crud-api.d.ts +9 -24
  1093. package/packages/level2/meta/server/basic-crud/crud-api.js +2 -3
  1094. package/packages/level2/meta/server/basic-crud/crud.js +2 -1
  1095. package/packages/level2/meta/server/basic-crud/cruds.js +1 -1
  1096. package/packages/level2/meta/server/basic-crud/helpers/crud-event-handler.js +2 -2
  1097. package/packages/level2/meta/server/basic-crud/helpers/cruds-permission-checker.js +1 -1
  1098. package/packages/level2/meta/server/basic-crud/helpers/prepare-many-to-many-resource.js +1 -1
  1099. package/packages/level2/meta/server/basic-crud/related-resource-db.js +1 -1
  1100. package/packages/level2/meta/server/basic-crud/relation-syncs.d.ts +1 -3
  1101. package/packages/level2/meta/server/basic-crud/relation-syncs.js +1 -1
  1102. package/packages/level2/meta/server/basic-crud/resource-crud-handlers.js +1 -1
  1103. package/packages/level2/meta/server/basic-crud/resource-meta-handlers.js +1 -1
  1104. package/packages/level2/meta/server/constants/crud-handler-types.d.ts +1 -1
  1105. package/packages/level2/meta/server/constants/crud-handler-types.js +2 -2
  1106. package/packages/level2/meta/server/constants/generated-paths.d.ts +6 -6
  1107. package/packages/level2/meta/server/constants/generated-paths.js +2 -2
  1108. package/packages/level2/meta/server/constants/meta-property-names.js +5 -1
  1109. package/packages/level2/meta/server/constants/meta-validation-messages.js +3 -1
  1110. package/packages/level2/meta/server/constants/resource-file-suffixes.d.ts +4 -0
  1111. package/packages/level2/meta/server/constants/resource-file-suffixes.js +6 -0
  1112. package/packages/level2/meta/server/controllers/generic-controllers/crud-controller.js +2 -1
  1113. package/packages/level2/meta/server/db/colums-data-types.d.ts +0 -9
  1114. package/packages/level2/meta/server/db/colums-data-types.js +1 -1
  1115. package/packages/level2/meta/server/db/db.js +2 -2
  1116. package/packages/level2/meta/server/db/drizzle-names.d.ts +0 -1
  1117. package/packages/level2/meta/server/db/drizzle-names.js +1 -1
  1118. package/packages/level2/meta/server/db/init-db.js +1 -1
  1119. package/packages/level2/meta/server/db/schema/schema-adapter.d.ts +1 -5
  1120. package/packages/level2/meta/server/db/schema/schema-adapter.js +4 -2
  1121. package/packages/level2/meta/server/entities/edit-base-resources.js +1 -1
  1122. package/packages/level2/meta/server/entities/edit-workspace.js +2 -1
  1123. package/packages/level2/meta/server/integration-platforms/fd-integration-cache.d.ts +1 -1
  1124. package/packages/level2/meta/server/integration-platforms/fd-integration-cache.js +3 -1
  1125. package/packages/level2/meta/server/integration-platforms/integration-db.js +2 -2
  1126. package/packages/level2/meta/server/integration-platforms/integration-events.d.ts +5 -5
  1127. package/packages/level2/meta/server/integration-platforms/integration-events.js +2 -1
  1128. package/packages/level2/meta/server/messaging/messages.js +1 -1
  1129. package/packages/level2/meta/server/meta-core/auth/permissions/resource-permission-checker.d.ts +3 -3
  1130. package/packages/level2/meta/server/meta-core/constants/metas.js +4 -1
  1131. package/packages/level2/meta/server/meta-core/constants/resource-ids.js +1 -1
  1132. package/packages/level2/meta/server/meta-core/crud/crud-handlers.d.ts +8 -8
  1133. package/packages/level2/meta/server/meta-core/crud/crud-handlers.js +1 -1
  1134. package/packages/level2/meta/server/meta-core/crud/crud-update-config.js +1 -1
  1135. package/packages/level2/meta/server/meta-core/crud/search.js +2 -2
  1136. package/packages/level2/meta/server/meta-core/display-name.js +1 -1
  1137. package/packages/level2/meta/server/meta-url-service.js +2 -2
  1138. package/packages/level2/meta/server/models/roles/role-to-permission-package-db.js +1 -1
  1139. package/packages/level2/meta/server/modules/dynamic-imports.js +26 -24
  1140. package/packages/level2/meta/server/modules/handler-map.d.ts +4 -0
  1141. package/packages/level2/meta/server/modules/handler-map.js +26 -0
  1142. package/packages/level2/meta/server/permission/permission-checker.d.ts +1 -0
  1143. package/packages/level2/meta/server/permission/permission-checker.js +2 -2
  1144. package/packages/level2/meta/server/permission/permission-data-provider.d.ts +1 -13
  1145. package/packages/level2/meta/server/permission/permission-data-provider.js +2 -2
  1146. package/packages/level2/meta/server/permission/permission-package-to-permission-db.js +2 -2
  1147. package/packages/level2/meta/server/permission/permissions.js +2 -1
  1148. package/packages/level2/meta/server/permission/user-permissions-builder.js +2 -1
  1149. package/packages/level2/meta/server/props/meta-property-filters.js +1 -1
  1150. package/packages/level2/meta/server/props/property-meta-config-provider.js +1 -1
  1151. package/packages/level2/meta/server/props/property-names.js +1 -1
  1152. package/packages/level2/meta/server/props/required-properties.js +1 -1
  1153. package/packages/level2/meta/server/providers/current-workspace-id-provider.js +1 -1
  1154. package/packages/level2/meta/server/relations/many-to-many-relations.js +1 -1
  1155. package/packages/level2/meta/server/relations/relations.js +1 -1
  1156. package/packages/level2/meta/server/repositories/odata-db.js +1 -1
  1157. package/packages/level2/meta/server/resources/crud-resources.js +1 -1
  1158. package/packages/level2/meta/server/resources/dynamic-properties.js +1 -1
  1159. package/packages/level2/meta/server/resources/init-internal-resource-metas-from-json.js +2 -2
  1160. package/packages/level2/meta/server/resources/internal-resource-meta.js +1 -1
  1161. package/packages/level2/meta/server/resources/resource-checker.d.ts +1 -1
  1162. package/packages/level2/meta/server/resources/resource-checker.js +3 -1
  1163. package/packages/level2/meta/server/resources/resource-meta-plugin-constants.js +3 -1
  1164. package/packages/level2/meta/server/resources/resource-meta-plugin.js +4 -3
  1165. package/packages/level2/meta/server/resources/searchable-resources-api.d.ts +1 -3
  1166. package/packages/level2/meta/server/resources/searchable-resources-api.js +1 -2
  1167. package/packages/level2/meta/server/resources/searchable-resources.js +1 -1
  1168. package/packages/level2/meta/server/services/crud-actions.js +1 -1
  1169. package/packages/level2/meta/server/services/metas.js +1 -1
  1170. package/packages/level2/meta/server/services/permission-check-config-provider.js +1 -1
  1171. package/packages/level2/meta/server/services/property-meta.js +1 -1
  1172. package/packages/level2/meta/server/services/property-metas.js +1 -1
  1173. package/packages/level2/meta/server/services/resource-name-converter.js +1 -1
  1174. package/packages/level2/meta/server/services/resource-provider-db.js +1 -1
  1175. package/packages/level2/meta/server/services/resource-provider-defaults.js +1 -1
  1176. package/packages/level2/meta/server/services/resource-provider-expands.js +1 -1
  1177. package/packages/level2/meta/server/services/resource-provider-permissions.js +1 -1
  1178. package/packages/level2/meta/server/services/resource-provider.js +2 -2
  1179. package/packages/level2/meta/server/ui/meta-api.d.ts +1 -3
  1180. package/packages/level2/meta/server/ui/meta-api.js +1 -2
  1181. package/packages/level2/meta/server/ui/ui-metas-api.d.ts +2 -6
  1182. package/packages/level2/meta/server/ui/ui-metas-api.js +1 -2
  1183. package/packages/level2/meta/server/ui/ui-metas.js +1 -1
  1184. package/packages/level2/meta/server/validations/meta-validations.js +3 -2
  1185. package/packages/level2/meta/server/value-checker.js +2 -2
  1186. package/packages/level2/meta/server/web/current-url.js +1 -1
  1187. package/packages/level2/meta/server/web/drizzle-guards.js +1 -1
  1188. package/packages/level2/meta/server/web/drizzle.js +3 -1
  1189. package/packages/level2/meta/server/web/http-api-wrapper.d.ts +3 -4
  1190. package/packages/level2/meta/server/web/http-api-wrapper.js +2 -3
  1191. package/packages/level2/meta/server/web/init-saas-kit-config.d.ts +9 -0
  1192. package/packages/level2/meta/server/web/init-saas-kit-config.js +8 -0
  1193. package/packages/level2/meta/server/web/reduce-data.js +1 -1
  1194. package/packages/level2/meta/server/web/responses.js +1 -1
  1195. package/packages/level2/meta/server/workspace/get-visible-workspaces-cache-key.js +1 -1
  1196. package/packages/level2/meta/services/client-environment.js +1 -1
  1197. package/packages/level2/meta/services/filter-components.js +1 -1
  1198. package/packages/level2/meta/services/meta-navigations.js +1 -1
  1199. package/packages/level2/meta/services/property-values.d.ts +1 -1
  1200. package/packages/level2/meta/services/property-values.js +3 -3
  1201. package/packages/level2/meta/services/resource-filters.js +2 -2
  1202. package/packages/level2/meta/services/resource-name-client-converter.js +1 -1
  1203. package/packages/level2/meta/services/window.js +3 -1
  1204. package/packages/level2/meta/state/base-state-functions.js +1 -1
  1205. package/packages/level2/meta/subscription-plan/fetch-active-or-trial-subscription.js +1 -1
  1206. package/packages/level2/meta/subscription-plan/subscription.resource.js +1 -1
  1207. package/packages/level2/meta/table/Table.d.ts +1 -1
  1208. package/packages/level2/meta/table/Table.funcs.js +1 -1
  1209. package/packages/level2/meta/table/Table.js +3 -2
  1210. package/packages/level2/meta/table/body/TableBody.funcs.d.ts +1 -1
  1211. package/packages/level2/meta/table/body/TableBody.funcs.js +2 -1
  1212. package/packages/level2/meta/table/body/TableBody.js +2 -2
  1213. package/packages/level2/meta/table/body-cell/ActionBodyCell.funcs.js +1 -1
  1214. package/packages/level2/meta/table/body-cell/BlobBodyCell.funcs.js +1 -1
  1215. package/packages/level2/meta/table/body-cell/BodyCell.funcs.js +2 -1
  1216. package/packages/level2/meta/table/body-cell/BodyCellArrayTooltip.funcs.js +1 -1
  1217. package/packages/level2/meta/table/body-cell/MultiselectCellTemplate.funcs.js +1 -1
  1218. package/packages/level2/meta/table/body-cell/ViewCell.funcs.js +1 -1
  1219. package/packages/level2/meta/table/body-row/TableBodyRow.funcs.js +1 -1
  1220. package/packages/level2/meta/table/csv-converter.js +3 -2
  1221. package/packages/level2/meta/table/header/TableHeader.funcs.js +1 -1
  1222. package/packages/level2/meta/table/header/TableHeader.js +1 -1
  1223. package/packages/level2/meta/table/header-cell/Resizable.d.ts +1 -2
  1224. package/packages/level2/meta/table/header-cell/TableHeaderActionCell.funcs.js +1 -1
  1225. package/packages/level2/meta/table/header-cell/TableHeaderCell.funcs.js +2 -1
  1226. package/packages/level2/meta/table/header-cell/TableHeaderCell.js +1 -1
  1227. package/packages/level2/meta/table/pager/Pager.funcs.js +1 -1
  1228. package/packages/level2/meta/table/services/fd-private-paging.js +1 -1
  1229. package/packages/level2/meta/table/services/fd-table-private-column-calculation.js +1 -1
  1230. package/packages/level2/meta/table/services/fd-table-private-columns.js +1 -1
  1231. package/packages/level2/meta/table/services/fd-table-private-create-columns.d.ts +1 -1
  1232. package/packages/level2/meta/table/services/fd-table-private-create-columns.js +1 -1
  1233. package/packages/level2/meta/table/services/fd-table-private-properties.js +1 -1
  1234. package/packages/level2/meta/table/services/fd-table-private-resize-columns.js +3 -1
  1235. package/packages/level2/meta/table/services/fd-table-private-rows.js +1 -1
  1236. package/packages/level2/meta/table/services/fd-table-private-sorting.js +1 -1
  1237. package/packages/level2/meta/table/services/table-private-cell.js +1 -1
  1238. package/packages/level2/meta/table/table-constants.js +1 -1
  1239. package/packages/level2/meta/table/table-custom-action/TableCustomAction.funcs.js +1 -1
  1240. package/packages/level2/meta/table/table-custom-attributes.d.ts +2 -2
  1241. package/packages/level2/meta/table/table-custom-attributes.js +1 -1
  1242. package/packages/level2/meta/ui/ui-relation.js +1 -1
  1243. package/packages/level2/meta/ui-meta-providers.js +1 -1
  1244. package/packages/level2/meta/view/View.js +46 -55
  1245. package/packages/level2/meta/view/ViewSheet.d.ts +7 -9
  1246. package/packages/level2/meta/view/ViewSheet.funcs.d.ts +1 -1
  1247. package/packages/level2/meta/view/ViewSheet.funcs.js +1 -1
  1248. package/packages/level2/meta/view/ViewSheet.js +4 -4
  1249. package/packages/level2/meta/view/view-constants.d.ts +4 -4
  1250. package/packages/level2/meta/view/view-constants.js +4 -2
  1251. package/packages/level2/npm-commands/gen-dynamic-handlers-map/generate-dynamic-handlers-map.js +5 -4
  1252. package/packages/level2/npm-commands/gen-meta/generate-meta.js +2 -2
  1253. package/packages/level2/npm-commands/gen-meta/generate-tsconfig.js +3 -2
  1254. package/packages/level2/npm-commands/gen-schema/gen-schema.js +2 -1
  1255. package/packages/level2/npm-commands/gen-schema/transpile-schema.js +2 -1
  1256. package/packages/level2/npm-commands/migrate-db/migrate-db.js +2 -1
  1257. package/packages/level2/npm-commands/npm-comands-paths.d.ts +2 -2
  1258. package/packages/level2/npm-commands/npm-comands-paths.js +2 -3
  1259. package/packages/level2/npm-commands/run-command/index.js +3 -3
  1260. package/packages/level2/npm-commands/seed-db/seed-db.js +2 -1
  1261. package/packages/level2/npm-commands/server/db/fd-db-initializer.js +1 -4
  1262. package/packages/level2/other/scrapping/scrape-constants.d.ts +0 -2
  1263. package/packages/level2/other/scrapping/scrape-constants.js +4 -2
  1264. package/packages/level2/other/scrapping/scrape.command.js +1 -1
  1265. package/packages/level2/other/scrapping/scrapper-config.js +1 -1
  1266. package/packages/level2/other/scrapping/scrappers.js +3 -3
  1267. package/packages/level2/server/addresses/address-db.js +1 -1
  1268. package/packages/level2/server/addresses/address-master-data.js +2 -2
  1269. package/packages/level2/server/addresses/country-db.js +1 -1
  1270. package/packages/level2/server/addresses/country-master-data.js +2 -1
  1271. package/packages/level2/server/ai/ai-generated-text.d.ts +1 -3
  1272. package/packages/level2/server/ai/ai-generated-text.js +1 -2
  1273. package/packages/level2/server/auth/dev-demo-permissions.js +1 -1
  1274. package/packages/level2/server/auth/oauth-service-db.js +2 -2
  1275. package/packages/level2/server/auth/permission-master-data.js +1 -2
  1276. package/packages/level2/server/auth/permission-role-mapping.js +1 -1
  1277. package/packages/level2/server/auth/role-db.js +4 -3
  1278. package/packages/level2/server/auth/role-master-data.js +1 -1
  1279. package/packages/level2/server/auth/role-to-permission-master-data.js +1 -1
  1280. package/packages/level2/server/auth/role-to-permission-package.handlers.js +1 -1
  1281. package/packages/level2/server/auth/role-to-permission.handlers.js +1 -1
  1282. package/packages/level2/server/auth/role.handlers.js +1 -1
  1283. package/packages/level2/server/auth/sign-in-api.d.ts +1 -3
  1284. package/packages/level2/server/auth/sign-in-api.js +2 -2
  1285. package/packages/level2/server/auth/sign-out-api.d.ts +1 -3
  1286. package/packages/level2/server/auth/sign-out-api.js +2 -2
  1287. package/packages/level2/server/auth/sign-up-api.d.ts +1 -3
  1288. package/packages/level2/server/auth/sign-up-api.js +1 -2
  1289. package/packages/level2/server/blob/blob-db.js +2 -2
  1290. package/packages/level2/server/business-profile/business-profile-api.d.ts +1 -3
  1291. package/packages/level2/server/business-profile/business-profile-api.js +2 -2
  1292. package/packages/level2/server/comments/comment-db.js +1 -1
  1293. package/packages/level2/server/comments/comment-master-data.js +1 -1
  1294. package/packages/level2/server/constants/dev-test.d.ts +4 -0
  1295. package/packages/level2/server/constants/dev-test.js +4 -0
  1296. package/packages/level2/server/constants/path.d.ts +1 -1
  1297. package/packages/level2/server/constants/path.js +3 -1
  1298. package/packages/level2/server/constants/url-placeholders.d.ts +3 -0
  1299. package/packages/level2/server/constants/url-placeholders.js +4 -0
  1300. package/packages/level2/server/constants/workspace-settings.js +2 -1
  1301. package/packages/level2/server/customers/customer-db.js +1 -1
  1302. package/packages/level2/server/customers/customer-master-data.js +1 -1
  1303. package/packages/level2/server/dashboards/dashboard-db.js +1 -1
  1304. package/packages/level2/server/dashboards/dashboard-master-data.js +1 -1
  1305. package/packages/level2/server/dashboards/dashboard-report-data-master-data.d.ts +64 -9
  1306. package/packages/level2/server/dashboards/dashboard-report-data-master-data.js +3 -1
  1307. package/packages/level2/server/dashboards/dashboard-report-db.js +1 -1
  1308. package/packages/level2/server/dashboards/dashboard-report-master-data.js +1 -1
  1309. package/packages/level2/server/db/db.d.ts +1 -0
  1310. package/packages/level2/server/db/db.js +8 -4
  1311. package/packages/level2/server/demo/companies/company-db.js +1 -1
  1312. package/packages/level2/server/demo/companies/company-master-data.js +4 -4
  1313. package/packages/level2/server/demo/contacts/contact-db.js +1 -1
  1314. package/packages/level2/server/demo/contacts/contact-master-data.js +3 -5
  1315. package/packages/level2/server/demo/deals/deal-db.js +1 -1
  1316. package/packages/level2/server/demo/deals/deal-master-data.js +1 -1
  1317. package/packages/level2/server/demo/demo-seed-constants.d.ts +38 -0
  1318. package/packages/level2/server/demo/demo-seed-constants.js +8 -0
  1319. package/packages/level2/server/demo/reset-data-api.d.ts +1 -3
  1320. package/packages/level2/server/demo/reset-data-api.js +2 -3
  1321. package/packages/level2/server/demo/tickets/ticket-db.js +1 -1
  1322. package/packages/level2/server/demo/tickets/ticket-master-data.js +1 -1
  1323. package/packages/level2/server/dev/ai-assistant/ai-assistant-db.js +1 -1
  1324. package/packages/level2/server/dev/ai-assistant/ai-assistant-master-data.js +1 -1
  1325. package/packages/level2/server/dev/ai-assistant/ai-assistant-mother.d.ts +2 -2
  1326. package/packages/level2/server/dev/ai-assistant/ai-assistant-mother.js +2 -1
  1327. package/packages/level2/server/dev/dev-greeting/dev-greeting-master-data.js +1 -1
  1328. package/packages/level2/server/dev/dev-greeting/dev-greeting-mother.js +1 -1
  1329. package/packages/level2/server/dev/friends/friend-db.js +1 -1
  1330. package/packages/level2/server/dev/friends/friend-master-data.js +1 -1
  1331. package/packages/level2/server/dev/friends/friend-mother.js +1 -1
  1332. package/packages/level2/server/dev/friends/friend-utils.js +4 -3
  1333. package/packages/level2/server/dev/jobs/job-db.js +1 -1
  1334. package/packages/level2/server/dev/jobs/job-master-data.js +1 -1
  1335. package/packages/level2/server/dev/jobs/job-mother.js +3 -1
  1336. package/packages/level2/server/dev/paper-planes/paper-plane-db.js +1 -1
  1337. package/packages/level2/server/dev/paper-planes/paper-plane-master-data.js +1 -1
  1338. package/packages/level2/server/dev/paper-planes/paper-plane-mother.js +1 -1
  1339. package/packages/level2/server/dev/paper-planes/paper-plane.handlers.js +1 -1
  1340. package/packages/level2/server/dev/persons/person-constants.js +3 -1
  1341. package/packages/level2/server/dev/persons/person-db.js +1 -1
  1342. package/packages/level2/server/dev/persons/person-master-data.js +1 -1
  1343. package/packages/level2/server/dev/persons/person-mother.d.ts +21 -14
  1344. package/packages/level2/server/dev/persons/person-mother.js +3 -2
  1345. package/packages/level2/server/dev/persons/person-to-job-db.js +1 -1
  1346. package/packages/level2/server/dev/persons/person-to-job-master-data.js +1 -1
  1347. package/packages/level2/server/dev/persons/person-to-job-mother.js +1 -1
  1348. package/packages/level2/server/dev/persons/person-to-person-db.js +1 -1
  1349. package/packages/level2/server/dev/persons/person-to-person-master-data.js +1 -1
  1350. package/packages/level2/server/dev/persons/person-to-person-mother.d.ts +2 -2
  1351. package/packages/level2/server/dev/persons/person-to-person-mother.js +2 -1
  1352. package/packages/level2/server/dev/persons/person.handlers.js +1 -1
  1353. package/packages/level2/server/dev/phone-brands/phone-brand-db.js +1 -1
  1354. package/packages/level2/server/dev/phone-brands/phone-brand-master-data.js +1 -1
  1355. package/packages/level2/server/dev/phone-brands/phone-brand-mother.js +2 -1
  1356. package/packages/level2/server/dev/pings/ping-db.js +1 -1
  1357. package/packages/level2/server/dev/pings/ping-master-data.js +1 -1
  1358. package/packages/level2/server/dev/pings/ping-mother.js +1 -1
  1359. package/packages/level2/server/example/example-api.d.ts +5 -12
  1360. package/packages/level2/server/example/example-api.js +1 -2
  1361. package/packages/level2/server/export/csv-data-formatter.js +1 -1
  1362. package/packages/level2/server/export/export-api.d.ts +1 -3
  1363. package/packages/level2/server/export/export-api.js +1 -2
  1364. package/packages/level2/server/fd/fd-toolbox-asp-net/models/roles/role-to-permission-db.js +4 -3
  1365. package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-db.js +4 -3
  1366. package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-package-db.js +1 -1
  1367. package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-package-to-db.js +4 -3
  1368. package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-package-to-permission.handlers.js +1 -1
  1369. package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission-package.handlers.js +1 -1
  1370. package/packages/level2/server/fd/fd-toolbox-web/auth/permissions/permission.handlers.js +1 -1
  1371. package/packages/level2/server/fd/fd-toolbox-web/constants/db-initialization-messages.d.ts +0 -1
  1372. package/packages/level2/server/fd/fd-toolbox-web/constants/db-initialization-messages.js +3 -1
  1373. package/packages/level2/server/fd/fd-toolbox-web/http/base-http-client.js +1 -1
  1374. package/packages/level2/server/fd/fd-toolbox-web/localization/language/language-db.js +1 -1
  1375. package/packages/level2/server/fd/fd-toolbox-web/localization/language/language-master-data.js +2 -1
  1376. package/packages/level2/server/fd/fd-toolbox-web/logging/log-api.d.ts +3 -9
  1377. package/packages/level2/server/fd/fd-toolbox-web/logging/log-api.js +1 -2
  1378. package/packages/level2/server/fd/fd-toolbox-web/mailing/fd-emails.js +2 -1
  1379. package/packages/level2/server/fd/fd-toolbox-web/models/reset-password-request.js +1 -1
  1380. package/packages/level2/server/fd/fd-toolbox-web/notifications/notification-db.js +1 -1
  1381. package/packages/level2/server/fd/fd-toolbox-web/permissions/fd-permission-master-data.js +1 -1
  1382. package/packages/level2/server/fd/fd-toolbox-web/permissions/permission-api.d.ts +1 -3
  1383. package/packages/level2/server/fd/fd-toolbox-web/permissions/permission-api.js +1 -2
  1384. package/packages/level2/server/fd/fd-toolbox-web/resources/resource-property-db.js +4 -3
  1385. package/packages/level2/server/fd/fd-toolbox-web/seeding/notification-master-data.js +2 -2
  1386. package/packages/level2/server/fd/fd-toolbox-web/seeding/resource-master-data.js +1 -1
  1387. package/packages/level2/server/fd/fd-toolbox-web/seeding/resource-property-master-data.js +1 -1
  1388. package/packages/level2/server/fd/fd-toolbox-web/seeding/workspace-master-data.js +1 -1
  1389. package/packages/level2/server/fd/fd-toolbox-web/services/notifications.js +1 -1
  1390. package/packages/level2/server/fd/fd-toolbox-web/services/socket/web-socket-server.js +1 -1
  1391. package/packages/level2/server/fd/fd-toolbox-web/services/socket/web-sockets.js +4 -1
  1392. package/packages/level2/server/features/feature-db.js +4 -3
  1393. package/packages/level2/server/features/feature-master-data.js +1 -1
  1394. package/packages/level2/server/features/feature-mother.js +1 -1
  1395. package/packages/level2/server/features/features.js +1 -1
  1396. package/packages/level2/server/features/payment-plan-feature-data.js +1 -1
  1397. package/packages/level2/server/features/payment-plan-feature-db.js +1 -1
  1398. package/packages/level2/server/features/status-board-master-data.js +2 -1
  1399. package/packages/level2/server/features/user-feature.handlers.js +1 -1
  1400. package/packages/level2/server/feeds/feed-entry-data.js +2 -1
  1401. package/packages/level2/server/html/email.js +4 -2
  1402. package/packages/level2/server/html-templates/email-notification.html +96 -0
  1403. package/packages/level2/server/html-templates/send-email-form.html +123 -0
  1404. package/packages/level2/server/html-templates/workspace-invite-footer.html +3 -0
  1405. package/packages/level2/server/html-templates/workspace-invite-template.html +123 -0
  1406. package/packages/level2/server/index.d.ts +1 -3
  1407. package/packages/level2/server/index.js +2 -2
  1408. package/packages/level2/server/infra/background-jobs/background-jobs.js +4 -3
  1409. package/packages/level2/server/infra/background-jobs/init-jobs.js +2 -1
  1410. package/packages/level2/server/infra/workspaces/workspace-setting-db.js +1 -1
  1411. package/packages/level2/server/integration/data/deleted/integration-deleted-api.d.ts +1 -3
  1412. package/packages/level2/server/integration/data/deleted/integration-deleted-api.js +1 -2
  1413. package/packages/level2/server/integration/data/dynamicfields/integration-dynamicfields-api.d.ts +1 -3
  1414. package/packages/level2/server/integration/data/dynamicfields/integration-dynamicfields-api.js +1 -2
  1415. package/packages/level2/server/integration/integration-api.d.ts +3 -9
  1416. package/packages/level2/server/integration/integration-api.js +1 -2
  1417. package/packages/level2/server/integration-platforms/integration-resource.js +1 -1
  1418. package/packages/level2/server/integration-platforms/subscription-odata.js +3 -2
  1419. package/packages/level2/server/integrations/aio/blobs.js +5 -4
  1420. package/packages/level2/server/integrations/blob/blob-storage.js +1 -1
  1421. package/packages/level2/server/integrations/google-place/google-place-helpers.js +1 -1
  1422. package/packages/level2/server/integrations/google-place/google-place.handlers.js +1 -1
  1423. package/packages/level2/server/integrations/google-place/google-place.js +4 -3
  1424. package/packages/level2/server/integrations/remote-blob/remote-blob-storage.js +1 -1
  1425. package/packages/level2/server/integrations/screenshot/get-website-screenshots.js +1 -1
  1426. package/packages/level2/server/integrations/screenshot/screenshot-constants.d.ts +5 -0
  1427. package/packages/level2/server/integrations/screenshot/screenshot-constants.js +4 -0
  1428. package/packages/level2/server/integrations/screenshot/screenshot-controller.d.ts +1 -3
  1429. package/packages/level2/server/integrations/screenshot/screenshot-controller.js +2 -3
  1430. package/packages/level2/server/integrations/screenshot/screenshotone/screenshotone-client.js +2 -2
  1431. package/packages/level2/server/integrations/website-scan/scan-social-media-and-email-constants.d.ts +1 -1
  1432. package/packages/level2/server/integrations/website-scan/scan-social-media-and-email-constants.js +4 -1
  1433. package/packages/level2/server/integrations/website-scan/scan-social-media-and-email.js +2 -2
  1434. package/packages/level2/server/integrations/website-scan/website-scan-initializer.js +1 -1
  1435. package/packages/level2/server/items/item-db.js +5 -4
  1436. package/packages/level2/server/leads/lead-category-db.js +1 -1
  1437. package/packages/level2/server/leads/lead-category-master-data.js +1 -1
  1438. package/packages/level2/server/leads/lead-db.js +1 -1
  1439. package/packages/level2/server/leads/lead-email-db.js +1 -1
  1440. package/packages/level2/server/leads/lead-email-master-data.js +1 -1
  1441. package/packages/level2/server/leads/lead-group-db.js +1 -1
  1442. package/packages/level2/server/leads/lead-group-master-data.js +2 -1
  1443. package/packages/level2/server/leads/lead-master-data.js +1 -1
  1444. package/packages/level2/server/leads/lead-to-lead-category-db.js +1 -1
  1445. package/packages/level2/server/leads/lead-to-lead-category-master-data.js +1 -1
  1446. package/packages/level2/server/leads/lead-to-lead-group-db.js +1 -1
  1447. package/packages/level2/server/leads/lead-to-lead-group-master-data.js +1 -1
  1448. package/packages/level2/server/leads/lead-to-lead-group.handlers.js +1 -1
  1449. package/packages/level2/server/leads/lead.handlers.js +1 -1
  1450. package/packages/level2/server/leads/services/ai-scan-result-delete.js +1 -1
  1451. package/packages/level2/server/markdown/markdown-api.d.ts +1 -3
  1452. package/packages/level2/server/markdown/markdown-api.js +1 -2
  1453. package/packages/level2/server/markdown/markdown.js +1 -1
  1454. package/packages/level2/server/media/media-api.d.ts +3 -9
  1455. package/packages/level2/server/media/media-api.js +5 -3
  1456. package/packages/level2/server/notifications/notification.handlers.js +1 -1
  1457. package/packages/level2/server/orders/order-db.js +1 -1
  1458. package/packages/level2/server/orders/order-master-data.js +1 -1
  1459. package/packages/level2/server/orders/order-utils.js +1 -1
  1460. package/packages/level2/server/orders/order.handlers.js +1 -1
  1461. package/packages/level2/server/otheruser/id/otheruser-id-api.d.ts +5 -12
  1462. package/packages/level2/server/otheruser/id/otheruser-id-api.js +1 -2
  1463. package/packages/level2/server/otheruser/otheruser-api.d.ts +3 -9
  1464. package/packages/level2/server/otheruser/otheruser-api.js +1 -2
  1465. package/packages/level2/server/password/editpassword/editpassword-api.d.ts +1 -3
  1466. package/packages/level2/server/password/editpassword/editpassword-api.js +2 -2
  1467. package/packages/level2/server/password/forgotpassword/forgotpassword-api.d.ts +1 -3
  1468. package/packages/level2/server/password/forgotpassword/forgotpassword-api.js +3 -3
  1469. package/packages/level2/server/password/resetpassword/resetpassword-api.d.ts +1 -3
  1470. package/packages/level2/server/password/resetpassword/resetpassword-api.js +1 -2
  1471. package/packages/level2/server/payment/method/payment-method-api.d.ts +2 -6
  1472. package/packages/level2/server/payment/method/payment-method-api.js +1 -2
  1473. package/packages/level2/server/payment/verify-fail/payment-verify-fail-api.d.ts +1 -3
  1474. package/packages/level2/server/payment/verify-fail/payment-verify-fail-api.js +1 -2
  1475. package/packages/level2/server/payment/verify-success/payment-verify-success.d.ts +1 -3
  1476. package/packages/level2/server/payment/verify-success/payment-verify-success.js +1 -2
  1477. package/packages/level2/server/payments/payment-plan.handlers.js +3 -3
  1478. package/packages/level2/server/payments/payments/payment-plan-db.js +5 -4
  1479. package/packages/level2/server/payments/payments/payment-plan-master-data.js +1 -1
  1480. package/packages/level2/server/payments/payments/payment-plans.js +1 -1
  1481. package/packages/level2/server/payments/payments/payments-api.d.ts +1 -3
  1482. package/packages/level2/server/payments/payments/payments-api.js +1 -2
  1483. package/packages/level2/server/payments/payments/payments.js +2 -2
  1484. package/packages/level2/server/payments/payments/pricing-seeding.js +1 -1
  1485. package/packages/level2/server/payments/pricing.handlers.js +1 -1
  1486. package/packages/level2/server/payments/stripe/stripe-sync.js +2 -2
  1487. package/packages/level2/server/payments/stripe/stripes.js +3 -3
  1488. package/packages/level2/server/payments/subscriptions/subscription-db.js +4 -3
  1489. package/packages/level2/server/payments/subscriptions/subscriptions.js +1 -1
  1490. package/packages/level2/server/payments/system-invoice/payment-system-invoice.handlers.js +1 -1
  1491. package/packages/level2/server/product-setup/website-analysiz.d.ts +0 -2
  1492. package/packages/level2/server/product-setup/website-analysiz.js +3 -3
  1493. package/packages/level2/server/products/product-db.js +1 -1
  1494. package/packages/level2/server/products/product-master-data.js +2 -1
  1495. package/packages/level2/server/products/product-media/product-media-db.js +1 -1
  1496. package/packages/level2/server/products/product-media/product-media-master-data.d.ts +5 -0
  1497. package/packages/level2/server/products/product-media/product-media-master-data.js +2 -2
  1498. package/packages/level2/server/products/product-parameters/product-parameter-mother.d.ts +1 -1
  1499. package/packages/level2/server/products/product-parameters/product-parameter-mother.js +2 -1
  1500. package/packages/level2/server/reports/report-chart-series-master-data.js +1 -1
  1501. package/packages/level2/server/reports/report-chart-series-mother.d.ts +217 -49
  1502. package/packages/level2/server/reports/report-chart-series-mother.js +2 -1
  1503. package/packages/level2/server/reports/report-db.js +1 -1
  1504. package/packages/level2/server/reports/report-master-data.js +1 -1
  1505. package/packages/level2/server/reports/report-mother.d.ts +1 -1
  1506. package/packages/level2/server/reports/report-mother.js +3 -1
  1507. package/packages/level2/server/reports/report-string-constants.d.ts +19 -0
  1508. package/packages/level2/server/reports/report-string-constants.js +8 -0
  1509. package/packages/level2/server/reports/report-with-data.handlers.d.ts +1 -10
  1510. package/packages/level2/server/reports/report-with-data.handlers.js +1 -1
  1511. package/packages/level2/server/search/search-result-api.d.ts +1 -3
  1512. package/packages/level2/server/search/search-result-api.js +1 -2
  1513. package/packages/level2/server/search/search-result.js +1 -1
  1514. package/packages/level2/server/search/search.handlers.js +1 -1
  1515. package/packages/level2/server/search/searchable-resource.handlers.js +1 -1
  1516. package/packages/level2/server/seeding/seed-master-data.js +1 -2
  1517. package/packages/level2/server/shipment/shipment-api.js +1 -1
  1518. package/packages/level2/server/shipment/shipment-constants.js +3 -1
  1519. package/packages/level2/server/shipment/shipment-db.js +1 -1
  1520. package/packages/level2/server/shipment/shipment-master-data.js +1 -1
  1521. package/packages/level2/server/shipment/shipment.handlers.js +1 -1
  1522. package/packages/level2/server/statusboard/statusboard-api.d.ts +3 -9
  1523. package/packages/level2/server/statusboard/statusboard-api.js +1 -2
  1524. package/packages/level2/server/store/store-constants.d.ts +1 -1
  1525. package/packages/level2/server/store/store-constants.js +3 -1
  1526. package/packages/level2/server/store/store-db.js +1 -1
  1527. package/packages/level2/server/store/store-master-data.js +3 -3
  1528. package/packages/level2/server/subscription/cancel/subscription-cancel-api.d.ts +1 -3
  1529. package/packages/level2/server/subscription/cancel/subscription-cancel-api.js +1 -2
  1530. package/packages/level2/server/subscription/create/subscription-create-api.d.ts +1 -3
  1531. package/packages/level2/server/subscription/create/subscription-create-api.js +1 -2
  1532. package/packages/level2/server/subscription/update/subscription-update-api.d.ts +1 -3
  1533. package/packages/level2/server/subscription/update/subscription-update-api.js +1 -2
  1534. package/packages/level2/server/system-settings/system-master-data.js +1 -1
  1535. package/packages/level2/server/system-settings/system-setting-db.js +1 -1
  1536. package/packages/level2/server/system-settings/system-settings.js +3 -1
  1537. package/packages/level2/server/test/data/test-constants.js +3 -1
  1538. package/packages/level2/server/test/data/test-data-api.d.ts +1 -3
  1539. package/packages/level2/server/test/data/test-data-api.js +1 -2
  1540. package/packages/level2/server/test/data/test-data.js +2 -2
  1541. package/packages/level2/server/upload/upload-api.d.ts +2 -6
  1542. package/packages/level2/server/upload/upload-api.js +1 -2
  1543. package/packages/level2/server/usage-limit/usage-limit.js +2 -2
  1544. package/packages/level2/server/user-settings/user-setting.handlers.js +1 -1
  1545. package/packages/level2/server/userfeature/isenabled/userfeature-isenabled-api.d.ts +1 -3
  1546. package/packages/level2/server/userfeature/isenabled/userfeature-isenabled-api.js +1 -2
  1547. package/packages/level2/server/users/admin-edit-admin.js +1 -1
  1548. package/packages/level2/server/users/auth.js +2 -1
  1549. package/packages/level2/server/users/edit-other-users.js +1 -1
  1550. package/packages/level2/server/users/tokens.js +4 -2
  1551. package/packages/level2/server/users/user-creation-service.js +2 -1
  1552. package/packages/level2/server/users/user-db.js +6 -4
  1553. package/packages/level2/server/users/user-deletions.js +1 -1
  1554. package/packages/level2/server/users/user-feature-db.js +4 -3
  1555. package/packages/level2/server/users/user-feature-predicates.js +4 -2
  1556. package/packages/level2/server/users/user-manager.d.ts +2 -7
  1557. package/packages/level2/server/users/user-manager.js +9 -5
  1558. package/packages/level2/server/users/user-master-data.js +3 -1
  1559. package/packages/level2/server/users/user-mother.js +3 -2
  1560. package/packages/level2/server/users/user-role.handlers.js +1 -1
  1561. package/packages/level2/server/users/user-role.js +1 -1
  1562. package/packages/level2/server/users/user-service.js +1 -1
  1563. package/packages/level2/server/users/user-settings/user-setting-db.js +5 -4
  1564. package/packages/level2/server/users/user-token-constants.d.ts +3 -0
  1565. package/packages/level2/server/users/user-token-constants.js +4 -0
  1566. package/packages/level2/server/users/user.handlers.js +1 -1
  1567. package/packages/level2/server/utils/base-resource-properties.js +1 -1
  1568. package/packages/level2/server/utils/check-resource-access-permission.js +1 -1
  1569. package/packages/level2/server/utils/get-user-and-workspace-ids.js +1 -1
  1570. package/packages/level2/server/utils/map-subscription-status-to-db-format.js +2 -1
  1571. package/packages/level2/server/web/http-wrapper.d.ts +1 -2
  1572. package/packages/level2/server/web/http-wrapper.js +1 -2
  1573. package/packages/level2/server/web/initialize.js +2 -1
  1574. package/packages/level2/server/web/responses/create-remote-blob-response.js +1 -1
  1575. package/packages/level2/server/workspace/change-current-workspace.d.ts +1 -1
  1576. package/packages/level2/server/workspace/change-current-workspace.js +1 -1
  1577. package/packages/level2/server/workspace/visible-workspace-api.d.ts +2 -6
  1578. package/packages/level2/server/workspace/visible-workspace-api.js +1 -2
  1579. package/packages/level2/server/workspace/workspace-api.d.ts +2 -6
  1580. package/packages/level2/server/workspace/workspace-api.js +2 -2
  1581. package/packages/level2/server/workspace/workspace-invite/user-workspace-invite.handlers.js +4 -1
  1582. package/packages/level2/server/workspace/workspace-invite/workspace-user-invites.js +1 -1
  1583. package/packages/test-infra/asserters/edit-asserts.d.ts +3 -1
  1584. package/packages/test-infra/asserters/edit-asserts.js +6 -4
  1585. package/packages/test-infra/asserters/forgot-password-asserts.js +1 -1
  1586. package/packages/test-infra/asserters/navigation-asserts.js +1 -1
  1587. package/packages/test-infra/asserters/notification-asserts.js +1 -1
  1588. package/packages/test-infra/asserters/search-asserts.js +1 -1
  1589. package/packages/test-infra/asserters/table-asserts.js +5 -3
  1590. package/packages/test-infra/asserters/ui-asserts.d.ts +5 -0
  1591. package/packages/test-infra/asserters/ui-asserts.js +6 -4
  1592. package/packages/test-infra/constants/test-data/input-fields-values.js +2 -2
  1593. package/packages/test-infra/constants/test-data/table-headers.js +4 -1
  1594. package/packages/test-infra/constants/test-data/test-names.js +3 -1
  1595. package/packages/test-infra/constants/ui-tester/checkout-form-test-data.js +3 -2
  1596. package/packages/test-infra/constants/ui-tester/html-contants.d.ts +7 -4
  1597. package/packages/test-infra/constants/ui-tester/html-contants.js +2 -2
  1598. package/packages/test-infra/fixtures/error-tracking-fixture.js +1 -1
  1599. package/packages/test-infra/page-objects/account-setup-po.js +1 -1
  1600. package/packages/test-infra/page-objects/browser-po.js +1 -1
  1601. package/packages/test-infra/page-objects/checkout-form-po.js +1 -1
  1602. package/packages/test-infra/page-objects/edit-po.js +1 -1
  1603. package/packages/test-infra/page-objects/filter-po.js +2 -1
  1604. package/packages/test-infra/page-objects/forgot-password-po.js +2 -2
  1605. package/packages/test-infra/page-objects/list-po.js +1 -1
  1606. package/packages/test-infra/page-objects/login-po.js +1 -1
  1607. package/packages/test-infra/page-objects/multi-browser-po.js +1 -1
  1608. package/packages/test-infra/page-objects/notification-po.js +1 -1
  1609. package/packages/test-infra/page-objects/payment-plan-po.js +1 -1
  1610. package/packages/test-infra/page-objects/reset-password-po.js +1 -1
  1611. package/packages/test-infra/page-objects/search-po.js +1 -1
  1612. package/packages/test-infra/page-objects/select-workspace-po.js +4 -2
  1613. package/packages/test-infra/page-objects/sidebar-po.js +2 -2
  1614. package/packages/test-infra/page-objects/table-asserts.d.ts +1 -1
  1615. package/packages/test-infra/page-objects/table-asserts.js +1 -1
  1616. package/packages/test-infra/page-objects/toolbar-po.js +1 -1
  1617. package/packages/test-infra/page-objects/user-menu-po.js +1 -1
  1618. package/packages/test-infra/page-objects/user-setting-po.js +2 -1
  1619. package/packages/test-infra/page-objects/view-po.js +1 -1
  1620. package/packages/test-infra/playwright-setup/global-setup.d.ts +1 -2
  1621. package/packages/test-infra/playwright-setup/global-setup.js +1 -3
  1622. package/packages/test-infra/playwright-setup/global-teardown.js +1 -1
  1623. package/packages/test-infra/test-data/crud-tests/crud-test-data-factory.js +1 -1
  1624. package/packages/test-infra/test-data/crud-tests/crud-test-data.js +1 -1
  1625. package/packages/test-infra/test-data/crud-tests/relation-sync-info-provider.js +2 -1
  1626. package/packages/test-infra/test-data/dev/friends/friends-mother.js +1 -1
  1627. package/packages/test-infra/test-data/dev/persons/person-mother.js +2 -1
  1628. package/packages/test-infra/test-data/dev/persons/phone-brand-mother.js +1 -1
  1629. package/packages/test-infra/test-data/integration-tests/base-http-client.js +1 -1
  1630. package/packages/test-infra/test-data/integration-tests/http-client.js +2 -1
  1631. package/packages/test-infra/test-data/integration-tests/result-comparer.js +1 -1
  1632. package/packages/test-infra/test-data/integration-tests/workspace.js +1 -4
  1633. package/packages/test-infra/test-data/meta/person-property-metas.js +1 -1
  1634. package/packages/test-infra/test-data/meta/resource-meta-mother.js +2 -2
  1635. package/packages/test-infra/test-data/meta/ui-meta-mother.js +1 -1
  1636. package/packages/test-infra/test-data/meta/ui-property-meta-mother.js +1 -1
  1637. package/packages/test-infra/test-data/seed-test-data.js +1 -1
  1638. package/packages/test-infra/ui-tester/global-ui-test.js +1 -1
  1639. package/packages/test-infra/ui-tester/ui-tester.js +4 -4
  1640. package/packages/tools/string-duplication/analyze-code-base.js +4 -0
  1641. package/packages/tools/string-duplication/directives.d.ts +6 -0
  1642. package/packages/tools/string-duplication/directives.js +4 -0
  1643. package/packages/tools/string-duplication/handlers.js +2 -2
  1644. package/packages/tools/string-duplication/normalizer.js +1 -1
  1645. package/packages/tools/string-duplication/reporter.d.ts +1 -1
  1646. package/packages/tools/string-duplication/reporter.js +2 -1
  1647. package/packages/tools/string-duplication/resolver.js +1 -1
  1648. package/packages/tools/string-duplication/string-extractor.d.ts +1 -0
  1649. package/packages/tools/string-duplication/string-extractor.js +3 -2
  1650. package/server/index.d.ts +5 -4
  1651. package/server/index.js +3 -3
  1652. package/src/app/http-wrappers.d.ts +5 -2
  1653. package/src/app/http-wrappers.js +2 -2
  1654. package/src/app/init-saas-kit.d.ts +1 -0
  1655. package/src/app/init-saas-kit.js +8 -0
  1656. package/test-infra/index.d.ts +4 -11
  1657. package/test-infra/index.js +3 -8
  1658. package/undocumented/index.d.ts +285 -312
  1659. package/undocumented/index.js +228 -249
  1660. package/packages/base-repo/constants.d.ts +0 -5
  1661. package/packages/base-repo/constants.js +0 -4
  1662. package/packages/base-repo/tools/git/pre-commit-script.d.ts +0 -5
  1663. package/packages/base-repo/tools/git/pre-commit-script.js +0 -12
  1664. package/packages/fd-toolbox/infra/env-store.d.ts +0 -3
  1665. package/packages/fd-toolbox/infra/env-store.js +0 -7
  1666. package/packages/fd-toolbox/schema-constants/schema-names.d.ts +0 -21
  1667. package/packages/fd-toolbox/schema-constants/schema-names.js +0 -7
  1668. package/packages/fd-toolbox/server/constants/std-events.d.ts +0 -3
  1669. package/packages/fd-toolbox/server/constants/std-events.js +0 -4
  1670. package/packages/level2/client/pages/leads-viw-page/LeadsViewPage.d.ts +0 -2
  1671. package/packages/level2/client/pages/leads-viw-page/LeadsViewPage.js +0 -18
  1672. package/packages/level2/client/website-scan/WebsiteScanResult.d.ts +0 -6
  1673. package/packages/level2/client/website-scan/WebsiteScanResult.funcs.d.ts +0 -4
  1674. package/packages/level2/client/website-scan/WebsiteScanResult.funcs.js +0 -28
  1675. package/packages/level2/client/website-scan/WebsiteScanResult.js +0 -62
  1676. package/packages/level2/common/hd/hd-constants/hd-enums.d.ts +0 -5
  1677. package/packages/level2/common/hd/hd-constants/hd-enums.js +0 -4
  1678. package/packages/level2/common/hd/resources/hd-product.resource.d.ts +0 -7
  1679. package/packages/level2/common/hd/resources/hd-product.resource.js +0 -7
  1680. package/packages/level2/common/leads/lm/google-place.resource-ext.d.ts +0 -3
  1681. package/packages/level2/common/leads/lm/google-place.resource-ext.js +0 -6
  1682. package/packages/level2/common/lm/constants/lm-notifications.d.ts +0 -28
  1683. package/packages/level2/common/lm/constants/lm-notifications.js +0 -4
  1684. package/packages/level2/common/lm/models/save-to-group-request.d.ts +0 -5
  1685. package/packages/level2/common/lm/models/save-to-group-request.js +0 -1
  1686. package/packages/level2/common/lm/models/save-to-group-response.d.ts +0 -3
  1687. package/packages/level2/common/lm/models/save-to-group-response.js +0 -1
  1688. package/packages/level2/fd-app-toolbox/form-constants/forms.d.ts +0 -3
  1689. package/packages/level2/fd-app-toolbox/form-constants/forms.js +0 -4
  1690. package/packages/level2/fd-app-toolbox/infra/app-toolbox-env-setting-keys.d.ts +0 -3
  1691. package/packages/level2/fd-app-toolbox/infra/app-toolbox-env-setting-keys.js +0 -4
  1692. package/packages/level2/fd-app-toolbox/report/charts.d.ts +0 -8
  1693. package/packages/level2/fd-app-toolbox/report/charts.js +0 -4
  1694. package/packages/level2/fd-component-toolbox/back-button/BackButton.funcs.d.ts +0 -4
  1695. package/packages/level2/fd-component-toolbox/back-button/BackButton.funcs.js +0 -4
  1696. package/packages/level2/fd-component-toolbox/sheet/fd-sheet-constants.d.ts +0 -6
  1697. package/packages/level2/fd-component-toolbox/sheet/fd-sheet-constants.js +0 -4
  1698. package/packages/level2/fd-component-toolbox/tooltip/tooltip-constants.d.ts +0 -11
  1699. package/packages/level2/fd-component-toolbox/tooltip/tooltip-constants.js +0 -4
  1700. package/packages/level2/http-wrappers.d.ts +0 -4
  1701. package/packages/level2/http-wrappers.js +0 -8
  1702. package/packages/level2/meta/blob/blob-constants.d.ts +0 -6
  1703. package/packages/level2/meta/blob/blob-constants.js +0 -4
  1704. package/packages/level2/meta/server/constants/folder-names.d.ts +0 -7
  1705. package/packages/level2/meta/server/constants/folder-names.js +0 -4
  1706. package/packages/level2/meta/server/constants/meta-routes.d.ts +0 -3
  1707. package/packages/level2/meta/server/constants/meta-routes.js +0 -4
  1708. package/packages/level2/meta/server/constants/search-query-params.d.ts +0 -2
  1709. package/packages/level2/meta/server/constants/search-query-params.js +0 -4
  1710. package/packages/level2/meta/server/modules/get-generated-files.d.ts +0 -10
  1711. package/packages/level2/meta/server/modules/get-generated-files.js +0 -19
  1712. package/packages/level2/meta/server/modules/init-generated-files.d.ts +0 -1
  1713. package/packages/level2/meta/server/modules/init-generated-files.js +0 -17
  1714. package/packages/level2/meta/server/web/init-saas-kit.d.ts +0 -2
  1715. package/packages/level2/meta/server/web/init-saas-kit.js +0 -7
  1716. package/packages/level2/npm-commands/gen-exports/generate-exports-constants.d.ts +0 -34
  1717. package/packages/level2/npm-commands/gen-exports/generate-exports-constants.js +0 -6
  1718. package/packages/level2/server/auth/lm-permission-master-data.d.ts +0 -1
  1719. package/packages/level2/server/auth/lm-permission-master-data.js +0 -7
  1720. package/packages/level2/server/hd/plaid/plaid-constants.d.ts +0 -14
  1721. package/packages/level2/server/hd/plaid/plaid-constants.js +0 -4
  1722. package/packages/level2/server/hd/plaid/plaid.d.ts +0 -26
  1723. package/packages/level2/server/hd/plaid/plaid.js +0 -12
  1724. package/packages/level2/server/init-saas-kit.d.ts +0 -2
  1725. package/packages/level2/server/init-saas-kit.js +0 -7
  1726. package/packages/level2/server/lm/google-place/google-place-to-lead.d.ts +0 -2
  1727. package/packages/level2/server/lm/google-place/google-place-to-lead.js +0 -15
  1728. package/packages/level2/server/lm/google-place/save-to-group/save-to-group-api.d.ts +0 -6
  1729. package/packages/level2/server/lm/google-place/save-to-group/save-to-group-api.js +0 -11
  1730. package/packages/level2/server/lm/google-place-scan-website/google-place-scan-website-api.d.ts +0 -3
  1731. package/packages/level2/server/lm/google-place-scan-website/google-place-scan-website-api.js +0 -13
  1732. package/packages/level2/server/lm/lead-scan-website/lead-scan-website-api.d.ts +0 -3
  1733. package/packages/level2/server/lm/lead-scan-website/lead-scan-website-api.js +0 -14
  1734. package/packages/level2/server/media/media-master-data.d.ts +0 -4
  1735. package/packages/level2/server/media/media-master-data.js +0 -14
  1736. package/packages/test-infra/fixtures/custom-test-functions.d.ts +0 -40
  1737. package/packages/test-infra/fixtures/custom-test-functions.js +0 -33
  1738. package/packages/test-infra/fixtures/extend-test.d.ts +0 -9
  1739. package/packages/test-infra/fixtures/extend-test.js +0 -10
  1740. package/packages/test-infra/monorepo-global-setup.d.ts +0 -1
  1741. package/packages/test-infra/monorepo-global-setup.js +0 -9
  1742. package/packages/test-infra/monorepo-global-teardown.d.ts +0 -1
  1743. package/packages/test-infra/monorepo-global-teardown.js +0 -7
  1744. package/packages/tools/string-duplication/index.js +0 -11
  1745. package/src/env.d.ts +0 -1
  1746. package/src/env.js +0 -7
  1747. package/src/hd/footer/HdFooter.d.ts +0 -2
  1748. package/src/hd/footer/HdFooter.js +0 -52
  1749. package/src/hd/footer/hd-footer-item/HdFooterItem.d.ts +0 -6
  1750. package/src/hd/footer/hd-footer-item/HdFooterItem.js +0 -33
  1751. package/src/hd/footer/hd-footer.d.ts +0 -10
  1752. package/src/hd/footer/hd-footer.js +0 -4
  1753. package/src/lm/ai-scan/AiScanAction.d.ts +0 -7
  1754. package/src/lm/ai-scan/AiScanAction.funcs.d.ts +0 -5
  1755. package/src/lm/ai-scan/AiScanAction.funcs.js +0 -11
  1756. package/src/lm/ai-scan/AiScanAction.js +0 -37
  1757. package/src/lm/ai-scan/cell-templates/AiScanWebsiteResultCellTemplate.d.ts +0 -3
  1758. package/src/lm/ai-scan/cell-templates/AiScanWebsiteResultCellTemplate.js +0 -80
  1759. package/src/lm/components/LmCardReport.d.ts +0 -7
  1760. package/src/lm/components/LmCardReport.js +0 -36
  1761. package/src/lm/configs/lm-list-configs.d.ts +0 -14
  1762. package/src/lm/configs/lm-list-configs.js +0 -119
  1763. package/src/lm/constants/lm-tooltip-labels.d.ts +0 -12
  1764. package/src/lm/constants/lm-tooltip-labels.js +0 -4
  1765. package/src/lm/google-place/action-dropdown/GooglePlaceActionDropdown.d.ts +0 -6
  1766. package/src/lm/google-place/action-dropdown/GooglePlaceActionDropdown.funcs.d.ts +0 -11
  1767. package/src/lm/google-place/action-dropdown/GooglePlaceActionDropdown.funcs.js +0 -4
  1768. package/src/lm/google-place/action-dropdown/GooglePlaceActionDropdown.js +0 -104
  1769. package/src/lm/google-place/action-dropdown/google-place-dropdown-actions.d.ts +0 -12
  1770. package/src/lm/google-place/action-dropdown/google-place-dropdown-actions.js +0 -11
  1771. package/src/lm/google-place/actions/GooglePlaceSaveToGroupAction.d.ts +0 -9
  1772. package/src/lm/google-place/actions/GooglePlaceSaveToGroupAction.funcs.d.ts +0 -17
  1773. package/src/lm/google-place/actions/GooglePlaceSaveToGroupAction.funcs.js +0 -12
  1774. package/src/lm/google-place/actions/GooglePlaceSaveToGroupAction.js +0 -97
  1775. package/src/lm/google-place/actions/google-place-delete-action.d.ts +0 -2
  1776. package/src/lm/google-place/actions/google-place-delete-action.js +0 -4
  1777. package/src/lm/google-place/actions/google-place-take-screenshot-action.d.ts +0 -2
  1778. package/src/lm/google-place/actions/google-place-take-screenshot-action.js +0 -11
  1779. package/src/lm/google-place/cell-templates/GooglePlaceBusinessInfoCellTemplate.d.ts +0 -5
  1780. package/src/lm/google-place/cell-templates/GooglePlaceBusinessInfoCellTemplate.js +0 -80
  1781. package/src/lm/google-place/cell-templates/GooglePlaceEmailsCellTemplate.d.ts +0 -5
  1782. package/src/lm/google-place/cell-templates/GooglePlaceEmailsCellTemplate.funcs.d.ts +0 -3
  1783. package/src/lm/google-place/cell-templates/GooglePlaceEmailsCellTemplate.funcs.js +0 -4
  1784. package/src/lm/google-place/cell-templates/GooglePlaceEmailsCellTemplate.js +0 -95
  1785. package/src/lm/google-place/cell-templates/GooglePlaceScanAction.d.ts +0 -7
  1786. package/src/lm/google-place/cell-templates/GooglePlaceScanAction.funcs.d.ts +0 -6
  1787. package/src/lm/google-place/cell-templates/GooglePlaceScanAction.funcs.js +0 -10
  1788. package/src/lm/google-place/cell-templates/GooglePlaceScanAction.js +0 -52
  1789. package/src/lm/lead/action-dropdown/LeadActionDropdown.d.ts +0 -6
  1790. package/src/lm/lead/action-dropdown/LeadActionDropdown.funcs.d.ts +0 -5
  1791. package/src/lm/lead/action-dropdown/LeadActionDropdown.funcs.js +0 -4
  1792. package/src/lm/lead/action-dropdown/LeadActionDropdown.js +0 -97
  1793. package/src/lm/lead/action-dropdown/lead-dropdown-actions.d.ts +0 -11
  1794. package/src/lm/lead/action-dropdown/lead-dropdown-actions.js +0 -15
  1795. package/src/lm/lead/actions/export-leads-action/export-leads-action.d.ts +0 -2
  1796. package/src/lm/lead/actions/export-leads-action/export-leads-action.js +0 -7
  1797. package/src/lm/lead/actions/move-to-group-action/LeadMoveToGroupAction.d.ts +0 -9
  1798. package/src/lm/lead/actions/move-to-group-action/LeadMoveToGroupAction.funcs.d.ts +0 -6
  1799. package/src/lm/lead/actions/move-to-group-action/LeadMoveToGroupAction.funcs.js +0 -9
  1800. package/src/lm/lead/actions/move-to-group-action/LeadMoveToGroupAction.js +0 -90
  1801. package/src/lm/lead/actions/save-to-group-action/lead-save-to-group-action.d.ts +0 -4
  1802. package/src/lm/lead/actions/save-to-group-action/lead-save-to-group-action.js +0 -7
  1803. package/src/lm/lead/actions/take-screenshot-action/lead-take-screenshot-action.d.ts +0 -15
  1804. package/src/lm/lead/actions/take-screenshot-action/lead-take-screenshot-action.js +0 -12
  1805. package/src/lm/lead/cell-templates/LeadBusinessInfoCellTemplate.d.ts +0 -5
  1806. package/src/lm/lead/cell-templates/LeadBusinessInfoCellTemplate.js +0 -116
  1807. package/src/lm/lead/cell-templates/LeadScanAction.d.ts +0 -7
  1808. package/src/lm/lead/cell-templates/LeadScanAction.funcs.d.ts +0 -6
  1809. package/src/lm/lead/cell-templates/LeadScanAction.funcs.js +0 -9
  1810. package/src/lm/lead/cell-templates/LeadScanAction.js +0 -52
  1811. package/src/lm/lead/lead-google-place/LeadGooglePlaceIndicator.d.ts +0 -7
  1812. package/src/lm/lead/lead-google-place/LeadGooglePlaceIndicator.js +0 -29
  1813. package/src/lm/lead/lead-google-place/LeadGooglePlaceIndicators.d.ts +0 -10
  1814. package/src/lm/lead/lead-google-place/LeadGooglePlaceIndicators.js +0 -34
  1815. package/src/lm/lead/lead-google-place/LeadGooglePlaceInfo.d.ts +0 -7
  1816. package/src/lm/lead/lead-google-place/LeadGooglePlaceInfo.js +0 -36
  1817. package/src/lm/lead/lead-google-place/lead-google-place-constants.d.ts +0 -13
  1818. package/src/lm/lead/lead-google-place/lead-google-place-constants.js +0 -4
  1819. package/src/lm/lead/view/LeadsView.d.ts +0 -1
  1820. package/src/lm/lead/view/LeadsView.js +0 -24
  1821. package/src/lm/lead-group/table-custom-action/lead-group-table-custom-action.d.ts +0 -3
  1822. package/src/lm/lead-group/table-custom-action/lead-group-table-custom-action.js +0 -12
  1823. package/src/lm/pages/HomePage.d.ts +0 -13
  1824. package/src/lm/pages/HomePage.funcs.d.ts +0 -2
  1825. package/src/lm/pages/HomePage.funcs.js +0 -13
  1826. package/src/lm/pages/HomePage.js +0 -108
  1827. /package/packages/{test-infra/constants/ui-tester → base-repo/constants}/ui-constants.d.ts +0 -0
  1828. /package/packages/{test-infra/constants/ui-tester → base-repo/constants}/ui-constants.js +0 -0
  1829. /package/packages/level2/{client → common}/website-scan/social-media-links.d.ts +0 -0
  1830. /package/packages/level2/{client → common}/website-scan/social-media-links.js +0 -0
  1831. /package/packages/tools/string-duplication/{index.d.ts → analyze-code-base.d.ts} +0 -0
@@ -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=(_0x43e343,_0x55445a)=>__defProp(_0x43e343,'name',{'value':_0x55445a,'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(_0x4b9cdb,_0x2711fe,_0x4b1537,_0xa679dd,_0x33e691,_0x2f521b,_0x173c25){const _0x290efa={...createBaseResourceProperties(_0x4b9cdb),'name':_0x2711fe,'isActive':_0x4b1537,'paymentSystemId':_0xa679dd,'isContactUs':_0x33e691,'contactUsUrl':_0x2f521b,'pricingDescription':_0x173c25};return createPaymentPlan(_0x290efa);}__name(internalSeedPaymentPlan,'internalSeedPaymentPlan');async function seedPaymentPlan(_0x12bb48){const _0x1c1514=await internalSeedPaymentPlan(_0x12bb48['paymentPlanId']??getNewUuid(),_0x12bb48['name'],!![],_0x12bb48['paymentSystemId'],!!_0x12bb48['contactUsUrl'],_0x12bb48['contactUsUrl'],_0x12bb48['pricingDescription']),_0x4305b1=_0x12bb48['pricingConfigs'];for(const _0x5e6fca of _0x4305b1){await seedPricing(getNewUuid(),_0x1c1514['id'],_0x5e6fca['price'],_0x5e6fca['currency'],_0x5e6fca['billingInterval']);}if(_0x12bb48['featureIds'])for(const _0x132e5e of _0x12bb48['featureIds']){await seedPaymentPlanFeature(getNewUuid(),_0x132e5e,_0x1c1514['id']);}}__name(seedPaymentPlan,'seedPaymentPlan');async function seedBasicPaymentPlan(){const _0x421c19=[featureIds['userSupportId'],featureIds['contactManagementId'],featureIds['tasksAndRemindersId'],featureIds['calendarAndSchedulingId'],featureIds['analyticsAndReportingId']],_0x222aec=[{'billingInterval':billingIntervals['month'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']},{'billingInterval':billingIntervals['year'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']}];await seedPaymentPlan({'name':paymentPlanNames['basic'],'pricingConfigs':_0x222aec,'paymentPlanId':paymentPlanIds['basicId'],'featureIds':_0x421c19});}__name(seedBasicPaymentPlan,'seedBasicPaymentPlan');async function seedThirdPaymentPlan(){const _0x38b37e=[featureIds['unlimitedUsersId'],featureIds['fullCustomizationId'],featureIds['scalableAutomationId'],featureIds['backupAndRecoveryId'],featureIds['advancedAnalyticsAndReportingId']],_0xe5291f=[{'billingInterval':billingIntervals['month'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['thirdPrice']},{'billingInterval':billingIntervals['year'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['thirdPrice']}];await seedPaymentPlan({'name':paymentPlanNames['professional'],'pricingConfigs':_0xe5291f,'paymentPlanId':paymentPlanIds['thirdId'],'featureIds':_0x38b37e});}__name(seedThirdPaymentPlan,'seedThirdPaymentPlan');async function seedAdvancedPaymentPlan(){const _0x2d2998=[{'billingInterval':billingIntervals['month'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']},{'billingInterval':billingIntervals['year'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']}];await seedPaymentPlan({'name':paymentPlanNames['advanced'],'pricingConfigs':_0x2d2998,'contactUsUrl':'#','paymentPlanId':paymentPlanIds['advancedId'],'pricingDescription':'Let`s\x20tailor\x20your\x20package.\x20Contact\x20us\x20for\x20personalized\x20pricing.'});}__name(seedAdvancedPaymentPlan,'seedAdvancedPaymentPlan');
16
+ var __defProp=Object['defineProperty'],__name=(_0x4e4451,_0x359060)=>__defProp(_0x4e4451,'name',{'value':_0x359060,'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(_0x149f4d,_0x2d8e1e,_0x2bba14,_0x201e07,_0x5506c3,_0x3177e1,_0x40455e){const _0x2bf9d4={...createBaseResourceProperties(_0x149f4d),'name':_0x2d8e1e,'isActive':_0x2bba14,'paymentSystemId':_0x201e07,'isContactUs':_0x5506c3,'contactUsUrl':_0x3177e1,'pricingDescription':_0x40455e};return createPaymentPlan(_0x2bf9d4);}__name(internalSeedPaymentPlan,'internalSeedPaymentPlan');async function seedPaymentPlan(_0x4dc8ff){const _0x21f4bb=await internalSeedPaymentPlan(_0x4dc8ff['paymentPlanId']??getNewUuid(),_0x4dc8ff['name'],!![],_0x4dc8ff['paymentSystemId'],!!_0x4dc8ff['contactUsUrl'],_0x4dc8ff['contactUsUrl'],_0x4dc8ff['pricingDescription']),_0x2bc30f=_0x4dc8ff['pricingConfigs'];for(const _0x5842d0 of _0x2bc30f){await seedPricing(getNewUuid(),_0x21f4bb['id'],_0x5842d0['price'],_0x5842d0['currency'],_0x5842d0['billingInterval']);}if(_0x4dc8ff['featureIds'])for(const _0x40dd3d of _0x4dc8ff['featureIds']){await seedPaymentPlanFeature(getNewUuid(),_0x40dd3d,_0x21f4bb['id']);}}__name(seedPaymentPlan,'seedPaymentPlan');async function seedBasicPaymentPlan(){const _0x173641=[featureIds['userSupportId'],featureIds['contactManagementId'],featureIds['tasksAndRemindersId'],featureIds['calendarAndSchedulingId'],featureIds['analyticsAndReportingId']],_0x3231a1=[{'billingInterval':billingIntervals['month'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']},{'billingInterval':billingIntervals['year'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']}];await seedPaymentPlan({'name':paymentPlanNames['basic'],'pricingConfigs':_0x3231a1,'paymentPlanId':paymentPlanIds['basicId'],'featureIds':_0x173641});}__name(seedBasicPaymentPlan,'seedBasicPaymentPlan');async function seedThirdPaymentPlan(){const _0x441f56=[featureIds['unlimitedUsersId'],featureIds['fullCustomizationId'],featureIds['scalableAutomationId'],featureIds['backupAndRecoveryId'],featureIds['advancedAnalyticsAndReportingId']],_0x4b44d7=[{'billingInterval':billingIntervals['month'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['thirdPrice']},{'billingInterval':billingIntervals['year'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['thirdPrice']}];await seedPaymentPlan({'name':paymentPlanNames['professional'],'pricingConfigs':_0x4b44d7,'paymentPlanId':paymentPlanIds['thirdId'],'featureIds':_0x441f56});}__name(seedThirdPaymentPlan,'seedThirdPaymentPlan');async function seedAdvancedPaymentPlan(){const _0x59be45=[{'billingInterval':billingIntervals['month'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']},{'billingInterval':billingIntervals['year'],'currency':currencyCodes['usd'],'price':paymentPlanPrices['basicPrice']}];await seedPaymentPlan({'name':paymentPlanNames['advanced'],'pricingConfigs':_0x59be45,'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=(_0x173fb6,_0xba2581)=>__defProp(_0x173fb6,'name',{'value':_0xba2581,'configurable':!![]});function isPaymentPlanTrial(_0x2e56a5){return _0x2e56a5['name']===paymentPlanNames['trial'];}__name(isPaymentPlanTrial,'isPaymentPlanTrial');
4
+ var __defProp=Object['defineProperty'],__name=(_0x3b0c42,_0x23d4bb)=>__defProp(_0x3b0c42,'name',{'value':_0x23d4bb,'configurable':!![]});function isPaymentPlanTrial(_0x53530c){return _0x53530c['name']===paymentPlanNames['trial'];}__name(isPaymentPlanTrial,'isPaymentPlanTrial');
5
5
 
6
6
  export { isPaymentPlanTrial };
@@ -1,6 +1,4 @@
1
1
  /**
2
2
  * Register payment customer and create workspace subscription api.
3
3
  */
4
- export declare const registerPaymentCustomerAndCreateWorkspaceSubscriptionApi: (request: Request, { params }: {
5
- params: Promise<Partial<import("../../../../../lib/package/server").QueryParams>>;
6
- }) => Promise<Response>;
4
+ export declare function registerPaymentCustomerAndCreateWorkspaceSubscriptionApi(req: Request): Promise<Response>;
@@ -1,8 +1,7 @@
1
1
  'use strict';
2
- import { httpApiWrapper } from '../../../http-wrappers.js';
3
2
  import { registerPaymentCustomerAndCreateWorkspaceSubscription } from './payments.js';
4
3
  import { parseJsonBodyFromRequest } from '../../../../fd-toolbox/lib/utils.js';
5
4
 
6
- const registerPaymentCustomerAndCreateWorkspaceSubscriptionApi=httpApiWrapper(async _0x60ff5a=>{const {name:_0x3f9438,email:_0x39719a,pricingId:_0x407cd5,paymentMethodId:_0xbac5b0}=await parseJsonBodyFromRequest(_0x60ff5a),_0x1f28a3=await registerPaymentCustomerAndCreateWorkspaceSubscription(_0x3f9438,_0x39719a,_0x407cd5,_0xbac5b0);return _0x1f28a3;});
5
+ var __defProp=Object['defineProperty'],__name=(_0x174536,_0x3ce767)=>__defProp(_0x174536,'name',{'value':_0x3ce767,'configurable':!![]});async function registerPaymentCustomerAndCreateWorkspaceSubscriptionApi(_0x426be0){const {name:_0x5c46db,email:_0x1ea6c3,pricingId:_0x4c8a96,paymentMethodId:_0x260d68}=await parseJsonBodyFromRequest(_0x426be0),_0xc5d44f=await registerPaymentCustomerAndCreateWorkspaceSubscription(_0x5c46db,_0x1ea6c3,_0x4c8a96,_0x260d68);return _0xc5d44f;}__name(registerPaymentCustomerAndCreateWorkspaceSubscriptionApi,'registerPaymentCustomerAndCreateWorkspaceSubscriptionApi');
7
6
 
8
7
  export { registerPaymentCustomerAndCreateWorkspaceSubscriptionApi };
@@ -16,12 +16,12 @@ import { paymentStatus } from '../../../common/payments/stripe/stripe-constants.
16
16
  import { Subscription } from '../../../meta/subscription-plan/subscription.resource.js';
17
17
  import { getObjectValues } from '../../../../fd-toolbox/lib/utils.js';
18
18
  import { updateWorkspacePricingId, setWorkspacePaymentSystemId, getCurrentWorkspace } from '../../../fd-app-toolbox/server/infra/workspaces/workspace-db.js';
19
- import { isProd } from '../../../../fd-toolbox/lib/environments.js';
19
+ import { isProdOrDemo } from '../../../../fd-toolbox/lib/environments.js';
20
20
  import { getPaymentPlanByPricingId } from './payment-plan-db.js';
21
21
  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=(_0x3e3440,_0x27134f)=>__defProp(_0x3e3440,'name',{'value':_0x27134f,'configurable':!![]});async function registerPaymentCustomerAndCreateWorkspaceSubscription(_0x4febf0,_0x12d2a3,_0xbe1aa7,_0x49e2b1){let _0x5b5eac;_0x5b5eac=await getCurrentPaymentSystemCustomerId(),_0x5b5eac??=await createPaymentSystemCustomer(_0x4febf0,_0x12d2a3),await attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x5b5eac,_0x49e2b1),await setPaymentMethodAsDefault(_0x49e2b1,_0x5b5eac);const _0x3593ca=await getPaymentPlanByPricingId(_0xbe1aa7);if(!_0x3593ca)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(!isPaymentPlanTrial(_0x3593ca))return createSubscriptionWithInstantPayment(_0xbe1aa7,_0x49e2b1,_0x5b5eac);else {if(await hasPaidOrTrialSubscription())throw apiBadRequestError(paymentErrorMessages['trialCannotBeCreated']);return createTrialSubscription(_0xbe1aa7,_0x49e2b1,_0x5b5eac);}}__name(registerPaymentCustomerAndCreateWorkspaceSubscription,'registerPaymentCustomerAndCreateWorkspaceSubscription');async function changeCurrentUserDefaultPaymentMethod(_0x141dd5){if(!areEnvSettingsConfiguredForPaymentSystem())return apiNotFoundResponse(paymentErrorMessages['environmentSettingsForPaymentSystemAreNotConfigured']);const _0x1548cc=await getCurrentPaymentSystemCustomerId();if(!_0x1548cc)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);return await attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x1548cc,_0x141dd5),await setPaymentMethodAsDefault(_0x141dd5,_0x1548cc),apiNoContentResponse();}__name(changeCurrentUserDefaultPaymentMethod,'changeCurrentUserDefaultPaymentMethod');async function getCurrentDefaultPaymentMethod(){if(!areEnvSettingsConfiguredForPaymentSystem())return apiNotFoundResponse(paymentErrorMessages['environmentSettingsForPaymentSystemAreNotConfigured']);const _0x3aafea=await getCurrentPaymentSystemCustomerId();if(!_0x3aafea)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);const _0x35c860=await getStripeDefaultPaymentMethod(_0x3aafea);if(!_0x35c860)throw apiNotFoundError(paymentErrorMessages['defaultPaymentMethodNotFound']);if(!_0x35c860['card'])throw apiNotFoundError(paymentErrorMessages['cardAttachedToPaymentMethodNotFound']);const _0x21f807={'brand':_0x35c860['card']['brand'],'safeCardNumber':_0x35c860['card']['last4'],'expMonth':_0x35c860['card']['exp_month'],'expYear':_0x35c860['card']['exp_year']};return apiOkResponse(_0x21f807);}__name(getCurrentDefaultPaymentMethod,'getCurrentDefaultPaymentMethod');async function createTrialSubscription(_0x2c2df5,_0x4dba14,_0x34e011){const _0x49c8ba=await getCurrentWorkspaceId(),_0x34aa4d=await subscribeTrial(_0x2c2df5,_0x4dba14,_0x34e011),_0x457bdf=await getActiveSubscriptionByWorkspaceId(_0x49c8ba);return _0x457bdf&&await changeSubscriptionStatus(_0x457bdf['id'],subscriptionStatuses['paused']),await updateWorkspacePricingId(_0x49c8ba,_0x2c2df5),await storeTrialSubscription(_0x34aa4d,_0x2c2df5),apiCreatedResponse({'isPaymentCompleted':!![]});}__name(createTrialSubscription,'createTrialSubscription');async function createSubscriptionWithInstantPayment(_0x50f7d3,_0x181782,_0x2912cb){const _0xab9943=await getCurrentWorkspaceId(),{transactionId:_0x159971,confirmedPaymentStatus:_0x224809,clientSecret:_0x34cf7d,subscriptionId:_0x124df3}=await subscribeAndPay(_0x50f7d3,_0x181782,_0x2912cb);if(_0x224809===paymentStatus['requiresAction']&&_0x34cf7d)return apiOkResponse({'isPaymentCompleted':![],'clientSecret':_0x34cf7d,'subscriptionId':_0x124df3});const _0x51f0ea=await getSubscriptionFromTransactionId(_0x159971),_0x202da3=await getActiveSubscriptionByWorkspaceId(_0xab9943);return _0x202da3&&await changeSubscriptionStatus(_0x202da3['id'],subscriptionStatuses['paused']),await updateWorkspacePricingId(_0xab9943,_0x50f7d3),await storePaymentData(_0x159971,_0x51f0ea,_0x50f7d3),apiCreatedResponse({'isPaymentCompleted':!![]});}__name(createSubscriptionWithInstantPayment,'createSubscriptionWithInstantPayment');async function subscribeAndPay(_0x2ba9bd,_0x13ffa4,_0xb517ff){const {paymentSystemPriceId:_0x2fcc9b}=await getResource({'resourceName':resourceNames['pricing'],'id':_0x2ba9bd},!![]);if(!_0x2fcc9b)throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x4476ae=await hasPaymentSystemSubscription(_0xb517ff,_0x2fcc9b);if(_0x4476ae)throw apiConflictError(paymentErrors['alreadyPaid']);const _0x5c6ec7=await createPaymentSystemSubscription(_0xb517ff,_0x2fcc9b,_0x13ffa4),_0x32dad9=await getInvoiceToPaySubscription(_0x5c6ec7),{transactionId:_0x24a486,confirmedPaymentStatus:_0x565d01,clientSecret:_0x535c88}=await completePayment(_0x32dad9,_0x13ffa4,_0x5c6ec7);return {'transactionId':_0x24a486,'confirmedPaymentStatus':_0x565d01,'clientSecret':_0x535c88,'subscriptionId':_0x5c6ec7};}__name(subscribeAndPay,'subscribeAndPay');async function subscribeTrial(_0x440d7a,_0x2d84b8,_0x59b56f){const {paymentSystemPriceId:_0x4bad7c}=await getResource({'resourceName':resourceNames['pricing'],'id':_0x440d7a});if(!_0x4bad7c)throw apiBadRequestError(paymentErrors['paymentFailed']);const _0xb6f6d8=await hasPaymentSystemSubscription(_0x59b56f,_0x4bad7c);if(_0xb6f6d8)throw apiConflictError(paymentErrors['alreadyPaid']);const _0x5eaf92=await createPaymentSystemTrialSubscription(_0x59b56f,_0x4bad7c,_0x2d84b8);return _0x5eaf92;}__name(subscribeTrial,'subscribeTrial');async function createPaymentSystemCustomer(_0x57e330,_0x104909){const _0x34a57c=await getCurrentWorkspaceId();if(isProd()){const _0x356248=await findStripeCustomerByEmail(_0x104909);if(_0x356248)throw apiConflictError(paymentErrors['emailAlreadyUsed']['replace']('{0}',_0x104909));}const _0x1e30f7=await createStripeCustomer(_0x57e330,_0x104909,_0x34a57c);if(!_0x1e30f7?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return await setWorkspacePaymentSystemId(_0x1e30f7['id']),_0x1e30f7['id'];}__name(createPaymentSystemCustomer,'createPaymentSystemCustomer');async function createPaymentSystemSubscription(_0x97093e,_0x2b8bfc,_0xa33f31){const _0x23ab55=await createStripeSubscription(_0x97093e,_0x2b8bfc,_0xa33f31);if(!_0x23ab55?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return _0x23ab55['id'];}__name(createPaymentSystemSubscription,'createPaymentSystemSubscription');async function createPaymentSystemTrialSubscription(_0x508069,_0x3e7c2a,_0xe999bc){const _0x163f22=await createStripeTrialSubscription(_0x508069,_0x3e7c2a,_0xe999bc);if(!_0x163f22?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return _0x163f22['id'];}__name(createPaymentSystemTrialSubscription,'createPaymentSystemTrialSubscription');async function getInvoiceToPaySubscription(_0x48dcbe){const _0x4bd8a6=await retrievePaymentIntentFromSubscription(_0x48dcbe);if(!_0x4bd8a6?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x18be3f=_0x4bd8a6['id'];return _0x18be3f;}__name(getInvoiceToPaySubscription,'getInvoiceToPaySubscription');async function completePayment(_0x2a260d,_0x593fa1,_0x1c289c){const _0x3faf6f=await confirmStripePayment(_0x2a260d,_0x593fa1,_0x1c289c);return {'transactionId':_0x3faf6f['id'],'confirmedPaymentStatus':_0x3faf6f['status'],'clientSecret':_0x3faf6f['client_secret']};}__name(completePayment,'completePayment');async function hasPaymentSystemSubscription(_0x47386e,_0x1abe6f){return hasStripeSubscription(_0x47386e,_0x1abe6f);}__name(hasPaymentSystemSubscription,'hasPaymentSystemSubscription');async function getSubscriptionPeriodEndDate(_0x4be1af){const {currentPeriodEndDate:_0x525530}=await getStripeSubscriptionData(_0x4be1af);return unixTimestampToDate(_0x525530);}__name(getSubscriptionPeriodEndDate,'getSubscriptionPeriodEndDate');async function getSubscriptionTrialEndDate(_0x2c0adc){const {trialEnd:_0x103c01}=await getStripeSubscriptionData(_0x2c0adc);if(!_0x103c01)throw apiConflictError(paymentErrorMessages['trialSubscriptionDataNotFound']);return unixTimestampToDate(_0x103c01);}__name(getSubscriptionTrialEndDate,'getSubscriptionTrialEndDate');async function getSubscriptionFromTransactionId(_0x4a6387){const _0xfdd48d=await getSubscriptionFromPaymentIntent(_0x4a6387);return _0xfdd48d;}__name(getSubscriptionFromTransactionId,'getSubscriptionFromTransactionId');async function storePaymentData(_0x4bb8ac,_0x3b0ef1,_0x37b8f2){const _0x406752=new Subscription();_0x406752['pricingId']=_0x37b8f2,_0x406752['status']=subscriptionStatuses['active'],_0x406752['paymentSystemSubscriptionId']=_0x3b0ef1,_0x406752['currentPeriodStartDate']=getNow(),_0x406752['currentPeriodEndDate']=await getSubscriptionPeriodEndDate(_0x3b0ef1);const _0x103d40=await crudCreate({'userId':toolboxUserConstants['workerBotId'],'resourceName':resourceNames['subscription'],'resource':_0x406752,'throwOnNonSuccess':!![]}),{amount:_0x390bf8,currency:_0x2f4a0a,paymentMethodId:_0x5048e9}=await getAfterPaymentDetails(_0x4bb8ac),_0x138924=new Payment();_0x138924['amount']=_0x390bf8,_0x138924['currency']=_0x2f4a0a,_0x138924['paymentMethodId']=_0x5048e9,_0x138924['subscriptionId']=_0x103d40['result']['id'],_0x138924['paymentTransactionId']=_0x4bb8ac,await crudCreate({'userId':toolboxUserConstants['workerBotId'],'resourceName':resourceNames['payment'],'resource':_0x138924,'throwOnNonSuccess':!![]});}__name(storePaymentData,'storePaymentData');async function storeTrialSubscription(_0x1aeb78,_0x4c18e1){const _0x5c6128=new Subscription();_0x5c6128['pricingId']=_0x4c18e1,_0x5c6128['status']=subscriptionStatuses['trialing'],_0x5c6128['paymentSystemSubscriptionId']=_0x1aeb78,_0x5c6128['currentPeriodStartDate']=getNow(),_0x5c6128['currentPeriodEndDate']=await getSubscriptionTrialEndDate(_0x1aeb78),await crudCreate({'userId':await getUserId(),'resourceName':resourceNames['subscription'],'resource':_0x5c6128,'throwOnNonSuccess':!![]});}__name(storeTrialSubscription,'storeTrialSubscription');async function getAfterPaymentDetails(_0x66986a){const {amount:_0x1d1b5d,currency:_0x354f3e,paymentMethodId:_0x450d87,status:_0x55fc55}=await getStripePaymentData(_0x66986a);if(_0x55fc55!==paymentStatus['succeeded'])throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x115930=getObjectValues(currencyCodes)['find'](_0x21a3ec=>_0x21a3ec===_0x354f3e['toUpperCase']());if(!_0x115930)throw apiBadRequestError(paymentErrors['paymentFailed']);if(!_0x450d87||typeof _0x450d87!=='string')throw apiBadRequestError(paymentErrors['paymentFailed']);return {'paymentMethodId':_0x450d87,'amount':_0x1d1b5d,'currency':_0x115930};}__name(getAfterPaymentDetails,'getAfterPaymentDetails');async function cancelIncompleteSubscription(_0x4e7ca3){await cancelStripeSubscriptionById(_0x4e7ca3);}__name(cancelIncompleteSubscription,'cancelIncompleteSubscription');async function changePaymentSystemPlanName(_0x31c509,_0x3fe977){return changeStripeProductName(_0x31c509,_0x3fe977);}__name(changePaymentSystemPlanName,'changePaymentSystemPlanName');async function deactivatePaymentPlan(_0x3a71f7){return deactivateStripeProduct(_0x3a71f7);}__name(deactivatePaymentPlan,'deactivatePaymentPlan');async function changePaymentSystemPlanStatus(_0x2564ee,_0x1c8538){return changeStripeProductStatus(_0x2564ee,_0x1c8538);}__name(changePaymentSystemPlanStatus,'changePaymentSystemPlanStatus');async function getPaymentPlanIdByPriceId(_0x450ea9){return getStripeProductIdByPriceId(_0x450ea9);}__name(getPaymentPlanIdByPriceId,'getPaymentPlanIdByPriceId');async function getCurrentPaymentSystemCustomerId(){const _0x57d262=await getCurrentWorkspace();return _0x57d262['paymentSystemCustomerId'];}__name(getCurrentPaymentSystemCustomerId,'getCurrentPaymentSystemCustomerId');function detachPaymentMethod(_0x4ff853){return stripe['paymentMethods']['detach'](_0x4ff853);}__name(detachPaymentMethod,'detachPaymentMethod');async function setPaymentMethodAsDefault(_0x3cbb22,_0x4c835b){await setCustomerDefaultPaymentMethod(_0x3cbb22,_0x4c835b);}__name(setPaymentMethodAsDefault,'setPaymentMethodAsDefault');async function attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x1be144,_0x487b41){await attachPaymentMethodToCustomer(_0x1be144,_0x487b41),await updateCustomerEmailIfNeeded(_0x1be144,_0x487b41);}__name(attachPaymentSystemPaymentMethodToPaymentSystemCustomer,'attachPaymentSystemPaymentMethodToPaymentSystemCustomer');
25
+ var __defProp=Object['defineProperty'],__name=(_0x5b1cac,_0x40ac22)=>__defProp(_0x5b1cac,'name',{'value':_0x40ac22,'configurable':!![]});async function registerPaymentCustomerAndCreateWorkspaceSubscription(_0x2e77dd,_0xc371df,_0x34381e,_0x2df57e){let _0x5f2ab8;_0x5f2ab8=await getCurrentPaymentSystemCustomerId(),_0x5f2ab8??=await createPaymentSystemCustomer(_0x2e77dd,_0xc371df),await attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x5f2ab8,_0x2df57e),await setPaymentMethodAsDefault(_0x2df57e,_0x5f2ab8);const _0x956fbe=await getPaymentPlanByPricingId(_0x34381e);if(!_0x956fbe)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(!isPaymentPlanTrial(_0x956fbe))return createSubscriptionWithInstantPayment(_0x34381e,_0x2df57e,_0x5f2ab8);else {if(await hasPaidOrTrialSubscription())throw apiBadRequestError(paymentErrorMessages['trialCannotBeCreated']);return createTrialSubscription(_0x34381e,_0x2df57e,_0x5f2ab8);}}__name(registerPaymentCustomerAndCreateWorkspaceSubscription,'registerPaymentCustomerAndCreateWorkspaceSubscription');async function changeCurrentUserDefaultPaymentMethod(_0x34a64c){if(!areEnvSettingsConfiguredForPaymentSystem())return apiNotFoundResponse(paymentErrorMessages['environmentSettingsForPaymentSystemAreNotConfigured']);const _0x3c64af=await getCurrentPaymentSystemCustomerId();if(!_0x3c64af)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);return await attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0x3c64af,_0x34a64c),await setPaymentMethodAsDefault(_0x34a64c,_0x3c64af),apiNoContentResponse();}__name(changeCurrentUserDefaultPaymentMethod,'changeCurrentUserDefaultPaymentMethod');async function getCurrentDefaultPaymentMethod(){if(!areEnvSettingsConfiguredForPaymentSystem())return apiNotFoundResponse(paymentErrorMessages['environmentSettingsForPaymentSystemAreNotConfigured']);const _0x35a44e=await getCurrentPaymentSystemCustomerId();if(!_0x35a44e)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);const _0x413569=await getStripeDefaultPaymentMethod(_0x35a44e);if(!_0x413569)throw apiNotFoundError(paymentErrorMessages['defaultPaymentMethodNotFound']);if(!_0x413569['card'])throw apiNotFoundError(paymentErrorMessages['cardAttachedToPaymentMethodNotFound']);const _0x96ec1e={'brand':_0x413569['card']['brand'],'safeCardNumber':_0x413569['card']['last4'],'expMonth':_0x413569['card']['exp_month'],'expYear':_0x413569['card']['exp_year']};return apiOkResponse(_0x96ec1e);}__name(getCurrentDefaultPaymentMethod,'getCurrentDefaultPaymentMethod');async function createTrialSubscription(_0x5cebb2,_0x37203e,_0x1559a3){const _0x33eae7=await getCurrentWorkspaceId(),_0x1bc79=await subscribeTrial(_0x5cebb2,_0x37203e,_0x1559a3),_0x5531e2=await getActiveSubscriptionByWorkspaceId(_0x33eae7);return _0x5531e2&&await changeSubscriptionStatus(_0x5531e2['id'],subscriptionStatuses['paused']),await updateWorkspacePricingId(_0x33eae7,_0x5cebb2),await storeTrialSubscription(_0x1bc79,_0x5cebb2),apiCreatedResponse({'isPaymentCompleted':!![]});}__name(createTrialSubscription,'createTrialSubscription');async function createSubscriptionWithInstantPayment(_0x1a925b,_0x52403d,_0x30ceb7){const _0x28240d=await getCurrentWorkspaceId(),{transactionId:_0x222227,confirmedPaymentStatus:_0x3fe4d5,clientSecret:_0x509629,subscriptionId:_0x56a82c}=await subscribeAndPay(_0x1a925b,_0x52403d,_0x30ceb7);if(_0x3fe4d5===paymentStatus['requiresAction']&&_0x509629)return apiOkResponse({'isPaymentCompleted':![],'clientSecret':_0x509629,'subscriptionId':_0x56a82c});const _0x4e473d=await getSubscriptionFromTransactionId(_0x222227),_0xc1649f=await getActiveSubscriptionByWorkspaceId(_0x28240d);return _0xc1649f&&await changeSubscriptionStatus(_0xc1649f['id'],subscriptionStatuses['paused']),await updateWorkspacePricingId(_0x28240d,_0x1a925b),await storePaymentData(_0x222227,_0x4e473d,_0x1a925b),apiCreatedResponse({'isPaymentCompleted':!![]});}__name(createSubscriptionWithInstantPayment,'createSubscriptionWithInstantPayment');async function subscribeAndPay(_0x27bf91,_0x555af2,_0x485004){const {paymentSystemPriceId:_0x24cb23}=await getResource({'resourceName':resourceNames['pricing'],'id':_0x27bf91},!![]);if(!_0x24cb23)throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x310b4a=await hasPaymentSystemSubscription(_0x485004,_0x24cb23);if(_0x310b4a)throw apiConflictError(paymentErrors['alreadyPaid']);const _0x3742b4=await createPaymentSystemSubscription(_0x485004,_0x24cb23,_0x555af2),_0x239949=await getInvoiceToPaySubscription(_0x3742b4),{transactionId:_0x5456ef,confirmedPaymentStatus:_0x53bc22,clientSecret:_0x5bb399}=await completePayment(_0x239949,_0x555af2,_0x3742b4);return {'transactionId':_0x5456ef,'confirmedPaymentStatus':_0x53bc22,'clientSecret':_0x5bb399,'subscriptionId':_0x3742b4};}__name(subscribeAndPay,'subscribeAndPay');async function subscribeTrial(_0x435e87,_0x4dfa32,_0x11d7f1){const {paymentSystemPriceId:_0x41fe4a}=await getResource({'resourceName':resourceNames['pricing'],'id':_0x435e87});if(!_0x41fe4a)throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x340aca=await hasPaymentSystemSubscription(_0x11d7f1,_0x41fe4a);if(_0x340aca)throw apiConflictError(paymentErrors['alreadyPaid']);const _0x5b051b=await createPaymentSystemTrialSubscription(_0x11d7f1,_0x41fe4a,_0x4dfa32);return _0x5b051b;}__name(subscribeTrial,'subscribeTrial');async function createPaymentSystemCustomer(_0x28049b,_0x4a13d5){const _0x310684=await getCurrentWorkspaceId();if(isProdOrDemo()){const _0x32c4ad=await findStripeCustomerByEmail(_0x4a13d5);if(_0x32c4ad)throw apiConflictError(paymentErrors['emailAlreadyUsed']['replace']('{0}',_0x4a13d5));}const _0x56c5fe=await createStripeCustomer(_0x28049b,_0x4a13d5,_0x310684);if(!_0x56c5fe?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return await setWorkspacePaymentSystemId(_0x56c5fe['id']),_0x56c5fe['id'];}__name(createPaymentSystemCustomer,'createPaymentSystemCustomer');async function createPaymentSystemSubscription(_0xea15be,_0x775270,_0x140dd8){const _0x4cec0d=await createStripeSubscription(_0xea15be,_0x775270,_0x140dd8);if(!_0x4cec0d?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return _0x4cec0d['id'];}__name(createPaymentSystemSubscription,'createPaymentSystemSubscription');async function createPaymentSystemTrialSubscription(_0x278e55,_0x4402a3,_0x2987b4){const _0x5ac25f=await createStripeTrialSubscription(_0x278e55,_0x4402a3,_0x2987b4);if(!_0x5ac25f?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);return _0x5ac25f['id'];}__name(createPaymentSystemTrialSubscription,'createPaymentSystemTrialSubscription');async function getInvoiceToPaySubscription(_0x2dfeb9){const _0x459478=await retrievePaymentIntentFromSubscription(_0x2dfeb9);if(!_0x459478?.['id'])throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x328ae0=_0x459478['id'];return _0x328ae0;}__name(getInvoiceToPaySubscription,'getInvoiceToPaySubscription');async function completePayment(_0x3d6927,_0x4cc8fe,_0xa30241){const _0x438228=await confirmStripePayment(_0x3d6927,_0x4cc8fe,_0xa30241);return {'transactionId':_0x438228['id'],'confirmedPaymentStatus':_0x438228['status'],'clientSecret':_0x438228['client_secret']};}__name(completePayment,'completePayment');async function hasPaymentSystemSubscription(_0x49b07a,_0x581a61){return hasStripeSubscription(_0x49b07a,_0x581a61);}__name(hasPaymentSystemSubscription,'hasPaymentSystemSubscription');async function getSubscriptionPeriodEndDate(_0x367f19){const {currentPeriodEndDate:_0x982caa}=await getStripeSubscriptionData(_0x367f19);return unixTimestampToDate(_0x982caa);}__name(getSubscriptionPeriodEndDate,'getSubscriptionPeriodEndDate');async function getSubscriptionTrialEndDate(_0x95ebca){const {trialEnd:_0x2c2528}=await getStripeSubscriptionData(_0x95ebca);if(!_0x2c2528)throw apiConflictError(paymentErrorMessages['trialSubscriptionDataNotFound']);return unixTimestampToDate(_0x2c2528);}__name(getSubscriptionTrialEndDate,'getSubscriptionTrialEndDate');async function getSubscriptionFromTransactionId(_0x46258c){const _0x151ffe=await getSubscriptionFromPaymentIntent(_0x46258c);return _0x151ffe;}__name(getSubscriptionFromTransactionId,'getSubscriptionFromTransactionId');async function storePaymentData(_0x43cd8a,_0x361a32,_0x1abba4){const _0x2a86f4=new Subscription();_0x2a86f4['pricingId']=_0x1abba4,_0x2a86f4['status']=subscriptionStatuses['active'],_0x2a86f4['paymentSystemSubscriptionId']=_0x361a32,_0x2a86f4['currentPeriodStartDate']=getNow(),_0x2a86f4['currentPeriodEndDate']=await getSubscriptionPeriodEndDate(_0x361a32);const _0x18d17a=await crudCreate({'userId':toolboxUserConstants['workerBotId'],'resourceName':resourceNames['subscription'],'resource':_0x2a86f4,'throwOnNonSuccess':!![]}),{amount:_0x1b7613,currency:_0x4b665d,paymentMethodId:_0x48bd7d}=await getAfterPaymentDetails(_0x43cd8a),_0x377024=new Payment();_0x377024['amount']=_0x1b7613,_0x377024['currency']=_0x4b665d,_0x377024['paymentMethodId']=_0x48bd7d,_0x377024['subscriptionId']=_0x18d17a['result']['id'],_0x377024['paymentTransactionId']=_0x43cd8a,await crudCreate({'userId':toolboxUserConstants['workerBotId'],'resourceName':resourceNames['payment'],'resource':_0x377024,'throwOnNonSuccess':!![]});}__name(storePaymentData,'storePaymentData');async function storeTrialSubscription(_0x32c309,_0x5ca619){const _0x5453f2=new Subscription();_0x5453f2['pricingId']=_0x5ca619,_0x5453f2['status']=subscriptionStatuses['trialing'],_0x5453f2['paymentSystemSubscriptionId']=_0x32c309,_0x5453f2['currentPeriodStartDate']=getNow(),_0x5453f2['currentPeriodEndDate']=await getSubscriptionTrialEndDate(_0x32c309),await crudCreate({'userId':await getUserId(),'resourceName':resourceNames['subscription'],'resource':_0x5453f2,'throwOnNonSuccess':!![]});}__name(storeTrialSubscription,'storeTrialSubscription');async function getAfterPaymentDetails(_0x58593e){const {amount:_0x540f93,currency:_0x439d82,paymentMethodId:_0x4e1e8f,status:_0x176330}=await getStripePaymentData(_0x58593e);if(_0x176330!==paymentStatus['succeeded'])throw apiBadRequestError(paymentErrors['paymentFailed']);const _0x402f67=getObjectValues(currencyCodes)['find'](_0x2ae43a=>_0x2ae43a===_0x439d82['toUpperCase']());if(!_0x402f67)throw apiBadRequestError(paymentErrors['paymentFailed']);if(!_0x4e1e8f||typeof _0x4e1e8f!=='string')throw apiBadRequestError(paymentErrors['paymentFailed']);return {'paymentMethodId':_0x4e1e8f,'amount':_0x540f93,'currency':_0x402f67};}__name(getAfterPaymentDetails,'getAfterPaymentDetails');async function cancelIncompleteSubscription(_0x3ccbd6){await cancelStripeSubscriptionById(_0x3ccbd6);}__name(cancelIncompleteSubscription,'cancelIncompleteSubscription');async function changePaymentSystemPlanName(_0x2f2f0f,_0x2391dc){return changeStripeProductName(_0x2f2f0f,_0x2391dc);}__name(changePaymentSystemPlanName,'changePaymentSystemPlanName');async function deactivatePaymentPlan(_0x26bdb1){return deactivateStripeProduct(_0x26bdb1);}__name(deactivatePaymentPlan,'deactivatePaymentPlan');async function changePaymentSystemPlanStatus(_0x49e4f2,_0x2ef97c){return changeStripeProductStatus(_0x49e4f2,_0x2ef97c);}__name(changePaymentSystemPlanStatus,'changePaymentSystemPlanStatus');async function getPaymentPlanIdByPriceId(_0xf3e75a){return getStripeProductIdByPriceId(_0xf3e75a);}__name(getPaymentPlanIdByPriceId,'getPaymentPlanIdByPriceId');async function getCurrentPaymentSystemCustomerId(){const _0x4c6a08=await getCurrentWorkspace();return _0x4c6a08['paymentSystemCustomerId'];}__name(getCurrentPaymentSystemCustomerId,'getCurrentPaymentSystemCustomerId');function detachPaymentMethod(_0x121c74){return stripe['paymentMethods']['detach'](_0x121c74);}__name(detachPaymentMethod,'detachPaymentMethod');async function setPaymentMethodAsDefault(_0x4e926b,_0x5dfc7e){await setCustomerDefaultPaymentMethod(_0x4e926b,_0x5dfc7e);}__name(setPaymentMethodAsDefault,'setPaymentMethodAsDefault');async function attachPaymentSystemPaymentMethodToPaymentSystemCustomer(_0xe78d21,_0x46320c){await attachPaymentMethodToCustomer(_0xe78d21,_0x46320c),await updateCustomerEmailIfNeeded(_0xe78d21,_0x46320c);}__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=(_0x10b883,_0x524ece)=>__defProp(_0x10b883,'name',{'value':_0x524ece,'configurable':!![]});const monthsPerYear=0x9ff+-0x15c3+0x48*0x2a;async function seedPricings(){await seedMonthlyPricings(),await seedAnnualPricings();}__name(seedPricings,'seedPricings');async function seedPricing(_0x40ebc8,_0x467334,_0x1bbf59,_0xa083b6,_0x1365b7){const _0xc04102={...createBaseResourceProperties(_0x40ebc8),'paymentPlanId':_0x467334,'price':_0x1bbf59,'currency':_0xa083b6,'billingInterval':_0x1365b7};return createResource(_0xc04102,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');
9
+ var __defProp=Object['defineProperty'],__name=(_0x3aae29,_0x49633d)=>__defProp(_0x3aae29,'name',{'value':_0x49633d,'configurable':!![]});const monthsPerYear=0x1fac+-0x383+-0x1c1d;async function seedPricings(){await seedMonthlyPricings(),await seedAnnualPricings();}__name(seedPricings,'seedPricings');async function seedPricing(_0xe2c011,_0x3072ac,_0x16012f,_0x2cf5d0,_0x10e375){const _0x5a62df={...createBaseResourceProperties(_0xe2c011),'paymentPlanId':_0x3072ac,'price':_0x16012f,'currency':_0x2cf5d0,'billingInterval':_0x10e375};return createResource(_0x5a62df,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=(_0x30137d,_0x1f5031)=>__defProp(_0x30137d,'name',{'value':_0x1f5031,'configurable':!![]});async function preUpdate(_0x5b9e54){const _0x1cb25d=_0x5b9e54['modifiedResource'],_0xe3a4b4=_0x5b9e54['originalResource'],_0x1d3e8e=_0x5b9e54['crudUpdateConfig'],_0x1533f6=await getResource({'resourceName':resourceNames['paymentPlan'],'id':_0x1cb25d['paymentPlanId']});if(_0x1533f6['paymentSystemId']){if(_0x1d3e8e['isCreate']){const _0x2acc34=await createStripeProductPricing(_0x1533f6['paymentSystemId'],_0x1cb25d['currency'],_0x1cb25d['price'],_0x1cb25d['id'],_0x1cb25d['billingInterval']);_0x1cb25d['paymentSystemPriceId']=_0x2acc34['id'];return;}const _0x207036=_0x1cb25d['currency'],_0x25baaa=_0xe3a4b4?.['currency'],_0x546c0d=_0x1cb25d['price'],_0x303c7a=_0xe3a4b4?.['price'];if(_0x207036===_0x25baaa&&_0x546c0d===_0x303c7a)return;try{if(_0xe3a4b4?.['paymentSystemPriceId']&&(_0x207036!==_0x25baaa||_0x546c0d!==_0x303c7a)){await deactivateStripeProductPricing(_0xe3a4b4['paymentSystemPriceId']);const _0x53f3fe=await createStripeProductPricing(_0x1533f6['paymentSystemId'],_0x1cb25d['currency'],_0x1cb25d['price'],_0x1cb25d['id'],_0x1cb25d['billingInterval']);_0x1cb25d['paymentSystemPriceId']=_0x53f3fe['id'];}}catch{createError(paymentErrorMessages['errorWhileEditingPrice']);}}}__name(preUpdate,'preUpdate');async function afterDelete(_0x24c19e){return _0x24c19e['deleteResource']['paymentSystemPriceId']?deactivateStripeProductPricing(_0x24c19e['deleteResource']['paymentSystemPriceId']):createError(paymentErrorMessages['noPaymentSystemIdAttachedToPricing']);}__name(afterDelete,'afterDelete');
8
+ var __defProp=Object['defineProperty'],__name=(_0x35c093,_0x1655d6)=>__defProp(_0x35c093,'name',{'value':_0x1655d6,'configurable':!![]});async function preUpdate(_0x4d0bfc){const _0x339305=_0x4d0bfc['modifiedResource'],_0xe01cc9=_0x4d0bfc['originalResource'],_0x6a0aa8=_0x4d0bfc['crudUpdateConfig'],_0x426999=await getResource({'resourceName':resourceNames['paymentPlan'],'id':_0x339305['paymentPlanId']});if(_0x426999['paymentSystemId']){if(_0x6a0aa8['isCreate']){const _0x5f5d4e=await createStripeProductPricing(_0x426999['paymentSystemId'],_0x339305['currency'],_0x339305['price'],_0x339305['id'],_0x339305['billingInterval']);_0x339305['paymentSystemPriceId']=_0x5f5d4e['id'];}else {const _0x450d2d=_0x339305['currency'],_0x3fde1c=_0xe01cc9?.['currency'],_0x129569=_0x339305['price'],_0x502ea6=_0xe01cc9?.['price'];if(_0x450d2d!==_0x3fde1c||_0x129569!==_0x502ea6)try{if(_0xe01cc9?.['paymentSystemPriceId']){await deactivateStripeProductPricing(_0xe01cc9['paymentSystemPriceId']);const _0x49a860=await createStripeProductPricing(_0x426999['paymentSystemId'],_0x339305['currency'],_0x339305['price'],_0x339305['id'],_0x339305['billingInterval']);_0x339305['paymentSystemPriceId']=_0x49a860['id'];}}catch{createError(paymentErrorMessages['errorWhileEditingPrice']);}}}}__name(preUpdate,'preUpdate');async function afterDelete(_0x1b3551){return _0x1b3551['deleteResource']['paymentSystemPriceId']?deactivateStripeProductPricing(_0x1b3551['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 _0x46cb09 from 'stripe';
8
+ import _0x4ef3d6 from 'stripe';
9
9
 
10
- var __defProp=Object['defineProperty'],__name=(_0x4f9f12,_0x323286)=>__defProp(_0x4f9f12,'name',{'value':_0x323286,'configurable':!![]});async function syncPaymentPlansWithStripeAfterSeeding(){const _0x5ccfbc=await getResourcesByName(resourceNames['paymentPlan']),_0x271cfc=await stripe['products']['list']({'limit':0x64,'active':!![]});for(const _0x4e6daa of _0x5ccfbc){let _0x598d4f=_0x271cfc['data']['find'](_0x523f2e=>_0x523f2e['metadata']&&_0x523f2e['metadata'][pricingProps['paymentPlanId']]===_0x4e6daa['id']);_0x598d4f??=await createStripeProduct(_0x4e6daa['name'],_0x4e6daa['id']),_0x4e6daa['paymentSystemId']!==_0x598d4f['id']&&await updateResource({'id':_0x4e6daa['id'],'paymentSystemId':_0x598d4f['id']},resourceNames['paymentPlan']);}}__name(syncPaymentPlansWithStripeAfterSeeding,'syncPaymentPlansWithStripeAfterSeeding');async function syncPricingsWithStripeAfterSeeding(){const _0x322665=await getResourcesByName(resourceNames['pricing']),_0x3d7fa5=await stripe['products']['list']({'limit':0x64,'active':!![]}),_0x1dfe1e=await stripe['prices']['list']({'limit':0x64,'active':!![]});for(const _0x5f53eb of _0x322665){const _0x435b56=_0x1dfe1e['data']['find'](_0x51ae0f=>_0x51ae0f['metadata']&&_0x51ae0f['metadata'][pricingProps['id']]===_0x5f53eb['id']);if(_0x435b56)_0x5f53eb['paymentSystemPriceId']!==_0x435b56['id']&&await updateResource({'id':_0x5f53eb['id'],'paymentSystemPriceId':_0x435b56['id']},resourceNames['pricing']);else {let _0x47c84f=_0x3d7fa5['data']['find'](_0x339191=>_0x339191['metadata']&&_0x339191['metadata'][pricingProps['paymentPlanId']]===_0x5f53eb['paymentPlanId']);const _0xe64ab7=await createStripeProductPricing(_0x47c84f['id'],_0x5f53eb['currency'],_0x5f53eb['price'],_0x5f53eb['id'],_0x5f53eb['billingInterval'],![]);await updateResource({'id':_0x5f53eb['id'],'paymentSystemPriceId':_0xe64ab7['id']},resourceNames['pricing']);}}}__name(syncPricingsWithStripeAfterSeeding,'syncPricingsWithStripeAfterSeeding');async function syncPaymentPlansAndPricesAfterSeeding(){try{await syncPaymentPlansWithStripeAfterSeeding(),await syncPricingsWithStripeAfterSeeding();}catch(_0x3f8371){if(_0x3f8371 instanceof _0x46cb09['errors']['StripeAuthenticationError']){logWarning(stripeAuthenticationError);return;}throw _0x3f8371;}}__name(syncPaymentPlansAndPricesAfterSeeding,'syncPaymentPlansAndPricesAfterSeeding');
10
+ var __defProp=Object['defineProperty'],__name=(_0x3b671a,_0x50cce6)=>__defProp(_0x3b671a,'name',{'value':_0x50cce6,'configurable':!![]});async function syncPaymentPlansWithStripeAfterSeeding(){const _0x1ac3af=await getResourcesByName(resourceNames['paymentPlan']),_0x274852=await stripe['products']['list']({'limit':0x64,'active':!![]});for(const _0x51eb8a of _0x1ac3af){let _0x3e9089=_0x274852['data']['find'](_0x3d11c2=>_0x3d11c2['metadata']&&_0x3d11c2['metadata'][pricingProps['paymentPlanId']]===_0x51eb8a['id']);_0x3e9089??=await createStripeProduct(_0x51eb8a['name'],_0x51eb8a['id']),_0x51eb8a['paymentSystemId']!==_0x3e9089['id']&&await updateResource({'id':_0x51eb8a['id'],'paymentSystemId':_0x3e9089['id']},resourceNames['paymentPlan']);}}__name(syncPaymentPlansWithStripeAfterSeeding,'syncPaymentPlansWithStripeAfterSeeding');async function syncPricingsWithStripeAfterSeeding(){const _0x371f6e=await getResourcesByName(resourceNames['pricing']),_0x20fdd3=await stripe['products']['list']({'limit':0x64,'active':!![]}),_0x311567=await stripe['prices']['list']({'limit':0x64,'active':!![]});for(const _0x383882 of _0x371f6e){const _0xbbbb6b=_0x311567['data']['find'](_0x2a47ee=>_0x2a47ee['metadata']&&_0x2a47ee['metadata'][pricingProps['id']]===_0x383882['id']);if(_0xbbbb6b)_0x383882['paymentSystemPriceId']!==_0xbbbb6b['id']&&await updateResource({'id':_0x383882['id'],'paymentSystemPriceId':_0xbbbb6b['id']},resourceNames['pricing']);else {let _0x267075=_0x20fdd3['data']['find'](_0x5dcb4b=>_0x5dcb4b['metadata']&&_0x5dcb4b['metadata'][pricingProps['paymentPlanId']]===_0x383882['paymentPlanId']);const _0x4ba60e=await createStripeProductPricing(_0x267075['id'],_0x383882['currency'],_0x383882['price'],_0x383882['id'],_0x383882['billingInterval'],![]);await updateResource({'id':_0x383882['id'],'paymentSystemPriceId':_0x4ba60e['id']},resourceNames['pricing']);}}}__name(syncPricingsWithStripeAfterSeeding,'syncPricingsWithStripeAfterSeeding');async function syncPaymentPlansAndPricesAfterSeeding(){try{await syncPaymentPlansWithStripeAfterSeeding(),await syncPricingsWithStripeAfterSeeding();}catch(_0x1b3a38){if(_0x1b3a38 instanceof _0x4ef3d6['errors']['StripeAuthenticationError']){logWarning(stripeAuthenticationError);return;}throw _0x1b3a38;}}__name(syncPaymentPlansAndPricesAfterSeeding,'syncPaymentPlansAndPricesAfterSeeding');
11
11
 
12
12
  export { syncPaymentPlansAndPricesAfterSeeding, syncPaymentPlansWithStripeAfterSeeding, syncPricingsWithStripeAfterSeeding };
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
- import _0x46cb09 from 'stripe';
2
+ import _0x4ef3d6 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';
6
6
  import { envSettingKeys } from '../../../common/infra/env-setting-keys.js';
7
7
  import { getStringEnvSetting } from '../../../../fd-toolbox/infra/env-functions.js';
8
8
  import { createError } from '../../../../fd-toolbox/errors/errors.js';
9
- import { stripeErrorConstants, stripeSubscriptionStatuses, billingIntervalsToStripeBillingIntervals } from '../../../common/payments/stripe/stripe-constants.js';
9
+ import { stripeSubscriptionBehaviors, stripeErrorConstants, stripeSubscriptionStatuses, billingIntervalsToStripeBillingIntervals } from '../../../common/payments/stripe/stripe-constants.js';
10
10
  import { addLog } from '../../../../fd-toolbox/server/logging/latest-logs-store.js';
11
11
  import { isString } from '../../../../fd-toolbox/types/ensure-type.js';
12
12
  import { billingIntervals } from '../../../meta/core/resources/enums/payment-enums.js';
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=(_0x24e50f,_0x44a540)=>__defProp(_0x24e50f,'name',{'value':_0x44a540,'configurable':!![]});const stripeKey=getStringEnvSetting(envSettingKeys['stripeSecretKey']),centsInADollar=-0x1c19+0xaf3*-0x1+0x2770;const stripe=new _0x46cb09(stripeKey,{'apiVersion':'2024-06-20'});function areEnvSettingsConfiguredForPaymentSystem(){return !!stripeKey;}__name(areEnvSettingsConfiguredForPaymentSystem,'areEnvSettingsConfiguredForPaymentSystem');async function findStripeCustomerById(_0x1cb3f9){return stripe['customers']['retrieve'](_0x1cb3f9);}__name(findStripeCustomerById,'findStripeCustomerById');async function findStripeCustomerByEmail(_0x4f09e4){const _0x5b50c8=await stripe['customers']['list']({'email':_0x4f09e4});return _0x5b50c8['data']['length']>0x1*-0x22e7+-0x6*0x33b+0x3649?_0x5b50c8['data'][0x2563+-0x22ae+-0x2b5]:void(-0x3ef*0x7+-0xc32+-0x7*-0x5ad);}__name(findStripeCustomerByEmail,'findStripeCustomerByEmail');async function createStripeCustomer(_0x4a6dd3,_0x25509a,_0x19483c){return stripe['customers']['create']({'email':_0x25509a,'name':_0x4a6dd3,'metadata':{'workspaceId':_0x19483c}});}__name(createStripeCustomer,'createStripeCustomer');async function hasStripeSubscription(_0x216ada,_0x527b8e){const _0x544dfd=await stripe['subscriptions']['list']({'customer':_0x216ada});return _0x544dfd['data']['some'](_0x555591=>_0x555591?.['items']?.['data']['some'](_0x1adab6=>_0x1adab6['plan']['id']===_0x527b8e));}__name(hasStripeSubscription,'hasStripeSubscription');async function createStripeSubscription(_0x3e9ab0,_0x55981e,_0x34ed51){return stripe['subscriptions']['create']({'customer':_0x3e9ab0,'items':[{'price':_0x55981e}],'payment_behavior':'default_incomplete','expand':['latest_invoice.payment_intent'],'default_payment_method':_0x34ed51});}__name(createStripeSubscription,'createStripeSubscription');async function createStripeTrialSubscription(_0x1a40e5,_0x253904,_0x2b441b){return stripe['subscriptions']['create']({'customer':_0x1a40e5,'items':[{'price':_0x253904}],'payment_behavior':'default_incomplete','trial_period_days':0x1e,'trial_settings':{'end_behavior':{'missing_payment_method':'create_invoice'}},'default_payment_method':_0x2b441b});}__name(createStripeTrialSubscription,'createStripeTrialSubscription');async function updateCustomerEmailIfNeeded(_0x211a96,_0x5dd441){const _0x4b7e8f=await findStripeCustomerById(_0x211a96),_0x394406=await stripe['paymentMethods']['retrieve'](_0x5dd441);!_0x4b7e8f['deleted']&&_0x394406['billing_details']['email']&&_0x4b7e8f['email']!==_0x394406['billing_details']['email']&&await changeCustomerEmail(_0x211a96,_0x394406['billing_details']['email']);}__name(updateCustomerEmailIfNeeded,'updateCustomerEmailIfNeeded');async function attachPaymentMethodToCustomer(_0x42c68d,_0x574c6f){await detachAllPaymentMethodsFromCustomer(_0x42c68d),await stripe['paymentMethods']['attach'](_0x574c6f,{'customer':_0x42c68d});}__name(attachPaymentMethodToCustomer,'attachPaymentMethodToCustomer');async function retrievePaymentIntentFromSubscription(_0x1659e5){const _0x55b8fe=await stripe['subscriptions']['retrieve'](_0x1659e5,{'expand':['latest_invoice.payment_intent']}),_0x2133be=_0x55b8fe['latest_invoice'];if(typeof _0x2133be==='object'&&!isNullOrUndefined(_0x2133be)){const _0x401f81=_0x2133be;if(_0x401f81['payment_intent']&&typeof _0x401f81['payment_intent']!=='string')return _0x401f81['payment_intent'];else throw apiBadRequestError(stripeErrorConstants['paymentIntentError']);}if(typeof _0x2133be==='string'){const _0x2860d0=await stripe['invoices']['retrieve'](_0x2133be,{'expand':['payment_intent']});if(_0x2860d0['payment_intent']&&typeof _0x2860d0['payment_intent']!=='string')return _0x2860d0['payment_intent'];else throw apiBadRequestError(stripeErrorConstants['paymentIntentError']);}throw apiBadRequestError(stripeErrorConstants['noLatestInvoice']);}__name(retrievePaymentIntentFromSubscription,'retrievePaymentIntentFromSubscription');async function confirmStripePayment(_0x281cdd,_0x47b6d0,_0x5b6289){try{return await stripe['paymentIntents']['confirm'](_0x281cdd,{'payment_method':_0x47b6d0});}catch(_0x476eea){await cancelStripeSubscriptionById(_0x5b6289);throw _0x476eea;}}__name(confirmStripePayment,'confirmStripePayment');async function cancelStripeSubscription(_0x1b4fe8){const _0x2bd223=await stripe['subscriptions']['retrieve'](_0x1b4fe8),_0x238108=getNow(),_0x17e469=unixTimestampToDate(_0x2bd223['current_period_end']),_0x5983cd=_0x2bd223['status']===stripeSubscriptionStatuses['active'],_0x305af7=_0x5983cd&&_0x17e469>_0x238108;let _0x169776;return _0x305af7?_0x169776=await stripe['subscriptions']['update'](_0x1b4fe8,{'cancel_at_period_end':!![]}):_0x169776=await stripe['subscriptions']['cancel'](_0x1b4fe8),{'subscriptionId':_0x169776['id'],'subscriptionStatus':_0x169776['status'],'currentPeriodEndDate':_0x169776['current_period_end'],'endDate':_0x305af7?_0x169776['cancel_at']:_0x169776['canceled_at']};}__name(cancelStripeSubscription,'cancelStripeSubscription');async function instantUpdateStripeSubscription(_0x2abafa,_0x20dbff){const _0x4c84ef=await stripe['subscriptions']['retrieve'](_0x2abafa);return stripe['subscriptions']['update'](_0x4c84ef['id'],{'items':[{'id':_0x4c84ef['items']['data'][-0x10c*0x1e+0x1*0x1867+0x701]['id'],'price':_0x20dbff}],'proration_behavior':'always_invoice'});}__name(instantUpdateStripeSubscription,'instantUpdateStripeSubscription');async function updateStripeSubscriptionWithoutProration(_0x220f0e,_0x5b71e1){const _0x4ca811=await stripe['subscriptions']['retrieve'](_0x220f0e);return stripe['subscriptions']['update'](_0x4ca811['id'],{'items':[{'id':_0x4ca811['items']['data'][-0x1543+-0xcd9+0x221c]['id'],'price':_0x5b71e1}],'proration_behavior':'none','billing_cycle_anchor':'unchanged'});}__name(updateStripeSubscriptionWithoutProration,'updateStripeSubscriptionWithoutProration');async function getSubscriptionFromPaymentIntent(_0x548297){const _0x4d5a09=await stripe['paymentIntents']['retrieve'](_0x548297);if(_0x4d5a09['invoice']&&typeof _0x4d5a09['invoice']==='string'){const _0x1a2769=await stripe['invoices']['retrieve'](_0x4d5a09['invoice']);if(_0x1a2769['subscription']&&typeof _0x1a2769['subscription']==='string'){const _0x220b05=await stripe['subscriptions']['retrieve'](_0x1a2769['subscription']);return _0x220b05['id'];}}throw createError(stripeErrorConstants['noAssociatedSubscription']);}__name(getSubscriptionFromPaymentIntent,'getSubscriptionFromPaymentIntent');async function getStripeSubscriptionData(_0x4eed69){const _0x2ea602=await stripe['subscriptions']['retrieve'](_0x4eed69);return {'status':_0x2ea602['status'],'currentPeriodEndDate':_0x2ea602['current_period_end'],'endDate':_0x2ea602['canceled_at']??void(0x20ed+0x1*-0x14f9+-0x132*0xa),'trialEnd':_0x2ea602['trial_end']};}__name(getStripeSubscriptionData,'getStripeSubscriptionData');async function cancelStripeSubscriptionById(_0x39a0f9){return stripe['subscriptions']['cancel'](_0x39a0f9);}__name(cancelStripeSubscriptionById,'cancelStripeSubscriptionById');async function processPaymentFailureAndCancelSubscription(_0xe1ab66){const _0x5a1bc6=_0xe1ab66['payment_intent']?.['invoice'];if(!_0x5a1bc6||typeof _0x5a1bc6!=='string')return;const _0x1c5e1b=await stripe['invoices']['retrieve'](_0x5a1bc6),_0x50a661=_0x1c5e1b['subscription'];_0x50a661&&typeof _0x50a661==='string'&&await stripe['subscriptions']['cancel'](_0x50a661);}__name(processPaymentFailureAndCancelSubscription,'processPaymentFailureAndCancelSubscription');async function getStripePaymentData(_0xe1b2c9){const {currency:_0xf017bc,status:_0xd366e9,amount:_0x22c67d,payment_method:_0x34b08e}=await stripe['paymentIntents']['retrieve'](_0xe1b2c9);return {'currency':_0xf017bc,'status':_0xd366e9,'amount':_0x22c67d,'paymentMethodId':_0x34b08e};}__name(getStripePaymentData,'getStripePaymentData');async function getStripeSubscriptionStatus(_0x529c18){try{const _0x10caaa=await stripe['subscriptions']['retrieve'](_0x529c18);return _0x10caaa['status'];}catch(_0x180558){if(_0x180558 instanceof Error){const _0x3d5a87={'severity':logSeverities['warning'],'message':_0x180558 instanceof _0x46cb09['errors']['StripeError']?_0x180558['type']:_0x180558['name'],'errorMessage':_0x180558['message'],'stackTrace':_0x180558['stack']};addLog(_0x3d5a87);}return void(-0x256b+0x1c0*0x15+0x13*0x9);}}__name(getStripeSubscriptionStatus,'getStripeSubscriptionStatus');async function changeStripeProductName(_0x4e6c0f,_0x3f5095){return stripe['products']['update'](_0x4e6c0f,{'name':_0x3f5095});}__name(changeStripeProductName,'changeStripeProductName');async function changeStripeProductStatus(_0x284240,_0x1e1d86){return stripe['products']['update'](_0x284240,{'active':_0x1e1d86});}__name(changeStripeProductStatus,'changeStripeProductStatus');async function createStripeProductPricing(_0x44a40d,_0x1a8334,_0x373157,_0x2b3f51,_0x4fbffc,_0x4661c1=!![]){const _0x3cc63c=_0x4661c1?_0x373157*centsInADollar:_0x373157;return !_0x4fbffc||_0x4fbffc===billingIntervals['lifetime']?stripe['prices']['create']({'currency':_0x1a8334,'unit_amount':_0x3cc63c,'product':_0x44a40d,'metadata':{'id':_0x2b3f51}}):stripe['prices']['create']({'currency':_0x1a8334,'unit_amount':_0x3cc63c,'product':_0x44a40d,'metadata':{'id':_0x2b3f51},'recurring':{'interval':billingIntervalsToStripeBillingIntervals[_0x4fbffc]}});}__name(createStripeProductPricing,'createStripeProductPricing');async function deactivateStripeProductPricing(_0xf0cc48){return stripe['prices']['update'](_0xf0cc48,{'active':![]});}__name(deactivateStripeProductPricing,'deactivateStripeProductPricing');async function createStripeProduct(_0x47dbcf,_0x10bcea){const _0xd0d653=await stripe['products']['create']({'name':_0x47dbcf,'metadata':{'paymentPlanId':_0x10bcea}});return _0xd0d653;}__name(createStripeProduct,'createStripeProduct');async function deactivateStripeProduct(_0x3d558a){const _0x5c355e=await stripe['products']['list'](),_0x4fd7ad=_0x5c355e['data']['filter'](_0x2058b3=>{return _0x2058b3['name']===_0x3d558a;});for(const _0x35d08e of _0x4fd7ad){await stripe['products']['update'](_0x35d08e['id'],{'active':![]});}}__name(deactivateStripeProduct,'deactivateStripeProduct');async function getStripeProducts(){const _0x22786f=await stripe['products']['list']();return _0x22786f['data'];}__name(getStripeProducts,'getStripeProducts');async function getStripeProductIdByPriceId(_0xf6c4ac){const {product:_0x175e14}=await stripe['prices']['retrieve'](_0xf6c4ac);return isString(_0x175e14)?_0x175e14:_0x175e14['id'];}__name(getStripeProductIdByPriceId,'getStripeProductIdByPriceId');async function setCustomerDefaultPaymentMethod(_0x46053a,_0xe7c7ff){await stripe['customers']['update'](_0xe7c7ff,{'invoice_settings':{'default_payment_method':_0x46053a}});}__name(setCustomerDefaultPaymentMethod,'setCustomerDefaultPaymentMethod');async function changeCustomerEmail(_0x33ddb6,_0x4b354b){await stripe['customers']['update'](_0x33ddb6,{'email':_0x4b354b});}__name(changeCustomerEmail,'changeCustomerEmail');async function getStripeDefaultPaymentMethod(_0x2c49e4){const _0x25b598=await findStripeCustomerById(_0x2c49e4);if(_0x25b598['deleted']||!_0x25b598['invoice_settings']['default_payment_method'])return void(0x476*-0x4+-0x15*-0x103+-0x367);const _0x285f28=isString(_0x25b598['invoice_settings']['default_payment_method'])?_0x25b598['invoice_settings']['default_payment_method']:_0x25b598['invoice_settings']['default_payment_method']['id'],_0x25a06b=await stripe['paymentMethods']['retrieve'](_0x285f28);return _0x25a06b;}__name(getStripeDefaultPaymentMethod,'getStripeDefaultPaymentMethod');async function detachAllPaymentMethodsFromCustomer(_0x1d3325){const _0x2fb870=await stripe['customers']['listPaymentMethods'](_0x1d3325),_0x6e7e80=_0x2fb870['data']['map'](_0x2bc5e5=>_0x2bc5e5['id']);await Promise['all'](_0x6e7e80['map'](detachPaymentMethod));}__name(detachAllPaymentMethodsFromCustomer,'detachAllPaymentMethodsFromCustomer');
16
+ var __defProp=Object['defineProperty'],__name=(_0x72dee8,_0x358fa8)=>__defProp(_0x72dee8,'name',{'value':_0x358fa8,'configurable':!![]});const stripeKey=getStringEnvSetting(envSettingKeys['stripeSecretKey']),centsInADollar=0x254*-0x4+0xe63+-0xb*0x6d;const stripe=new _0x4ef3d6(stripeKey,{'apiVersion':'2024-06-20'});function areEnvSettingsConfiguredForPaymentSystem(){return !!stripeKey;}__name(areEnvSettingsConfiguredForPaymentSystem,'areEnvSettingsConfiguredForPaymentSystem');async function findStripeCustomerById(_0x387ce1){return stripe['customers']['retrieve'](_0x387ce1);}__name(findStripeCustomerById,'findStripeCustomerById');async function findStripeCustomerByEmail(_0x36e918){const _0x2d730f=await stripe['customers']['list']({'email':_0x36e918});return _0x2d730f['data']['length']>0x2156+-0x15*-0x180+0xc1*-0x56?_0x2d730f['data'][-0x1f9d+0x215f*-0x1+0x40fc]:void(-0x2671+0x2b5+0x23bc);}__name(findStripeCustomerByEmail,'findStripeCustomerByEmail');async function createStripeCustomer(_0x21b687,_0x3c54a2,_0x4e28fa){return stripe['customers']['create']({'email':_0x3c54a2,'name':_0x21b687,'metadata':{'workspaceId':_0x4e28fa}});}__name(createStripeCustomer,'createStripeCustomer');async function hasStripeSubscription(_0xffa341,_0x35e48b){const _0x2cb247=await stripe['subscriptions']['list']({'customer':_0xffa341});return _0x2cb247['data']['some'](_0x2660fb=>_0x2660fb?.['items']?.['data']['some'](_0x36644a=>_0x36644a['plan']['id']===_0x35e48b));}__name(hasStripeSubscription,'hasStripeSubscription');async function createStripeSubscription(_0x5bdca0,_0x51f333,_0x45747e){return stripe['subscriptions']['create']({'customer':_0x5bdca0,'items':[{'price':_0x51f333}],'payment_behavior':stripeSubscriptionBehaviors['defaultIncomplete'],'expand':[stripeSubscriptionBehaviors['latestInvoicePaymentIntent']],'default_payment_method':_0x45747e});}__name(createStripeSubscription,'createStripeSubscription');async function createStripeTrialSubscription(_0x586c88,_0x9d69c4,_0x32d848){return stripe['subscriptions']['create']({'customer':_0x586c88,'items':[{'price':_0x9d69c4}],'payment_behavior':stripeSubscriptionBehaviors['defaultIncomplete'],'trial_period_days':0x1e,'trial_settings':{'end_behavior':{'missing_payment_method':'create_invoice'}},'default_payment_method':_0x32d848});}__name(createStripeTrialSubscription,'createStripeTrialSubscription');async function updateCustomerEmailIfNeeded(_0x58b386,_0x1dff37){const _0x58b3fc=await findStripeCustomerById(_0x58b386),_0x4528e5=await stripe['paymentMethods']['retrieve'](_0x1dff37);!_0x58b3fc['deleted']&&_0x4528e5['billing_details']['email']&&_0x58b3fc['email']!==_0x4528e5['billing_details']['email']&&await changeCustomerEmail(_0x58b386,_0x4528e5['billing_details']['email']);}__name(updateCustomerEmailIfNeeded,'updateCustomerEmailIfNeeded');async function attachPaymentMethodToCustomer(_0x5c4e61,_0x126414){await detachAllPaymentMethodsFromCustomer(_0x5c4e61),await stripe['paymentMethods']['attach'](_0x126414,{'customer':_0x5c4e61});}__name(attachPaymentMethodToCustomer,'attachPaymentMethodToCustomer');async function retrievePaymentIntentFromSubscription(_0x27944e){const _0x2918ac=await stripe['subscriptions']['retrieve'](_0x27944e,{'expand':[stripeSubscriptionBehaviors['latestInvoicePaymentIntent']]}),_0x1bd8a4=_0x2918ac['latest_invoice'];let _0x1d0dd6;if(typeof _0x1bd8a4==='object'&&!isNullOrUndefined(_0x1bd8a4)){const _0x370557=_0x1bd8a4;if(_0x370557['payment_intent']&&typeof _0x370557['payment_intent']!=='string')_0x1d0dd6=_0x370557['payment_intent'];else throw apiBadRequestError(stripeErrorConstants['paymentIntentError']);}if(typeof _0x1bd8a4==='string'){const _0x354bb7=await stripe['invoices']['retrieve'](_0x1bd8a4,{'expand':['payment_intent']});if(_0x354bb7['payment_intent']&&typeof _0x354bb7['payment_intent']!=='string')_0x1d0dd6=_0x354bb7['payment_intent'];else throw apiBadRequestError(stripeErrorConstants['paymentIntentError']);}if(!_0x1d0dd6)throw apiBadRequestError(stripeErrorConstants['noLatestInvoice']);return _0x1d0dd6;}__name(retrievePaymentIntentFromSubscription,'retrievePaymentIntentFromSubscription');async function confirmStripePayment(_0x283914,_0x24562f,_0x4c1a0b){try{return await stripe['paymentIntents']['confirm'](_0x283914,{'payment_method':_0x24562f});}catch(_0x37ff4e){await cancelStripeSubscriptionById(_0x4c1a0b);throw _0x37ff4e;}}__name(confirmStripePayment,'confirmStripePayment');async function cancelStripeSubscription(_0x14df90){const _0x4a2787=await stripe['subscriptions']['retrieve'](_0x14df90),_0x15f829=getNow(),_0x2d7f69=unixTimestampToDate(_0x4a2787['current_period_end']),_0x16be71=_0x4a2787['status']===stripeSubscriptionStatuses['active'],_0x586a10=_0x16be71&&_0x2d7f69>_0x15f829;let _0xbf4c66;return _0x586a10?_0xbf4c66=await stripe['subscriptions']['update'](_0x14df90,{'cancel_at_period_end':!![]}):_0xbf4c66=await stripe['subscriptions']['cancel'](_0x14df90),{'subscriptionId':_0xbf4c66['id'],'subscriptionStatus':_0xbf4c66['status'],'currentPeriodEndDate':_0xbf4c66['current_period_end'],'endDate':_0x586a10?_0xbf4c66['cancel_at']:_0xbf4c66['canceled_at']};}__name(cancelStripeSubscription,'cancelStripeSubscription');async function instantUpdateStripeSubscription(_0x2176e1,_0x46d7a6){const _0x5465da=await stripe['subscriptions']['retrieve'](_0x2176e1);return stripe['subscriptions']['update'](_0x5465da['id'],{'items':[{'id':_0x5465da['items']['data'][0x1*0x1de+-0x22df+0x1f1*0x11]['id'],'price':_0x46d7a6}],'proration_behavior':'always_invoice'});}__name(instantUpdateStripeSubscription,'instantUpdateStripeSubscription');async function updateStripeSubscriptionWithoutProration(_0x3348c0,_0x27907e){const _0x4beff9=await stripe['subscriptions']['retrieve'](_0x3348c0);return stripe['subscriptions']['update'](_0x4beff9['id'],{'items':[{'id':_0x4beff9['items']['data'][-0x2b1+0xcaf+-0x9fe]['id'],'price':_0x27907e}],'proration_behavior':stripeSubscriptionBehaviors['noProration'],'billing_cycle_anchor':'unchanged'});}__name(updateStripeSubscriptionWithoutProration,'updateStripeSubscriptionWithoutProration');async function getSubscriptionFromPaymentIntent(_0x24a5c7){const _0x580827=await stripe['paymentIntents']['retrieve'](_0x24a5c7);if(_0x580827['invoice']&&typeof _0x580827['invoice']==='string'){const _0x341b5d=await stripe['invoices']['retrieve'](_0x580827['invoice']);if(_0x341b5d['subscription']&&typeof _0x341b5d['subscription']==='string'){const _0x520d3a=await stripe['subscriptions']['retrieve'](_0x341b5d['subscription']);return _0x520d3a['id'];}}throw createError(stripeErrorConstants['noAssociatedSubscription']);}__name(getSubscriptionFromPaymentIntent,'getSubscriptionFromPaymentIntent');async function getStripeSubscriptionData(_0x548a99){const _0x101466=await stripe['subscriptions']['retrieve'](_0x548a99);return {'status':_0x101466['status'],'currentPeriodEndDate':_0x101466['current_period_end'],'endDate':_0x101466['canceled_at']??void(0xee3+-0x13bb*-0x1+0x7*-0x4f2),'trialEnd':_0x101466['trial_end']};}__name(getStripeSubscriptionData,'getStripeSubscriptionData');async function cancelStripeSubscriptionById(_0x141969){return stripe['subscriptions']['cancel'](_0x141969);}__name(cancelStripeSubscriptionById,'cancelStripeSubscriptionById');async function processPaymentFailureAndCancelSubscription(_0x56bc81){const _0x155e3d=_0x56bc81['payment_intent']?.['invoice'];if(!_0x155e3d||typeof _0x155e3d!=='string')return;const _0x5b7f41=await stripe['invoices']['retrieve'](_0x155e3d),_0x332722=_0x5b7f41['subscription'];_0x332722&&typeof _0x332722==='string'&&await stripe['subscriptions']['cancel'](_0x332722);}__name(processPaymentFailureAndCancelSubscription,'processPaymentFailureAndCancelSubscription');async function getStripePaymentData(_0x4bf8a2){const {currency:_0x30ca4b,status:_0x385eec,amount:_0x15bc41,payment_method:_0x63a01}=await stripe['paymentIntents']['retrieve'](_0x4bf8a2);return {'currency':_0x30ca4b,'status':_0x385eec,'amount':_0x15bc41,'paymentMethodId':_0x63a01};}__name(getStripePaymentData,'getStripePaymentData');async function getStripeSubscriptionStatus(_0x1438ca){try{const _0x20aff5=await stripe['subscriptions']['retrieve'](_0x1438ca);return _0x20aff5['status'];}catch(_0xeb98bb){if(_0xeb98bb instanceof Error){const _0x5759b4={'severity':logSeverities['warning'],'message':_0xeb98bb instanceof _0x4ef3d6['errors']['StripeError']?_0xeb98bb['type']:_0xeb98bb['name'],'errorMessage':_0xeb98bb['message'],'stackTrace':_0xeb98bb['stack']};addLog(_0x5759b4);}return void(-0xf7b+0x56+0xf25);}}__name(getStripeSubscriptionStatus,'getStripeSubscriptionStatus');async function changeStripeProductName(_0xdcc93d,_0x26bd5f){return stripe['products']['update'](_0xdcc93d,{'name':_0x26bd5f});}__name(changeStripeProductName,'changeStripeProductName');async function changeStripeProductStatus(_0x42ef6c,_0x190e2d){return stripe['products']['update'](_0x42ef6c,{'active':_0x190e2d});}__name(changeStripeProductStatus,'changeStripeProductStatus');async function createStripeProductPricing(_0x2f1274,_0x45d9f5,_0x4f4502,_0x5e4fc0,_0x4090c3,_0x302f41=!![]){const _0x1b4047=_0x302f41?_0x4f4502*centsInADollar:_0x4f4502;return !_0x4090c3||_0x4090c3===billingIntervals['lifetime']?stripe['prices']['create']({'currency':_0x45d9f5,'unit_amount':_0x1b4047,'product':_0x2f1274,'metadata':{'id':_0x5e4fc0}}):stripe['prices']['create']({'currency':_0x45d9f5,'unit_amount':_0x1b4047,'product':_0x2f1274,'metadata':{'id':_0x5e4fc0},'recurring':{'interval':billingIntervalsToStripeBillingIntervals[_0x4090c3]}});}__name(createStripeProductPricing,'createStripeProductPricing');async function deactivateStripeProductPricing(_0x59b4bf){return stripe['prices']['update'](_0x59b4bf,{'active':![]});}__name(deactivateStripeProductPricing,'deactivateStripeProductPricing');async function createStripeProduct(_0x181c6c,_0x3fcf31){const _0x590eb7=await stripe['products']['create']({'name':_0x181c6c,'metadata':{'paymentPlanId':_0x3fcf31}});return _0x590eb7;}__name(createStripeProduct,'createStripeProduct');async function deactivateStripeProduct(_0x1ec03e){const _0x57fc4d=await stripe['products']['list'](),_0xb4b39e=_0x57fc4d['data']['filter'](_0x1f6f81=>{return _0x1f6f81['name']===_0x1ec03e;});for(const _0x3a90c9 of _0xb4b39e){await stripe['products']['update'](_0x3a90c9['id'],{'active':![]});}}__name(deactivateStripeProduct,'deactivateStripeProduct');async function getStripeProducts(){const _0x26fc88=await stripe['products']['list']();return _0x26fc88['data'];}__name(getStripeProducts,'getStripeProducts');async function getStripeProductIdByPriceId(_0x1a0a01){const {product:_0x86ec8d}=await stripe['prices']['retrieve'](_0x1a0a01);return isString(_0x86ec8d)?_0x86ec8d:_0x86ec8d['id'];}__name(getStripeProductIdByPriceId,'getStripeProductIdByPriceId');async function setCustomerDefaultPaymentMethod(_0x2eb548,_0x509492){await stripe['customers']['update'](_0x509492,{'invoice_settings':{'default_payment_method':_0x2eb548}});}__name(setCustomerDefaultPaymentMethod,'setCustomerDefaultPaymentMethod');async function changeCustomerEmail(_0x1d2c37,_0xe79a03){await stripe['customers']['update'](_0x1d2c37,{'email':_0xe79a03});}__name(changeCustomerEmail,'changeCustomerEmail');async function getStripeDefaultPaymentMethod(_0x4b9399){const _0x59653e=await findStripeCustomerById(_0x4b9399);if(_0x59653e['deleted']||!_0x59653e['invoice_settings']['default_payment_method'])return void(-0xedf+-0x27*0x3b+-0x1*-0x17dc);const _0x3b45a3=isString(_0x59653e['invoice_settings']['default_payment_method'])?_0x59653e['invoice_settings']['default_payment_method']:_0x59653e['invoice_settings']['default_payment_method']['id'],_0x2ce8de=await stripe['paymentMethods']['retrieve'](_0x3b45a3);return _0x2ce8de;}__name(getStripeDefaultPaymentMethod,'getStripeDefaultPaymentMethod');async function detachAllPaymentMethodsFromCustomer(_0x507356){const _0x35e811=await stripe['customers']['listPaymentMethods'](_0x507356),_0xb262a2=_0x35e811['data']['map'](_0x1b0b9b=>_0x1b0b9b['id']);await Promise['all'](_0xb262a2['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 };
@@ -1,13 +1,14 @@
1
1
  'use strict';
2
2
  import { createDynamicSelect, dbWhere, dbUpdate, dbInnerJoin } from '../../../db/db-connection.js';
3
- import { runQuery } from '../../../db/drizzle-queries.js';
4
- import { subscriptionSchema, pricingSchema, paymentPlanSchema } from '../../../../../generated/schema.js';
3
+ import { getTableColumn, runQuery } from '../../../db/drizzle-queries.js';
4
+ import { getDbSchema } from '../../../db/db-schema.js';
5
5
  import { eq, and, isNull, isNotNull, lt } from 'drizzle-orm';
6
6
  import { getNowUtc } from '../../../../fd-toolbox/dates/date-time.js';
7
7
  import { subscriptionStatuses } from '../../../meta/core/resources/enums/payment-enums.js';
8
8
  import { resourceNames } from '../../../../fd-toolbox/resources/resource-names.js';
9
9
  import { createResource } from '../../../meta/server/resources/crud-resources.js';
10
+ import { schemaNames, columnNames } from '../../../db/constants/schema-names.js';
10
11
 
11
- var __defProp=Object['defineProperty'],__name=(_0x23c2ed,_0xec08ab)=>__defProp(_0x23c2ed,'name',{'value':_0xec08ab,'configurable':!![]});async function createSubscription(_0x1bac88){return createResource(_0x1bac88,resourceNames['subscription']);}__name(createSubscription,'createSubscription');async function getOneSubscription(_0x81436b){const _0x1a4f96=createDynamicSelect(subscriptionSchema);dbWhere(_0x1a4f96,eq(subscriptionSchema['workspaceId'],_0x81436b));const _0x13f434=await runQuery(_0x1a4f96);return _0x13f434[0x11bd*-0x1+-0x1b47*0x1+0x2d04];}__name(getOneSubscription,'getOneSubscription');async function getSubscriptionsByWorkspaceId(_0x5a166a){const _0xd8ac1a=createDynamicSelect(subscriptionSchema);return dbWhere(_0xd8ac1a,eq(subscriptionSchema['workspaceId'],_0x5a166a)),runQuery(_0xd8ac1a);}__name(getSubscriptionsByWorkspaceId,'getSubscriptionsByWorkspaceId');async function getFreeSubscriptionByWorkspaceId(_0xa6f17e){const _0x3bf483=createDynamicSelect(subscriptionSchema);dbWhere(_0x3bf483,and(eq(subscriptionSchema['workspaceId'],_0xa6f17e),isNull(subscriptionSchema['paymentSystemSubscriptionId'])));const _0x2c36d6=await runQuery(_0x3bf483);return _0x2c36d6[0x1*0x1b5d+0x43*-0x44+0x1*-0x991];}__name(getFreeSubscriptionByWorkspaceId,'getFreeSubscriptionByWorkspaceId');async function changeSubscriptionStatusById(_0x541717,_0x2cda5e){const _0xb464c6={'status':_0x2cda5e};await dbUpdate(subscriptionSchema)['set'](_0xb464c6)['where'](eq(subscriptionSchema['id'],_0x541717));const _0x5a30a8=await selectSubscription(eq(subscriptionSchema['id'],_0x541717));return _0x5a30a8[0x1*-0xeb4+0x601+0x8b3];}__name(changeSubscriptionStatusById,'changeSubscriptionStatusById');async function selectSubscription(_0x1665b9){const _0xaae03b=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(_0xaae03b,pricingSchema,eq(subscriptionSchema['pricingId'],pricingSchema['id'])),dbInnerJoin(_0xaae03b,paymentPlanSchema,eq(pricingSchema['paymentPlanId'],paymentPlanSchema['id'])),dbWhere(_0xaae03b,_0x1665b9),runQuery(_0xaae03b);}__name(selectSubscription,'selectSubscription');async function getSubscriptionsDueForCheck(){const _0x4dcb9d=createDynamicSelect(subscriptionSchema);return dbWhere(_0x4dcb9d,and(isNotNull(subscriptionSchema['paymentSystemSubscriptionId']),eq(subscriptionSchema['status'],subscriptionStatuses['active']),lt(subscriptionSchema['currentPeriodEndDate'],getNowUtc()))),runQuery(_0x4dcb9d);}__name(getSubscriptionsDueForCheck,'getSubscriptionsDueForCheck');async function getSubscriptionByPaymentSystemSubscrId(_0x9cc650){const _0x21f32c=await selectSubscription(eq(subscriptionSchema['paymentSystemSubscriptionId'],_0x9cc650));return _0x21f32c[-0x1843+0x151*-0x1d+0x3e70];}__name(getSubscriptionByPaymentSystemSubscrId,'getSubscriptionByPaymentSystemSubscrId');
12
+ var __defProp=Object['defineProperty'],__name=(_0x52042a,_0x3a4fdc)=>__defProp(_0x52042a,'name',{'value':_0x3a4fdc,'configurable':!![]});async function createSubscription(_0x34e7bf){return createResource(_0x34e7bf,resourceNames['subscription']);}__name(createSubscription,'createSubscription');async function getOneSubscription(_0x442a40){const _0x118c6a=getDbSchema(),_0x212a6c=_0x118c6a[schemaNames['subscriptionSchema']],_0x5c6597=createDynamicSelect(_0x212a6c);dbWhere(_0x5c6597,eq(getTableColumn(_0x212a6c,columnNames['workspaceId']),_0x442a40));const _0xe27f52=await runQuery(_0x5c6597);return _0xe27f52[-0x23a1+0xe0+0x22c1];}__name(getOneSubscription,'getOneSubscription');async function getSubscriptionsByWorkspaceId(_0x16e61b){const _0xa6bf1c=getDbSchema(),_0x16ed49=_0xa6bf1c[schemaNames['subscriptionSchema']],_0x4fefaf=createDynamicSelect(_0x16ed49);return dbWhere(_0x4fefaf,eq(getTableColumn(_0x16ed49,columnNames['workspaceId']),_0x16e61b)),runQuery(_0x4fefaf);}__name(getSubscriptionsByWorkspaceId,'getSubscriptionsByWorkspaceId');async function getFreeSubscriptionByWorkspaceId(_0x2a52e4){const _0x55b79c=getDbSchema(),_0x569562=_0x55b79c[schemaNames['subscriptionSchema']],_0x30b478=createDynamicSelect(_0x569562);dbWhere(_0x30b478,and(eq(getTableColumn(_0x569562,columnNames['workspaceId']),_0x2a52e4),isNull(getTableColumn(_0x569562,columnNames['paymentSystemSubscriptionId']))));const _0xb93e12=await runQuery(_0x30b478);return _0xb93e12[0x51f*-0x5+0x2*-0x128f+-0x3eb9*-0x1];}__name(getFreeSubscriptionByWorkspaceId,'getFreeSubscriptionByWorkspaceId');async function changeSubscriptionStatusById(_0x1db3a0,_0x52bf9d){const _0x17af51=getDbSchema(),_0x556688=_0x17af51[schemaNames['subscriptionSchema']],_0x2f3973={'status':_0x52bf9d};await dbUpdate(_0x556688)['set'](_0x2f3973)['where'](eq(getTableColumn(_0x556688,columnNames['id']),_0x1db3a0));const _0x3f6e4f=await selectSubscription(eq(getTableColumn(_0x556688,columnNames['id']),_0x1db3a0));return _0x3f6e4f[-0xb0+-0xbf*0x2e+-0x2302*-0x1];}__name(changeSubscriptionStatusById,'changeSubscriptionStatusById');async function selectSubscription(_0x71c6bf){const _0x4afb01=getDbSchema(),_0x184030=_0x4afb01[schemaNames['subscriptionSchema']],_0x294748=_0x4afb01[schemaNames['pricingSchema']],_0x4dab36=_0x4afb01[schemaNames['paymentPlanSchema']],_0x125b5b=createDynamicSelect(_0x184030,{'id':getTableColumn(_0x184030,columnNames['id']),'paymentPlanName':getTableColumn(_0x4dab36,columnNames['name']),'status':getTableColumn(_0x184030,columnNames['status']),'currentPeriodEndDate':getTableColumn(_0x184030,columnNames['currentPeriodEndDate']),'endDate':getTableColumn(_0x184030,columnNames['endDate']),'price':getTableColumn(_0x294748,columnNames['price']),'currency':getTableColumn(_0x294748,columnNames['currency']),'billingInterval':getTableColumn(_0x294748,columnNames['billingInterval']),'paymentSystemSubscriptionId':getTableColumn(_0x184030,columnNames['paymentSystemSubscriptionId'])});return dbInnerJoin(_0x125b5b,_0x294748,eq(getTableColumn(_0x184030,columnNames['pricingId']),getTableColumn(_0x294748,columnNames['id']))),dbInnerJoin(_0x125b5b,_0x4dab36,eq(getTableColumn(_0x294748,columnNames['paymentPlanId']),getTableColumn(_0x4dab36,columnNames['id']))),dbWhere(_0x125b5b,_0x71c6bf),runQuery(_0x125b5b);}__name(selectSubscription,'selectSubscription');async function getSubscriptionsDueForCheck(){const _0x176bcb=getDbSchema(),_0x5d3a76=_0x176bcb[schemaNames['subscriptionSchema']],_0x1b67d2=createDynamicSelect(_0x5d3a76);return dbWhere(_0x1b67d2,and(isNotNull(getTableColumn(_0x5d3a76,columnNames['paymentSystemSubscriptionId'])),eq(getTableColumn(_0x5d3a76,columnNames['status']),subscriptionStatuses['active']),lt(getTableColumn(_0x5d3a76,columnNames['currentPeriodEndDate']),getNowUtc()))),runQuery(_0x1b67d2);}__name(getSubscriptionsDueForCheck,'getSubscriptionsDueForCheck');async function getSubscriptionByPaymentSystemSubscrId(_0x4be9bb){const _0x3c2cd0=getDbSchema(),_0xda46e0=_0x3c2cd0[schemaNames['subscriptionSchema']],_0x385dba=await selectSubscription(eq(getTableColumn(_0xda46e0,columnNames['paymentSystemSubscriptionId']),_0x4be9bb));return _0x385dba[-0x2d7*-0xa+-0x25ce+0x968];}__name(getSubscriptionByPaymentSystemSubscrId,'getSubscriptionByPaymentSystemSubscrId');
12
13
 
13
14
  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=(_0x1c9c30,_0x2b1673)=>__defProp(_0x1c9c30,'name',{'value':_0x2b1673,'configurable':!![]});async function cancelPaidSubscription(_0x149bd8,_0xa37edd){const _0x1b7164=await getSubscriptionsByWorkspaceId(_0xa37edd),_0x5dce72=_0x1b7164['some'](_0x834a20=>_0x834a20['id']===_0x149bd8);if(!_0x5dce72)throw apiForbiddenError();const _0x594fda=_0x1b7164['find'](_0x25bdf5=>_0x25bdf5['id']===_0x149bd8);if(!_0x594fda?.['paymentSystemSubscriptionId'])throw apiBadRequestError();if(_0x594fda['pendingPricingId']){const _0x323336=await updateSubscriptionById(_0x149bd8,{'pendingPricingId':void(0x6*0x240+-0x2405+0x1685),'endDate':_0x594fda['currentPeriodEndDate']}),_0x14715c=await getResource({'resourceName':resourceNames['pricing'],'id':_0x594fda['pricingId']});return updateStripeSubscriptionWithoutProration(_0x594fda['paymentSystemSubscriptionId'],_0x14715c['paymentSystemPriceId']),_0x323336;}const _0x41f342=await cancelStripeSubscription(_0x594fda['paymentSystemSubscriptionId']),_0x3fbfd1={'status':mapSubscriptionStatusToDbFormat(_0x41f342['subscriptionStatus']),'currentPeriodEndDate':unixTimestampToDate(_0x41f342?.['currentPeriodEndDate']),'endDate':_0x41f342?.['endDate']?unixTimestampToDate(_0x41f342['endDate']):void(0xd3d*0x1+0x10b5+-0xef9*0x2),'pendingPricingId':void(0x226f+-0x1261+-0x2ad*0x6)};return updateSubscriptionById(_0x149bd8,_0x3fbfd1);}__name(cancelPaidSubscription,'cancelPaidSubscription');async function updatePaymentPlan(_0x41fe4a,_0x2e6cfe){const _0x2f0db2=await getResource({'resourceName':resourceNames['subscription'],'id':_0x41fe4a}),_0x3d6385=await getResource({'resourceName':resourceNames['pricing'],'id':_0x2e6cfe}),_0x81fc3e=_0x2f0db2['paymentSystemSubscriptionId'],_0x136ea4=_0x3d6385['paymentSystemPriceId'];if(_0x2f0db2['status']===subscriptionStatuses['trialing'])throw apiForbiddenError(paymentErrorMessages['subscriptionCannotBeUpdatedDueToTrial']);const _0x52fe36=await getPaymentPlanByPricingId(_0x2e6cfe);if(!_0x52fe36)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(isPaymentPlanTrial(_0x52fe36))throw apiBadRequestError(paymentErrorMessages['subscriptionCannotBeUpgradedToTrial']);const _0x559b1e=await getResource({'resourceName':resourceNames['pricing'],'id':_0x2e6cfe}),_0x22982a=await getResource({'resourceName':resourceNames['pricing'],'id':_0x2f0db2['pricingId']});_0x559b1e['price']>=_0x22982a['price']?await upgradePaymentPlan(_0x41fe4a,_0x81fc3e,_0x136ea4,_0x2e6cfe):await downgradePaymentPlan(_0x41fe4a,_0x81fc3e,_0x136ea4,_0x2e6cfe);}__name(updatePaymentPlan,'updatePaymentPlan');async function changeSubscriptionStatus(_0x500f1a,_0xf26ab5){return changeSubscriptionStatusById(_0x500f1a,_0xf26ab5);}__name(changeSubscriptionStatus,'changeSubscriptionStatus');async function getActiveSubscriptionByWorkspaceId(_0x558314){const _0x42fd65=await getSubscriptionsByWorkspaceId(_0x558314),_0x27a7c0=_0x42fd65['find'](_0x2bc3e2=>_0x2bc3e2['status']===subscriptionStatuses['active']||_0x2bc3e2['status']===subscriptionStatuses['trialing']);return _0x27a7c0;}__name(getActiveSubscriptionByWorkspaceId,'getActiveSubscriptionByWorkspaceId');async function syncInactiveSubscriptions(){const _0x342c68=await getSubscriptionsDueForCheck();if(!_0x342c68['length'])return;for(const _0x535f78 of _0x342c68){if(_0x535f78?.['paymentSystemSubscriptionId']){const _0x491e64=await getFreeSubscriptionByWorkspaceId(_0x535f78['workspaceId']),_0x4bdb5b=await getStripeSubscriptionData(_0x535f78['paymentSystemSubscriptionId']),_0x214934=mapSubscriptionStatusToDbFormat(_0x4bdb5b['status']);_0x214934!==_0x535f78['status']&&_0x214934!==subscriptionStatuses['active']&&_0x214934!==subscriptionStatuses['pastDue']&&await processInactiveSubscriptionSync(_0x535f78['id'],_0x491e64['id'],_0x4bdb5b);}}}__name(syncInactiveSubscriptions,'syncInactiveSubscriptions');async function processInactiveSubscriptionSync(_0x403403,_0x5b795a,_0x116302){const _0x3f9da2={'status':subscriptionStatuses['canceled'],'currentPeriodEndDate':unixTimestampToDate(_0x116302['currentPeriodEndDate']),'endDate':_0x116302['endDate']?unixTimestampToDate(_0x116302['endDate']):void(0x25d8+0x7c5+-0x2d9d)};await updateSubscriptionById(_0x403403,_0x3f9da2),await changeSubscriptionStatusById(_0x5b795a,subscriptionStatuses['active']);}__name(processInactiveSubscriptionSync,'processInactiveSubscriptionSync');async function hasPaidOrTrialSubscription(){const _0x5f3606=await getResourcesByName(resourceNames['subscription']);return _0x5f3606['some'](_0x49390c=>_0x49390c['pricingId']!==pricingIds['basicId']);}__name(hasPaidOrTrialSubscription,'hasPaidOrTrialSubscription');async function createSubscriptionForCurrentWorkspace(_0x110b29){const _0x307c84=await getCurrentPaymentSystemCustomerId();if(!_0x307c84)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);const _0x3a9cc5=await getStripeDefaultPaymentMethod(_0x307c84),_0x224c54=_0x3a9cc5?.['id'];if(!_0x224c54)throw apiNotFoundError(paymentErrorMessages['defaultPaymentMethodNotFound']);const _0x2dc7a2=await getPaymentPlanByPricingId(_0x110b29);if(!_0x2dc7a2)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(isPaymentPlanTrial(_0x2dc7a2))throw apiBadRequestError(paymentErrorMessages['trialCannotBeCreated']);return createSubscriptionWithInstantPayment(_0x110b29,_0x224c54,_0x307c84);}__name(createSubscriptionForCurrentWorkspace,'createSubscriptionForCurrentWorkspace');async function downgradePaymentPlan(_0x1eb94f,_0x8eb0f0,_0x4a31c0,_0x25af5a){await updateStripeSubscriptionWithoutProration(_0x8eb0f0,_0x4a31c0);const _0x526b6d={'pendingPricingId':_0x25af5a,'endDate':void(0x927+0x2569+-0x2e90)};return updateSubscriptionById(_0x1eb94f,_0x526b6d);}__name(downgradePaymentPlan,'downgradePaymentPlan');async function upgradePaymentPlan(_0x357bbb,_0x547d20,_0x320940,_0x22b2cf){await instantUpdateStripeSubscription(_0x547d20,_0x320940);const _0x2c2fdc={'pricingId':_0x22b2cf,'endDate':void(-0x12e0+-0xe3*-0x1e+0x2*-0x3dd),'pendingPricingId':void(-0x1bfb+0x610+0x15eb)};return updateSubscriptionById(_0x357bbb,_0x2c2fdc);}__name(upgradePaymentPlan,'upgradePaymentPlan');async function updateSubscriptionById(_0x4dd30e,_0x33a84d){const _0x5a154c=await getUserId(),_0x58d4db={'id':_0x4dd30e,..._0x33a84d},_0x38a444={'resourceName':resourceNames['subscription'],'resource':_0x58d4db,'isCreate':![],'throwOnNonSuccess':!![],'userId':_0x5a154c};await crudUpdate(_0x38a444);}__name(updateSubscriptionById,'updateSubscriptionById');
17
+ var __defProp=Object['defineProperty'],__name=(_0x23b25c,_0x4fd7f1)=>__defProp(_0x23b25c,'name',{'value':_0x4fd7f1,'configurable':!![]});async function cancelPaidSubscription(_0x5c4123,_0x4957e8){const _0x233a46=await getSubscriptionsByWorkspaceId(_0x4957e8),_0x11f0cf=_0x233a46['some'](_0x4c1e09=>_0x4c1e09['id']===_0x5c4123);if(!_0x11f0cf)throw apiForbiddenError();const _0x3c6152=_0x233a46['find'](_0x3ef24c=>_0x3ef24c['id']===_0x5c4123);if(!_0x3c6152?.['paymentSystemSubscriptionId'])throw apiBadRequestError();if(_0x3c6152['pendingPricingId']){const _0xba1de6=await updateSubscriptionById(_0x5c4123,{'pendingPricingId':void(-0x212b*-0x1+-0x2522+0x3f7),'endDate':_0x3c6152['currentPeriodEndDate']}),_0x38c345=await getResource({'resourceName':resourceNames['pricing'],'id':_0x3c6152['pricingId']});return updateStripeSubscriptionWithoutProration(_0x3c6152['paymentSystemSubscriptionId'],_0x38c345['paymentSystemPriceId']),_0xba1de6;}const _0xbb35e8=await cancelStripeSubscription(_0x3c6152['paymentSystemSubscriptionId']),_0x13ac97={'status':mapSubscriptionStatusToDbFormat(_0xbb35e8['subscriptionStatus']),'currentPeriodEndDate':unixTimestampToDate(_0xbb35e8?.['currentPeriodEndDate']),'endDate':_0xbb35e8?.['endDate']?unixTimestampToDate(_0xbb35e8['endDate']):void(-0x150e+0x22f4+-0xde6),'pendingPricingId':void(-0xad*-0x3+-0xa7*0xd+0x674)};return updateSubscriptionById(_0x5c4123,_0x13ac97);}__name(cancelPaidSubscription,'cancelPaidSubscription');async function updatePaymentPlan(_0x34f76a,_0x120f4e){const _0x4e5e57=await getResource({'resourceName':resourceNames['subscription'],'id':_0x34f76a}),_0x43f669=await getResource({'resourceName':resourceNames['pricing'],'id':_0x120f4e}),_0x5b8c2b=_0x4e5e57['paymentSystemSubscriptionId'],_0x13144d=_0x43f669['paymentSystemPriceId'];if(_0x4e5e57['status']===subscriptionStatuses['trialing'])throw apiForbiddenError(paymentErrorMessages['subscriptionCannotBeUpdatedDueToTrial']);const _0x15d851=await getPaymentPlanByPricingId(_0x120f4e);if(!_0x15d851)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(isPaymentPlanTrial(_0x15d851))throw apiBadRequestError(paymentErrorMessages['subscriptionCannotBeUpgradedToTrial']);const _0x4022db=await getResource({'resourceName':resourceNames['pricing'],'id':_0x120f4e}),_0x4e0571=await getResource({'resourceName':resourceNames['pricing'],'id':_0x4e5e57['pricingId']});_0x4022db['price']>=_0x4e0571['price']?await upgradePaymentPlan(_0x34f76a,_0x5b8c2b,_0x13144d,_0x120f4e):await downgradePaymentPlan(_0x34f76a,_0x5b8c2b,_0x13144d,_0x120f4e);}__name(updatePaymentPlan,'updatePaymentPlan');async function changeSubscriptionStatus(_0x2cb5e4,_0x506420){return changeSubscriptionStatusById(_0x2cb5e4,_0x506420);}__name(changeSubscriptionStatus,'changeSubscriptionStatus');async function getActiveSubscriptionByWorkspaceId(_0x24db11){const _0x48f8de=await getSubscriptionsByWorkspaceId(_0x24db11),_0xd00a1b=_0x48f8de['find'](_0x31aa75=>_0x31aa75['status']===subscriptionStatuses['active']||_0x31aa75['status']===subscriptionStatuses['trialing']);return _0xd00a1b;}__name(getActiveSubscriptionByWorkspaceId,'getActiveSubscriptionByWorkspaceId');async function syncInactiveSubscriptions(){const _0x2b5804=await getSubscriptionsDueForCheck();if(!_0x2b5804['length'])return;for(const _0x8f6181 of _0x2b5804){if(_0x8f6181?.['paymentSystemSubscriptionId']){const _0x210353=await getFreeSubscriptionByWorkspaceId(_0x8f6181['workspaceId']),_0x28635c=await getStripeSubscriptionData(_0x8f6181['paymentSystemSubscriptionId']),_0x52f349=mapSubscriptionStatusToDbFormat(_0x28635c['status']);_0x52f349!==_0x8f6181['status']&&_0x52f349!==subscriptionStatuses['active']&&_0x52f349!==subscriptionStatuses['pastDue']&&await processInactiveSubscriptionSync(_0x8f6181['id'],_0x210353['id'],_0x28635c);}}}__name(syncInactiveSubscriptions,'syncInactiveSubscriptions');async function processInactiveSubscriptionSync(_0x35c03e,_0x2fd2a3,_0x329a6e){const _0x53f558={'status':subscriptionStatuses['canceled'],'currentPeriodEndDate':unixTimestampToDate(_0x329a6e['currentPeriodEndDate']),'endDate':_0x329a6e['endDate']?unixTimestampToDate(_0x329a6e['endDate']):void(0x47a+-0x1fe7*-0x1+-0x2461)};await updateSubscriptionById(_0x35c03e,_0x53f558),await changeSubscriptionStatusById(_0x2fd2a3,subscriptionStatuses['active']);}__name(processInactiveSubscriptionSync,'processInactiveSubscriptionSync');async function hasPaidOrTrialSubscription(){const _0x46983b=await getResourcesByName(resourceNames['subscription']);return _0x46983b['some'](_0x19de4c=>_0x19de4c['pricingId']!==pricingIds['basicId']);}__name(hasPaidOrTrialSubscription,'hasPaidOrTrialSubscription');async function createSubscriptionForCurrentWorkspace(_0x49b929){const _0x4bdaa5=await getCurrentPaymentSystemCustomerId();if(!_0x4bdaa5)throw apiNotFoundError(paymentErrorMessages['paymentSystemUserNotFound']);const _0x347921=await getStripeDefaultPaymentMethod(_0x4bdaa5),_0x1995fe=_0x347921?.['id'];if(!_0x1995fe)throw apiNotFoundError(paymentErrorMessages['defaultPaymentMethodNotFound']);const _0x502711=await getPaymentPlanByPricingId(_0x49b929);if(!_0x502711)throw apiInternalServerError(paymentErrorMessages['noPaymentPlanAttachedToPricing']);if(isPaymentPlanTrial(_0x502711))throw apiBadRequestError(paymentErrorMessages['trialCannotBeCreated']);return createSubscriptionWithInstantPayment(_0x49b929,_0x1995fe,_0x4bdaa5);}__name(createSubscriptionForCurrentWorkspace,'createSubscriptionForCurrentWorkspace');async function downgradePaymentPlan(_0x1b4b00,_0x46f9f5,_0x21c56d,_0x3be1e3){await updateStripeSubscriptionWithoutProration(_0x46f9f5,_0x21c56d);const _0x65888c={'pendingPricingId':_0x3be1e3,'endDate':void(-0x124a+0x18ab+-0x661)};return updateSubscriptionById(_0x1b4b00,_0x65888c);}__name(downgradePaymentPlan,'downgradePaymentPlan');async function upgradePaymentPlan(_0x588629,_0x47b5d6,_0xbea799,_0x337536){await instantUpdateStripeSubscription(_0x47b5d6,_0xbea799);const _0x132389={'pricingId':_0x337536,'endDate':void(-0x16f*-0x4+0x2e9+-0x8a5),'pendingPricingId':void(-0x24a+-0x82*0x2a+0x179e*0x1)};return updateSubscriptionById(_0x588629,_0x132389);}__name(upgradePaymentPlan,'upgradePaymentPlan');async function updateSubscriptionById(_0x1b824c,_0x514059){const _0x55de78=await getUserId(),_0x4c89df={'id':_0x1b824c,..._0x514059},_0x54c825={'resourceName':resourceNames['subscription'],'resource':_0x4c89df,'isCreate':![],'throwOnNonSuccess':!![],'userId':_0x55de78};await crudUpdate(_0x54c825);}__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=(_0x58aef0,_0x108232)=>__defProp(_0x58aef0,'name',{'value':_0x108232,'configurable':!![]});async function get(){const _0x3e8a4e=await stripe['invoices']['list']();return _0x3e8a4e['data']['map'](transformInvoice);}__name(get,'get');function transformInvoice(_0x4c95b7){return {'id':_0x4c95b7['id'],'date':_0x4c95b7['created'],'invoiceNumber':_0x4c95b7['number']??void(-0xfcb*0x1+0x1a67+-0x1*0xa9c),'amount':_0x4c95b7['amount_due'],'status':_0x4c95b7['status']??void(-0x2379+-0x1ab2+0x3e2b),'downloadUrl':_0x4c95b7['invoice_pdf']??void(0x11d3+0x40*0x29+0x1*-0x1c13),'viewUrl':_0x4c95b7['hosted_invoice_url']??void(-0x21d8+-0xe48*0x2+0x3e68)};}__name(transformInvoice,'transformInvoice');
4
+ var __defProp=Object['defineProperty'],__name=(_0x350140,_0x59693d)=>__defProp(_0x350140,'name',{'value':_0x59693d,'configurable':!![]});async function get(){const _0x1695ff=await stripe['invoices']['list']();return _0x1695ff['data']['map'](transformInvoice);}__name(get,'get');function transformInvoice(_0x59cfe4){return {'id':_0x59cfe4['id'],'date':_0x59cfe4['created'],'invoiceNumber':_0x59cfe4['number']??void(0x18f7+-0x21f*-0x2+-0x1d35),'amount':_0x59cfe4['amount_due'],'status':_0x59cfe4['status']??void(-0xea4+-0xbb*-0x9+0x7*0x127),'downloadUrl':_0x59cfe4['invoice_pdf']??void(-0xc5f*0x3+0x1111+0x4*0x503),'viewUrl':_0x59cfe4['hosted_invoice_url']??void(0x17bd+0x820+-0x1fdd)};}__name(transformInvoice,'transformInvoice');
5
5
 
6
6
  export { get };
@@ -1,6 +1,4 @@
1
1
  /** To do: add docs */
2
- export declare function extractText(html: string, maxCharacters: number): string;
3
- /** To do: add docs */
4
2
  export declare function fetchHtml(url: string): Promise<string>;
5
3
  interface WebsiteFullAnalysisResult {
6
4
  name: string;
@@ -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 _0x57db46 from 'cheerio';
6
+ import { extractText } from '../../other/scrapping/scrappers.js';
7
7
 
8
- var __defProp=Object['defineProperty'],__name=(_0x1a23ab,_0x5af788)=>__defProp(_0x1a23ab,'name',{'value':_0x5af788,'configurable':!![]});function extractText(_0x13fb64,_0x48d01b){const _0x19e0a9=_0x57db46['load'](_0x13fb64),_0x1b9b47=[];_0x19e0a9('p,\x20h1,\x20h2,\x20h3,\x20h4,\x20h5,\x20h6,\x20li,\x20td,\x20th,\x20article')['each']((_0x30a451,_0x1085c5)=>{_0x1b9b47['push'](_0x19e0a9(_0x1085c5)['text']()['trim']());});const _0x403d39=_0x1b9b47['join']('\x0a')['trim']();return _0x403d39['slice'](-0x11d9*-0x1+-0x8*0xe5+0x1*-0xab1,_0x48d01b);}__name(extractText,'extractText');async function fetchHtml(_0xb2da79){const _0x2d16f4=await fetch(_0xb2da79),_0x479561=await _0x2d16f4['text']();if(!_0x2d16f4['ok'])throw createError(enricherErrorMessages['errorFetching']['replace']('{0}',_0x2d16f4['status']+':\x20'+_0x479561));return _0x479561;}__name(fetchHtml,'fetchHtml');async function analyzeWebsite(_0x1ba984){const _0x2dd05e=await fetchHtml(_0x1ba984),_0x279979=extractText(_0x2dd05e,-0xc56+0x107c+-0x39*-0x22),_0x46fed3=buildUserPrompt(_0x1ba984,_0x279979),_0xe10364=buildSeoCompetitorsPrompt(_0x1ba984,_0x279979),[_0x192966,_0x11cc3c]=await Promise['all']([generateAiText({'prompt':_0x46fed3,'systemPrompt':systemPrompt}),generateAiText({'prompt':_0xe10364,'systemPrompt':systemPrompt})]),_0x5468c5=safeParseJson(_0x192966['text']),_0x2d8cc6=safeParseJson(_0x11cc3c['text']),_0x56f46e={..._0x5468c5,'competitors':_0x2d8cc6['competitors'],'targetAudiences':_0x5468c5['targetAudiences']};return _0x56f46e;}__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(_0x4ca9ab,_0x358229){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'+_0x4ca9ab+'\x0a\x0a**Website\x20content:**\x0a'+_0x358229+'\x0a';}__name(buildUserPrompt,'buildUserPrompt');function buildSeoCompetitorsPrompt(_0x5ce614,_0x407217){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'+_0x5ce614+'.\x0a\x0aTask:\x0aIdentify\x20the\x20top\x205\x20organic\x20search\x20competitors\x20of\x20'+_0x5ce614+'\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'+_0x5ce614+',\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'+_0x5ce614+'\x0a\x0a**Website\x20content:**\x0a'+_0x407217+'\x0a';}__name(buildSeoCompetitorsPrompt,'buildSeoCompetitorsPrompt');
8
+ var __defProp=Object['defineProperty'],__name=(_0x2638c2,_0x52d9e6)=>__defProp(_0x2638c2,'name',{'value':_0x52d9e6,'configurable':!![]});async function fetchHtml(_0x7a4b5e){const _0x50ae91=await fetch(_0x7a4b5e),_0x5661c4=await _0x50ae91['text']();if(!_0x50ae91['ok'])throw createError(enricherErrorMessages['errorFetching']['replace']('{0}',_0x50ae91['status']+':\x20'+_0x5661c4));return _0x5661c4;}__name(fetchHtml,'fetchHtml');async function analyzeWebsite(_0x1be9a0){const _0x4cea0b=await fetchHtml(_0x1be9a0),_0x5f316a=extractText(_0x4cea0b,0xc5*0x3+-0x17b1+0x2*0x108d),_0xdf32d2=buildUserPrompt(_0x1be9a0,_0x5f316a),_0x3dafb7=buildSeoCompetitorsPrompt(_0x1be9a0,_0x5f316a),[_0x254b68,_0x1ea384]=await Promise['all']([generateAiText({'prompt':_0xdf32d2,'systemPrompt':systemPrompt}),generateAiText({'prompt':_0x3dafb7,'systemPrompt':systemPrompt})]),_0x4accbe=safeParseJson(_0x254b68['text']),_0x46aff=safeParseJson(_0x1ea384['text']),_0x1daa89={..._0x4accbe,'competitors':_0x46aff['competitors'],'targetAudiences':_0x4accbe['targetAudiences']};return _0x1daa89;}__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(_0x1a73ed,_0x36b983){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'+_0x1a73ed+'\x0a\x0a**Website\x20content:**\x0a'+_0x36b983+'\x0a';}__name(buildUserPrompt,'buildUserPrompt');function buildSeoCompetitorsPrompt(_0x4c81df,_0x288416){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'+_0x4c81df+'.\x0a\x0aTask:\x0aIdentify\x20the\x20top\x205\x20organic\x20search\x20competitors\x20of\x20'+_0x4c81df+'\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'+_0x4c81df+',\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'+_0x4c81df+'\x0a\x0a**Website\x20content:**\x0a'+_0x288416+'\x0a';}__name(buildSeoCompetitorsPrompt,'buildSeoCompetitorsPrompt');
9
9
 
10
- export { analyzeWebsite, extractText, fetchHtml };
10
+ export { analyzeWebsite, 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=(_0x2ab71e,_0x206c7d)=>__defProp(_0x2ab71e,'name',{'value':_0x206c7d,'configurable':!![]});function createProduct(_0x301552){return createResource(_0x301552,resourceNames['product']);}__name(createProduct,'createProduct');function createProductCategory(_0x177a0f){return createResource(_0x177a0f,resourceNames['productCategory']);}__name(createProductCategory,'createProductCategory');function getAllProducts(){return getResourcesByName(resourceNames['product']);}__name(getAllProducts,'getAllProducts');
6
+ var __defProp=Object['defineProperty'],__name=(_0x1bf14f,_0x4f77c3)=>__defProp(_0x1bf14f,'name',{'value':_0x4f77c3,'configurable':!![]});function createProduct(_0x5e26c7){return createResource(_0x5e26c7,resourceNames['product']);}__name(createProduct,'createProduct');function createProductCategory(_0x4c71a2){return createResource(_0x4c71a2,resourceNames['productCategory']);}__name(createProductCategory,'createProductCategory');function getAllProducts(){return getResourcesByName(resourceNames['product']);}__name(getAllProducts,'getAllProducts');
7
7
 
8
8
  export { createProduct, createProductCategory, getAllProducts };
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
+ import { deviceCategoryLabels } from '../reports/report-string-constants.js';
2
3
  import { createBaseResourceProperties } from '../utils/base-resource-properties.js';
3
4
  import { createProduct, createProductCategory } from './product-db.js';
4
5
  import { workspaceConstants } from '../../../fd-toolbox/server/constants/workspace-constants.js';
5
6
  import { storeIds } from '../store/store-master-data.js';
6
7
  import { productStatuses } from '../../common/products/product-enums.js';
7
8
 
8
- var __defProp=Object['defineProperty'],__name=(_0x4284c0,_0x2e9f99)=>__defProp(_0x4284c0,'name',{'value':_0x2e9f99,'configurable':!![]});const productIds={'smartphoneId':'18a3b240-29d9-40eb-ad41-628ee3754add','gamingLaptopId':'807adb0c-db34-4b05-ae43-594cfe433ffd','wirelessHeadphonesId':'23b315b6-4c7c-4813-980b-4006ce7cc519','smartTvId':'599d75c3-f427-4756-aeea-b4e6856540be'};const productCategoriesIds={'electronicsId':'c54346c4-dabe-46a6-89c1-8403c58fe987','phonesId':'081f1050-ca5e-4bc3-83fd-4754ca66f063','laptopsId':'d9723ea8-8dd4-476f-a37b-d088305963e5','accessoriesId':'5784949f-1c1a-4af6-b307-7562965bff14'};async function seedProducts(){for(const _0x276f3f of productCategoriesToSeed){await seedProductCategory(_0x276f3f['id'],workspaceConstants['defaultWorkspaceId'],_0x276f3f['name'],_0x276f3f['parentId']);}for(const _0x417046 of productsToSeed){await seedProduct(_0x417046['id'],workspaceConstants['defaultWorkspaceId'],_0x417046['name'],_0x417046['description'],_0x417046['categoryId'],_0x417046['storeId'],_0x417046['freight'],_0x417046['price'],_0x417046['status'],_0x417046['notes']);}}__name(seedProducts,'seedProducts');async function seedProduct(_0x27b468,_0x50126b,_0x1e4eb2,_0x15d69b,_0x437222,_0x2cf826,_0x307d54,_0x57db2e,_0x529399,_0x55836e){const _0x146679={...createBaseResourceProperties(_0x27b468),'workspaceId':_0x50126b,'name':_0x1e4eb2,'description':_0x15d69b,'productCategoryId':_0x437222,'storeId':_0x2cf826,'freightShipment':_0x307d54,'notes':_0x55836e,'status':_0x529399,'price':_0x57db2e};return createProduct(_0x146679);}__name(seedProduct,'seedProduct');async function seedProductCategory(_0x4bd0ad,_0x4e0e07,_0x3277e6,_0x195a28){const _0x4f3fab={...createBaseResourceProperties(_0x4bd0ad),'workspaceId':_0x4e0e07,'name':_0x3277e6,'parentProductCategoryId':_0x195a28};return createProductCategory(_0x4f3fab);}__name(seedProductCategory,'seedProductCategory');const productCategoriesToSeed=[{'id':productCategoriesIds['electronicsId'],'name':'Electronics'},{'id':productCategoriesIds['laptopsId'],'name':'Laptops','parentId':productCategoriesIds['electronicsId']},{'id':productCategoriesIds['phonesId'],'name':'Mobile\x20Phones','parentId':productCategoriesIds['electronicsId']},{'id':productCategoriesIds['accessoriesId'],'name':'Laptop\x20Accessories','parentId':productCategoriesIds['laptopsId']}],productsToSeed=[{'id':productIds['smartphoneId'],'name':'Smartphone','description':'High-end\x20smartphone\x20with\x20advanced\x20features.','categoryId':productCategoriesIds['phonesId'],'storeId':storeIds['techStoreId'],'freight':!![],'price':999.99,'status':productStatuses['published'],'notes':'Rechargeable\x20battery\x20with\x2020\x20hours\x20of\x20usage.'},{'id':productIds['gamingLaptopId'],'name':'Gaming\x20Laptop','description':'Powerful\x20laptop\x20with\x20high-performance\x20hardware.','categoryId':productCategoriesIds['laptopsId'],'storeId':storeIds['techStoreId'],'freight':!![],'price':0x3e8,'status':productStatuses['private'],'notes':'Battery\x20life\x20up\x20to\x208\x20hours,\x20depending\x20on\x20usage.'},{'id':productIds['smartTvId'],'name':'Smart\x20TV','description':'Smart\x20TV\x20with\x204K\x20resolution','categoryId':productCategoriesIds['electronicsId'],'storeId':storeIds['techStoreId'],'freight':![],'price':4999.99,'status':productStatuses['published'],'notes':'Streaming\x20capabilities'},{'id':productIds['wirelessHeadphonesId'],'name':'Wireless\x20Headphones','description':'High-quality\x20wireless\x20headphones\x20with\x20noise\x20cancellation.','categoryId':productCategoriesIds['electronicsId'],'storeId':storeIds['techStoreId'],'freight':!![],'price':0x7d0,'status':productStatuses['draft'],'notes':'Compatible\x20with\x20all\x20Bluetooth-enabled\x20devices.'}];
9
+ var __defProp=Object['defineProperty'],__name=(_0x107a32,_0x1ed2a7)=>__defProp(_0x107a32,'name',{'value':_0x1ed2a7,'configurable':!![]});const productIds={'smartphoneId':'18a3b240-29d9-40eb-ad41-628ee3754add','gamingLaptopId':'807adb0c-db34-4b05-ae43-594cfe433ffd','wirelessHeadphonesId':'23b315b6-4c7c-4813-980b-4006ce7cc519','smartTvId':'599d75c3-f427-4756-aeea-b4e6856540be'};const productCategoriesIds={'electronicsId':'c54346c4-dabe-46a6-89c1-8403c58fe987','phonesId':'081f1050-ca5e-4bc3-83fd-4754ca66f063','laptopsId':'d9723ea8-8dd4-476f-a37b-d088305963e5','accessoriesId':'5784949f-1c1a-4af6-b307-7562965bff14'};async function seedProducts(){for(const _0x33670d of productCategoriesToSeed){await seedProductCategory(_0x33670d['id'],workspaceConstants['defaultWorkspaceId'],_0x33670d['name'],_0x33670d['parentId']);}for(const _0x41ea60 of productsToSeed){await seedProduct(_0x41ea60['id'],workspaceConstants['defaultWorkspaceId'],_0x41ea60['name'],_0x41ea60['description'],_0x41ea60['categoryId'],_0x41ea60['storeId'],_0x41ea60['freight'],_0x41ea60['price'],_0x41ea60['status'],_0x41ea60['notes']);}}__name(seedProducts,'seedProducts');async function seedProduct(_0x1ae7dc,_0x32f8f6,_0x3eda15,_0x518f76,_0x219099,_0x3e6b70,_0x176ccf,_0x30c789,_0x397845,_0x2f87e5){const _0x430e6f={...createBaseResourceProperties(_0x1ae7dc),'workspaceId':_0x32f8f6,'name':_0x3eda15,'description':_0x518f76,'productCategoryId':_0x219099,'storeId':_0x3e6b70,'freightShipment':_0x176ccf,'notes':_0x2f87e5,'status':_0x397845,'price':_0x30c789};return createProduct(_0x430e6f);}__name(seedProduct,'seedProduct');async function seedProductCategory(_0x179cc7,_0x13826b,_0x1ffe13,_0x44ceab){const _0x58ae82={...createBaseResourceProperties(_0x179cc7),'workspaceId':_0x13826b,'name':_0x1ffe13,'parentProductCategoryId':_0x44ceab};return createProductCategory(_0x58ae82);}__name(seedProductCategory,'seedProductCategory');const productCategoriesToSeed=[{'id':productCategoriesIds['electronicsId'],'name':'Electronics'},{'id':productCategoriesIds['laptopsId'],'name':deviceCategoryLabels['laptops'],'parentId':productCategoriesIds['electronicsId']},{'id':productCategoriesIds['phonesId'],'name':'Mobile\x20Phones','parentId':productCategoriesIds['electronicsId']},{'id':productCategoriesIds['accessoriesId'],'name':'Laptop\x20Accessories','parentId':productCategoriesIds['laptopsId']}],productsToSeed=[{'id':productIds['smartphoneId'],'name':'Smartphone','description':'High-end\x20smartphone\x20with\x20advanced\x20features.','categoryId':productCategoriesIds['phonesId'],'storeId':storeIds['techStoreId'],'freight':!![],'price':999.99,'status':productStatuses['published'],'notes':'Rechargeable\x20battery\x20with\x2020\x20hours\x20of\x20usage.'},{'id':productIds['gamingLaptopId'],'name':'Gaming\x20Laptop','description':'Powerful\x20laptop\x20with\x20high-performance\x20hardware.','categoryId':productCategoriesIds['laptopsId'],'storeId':storeIds['techStoreId'],'freight':!![],'price':0x3e8,'status':productStatuses['private'],'notes':'Battery\x20life\x20up\x20to\x208\x20hours,\x20depending\x20on\x20usage.'},{'id':productIds['smartTvId'],'name':'Smart\x20TV','description':'Smart\x20TV\x20with\x204K\x20resolution','categoryId':productCategoriesIds['electronicsId'],'storeId':storeIds['techStoreId'],'freight':![],'price':4999.99,'status':productStatuses['published'],'notes':'Streaming\x20capabilities'},{'id':productIds['wirelessHeadphonesId'],'name':'Wireless\x20Headphones','description':'High-quality\x20wireless\x20headphones\x20with\x20noise\x20cancellation.','categoryId':productCategoriesIds['electronicsId'],'storeId':storeIds['techStoreId'],'freight':!![],'price':0x7d0,'status':productStatuses['draft'],'notes':'Compatible\x20with\x20all\x20Bluetooth-enabled\x20devices.'}];
9
10
 
10
11
  export { productCategoriesIds, productIds, seedProducts };
@@ -2,6 +2,6 @@
2
2
  import { resourceNames } from '../../../../fd-toolbox/resources/resource-names.js';
3
3
  import { createResource } from '../../../meta/server/resources/crud-resources.js';
4
4
 
5
- var __defProp=Object['defineProperty'],__name=(_0x2af3e4,_0x5c382c)=>__defProp(_0x2af3e4,'name',{'value':_0x5c382c,'configurable':!![]});function createProductMedia(_0x18c37c){return createResource(_0x18c37c,resourceNames['productMedia']);}__name(createProductMedia,'createProductMedia');
5
+ var __defProp=Object['defineProperty'],__name=(_0x1cf9c6,_0x30adc0)=>__defProp(_0x1cf9c6,'name',{'value':_0x30adc0,'configurable':!![]});function createProductMedia(_0x14dee9){return createResource(_0x14dee9,resourceNames['productMedia']);}__name(createProductMedia,'createProductMedia');
6
6
 
7
7
  export { createProductMedia };
@@ -1,3 +1,8 @@
1
+ export declare const demoImagePaths: {
2
+ readonly landscapeShowcase: "/images/test/photo-1519681393784-d120267933ba.jpg";
3
+ readonly officeAnalytics: "/images/test/photo-1460925895917-afdab827c52f.jpg";
4
+ readonly teamCelebration: "/images/test/photo-1499636136210-6f4ee915583e.jpg";
5
+ };
1
6
  export declare const productMediaIds: {
2
7
  readonly landscapeId: "c47034b5-b6f5-5a10-9a77-6c0210df2674";
3
8
  readonly cookieId: "1e8f9d44-4efe-5870-aa0e-b0887f6c5748";
@@ -4,6 +4,6 @@ import { createProductMedia } from './product-media-db.js';
4
4
  import { createBaseResourceProperties } from '../../utils/base-resource-properties.js';
5
5
  import { workspaceConstants } from '../../../../fd-toolbox/server/constants/workspace-constants.js';
6
6
 
7
- var __defProp=Object['defineProperty'],__name=(_0x22a4ed,_0x364f92)=>__defProp(_0x22a4ed,'name',{'value':_0x364f92,'configurable':!![]});const productMediaIds={'landscapeId':'c47034b5-b6f5-5a10-9a77-6c0210df2674','cookieId':'1e8f9d44-4efe-5870-aa0e-b0887f6c5748','laptopId':'d26f02f3-7874-50aa-b277-c5a2470f0dd7'};async function seedProductMedias(){await seedLandscape(),await seedCookie(),await seedLaptop();}__name(seedProductMedias,'seedProductMedias');async function seedProductMedia(_0x5867d9,_0x5a39c0,_0x200134,_0x5889e7,_0x308cc0){const _0x233f54={...createBaseResourceProperties(_0x5867d9),'workspaceId':_0x200134,'productId':_0x5a39c0,'imageUrl':_0x5889e7,'videoUrl':_0x308cc0};return createProductMedia(_0x233f54);}__name(seedProductMedia,'seedProductMedia');async function seedLandscape(){await seedProductMedia(productMediaIds['landscapeId'],productIds['smartphoneId'],workspaceConstants['defaultWorkspaceId'],'/images/test/photo-1519681393784-d120267933ba.jpg');}__name(seedLandscape,'seedLandscape');async function seedCookie(){await seedProductMedia(productMediaIds['cookieId'],productIds['smartTvId'],workspaceConstants['defaultWorkspaceId'],'/images/test/photo-1499636136210-6f4ee915583e.jpg');}__name(seedCookie,'seedCookie');async function seedLaptop(){await seedProductMedia(productMediaIds['laptopId'],productIds['wirelessHeadphonesId'],workspaceConstants['defaultWorkspaceId'],'/images/test/photo-1460925895917-afdab827c52f.jpg');}__name(seedLaptop,'seedLaptop');
7
+ var __defProp=Object['defineProperty'],__name=(_0x3aa7ad,_0x4d62be)=>__defProp(_0x3aa7ad,'name',{'value':_0x4d62be,'configurable':!![]});const demoImagePaths={'landscapeShowcase':'/images/test/photo-1519681393784-d120267933ba.jpg','officeAnalytics':'/images/test/photo-1460925895917-afdab827c52f.jpg','teamCelebration':'/images/test/photo-1499636136210-6f4ee915583e.jpg'};const productMediaIds={'landscapeId':'c47034b5-b6f5-5a10-9a77-6c0210df2674','cookieId':'1e8f9d44-4efe-5870-aa0e-b0887f6c5748','laptopId':'d26f02f3-7874-50aa-b277-c5a2470f0dd7'};async function seedProductMedias(){await seedLandscape(),await seedCookie(),await seedLaptop();}__name(seedProductMedias,'seedProductMedias');async function seedProductMedia(_0x23dcd7,_0x230de3,_0x398050,_0x5964f7,_0x27d07a){const _0x154d00={...createBaseResourceProperties(_0x23dcd7),'workspaceId':_0x398050,'productId':_0x230de3,'imageUrl':_0x5964f7,'videoUrl':_0x27d07a};return createProductMedia(_0x154d00);}__name(seedProductMedia,'seedProductMedia');async function seedLandscape(){await seedProductMedia(productMediaIds['landscapeId'],productIds['smartphoneId'],workspaceConstants['defaultWorkspaceId'],demoImagePaths['landscapeShowcase']);}__name(seedLandscape,'seedLandscape');async function seedCookie(){await seedProductMedia(productMediaIds['cookieId'],productIds['smartTvId'],workspaceConstants['defaultWorkspaceId'],demoImagePaths['teamCelebration']);}__name(seedCookie,'seedCookie');async function seedLaptop(){await seedProductMedia(productMediaIds['laptopId'],productIds['wirelessHeadphonesId'],workspaceConstants['defaultWorkspaceId'],demoImagePaths['officeAnalytics']);}__name(seedLaptop,'seedLaptop');
8
8
 
9
- export { productMediaIds, seedProductMedias };
9
+ export { demoImagePaths, productMediaIds, seedProductMedias };
@@ -20,7 +20,7 @@ export declare function getLengthParameterProduct(productId: string): {
20
20
  export declare function getWidthParameterProduct(productId: string): {
21
21
  productId: string;
22
22
  externalId: string;
23
- name: string;
23
+ name: "width";
24
24
  minValue: number;
25
25
  maxValue: number;
26
26
  defaultValue: number;