@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
|
@@ -1,343 +0,0 @@
|
|
|
1
|
-
import type { WorkflowListInputSchema, WorkflowListOutputSchema, WorkflowReadOutputSchema } from "@m5kdev/commons/modules/workflow/workflow.schema";
|
|
2
|
-
import type { LibSQLDatabase } from "drizzle-orm/libsql";
|
|
3
|
-
import type { ServerResultAsync } from "../base/base.dto";
|
|
4
|
-
import { BaseRepository } from "../base/base.repository";
|
|
5
|
-
declare const schema: {
|
|
6
|
-
workflows: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
|
|
7
|
-
name: "workflows";
|
|
8
|
-
schema: undefined;
|
|
9
|
-
columns: {
|
|
10
|
-
id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
11
|
-
name: "id";
|
|
12
|
-
tableName: "workflows";
|
|
13
|
-
dataType: "string";
|
|
14
|
-
columnType: "SQLiteText";
|
|
15
|
-
data: string;
|
|
16
|
-
driverParam: string;
|
|
17
|
-
notNull: true;
|
|
18
|
-
hasDefault: true;
|
|
19
|
-
isPrimaryKey: true;
|
|
20
|
-
isAutoincrement: false;
|
|
21
|
-
hasRuntimeDefault: true;
|
|
22
|
-
enumValues: [string, ...string[]];
|
|
23
|
-
baseColumn: never;
|
|
24
|
-
identity: undefined;
|
|
25
|
-
generated: undefined;
|
|
26
|
-
}, {}, {
|
|
27
|
-
length: number | undefined;
|
|
28
|
-
}>;
|
|
29
|
-
userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
30
|
-
name: "user_id";
|
|
31
|
-
tableName: "workflows";
|
|
32
|
-
dataType: "string";
|
|
33
|
-
columnType: "SQLiteText";
|
|
34
|
-
data: string;
|
|
35
|
-
driverParam: string;
|
|
36
|
-
notNull: false;
|
|
37
|
-
hasDefault: false;
|
|
38
|
-
isPrimaryKey: false;
|
|
39
|
-
isAutoincrement: false;
|
|
40
|
-
hasRuntimeDefault: false;
|
|
41
|
-
enumValues: [string, ...string[]];
|
|
42
|
-
baseColumn: never;
|
|
43
|
-
identity: undefined;
|
|
44
|
-
generated: undefined;
|
|
45
|
-
}, {}, {
|
|
46
|
-
length: number | undefined;
|
|
47
|
-
}>;
|
|
48
|
-
jobId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
49
|
-
name: "job_id";
|
|
50
|
-
tableName: "workflows";
|
|
51
|
-
dataType: "string";
|
|
52
|
-
columnType: "SQLiteText";
|
|
53
|
-
data: string;
|
|
54
|
-
driverParam: string;
|
|
55
|
-
notNull: true;
|
|
56
|
-
hasDefault: false;
|
|
57
|
-
isPrimaryKey: false;
|
|
58
|
-
isAutoincrement: false;
|
|
59
|
-
hasRuntimeDefault: false;
|
|
60
|
-
enumValues: [string, ...string[]];
|
|
61
|
-
baseColumn: never;
|
|
62
|
-
identity: undefined;
|
|
63
|
-
generated: undefined;
|
|
64
|
-
}, {}, {
|
|
65
|
-
length: number | undefined;
|
|
66
|
-
}>;
|
|
67
|
-
jobName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
68
|
-
name: "job_name";
|
|
69
|
-
tableName: "workflows";
|
|
70
|
-
dataType: "string";
|
|
71
|
-
columnType: "SQLiteText";
|
|
72
|
-
data: string;
|
|
73
|
-
driverParam: string;
|
|
74
|
-
notNull: true;
|
|
75
|
-
hasDefault: false;
|
|
76
|
-
isPrimaryKey: false;
|
|
77
|
-
isAutoincrement: false;
|
|
78
|
-
hasRuntimeDefault: false;
|
|
79
|
-
enumValues: [string, ...string[]];
|
|
80
|
-
baseColumn: never;
|
|
81
|
-
identity: undefined;
|
|
82
|
-
generated: undefined;
|
|
83
|
-
}, {}, {
|
|
84
|
-
length: number | undefined;
|
|
85
|
-
}>;
|
|
86
|
-
queueName: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
87
|
-
name: "queue_name";
|
|
88
|
-
tableName: "workflows";
|
|
89
|
-
dataType: "string";
|
|
90
|
-
columnType: "SQLiteText";
|
|
91
|
-
data: string;
|
|
92
|
-
driverParam: string;
|
|
93
|
-
notNull: true;
|
|
94
|
-
hasDefault: false;
|
|
95
|
-
isPrimaryKey: false;
|
|
96
|
-
isAutoincrement: false;
|
|
97
|
-
hasRuntimeDefault: false;
|
|
98
|
-
enumValues: [string, ...string[]];
|
|
99
|
-
baseColumn: never;
|
|
100
|
-
identity: undefined;
|
|
101
|
-
generated: undefined;
|
|
102
|
-
}, {}, {
|
|
103
|
-
length: number | undefined;
|
|
104
|
-
}>;
|
|
105
|
-
timeout: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
106
|
-
name: "timeout";
|
|
107
|
-
tableName: "workflows";
|
|
108
|
-
dataType: "number";
|
|
109
|
-
columnType: "SQLiteInteger";
|
|
110
|
-
data: number;
|
|
111
|
-
driverParam: number;
|
|
112
|
-
notNull: false;
|
|
113
|
-
hasDefault: false;
|
|
114
|
-
isPrimaryKey: false;
|
|
115
|
-
isAutoincrement: false;
|
|
116
|
-
hasRuntimeDefault: false;
|
|
117
|
-
enumValues: undefined;
|
|
118
|
-
baseColumn: never;
|
|
119
|
-
identity: undefined;
|
|
120
|
-
generated: undefined;
|
|
121
|
-
}, {}, {}>;
|
|
122
|
-
tags: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
123
|
-
name: "tags";
|
|
124
|
-
tableName: "workflows";
|
|
125
|
-
dataType: "json";
|
|
126
|
-
columnType: "SQLiteTextJson";
|
|
127
|
-
data: string[];
|
|
128
|
-
driverParam: string;
|
|
129
|
-
notNull: false;
|
|
130
|
-
hasDefault: true;
|
|
131
|
-
isPrimaryKey: false;
|
|
132
|
-
isAutoincrement: false;
|
|
133
|
-
hasRuntimeDefault: true;
|
|
134
|
-
enumValues: undefined;
|
|
135
|
-
baseColumn: never;
|
|
136
|
-
identity: undefined;
|
|
137
|
-
generated: undefined;
|
|
138
|
-
}, {}, {
|
|
139
|
-
$type: string[];
|
|
140
|
-
}>;
|
|
141
|
-
input: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
142
|
-
name: "input";
|
|
143
|
-
tableName: "workflows";
|
|
144
|
-
dataType: "json";
|
|
145
|
-
columnType: "SQLiteTextJson";
|
|
146
|
-
data: unknown;
|
|
147
|
-
driverParam: string;
|
|
148
|
-
notNull: false;
|
|
149
|
-
hasDefault: false;
|
|
150
|
-
isPrimaryKey: false;
|
|
151
|
-
isAutoincrement: false;
|
|
152
|
-
hasRuntimeDefault: false;
|
|
153
|
-
enumValues: undefined;
|
|
154
|
-
baseColumn: never;
|
|
155
|
-
identity: undefined;
|
|
156
|
-
generated: undefined;
|
|
157
|
-
}, {}, {}>;
|
|
158
|
-
output: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
159
|
-
name: "output";
|
|
160
|
-
tableName: "workflows";
|
|
161
|
-
dataType: "json";
|
|
162
|
-
columnType: "SQLiteTextJson";
|
|
163
|
-
data: unknown;
|
|
164
|
-
driverParam: string;
|
|
165
|
-
notNull: false;
|
|
166
|
-
hasDefault: false;
|
|
167
|
-
isPrimaryKey: false;
|
|
168
|
-
isAutoincrement: false;
|
|
169
|
-
hasRuntimeDefault: false;
|
|
170
|
-
enumValues: undefined;
|
|
171
|
-
baseColumn: never;
|
|
172
|
-
identity: undefined;
|
|
173
|
-
generated: undefined;
|
|
174
|
-
}, {}, {}>;
|
|
175
|
-
status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
176
|
-
name: "status";
|
|
177
|
-
tableName: "workflows";
|
|
178
|
-
dataType: "string";
|
|
179
|
-
columnType: "SQLiteText";
|
|
180
|
-
data: "queued" | "running" | "completed" | "failed";
|
|
181
|
-
driverParam: string;
|
|
182
|
-
notNull: true;
|
|
183
|
-
hasDefault: false;
|
|
184
|
-
isPrimaryKey: false;
|
|
185
|
-
isAutoincrement: false;
|
|
186
|
-
hasRuntimeDefault: false;
|
|
187
|
-
enumValues: [string, ...string[]];
|
|
188
|
-
baseColumn: never;
|
|
189
|
-
identity: undefined;
|
|
190
|
-
generated: undefined;
|
|
191
|
-
}, {}, {
|
|
192
|
-
length: number | undefined;
|
|
193
|
-
$type: "queued" | "running" | "completed" | "failed";
|
|
194
|
-
}>;
|
|
195
|
-
error: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
196
|
-
name: "error";
|
|
197
|
-
tableName: "workflows";
|
|
198
|
-
dataType: "string";
|
|
199
|
-
columnType: "SQLiteText";
|
|
200
|
-
data: string;
|
|
201
|
-
driverParam: string;
|
|
202
|
-
notNull: false;
|
|
203
|
-
hasDefault: false;
|
|
204
|
-
isPrimaryKey: false;
|
|
205
|
-
isAutoincrement: false;
|
|
206
|
-
hasRuntimeDefault: false;
|
|
207
|
-
enumValues: [string, ...string[]];
|
|
208
|
-
baseColumn: never;
|
|
209
|
-
identity: undefined;
|
|
210
|
-
generated: undefined;
|
|
211
|
-
}, {}, {
|
|
212
|
-
length: number | undefined;
|
|
213
|
-
}>;
|
|
214
|
-
retries: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
215
|
-
name: "retries";
|
|
216
|
-
tableName: "workflows";
|
|
217
|
-
dataType: "number";
|
|
218
|
-
columnType: "SQLiteInteger";
|
|
219
|
-
data: number;
|
|
220
|
-
driverParam: number;
|
|
221
|
-
notNull: true;
|
|
222
|
-
hasDefault: true;
|
|
223
|
-
isPrimaryKey: false;
|
|
224
|
-
isAutoincrement: false;
|
|
225
|
-
hasRuntimeDefault: false;
|
|
226
|
-
enumValues: undefined;
|
|
227
|
-
baseColumn: never;
|
|
228
|
-
identity: undefined;
|
|
229
|
-
generated: undefined;
|
|
230
|
-
}, {}, {}>;
|
|
231
|
-
finishedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
232
|
-
name: "finished_at";
|
|
233
|
-
tableName: "workflows";
|
|
234
|
-
dataType: "date";
|
|
235
|
-
columnType: "SQLiteTimestamp";
|
|
236
|
-
data: Date;
|
|
237
|
-
driverParam: number;
|
|
238
|
-
notNull: false;
|
|
239
|
-
hasDefault: false;
|
|
240
|
-
isPrimaryKey: false;
|
|
241
|
-
isAutoincrement: false;
|
|
242
|
-
hasRuntimeDefault: false;
|
|
243
|
-
enumValues: undefined;
|
|
244
|
-
baseColumn: never;
|
|
245
|
-
identity: undefined;
|
|
246
|
-
generated: undefined;
|
|
247
|
-
}, {}, {}>;
|
|
248
|
-
processedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
249
|
-
name: "processed_at";
|
|
250
|
-
tableName: "workflows";
|
|
251
|
-
dataType: "date";
|
|
252
|
-
columnType: "SQLiteTimestamp";
|
|
253
|
-
data: Date;
|
|
254
|
-
driverParam: number;
|
|
255
|
-
notNull: false;
|
|
256
|
-
hasDefault: false;
|
|
257
|
-
isPrimaryKey: false;
|
|
258
|
-
isAutoincrement: false;
|
|
259
|
-
hasRuntimeDefault: false;
|
|
260
|
-
enumValues: undefined;
|
|
261
|
-
baseColumn: never;
|
|
262
|
-
identity: undefined;
|
|
263
|
-
generated: undefined;
|
|
264
|
-
}, {}, {}>;
|
|
265
|
-
createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
266
|
-
name: "created_at";
|
|
267
|
-
tableName: "workflows";
|
|
268
|
-
dataType: "date";
|
|
269
|
-
columnType: "SQLiteTimestamp";
|
|
270
|
-
data: Date;
|
|
271
|
-
driverParam: number;
|
|
272
|
-
notNull: true;
|
|
273
|
-
hasDefault: true;
|
|
274
|
-
isPrimaryKey: false;
|
|
275
|
-
isAutoincrement: false;
|
|
276
|
-
hasRuntimeDefault: true;
|
|
277
|
-
enumValues: undefined;
|
|
278
|
-
baseColumn: never;
|
|
279
|
-
identity: undefined;
|
|
280
|
-
generated: undefined;
|
|
281
|
-
}, {}, {}>;
|
|
282
|
-
updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
283
|
-
name: "updated_at";
|
|
284
|
-
tableName: "workflows";
|
|
285
|
-
dataType: "date";
|
|
286
|
-
columnType: "SQLiteTimestamp";
|
|
287
|
-
data: Date;
|
|
288
|
-
driverParam: number;
|
|
289
|
-
notNull: true;
|
|
290
|
-
hasDefault: true;
|
|
291
|
-
isPrimaryKey: false;
|
|
292
|
-
isAutoincrement: false;
|
|
293
|
-
hasRuntimeDefault: true;
|
|
294
|
-
enumValues: undefined;
|
|
295
|
-
baseColumn: never;
|
|
296
|
-
identity: undefined;
|
|
297
|
-
generated: undefined;
|
|
298
|
-
}, {}, {}>;
|
|
299
|
-
};
|
|
300
|
-
dialect: "sqlite";
|
|
301
|
-
}>;
|
|
302
|
-
};
|
|
303
|
-
type Schema = typeof schema;
|
|
304
|
-
type Orm = LibSQLDatabase<Schema>;
|
|
305
|
-
export declare class WorkflowRepository extends BaseRepository<Orm, Schema, Record<string, never>> {
|
|
306
|
-
read({ jobId, userId, }: {
|
|
307
|
-
jobId: string;
|
|
308
|
-
userId: string;
|
|
309
|
-
}): ServerResultAsync<WorkflowReadOutputSchema>;
|
|
310
|
-
list({ userId, status, jobName, }: WorkflowListInputSchema & {
|
|
311
|
-
userId: string;
|
|
312
|
-
}): ServerResultAsync<WorkflowListOutputSchema>;
|
|
313
|
-
added({ userId, jobId, jobName, queueName, timeout, tags, input, }: {
|
|
314
|
-
userId?: string;
|
|
315
|
-
jobId: string;
|
|
316
|
-
jobName: string;
|
|
317
|
-
queueName: string;
|
|
318
|
-
timeout?: number;
|
|
319
|
-
tags?: string[];
|
|
320
|
-
input: unknown;
|
|
321
|
-
}): ServerResultAsync<WorkflowReadOutputSchema>;
|
|
322
|
-
addedMany(data: {
|
|
323
|
-
userId?: string;
|
|
324
|
-
jobId: string;
|
|
325
|
-
jobName: string;
|
|
326
|
-
queueName: string;
|
|
327
|
-
timeout?: number;
|
|
328
|
-
tags?: string[];
|
|
329
|
-
input: unknown;
|
|
330
|
-
}[]): ServerResultAsync<WorkflowReadOutputSchema[]>;
|
|
331
|
-
started({ jobId }: {
|
|
332
|
-
jobId: string;
|
|
333
|
-
}): ServerResultAsync<WorkflowReadOutputSchema>;
|
|
334
|
-
failed({ jobId, error, }: {
|
|
335
|
-
jobId: string;
|
|
336
|
-
error: string;
|
|
337
|
-
}): ServerResultAsync<WorkflowReadOutputSchema>;
|
|
338
|
-
completed({ jobId, output, }: {
|
|
339
|
-
jobId: string;
|
|
340
|
-
output: unknown;
|
|
341
|
-
}): ServerResultAsync<WorkflowReadOutputSchema>;
|
|
342
|
-
}
|
|
343
|
-
export {};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkflowRepository = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const drizzle_orm_1 = require("drizzle-orm");
|
|
6
|
-
const neverthrow_1 = require("neverthrow");
|
|
7
|
-
const base_repository_1 = require("../base/base.repository");
|
|
8
|
-
const workflow = tslib_1.__importStar(require("./workflow.db"));
|
|
9
|
-
const schema = { ...workflow };
|
|
10
|
-
class WorkflowRepository extends base_repository_1.BaseRepository {
|
|
11
|
-
async read({ jobId, userId, }) {
|
|
12
|
-
return this.throwableAsync(async () => {
|
|
13
|
-
const [wf] = await this.orm
|
|
14
|
-
.select()
|
|
15
|
-
.from(this.schema.workflows)
|
|
16
|
-
.where((0, drizzle_orm_1.and)((0, drizzle_orm_1.eq)(this.schema.workflows.jobId, jobId), (0, drizzle_orm_1.eq)(this.schema.workflows.userId, userId)));
|
|
17
|
-
if (!wf)
|
|
18
|
-
return this.error("NOT_FOUND");
|
|
19
|
-
return (0, neverthrow_1.ok)(wf);
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
async list({ userId, status, jobName, }) {
|
|
23
|
-
return this.throwableAsync(async () => {
|
|
24
|
-
const { ConditionBuilder } = this.helpers;
|
|
25
|
-
const condition = new ConditionBuilder([(0, drizzle_orm_1.eq)(this.schema.workflows.userId, userId)]);
|
|
26
|
-
if (status)
|
|
27
|
-
condition.push((0, drizzle_orm_1.inArray)(this.schema.workflows.status, status));
|
|
28
|
-
if (jobName)
|
|
29
|
-
condition.push((0, drizzle_orm_1.eq)(this.schema.workflows.jobName, jobName));
|
|
30
|
-
const workflows = await this.orm.select().from(this.schema.workflows).where(condition.join());
|
|
31
|
-
return (0, neverthrow_1.ok)(workflows);
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
async added({ userId, jobId, jobName, queueName, timeout, tags, input, }) {
|
|
35
|
-
return this.throwableAsync(async () => {
|
|
36
|
-
const [wf] = await this.orm
|
|
37
|
-
.insert(this.schema.workflows)
|
|
38
|
-
.values({
|
|
39
|
-
userId,
|
|
40
|
-
jobId,
|
|
41
|
-
jobName,
|
|
42
|
-
input,
|
|
43
|
-
status: "queued",
|
|
44
|
-
queueName,
|
|
45
|
-
timeout,
|
|
46
|
-
tags,
|
|
47
|
-
createdAt: new Date(),
|
|
48
|
-
updatedAt: new Date(),
|
|
49
|
-
})
|
|
50
|
-
.returning();
|
|
51
|
-
return (0, neverthrow_1.ok)(wf);
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
async addedMany(data) {
|
|
55
|
-
return this.throwableAsync(async () => {
|
|
56
|
-
const wfs = await this.orm
|
|
57
|
-
.insert(this.schema.workflows)
|
|
58
|
-
.values(data.map((d) => ({
|
|
59
|
-
userId: d.userId,
|
|
60
|
-
jobId: d.jobId,
|
|
61
|
-
jobName: d.jobName,
|
|
62
|
-
queueName: d.queueName,
|
|
63
|
-
timeout: d.timeout,
|
|
64
|
-
tags: d.tags,
|
|
65
|
-
input: d.input,
|
|
66
|
-
status: "queued",
|
|
67
|
-
createdAt: new Date(),
|
|
68
|
-
updatedAt: new Date(),
|
|
69
|
-
})))
|
|
70
|
-
.returning();
|
|
71
|
-
return (0, neverthrow_1.ok)(wfs);
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
async started({ jobId }) {
|
|
75
|
-
return this.throwableAsync(async () => {
|
|
76
|
-
const [wf] = await this.orm
|
|
77
|
-
.update(this.schema.workflows)
|
|
78
|
-
.set({ status: "running", updatedAt: new Date(), processedAt: new Date() })
|
|
79
|
-
.where((0, drizzle_orm_1.eq)(this.schema.workflows.jobId, jobId))
|
|
80
|
-
.returning();
|
|
81
|
-
return (0, neverthrow_1.ok)(wf);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
async failed({ jobId, error, }) {
|
|
85
|
-
return this.throwableAsync(async () => {
|
|
86
|
-
const [wf] = await this.orm
|
|
87
|
-
.update(this.schema.workflows)
|
|
88
|
-
.set({ status: "failed", error, updatedAt: new Date(), finishedAt: new Date() })
|
|
89
|
-
.where((0, drizzle_orm_1.eq)(this.schema.workflows.jobId, jobId))
|
|
90
|
-
.returning();
|
|
91
|
-
return (0, neverthrow_1.ok)(wf);
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
async completed({ jobId, output, }) {
|
|
95
|
-
return this.throwableAsync(async () => {
|
|
96
|
-
const [wf] = await this.orm
|
|
97
|
-
.update(this.schema.workflows)
|
|
98
|
-
.set({ status: "completed", updatedAt: new Date(), finishedAt: new Date(), output })
|
|
99
|
-
.where((0, drizzle_orm_1.eq)(this.schema.workflows.jobId, jobId))
|
|
100
|
-
.returning();
|
|
101
|
-
return (0, neverthrow_1.ok)(wf);
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
exports.WorkflowRepository = WorkflowRepository;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import type { WorkflowReadOutputSchema } from "@m5kdev/commons/modules/workflow/workflow.schema";
|
|
2
|
-
import type { Job } from "bullmq";
|
|
3
|
-
import type { ServerResultAsync } from "../base/base.dto";
|
|
4
|
-
import { BaseService } from "../base/base.service";
|
|
5
|
-
import type { WorkflowRepository } from "./workflow.repository";
|
|
6
|
-
export declare class WorkflowService extends BaseService<{
|
|
7
|
-
workflow: WorkflowRepository;
|
|
8
|
-
}, never> {
|
|
9
|
-
readonly read: import("../base/base.procedure").ServiceProcedure<{
|
|
10
|
-
jobId: string;
|
|
11
|
-
}, {
|
|
12
|
-
actor?: import("../base/base.actor").AuthenticatedActor | null;
|
|
13
|
-
} & Record<string, unknown> & {
|
|
14
|
-
actor: import("../base/base.actor").UserActor;
|
|
15
|
-
}, {
|
|
16
|
-
id: string;
|
|
17
|
-
userId: string | null;
|
|
18
|
-
jobId: string;
|
|
19
|
-
jobName: string;
|
|
20
|
-
queueName: string;
|
|
21
|
-
tags: string[] | null;
|
|
22
|
-
input: unknown;
|
|
23
|
-
output: unknown;
|
|
24
|
-
status: "queued" | "running" | "completed" | "failed";
|
|
25
|
-
error: string | null;
|
|
26
|
-
retries: number;
|
|
27
|
-
finishedAt: Date | null;
|
|
28
|
-
processedAt: Date | null;
|
|
29
|
-
createdAt: Date;
|
|
30
|
-
updatedAt: Date;
|
|
31
|
-
}>;
|
|
32
|
-
readonly list: import("../base/base.procedure").ServiceProcedure<{
|
|
33
|
-
status?: ("queued" | "running" | "completed" | "failed")[] | undefined;
|
|
34
|
-
jobName?: string | undefined;
|
|
35
|
-
}, {
|
|
36
|
-
actor?: import("../base/base.actor").AuthenticatedActor | null;
|
|
37
|
-
} & Record<string, unknown> & {
|
|
38
|
-
actor: import("../base/base.actor").UserActor;
|
|
39
|
-
}, {
|
|
40
|
-
id: string;
|
|
41
|
-
userId: string | null;
|
|
42
|
-
jobId: string;
|
|
43
|
-
jobName: string;
|
|
44
|
-
queueName: string;
|
|
45
|
-
tags: string[] | null;
|
|
46
|
-
input: unknown;
|
|
47
|
-
output: unknown;
|
|
48
|
-
status: "queued" | "running" | "completed" | "failed";
|
|
49
|
-
error: string | null;
|
|
50
|
-
retries: number;
|
|
51
|
-
finishedAt: Date | null;
|
|
52
|
-
processedAt: Date | null;
|
|
53
|
-
createdAt: Date;
|
|
54
|
-
updatedAt: Date;
|
|
55
|
-
}[]>;
|
|
56
|
-
added(params: Parameters<WorkflowRepository["added"]>[0]): ServerResultAsync<WorkflowReadOutputSchema>;
|
|
57
|
-
addedMany(params: Parameters<WorkflowRepository["addedMany"]>[0]): ServerResultAsync<WorkflowReadOutputSchema[]>;
|
|
58
|
-
started(job: Job): ServerResultAsync<WorkflowReadOutputSchema>;
|
|
59
|
-
failed(job?: Job, error?: Error): ServerResultAsync<WorkflowReadOutputSchema>;
|
|
60
|
-
completed(job: Job): ServerResultAsync<WorkflowReadOutputSchema>;
|
|
61
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.WorkflowService = void 0;
|
|
4
|
-
const base_service_1 = require("../base/base.service");
|
|
5
|
-
class WorkflowService extends base_service_1.BaseService {
|
|
6
|
-
read = this.procedure("workflowRead")
|
|
7
|
-
.requireAuth()
|
|
8
|
-
.handle(({ input, ctx }) => this.repository.workflow.read({ ...input, userId: ctx.actor.userId }));
|
|
9
|
-
list = this.procedure("workflowList")
|
|
10
|
-
.requireAuth()
|
|
11
|
-
.handle(({ input, ctx }) => this.repository.workflow.list({ ...input, userId: ctx.actor.userId }));
|
|
12
|
-
async added(params) {
|
|
13
|
-
return this.repository.workflow.added(params);
|
|
14
|
-
}
|
|
15
|
-
async addedMany(params) {
|
|
16
|
-
return this.repository.workflow.addedMany(params);
|
|
17
|
-
}
|
|
18
|
-
async started(job) {
|
|
19
|
-
if (!job.id)
|
|
20
|
-
return this.error("INTERNAL_SERVER_ERROR");
|
|
21
|
-
return this.repository.workflow.started({ jobId: job.id });
|
|
22
|
-
}
|
|
23
|
-
async failed(job, error) {
|
|
24
|
-
if (!job?.id)
|
|
25
|
-
return this.error("INTERNAL_SERVER_ERROR");
|
|
26
|
-
return this.repository.workflow.failed({
|
|
27
|
-
jobId: job.id,
|
|
28
|
-
error: error?.message || "Unknown error",
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
async completed(job) {
|
|
32
|
-
if (!job.id)
|
|
33
|
-
return this.error("INTERNAL_SERVER_ERROR");
|
|
34
|
-
return this.repository.workflow.completed({ jobId: job.id, output: job.returnvalue });
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
exports.WorkflowService = WorkflowService;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { type TRPCMethods } from "../../utils/trpc";
|
|
2
|
-
import type { WorkflowService } from "./workflow.service";
|
|
3
|
-
export declare function createWorkflowTRPC({ router, privateProcedure: procedure }: TRPCMethods, workflowService: WorkflowService): import("@trpc/server").TRPCBuiltRouter<{
|
|
4
|
-
ctx: import("../../utils/trpc").Context;
|
|
5
|
-
meta: any;
|
|
6
|
-
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
7
|
-
transformer: true;
|
|
8
|
-
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
9
|
-
read: import("@trpc/server").TRPCQueryProcedure<{
|
|
10
|
-
input: {
|
|
11
|
-
jobId: string;
|
|
12
|
-
};
|
|
13
|
-
output: {
|
|
14
|
-
id: string;
|
|
15
|
-
userId: string | null;
|
|
16
|
-
jobId: string;
|
|
17
|
-
jobName: string;
|
|
18
|
-
queueName: string;
|
|
19
|
-
tags: string[] | null;
|
|
20
|
-
input: unknown;
|
|
21
|
-
output: unknown;
|
|
22
|
-
status: "queued" | "running" | "completed" | "failed";
|
|
23
|
-
error: string | null;
|
|
24
|
-
retries: number;
|
|
25
|
-
finishedAt: Date | null;
|
|
26
|
-
processedAt: Date | null;
|
|
27
|
-
createdAt: Date;
|
|
28
|
-
updatedAt: Date;
|
|
29
|
-
};
|
|
30
|
-
meta: any;
|
|
31
|
-
}>;
|
|
32
|
-
list: import("@trpc/server").TRPCQueryProcedure<{
|
|
33
|
-
input: {
|
|
34
|
-
status?: ("queued" | "running" | "completed" | "failed")[] | undefined;
|
|
35
|
-
jobName?: string | undefined;
|
|
36
|
-
};
|
|
37
|
-
output: {
|
|
38
|
-
id: string;
|
|
39
|
-
userId: string | null;
|
|
40
|
-
jobId: string;
|
|
41
|
-
jobName: string;
|
|
42
|
-
queueName: string;
|
|
43
|
-
tags: string[] | null;
|
|
44
|
-
input: unknown;
|
|
45
|
-
output: unknown;
|
|
46
|
-
status: "queued" | "running" | "completed" | "failed";
|
|
47
|
-
error: string | null;
|
|
48
|
-
retries: number;
|
|
49
|
-
finishedAt: Date | null;
|
|
50
|
-
processedAt: Date | null;
|
|
51
|
-
createdAt: Date;
|
|
52
|
-
updatedAt: Date;
|
|
53
|
-
}[];
|
|
54
|
-
meta: any;
|
|
55
|
-
}>;
|
|
56
|
-
}>>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createWorkflowTRPC = createWorkflowTRPC;
|
|
4
|
-
const workflow_schema_1 = require("@m5kdev/commons/modules/workflow/workflow.schema");
|
|
5
|
-
const trpc_1 = require("../../utils/trpc");
|
|
6
|
-
function createWorkflowTRPC({ router, privateProcedure: procedure }, workflowService) {
|
|
7
|
-
return router({
|
|
8
|
-
read: procedure
|
|
9
|
-
.input(workflow_schema_1.workflowReadInputSchema)
|
|
10
|
-
.output(workflow_schema_1.workflowReadOutputSchema)
|
|
11
|
-
.query(async ({ ctx, input }) => {
|
|
12
|
-
return (0, trpc_1.handleTRPCResult)(await workflowService.read(input, ctx));
|
|
13
|
-
}),
|
|
14
|
-
list: procedure
|
|
15
|
-
.input(workflow_schema_1.workflowListInputSchema)
|
|
16
|
-
.output(workflow_schema_1.workflowListOutputSchema)
|
|
17
|
-
.query(async ({ ctx, input }) => {
|
|
18
|
-
return (0, trpc_1.handleTRPCResult)(await workflowService.list(input, ctx));
|
|
19
|
-
}),
|
|
20
|
-
});
|
|
21
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Job, JobsOptions } from "bullmq";
|
|
2
|
-
import type { ServerResultAsync } from "../base/base.dto";
|
|
3
|
-
import type { ServerError } from "../../utils/errors";
|
|
4
|
-
export type WorkflowMeta = {
|
|
5
|
-
queue?: string;
|
|
6
|
-
userId?: string;
|
|
7
|
-
tags?: string[];
|
|
8
|
-
timeout?: number;
|
|
9
|
-
disablePosthogCapture?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type WorkflowDataType<Payload> = {
|
|
12
|
-
payload: Payload;
|
|
13
|
-
meta: WorkflowMeta;
|
|
14
|
-
};
|
|
15
|
-
export type WorkflowJob<DataType extends WorkflowDataType<any>, ReturnType extends ServerResultAsync<any>, Name extends string> = JobsOptions & {
|
|
16
|
-
run: (job: Job<DataType, ReturnType, Name>) => ReturnType;
|
|
17
|
-
onComplete?: (job: Job<DataType, ReturnType, Name>) => ReturnType;
|
|
18
|
-
onSuccess?: (job: Job<DataType, ReturnType, Name>) => ServerResultAsync<any>;
|
|
19
|
-
onFailure?: (job: Job<DataType, ReturnType, Name>, error?: ServerError | unknown) => ServerResultAsync<any>;
|
|
20
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { WorkflowReadOutputSchema } from "@m5kdev/commons/modules/workflow/workflow.schema";
|
|
2
|
-
import { type JobsOptions, type Queue, Worker, type WorkerOptions } from "bullmq";
|
|
3
|
-
import type { ServerResultAsync } from "../base/base.dto";
|
|
4
|
-
import type { WorkflowService } from "./workflow.service";
|
|
5
|
-
import type { WorkflowDataType, WorkflowJob, WorkflowMeta } from "./workflow.types";
|
|
6
|
-
export declare function createWorkflowTrigger<Jobs extends Record<string, WorkflowJob<WorkflowDataType<any>, any, string>>>(service: WorkflowService, queues: Record<string, Queue>, defaultQueue: string): {
|
|
7
|
-
trigger: ({ name, payload, meta, options, }: {
|
|
8
|
-
name: string;
|
|
9
|
-
payload: Parameters<Jobs[keyof Jobs & string]["run"]>[0]["data"]["payload"];
|
|
10
|
-
meta?: WorkflowMeta;
|
|
11
|
-
options?: JobsOptions;
|
|
12
|
-
}) => ServerResultAsync<WorkflowReadOutputSchema>;
|
|
13
|
-
triggerMany: ({ name, payload, meta, options, }: {
|
|
14
|
-
name: string;
|
|
15
|
-
payload: Parameters<Jobs[keyof Jobs & string]["run"]>[0]["data"]["payload"][];
|
|
16
|
-
meta?: WorkflowMeta;
|
|
17
|
-
options?: JobsOptions;
|
|
18
|
-
}) => ServerResultAsync<WorkflowReadOutputSchema[]>;
|
|
19
|
-
};
|
|
20
|
-
export declare function createWorkflowWorker<Jobs extends Record<string, WorkflowJob<WorkflowDataType<any>, any, string>>>(service: WorkflowService, queueName: string, workerOptions: WorkerOptions, jobs: Jobs, errorHandler?: (error: unknown) => void): Worker<any, any, string>;
|
|
21
|
-
export declare function createWorkflowWorkers<Jobs extends Record<string, WorkflowJob<WorkflowDataType<any>, any, string>>>(service: WorkflowService, workerSettings: Record<string, WorkerOptions>, jobs: Jobs, errorHandler?: (error: unknown) => void): Record<string, Worker<any, any, string>>;
|