@m5kdev/backend 0.7.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.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
package/dist/src/types.d.ts
DELETED
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
import type { Mastra } from "@mastra/core";
|
|
2
|
-
import type { AIService } from "./modules/ai/ai.service";
|
|
3
|
-
import type { AuthService } from "./modules/auth/auth.service";
|
|
4
|
-
import type { BillingService } from "./modules/billing/billing.service";
|
|
5
|
-
import type { TRPCMethods } from "./utils/trpc";
|
|
6
|
-
export declare const createAuthTRPCRouter: <MastraInstance extends Mastra>(trpcMethods: TRPCMethods, authService: AuthService, aiService: AIService<MastraInstance>, billingService: BillingService) => import("@trpc/server").TRPCBuiltRouter<{
|
|
7
|
-
ctx: import("./utils/trpc").Context;
|
|
8
|
-
meta: any;
|
|
9
|
-
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
10
|
-
transformer: true;
|
|
11
|
-
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
12
|
-
auth: import("@trpc/server").TRPCBuiltRouter<{
|
|
13
|
-
ctx: import("./utils/trpc").Context;
|
|
14
|
-
meta: any;
|
|
15
|
-
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
16
|
-
transformer: true;
|
|
17
|
-
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
18
|
-
getUserWaitlistCount: import("@trpc/server").TRPCQueryProcedure<{
|
|
19
|
-
input: void;
|
|
20
|
-
output: number;
|
|
21
|
-
meta: any;
|
|
22
|
-
}>;
|
|
23
|
-
createInvitationCode: import("@trpc/server").TRPCMutationProcedure<{
|
|
24
|
-
input: {
|
|
25
|
-
name?: string | undefined;
|
|
26
|
-
};
|
|
27
|
-
output: {
|
|
28
|
-
id: string;
|
|
29
|
-
name: string | null;
|
|
30
|
-
email: string | null;
|
|
31
|
-
createdAt: Date;
|
|
32
|
-
updatedAt: Date | null;
|
|
33
|
-
status: string;
|
|
34
|
-
code: string | null;
|
|
35
|
-
expiresAt: Date | null;
|
|
36
|
-
};
|
|
37
|
-
meta: any;
|
|
38
|
-
}>;
|
|
39
|
-
createAccountClaimCode: import("@trpc/server").TRPCMutationProcedure<{
|
|
40
|
-
input: {
|
|
41
|
-
userId: string;
|
|
42
|
-
expiresInHours?: number | undefined;
|
|
43
|
-
};
|
|
44
|
-
output: {
|
|
45
|
-
id: string;
|
|
46
|
-
claimUserId: string | null;
|
|
47
|
-
code: string | null;
|
|
48
|
-
status: string;
|
|
49
|
-
expiresAt: Date | null;
|
|
50
|
-
claimedAt: Date | null;
|
|
51
|
-
claimedEmail: string | null;
|
|
52
|
-
createdAt: Date;
|
|
53
|
-
updatedAt: Date | null;
|
|
54
|
-
};
|
|
55
|
-
meta: any;
|
|
56
|
-
}>;
|
|
57
|
-
listAccountClaims: import("@trpc/server").TRPCQueryProcedure<{
|
|
58
|
-
input: void;
|
|
59
|
-
output: {
|
|
60
|
-
id: string;
|
|
61
|
-
createdAt: Date;
|
|
62
|
-
updatedAt: Date | null;
|
|
63
|
-
expiresAt: Date | null;
|
|
64
|
-
status: string;
|
|
65
|
-
claimUserId: string | null;
|
|
66
|
-
claimedAt: Date | null;
|
|
67
|
-
claimedEmail: string | null;
|
|
68
|
-
}[];
|
|
69
|
-
meta: any;
|
|
70
|
-
}>;
|
|
71
|
-
generateAccountClaimMagicLink: import("@trpc/server").TRPCMutationProcedure<{
|
|
72
|
-
input: {
|
|
73
|
-
claimId: string;
|
|
74
|
-
email?: string | undefined;
|
|
75
|
-
};
|
|
76
|
-
output: {
|
|
77
|
-
id: string;
|
|
78
|
-
email: string;
|
|
79
|
-
createdAt: Date;
|
|
80
|
-
expiresAt: Date | null;
|
|
81
|
-
userId: string;
|
|
82
|
-
claimId: string;
|
|
83
|
-
url: string;
|
|
84
|
-
};
|
|
85
|
-
meta: any;
|
|
86
|
-
}>;
|
|
87
|
-
listAccountClaimMagicLinks: import("@trpc/server").TRPCQueryProcedure<{
|
|
88
|
-
input: {
|
|
89
|
-
claimId: string;
|
|
90
|
-
};
|
|
91
|
-
output: {
|
|
92
|
-
id: string;
|
|
93
|
-
email: string;
|
|
94
|
-
createdAt: Date;
|
|
95
|
-
expiresAt: Date | null;
|
|
96
|
-
userId: string;
|
|
97
|
-
claimId: string;
|
|
98
|
-
url: string;
|
|
99
|
-
}[];
|
|
100
|
-
meta: any;
|
|
101
|
-
}>;
|
|
102
|
-
getMyAccountClaimStatus: import("@trpc/server").TRPCQueryProcedure<{
|
|
103
|
-
input: void;
|
|
104
|
-
output: {
|
|
105
|
-
id: string;
|
|
106
|
-
claimUserId: string | null;
|
|
107
|
-
code: string | null;
|
|
108
|
-
status: string;
|
|
109
|
-
expiresAt: Date | null;
|
|
110
|
-
claimedAt: Date | null;
|
|
111
|
-
claimedEmail: string | null;
|
|
112
|
-
createdAt: Date;
|
|
113
|
-
updatedAt: Date | null;
|
|
114
|
-
} | null;
|
|
115
|
-
meta: any;
|
|
116
|
-
}>;
|
|
117
|
-
setMyAccountClaimEmail: import("@trpc/server").TRPCMutationProcedure<{
|
|
118
|
-
input: {
|
|
119
|
-
email: string;
|
|
120
|
-
};
|
|
121
|
-
output: {
|
|
122
|
-
status: boolean;
|
|
123
|
-
};
|
|
124
|
-
meta: any;
|
|
125
|
-
}>;
|
|
126
|
-
acceptMyAccountClaim: import("@trpc/server").TRPCMutationProcedure<{
|
|
127
|
-
input: void;
|
|
128
|
-
output: {
|
|
129
|
-
status: boolean;
|
|
130
|
-
};
|
|
131
|
-
meta: any;
|
|
132
|
-
}>;
|
|
133
|
-
listWaitlist: import("@trpc/server").TRPCQueryProcedure<{
|
|
134
|
-
input: void;
|
|
135
|
-
output: {
|
|
136
|
-
id: string;
|
|
137
|
-
name: string | null;
|
|
138
|
-
email: string | null;
|
|
139
|
-
createdAt: Date;
|
|
140
|
-
updatedAt: Date | null;
|
|
141
|
-
status: string;
|
|
142
|
-
code: string | null;
|
|
143
|
-
expiresAt: Date | null;
|
|
144
|
-
}[];
|
|
145
|
-
meta: any;
|
|
146
|
-
}>;
|
|
147
|
-
listAdminWaitlist: import("@trpc/server").TRPCQueryProcedure<{
|
|
148
|
-
input: void;
|
|
149
|
-
output: {
|
|
150
|
-
id: string;
|
|
151
|
-
name: string | null;
|
|
152
|
-
email: string | null;
|
|
153
|
-
createdAt: Date;
|
|
154
|
-
updatedAt: Date | null;
|
|
155
|
-
status: string;
|
|
156
|
-
}[];
|
|
157
|
-
meta: any;
|
|
158
|
-
}>;
|
|
159
|
-
addToWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
160
|
-
input: {
|
|
161
|
-
email: string;
|
|
162
|
-
};
|
|
163
|
-
output: {
|
|
164
|
-
id: string;
|
|
165
|
-
name: string | null;
|
|
166
|
-
email: string | null;
|
|
167
|
-
createdAt: Date;
|
|
168
|
-
updatedAt: Date | null;
|
|
169
|
-
status: string;
|
|
170
|
-
};
|
|
171
|
-
meta: any;
|
|
172
|
-
}>;
|
|
173
|
-
inviteToWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
174
|
-
input: {
|
|
175
|
-
email: string;
|
|
176
|
-
name?: string | undefined;
|
|
177
|
-
};
|
|
178
|
-
output: {
|
|
179
|
-
id: string;
|
|
180
|
-
name: string | null;
|
|
181
|
-
email: string | null;
|
|
182
|
-
createdAt: Date;
|
|
183
|
-
updatedAt: Date | null;
|
|
184
|
-
status: string;
|
|
185
|
-
code: string | null;
|
|
186
|
-
expiresAt: Date | null;
|
|
187
|
-
};
|
|
188
|
-
meta: any;
|
|
189
|
-
}>;
|
|
190
|
-
inviteFromWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
191
|
-
input: {
|
|
192
|
-
id: string;
|
|
193
|
-
};
|
|
194
|
-
output: {
|
|
195
|
-
id: string;
|
|
196
|
-
name: string | null;
|
|
197
|
-
email: string | null;
|
|
198
|
-
createdAt: Date;
|
|
199
|
-
updatedAt: Date | null;
|
|
200
|
-
status: string;
|
|
201
|
-
};
|
|
202
|
-
meta: any;
|
|
203
|
-
}>;
|
|
204
|
-
removeFromWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
205
|
-
input: {
|
|
206
|
-
id: string;
|
|
207
|
-
};
|
|
208
|
-
output: {
|
|
209
|
-
id: string;
|
|
210
|
-
name: string | null;
|
|
211
|
-
email: string | null;
|
|
212
|
-
createdAt: Date;
|
|
213
|
-
updatedAt: Date | null;
|
|
214
|
-
status: string;
|
|
215
|
-
};
|
|
216
|
-
meta: any;
|
|
217
|
-
}>;
|
|
218
|
-
joinWaitlist: import("@trpc/server").TRPCMutationProcedure<{
|
|
219
|
-
input: {
|
|
220
|
-
email: string;
|
|
221
|
-
};
|
|
222
|
-
output: {
|
|
223
|
-
id: string;
|
|
224
|
-
name: string | null;
|
|
225
|
-
email: string | null;
|
|
226
|
-
createdAt: Date;
|
|
227
|
-
updatedAt: Date | null;
|
|
228
|
-
status: string;
|
|
229
|
-
};
|
|
230
|
-
meta: any;
|
|
231
|
-
}>;
|
|
232
|
-
getOnboarding: import("@trpc/server").TRPCQueryProcedure<{
|
|
233
|
-
input: void;
|
|
234
|
-
output: number;
|
|
235
|
-
meta: any;
|
|
236
|
-
}>;
|
|
237
|
-
setOnboarding: import("@trpc/server").TRPCMutationProcedure<{
|
|
238
|
-
input: number;
|
|
239
|
-
output: number;
|
|
240
|
-
meta: any;
|
|
241
|
-
}>;
|
|
242
|
-
getPreferences: import("@trpc/server").TRPCQueryProcedure<{
|
|
243
|
-
input: void;
|
|
244
|
-
output: Record<string, unknown>;
|
|
245
|
-
meta: any;
|
|
246
|
-
}>;
|
|
247
|
-
setPreferences: import("@trpc/server").TRPCMutationProcedure<{
|
|
248
|
-
input: Record<string, unknown>;
|
|
249
|
-
output: Record<string, unknown>;
|
|
250
|
-
meta: any;
|
|
251
|
-
}>;
|
|
252
|
-
getOrganizationPreferences: import("@trpc/server").TRPCQueryProcedure<{
|
|
253
|
-
input: void;
|
|
254
|
-
output: Record<string, unknown>;
|
|
255
|
-
meta: any;
|
|
256
|
-
}>;
|
|
257
|
-
setOrganizationPreferences: import("@trpc/server").TRPCMutationProcedure<{
|
|
258
|
-
input: Record<string, unknown>;
|
|
259
|
-
output: Record<string, unknown>;
|
|
260
|
-
meta: any;
|
|
261
|
-
}>;
|
|
262
|
-
getMetadata: import("@trpc/server").TRPCQueryProcedure<{
|
|
263
|
-
input: void;
|
|
264
|
-
output: Record<string, unknown>;
|
|
265
|
-
meta: any;
|
|
266
|
-
}>;
|
|
267
|
-
setMetadata: import("@trpc/server").TRPCMutationProcedure<{
|
|
268
|
-
input: Record<string, unknown>;
|
|
269
|
-
output: Record<string, unknown>;
|
|
270
|
-
meta: any;
|
|
271
|
-
}>;
|
|
272
|
-
getFlags: import("@trpc/server").TRPCQueryProcedure<{
|
|
273
|
-
input: void;
|
|
274
|
-
output: string[];
|
|
275
|
-
meta: any;
|
|
276
|
-
}>;
|
|
277
|
-
getOrganizationFlags: import("@trpc/server").TRPCQueryProcedure<{
|
|
278
|
-
input: void;
|
|
279
|
-
output: string[];
|
|
280
|
-
meta: any;
|
|
281
|
-
}>;
|
|
282
|
-
setFlags: import("@trpc/server").TRPCMutationProcedure<{
|
|
283
|
-
input: string[];
|
|
284
|
-
output: string[];
|
|
285
|
-
meta: any;
|
|
286
|
-
}>;
|
|
287
|
-
setOrganizationFlags: import("@trpc/server").TRPCMutationProcedure<{
|
|
288
|
-
input: string[];
|
|
289
|
-
output: string[];
|
|
290
|
-
meta: any;
|
|
291
|
-
}>;
|
|
292
|
-
validateWaitlistCode: import("@trpc/server").TRPCQueryProcedure<{
|
|
293
|
-
input: {
|
|
294
|
-
code: string;
|
|
295
|
-
};
|
|
296
|
-
output: {
|
|
297
|
-
status: string;
|
|
298
|
-
};
|
|
299
|
-
meta: any;
|
|
300
|
-
}>;
|
|
301
|
-
}>>;
|
|
302
|
-
ai: import("@trpc/server").TRPCBuiltRouter<{
|
|
303
|
-
ctx: import("./utils/trpc").Context;
|
|
304
|
-
meta: any;
|
|
305
|
-
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
306
|
-
transformer: true;
|
|
307
|
-
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
308
|
-
getUserUsage: import("@trpc/server").TRPCQueryProcedure<{
|
|
309
|
-
input: {
|
|
310
|
-
userId: string;
|
|
311
|
-
};
|
|
312
|
-
output: {
|
|
313
|
-
inputTokens: number | null;
|
|
314
|
-
outputTokens: number | null;
|
|
315
|
-
totalTokens: number | null;
|
|
316
|
-
cost: number | null;
|
|
317
|
-
};
|
|
318
|
-
meta: any;
|
|
319
|
-
}>;
|
|
320
|
-
}>>;
|
|
321
|
-
billing: import("@trpc/server").TRPCBuiltRouter<{
|
|
322
|
-
ctx: import("./utils/trpc").Context;
|
|
323
|
-
meta: any;
|
|
324
|
-
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
325
|
-
transformer: true;
|
|
326
|
-
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
327
|
-
getActiveSubscription: import("@trpc/server").TRPCQueryProcedure<{
|
|
328
|
-
input: void;
|
|
329
|
-
output: {
|
|
330
|
-
id: string;
|
|
331
|
-
plan: string;
|
|
332
|
-
referenceId: string;
|
|
333
|
-
status: string;
|
|
334
|
-
stripeCustomerId?: string | null | undefined;
|
|
335
|
-
stripeSubscriptionId?: string | null | undefined;
|
|
336
|
-
periodStart?: Date | null | undefined;
|
|
337
|
-
periodEnd?: Date | null | undefined;
|
|
338
|
-
cancelAtPeriodEnd?: boolean | null | undefined;
|
|
339
|
-
cancelAt?: Date | null | undefined;
|
|
340
|
-
canceledAt?: Date | null | undefined;
|
|
341
|
-
seats?: number | null | undefined;
|
|
342
|
-
trialStart?: Date | null | undefined;
|
|
343
|
-
trialEnd?: Date | null | undefined;
|
|
344
|
-
priceId?: string | null | undefined;
|
|
345
|
-
interval?: string | null | undefined;
|
|
346
|
-
unitAmount?: number | null | undefined;
|
|
347
|
-
discounts?: string[] | null | undefined;
|
|
348
|
-
} | null;
|
|
349
|
-
meta: any;
|
|
350
|
-
}>;
|
|
351
|
-
listInvoices: import("@trpc/server").TRPCQueryProcedure<{
|
|
352
|
-
input: void;
|
|
353
|
-
output: import("stripe").Stripe.Invoice[];
|
|
354
|
-
meta: any;
|
|
355
|
-
}>;
|
|
356
|
-
}>>;
|
|
357
|
-
}>>;
|
|
358
|
-
export type BackendTRPCRouter = ReturnType<typeof createAuthTRPCRouter>;
|
package/dist/src/types.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createAuthTRPCRouter = void 0;
|
|
4
|
-
const ai_trpc_1 = require("./modules/ai/ai.trpc");
|
|
5
|
-
const auth_trpc_1 = require("./modules/auth/auth.trpc");
|
|
6
|
-
const billing_trpc_1 = require("./modules/billing/billing.trpc");
|
|
7
|
-
const createAuthTRPCRouter = (trpcMethods, authService, aiService, billingService) => trpcMethods.router({
|
|
8
|
-
auth: (0, auth_trpc_1.createAuthTRPC)(trpcMethods, authService),
|
|
9
|
-
ai: (0, ai_trpc_1.createAITRPC)(trpcMethods, aiService),
|
|
10
|
-
billing: (0, billing_trpc_1.createBillingTRPC)(trpcMethods, billingService),
|
|
11
|
-
});
|
|
12
|
-
exports.createAuthTRPCRouter = createAuthTRPCRouter;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { captureException } from "@sentry/node";
|
|
2
|
-
import { type TRPC_ERROR_CODE_KEY, TRPCError } from "@trpc/server";
|
|
3
|
-
import type { ServerErrorLayer } from "../modules/base/base.types";
|
|
4
|
-
export type { ServerErrorLayer };
|
|
5
|
-
export declare class ServerError extends Error {
|
|
6
|
-
readonly code: TRPC_ERROR_CODE_KEY;
|
|
7
|
-
readonly layer: ServerErrorLayer;
|
|
8
|
-
readonly layerName: string;
|
|
9
|
-
readonly clientMessage?: string;
|
|
10
|
-
readonly context?: Record<string, unknown>;
|
|
11
|
-
readonly boundaryStack?: string;
|
|
12
|
-
constructor({ code, layer, layerName, message, clientMessage, cause, context, captureBoundary, }: {
|
|
13
|
-
code: TRPC_ERROR_CODE_KEY;
|
|
14
|
-
layer?: ServerErrorLayer;
|
|
15
|
-
layerName?: string;
|
|
16
|
-
message?: string;
|
|
17
|
-
clientMessage?: string;
|
|
18
|
-
cause?: unknown;
|
|
19
|
-
context?: Record<string, unknown>;
|
|
20
|
-
captureBoundary?: boolean;
|
|
21
|
-
});
|
|
22
|
-
is5xxError(): boolean;
|
|
23
|
-
getHTTPStatusCode(): number;
|
|
24
|
-
toTRPC(): TRPCError;
|
|
25
|
-
toJSON(): {
|
|
26
|
-
code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST";
|
|
27
|
-
layer: ServerErrorLayer;
|
|
28
|
-
layerName: string;
|
|
29
|
-
message: string;
|
|
30
|
-
context: Record<string, unknown> | undefined;
|
|
31
|
-
stack: string | undefined;
|
|
32
|
-
boundaryStack: string | undefined;
|
|
33
|
-
cause: unknown;
|
|
34
|
-
};
|
|
35
|
-
static fromUnknown(code: TRPC_ERROR_CODE_KEY, cause: unknown, opts?: {
|
|
36
|
-
layer?: ServerErrorLayer;
|
|
37
|
-
layerName?: string;
|
|
38
|
-
context?: Record<string, unknown>;
|
|
39
|
-
}): ServerError;
|
|
40
|
-
}
|
|
41
|
-
export type ErrorReporter = {
|
|
42
|
-
captureException: (err: Parameters<typeof captureException>[0], hint?: Parameters<typeof captureException>[1]) => string;
|
|
43
|
-
};
|
|
44
|
-
declare global {
|
|
45
|
-
var m5ErrorReporter: ErrorReporter | undefined;
|
|
46
|
-
}
|
|
47
|
-
export declare function getErrorReporter(): ErrorReporter | undefined;
|
|
48
|
-
export declare function setErrorReporter(reporter: ErrorReporter): void;
|
|
49
|
-
export declare function reportError(err: ServerError | Error | unknown, hint?: Parameters<typeof captureException>[1]): string | undefined;
|
package/dist/src/utils/errors.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerError = void 0;
|
|
4
|
-
exports.getErrorReporter = getErrorReporter;
|
|
5
|
-
exports.setErrorReporter = setErrorReporter;
|
|
6
|
-
exports.reportError = reportError;
|
|
7
|
-
const server_1 = require("@trpc/server");
|
|
8
|
-
const http_1 = require("@trpc/server/http");
|
|
9
|
-
const radashi_1 = require("radashi");
|
|
10
|
-
const logger_1 = require("./logger");
|
|
11
|
-
class ServerError extends Error {
|
|
12
|
-
code;
|
|
13
|
-
layer;
|
|
14
|
-
layerName;
|
|
15
|
-
clientMessage;
|
|
16
|
-
context;
|
|
17
|
-
boundaryStack; // where we wrapped it
|
|
18
|
-
constructor({ code, layer, layerName, message, clientMessage, cause, context, captureBoundary = true, }) {
|
|
19
|
-
// keep native cause chain when the cause is an Error
|
|
20
|
-
super(message ?? `server.error.${layer}.${(0, radashi_1.camel)(code)}`, {
|
|
21
|
-
cause: cause instanceof Error ? cause : undefined,
|
|
22
|
-
});
|
|
23
|
-
this.code = code;
|
|
24
|
-
this.layer = layer ?? "unknown";
|
|
25
|
-
this.layerName = layerName ?? "UnknownLayer";
|
|
26
|
-
this.clientMessage = clientMessage ?? `server.error.${layer}.${(0, radashi_1.camel)(code)}`;
|
|
27
|
-
this.context = context;
|
|
28
|
-
if (captureBoundary)
|
|
29
|
-
this.boundaryStack = new Error().stack;
|
|
30
|
-
Error.captureStackTrace?.(this, ServerError);
|
|
31
|
-
Object.setPrototypeOf(this, new.target.prototype);
|
|
32
|
-
}
|
|
33
|
-
is5xxError() {
|
|
34
|
-
const statusCode = this.getHTTPStatusCode();
|
|
35
|
-
return statusCode >= 500 && statusCode < 600;
|
|
36
|
-
}
|
|
37
|
-
getHTTPStatusCode() {
|
|
38
|
-
return (0, http_1.getHTTPStatusCodeFromError)(this.toTRPC());
|
|
39
|
-
}
|
|
40
|
-
toTRPC() {
|
|
41
|
-
return new server_1.TRPCError({
|
|
42
|
-
code: this.code,
|
|
43
|
-
message: this.message,
|
|
44
|
-
cause: this.cause,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
toJSON() {
|
|
48
|
-
return {
|
|
49
|
-
code: this.code,
|
|
50
|
-
layer: this.layer,
|
|
51
|
-
layerName: this.layerName,
|
|
52
|
-
message: this.message,
|
|
53
|
-
context: this.context,
|
|
54
|
-
stack: process.env.NODE_ENV !== "production" ? this.stack : undefined,
|
|
55
|
-
boundaryStack: process.env.NODE_ENV !== "production" ? this.boundaryStack : undefined,
|
|
56
|
-
// Shallow representation of cause to avoid cycles
|
|
57
|
-
cause: this.cause instanceof Error
|
|
58
|
-
? { name: this.cause.name, message: this.cause.message, stack: this.cause.stack }
|
|
59
|
-
: this.cause,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
static fromUnknown(code, cause, opts) {
|
|
63
|
-
const msg = cause instanceof Error ? cause.message : undefined;
|
|
64
|
-
return new ServerError({
|
|
65
|
-
code,
|
|
66
|
-
layer: opts?.layer,
|
|
67
|
-
layerName: opts?.layerName,
|
|
68
|
-
message: msg,
|
|
69
|
-
cause,
|
|
70
|
-
context: opts?.context,
|
|
71
|
-
captureBoundary: true,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
exports.ServerError = ServerError;
|
|
76
|
-
function getErrorReporter() {
|
|
77
|
-
return globalThis.m5ErrorReporter;
|
|
78
|
-
}
|
|
79
|
-
function setErrorReporter(reporter) {
|
|
80
|
-
globalThis.m5ErrorReporter = reporter;
|
|
81
|
-
}
|
|
82
|
-
function reportError(err, hint) {
|
|
83
|
-
let eventHint = hint;
|
|
84
|
-
const reporter = getErrorReporter();
|
|
85
|
-
if (!reporter) {
|
|
86
|
-
logger_1.logger.error("[reportError] No error reporter set!");
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
if (err instanceof ServerError) {
|
|
90
|
-
// Merge - don't clobber caller-provided hint
|
|
91
|
-
eventHint = {
|
|
92
|
-
...hint,
|
|
93
|
-
captureContext: {
|
|
94
|
-
...hint?.captureContext,
|
|
95
|
-
extra: {
|
|
96
|
-
...(hint?.captureContext?.extra ?? {}),
|
|
97
|
-
layer: err.layer,
|
|
98
|
-
layerName: err.layerName,
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
return reporter.captureException(err, eventHint);
|
|
104
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const logger: import("pino").Logger<never, boolean>;
|
package/dist/src/utils/logger.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.logger = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pino_1 = tslib_1.__importDefault(require("pino"));
|
|
6
|
-
exports.logger = (0, pino_1.default)({
|
|
7
|
-
transport: {
|
|
8
|
-
target: "pino-pretty",
|
|
9
|
-
},
|
|
10
|
-
level: "debug",
|
|
11
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { PostHog } from "posthog-node";
|
|
2
|
-
declare global {
|
|
3
|
-
var m5Posthog: PostHog | undefined;
|
|
4
|
-
}
|
|
5
|
-
export declare function getPosthog(): PostHog | undefined;
|
|
6
|
-
export declare function setPosthog(posthog: PostHog): void;
|
|
7
|
-
type PosthogRequestState = {
|
|
8
|
-
disableCapture: boolean;
|
|
9
|
-
};
|
|
10
|
-
export declare function runWithPosthogRequestState<T>(state: PosthogRequestState, callback: () => T): T;
|
|
11
|
-
export declare function isPosthogCaptureDisabled(): boolean;
|
|
12
|
-
export declare function posthogCapture(event: Parameters<PostHog["capture"]>[0]): ReturnType<PostHog["capture"]> | undefined;
|
|
13
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPosthog = getPosthog;
|
|
4
|
-
exports.setPosthog = setPosthog;
|
|
5
|
-
exports.runWithPosthogRequestState = runWithPosthogRequestState;
|
|
6
|
-
exports.isPosthogCaptureDisabled = isPosthogCaptureDisabled;
|
|
7
|
-
exports.posthogCapture = posthogCapture;
|
|
8
|
-
const node_async_hooks_1 = require("node:async_hooks");
|
|
9
|
-
function getPosthog() {
|
|
10
|
-
return globalThis.m5Posthog;
|
|
11
|
-
}
|
|
12
|
-
function setPosthog(posthog) {
|
|
13
|
-
globalThis.m5Posthog = posthog;
|
|
14
|
-
}
|
|
15
|
-
const posthogRequestState = new node_async_hooks_1.AsyncLocalStorage();
|
|
16
|
-
function runWithPosthogRequestState(state, callback) {
|
|
17
|
-
return posthogRequestState.run(state, callback);
|
|
18
|
-
}
|
|
19
|
-
function isPosthogCaptureDisabled() {
|
|
20
|
-
return posthogRequestState.getStore()?.disableCapture ?? false;
|
|
21
|
-
}
|
|
22
|
-
function posthogCapture(event) {
|
|
23
|
-
if (isPosthogCaptureDisabled()) {
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
const posthog = getPosthog();
|
|
27
|
-
if (!posthog) {
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
return posthog.capture(event);
|
|
31
|
-
}
|
package/dist/src/utils/trpc.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { transformer } from "@m5kdev/commons/utils/trpc";
|
|
2
|
-
import type { TRPCRootObject } from "@trpc/server";
|
|
3
|
-
import type { CreateExpressContextOptions } from "@trpc/server/adapters/express";
|
|
4
|
-
import type { Result } from "neverthrow";
|
|
5
|
-
import type { BetterAuth, Session, User } from "../modules/auth/auth.lib";
|
|
6
|
-
import { type OrganizationActor, type TeamActor, type UserActor } from "../modules/base/base.actor";
|
|
7
|
-
import { ServerError } from "./errors";
|
|
8
|
-
export type RequestContext = {
|
|
9
|
-
session: Session | null;
|
|
10
|
-
user: User | null;
|
|
11
|
-
actor: UserActor | null;
|
|
12
|
-
};
|
|
13
|
-
export type Context = {
|
|
14
|
-
session: Session;
|
|
15
|
-
user: User;
|
|
16
|
-
actor: UserActor;
|
|
17
|
-
};
|
|
18
|
-
export type OrganizationContext = {
|
|
19
|
-
session: Session;
|
|
20
|
-
user: User;
|
|
21
|
-
actor: OrganizationActor;
|
|
22
|
-
};
|
|
23
|
-
export type TeamContext = {
|
|
24
|
-
session: Session;
|
|
25
|
-
user: User;
|
|
26
|
-
actor: TeamActor;
|
|
27
|
-
};
|
|
28
|
-
type TRPCCreate = TRPCRootObject<Context, any, {
|
|
29
|
-
transformer: typeof transformer;
|
|
30
|
-
}>;
|
|
31
|
-
export type TRPCMethods = {
|
|
32
|
-
router: TRPCCreate["router"];
|
|
33
|
-
publicProcedure: TRPCCreate["procedure"];
|
|
34
|
-
privateProcedure: TRPCCreate["procedure"];
|
|
35
|
-
adminProcedure: TRPCCreate["procedure"];
|
|
36
|
-
};
|
|
37
|
-
export declare function createAuthContext(auth: BetterAuth): ({ req }: CreateExpressContextOptions) => Promise<RequestContext>;
|
|
38
|
-
export declare function handleAsyncTRPCResult<T>(result: Promise<Result<T, ServerError>>): Promise<T>;
|
|
39
|
-
export declare function handleTRPCResult<T>(result: Result<T, ServerError>): T;
|
|
40
|
-
export declare function verifyProtectedProcedureContext(ctx: RequestContext): Context;
|
|
41
|
-
export declare function verifyOrganizationProcedureContext(ctx: Context): OrganizationContext;
|
|
42
|
-
export declare function verifyTeamProcedureContext(ctx: Context): TeamContext;
|
|
43
|
-
export declare function verifyAdminProcedureContext(ctx: RequestContext): Context;
|
|
44
|
-
export declare function requireRequestUser(ctx: RequestContext): User;
|
|
45
|
-
export declare function requireRequestActor(ctx: RequestContext): UserActor;
|
|
46
|
-
export declare function requireRequestActor(ctx: RequestContext, scope: "organization"): OrganizationActor;
|
|
47
|
-
export declare function requireRequestActor(ctx: RequestContext, scope: "team"): TeamActor;
|
|
48
|
-
export {};
|