@m5kdev/backend 0.7.0 → 0.8.2
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 +129 -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 +48 -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 +87 -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 +215 -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 +120 -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 +173 -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 +68 -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 +65 -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 +344 -0
- package/dist/src/types.mjs +11 -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 +47 -46
- package/dist/src/lib/posthog.d.ts +0 -2
- package/dist/src/lib/posthog.js +0 -7
- package/dist/src/lib/sentry.d.ts +0 -1
- 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.d.ts +0 -1
- 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 -125
- 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 -4869
- 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 -78
- package/dist/src/modules/auth/auth.service.js +0 -259
- 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.actor.d.ts +0 -68
- package/dist/src/modules/base/base.actor.js +0 -99
- package/dist/src/modules/base/base.actor.test.js +0 -58
- 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 -24
- package/dist/src/modules/base/base.grants.js +0 -135
- package/dist/src/modules/base/base.grants.test.js +0 -639
- package/dist/src/modules/base/base.procedure.d.ts +0 -109
- package/dist/src/modules/base/base.procedure.js +0 -301
- 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 -40
- package/dist/src/modules/base/base.service.js +0 -123
- package/dist/src/modules/base/base.service.test.js +0 -443
- 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 -38
- 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 -15
- 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 -96
- package/dist/src/modules/connect/connect.service.js +0 -116
- 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 -80
- package/dist/src/modules/recurrence/recurrence.service.js +0 -72
- 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 -27
- 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 -113
- 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 -61
- 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 -48
- package/dist/src/utils/trpc.js +0 -158
- package/dist/src/utils/trpc.test.js +0 -154
- 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/{utils/trpc.test.d.ts → modules/ai/ai.router.mjs} +0 -0
- /package/dist/src/modules/{social/social.linkedin.test.d.ts → base/base.types.mjs} +0 -0
- /package/dist/src/modules/{base/base.service.test.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.actor.test.d.ts → workflow/workflow.types.mjs} +0 -0
- /package/dist/src/{modules/ai/ai.router.d.ts → utils/types.mjs} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BaseService } from "../base/base.service.mjs";
|
|
2
|
+
//#region src/modules/clay/clay.service.ts
|
|
3
|
+
var ClayService = class extends BaseService {
|
|
4
|
+
tables;
|
|
5
|
+
constructor(repositories, services, tables) {
|
|
6
|
+
super(repositories, services);
|
|
7
|
+
this.tables = tables;
|
|
8
|
+
}
|
|
9
|
+
async waitForResponse(webhookUrl, row, timeoutInSeconds) {
|
|
10
|
+
return await this.service.webhook.waitForRequest((url) => {
|
|
11
|
+
return this.repository.clay.sendToWebhook(webhookUrl, row, url);
|
|
12
|
+
}, timeoutInSeconds);
|
|
13
|
+
}
|
|
14
|
+
async sendToTable(table, row, timeoutInSeconds) {
|
|
15
|
+
const tableData = this.tables[table];
|
|
16
|
+
if (!tableData) return this.error("NOT_FOUND", `Table ${table} not found`);
|
|
17
|
+
return await this.waitForResponse(tableData.webhookUrl, row, tableData.timeoutInSeconds || timeoutInSeconds);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ClayService };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=clay.service.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"clay.service.mjs","names":[],"sources":["../../../../src/modules/clay/clay.service.ts"],"sourcesContent":["import type { z } from \"zod\";\r\nimport type { ServerResultAsync } from \"../base/base.dto\";\r\nimport { BaseService } from \"../base/base.service\";\r\nimport type { WebhookService } from \"../webhook/webhook.service\";\r\nimport type { ClayRepository } from \"./clay.repository\";\r\n\r\ntype ClayTable = {\r\n name?: string;\r\n tableId?: string;\r\n viewId?: string;\r\n webhookUrl: string;\r\n schema?: z.ZodAny;\r\n timeoutInSeconds?: number;\r\n};\r\n\r\nexport class ClayService<K extends string> extends BaseService<\r\n { clay: ClayRepository },\r\n { webhook: WebhookService }\r\n> {\r\n private tables: Record<K, ClayTable>;\r\n constructor(\r\n repositories: { clay: ClayRepository },\r\n services: { webhook: WebhookService },\r\n tables: Record<K, ClayTable>\r\n ) {\r\n super(repositories, services);\r\n this.tables = tables;\r\n }\r\n\r\n async waitForResponse<T>(\r\n webhookUrl: string,\r\n row: Record<string, unknown>,\r\n timeoutInSeconds?: number\r\n ): ServerResultAsync<T> {\r\n return await this.service.webhook.waitForRequest<T>((url) => {\r\n return this.repository.clay.sendToWebhook(webhookUrl, row, url);\r\n }, timeoutInSeconds);\r\n }\r\n\r\n async sendToTable(\r\n table: K,\r\n row: Record<string, unknown>,\r\n timeoutInSeconds?: number\r\n ): ServerResultAsync<\r\n z.infer<\r\n (typeof this.tables)[K][\"schema\"] extends z.ZodAny\r\n ? z.infer<(typeof this.tables)[K][\"schema\"]>\r\n : unknown\r\n >\r\n > {\r\n const tableData = this.tables[table];\r\n if (!tableData) return this.error(\"NOT_FOUND\", `Table ${table} not found`);\r\n const response = await this.waitForResponse<z.infer<typeof tableData.schema>>(\r\n tableData.webhookUrl,\r\n row,\r\n tableData.timeoutInSeconds || timeoutInSeconds\r\n );\r\n\r\n return response;\r\n }\r\n}\r\n"],"mappings":";;AAeA,IAAa,cAAb,cAAmD,YAGjD;CACA;CACA,YACE,cACA,UACA,QACA;AACA,QAAM,cAAc,SAAS;AAC7B,OAAK,SAAS;;CAGhB,MAAM,gBACJ,YACA,KACA,kBACsB;AACtB,SAAO,MAAM,KAAK,QAAQ,QAAQ,gBAAmB,QAAQ;AAC3D,UAAO,KAAK,WAAW,KAAK,cAAc,YAAY,KAAK,IAAI;KAC9D,iBAAiB;;CAGtB,MAAM,YACJ,OACA,KACA,kBAOA;EACA,MAAM,YAAY,KAAK,OAAO;AAC9B,MAAI,CAAC,UAAW,QAAO,KAAK,MAAM,aAAa,SAAS,MAAM,YAAY;AAO1E,SANiB,MAAM,KAAK,gBAC1B,UAAU,YACV,KACA,UAAU,oBAAoB,iBAC/B"}
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/connect/connect.db.d.ts
|
|
4
|
+
declare const connect: _$drizzle_orm_sqlite_core0.SQLiteTableWithColumns<{
|
|
5
|
+
name: "connect";
|
|
6
|
+
schema: undefined;
|
|
7
|
+
columns: {
|
|
8
|
+
id: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
9
|
+
name: "id";
|
|
10
|
+
tableName: "connect";
|
|
11
|
+
dataType: "string";
|
|
12
|
+
columnType: "SQLiteText";
|
|
13
|
+
data: string;
|
|
14
|
+
driverParam: string;
|
|
15
|
+
notNull: true;
|
|
16
|
+
hasDefault: true;
|
|
17
|
+
isPrimaryKey: true;
|
|
18
|
+
isAutoincrement: false;
|
|
19
|
+
hasRuntimeDefault: true;
|
|
20
|
+
enumValues: [string, ...string[]];
|
|
21
|
+
baseColumn: never;
|
|
22
|
+
identity: undefined;
|
|
23
|
+
generated: undefined;
|
|
24
|
+
}, {}, {
|
|
25
|
+
length: number | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
userId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
28
|
+
name: "user_id";
|
|
29
|
+
tableName: "connect";
|
|
30
|
+
dataType: "string";
|
|
31
|
+
columnType: "SQLiteText";
|
|
32
|
+
data: string;
|
|
33
|
+
driverParam: string;
|
|
34
|
+
notNull: true;
|
|
35
|
+
hasDefault: false;
|
|
36
|
+
isPrimaryKey: false;
|
|
37
|
+
isAutoincrement: false;
|
|
38
|
+
hasRuntimeDefault: false;
|
|
39
|
+
enumValues: [string, ...string[]];
|
|
40
|
+
baseColumn: never;
|
|
41
|
+
identity: undefined;
|
|
42
|
+
generated: undefined;
|
|
43
|
+
}, {}, {
|
|
44
|
+
length: number | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
provider: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
47
|
+
name: "provider";
|
|
48
|
+
tableName: "connect";
|
|
49
|
+
dataType: "string";
|
|
50
|
+
columnType: "SQLiteText";
|
|
51
|
+
data: string;
|
|
52
|
+
driverParam: string;
|
|
53
|
+
notNull: true;
|
|
54
|
+
hasDefault: false;
|
|
55
|
+
isPrimaryKey: false;
|
|
56
|
+
isAutoincrement: false;
|
|
57
|
+
hasRuntimeDefault: false;
|
|
58
|
+
enumValues: [string, ...string[]];
|
|
59
|
+
baseColumn: never;
|
|
60
|
+
identity: undefined;
|
|
61
|
+
generated: undefined;
|
|
62
|
+
}, {}, {
|
|
63
|
+
length: number | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
accountType: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
66
|
+
name: "account_type";
|
|
67
|
+
tableName: "connect";
|
|
68
|
+
dataType: "string";
|
|
69
|
+
columnType: "SQLiteText";
|
|
70
|
+
data: string;
|
|
71
|
+
driverParam: string;
|
|
72
|
+
notNull: true;
|
|
73
|
+
hasDefault: false;
|
|
74
|
+
isPrimaryKey: false;
|
|
75
|
+
isAutoincrement: false;
|
|
76
|
+
hasRuntimeDefault: false;
|
|
77
|
+
enumValues: [string, ...string[]];
|
|
78
|
+
baseColumn: never;
|
|
79
|
+
identity: undefined;
|
|
80
|
+
generated: undefined;
|
|
81
|
+
}, {}, {
|
|
82
|
+
length: number | undefined;
|
|
83
|
+
}>;
|
|
84
|
+
providerAccountId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
85
|
+
name: "provider_account_id";
|
|
86
|
+
tableName: "connect";
|
|
87
|
+
dataType: "string";
|
|
88
|
+
columnType: "SQLiteText";
|
|
89
|
+
data: string;
|
|
90
|
+
driverParam: string;
|
|
91
|
+
notNull: true;
|
|
92
|
+
hasDefault: false;
|
|
93
|
+
isPrimaryKey: false;
|
|
94
|
+
isAutoincrement: false;
|
|
95
|
+
hasRuntimeDefault: false;
|
|
96
|
+
enumValues: [string, ...string[]];
|
|
97
|
+
baseColumn: never;
|
|
98
|
+
identity: undefined;
|
|
99
|
+
generated: undefined;
|
|
100
|
+
}, {}, {
|
|
101
|
+
length: number | undefined;
|
|
102
|
+
}>;
|
|
103
|
+
handle: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
104
|
+
name: "handle";
|
|
105
|
+
tableName: "connect";
|
|
106
|
+
dataType: "string";
|
|
107
|
+
columnType: "SQLiteText";
|
|
108
|
+
data: string;
|
|
109
|
+
driverParam: string;
|
|
110
|
+
notNull: false;
|
|
111
|
+
hasDefault: false;
|
|
112
|
+
isPrimaryKey: false;
|
|
113
|
+
isAutoincrement: false;
|
|
114
|
+
hasRuntimeDefault: false;
|
|
115
|
+
enumValues: [string, ...string[]];
|
|
116
|
+
baseColumn: never;
|
|
117
|
+
identity: undefined;
|
|
118
|
+
generated: undefined;
|
|
119
|
+
}, {}, {
|
|
120
|
+
length: number | undefined;
|
|
121
|
+
}>;
|
|
122
|
+
displayName: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
123
|
+
name: "display_name";
|
|
124
|
+
tableName: "connect";
|
|
125
|
+
dataType: "string";
|
|
126
|
+
columnType: "SQLiteText";
|
|
127
|
+
data: string;
|
|
128
|
+
driverParam: string;
|
|
129
|
+
notNull: false;
|
|
130
|
+
hasDefault: false;
|
|
131
|
+
isPrimaryKey: false;
|
|
132
|
+
isAutoincrement: false;
|
|
133
|
+
hasRuntimeDefault: false;
|
|
134
|
+
enumValues: [string, ...string[]];
|
|
135
|
+
baseColumn: never;
|
|
136
|
+
identity: undefined;
|
|
137
|
+
generated: undefined;
|
|
138
|
+
}, {}, {
|
|
139
|
+
length: number | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
avatarUrl: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
142
|
+
name: "avatar_url";
|
|
143
|
+
tableName: "connect";
|
|
144
|
+
dataType: "string";
|
|
145
|
+
columnType: "SQLiteText";
|
|
146
|
+
data: string;
|
|
147
|
+
driverParam: string;
|
|
148
|
+
notNull: false;
|
|
149
|
+
hasDefault: false;
|
|
150
|
+
isPrimaryKey: false;
|
|
151
|
+
isAutoincrement: false;
|
|
152
|
+
hasRuntimeDefault: false;
|
|
153
|
+
enumValues: [string, ...string[]];
|
|
154
|
+
baseColumn: never;
|
|
155
|
+
identity: undefined;
|
|
156
|
+
generated: undefined;
|
|
157
|
+
}, {}, {
|
|
158
|
+
length: number | undefined;
|
|
159
|
+
}>;
|
|
160
|
+
accessToken: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
161
|
+
name: "access_token";
|
|
162
|
+
tableName: "connect";
|
|
163
|
+
dataType: "string";
|
|
164
|
+
columnType: "SQLiteText";
|
|
165
|
+
data: string;
|
|
166
|
+
driverParam: string;
|
|
167
|
+
notNull: true;
|
|
168
|
+
hasDefault: false;
|
|
169
|
+
isPrimaryKey: false;
|
|
170
|
+
isAutoincrement: false;
|
|
171
|
+
hasRuntimeDefault: false;
|
|
172
|
+
enumValues: [string, ...string[]];
|
|
173
|
+
baseColumn: never;
|
|
174
|
+
identity: undefined;
|
|
175
|
+
generated: undefined;
|
|
176
|
+
}, {}, {
|
|
177
|
+
length: number | undefined;
|
|
178
|
+
}>;
|
|
179
|
+
refreshToken: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
180
|
+
name: "refresh_token";
|
|
181
|
+
tableName: "connect";
|
|
182
|
+
dataType: "string";
|
|
183
|
+
columnType: "SQLiteText";
|
|
184
|
+
data: string;
|
|
185
|
+
driverParam: string;
|
|
186
|
+
notNull: false;
|
|
187
|
+
hasDefault: false;
|
|
188
|
+
isPrimaryKey: false;
|
|
189
|
+
isAutoincrement: false;
|
|
190
|
+
hasRuntimeDefault: false;
|
|
191
|
+
enumValues: [string, ...string[]];
|
|
192
|
+
baseColumn: never;
|
|
193
|
+
identity: undefined;
|
|
194
|
+
generated: undefined;
|
|
195
|
+
}, {}, {
|
|
196
|
+
length: number | undefined;
|
|
197
|
+
}>;
|
|
198
|
+
tokenType: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
199
|
+
name: "token_type";
|
|
200
|
+
tableName: "connect";
|
|
201
|
+
dataType: "string";
|
|
202
|
+
columnType: "SQLiteText";
|
|
203
|
+
data: string;
|
|
204
|
+
driverParam: string;
|
|
205
|
+
notNull: false;
|
|
206
|
+
hasDefault: false;
|
|
207
|
+
isPrimaryKey: false;
|
|
208
|
+
isAutoincrement: false;
|
|
209
|
+
hasRuntimeDefault: false;
|
|
210
|
+
enumValues: [string, ...string[]];
|
|
211
|
+
baseColumn: never;
|
|
212
|
+
identity: undefined;
|
|
213
|
+
generated: undefined;
|
|
214
|
+
}, {}, {
|
|
215
|
+
length: number | undefined;
|
|
216
|
+
}>;
|
|
217
|
+
scope: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
218
|
+
name: "scope";
|
|
219
|
+
tableName: "connect";
|
|
220
|
+
dataType: "string";
|
|
221
|
+
columnType: "SQLiteText";
|
|
222
|
+
data: string;
|
|
223
|
+
driverParam: string;
|
|
224
|
+
notNull: false;
|
|
225
|
+
hasDefault: false;
|
|
226
|
+
isPrimaryKey: false;
|
|
227
|
+
isAutoincrement: false;
|
|
228
|
+
hasRuntimeDefault: false;
|
|
229
|
+
enumValues: [string, ...string[]];
|
|
230
|
+
baseColumn: never;
|
|
231
|
+
identity: undefined;
|
|
232
|
+
generated: undefined;
|
|
233
|
+
}, {}, {
|
|
234
|
+
length: number | undefined;
|
|
235
|
+
}>;
|
|
236
|
+
expiresAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
237
|
+
name: "expires_at";
|
|
238
|
+
tableName: "connect";
|
|
239
|
+
dataType: "date";
|
|
240
|
+
columnType: "SQLiteTimestamp";
|
|
241
|
+
data: Date;
|
|
242
|
+
driverParam: number;
|
|
243
|
+
notNull: false;
|
|
244
|
+
hasDefault: false;
|
|
245
|
+
isPrimaryKey: false;
|
|
246
|
+
isAutoincrement: false;
|
|
247
|
+
hasRuntimeDefault: false;
|
|
248
|
+
enumValues: undefined;
|
|
249
|
+
baseColumn: never;
|
|
250
|
+
identity: undefined;
|
|
251
|
+
generated: undefined;
|
|
252
|
+
}, {}, {}>;
|
|
253
|
+
parentId: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
254
|
+
name: "parent_id";
|
|
255
|
+
tableName: "connect";
|
|
256
|
+
dataType: "string";
|
|
257
|
+
columnType: "SQLiteText";
|
|
258
|
+
data: string;
|
|
259
|
+
driverParam: string;
|
|
260
|
+
notNull: false;
|
|
261
|
+
hasDefault: false;
|
|
262
|
+
isPrimaryKey: false;
|
|
263
|
+
isAutoincrement: false;
|
|
264
|
+
hasRuntimeDefault: false;
|
|
265
|
+
enumValues: [string, ...string[]];
|
|
266
|
+
baseColumn: never;
|
|
267
|
+
identity: undefined;
|
|
268
|
+
generated: undefined;
|
|
269
|
+
}, {}, {
|
|
270
|
+
length: number | undefined;
|
|
271
|
+
}>;
|
|
272
|
+
metadataJson: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
273
|
+
name: "metadata_json";
|
|
274
|
+
tableName: "connect";
|
|
275
|
+
dataType: "json";
|
|
276
|
+
columnType: "SQLiteTextJson";
|
|
277
|
+
data: unknown;
|
|
278
|
+
driverParam: string;
|
|
279
|
+
notNull: false;
|
|
280
|
+
hasDefault: false;
|
|
281
|
+
isPrimaryKey: false;
|
|
282
|
+
isAutoincrement: false;
|
|
283
|
+
hasRuntimeDefault: false;
|
|
284
|
+
enumValues: undefined;
|
|
285
|
+
baseColumn: never;
|
|
286
|
+
identity: undefined;
|
|
287
|
+
generated: undefined;
|
|
288
|
+
}, {}, {}>;
|
|
289
|
+
revokedAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
290
|
+
name: "revoked_at";
|
|
291
|
+
tableName: "connect";
|
|
292
|
+
dataType: "date";
|
|
293
|
+
columnType: "SQLiteTimestamp";
|
|
294
|
+
data: Date;
|
|
295
|
+
driverParam: number;
|
|
296
|
+
notNull: false;
|
|
297
|
+
hasDefault: false;
|
|
298
|
+
isPrimaryKey: false;
|
|
299
|
+
isAutoincrement: false;
|
|
300
|
+
hasRuntimeDefault: false;
|
|
301
|
+
enumValues: undefined;
|
|
302
|
+
baseColumn: never;
|
|
303
|
+
identity: undefined;
|
|
304
|
+
generated: undefined;
|
|
305
|
+
}, {}, {}>;
|
|
306
|
+
lastRefreshedAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
307
|
+
name: "last_refreshed_at";
|
|
308
|
+
tableName: "connect";
|
|
309
|
+
dataType: "date";
|
|
310
|
+
columnType: "SQLiteTimestamp";
|
|
311
|
+
data: Date;
|
|
312
|
+
driverParam: number;
|
|
313
|
+
notNull: false;
|
|
314
|
+
hasDefault: false;
|
|
315
|
+
isPrimaryKey: false;
|
|
316
|
+
isAutoincrement: false;
|
|
317
|
+
hasRuntimeDefault: false;
|
|
318
|
+
enumValues: undefined;
|
|
319
|
+
baseColumn: never;
|
|
320
|
+
identity: undefined;
|
|
321
|
+
generated: undefined;
|
|
322
|
+
}, {}, {}>;
|
|
323
|
+
createdAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
324
|
+
name: "created_at";
|
|
325
|
+
tableName: "connect";
|
|
326
|
+
dataType: "date";
|
|
327
|
+
columnType: "SQLiteTimestamp";
|
|
328
|
+
data: Date;
|
|
329
|
+
driverParam: number;
|
|
330
|
+
notNull: true;
|
|
331
|
+
hasDefault: true;
|
|
332
|
+
isPrimaryKey: false;
|
|
333
|
+
isAutoincrement: false;
|
|
334
|
+
hasRuntimeDefault: true;
|
|
335
|
+
enumValues: undefined;
|
|
336
|
+
baseColumn: never;
|
|
337
|
+
identity: undefined;
|
|
338
|
+
generated: undefined;
|
|
339
|
+
}, {}, {}>;
|
|
340
|
+
updatedAt: _$drizzle_orm_sqlite_core0.SQLiteColumn<{
|
|
341
|
+
name: "updated_at";
|
|
342
|
+
tableName: "connect";
|
|
343
|
+
dataType: "date";
|
|
344
|
+
columnType: "SQLiteTimestamp";
|
|
345
|
+
data: Date;
|
|
346
|
+
driverParam: number;
|
|
347
|
+
notNull: false;
|
|
348
|
+
hasDefault: false;
|
|
349
|
+
isPrimaryKey: false;
|
|
350
|
+
isAutoincrement: false;
|
|
351
|
+
hasRuntimeDefault: false;
|
|
352
|
+
enumValues: undefined;
|
|
353
|
+
baseColumn: never;
|
|
354
|
+
identity: undefined;
|
|
355
|
+
generated: undefined;
|
|
356
|
+
}, {}, {}>;
|
|
357
|
+
};
|
|
358
|
+
dialect: "sqlite";
|
|
359
|
+
}>;
|
|
360
|
+
//#endregion
|
|
361
|
+
export { connect };
|
|
362
|
+
//# sourceMappingURL=connect.db.d.mts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { __exportAll } from "../../../_virtual/_rolldown/runtime.mjs";
|
|
2
|
+
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
|
|
3
|
+
import { v4 } from "uuid";
|
|
4
|
+
//#region src/modules/connect/connect.db.ts
|
|
5
|
+
var connect_db_exports = /* @__PURE__ */ __exportAll({ connect: () => connect });
|
|
6
|
+
const connect = sqliteTable("connect", {
|
|
7
|
+
id: text("id").primaryKey().$default(v4),
|
|
8
|
+
userId: text("user_id").notNull(),
|
|
9
|
+
provider: text("provider").notNull(),
|
|
10
|
+
accountType: text("account_type").notNull(),
|
|
11
|
+
providerAccountId: text("provider_account_id").notNull(),
|
|
12
|
+
handle: text("handle"),
|
|
13
|
+
displayName: text("display_name"),
|
|
14
|
+
avatarUrl: text("avatar_url"),
|
|
15
|
+
accessToken: text("access_token").notNull(),
|
|
16
|
+
refreshToken: text("refresh_token"),
|
|
17
|
+
tokenType: text("token_type"),
|
|
18
|
+
scope: text("scope"),
|
|
19
|
+
expiresAt: integer("expires_at", { mode: "timestamp" }),
|
|
20
|
+
parentId: text("parent_id"),
|
|
21
|
+
metadataJson: text("metadata_json", { mode: "json" }),
|
|
22
|
+
revokedAt: integer("revoked_at", { mode: "timestamp" }),
|
|
23
|
+
lastRefreshedAt: integer("last_refreshed_at", { mode: "timestamp" }),
|
|
24
|
+
createdAt: integer("created_at", { mode: "timestamp" }).notNull().$default(() => /* @__PURE__ */ new Date()),
|
|
25
|
+
updatedAt: integer("updated_at", { mode: "timestamp" })
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { connect, connect_db_exports };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=connect.db.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.db.mjs","names":["uuidv4"],"sources":["../../../../src/modules/connect/connect.db.ts"],"sourcesContent":["import { integer, sqliteTable, text } from \"drizzle-orm/sqlite-core\";\r\nimport { v4 as uuidv4 } from \"uuid\";\r\n\r\nexport const connect = sqliteTable(\"connect\", {\r\n id: text(\"id\").primaryKey().$default(uuidv4),\r\n userId: text(\"user_id\").notNull(), // FK -> users.id\r\n\r\n provider: text(\"provider\").notNull(), // e.g. \"linkedin\"\r\n accountType: text(\"account_type\").notNull(), // \"user\" | \"page\" | \"org\" | \"channel\"\r\n providerAccountId: text(\"provider_account_id\").notNull(), // e.g. LinkedIn URN, FB Page ID, IG business acct ID, X user ID\r\n handle: text(\"handle\"), // @name or page slug\r\n displayName: text(\"display_name\"),\r\n avatarUrl: text(\"avatar_url\"),\r\n\r\n // OAuth credentials (ENCRYPTED)\r\n accessToken: text(\"access_token\").notNull(),\r\n refreshToken: text(\"refresh_token\"), // may be null if provider doesn’t issue refresh tokens\r\n tokenType: text(\"token_type\"), // e.g. \"bearer\"\r\n scope: text(\"scope\"), // space- or comma-separated list, for auditing\r\n expiresAt: integer(\"expires_at\", { mode: \"timestamp\" }), // epoch seconds\r\n\r\n // Provider-specific glue\r\n parentId: text(\"parent_id\"), // e.g. FB Page’s connected IG business account, or org URN\r\n metadataJson: text(\"metadata_json\", { mode: \"json\" }), // JSON string for extras (region, perms, etc.)\r\n\r\n revokedAt: integer(\"revoked_at\", { mode: \"timestamp\" }),\r\n lastRefreshedAt: integer(\"last_refreshed_at\", { mode: \"timestamp\" }),\r\n createdAt: integer(\"created_at\", { mode: \"timestamp\" })\r\n .notNull()\r\n .$default(() => new Date()),\r\n updatedAt: integer(\"updated_at\", { mode: \"timestamp\" }),\r\n});\r\n"],"mappings":";;;;;AAGA,MAAa,UAAU,YAAY,WAAW;CAC5C,IAAI,KAAK,KAAK,CAAC,YAAY,CAAC,SAASA,GAAO;CAC5C,QAAQ,KAAK,UAAU,CAAC,SAAS;CAEjC,UAAU,KAAK,WAAW,CAAC,SAAS;CACpC,aAAa,KAAK,eAAe,CAAC,SAAS;CAC3C,mBAAmB,KAAK,sBAAsB,CAAC,SAAS;CACxD,QAAQ,KAAK,SAAS;CACtB,aAAa,KAAK,eAAe;CACjC,WAAW,KAAK,aAAa;CAG7B,aAAa,KAAK,eAAe,CAAC,SAAS;CAC3C,cAAc,KAAK,gBAAgB;CACnC,WAAW,KAAK,aAAa;CAC7B,OAAO,KAAK,QAAQ;CACpB,WAAW,QAAQ,cAAc,EAAE,MAAM,aAAa,CAAC;CAGvD,UAAU,KAAK,YAAY;CAC3B,cAAc,KAAK,iBAAiB,EAAE,MAAM,QAAQ,CAAC;CAErD,WAAW,QAAQ,cAAc,EAAE,MAAM,aAAa,CAAC;CACvD,iBAAiB,QAAQ,qBAAqB,EAAE,MAAM,aAAa,CAAC;CACpE,WAAW,QAAQ,cAAc,EAAE,MAAM,aAAa,CAAC,CACpD,SAAS,CACT,+BAAe,IAAI,MAAM,CAAC;CAC7B,WAAW,QAAQ,cAAc,EAAE,MAAM,aAAa,CAAC;CACxD,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/connect/connect.dto.d.ts
|
|
4
|
+
declare const connectSelectSchema: z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
userId: z.ZodString;
|
|
7
|
+
provider: z.ZodString;
|
|
8
|
+
accountType: z.ZodString;
|
|
9
|
+
providerAccountId: z.ZodString;
|
|
10
|
+
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
accessToken: z.ZodString;
|
|
14
|
+
refreshToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
tokenType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
16
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
18
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
19
|
+
metadataJson: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
20
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
21
|
+
lastRefreshedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
22
|
+
createdAt: z.ZodDate;
|
|
23
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
type ConnectSelectSchema = z.infer<typeof connectSelectSchema>;
|
|
26
|
+
declare const connectSelectOutputSchema: z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
createdAt: z.ZodDate;
|
|
29
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
30
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
31
|
+
userId: z.ZodString;
|
|
32
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
33
|
+
provider: z.ZodString;
|
|
34
|
+
accountType: z.ZodString;
|
|
35
|
+
providerAccountId: z.ZodString;
|
|
36
|
+
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
37
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
38
|
+
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
|
+
tokenType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
40
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
41
|
+
metadataJson: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
42
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
43
|
+
lastRefreshedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
declare const connectListInputSchema: z.ZodObject<{
|
|
46
|
+
providers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
47
|
+
inactive: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
type ConnectListInputSchema = z.infer<typeof connectListInputSchema>;
|
|
50
|
+
declare const connectListOutputSchema: z.ZodArray<z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
createdAt: z.ZodDate;
|
|
53
|
+
updatedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
54
|
+
expiresAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
55
|
+
userId: z.ZodString;
|
|
56
|
+
scope: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
57
|
+
provider: z.ZodString;
|
|
58
|
+
accountType: z.ZodString;
|
|
59
|
+
providerAccountId: z.ZodString;
|
|
60
|
+
handle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
61
|
+
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
|
+
avatarUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
63
|
+
tokenType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
64
|
+
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
metadataJson: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
66
|
+
revokedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
67
|
+
lastRefreshedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
declare const connectDeleteInputSchema: z.ZodObject<{
|
|
70
|
+
id: z.ZodString;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
declare const connectDeleteOutputSchema: z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
type ConnectDeleteInputSchema = z.infer<typeof connectDeleteInputSchema>;
|
|
76
|
+
type ConnectDeleteOutputSchema = z.infer<typeof connectDeleteOutputSchema>;
|
|
77
|
+
//#endregion
|
|
78
|
+
export { ConnectDeleteInputSchema, ConnectDeleteOutputSchema, ConnectListInputSchema, ConnectSelectSchema, connectDeleteInputSchema, connectDeleteOutputSchema, connectListInputSchema, connectListOutputSchema, connectSelectOutputSchema, connectSelectSchema };
|
|
79
|
+
//# sourceMappingURL=connect.dto.d.mts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/modules/connect/connect.dto.ts
|
|
3
|
+
const connectSelectSchema = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
userId: z.string(),
|
|
6
|
+
provider: z.string(),
|
|
7
|
+
accountType: z.string(),
|
|
8
|
+
providerAccountId: z.string(),
|
|
9
|
+
handle: z.string().nullish(),
|
|
10
|
+
displayName: z.string().nullish(),
|
|
11
|
+
avatarUrl: z.string().nullish(),
|
|
12
|
+
accessToken: z.string(),
|
|
13
|
+
refreshToken: z.string().nullish(),
|
|
14
|
+
tokenType: z.string().nullish(),
|
|
15
|
+
scope: z.string().nullish(),
|
|
16
|
+
expiresAt: z.date().nullish(),
|
|
17
|
+
parentId: z.string().nullish(),
|
|
18
|
+
metadataJson: z.unknown().nullish(),
|
|
19
|
+
revokedAt: z.date().nullish(),
|
|
20
|
+
lastRefreshedAt: z.date().nullish(),
|
|
21
|
+
createdAt: z.date(),
|
|
22
|
+
updatedAt: z.date().nullish()
|
|
23
|
+
});
|
|
24
|
+
const connectSelectOutputSchema = connectSelectSchema.omit({
|
|
25
|
+
accessToken: true,
|
|
26
|
+
refreshToken: true
|
|
27
|
+
});
|
|
28
|
+
const connectListInputSchema = z.object({
|
|
29
|
+
providers: z.array(z.string()).optional(),
|
|
30
|
+
inactive: z.boolean().optional()
|
|
31
|
+
});
|
|
32
|
+
const connectListOutputSchema = z.array(connectSelectOutputSchema);
|
|
33
|
+
const connectDeleteInputSchema = z.object({ id: z.string() });
|
|
34
|
+
const connectDeleteOutputSchema = z.object({ id: z.string() });
|
|
35
|
+
//#endregion
|
|
36
|
+
export { connectDeleteInputSchema, connectDeleteOutputSchema, connectListInputSchema, connectListOutputSchema, connectSelectOutputSchema, connectSelectSchema };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=connect.dto.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.dto.mjs","names":[],"sources":["../../../../src/modules/connect/connect.dto.ts"],"sourcesContent":["import { z } from \"zod\";\r\n\r\nexport const connectSelectSchema = z.object({\r\n id: z.string(),\r\n userId: z.string(),\r\n provider: z.string(),\r\n accountType: z.string(),\r\n providerAccountId: z.string(),\r\n handle: z.string().nullish(),\r\n displayName: z.string().nullish(),\r\n avatarUrl: z.string().nullish(),\r\n accessToken: z.string(),\r\n refreshToken: z.string().nullish(),\r\n tokenType: z.string().nullish(),\r\n scope: z.string().nullish(),\r\n expiresAt: z.date().nullish(),\r\n parentId: z.string().nullish(),\r\n metadataJson: z.unknown().nullish(),\r\n revokedAt: z.date().nullish(),\r\n lastRefreshedAt: z.date().nullish(),\r\n createdAt: z.date(),\r\n updatedAt: z.date().nullish(),\r\n});\r\n\r\nexport type ConnectSelectSchema = z.infer<typeof connectSelectSchema>;\r\n\r\nexport const connectSelectOutputSchema = connectSelectSchema.omit({\r\n accessToken: true,\r\n refreshToken: true,\r\n});\r\n\r\nexport const connectListInputSchema = z.object({\r\n providers: z.array(z.string()).optional(),\r\n inactive: z.boolean().optional(),\r\n});\r\n\r\nexport type ConnectListInputSchema = z.infer<typeof connectListInputSchema>;\r\n\r\nexport const connectListOutputSchema = z.array(connectSelectOutputSchema);\r\n\r\nexport const connectDeleteInputSchema = z.object({ id: z.string() });\r\nexport const connectDeleteOutputSchema = z.object({ id: z.string() });\r\nexport type ConnectDeleteInputSchema = z.infer<typeof connectDeleteInputSchema>;\r\nexport type ConnectDeleteOutputSchema = z.infer<typeof connectDeleteOutputSchema>;\r\n"],"mappings":";;AAEA,MAAa,sBAAsB,EAAE,OAAO;CAC1C,IAAI,EAAE,QAAQ;CACd,QAAQ,EAAE,QAAQ;CAClB,UAAU,EAAE,QAAQ;CACpB,aAAa,EAAE,QAAQ;CACvB,mBAAmB,EAAE,QAAQ;CAC7B,QAAQ,EAAE,QAAQ,CAAC,SAAS;CAC5B,aAAa,EAAE,QAAQ,CAAC,SAAS;CACjC,WAAW,EAAE,QAAQ,CAAC,SAAS;CAC/B,aAAa,EAAE,QAAQ;CACvB,cAAc,EAAE,QAAQ,CAAC,SAAS;CAClC,WAAW,EAAE,QAAQ,CAAC,SAAS;CAC/B,OAAO,EAAE,QAAQ,CAAC,SAAS;CAC3B,WAAW,EAAE,MAAM,CAAC,SAAS;CAC7B,UAAU,EAAE,QAAQ,CAAC,SAAS;CAC9B,cAAc,EAAE,SAAS,CAAC,SAAS;CACnC,WAAW,EAAE,MAAM,CAAC,SAAS;CAC7B,iBAAiB,EAAE,MAAM,CAAC,SAAS;CACnC,WAAW,EAAE,MAAM;CACnB,WAAW,EAAE,MAAM,CAAC,SAAS;CAC9B,CAAC;AAIF,MAAa,4BAA4B,oBAAoB,KAAK;CAChE,aAAa;CACb,cAAc;CACf,CAAC;AAEF,MAAa,yBAAyB,EAAE,OAAO;CAC7C,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,UAAU;CACzC,UAAU,EAAE,SAAS,CAAC,UAAU;CACjC,CAAC;AAIF,MAAa,0BAA0B,EAAE,MAAM,0BAA0B;AAEzE,MAAa,2BAA2B,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AACpE,MAAa,4BAA4B,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ConnectProvider } from "./connect.types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/connect/connect.linkedin.d.ts
|
|
4
|
+
declare function createLinkedInProvider(): ConnectProvider;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { createLinkedInProvider };
|
|
7
|
+
//# sourceMappingURL=connect.linkedin.d.mts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/modules/connect/connect.linkedin.ts
|
|
2
|
+
function createLinkedInProvider() {
|
|
3
|
+
const clientId = process.env.LINKEDIN_CLIENT_ID;
|
|
4
|
+
const clientSecret = process.env.LINKEDIN_CLIENT_SECRET;
|
|
5
|
+
const baseUrl = process.env.VITE_SERVER_URL;
|
|
6
|
+
if (!clientId || !clientSecret || !baseUrl) throw new Error("Missing required LinkedIn OAuth environment variables: LINKEDIN_CLIENT_ID, LINKEDIN_CLIENT_SECRET, VITE_SERVER_URL");
|
|
7
|
+
return {
|
|
8
|
+
id: "linkedin",
|
|
9
|
+
clientId,
|
|
10
|
+
clientSecret,
|
|
11
|
+
redirectUri: `${baseUrl}/connect/linkedin/callback`,
|
|
12
|
+
scopes: [
|
|
13
|
+
"openid",
|
|
14
|
+
"profile",
|
|
15
|
+
"w_member_social"
|
|
16
|
+
],
|
|
17
|
+
supportsPKCE: false,
|
|
18
|
+
issuerConfig: {
|
|
19
|
+
issuer: "https://www.linkedin.com",
|
|
20
|
+
authorization_endpoint: "https://www.linkedin.com/oauth/v2/authorization",
|
|
21
|
+
token_endpoint: "https://www.linkedin.com/oauth/v2/accessToken",
|
|
22
|
+
userinfo_endpoint: "https://api.linkedin.com/v2/userinfo"
|
|
23
|
+
},
|
|
24
|
+
async mapProfile(accessToken) {
|
|
25
|
+
const response = await fetch("https://api.linkedin.com/v2/userinfo", { headers: { Authorization: `Bearer ${accessToken}` } });
|
|
26
|
+
if (!response.ok) throw new Error(`LinkedIn API error: ${response.status} ${response.statusText}`);
|
|
27
|
+
const data = await response.json();
|
|
28
|
+
return {
|
|
29
|
+
providerAccountId: data.sub,
|
|
30
|
+
displayName: data.name,
|
|
31
|
+
avatarUrl: data.picture,
|
|
32
|
+
accountType: "user",
|
|
33
|
+
metadata: {
|
|
34
|
+
givenName: data.given_name,
|
|
35
|
+
familyName: data.family_name,
|
|
36
|
+
locale: data.locale,
|
|
37
|
+
email: data.email,
|
|
38
|
+
emailVerified: data.email_verified
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { createLinkedInProvider };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=connect.linkedin.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connect.linkedin.mjs","names":[],"sources":["../../../../src/modules/connect/connect.linkedin.ts"],"sourcesContent":["import type { ConnectProfile, ConnectProvider } from \"./connect.types\";\r\n\r\ninterface LinkedInUserInfoResponse {\r\n sub: string; // Subject identifier (user ID)\r\n name?: string; // Full name\r\n given_name?: string; // First name\r\n family_name?: string; // Last name\r\n picture?: string; // Profile picture URL\r\n locale?: string;\r\n email?: string;\r\n email_verified?: boolean;\r\n}\r\n\r\nexport function createLinkedInProvider(): ConnectProvider {\r\n const clientId = process.env.LINKEDIN_CLIENT_ID;\r\n const clientSecret = process.env.LINKEDIN_CLIENT_SECRET;\r\n const baseUrl = process.env.VITE_SERVER_URL;\r\n\r\n if (!clientId || !clientSecret || !baseUrl) {\r\n throw new Error(\r\n \"Missing required LinkedIn OAuth environment variables: LINKEDIN_CLIENT_ID, LINKEDIN_CLIENT_SECRET, VITE_SERVER_URL\"\r\n );\r\n }\r\n\r\n return {\r\n id: \"linkedin\",\r\n clientId,\r\n clientSecret,\r\n redirectUri: `${baseUrl}/connect/linkedin/callback`,\r\n // LinkedIn OpenID Connect scopes\r\n scopes: [\"openid\", \"profile\", \"w_member_social\"],\r\n // LinkedIn doesn't support PKCE - disable it\r\n supportsPKCE: false,\r\n // LinkedIn OpenID Connect endpoints\r\n issuerConfig: {\r\n issuer: \"https://www.linkedin.com\",\r\n authorization_endpoint: \"https://www.linkedin.com/oauth/v2/authorization\",\r\n token_endpoint: \"https://www.linkedin.com/oauth/v2/accessToken\",\r\n userinfo_endpoint: \"https://api.linkedin.com/v2/userinfo\",\r\n },\r\n async mapProfile(accessToken: string): Promise<ConnectProfile> {\r\n // Use OpenID Connect userinfo endpoint\r\n const response = await fetch(\"https://api.linkedin.com/v2/userinfo\", {\r\n headers: {\r\n Authorization: `Bearer ${accessToken}`,\r\n },\r\n });\r\n\r\n if (!response.ok) {\r\n throw new Error(`LinkedIn API error: ${response.status} ${response.statusText}`);\r\n }\r\n\r\n const data = (await response.json()) as LinkedInUserInfoResponse;\r\n\r\n return {\r\n providerAccountId: data.sub,\r\n displayName: data.name,\r\n avatarUrl: data.picture,\r\n accountType: \"user\",\r\n metadata: {\r\n givenName: data.given_name,\r\n familyName: data.family_name,\r\n locale: data.locale,\r\n email: data.email,\r\n emailVerified: data.email_verified,\r\n },\r\n };\r\n },\r\n };\r\n}\r\n"],"mappings":";AAaA,SAAgB,yBAA0C;CACxD,MAAM,WAAW,QAAQ,IAAI;CAC7B,MAAM,eAAe,QAAQ,IAAI;CACjC,MAAM,UAAU,QAAQ,IAAI;AAE5B,KAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,QACjC,OAAM,IAAI,MACR,qHACD;AAGH,QAAO;EACL,IAAI;EACJ;EACA;EACA,aAAa,GAAG,QAAQ;EAExB,QAAQ;GAAC;GAAU;GAAW;GAAkB;EAEhD,cAAc;EAEd,cAAc;GACZ,QAAQ;GACR,wBAAwB;GACxB,gBAAgB;GAChB,mBAAmB;GACpB;EACD,MAAM,WAAW,aAA8C;GAE7D,MAAM,WAAW,MAAM,MAAM,wCAAwC,EACnE,SAAS,EACP,eAAe,UAAU,eAC1B,EACF,CAAC;AAEF,OAAI,CAAC,SAAS,GACZ,OAAM,IAAI,MAAM,uBAAuB,SAAS,OAAO,GAAG,SAAS,aAAa;GAGlF,MAAM,OAAQ,MAAM,SAAS,MAAM;AAEnC,UAAO;IACL,mBAAmB,KAAK;IACxB,aAAa,KAAK;IAClB,WAAW,KAAK;IAChB,aAAa;IACb,UAAU;KACR,WAAW,KAAK;KAChB,YAAY,KAAK;KACjB,QAAQ,KAAK;KACb,OAAO,KAAK;KACZ,eAAe,KAAK;KACrB;IACF;;EAEJ"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ConnectProvider } from "./connect.types.mjs";
|
|
2
|
+
import * as client from "openid-client";
|
|
3
|
+
|
|
4
|
+
//#region src/modules/connect/connect.oauth.d.ts
|
|
5
|
+
interface OAuthState {
|
|
6
|
+
state: string;
|
|
7
|
+
codeVerifier: string;
|
|
8
|
+
codeChallenge: string;
|
|
9
|
+
sessionId: string;
|
|
10
|
+
provider: string;
|
|
11
|
+
}
|
|
12
|
+
declare function generateOAuthState(sessionId: string, provider: string): Promise<OAuthState>;
|
|
13
|
+
declare function getOAuthState(sessionId: string, provider: string, state: string): OAuthState | null;
|
|
14
|
+
declare function createConfiguration(provider: ConnectProvider): Promise<client.Configuration>;
|
|
15
|
+
declare function buildAuthorizationUrl(provider: ConnectProvider, state: OAuthState): Promise<string>;
|
|
16
|
+
declare function exchangeCodeForTokens(provider: ConnectProvider, code: string, codeVerifier: string, redirectUri: string, state: string): Promise<{
|
|
17
|
+
accessToken: string;
|
|
18
|
+
refreshToken?: string;
|
|
19
|
+
tokenType?: string;
|
|
20
|
+
expiresAt?: Date;
|
|
21
|
+
scope?: string;
|
|
22
|
+
}>;
|
|
23
|
+
declare function refreshAccessToken(provider: ConnectProvider, refreshToken: string): Promise<{
|
|
24
|
+
accessToken: string;
|
|
25
|
+
refreshToken?: string;
|
|
26
|
+
tokenType?: string;
|
|
27
|
+
expiresAt?: Date;
|
|
28
|
+
scope?: string;
|
|
29
|
+
}>;
|
|
30
|
+
//#endregion
|
|
31
|
+
export { OAuthState, buildAuthorizationUrl, createConfiguration, exchangeCodeForTokens, generateOAuthState, getOAuthState, refreshAccessToken };
|
|
32
|
+
//# sourceMappingURL=connect.oauth.d.mts.map
|