@m5kdev/backend 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/api/index.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/adapter/factory.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/adapter/get-field-attributes.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/adapter/get-id-field.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/adapter/index.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/adapter/types.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/get-tables.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/index.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/schema/account.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/schema/rate-limit.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/schema/session.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/schema/shared.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/schema/user.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/db/schema/verification.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/index.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/social-providers/index.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/types/context.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/types/helper.d.mts +7 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/types/init-options.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/types/plugin-client.d.mts +1 -0
- package/dist/node_modules/.pnpm/@better-auth_core@1.4.18_@better-auth_utils@0.3.0_@better-fetch_fetch@1.1.21_better-cal_347838d331444e5371f256b914727290/node_modules/@better-auth/core/dist/types/plugin.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/dialect-adapter-base.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/dialect-adapter.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/dialect.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/mssql/mssql-adapter.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/mssql/mssql-dialect.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/mssql/mssql-introspector.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/mysql/mysql-adapter.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/mysql/mysql-dialect.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/mysql/mysql-introspector.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/postgres/postgres-adapter.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/postgres/postgres-dialect.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/postgres/postgres-introspector.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-adapter.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-dialect.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/dialect/sqlite/sqlite-introspector.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/expression/expression-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/index.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/kysely.d.mts +38 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/migration/file-migration-provider.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/migration/migrator.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/binary-operation-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/delete-from-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/expression-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/group-by-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/insert-values-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/join-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/merge-into-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/reference-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/returning-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/select-from-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/select-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/set-operation-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/tuple-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/unary-operation-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/update-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/update-set-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/value-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/parser/with-parser.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/case-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/delete-query-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/having-interface.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/insert-query-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/join-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/merge-query-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/on-conflict-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/output-interface.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/returning-interface.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/select-query-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/update-query-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-builder/where-interface.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-creator.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-executor/default-query-executor.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-executor/noop-query-executor.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-executor/query-executor-base.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-executor/query-executor-provider.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/query-executor/query-executor.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/raw-builder/raw-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/raw-builder/sql.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/alter-table-add-foreign-key-constraint-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/alter-table-add-index-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/alter-table-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/alter-table-drop-constraint-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/alter-table-executor.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/create-index-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/create-schema-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/create-table-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/create-type-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/create-view-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/drop-index-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/drop-schema-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/drop-table-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/drop-type-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/drop-view-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/refresh-materialized-view-builder.d.mts +1 -0
- package/dist/node_modules/.pnpm/kysely@0.28.5/node_modules/kysely/dist/esm/schema/schema.d.mts +1 -0
- package/dist/src/lib/posthog.d.mts +7 -0
- package/dist/src/lib/posthog.mjs +7 -0
- package/dist/src/lib/posthog.mjs.map +1 -0
- package/dist/src/lib/sentry.d.mts +1 -0
- package/dist/src/lib/sentry.mjs +10 -0
- package/dist/src/lib/sentry.mjs.map +1 -0
- package/dist/src/modules/access/access.repository.d.mts +2352 -0
- package/dist/src/modules/access/access.repository.mjs +24 -0
- package/dist/src/modules/access/access.repository.mjs.map +1 -0
- package/dist/src/modules/access/access.service.d.mts +25 -0
- package/dist/src/modules/access/access.service.mjs +40 -0
- package/dist/src/modules/access/access.service.mjs.map +1 -0
- package/dist/src/modules/access/access.utils.d.mts +19 -0
- package/dist/src/modules/access/access.utils.mjs +21 -0
- package/dist/src/modules/access/access.utils.mjs.map +1 -0
- package/dist/src/modules/ai/ai.db.d.mts +401 -0
- package/dist/src/modules/ai/ai.db.mjs +38 -0
- package/dist/src/modules/ai/ai.db.mjs.map +1 -0
- package/dist/src/modules/ai/ai.prompt.d.mts +30 -0
- package/dist/src/modules/ai/ai.prompt.mjs +30 -0
- package/dist/src/modules/ai/ai.prompt.mjs.map +1 -0
- package/dist/src/modules/ai/ai.prompts.d.mts +10 -0
- package/dist/src/modules/ai/{ai.prompts.js → ai.prompts.mjs} +17 -15
- package/dist/src/modules/ai/ai.prompts.mjs.map +1 -0
- package/dist/src/modules/ai/ai.repository.d.mts +428 -0
- package/dist/src/modules/ai/ai.repository.mjs +23 -0
- package/dist/src/modules/ai/ai.repository.mjs.map +1 -0
- package/dist/src/modules/ai/ai.router.d.mts +1 -0
- package/dist/src/modules/ai/ai.service.d.mts +128 -0
- package/dist/src/modules/ai/ai.service.mjs +267 -0
- package/dist/src/modules/ai/ai.service.mjs.map +1 -0
- package/dist/src/modules/ai/ai.trpc.d.mts +31 -0
- package/dist/src/modules/ai/ai.trpc.mjs +17 -0
- package/dist/src/modules/ai/ai.trpc.mjs.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.constants.d.mts +11 -0
- package/dist/src/modules/ai/ideogram/ideogram.constants.mjs +184 -0
- package/dist/src/modules/ai/ideogram/ideogram.constants.mjs.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.dto.d.mts +234 -0
- package/dist/src/modules/ai/ideogram/ideogram.dto.mjs +45 -0
- package/dist/src/modules/ai/ideogram/ideogram.dto.mjs.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.prompt.d.mts +7 -0
- package/dist/src/modules/ai/ideogram/{ideogram.prompt.js → ideogram.prompt.mjs} +861 -859
- package/dist/src/modules/ai/ideogram/ideogram.prompt.mjs.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.repository.d.mts +11 -0
- package/dist/src/modules/ai/ideogram/ideogram.repository.mjs +32 -0
- package/dist/src/modules/ai/ideogram/ideogram.repository.mjs.map +1 -0
- package/dist/src/modules/ai/ideogram/ideogram.service.d.mts +14 -0
- package/dist/src/modules/ai/ideogram/ideogram.service.mjs +11 -0
- package/dist/src/modules/ai/ideogram/ideogram.service.mjs.map +1 -0
- package/dist/src/modules/auth/auth.db.d.mts +2341 -0
- package/dist/src/modules/auth/auth.db.mjs +169 -0
- package/dist/src/modules/auth/auth.db.mjs.map +1 -0
- package/dist/src/modules/auth/auth.dto.d.mts +70 -0
- package/dist/src/modules/auth/auth.dto.mjs +43 -0
- package/dist/src/modules/auth/auth.dto.mjs.map +1 -0
- package/dist/src/modules/auth/auth.lib.d.mts +4894 -0
- package/dist/src/modules/auth/auth.lib.mjs +232 -0
- package/dist/src/modules/auth/auth.lib.mjs.map +1 -0
- package/dist/src/modules/auth/auth.middleware.d.mts +619 -0
- package/dist/src/modules/auth/auth.middleware.mjs +38 -0
- package/dist/src/modules/auth/auth.middleware.mjs.map +1 -0
- package/dist/src/modules/auth/auth.repository.d.mts +2453 -0
- package/dist/src/modules/auth/auth.repository.mjs +401 -0
- package/dist/src/modules/auth/auth.repository.mjs.map +1 -0
- package/dist/src/modules/auth/auth.service.d.mts +105 -0
- package/dist/src/modules/auth/auth.service.mjs +227 -0
- package/dist/src/modules/auth/auth.service.mjs.map +1 -0
- package/dist/src/modules/auth/auth.trpc.d.mts +303 -0
- package/dist/src/modules/auth/auth.trpc.mjs +108 -0
- package/dist/src/modules/auth/auth.trpc.mjs.map +1 -0
- package/dist/src/modules/auth/auth.utils.d.mts +2356 -0
- package/dist/src/modules/auth/auth.utils.mjs +77 -0
- package/dist/src/modules/auth/auth.utils.mjs.map +1 -0
- package/dist/src/modules/base/base.abstract.d.mts +29 -0
- package/dist/src/modules/base/base.abstract.mjs +60 -0
- package/dist/src/modules/base/base.abstract.mjs.map +1 -0
- package/dist/src/modules/base/base.actor.d.mts +73 -0
- package/dist/src/modules/base/base.actor.mjs +78 -0
- package/dist/src/modules/base/base.actor.mjs.map +1 -0
- package/dist/src/modules/base/base.dto.d.mts +67 -0
- package/dist/src/modules/base/base.dto.mjs +79 -0
- package/dist/src/modules/base/base.dto.mjs.map +1 -0
- package/dist/src/modules/base/base.grants.d.mts +28 -0
- package/dist/src/modules/base/base.grants.mjs +103 -0
- package/dist/src/modules/base/base.grants.mjs.map +1 -0
- package/dist/src/modules/base/base.procedure.d.mts +111 -0
- package/dist/src/modules/base/base.procedure.mjs +252 -0
- package/dist/src/modules/base/base.procedure.mjs.map +1 -0
- package/dist/src/modules/base/base.repository.d.mts +123 -0
- package/dist/src/modules/base/base.repository.mjs +250 -0
- package/dist/src/modules/base/base.repository.mjs.map +1 -0
- package/dist/src/modules/base/base.service.d.mts +44 -0
- package/dist/src/modules/base/base.service.mjs +116 -0
- package/dist/src/modules/base/base.service.mjs.map +1 -0
- package/dist/src/modules/base/base.types.d.mts +5 -0
- package/dist/src/modules/billing/billing.db.d.mts +371 -0
- package/dist/src/modules/billing/billing.db.mjs +31 -0
- package/dist/src/modules/billing/billing.db.mjs.map +1 -0
- package/dist/src/modules/billing/billing.repository.d.mts +2787 -0
- package/dist/src/modules/billing/billing.repository.mjs +188 -0
- package/dist/src/modules/billing/billing.repository.mjs.map +1 -0
- package/dist/src/modules/billing/billing.router.d.mts +9 -0
- package/dist/src/modules/billing/billing.router.mjs +40 -0
- package/dist/src/modules/billing/billing.router.mjs.map +1 -0
- package/dist/src/modules/billing/billing.service.d.mts +53 -0
- package/dist/src/modules/billing/billing.service.mjs +125 -0
- package/dist/src/modules/billing/billing.service.mjs.map +1 -0
- package/dist/src/modules/billing/billing.trpc.d.mts +29 -0
- package/dist/src/modules/billing/billing.trpc.mjs +17 -0
- package/dist/src/modules/billing/billing.trpc.mjs.map +1 -0
- package/dist/src/modules/clay/clay.repository.d.mts +10 -0
- package/dist/src/modules/clay/clay.repository.mjs +27 -0
- package/dist/src/modules/clay/clay.repository.mjs.map +1 -0
- package/dist/src/modules/clay/clay.service.d.mts +32 -0
- package/dist/src/modules/clay/clay.service.mjs +23 -0
- package/dist/src/modules/clay/clay.service.mjs.map +1 -0
- package/dist/src/modules/connect/connect.db.d.mts +362 -0
- package/dist/src/modules/connect/connect.db.mjs +30 -0
- package/dist/src/modules/connect/connect.db.mjs.map +1 -0
- package/dist/src/modules/connect/connect.dto.d.mts +79 -0
- package/dist/src/modules/connect/connect.dto.mjs +38 -0
- package/dist/src/modules/connect/connect.dto.mjs.map +1 -0
- package/dist/src/modules/connect/connect.linkedin.d.mts +7 -0
- package/dist/src/modules/connect/connect.linkedin.mjs +47 -0
- package/dist/src/modules/connect/connect.linkedin.mjs.map +1 -0
- package/dist/src/modules/connect/connect.oauth.d.mts +32 -0
- package/dist/src/modules/connect/connect.oauth.mjs +145 -0
- package/dist/src/modules/connect/connect.oauth.mjs.map +1 -0
- package/dist/src/modules/connect/connect.repository.d.mts +419 -0
- package/dist/src/modules/connect/connect.repository.mjs +40 -0
- package/dist/src/modules/connect/connect.repository.mjs.map +1 -0
- package/dist/src/modules/connect/connect.router.d.mts +9 -0
- package/dist/src/modules/connect/connect.router.mjs +46 -0
- package/dist/src/modules/connect/connect.router.mjs.map +1 -0
- package/dist/src/modules/connect/connect.service.d.mts +103 -0
- package/dist/src/modules/connect/connect.service.mjs +88 -0
- package/dist/src/modules/connect/connect.service.mjs.map +1 -0
- package/dist/src/modules/connect/connect.trpc.d.mts +53 -0
- package/dist/src/modules/connect/connect.trpc.mjs +17 -0
- package/dist/src/modules/connect/connect.trpc.mjs.map +1 -0
- package/dist/src/modules/connect/connect.types.d.mts +29 -0
- package/dist/src/modules/crypto/crypto.db.d.mts +157 -0
- package/dist/src/modules/crypto/crypto.db.mjs +19 -0
- package/dist/src/modules/crypto/crypto.db.mjs.map +1 -0
- package/dist/src/modules/crypto/crypto.repository.d.mts +163 -0
- package/dist/src/modules/crypto/crypto.repository.mjs +9 -0
- package/dist/src/modules/crypto/crypto.repository.mjs.map +1 -0
- package/dist/src/modules/crypto/crypto.service.d.mts +15 -0
- package/dist/src/modules/crypto/crypto.service.mjs +40 -0
- package/dist/src/modules/crypto/crypto.service.mjs.map +1 -0
- package/dist/src/modules/email/email.service.d.mts +62 -0
- package/dist/src/modules/email/email.service.mjs +105 -0
- package/dist/src/modules/email/email.service.mjs.map +1 -0
- package/dist/src/modules/file/file.repository.d.mts +17 -0
- package/dist/src/modules/file/file.repository.mjs +72 -0
- package/dist/src/modules/file/file.repository.mjs.map +1 -0
- package/dist/src/modules/file/{file.router.d.ts → file.router.d.mts} +4 -0
- package/dist/src/modules/file/file.router.mjs +88 -0
- package/dist/src/modules/file/file.router.mjs.map +1 -0
- package/dist/src/modules/file/file.service.d.mts +30 -0
- package/dist/src/modules/file/file.service.mjs +117 -0
- package/dist/src/modules/file/file.service.mjs.map +1 -0
- package/dist/src/modules/recurrence/recurrence.db.d.mts +568 -0
- package/dist/src/modules/recurrence/recurrence.db.mjs +47 -0
- package/dist/src/modules/recurrence/recurrence.db.mjs.map +1 -0
- package/dist/src/modules/recurrence/recurrence.repository.d.mts +588 -0
- package/dist/src/modules/recurrence/recurrence.repository.mjs +28 -0
- package/dist/src/modules/recurrence/recurrence.repository.mjs.map +1 -0
- package/dist/src/modules/recurrence/recurrence.service.d.mts +51 -0
- package/dist/src/modules/recurrence/recurrence.service.mjs +64 -0
- package/dist/src/modules/recurrence/recurrence.service.mjs.map +1 -0
- package/dist/src/modules/recurrence/recurrence.trpc.d.mts +65 -0
- package/dist/src/modules/recurrence/recurrence.trpc.mjs +44 -0
- package/dist/src/modules/recurrence/recurrence.trpc.mjs.map +1 -0
- package/dist/src/modules/social/social.dto.d.mts +39 -0
- package/dist/src/modules/social/social.dto.mjs +22 -0
- package/dist/src/modules/social/social.dto.mjs.map +1 -0
- package/dist/src/modules/social/{social.linkedin.d.ts → social.linkedin.d.mts} +8 -3
- package/dist/src/modules/social/social.linkedin.mjs +346 -0
- package/dist/src/modules/social/social.linkedin.mjs.map +1 -0
- package/dist/src/modules/social/social.service.d.mts +34 -0
- package/dist/src/modules/social/social.service.mjs +55 -0
- package/dist/src/modules/social/social.service.mjs.map +1 -0
- package/dist/src/modules/social/social.types.d.mts +40 -0
- package/dist/src/modules/tag/tag.db.d.mts +352 -0
- package/dist/src/modules/tag/tag.db.mjs +35 -0
- package/dist/src/modules/tag/tag.db.mjs.map +1 -0
- package/dist/src/modules/tag/tag.dto.d.mts +1025 -0
- package/dist/src/modules/tag/tag.dto.mjs +11 -0
- package/dist/src/modules/tag/tag.dto.mjs.map +1 -0
- package/dist/src/modules/tag/tag.repository.d.mts +394 -0
- package/dist/src/modules/tag/tag.repository.mjs +114 -0
- package/dist/src/modules/tag/tag.repository.mjs.map +1 -0
- package/dist/src/modules/tag/tag.service.d.mts +93 -0
- package/dist/src/modules/tag/tag.service.mjs +47 -0
- package/dist/src/modules/tag/tag.service.mjs.map +1 -0
- package/dist/src/modules/tag/tag.trpc.d.mts +109 -0
- package/dist/src/modules/tag/tag.trpc.mjs +30 -0
- package/dist/src/modules/tag/tag.trpc.mjs.map +1 -0
- package/dist/src/modules/utils/{applyPagination.d.ts → applyPagination.d.mts} +5 -1
- package/dist/src/modules/utils/applyPagination.mjs +15 -0
- package/dist/src/modules/utils/applyPagination.mjs.map +1 -0
- package/dist/src/modules/utils/applySorting.d.mts +13 -0
- package/dist/src/modules/utils/applySorting.mjs +18 -0
- package/dist/src/modules/utils/applySorting.mjs.map +1 -0
- package/dist/src/modules/utils/getConditionsFromFilters.d.mts +9 -0
- package/dist/src/modules/utils/getConditionsFromFilters.mjs +150 -0
- package/dist/src/modules/utils/getConditionsFromFilters.mjs.map +1 -0
- package/dist/src/modules/video/video.service.d.mts +12 -0
- package/dist/src/modules/video/video.service.mjs +50 -0
- package/dist/src/modules/video/video.service.mjs.map +1 -0
- package/dist/src/modules/webhook/webhook.constants.d.mts +12 -0
- package/dist/src/modules/webhook/webhook.constants.mjs +12 -0
- package/dist/src/modules/webhook/webhook.constants.mjs.map +1 -0
- package/dist/src/modules/webhook/webhook.db.d.mts +142 -0
- package/dist/src/modules/webhook/webhook.db.mjs +17 -0
- package/dist/src/modules/webhook/webhook.db.mjs.map +1 -0
- package/dist/src/modules/webhook/webhook.dto.d.mts +402 -0
- package/dist/src/modules/webhook/webhook.dto.mjs +9 -0
- package/dist/src/modules/webhook/webhook.dto.mjs.map +1 -0
- package/dist/src/modules/webhook/webhook.repository.d.mts +154 -0
- package/dist/src/modules/webhook/webhook.repository.mjs +50 -0
- package/dist/src/modules/webhook/webhook.repository.mjs.map +1 -0
- package/dist/src/modules/webhook/webhook.router.d.mts +8 -0
- package/dist/src/modules/webhook/webhook.router.mjs +23 -0
- package/dist/src/modules/webhook/webhook.router.mjs.map +1 -0
- package/dist/src/modules/webhook/webhook.service.d.mts +14 -0
- package/dist/src/modules/webhook/webhook.service.mjs +59 -0
- package/dist/src/modules/webhook/webhook.service.mjs.map +1 -0
- package/dist/src/modules/workflow/workflow.db.d.mts +302 -0
- package/dist/src/modules/workflow/workflow.db.mjs +28 -0
- package/dist/src/modules/workflow/workflow.db.mjs.map +1 -0
- package/dist/src/modules/workflow/workflow.repository.d.mts +371 -0
- package/dist/src/modules/workflow/workflow.repository.mjs +93 -0
- package/dist/src/modules/workflow/workflow.repository.mjs.map +1 -0
- package/dist/src/modules/workflow/workflow.service.d.mts +31 -0
- package/dist/src/modules/workflow/workflow.service.mjs +40 -0
- package/dist/src/modules/workflow/workflow.service.mjs.map +1 -0
- package/dist/src/modules/workflow/workflow.trpc.d.mts +28 -0
- package/dist/src/modules/workflow/workflow.trpc.mjs +17 -0
- package/dist/src/modules/workflow/workflow.trpc.mjs.map +1 -0
- package/dist/src/modules/workflow/workflow.types.d.mts +25 -0
- package/dist/src/modules/workflow/workflow.utils.d.mts +36 -0
- package/dist/src/modules/workflow/workflow.utils.mjs +181 -0
- package/dist/src/modules/workflow/workflow.utils.mjs.map +1 -0
- package/dist/src/types.d.mts +346 -0
- package/dist/src/types.mjs +13 -0
- package/dist/src/types.mjs.map +1 -0
- package/dist/src/utils/errors.d.mts +62 -0
- package/dist/src/utils/errors.mjs +96 -0
- package/dist/src/utils/errors.mjs.map +1 -0
- package/dist/src/utils/logger.d.mts +7 -0
- package/dist/src/utils/logger.mjs +10 -0
- package/dist/src/utils/logger.mjs.map +1 -0
- package/dist/src/utils/posthog.d.mts +17 -0
- package/dist/src/utils/posthog.mjs +25 -0
- package/dist/src/utils/posthog.mjs.map +1 -0
- package/dist/src/utils/trpc.d.mts +54 -0
- package/dist/src/utils/trpc.mjs +146 -0
- package/dist/src/utils/trpc.mjs.map +1 -0
- package/dist/src/utils/types.d.mts +9 -0
- package/package.json +5 -4
- package/dist/src/lib/posthog.d.ts +0 -2
- package/dist/src/lib/posthog.js +0 -7
- package/dist/src/lib/sentry.js +0 -9
- package/dist/src/modules/access/access.repository.d.ts +0 -2347
- package/dist/src/modules/access/access.repository.js +0 -32
- package/dist/src/modules/access/access.service.d.ts +0 -21
- package/dist/src/modules/access/access.service.js +0 -51
- package/dist/src/modules/access/access.test.js +0 -182
- package/dist/src/modules/access/access.utils.d.ts +0 -16
- package/dist/src/modules/access/access.utils.js +0 -20
- package/dist/src/modules/ai/ai.db.d.ts +0 -395
- package/dist/src/modules/ai/ai.db.js +0 -39
- package/dist/src/modules/ai/ai.prompt.d.ts +0 -26
- package/dist/src/modules/ai/ai.prompt.js +0 -30
- package/dist/src/modules/ai/ai.prompts.d.ts +0 -5
- package/dist/src/modules/ai/ai.repository.d.ts +0 -423
- package/dist/src/modules/ai/ai.repository.js +0 -26
- package/dist/src/modules/ai/ai.router.js +0 -132
- package/dist/src/modules/ai/ai.service.d.ts +0 -127
- package/dist/src/modules/ai/ai.service.js +0 -297
- package/dist/src/modules/ai/ai.trpc.d.ts +0 -22
- package/dist/src/modules/ai/ai.trpc.js +0 -20
- package/dist/src/modules/ai/ideogram/ideogram.constants.d.ts +0 -7
- package/dist/src/modules/ai/ideogram/ideogram.constants.js +0 -167
- package/dist/src/modules/ai/ideogram/ideogram.dto.d.ts +0 -229
- package/dist/src/modules/ai/ideogram/ideogram.dto.js +0 -49
- package/dist/src/modules/ai/ideogram/ideogram.prompt.d.ts +0 -2
- package/dist/src/modules/ai/ideogram/ideogram.repository.d.ts +0 -6
- package/dist/src/modules/ai/ideogram/ideogram.repository.js +0 -46
- package/dist/src/modules/ai/ideogram/ideogram.service.d.ts +0 -9
- package/dist/src/modules/ai/ideogram/ideogram.service.js +0 -11
- package/dist/src/modules/auth/auth.db.d.ts +0 -2335
- package/dist/src/modules/auth/auth.db.js +0 -215
- package/dist/src/modules/auth/auth.dto.d.ts +0 -65
- package/dist/src/modules/auth/auth.dto.js +0 -38
- package/dist/src/modules/auth/auth.lib.d.ts +0 -4873
- package/dist/src/modules/auth/auth.lib.js +0 -284
- package/dist/src/modules/auth/auth.middleware.d.ts +0 -614
- package/dist/src/modules/auth/auth.middleware.js +0 -52
- package/dist/src/modules/auth/auth.repository.d.ts +0 -2421
- package/dist/src/modules/auth/auth.repository.js +0 -636
- package/dist/src/modules/auth/auth.service.d.ts +0 -108
- package/dist/src/modules/auth/auth.service.js +0 -246
- package/dist/src/modules/auth/auth.trpc.d.ts +0 -292
- package/dist/src/modules/auth/auth.trpc.js +0 -179
- package/dist/src/modules/auth/auth.utils.d.ts +0 -2351
- package/dist/src/modules/auth/auth.utils.js +0 -97
- package/dist/src/modules/base/base.abstract.d.ts +0 -19
- package/dist/src/modules/base/base.abstract.js +0 -62
- package/dist/src/modules/base/base.dto.d.ts +0 -69
- package/dist/src/modules/base/base.dto.js +0 -112
- package/dist/src/modules/base/base.grants.d.ts +0 -28
- package/dist/src/modules/base/base.grants.js +0 -123
- package/dist/src/modules/base/base.grants.test.js +0 -668
- package/dist/src/modules/base/base.procedure.d.ts +0 -112
- package/dist/src/modules/base/base.procedure.js +0 -289
- package/dist/src/modules/base/base.repository.d.ts +0 -97
- package/dist/src/modules/base/base.repository.js +0 -317
- package/dist/src/modules/base/base.service.d.ts +0 -52
- package/dist/src/modules/base/base.service.js +0 -116
- package/dist/src/modules/base/base.service.test.js +0 -415
- package/dist/src/modules/base/base.types.d.ts +0 -1
- package/dist/src/modules/base/base.types.js +0 -2
- package/dist/src/modules/billing/billing.db.d.ts +0 -365
- package/dist/src/modules/billing/billing.db.js +0 -29
- package/dist/src/modules/billing/billing.repository.d.ts +0 -2763
- package/dist/src/modules/billing/billing.repository.js +0 -235
- package/dist/src/modules/billing/billing.router.d.ts +0 -4
- package/dist/src/modules/billing/billing.router.js +0 -56
- package/dist/src/modules/billing/billing.service.d.ts +0 -59
- package/dist/src/modules/billing/billing.service.js +0 -147
- package/dist/src/modules/billing/billing.trpc.d.ts +0 -38
- package/dist/src/modules/billing/billing.trpc.js +0 -17
- package/dist/src/modules/clay/clay.repository.d.ts +0 -5
- package/dist/src/modules/clay/clay.repository.js +0 -26
- package/dist/src/modules/clay/clay.service.d.ts +0 -28
- package/dist/src/modules/clay/clay.service.js +0 -24
- package/dist/src/modules/connect/connect.db.d.ts +0 -356
- package/dist/src/modules/connect/connect.db.js +0 -30
- package/dist/src/modules/connect/connect.dto.d.ts +0 -74
- package/dist/src/modules/connect/connect.dto.js +0 -36
- package/dist/src/modules/connect/connect.linkedin.d.ts +0 -2
- package/dist/src/modules/connect/connect.linkedin.js +0 -53
- package/dist/src/modules/connect/connect.oauth.d.ts +0 -27
- package/dist/src/modules/connect/connect.oauth.js +0 -198
- package/dist/src/modules/connect/connect.repository.d.ts +0 -413
- package/dist/src/modules/connect/connect.repository.js +0 -54
- package/dist/src/modules/connect/connect.router.d.ts +0 -4
- package/dist/src/modules/connect/connect.router.js +0 -54
- package/dist/src/modules/connect/connect.service.d.ts +0 -88
- package/dist/src/modules/connect/connect.service.js +0 -114
- package/dist/src/modules/connect/connect.trpc.d.ts +0 -44
- package/dist/src/modules/connect/connect.trpc.js +0 -21
- package/dist/src/modules/connect/connect.types.d.ts +0 -25
- package/dist/src/modules/connect/connect.types.js +0 -2
- package/dist/src/modules/crypto/crypto.db.d.ts +0 -151
- package/dist/src/modules/crypto/crypto.db.js +0 -17
- package/dist/src/modules/crypto/crypto.repository.d.ts +0 -159
- package/dist/src/modules/crypto/crypto.repository.js +0 -10
- package/dist/src/modules/crypto/crypto.service.d.ts +0 -10
- package/dist/src/modules/crypto/crypto.service.js +0 -52
- package/dist/src/modules/email/email.service.d.ts +0 -56
- package/dist/src/modules/email/email.service.js +0 -106
- package/dist/src/modules/file/file.repository.d.ts +0 -12
- package/dist/src/modules/file/file.repository.js +0 -79
- package/dist/src/modules/file/file.router.js +0 -99
- package/dist/src/modules/file/file.service.d.ts +0 -24
- package/dist/src/modules/file/file.service.js +0 -150
- package/dist/src/modules/recurrence/recurrence.db.d.ts +0 -562
- package/dist/src/modules/recurrence/recurrence.db.js +0 -66
- package/dist/src/modules/recurrence/recurrence.repository.d.ts +0 -584
- package/dist/src/modules/recurrence/recurrence.repository.js +0 -39
- package/dist/src/modules/recurrence/recurrence.service.d.ts +0 -50
- package/dist/src/modules/recurrence/recurrence.service.js +0 -69
- package/dist/src/modules/recurrence/recurrence.trpc.d.ts +0 -206
- package/dist/src/modules/recurrence/recurrence.trpc.js +0 -65
- package/dist/src/modules/social/social.dto.d.ts +0 -34
- package/dist/src/modules/social/social.dto.js +0 -18
- package/dist/src/modules/social/social.linkedin.js +0 -427
- package/dist/src/modules/social/social.linkedin.test.js +0 -235
- package/dist/src/modules/social/social.service.d.ts +0 -28
- package/dist/src/modules/social/social.service.js +0 -76
- package/dist/src/modules/social/social.types.d.ts +0 -35
- package/dist/src/modules/social/social.types.js +0 -2
- package/dist/src/modules/tag/tag.db.d.ts +0 -346
- package/dist/src/modules/tag/tag.db.js +0 -42
- package/dist/src/modules/tag/tag.dto.d.ts +0 -1018
- package/dist/src/modules/tag/tag.dto.js +0 -9
- package/dist/src/modules/tag/tag.repository.d.ts +0 -383
- package/dist/src/modules/tag/tag.repository.js +0 -156
- package/dist/src/modules/tag/tag.service.d.ts +0 -109
- package/dist/src/modules/tag/tag.service.js +0 -42
- package/dist/src/modules/tag/tag.trpc.d.ts +0 -164
- package/dist/src/modules/tag/tag.trpc.js +0 -53
- package/dist/src/modules/utils/applyPagination.js +0 -16
- package/dist/src/modules/utils/applySorting.d.ts +0 -8
- package/dist/src/modules/utils/applySorting.js +0 -18
- package/dist/src/modules/utils/getConditionsFromFilters.d.ts +0 -4
- package/dist/src/modules/utils/getConditionsFromFilters.js +0 -200
- package/dist/src/modules/video/video.service.d.ts +0 -7
- package/dist/src/modules/video/video.service.js +0 -84
- package/dist/src/modules/webhook/webhook.constants.d.ts +0 -8
- package/dist/src/modules/webhook/webhook.constants.js +0 -10
- package/dist/src/modules/webhook/webhook.db.d.ts +0 -136
- package/dist/src/modules/webhook/webhook.db.js +0 -17
- package/dist/src/modules/webhook/webhook.dto.d.ts +0 -394
- package/dist/src/modules/webhook/webhook.dto.js +0 -7
- package/dist/src/modules/webhook/webhook.repository.d.ts +0 -148
- package/dist/src/modules/webhook/webhook.repository.js +0 -56
- package/dist/src/modules/webhook/webhook.router.d.ts +0 -3
- package/dist/src/modules/webhook/webhook.router.js +0 -30
- package/dist/src/modules/webhook/webhook.service.d.ts +0 -9
- package/dist/src/modules/webhook/webhook.service.js +0 -68
- package/dist/src/modules/workflow/workflow.db.d.ts +0 -296
- package/dist/src/modules/workflow/workflow.db.js +0 -30
- package/dist/src/modules/workflow/workflow.repository.d.ts +0 -343
- package/dist/src/modules/workflow/workflow.repository.js +0 -105
- package/dist/src/modules/workflow/workflow.service.d.ts +0 -21
- package/dist/src/modules/workflow/workflow.service.js +0 -37
- package/dist/src/modules/workflow/workflow.trpc.d.ts +0 -56
- package/dist/src/modules/workflow/workflow.trpc.js +0 -21
- package/dist/src/modules/workflow/workflow.types.d.ts +0 -20
- package/dist/src/modules/workflow/workflow.types.js +0 -2
- package/dist/src/modules/workflow/workflow.utils.d.ts +0 -21
- package/dist/src/modules/workflow/workflow.utils.js +0 -173
- package/dist/src/test/stubs/utils.d.ts +0 -2
- package/dist/src/test/stubs/utils.js +0 -5
- package/dist/src/trpc/context.d.ts +0 -41
- package/dist/src/trpc/context.js +0 -17
- package/dist/src/trpc/index.d.ts +0 -3
- package/dist/src/trpc/index.js +0 -6
- package/dist/src/trpc/procedures.d.ts +0 -233
- package/dist/src/trpc/procedures.js +0 -32
- package/dist/src/trpc/utils.d.ts +0 -4
- package/dist/src/trpc/utils.js +0 -20
- package/dist/src/types.d.ts +0 -358
- package/dist/src/types.js +0 -12
- package/dist/src/utils/errors.d.ts +0 -49
- package/dist/src/utils/errors.js +0 -104
- package/dist/src/utils/logger.d.ts +0 -1
- package/dist/src/utils/logger.js +0 -11
- package/dist/src/utils/posthog.d.ts +0 -13
- package/dist/src/utils/posthog.js +0 -31
- package/dist/src/utils/trpc.d.ts +0 -58
- package/dist/src/utils/trpc.js +0 -63
- package/dist/src/utils/types.d.ts +0 -4
- package/dist/src/utils/types.js +0 -2
- package/dist/tsconfig.tsbuildinfo +0 -1
- /package/dist/src/{lib/sentry.d.ts → modules/ai/ai.router.mjs} +0 -0
- /package/dist/src/modules/{access/access.test.d.ts → base/base.types.mjs} +0 -0
- /package/dist/src/modules/{ai/ai.router.d.ts → connect/connect.types.mjs} +0 -0
- /package/dist/src/modules/{base/base.grants.test.d.ts → social/social.types.mjs} +0 -0
- /package/dist/src/modules/{base/base.service.test.d.ts → workflow/workflow.types.mjs} +0 -0
- /package/dist/src/{modules/social/social.linkedin.test.d.ts → utils/types.mjs} +0 -0
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.taggingsSelectOutput = exports.tagsSelectOutput = exports.taggingsSelectDTO = exports.tagsSelectDTO = void 0;
|
|
4
|
-
const base_dto_1 = require("../base/base.dto");
|
|
5
|
-
const tag_db_1 = require("./tag.db");
|
|
6
|
-
exports.tagsSelectDTO = (0, base_dto_1.createSelectDTO)(tag_db_1.tags);
|
|
7
|
-
exports.taggingsSelectDTO = (0, base_dto_1.createSelectDTO)(tag_db_1.taggings);
|
|
8
|
-
exports.tagsSelectOutput = exports.tagsSelectDTO.schema;
|
|
9
|
-
exports.taggingsSelectOutput = exports.taggingsSelectDTO.schema;
|
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
import type { TaggingSchema, TagLinkSchema, TagListInputSchema, TagListSchema, TagSchema } from "@m5kdev/commons/modules/tag/tag.schema";
|
|
2
|
-
import type { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
3
|
-
import type { ServerResultAsync } from "../base/base.dto";
|
|
4
|
-
import { BaseTableRepository } from "../base/base.repository";
|
|
5
|
-
import type { TaggingSelectOutputResult, TagSelectOutputResult } from "./tag.dto";
|
|
6
|
-
declare const schema: {
|
|
7
|
-
tags: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
8
|
-
name: "tags";
|
|
9
|
-
schema: undefined;
|
|
10
|
-
columns: {
|
|
11
|
-
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
12
|
-
name: "id";
|
|
13
|
-
tableName: "tags";
|
|
14
|
-
dataType: "string";
|
|
15
|
-
columnType: "SQLiteText";
|
|
16
|
-
data: string;
|
|
17
|
-
driverParam: string;
|
|
18
|
-
notNull: true;
|
|
19
|
-
hasDefault: true;
|
|
20
|
-
isPrimaryKey: true;
|
|
21
|
-
isAutoincrement: false;
|
|
22
|
-
hasRuntimeDefault: true;
|
|
23
|
-
enumValues: [string, ...string[]];
|
|
24
|
-
baseColumn: never;
|
|
25
|
-
identity: undefined;
|
|
26
|
-
generated: undefined;
|
|
27
|
-
}, {}, {
|
|
28
|
-
length: number | undefined;
|
|
29
|
-
}>;
|
|
30
|
-
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
31
|
-
name: "created_at";
|
|
32
|
-
tableName: "tags";
|
|
33
|
-
dataType: "date";
|
|
34
|
-
columnType: "SQLiteTimestamp";
|
|
35
|
-
data: Date;
|
|
36
|
-
driverParam: number;
|
|
37
|
-
notNull: true;
|
|
38
|
-
hasDefault: true;
|
|
39
|
-
isPrimaryKey: false;
|
|
40
|
-
isAutoincrement: false;
|
|
41
|
-
hasRuntimeDefault: true;
|
|
42
|
-
enumValues: undefined;
|
|
43
|
-
baseColumn: never;
|
|
44
|
-
identity: undefined;
|
|
45
|
-
generated: undefined;
|
|
46
|
-
}, {}, {}>;
|
|
47
|
-
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
48
|
-
name: "updated_at";
|
|
49
|
-
tableName: "tags";
|
|
50
|
-
dataType: "date";
|
|
51
|
-
columnType: "SQLiteTimestamp";
|
|
52
|
-
data: Date;
|
|
53
|
-
driverParam: number;
|
|
54
|
-
notNull: false;
|
|
55
|
-
hasDefault: false;
|
|
56
|
-
isPrimaryKey: false;
|
|
57
|
-
isAutoincrement: false;
|
|
58
|
-
hasRuntimeDefault: false;
|
|
59
|
-
enumValues: undefined;
|
|
60
|
-
baseColumn: never;
|
|
61
|
-
identity: undefined;
|
|
62
|
-
generated: undefined;
|
|
63
|
-
}, {}, {}>;
|
|
64
|
-
deletedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
65
|
-
name: "deleted_at";
|
|
66
|
-
tableName: "tags";
|
|
67
|
-
dataType: "date";
|
|
68
|
-
columnType: "SQLiteTimestamp";
|
|
69
|
-
data: Date;
|
|
70
|
-
driverParam: number;
|
|
71
|
-
notNull: false;
|
|
72
|
-
hasDefault: false;
|
|
73
|
-
isPrimaryKey: false;
|
|
74
|
-
isAutoincrement: false;
|
|
75
|
-
hasRuntimeDefault: false;
|
|
76
|
-
enumValues: undefined;
|
|
77
|
-
baseColumn: never;
|
|
78
|
-
identity: undefined;
|
|
79
|
-
generated: undefined;
|
|
80
|
-
}, {}, {}>;
|
|
81
|
-
userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
82
|
-
name: "user_id";
|
|
83
|
-
tableName: "tags";
|
|
84
|
-
dataType: "string";
|
|
85
|
-
columnType: "SQLiteText";
|
|
86
|
-
data: string;
|
|
87
|
-
driverParam: string;
|
|
88
|
-
notNull: true;
|
|
89
|
-
hasDefault: false;
|
|
90
|
-
isPrimaryKey: false;
|
|
91
|
-
isAutoincrement: false;
|
|
92
|
-
hasRuntimeDefault: false;
|
|
93
|
-
enumValues: [string, ...string[]];
|
|
94
|
-
baseColumn: never;
|
|
95
|
-
identity: undefined;
|
|
96
|
-
generated: undefined;
|
|
97
|
-
}, {}, {
|
|
98
|
-
length: number | undefined;
|
|
99
|
-
}>;
|
|
100
|
-
organizationId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
101
|
-
name: "organization_id";
|
|
102
|
-
tableName: "tags";
|
|
103
|
-
dataType: "string";
|
|
104
|
-
columnType: "SQLiteText";
|
|
105
|
-
data: string;
|
|
106
|
-
driverParam: string;
|
|
107
|
-
notNull: false;
|
|
108
|
-
hasDefault: false;
|
|
109
|
-
isPrimaryKey: false;
|
|
110
|
-
isAutoincrement: false;
|
|
111
|
-
hasRuntimeDefault: false;
|
|
112
|
-
enumValues: [string, ...string[]];
|
|
113
|
-
baseColumn: never;
|
|
114
|
-
identity: undefined;
|
|
115
|
-
generated: undefined;
|
|
116
|
-
}, {}, {
|
|
117
|
-
length: number | undefined;
|
|
118
|
-
}>;
|
|
119
|
-
teamId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
120
|
-
name: "team_id";
|
|
121
|
-
tableName: "tags";
|
|
122
|
-
dataType: "string";
|
|
123
|
-
columnType: "SQLiteText";
|
|
124
|
-
data: string;
|
|
125
|
-
driverParam: string;
|
|
126
|
-
notNull: false;
|
|
127
|
-
hasDefault: false;
|
|
128
|
-
isPrimaryKey: false;
|
|
129
|
-
isAutoincrement: false;
|
|
130
|
-
hasRuntimeDefault: false;
|
|
131
|
-
enumValues: [string, ...string[]];
|
|
132
|
-
baseColumn: never;
|
|
133
|
-
identity: undefined;
|
|
134
|
-
generated: undefined;
|
|
135
|
-
}, {}, {
|
|
136
|
-
length: number | undefined;
|
|
137
|
-
}>;
|
|
138
|
-
name: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
139
|
-
name: "name";
|
|
140
|
-
tableName: "tags";
|
|
141
|
-
dataType: "string";
|
|
142
|
-
columnType: "SQLiteText";
|
|
143
|
-
data: string;
|
|
144
|
-
driverParam: string;
|
|
145
|
-
notNull: true;
|
|
146
|
-
hasDefault: false;
|
|
147
|
-
isPrimaryKey: false;
|
|
148
|
-
isAutoincrement: false;
|
|
149
|
-
hasRuntimeDefault: false;
|
|
150
|
-
enumValues: [string, ...string[]];
|
|
151
|
-
baseColumn: never;
|
|
152
|
-
identity: undefined;
|
|
153
|
-
generated: undefined;
|
|
154
|
-
}, {}, {
|
|
155
|
-
length: number | undefined;
|
|
156
|
-
}>;
|
|
157
|
-
color: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
158
|
-
name: "color";
|
|
159
|
-
tableName: "tags";
|
|
160
|
-
dataType: "string";
|
|
161
|
-
columnType: "SQLiteText";
|
|
162
|
-
data: string;
|
|
163
|
-
driverParam: string;
|
|
164
|
-
notNull: false;
|
|
165
|
-
hasDefault: false;
|
|
166
|
-
isPrimaryKey: false;
|
|
167
|
-
isAutoincrement: false;
|
|
168
|
-
hasRuntimeDefault: false;
|
|
169
|
-
enumValues: [string, ...string[]];
|
|
170
|
-
baseColumn: never;
|
|
171
|
-
identity: undefined;
|
|
172
|
-
generated: undefined;
|
|
173
|
-
}, {}, {
|
|
174
|
-
length: number | undefined;
|
|
175
|
-
}>;
|
|
176
|
-
type: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
177
|
-
name: "type";
|
|
178
|
-
tableName: "tags";
|
|
179
|
-
dataType: "string";
|
|
180
|
-
columnType: "SQLiteText";
|
|
181
|
-
data: string;
|
|
182
|
-
driverParam: string;
|
|
183
|
-
notNull: false;
|
|
184
|
-
hasDefault: false;
|
|
185
|
-
isPrimaryKey: false;
|
|
186
|
-
isAutoincrement: false;
|
|
187
|
-
hasRuntimeDefault: false;
|
|
188
|
-
enumValues: [string, ...string[]];
|
|
189
|
-
baseColumn: never;
|
|
190
|
-
identity: undefined;
|
|
191
|
-
generated: undefined;
|
|
192
|
-
}, {}, {
|
|
193
|
-
length: number | undefined;
|
|
194
|
-
}>;
|
|
195
|
-
isEnabled: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
196
|
-
name: "is_enabled";
|
|
197
|
-
tableName: "tags";
|
|
198
|
-
dataType: "boolean";
|
|
199
|
-
columnType: "SQLiteBoolean";
|
|
200
|
-
data: boolean;
|
|
201
|
-
driverParam: number;
|
|
202
|
-
notNull: true;
|
|
203
|
-
hasDefault: true;
|
|
204
|
-
isPrimaryKey: false;
|
|
205
|
-
isAutoincrement: false;
|
|
206
|
-
hasRuntimeDefault: false;
|
|
207
|
-
enumValues: undefined;
|
|
208
|
-
baseColumn: never;
|
|
209
|
-
identity: undefined;
|
|
210
|
-
generated: undefined;
|
|
211
|
-
}, {}, {}>;
|
|
212
|
-
parentId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
213
|
-
name: "parent_id";
|
|
214
|
-
tableName: "tags";
|
|
215
|
-
dataType: "string";
|
|
216
|
-
columnType: "SQLiteText";
|
|
217
|
-
data: string;
|
|
218
|
-
driverParam: string;
|
|
219
|
-
notNull: false;
|
|
220
|
-
hasDefault: false;
|
|
221
|
-
isPrimaryKey: false;
|
|
222
|
-
isAutoincrement: false;
|
|
223
|
-
hasRuntimeDefault: false;
|
|
224
|
-
enumValues: [string, ...string[]];
|
|
225
|
-
baseColumn: never;
|
|
226
|
-
identity: undefined;
|
|
227
|
-
generated: undefined;
|
|
228
|
-
}, {}, {
|
|
229
|
-
length: number | undefined;
|
|
230
|
-
}>;
|
|
231
|
-
assignableTo: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
232
|
-
name: "assignable_to";
|
|
233
|
-
tableName: "tags";
|
|
234
|
-
dataType: "json";
|
|
235
|
-
columnType: "SQLiteTextJson";
|
|
236
|
-
data: string[];
|
|
237
|
-
driverParam: string;
|
|
238
|
-
notNull: true;
|
|
239
|
-
hasDefault: false;
|
|
240
|
-
isPrimaryKey: false;
|
|
241
|
-
isAutoincrement: false;
|
|
242
|
-
hasRuntimeDefault: false;
|
|
243
|
-
enumValues: undefined;
|
|
244
|
-
baseColumn: never;
|
|
245
|
-
identity: undefined;
|
|
246
|
-
generated: undefined;
|
|
247
|
-
}, {}, {
|
|
248
|
-
$type: string[];
|
|
249
|
-
}>;
|
|
250
|
-
};
|
|
251
|
-
dialect: "sqlite";
|
|
252
|
-
}>;
|
|
253
|
-
taggings: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
254
|
-
name: "taggings";
|
|
255
|
-
schema: undefined;
|
|
256
|
-
columns: {
|
|
257
|
-
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
258
|
-
name: "id";
|
|
259
|
-
tableName: "taggings";
|
|
260
|
-
dataType: "string";
|
|
261
|
-
columnType: "SQLiteText";
|
|
262
|
-
data: string;
|
|
263
|
-
driverParam: string;
|
|
264
|
-
notNull: true;
|
|
265
|
-
hasDefault: true;
|
|
266
|
-
isPrimaryKey: true;
|
|
267
|
-
isAutoincrement: false;
|
|
268
|
-
hasRuntimeDefault: true;
|
|
269
|
-
enumValues: [string, ...string[]];
|
|
270
|
-
baseColumn: never;
|
|
271
|
-
identity: undefined;
|
|
272
|
-
generated: undefined;
|
|
273
|
-
}, {}, {
|
|
274
|
-
length: number | undefined;
|
|
275
|
-
}>;
|
|
276
|
-
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
277
|
-
name: "created_at";
|
|
278
|
-
tableName: "taggings";
|
|
279
|
-
dataType: "date";
|
|
280
|
-
columnType: "SQLiteTimestamp";
|
|
281
|
-
data: Date;
|
|
282
|
-
driverParam: number;
|
|
283
|
-
notNull: true;
|
|
284
|
-
hasDefault: true;
|
|
285
|
-
isPrimaryKey: false;
|
|
286
|
-
isAutoincrement: false;
|
|
287
|
-
hasRuntimeDefault: true;
|
|
288
|
-
enumValues: undefined;
|
|
289
|
-
baseColumn: never;
|
|
290
|
-
identity: undefined;
|
|
291
|
-
generated: undefined;
|
|
292
|
-
}, {}, {}>;
|
|
293
|
-
tagId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
294
|
-
name: "tag_id";
|
|
295
|
-
tableName: "taggings";
|
|
296
|
-
dataType: "string";
|
|
297
|
-
columnType: "SQLiteText";
|
|
298
|
-
data: string;
|
|
299
|
-
driverParam: string;
|
|
300
|
-
notNull: true;
|
|
301
|
-
hasDefault: false;
|
|
302
|
-
isPrimaryKey: false;
|
|
303
|
-
isAutoincrement: false;
|
|
304
|
-
hasRuntimeDefault: false;
|
|
305
|
-
enumValues: [string, ...string[]];
|
|
306
|
-
baseColumn: never;
|
|
307
|
-
identity: undefined;
|
|
308
|
-
generated: undefined;
|
|
309
|
-
}, {}, {
|
|
310
|
-
length: number | undefined;
|
|
311
|
-
}>;
|
|
312
|
-
resourceType: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
313
|
-
name: "resource_type";
|
|
314
|
-
tableName: "taggings";
|
|
315
|
-
dataType: "string";
|
|
316
|
-
columnType: "SQLiteText";
|
|
317
|
-
data: string;
|
|
318
|
-
driverParam: string;
|
|
319
|
-
notNull: true;
|
|
320
|
-
hasDefault: false;
|
|
321
|
-
isPrimaryKey: false;
|
|
322
|
-
isAutoincrement: false;
|
|
323
|
-
hasRuntimeDefault: false;
|
|
324
|
-
enumValues: [string, ...string[]];
|
|
325
|
-
baseColumn: never;
|
|
326
|
-
identity: undefined;
|
|
327
|
-
generated: undefined;
|
|
328
|
-
}, {}, {
|
|
329
|
-
length: number | undefined;
|
|
330
|
-
}>;
|
|
331
|
-
resourceId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
332
|
-
name: "resource_id";
|
|
333
|
-
tableName: "taggings";
|
|
334
|
-
dataType: "string";
|
|
335
|
-
columnType: "SQLiteText";
|
|
336
|
-
data: string;
|
|
337
|
-
driverParam: string;
|
|
338
|
-
notNull: true;
|
|
339
|
-
hasDefault: false;
|
|
340
|
-
isPrimaryKey: false;
|
|
341
|
-
isAutoincrement: false;
|
|
342
|
-
hasRuntimeDefault: false;
|
|
343
|
-
enumValues: [string, ...string[]];
|
|
344
|
-
baseColumn: never;
|
|
345
|
-
identity: undefined;
|
|
346
|
-
generated: undefined;
|
|
347
|
-
}, {}, {
|
|
348
|
-
length: number | undefined;
|
|
349
|
-
}>;
|
|
350
|
-
};
|
|
351
|
-
dialect: "sqlite";
|
|
352
|
-
}>;
|
|
353
|
-
};
|
|
354
|
-
type Schema = typeof schema;
|
|
355
|
-
type Orm = LibSQLDatabase<Schema>;
|
|
356
|
-
export declare class TagRepository extends BaseTableRepository<Orm, Schema, Record<string, never>, Schema["tags"]> {
|
|
357
|
-
link({ userId, ...data }: TagLinkSchema & {
|
|
358
|
-
userId: string;
|
|
359
|
-
}, tx?: Orm): Promise<TaggingSelectOutputResult>;
|
|
360
|
-
linkBulk(data: TagLinkSchema[], tx?: Orm): ServerResultAsync<TagSchema[]>;
|
|
361
|
-
set(data: TagLinkSchema[], tx?: Orm): ServerResultAsync<TagSchema[]>;
|
|
362
|
-
unlink({ userId, ...data }: TagLinkSchema & {
|
|
363
|
-
userId: string;
|
|
364
|
-
}, tx?: Orm): Promise<TagSelectOutputResult>;
|
|
365
|
-
findTagsForResources(data: {
|
|
366
|
-
resourceType: string;
|
|
367
|
-
resourceIds: readonly string[];
|
|
368
|
-
}, tx?: Orm): ServerResultAsync<Record<string, TagSchema[]>>;
|
|
369
|
-
attachTagsToResources<TRow extends {
|
|
370
|
-
id: string;
|
|
371
|
-
}>(resourceType: string, rows: readonly TRow[], tx?: Orm): ServerResultAsync<Array<TRow & {
|
|
372
|
-
tags: TagSchema[];
|
|
373
|
-
}>>;
|
|
374
|
-
listTaggings(input: {
|
|
375
|
-
resourceType: string;
|
|
376
|
-
resourceIds?: readonly string[];
|
|
377
|
-
}, tx?: Orm): ServerResultAsync<TaggingSchema[]>;
|
|
378
|
-
list(input: (TagListInputSchema & TagListSchema) | undefined, tx?: Orm): ServerResultAsync<{
|
|
379
|
-
rows: TagSchema[];
|
|
380
|
-
total: number;
|
|
381
|
-
}>;
|
|
382
|
-
}
|
|
383
|
-
export {};
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TagRepository = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const drizzle_orm_1 = require("drizzle-orm");
|
|
6
|
-
const neverthrow_1 = require("neverthrow");
|
|
7
|
-
const base_repository_1 = require("../base/base.repository");
|
|
8
|
-
const tag = tslib_1.__importStar(require("./tag.db"));
|
|
9
|
-
const schema = { ...tag };
|
|
10
|
-
class TagRepository extends base_repository_1.BaseTableRepository {
|
|
11
|
-
async link({ userId, ...data }, tx) {
|
|
12
|
-
return this.throwableAsync(async () => {
|
|
13
|
-
const db = tx ?? this.orm;
|
|
14
|
-
const [foundTag] = await db
|
|
15
|
-
.select({ id: this.schema.tags.id })
|
|
16
|
-
.from(this.schema.tags)
|
|
17
|
-
.where((0, drizzle_orm_1.and)((0, drizzle_orm_1.eq)(this.schema.tags.id, data.tagId), (0, drizzle_orm_1.eq)(this.schema.tags.userId, userId)))
|
|
18
|
-
.limit(1);
|
|
19
|
-
if (!foundTag)
|
|
20
|
-
return this.error("FORBIDDEN");
|
|
21
|
-
const [tagging] = await db
|
|
22
|
-
.insert(this.schema.taggings)
|
|
23
|
-
.values({ ...data, tagId: foundTag.id })
|
|
24
|
-
.returning();
|
|
25
|
-
if (!tagging)
|
|
26
|
-
return this.error("NOT_FOUND");
|
|
27
|
-
return (0, neverthrow_1.ok)(tagging);
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
async linkBulk(data, tx) {
|
|
31
|
-
return this.throwableAsync(async () => {
|
|
32
|
-
const db = tx ?? this.orm;
|
|
33
|
-
await db.insert(this.schema.taggings).values(data);
|
|
34
|
-
const tags = await db
|
|
35
|
-
.select()
|
|
36
|
-
.from(this.schema.tags)
|
|
37
|
-
.where((0, drizzle_orm_1.inArray)(this.schema.tags.id, data.map((tag) => tag.tagId)));
|
|
38
|
-
return (0, neverthrow_1.ok)(tags);
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
async set(data, tx) {
|
|
42
|
-
return this.throwableAsync(async () => {
|
|
43
|
-
const db = tx ?? this.orm;
|
|
44
|
-
const result = await db.transaction(async (trx) => {
|
|
45
|
-
// FIXME: We are assuming that all resourceIds are the same, this is not a good assumption.
|
|
46
|
-
await trx
|
|
47
|
-
.delete(this.schema.taggings)
|
|
48
|
-
.where((0, drizzle_orm_1.eq)(this.schema.taggings.resourceId, data[0].resourceId));
|
|
49
|
-
await db.insert(this.schema.taggings).values(data);
|
|
50
|
-
const tags = await db
|
|
51
|
-
.select()
|
|
52
|
-
.from(this.schema.tags)
|
|
53
|
-
.where((0, drizzle_orm_1.inArray)(this.schema.tags.id, data.map((tag) => tag.tagId)));
|
|
54
|
-
return tags;
|
|
55
|
-
});
|
|
56
|
-
return (0, neverthrow_1.ok)(result);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
async unlink({ userId, ...data }, tx) {
|
|
60
|
-
return this.throwableAsync(async () => {
|
|
61
|
-
const db = tx ?? this.orm;
|
|
62
|
-
const [foundTag] = await db
|
|
63
|
-
.select()
|
|
64
|
-
.from(this.schema.tags)
|
|
65
|
-
.where((0, drizzle_orm_1.and)((0, drizzle_orm_1.eq)(this.schema.tags.id, data.tagId), (0, drizzle_orm_1.eq)(this.schema.tags.userId, userId)))
|
|
66
|
-
.limit(1);
|
|
67
|
-
if (!foundTag)
|
|
68
|
-
return this.error("FORBIDDEN");
|
|
69
|
-
await db
|
|
70
|
-
.delete(this.schema.taggings)
|
|
71
|
-
.where((0, drizzle_orm_1.and)((0, drizzle_orm_1.eq)(this.schema.taggings.tagId, data.tagId), (0, drizzle_orm_1.eq)(this.schema.taggings.resourceId, data.resourceId), (0, drizzle_orm_1.eq)(this.schema.taggings.resourceType, data.resourceType)));
|
|
72
|
-
return (0, neverthrow_1.ok)(foundTag);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
async findTagsForResources(data, tx) {
|
|
76
|
-
return this.throwableAsync(async () => {
|
|
77
|
-
const db = tx ?? this.orm;
|
|
78
|
-
if (data.resourceIds.length === 0)
|
|
79
|
-
return (0, neverthrow_1.ok)({});
|
|
80
|
-
const taggings = await db
|
|
81
|
-
.select({
|
|
82
|
-
resourceId: this.schema.taggings.resourceId,
|
|
83
|
-
tagId: this.schema.taggings.tagId,
|
|
84
|
-
})
|
|
85
|
-
.from(this.schema.taggings)
|
|
86
|
-
.where((0, drizzle_orm_1.and)((0, drizzle_orm_1.eq)(this.schema.taggings.resourceType, data.resourceType), (0, drizzle_orm_1.inArray)(this.schema.taggings.resourceId, data.resourceIds)));
|
|
87
|
-
if (taggings.length === 0)
|
|
88
|
-
return (0, neverthrow_1.ok)({});
|
|
89
|
-
const tagIds = Array.from(new Set(taggings.map((tagging) => tagging.tagId)));
|
|
90
|
-
const tags = await db
|
|
91
|
-
.select()
|
|
92
|
-
.from(this.schema.tags)
|
|
93
|
-
.where((0, drizzle_orm_1.inArray)(this.schema.tags.id, tagIds));
|
|
94
|
-
const tagById = tags.reduce((acc, tagRow) => {
|
|
95
|
-
acc[tagRow.id] = tagRow;
|
|
96
|
-
return acc;
|
|
97
|
-
}, {});
|
|
98
|
-
const grouped = taggings.reduce((acc, tagging) => {
|
|
99
|
-
const tagRow = tagById[tagging.tagId];
|
|
100
|
-
if (!tagRow)
|
|
101
|
-
return acc;
|
|
102
|
-
const existing = acc[tagging.resourceId] ?? [];
|
|
103
|
-
acc[tagging.resourceId] = [...existing, tagRow];
|
|
104
|
-
return acc;
|
|
105
|
-
}, {});
|
|
106
|
-
return (0, neverthrow_1.ok)(grouped);
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
async attachTagsToResources(resourceType, rows, tx) {
|
|
110
|
-
return this.throwableAsync(async () => {
|
|
111
|
-
if (rows.length === 0)
|
|
112
|
-
return (0, neverthrow_1.ok)([]);
|
|
113
|
-
const tagsResult = await this.findTagsForResources({ resourceType, resourceIds: rows.map((row) => row.id) }, tx);
|
|
114
|
-
if (tagsResult.isErr())
|
|
115
|
-
return (0, neverthrow_1.err)(tagsResult.error);
|
|
116
|
-
const tagsByResource = tagsResult.value;
|
|
117
|
-
const withTags = rows.map((row) => ({
|
|
118
|
-
...row,
|
|
119
|
-
tags: tagsByResource[row.id] ?? [],
|
|
120
|
-
}));
|
|
121
|
-
return (0, neverthrow_1.ok)(withTags);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
async listTaggings(input, tx) {
|
|
125
|
-
const db = tx ?? this.orm;
|
|
126
|
-
const filters = [(0, drizzle_orm_1.eq)(this.schema.taggings.resourceType, input.resourceType)];
|
|
127
|
-
if (input.resourceIds?.length) {
|
|
128
|
-
filters.push((0, drizzle_orm_1.inArray)(this.schema.taggings.resourceId, input.resourceIds));
|
|
129
|
-
}
|
|
130
|
-
const rows = await this.throwableQuery(() => db
|
|
131
|
-
.select()
|
|
132
|
-
.from(this.schema.taggings)
|
|
133
|
-
.where((0, drizzle_orm_1.and)(...filters)));
|
|
134
|
-
if (rows.isErr())
|
|
135
|
-
return (0, neverthrow_1.err)(rows.error);
|
|
136
|
-
return (0, neverthrow_1.ok)(rows.value);
|
|
137
|
-
}
|
|
138
|
-
async list(input, tx) {
|
|
139
|
-
const db = tx ?? this.orm;
|
|
140
|
-
const conditions = this.getConditionBuilder(this.table);
|
|
141
|
-
conditions.push((0, drizzle_orm_1.isNull)(this.table.deletedAt));
|
|
142
|
-
conditions.applyFilters(input);
|
|
143
|
-
if (input?.assignableTo) {
|
|
144
|
-
conditions.push(this.helpers.arrayContains(this.table.assignableTo, [input.assignableTo]));
|
|
145
|
-
}
|
|
146
|
-
const whereClause = conditions.join();
|
|
147
|
-
const rowsQuery = this.withSortingAndPagination(db.select().from(this.table).where(whereClause), input || {});
|
|
148
|
-
const countQuery = db.select({ count: (0, drizzle_orm_1.count)() }).from(this.table).where(whereClause);
|
|
149
|
-
const countResult = await this.throwableQuery(() => Promise.all([rowsQuery, countQuery]));
|
|
150
|
-
if (countResult.isErr())
|
|
151
|
-
return (0, neverthrow_1.err)(countResult.error);
|
|
152
|
-
const [rows, [totalResult]] = countResult.value;
|
|
153
|
-
return (0, neverthrow_1.ok)({ rows, total: totalResult?.count ?? 0 });
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
exports.TagRepository = TagRepository;
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import type { TagDeleteSchema, TagLinkSchema, TagListInputSchema, TagListOutputSchema, TagListSchema, TagSchema } from "@m5kdev/commons/modules/tag/tag.schema";
|
|
2
|
-
import type { ServerResultAsync } from "../base/base.dto";
|
|
3
|
-
import { BaseService } from "../base/base.service";
|
|
4
|
-
import type { TagRepository } from "./tag.repository";
|
|
5
|
-
export declare class TagService extends BaseService<{
|
|
6
|
-
tag: TagRepository;
|
|
7
|
-
}, Record<string, never>> {
|
|
8
|
-
list(input: TagListInputSchema & TagListSchema): ServerResultAsync<TagListOutputSchema>;
|
|
9
|
-
listTaggings(input: {
|
|
10
|
-
resourceType: string;
|
|
11
|
-
resourceIds?: readonly string[];
|
|
12
|
-
}): Promise<import("../base/base.dto").ServerResult<{
|
|
13
|
-
id: string;
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
tagId: string;
|
|
16
|
-
resourceType: string;
|
|
17
|
-
resourceId: string;
|
|
18
|
-
}[]>>;
|
|
19
|
-
readonly create: import("../base/base.procedure").ServiceProcedure<{
|
|
20
|
-
name: string;
|
|
21
|
-
color: string;
|
|
22
|
-
assignableTo: string[];
|
|
23
|
-
organizationId?: string | undefined;
|
|
24
|
-
teamId?: string | undefined;
|
|
25
|
-
resourceType?: string | undefined;
|
|
26
|
-
resourceId?: string | undefined;
|
|
27
|
-
}, {
|
|
28
|
-
user?: import("../auth/auth.lib").User | null;
|
|
29
|
-
session?: import("../auth/auth.lib").Session | null;
|
|
30
|
-
} & Record<string, unknown> & import("../auth/auth.lib").Context, {
|
|
31
|
-
id: string;
|
|
32
|
-
createdAt: Date;
|
|
33
|
-
updatedAt: Date | null;
|
|
34
|
-
deletedAt: Date | null;
|
|
35
|
-
userId: string;
|
|
36
|
-
organizationId: string | null;
|
|
37
|
-
teamId: string | null;
|
|
38
|
-
name: string;
|
|
39
|
-
color: string | null;
|
|
40
|
-
type: string | null;
|
|
41
|
-
isEnabled: boolean;
|
|
42
|
-
parentId: string | null;
|
|
43
|
-
assignableTo: string[];
|
|
44
|
-
}>;
|
|
45
|
-
readonly update: import("../base/base.procedure").ServiceProcedure<{
|
|
46
|
-
id: string;
|
|
47
|
-
name?: string | undefined;
|
|
48
|
-
color?: string | undefined;
|
|
49
|
-
assignableTo?: string[] | undefined;
|
|
50
|
-
}, {
|
|
51
|
-
user?: import("../auth/auth.lib").User | null;
|
|
52
|
-
session?: import("../auth/auth.lib").Session | null;
|
|
53
|
-
} & Record<string, unknown> & import("../auth/auth.lib").Context, {
|
|
54
|
-
id: string;
|
|
55
|
-
createdAt: Date;
|
|
56
|
-
updatedAt: Date | null;
|
|
57
|
-
deletedAt: Date | null;
|
|
58
|
-
userId: string;
|
|
59
|
-
organizationId: string | null;
|
|
60
|
-
teamId: string | null;
|
|
61
|
-
name: string;
|
|
62
|
-
color: string | null;
|
|
63
|
-
type: string | null;
|
|
64
|
-
isEnabled: boolean;
|
|
65
|
-
parentId: string | null;
|
|
66
|
-
assignableTo: string[];
|
|
67
|
-
}>;
|
|
68
|
-
readonly link: import("../base/base.procedure").ServiceProcedure<{
|
|
69
|
-
tagId: string;
|
|
70
|
-
resourceType: string;
|
|
71
|
-
resourceId: string;
|
|
72
|
-
}, {
|
|
73
|
-
user?: import("../auth/auth.lib").User | null;
|
|
74
|
-
session?: import("../auth/auth.lib").Session | null;
|
|
75
|
-
} & Record<string, unknown> & import("../auth/auth.lib").Context, {
|
|
76
|
-
id: string;
|
|
77
|
-
createdAt: Date;
|
|
78
|
-
tagId: string;
|
|
79
|
-
resourceType: string;
|
|
80
|
-
resourceId: string;
|
|
81
|
-
}>;
|
|
82
|
-
linkBulk(data: TagLinkSchema[]): ServerResultAsync<TagSchema[]>;
|
|
83
|
-
set(data: TagLinkSchema[]): ServerResultAsync<TagSchema[]>;
|
|
84
|
-
readonly unlink: import("../base/base.procedure").ServiceProcedure<{
|
|
85
|
-
tagId: string;
|
|
86
|
-
resourceType: string;
|
|
87
|
-
resourceId: string;
|
|
88
|
-
}, {
|
|
89
|
-
user?: import("../auth/auth.lib").User | null;
|
|
90
|
-
session?: import("../auth/auth.lib").Session | null;
|
|
91
|
-
} & Record<string, unknown> & import("../auth/auth.lib").Context, {
|
|
92
|
-
id: string;
|
|
93
|
-
createdAt: Date;
|
|
94
|
-
updatedAt: Date | null;
|
|
95
|
-
deletedAt: Date | null;
|
|
96
|
-
userId: string;
|
|
97
|
-
organizationId: string | null;
|
|
98
|
-
teamId: string | null;
|
|
99
|
-
name: string;
|
|
100
|
-
color: string | null;
|
|
101
|
-
type: string | null;
|
|
102
|
-
isEnabled: boolean;
|
|
103
|
-
parentId: string | null;
|
|
104
|
-
assignableTo: string[];
|
|
105
|
-
}>;
|
|
106
|
-
delete(data: TagDeleteSchema): ServerResultAsync<{
|
|
107
|
-
id: string;
|
|
108
|
-
}>;
|
|
109
|
-
}
|