@c15t/backend 0.0.1-rc.10
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/.turbo/turbo-build.log +11 -0
- package/.turbo/turbo-check-types.log +5 -0
- package/.turbo/turbo-fmt.log +7 -0
- package/.turbo/turbo-lint.log +6 -0
- package/.turbo/turbo-test.log +26 -0
- package/README-next.md +223 -0
- package/README.md +164 -0
- package/dist/api/call.d.ts +176 -0
- package/dist/api/call.d.ts.map +1 -0
- package/dist/api/index.d.ts +935 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/middlewares/index.d.ts +39 -0
- package/dist/api/middlewares/index.d.ts.map +1 -0
- package/dist/api/middlewares/origin-check.d.ts +82 -0
- package/dist/api/middlewares/origin-check.d.ts.map +1 -0
- package/dist/api/middlewares/validate-context.d.ts +38 -0
- package/dist/api/middlewares/validate-context.d.ts.map +1 -0
- package/dist/api/routes/__tests__/consent.test.d.ts +2 -0
- package/dist/api/routes/__tests__/consent.test.d.ts.map +1 -0
- package/dist/api/routes/__tests__/status.test.d.ts +2 -0
- package/dist/api/routes/__tests__/status.test.d.ts.map +1 -0
- package/dist/api/routes/error.d.ts +57 -0
- package/dist/api/routes/error.d.ts.map +1 -0
- package/dist/api/routes/generate-consent-receipt.d.ts +130 -0
- package/dist/api/routes/generate-consent-receipt.d.ts.map +1 -0
- package/dist/api/routes/get-consent-history.d.ts +133 -0
- package/dist/api/routes/get-consent-history.d.ts.map +1 -0
- package/dist/api/routes/get-consent-policy.d.ts +164 -0
- package/dist/api/routes/get-consent-policy.d.ts.map +1 -0
- package/dist/api/routes/get-consent.d.ts +148 -0
- package/dist/api/routes/get-consent.d.ts.map +1 -0
- package/dist/api/routes/index.d.ts +339 -0
- package/dist/api/routes/index.d.ts.map +1 -0
- package/dist/api/routes/ok.d.ts +87 -0
- package/dist/api/routes/ok.d.ts.map +1 -0
- package/dist/api/routes/set-consent.d.ts +245 -0
- package/dist/api/routes/set-consent.d.ts.map +1 -0
- package/dist/api/routes/show-consent-banner.d.ts +127 -0
- package/dist/api/routes/show-consent-banner.d.ts.map +1 -0
- package/dist/api/routes/status.d.ts +61 -0
- package/dist/api/routes/status.d.ts.map +1 -0
- package/dist/api/routes/verify-consent.d.ts +179 -0
- package/dist/api/routes/verify-consent.d.ts.map +1 -0
- package/dist/api/routes/withdraw-consent.d.ts +194 -0
- package/dist/api/routes/withdraw-consent.d.ts.map +1 -0
- package/dist/api/to-endpoints.d.ts +35 -0
- package/dist/api/to-endpoints.d.ts.map +1 -0
- package/dist/client/index.cjs +139 -0
- package/dist/client/index.d.ts +203 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +106 -0
- package/dist/client/types.d.ts +431 -0
- package/dist/client/types.d.ts.map +1 -0
- package/dist/core.d.ts +124 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.test.d.ts +2 -0
- package/dist/core.test.d.ts.map +1 -0
- package/dist/db/adapters/drizzle-adapter/drizzle-adapter.d.ts +122 -0
- package/dist/db/adapters/drizzle-adapter/drizzle-adapter.d.ts.map +1 -0
- package/dist/db/adapters/drizzle-adapter/index.d.ts +2 -0
- package/dist/db/adapters/drizzle-adapter/index.d.ts.map +1 -0
- package/dist/db/adapters/drizzle.cjs +1531 -0
- package/dist/db/adapters/drizzle.js +1489 -0
- package/dist/db/adapters/kysely-adapter/dialect.d.ts +72 -0
- package/dist/db/adapters/kysely-adapter/dialect.d.ts.map +1 -0
- package/dist/db/adapters/kysely-adapter/index.d.ts +4 -0
- package/dist/db/adapters/kysely-adapter/index.d.ts.map +1 -0
- package/dist/db/adapters/kysely-adapter/kysely-adapter.d.ts +98 -0
- package/dist/db/adapters/kysely-adapter/kysely-adapter.d.ts.map +1 -0
- package/dist/db/adapters/kysely-adapter/types.d.ts +281 -0
- package/dist/db/adapters/kysely-adapter/types.d.ts.map +1 -0
- package/dist/db/adapters/kysely.cjs +1551 -0
- package/dist/db/adapters/kysely.js +1508 -0
- package/dist/db/adapters/memory-adapter/index.d.ts +2 -0
- package/dist/db/adapters/memory-adapter/index.d.ts.map +1 -0
- package/dist/db/adapters/memory-adapter/memory-adapter.d.ts +56 -0
- package/dist/db/adapters/memory-adapter/memory-adapter.d.ts.map +1 -0
- package/dist/db/adapters/memory.cjs +1391 -0
- package/dist/db/adapters/memory.js +1349 -0
- package/dist/db/adapters/prisma-adapter/index.d.ts +2 -0
- package/dist/db/adapters/prisma-adapter/index.d.ts.map +1 -0
- package/dist/db/adapters/prisma-adapter/prisma-adapter.d.ts +143 -0
- package/dist/db/adapters/prisma-adapter/prisma-adapter.d.ts.map +1 -0
- package/dist/db/adapters/prisma.cjs +1503 -0
- package/dist/db/adapters/prisma.js +1461 -0
- package/dist/db/adapters/types.d.ts +154 -0
- package/dist/db/adapters/types.d.ts.map +1 -0
- package/dist/db/adapters/utils.d.ts +36 -0
- package/dist/db/adapters/utils.d.ts.map +1 -0
- package/dist/db/core/fields/field-factory.d.ts +383 -0
- package/dist/db/core/fields/field-factory.d.ts.map +1 -0
- package/dist/db/core/fields/field-inference.d.ts +218 -0
- package/dist/db/core/fields/field-inference.d.ts.map +1 -0
- package/dist/db/core/fields/field-options-integration.d.ts +90 -0
- package/dist/db/core/fields/field-options-integration.d.ts.map +1 -0
- package/dist/db/core/fields/field-types.d.ts +182 -0
- package/dist/db/core/fields/field-types.d.ts.map +1 -0
- package/dist/db/core/fields/id-generator.d.ts +19 -0
- package/dist/db/core/fields/id-generator.d.ts.map +1 -0
- package/dist/db/core/fields/index.d.ts +8 -0
- package/dist/db/core/fields/index.d.ts.map +1 -0
- package/dist/db/core/fields/superjson-utils.d.ts +34 -0
- package/dist/db/core/fields/superjson-utils.d.ts.map +1 -0
- package/dist/db/core/fields/zod-fields.d.ts +1011 -0
- package/dist/db/core/fields/zod-fields.d.ts.map +1 -0
- package/dist/db/core/get-schema.d.ts +36 -0
- package/dist/db/core/get-schema.d.ts.map +1 -0
- package/dist/db/core/types.d.ts +41 -0
- package/dist/db/core/types.d.ts.map +1 -0
- package/dist/db/create-registry.d.ts +760 -0
- package/dist/db/create-registry.d.ts.map +1 -0
- package/dist/db/hooks/create-hooks.d.ts +32 -0
- package/dist/db/hooks/create-hooks.d.ts.map +1 -0
- package/dist/db/hooks/index.d.ts +40 -0
- package/dist/db/hooks/index.d.ts.map +1 -0
- package/dist/db/hooks/types.d.ts +133 -0
- package/dist/db/hooks/types.d.ts.map +1 -0
- package/dist/db/hooks/update-hooks.d.ts +33 -0
- package/dist/db/hooks/update-hooks.d.ts.map +1 -0
- package/dist/db/hooks/update-many-hooks.d.ts +55 -0
- package/dist/db/hooks/update-many-hooks.d.ts.map +1 -0
- package/dist/db/hooks/utils.d.ts +62 -0
- package/dist/db/hooks/utils.d.ts.map +1 -0
- package/dist/db/hooks/with-hooks-factory.d.ts +33 -0
- package/dist/db/hooks/with-hooks-factory.d.ts.map +1 -0
- package/dist/db/index.cjs +2458 -0
- package/dist/db/index.d.ts +11 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +2404 -0
- package/dist/db/migration/get-migration.d.ts +32 -0
- package/dist/db/migration/get-migration.d.ts.map +1 -0
- package/dist/db/migration/get-schema/get-schema.d.ts +27 -0
- package/dist/db/migration/get-schema/get-schema.d.ts.map +1 -0
- package/dist/db/migration/get-schema/index.d.ts +21 -0
- package/dist/db/migration/get-schema/index.d.ts.map +1 -0
- package/dist/db/migration/get-schema/process-fields.d.ts +16 -0
- package/dist/db/migration/get-schema/process-fields.d.ts.map +1 -0
- package/dist/db/migration/get-schema/process-tables.d.ts +13 -0
- package/dist/db/migration/get-schema/process-tables.d.ts.map +1 -0
- package/dist/db/migration/get-schema/types.d.ts +17 -0
- package/dist/db/migration/get-schema/types.d.ts.map +1 -0
- package/dist/db/migration/index.cjs +1613 -0
- package/dist/db/migration/index.d.ts +14 -0
- package/dist/db/migration/index.d.ts.map +1 -0
- package/dist/db/migration/index.js +1571 -0
- package/dist/db/migration/migration-builders.d.ts +28 -0
- package/dist/db/migration/migration-builders.d.ts.map +1 -0
- package/dist/db/migration/migration-execution.d.ts +12 -0
- package/dist/db/migration/migration-execution.d.ts.map +1 -0
- package/dist/db/migration/schema-comparison.d.ts +54 -0
- package/dist/db/migration/schema-comparison.d.ts.map +1 -0
- package/dist/db/migration/type-mapping.d.ts +86 -0
- package/dist/db/migration/type-mapping.d.ts.map +1 -0
- package/dist/db/migration/types.d.ts +37 -0
- package/dist/db/migration/types.d.ts.map +1 -0
- package/dist/db/schema/audit-log/index.d.ts +4 -0
- package/dist/db/schema/audit-log/index.d.ts.map +1 -0
- package/dist/db/schema/audit-log/registry.d.ts +128 -0
- package/dist/db/schema/audit-log/registry.d.ts.map +1 -0
- package/dist/db/schema/audit-log/schema.d.ts +67 -0
- package/dist/db/schema/audit-log/schema.d.ts.map +1 -0
- package/dist/db/schema/audit-log/table.d.ts +175 -0
- package/dist/db/schema/audit-log/table.d.ts.map +1 -0
- package/dist/db/schema/audit-log/types.d.ts +29 -0
- package/dist/db/schema/audit-log/types.d.ts.map +1 -0
- package/dist/db/schema/consent/index.d.ts +4 -0
- package/dist/db/schema/consent/index.d.ts.map +1 -0
- package/dist/db/schema/consent/registry.d.ts +318 -0
- package/dist/db/schema/consent/registry.d.ts.map +1 -0
- package/dist/db/schema/consent/schema.d.ts +135 -0
- package/dist/db/schema/consent/schema.d.ts.map +1 -0
- package/dist/db/schema/consent/table.d.ts +245 -0
- package/dist/db/schema/consent/table.d.ts.map +1 -0
- package/dist/db/schema/consent/types.d.ts +37 -0
- package/dist/db/schema/consent/types.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/index.d.ts +4 -0
- package/dist/db/schema/consent-geo-location/index.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/registry.d.ts +96 -0
- package/dist/db/schema/consent-geo-location/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/schema.d.ts +71 -0
- package/dist/db/schema/consent-geo-location/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/table.d.ts +167 -0
- package/dist/db/schema/consent-geo-location/table.d.ts.map +1 -0
- package/dist/db/schema/consent-geo-location/types.d.ts +21 -0
- package/dist/db/schema/consent-geo-location/types.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/index.d.ts +4 -0
- package/dist/db/schema/consent-policy/index.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/registry.d.ts +186 -0
- package/dist/db/schema/consent-policy/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/schema.d.ts +68 -0
- package/dist/db/schema/consent-policy/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/table.d.ts +147 -0
- package/dist/db/schema/consent-policy/table.d.ts.map +1 -0
- package/dist/db/schema/consent-policy/types.d.ts +28 -0
- package/dist/db/schema/consent-policy/types.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/index.d.ts +4 -0
- package/dist/db/schema/consent-purpose/index.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/registry.d.ts +136 -0
- package/dist/db/schema/consent-purpose/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/schema.d.ts +79 -0
- package/dist/db/schema/consent-purpose/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/table.d.ts +161 -0
- package/dist/db/schema/consent-purpose/table.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose/types.d.ts +16 -0
- package/dist/db/schema/consent-purpose/types.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/index.d.ts +4 -0
- package/dist/db/schema/consent-purpose-junction/index.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/registry.d.ts +109 -0
- package/dist/db/schema/consent-purpose-junction/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/schema.d.ts +57 -0
- package/dist/db/schema/consent-purpose-junction/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/table.d.ts +138 -0
- package/dist/db/schema/consent-purpose-junction/table.d.ts.map +1 -0
- package/dist/db/schema/consent-purpose-junction/types.d.ts +14 -0
- package/dist/db/schema/consent-purpose-junction/types.d.ts.map +1 -0
- package/dist/db/schema/consent-record/index.d.ts +4 -0
- package/dist/db/schema/consent-record/index.d.ts.map +1 -0
- package/dist/db/schema/consent-record/registry.d.ts +119 -0
- package/dist/db/schema/consent-record/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-record/schema.d.ts +57 -0
- package/dist/db/schema/consent-record/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-record/table.d.ts +123 -0
- package/dist/db/schema/consent-record/table.d.ts.map +1 -0
- package/dist/db/schema/consent-record/types.d.ts +21 -0
- package/dist/db/schema/consent-record/types.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/index.d.ts +4 -0
- package/dist/db/schema/consent-withdrawal/index.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/registry.d.ts +134 -0
- package/dist/db/schema/consent-withdrawal/registry.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/schema.d.ts +67 -0
- package/dist/db/schema/consent-withdrawal/schema.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/table.d.ts +170 -0
- package/dist/db/schema/consent-withdrawal/table.d.ts.map +1 -0
- package/dist/db/schema/consent-withdrawal/types.d.ts +28 -0
- package/dist/db/schema/consent-withdrawal/types.d.ts.map +1 -0
- package/dist/db/schema/definition.d.ts +1100 -0
- package/dist/db/schema/definition.d.ts.map +1 -0
- package/dist/db/schema/domain/index.d.ts +4 -0
- package/dist/db/schema/domain/index.d.ts.map +1 -0
- package/dist/db/schema/domain/registry.d.ts +169 -0
- package/dist/db/schema/domain/registry.d.ts.map +1 -0
- package/dist/db/schema/domain/schema.d.ts +60 -0
- package/dist/db/schema/domain/schema.d.ts.map +1 -0
- package/dist/db/schema/domain/table.d.ts +140 -0
- package/dist/db/schema/domain/table.d.ts.map +1 -0
- package/dist/db/schema/domain/types.d.ts +27 -0
- package/dist/db/schema/domain/types.d.ts.map +1 -0
- package/dist/db/schema/geo-location/index.d.ts +4 -0
- package/dist/db/schema/geo-location/index.d.ts.map +1 -0
- package/dist/db/schema/geo-location/registry.d.ts +114 -0
- package/dist/db/schema/geo-location/registry.d.ts.map +1 -0
- package/dist/db/schema/geo-location/schema.d.ts +58 -0
- package/dist/db/schema/geo-location/schema.d.ts.map +1 -0
- package/dist/db/schema/geo-location/table.d.ts +132 -0
- package/dist/db/schema/geo-location/table.d.ts.map +1 -0
- package/dist/db/schema/geo-location/types.d.ts +17 -0
- package/dist/db/schema/geo-location/types.d.ts.map +1 -0
- package/dist/db/schema/index.d.ts +85 -0
- package/dist/db/schema/index.d.ts.map +1 -0
- package/dist/db/schema/parser.d.ts +183 -0
- package/dist/db/schema/parser.d.ts.map +1 -0
- package/dist/db/schema/schemas.d.ts +383 -0
- package/dist/db/schema/schemas.d.ts.map +1 -0
- package/dist/db/schema/subject/index.d.ts +4 -0
- package/dist/db/schema/subject/index.d.ts.map +1 -0
- package/dist/db/schema/subject/registry.d.ts +141 -0
- package/dist/db/schema/subject/registry.d.ts.map +1 -0
- package/dist/db/schema/subject/schema.d.ts +56 -0
- package/dist/db/schema/subject/schema.d.ts.map +1 -0
- package/dist/db/schema/subject/table.d.ts +136 -0
- package/dist/db/schema/subject/table.d.ts.map +1 -0
- package/dist/db/schema/subject/types.d.ts +22 -0
- package/dist/db/schema/subject/types.d.ts.map +1 -0
- package/dist/db/schema/types.d.ts +136 -0
- package/dist/db/schema/types.d.ts.map +1 -0
- package/dist/db/utils/adapter-factory.d.ts +21 -0
- package/dist/db/utils/adapter-factory.d.ts.map +1 -0
- package/dist/db/utils/index.d.ts +10 -0
- package/dist/db/utils/index.d.ts.map +1 -0
- package/dist/db/utils.d.ts +4 -0
- package/dist/db/utils.d.ts.map +1 -0
- package/dist/error/codes.cjs +68 -0
- package/dist/error/codes.d.ts +175 -0
- package/dist/error/codes.d.ts.map +1 -0
- package/dist/error/codes.js +35 -0
- package/dist/error/error.d.ts +79 -0
- package/dist/error/error.d.ts.map +1 -0
- package/dist/error/index.cjs +172 -0
- package/dist/error/index.d.ts +9 -0
- package/dist/error/index.d.ts.map +1 -0
- package/dist/error/index.js +129 -0
- package/dist/error/logging.d.ts +25 -0
- package/dist/error/logging.d.ts.map +1 -0
- package/dist/error/pipeline.d.ts +19 -0
- package/dist/error/pipeline.d.ts.map +1 -0
- package/dist/error/recovery.d.ts +22 -0
- package/dist/error/recovery.d.ts.map +1 -0
- package/dist/error/results.d.ts +56 -0
- package/dist/error/results.d.ts.map +1 -0
- package/dist/index.cjs +4777 -0
- package/dist/index.d.ts +46 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4708 -0
- package/dist/init.d.ts +52 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.test.d.ts +2 -0
- package/dist/init.test.d.ts.map +1 -0
- package/dist/integrations/index.cjs +281 -0
- package/dist/integrations/index.d.ts +7 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +248 -0
- package/dist/integrations/next.cjs +131 -0
- package/dist/integrations/next.d.ts +29 -0
- package/dist/integrations/next.d.ts.map +1 -0
- package/dist/integrations/next.js +99 -0
- package/dist/integrations/react.cjs +182 -0
- package/dist/integrations/react.d.ts +257 -0
- package/dist/integrations/react.d.ts.map +1 -0
- package/dist/integrations/react.js +150 -0
- package/dist/plugins/geo/index.d.ts +2 -0
- package/dist/plugins/geo/index.d.ts.map +1 -0
- package/dist/test/utils.d.ts +65 -0
- package/dist/test/utils.d.ts.map +1 -0
- package/dist/types/api.d.ts +89 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/context.d.ts +205 -0
- package/dist/types/context.d.ts.map +1 -0
- package/dist/types/helper.d.ts +78 -0
- package/dist/types/helper.d.ts.map +1 -0
- package/dist/types/index.cjs +19 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +0 -0
- package/dist/types/options.d.ts +172 -0
- package/dist/types/options.d.ts.map +1 -0
- package/dist/types/plugins.d.ts +442 -0
- package/dist/types/plugins.d.ts.map +1 -0
- package/dist/utils/env.d.ts +77 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/hide-metadata.d.ts +22 -0
- package/dist/utils/hide-metadata.d.ts.map +1 -0
- package/dist/utils/index.cjs +268 -0
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +210 -0
- package/dist/utils/ip.d.ts +10 -0
- package/dist/utils/ip.d.ts.map +1 -0
- package/dist/utils/json.d.ts +14 -0
- package/dist/utils/json.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +108 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/url.d.ts +87 -0
- package/dist/utils/url.d.ts.map +1 -0
- package/dist/utils/wildcard.d.ts +46 -0
- package/dist/utils/wildcard.d.ts.map +1 -0
- package/knip.json +37 -0
- package/package.json +146 -0
- package/rslib.config.ts +104 -0
- package/src/api/call.ts +177 -0
- package/src/api/index.ts +303 -0
- package/src/api/middlewares/index.ts +38 -0
- package/src/api/middlewares/origin-check.ts +260 -0
- package/src/api/middlewares/validate-context.ts +175 -0
- package/src/api/routes/__tests__/consent.test.ts +270 -0
- package/src/api/routes/__tests__/status.test.ts +36 -0
- package/src/api/routes/error.ts +130 -0
- package/src/api/routes/generate-consent-receipt.ts +244 -0
- package/src/api/routes/get-consent-history.ts +128 -0
- package/src/api/routes/get-consent-policy.ts +327 -0
- package/src/api/routes/get-consent.ts +230 -0
- package/src/api/routes/index.ts +12 -0
- package/src/api/routes/ok.ts +45 -0
- package/src/api/routes/set-consent.ts +328 -0
- package/src/api/routes/show-consent-banner.ts +149 -0
- package/src/api/routes/status.ts +62 -0
- package/src/api/routes/verify-consent.ts +272 -0
- package/src/api/routes/withdraw-consent.ts +293 -0
- package/src/api/to-endpoints.ts +371 -0
- package/src/client/index.ts +471 -0
- package/src/client/types.ts +458 -0
- package/src/core.test.ts +303 -0
- package/src/core.ts +267 -0
- package/src/db/adapters/drizzle-adapter/drizzle-adapter.ts +711 -0
- package/src/db/adapters/drizzle-adapter/index.ts +1 -0
- package/src/db/adapters/kysely-adapter/dialect.ts +192 -0
- package/src/db/adapters/kysely-adapter/index.ts +3 -0
- package/src/db/adapters/kysely-adapter/kysely-adapter.ts +1168 -0
- package/src/db/adapters/kysely-adapter/types.ts +307 -0
- package/src/db/adapters/memory-adapter/index.ts +1 -0
- package/src/db/adapters/memory-adapter/memory-adapter.ts +648 -0
- package/src/db/adapters/prisma-adapter/index.ts +1 -0
- package/src/db/adapters/prisma-adapter/prisma-adapter.ts +586 -0
- package/src/db/adapters/types.ts +203 -0
- package/src/db/adapters/utils.ts +51 -0
- package/src/db/core/fields/field-factory.ts +804 -0
- package/src/db/core/fields/field-inference.ts +298 -0
- package/src/db/core/fields/field-options-integration.ts +135 -0
- package/src/db/core/fields/field-types.ts +233 -0
- package/src/db/core/fields/id-generator.ts +57 -0
- package/src/db/core/fields/index.ts +56 -0
- package/src/db/core/fields/superjson-utils.ts +155 -0
- package/src/db/core/fields/zod-fields.ts +269 -0
- package/src/db/core/get-schema.ts +102 -0
- package/src/db/core/types.ts +52 -0
- package/src/db/create-registry.ts +31 -0
- package/src/db/hooks/create-hooks.ts +88 -0
- package/src/db/hooks/index.ts +39 -0
- package/src/db/hooks/types.ts +164 -0
- package/src/db/hooks/update-hooks.ts +91 -0
- package/src/db/hooks/update-many-hooks.ts +176 -0
- package/src/db/hooks/utils.ts +151 -0
- package/src/db/hooks/with-hooks-factory.ts +68 -0
- package/src/db/index.ts +32 -0
- package/src/db/migration/get-migration.ts +89 -0
- package/src/db/migration/get-schema/get-schema.ts +44 -0
- package/src/db/migration/get-schema/index.ts +20 -0
- package/src/db/migration/get-schema/process-fields.ts +66 -0
- package/src/db/migration/get-schema/process-tables.ts +68 -0
- package/src/db/migration/get-schema/types.ts +18 -0
- package/src/db/migration/index.ts +18 -0
- package/src/db/migration/migration-builders.ts +170 -0
- package/src/db/migration/migration-execution.ts +79 -0
- package/src/db/migration/schema-comparison.ts +216 -0
- package/src/db/migration/type-mapping.ts +255 -0
- package/src/db/migration/types.ts +46 -0
- package/src/db/schema/audit-log/index.ts +3 -0
- package/src/db/schema/audit-log/registry.ts +228 -0
- package/src/db/schema/audit-log/schema.ts +46 -0
- package/src/db/schema/audit-log/table.ts +185 -0
- package/src/db/schema/audit-log/types.ts +29 -0
- package/src/db/schema/consent/index.ts +3 -0
- package/src/db/schema/consent/registry.ts +381 -0
- package/src/db/schema/consent/schema.ts +65 -0
- package/src/db/schema/consent/table.ts +220 -0
- package/src/db/schema/consent/types.ts +39 -0
- package/src/db/schema/consent-geo-location/index.ts +3 -0
- package/src/db/schema/consent-geo-location/registry.ts +124 -0
- package/src/db/schema/consent-geo-location/schema.ts +51 -0
- package/src/db/schema/consent-geo-location/table.ts +169 -0
- package/src/db/schema/consent-geo-location/types.ts +21 -0
- package/src/db/schema/consent-policy/index.ts +3 -0
- package/src/db/schema/consent-policy/registry.ts +313 -0
- package/src/db/schema/consent-policy/schema.ts +47 -0
- package/src/db/schema/consent-policy/table.ts +141 -0
- package/src/db/schema/consent-policy/types.ts +28 -0
- package/src/db/schema/consent-purpose/index.ts +3 -0
- package/src/db/schema/consent-purpose/registry.ts +188 -0
- package/src/db/schema/consent-purpose/schema.ts +58 -0
- package/src/db/schema/consent-purpose/table.ts +154 -0
- package/src/db/schema/consent-purpose/types.ts +16 -0
- package/src/db/schema/consent-purpose-junction/index.ts +3 -0
- package/src/db/schema/consent-purpose-junction/registry.ts +189 -0
- package/src/db/schema/consent-purpose-junction/schema.ts +49 -0
- package/src/db/schema/consent-purpose-junction/table.ts +142 -0
- package/src/db/schema/consent-purpose-junction/types.ts +14 -0
- package/src/db/schema/consent-record/index.ts +3 -0
- package/src/db/schema/consent-record/registry.ts +209 -0
- package/src/db/schema/consent-record/schema.ts +42 -0
- package/src/db/schema/consent-record/table.ts +124 -0
- package/src/db/schema/consent-record/types.ts +21 -0
- package/src/db/schema/consent-withdrawal/index.ts +3 -0
- package/src/db/schema/consent-withdrawal/registry.ts +219 -0
- package/src/db/schema/consent-withdrawal/schema.ts +48 -0
- package/src/db/schema/consent-withdrawal/table.ts +181 -0
- package/src/db/schema/consent-withdrawal/types.ts +29 -0
- package/src/db/schema/definition.ts +196 -0
- package/src/db/schema/domain/index.ts +3 -0
- package/src/db/schema/domain/registry.ts +272 -0
- package/src/db/schema/domain/schema.ts +43 -0
- package/src/db/schema/domain/table.ts +137 -0
- package/src/db/schema/domain/types.ts +27 -0
- package/src/db/schema/geo-location/index.ts +3 -0
- package/src/db/schema/geo-location/registry.ts +159 -0
- package/src/db/schema/geo-location/schema.ts +45 -0
- package/src/db/schema/geo-location/table.ts +148 -0
- package/src/db/schema/geo-location/types.ts +18 -0
- package/src/db/schema/index.ts +96 -0
- package/src/db/schema/parser.ts +417 -0
- package/src/db/schema/schemas.ts +35 -0
- package/src/db/schema/subject/index.ts +3 -0
- package/src/db/schema/subject/registry.ts +371 -0
- package/src/db/schema/subject/schema.ts +41 -0
- package/src/db/schema/subject/table.ts +139 -0
- package/src/db/schema/subject/types.ts +22 -0
- package/src/db/schema/types.ts +154 -0
- package/src/db/utils/adapter-factory.ts +64 -0
- package/src/db/utils/index.ts +10 -0
- package/src/db/utils.ts +42 -0
- package/src/docs/ADVANCED_JSON_HANDLING.md +99 -0
- package/src/docs/neverthrow.md +171 -0
- package/src/error/codes.ts +201 -0
- package/src/error/error.ts +145 -0
- package/src/error/index.ts +23 -0
- package/src/error/logging.ts +52 -0
- package/src/error/pipeline.ts +57 -0
- package/src/error/recovery.ts +45 -0
- package/src/error/results.ts +100 -0
- package/src/index.ts +79 -0
- package/src/init.test.ts +235 -0
- package/src/init.ts +261 -0
- package/src/integrations/index.ts +10 -0
- package/src/integrations/next.ts +136 -0
- package/src/integrations/react.ts +567 -0
- package/src/plugins/geo/index.ts +563 -0
- package/src/test/utils.ts +244 -0
- package/src/types/api.ts +101 -0
- package/src/types/context.ts +235 -0
- package/src/types/helper.ts +87 -0
- package/src/types/index.ts +5 -0
- package/src/types/options.ts +189 -0
- package/src/types/plugins.ts +538 -0
- package/src/utils/env.ts +103 -0
- package/src/utils/hide-metadata.ts +21 -0
- package/src/utils/index.ts +17 -0
- package/src/utils/ip.ts +45 -0
- package/src/utils/json.ts +19 -0
- package/src/utils/logger.ts +252 -0
- package/src/utils/url.ts +194 -0
- package/src/utils/wildcard.ts +253 -0
- package/tsconfig.json +12 -0
- package/vitest.config.ts +14 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export interface GetPolicyResponse {
|
|
3
|
+
success: boolean;
|
|
4
|
+
data: {
|
|
5
|
+
policy: {
|
|
6
|
+
id: string;
|
|
7
|
+
domain: string;
|
|
8
|
+
version: string;
|
|
9
|
+
content: string;
|
|
10
|
+
availablePreferences?: Record<string, unknown>;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
};
|
|
13
|
+
subjectConsentStatus?: {
|
|
14
|
+
hasConsent: boolean;
|
|
15
|
+
currentPreferences: Record<string, string | null> | null;
|
|
16
|
+
consentedAt: string | null;
|
|
17
|
+
needsRenewal: boolean;
|
|
18
|
+
identifiedBy: string | null;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Endpoint for retrieving consent policy information.
|
|
24
|
+
*
|
|
25
|
+
* This endpoint allows clients to retrieve the consent policy for a domain.
|
|
26
|
+
* It supports retrieving the latest policy or a specific version.
|
|
27
|
+
* It can also return personalized policy information if subject identifiers are provided.
|
|
28
|
+
*
|
|
29
|
+
* @endpoint GET /consent/policy
|
|
30
|
+
* @requestExample
|
|
31
|
+
* ```
|
|
32
|
+
* // Basic policy request
|
|
33
|
+
* GET /api/consent/policy?domain=example.com
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @requestExample
|
|
37
|
+
* ```
|
|
38
|
+
* // Specific version
|
|
39
|
+
* GET /api/consent/policy?domain=example.com&version=1.2
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @requestExample
|
|
43
|
+
* ```
|
|
44
|
+
* // With subject context
|
|
45
|
+
* GET /api/consent/policy?domain=example.com&subjectId=550e8400-e29b-41d4-a716-446655440000
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @responseExample
|
|
49
|
+
* ```json
|
|
50
|
+
* {
|
|
51
|
+
* "success": true,
|
|
52
|
+
* "data": {
|
|
53
|
+
* "policy": {
|
|
54
|
+
* "id": 1,
|
|
55
|
+
* "domain": "example.com",
|
|
56
|
+
* "version": "1.0",
|
|
57
|
+
* "content": {
|
|
58
|
+
* "title": "Privacy Policy",
|
|
59
|
+
* "description": "How we use your data",
|
|
60
|
+
* "lastUpdated": "2023-04-01"
|
|
61
|
+
* },
|
|
62
|
+
* "availablePreferences": {
|
|
63
|
+
* "marketing": {
|
|
64
|
+
* "title": "Marketing",
|
|
65
|
+
* "description": "Allow us to send you marketing communications",
|
|
66
|
+
* "default": false
|
|
67
|
+
* },
|
|
68
|
+
* "analytics": {
|
|
69
|
+
* "title": "Analytics",
|
|
70
|
+
* "description": "Allow us to collect usage data to improve our service",
|
|
71
|
+
* "default": true
|
|
72
|
+
* }
|
|
73
|
+
* },
|
|
74
|
+
* "createdAt": "2023-04-01T12:34:56.789Z"
|
|
75
|
+
* },
|
|
76
|
+
* "subjectConsentStatus": {
|
|
77
|
+
* "hasConsent": true,
|
|
78
|
+
* "currentPreferences": {
|
|
79
|
+
* "marketing": null,
|
|
80
|
+
* "analytics": "2023-04-02T10:30:00.000Z"
|
|
81
|
+
* },
|
|
82
|
+
* "consentedAt": "2023-04-02T10:30:00.000Z",
|
|
83
|
+
* "needsRenewal": false
|
|
84
|
+
* }
|
|
85
|
+
* }
|
|
86
|
+
* }
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @returns {Object} Result of getting policy
|
|
90
|
+
* @returns {boolean} success - Whether the request was successful
|
|
91
|
+
* @returns {Object} data - The policy data
|
|
92
|
+
* @returns {Object} data.policy - The consent policy information
|
|
93
|
+
* @returns {Object} [data.subjectConsentStatus] - Subject's consent status if subject identifiers were provided
|
|
94
|
+
*
|
|
95
|
+
* @throws {C15TError} BAD_REQUEST - When request parameters are invalid
|
|
96
|
+
* @throws {C15TError} NOT_FOUND - When the domain or policy version doesn't exist
|
|
97
|
+
*/
|
|
98
|
+
export declare const getConsentPolicy: {
|
|
99
|
+
<C extends [import("better-call").InputContext<"/consent/policy", {
|
|
100
|
+
method: "GET";
|
|
101
|
+
query: z.ZodObject<z.objectUtil.extendShape<{
|
|
102
|
+
domain: z.ZodString;
|
|
103
|
+
version: z.ZodOptional<z.ZodString>;
|
|
104
|
+
includePreferences: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
105
|
+
}, {
|
|
106
|
+
subjectId: z.ZodOptional<z.ZodString>;
|
|
107
|
+
externalId: z.ZodOptional<z.ZodString>;
|
|
108
|
+
ipAddress: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}>, "strip", z.ZodTypeAny, {
|
|
110
|
+
domain: string;
|
|
111
|
+
includePreferences: boolean;
|
|
112
|
+
subjectId?: string | undefined;
|
|
113
|
+
ipAddress?: string | undefined;
|
|
114
|
+
version?: string | undefined;
|
|
115
|
+
externalId?: string | undefined;
|
|
116
|
+
}, {
|
|
117
|
+
domain: string;
|
|
118
|
+
subjectId?: string | undefined;
|
|
119
|
+
ipAddress?: string | undefined;
|
|
120
|
+
version?: string | undefined;
|
|
121
|
+
externalId?: string | undefined;
|
|
122
|
+
includePreferences?: boolean | undefined;
|
|
123
|
+
}>;
|
|
124
|
+
} & {
|
|
125
|
+
use: any[];
|
|
126
|
+
}>]>(...inputCtx: C): Promise<C extends [{
|
|
127
|
+
asResponse: true;
|
|
128
|
+
}] ? Response : C extends [{
|
|
129
|
+
returnHeaders: true;
|
|
130
|
+
}] ? {
|
|
131
|
+
headers: Headers;
|
|
132
|
+
response: GetPolicyResponse;
|
|
133
|
+
} : GetPolicyResponse>;
|
|
134
|
+
options: {
|
|
135
|
+
method: "GET";
|
|
136
|
+
query: z.ZodObject<z.objectUtil.extendShape<{
|
|
137
|
+
domain: z.ZodString;
|
|
138
|
+
version: z.ZodOptional<z.ZodString>;
|
|
139
|
+
includePreferences: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
140
|
+
}, {
|
|
141
|
+
subjectId: z.ZodOptional<z.ZodString>;
|
|
142
|
+
externalId: z.ZodOptional<z.ZodString>;
|
|
143
|
+
ipAddress: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}>, "strip", z.ZodTypeAny, {
|
|
145
|
+
domain: string;
|
|
146
|
+
includePreferences: boolean;
|
|
147
|
+
subjectId?: string | undefined;
|
|
148
|
+
ipAddress?: string | undefined;
|
|
149
|
+
version?: string | undefined;
|
|
150
|
+
externalId?: string | undefined;
|
|
151
|
+
}, {
|
|
152
|
+
domain: string;
|
|
153
|
+
subjectId?: string | undefined;
|
|
154
|
+
ipAddress?: string | undefined;
|
|
155
|
+
version?: string | undefined;
|
|
156
|
+
externalId?: string | undefined;
|
|
157
|
+
includePreferences?: boolean | undefined;
|
|
158
|
+
}>;
|
|
159
|
+
} & {
|
|
160
|
+
use: any[];
|
|
161
|
+
};
|
|
162
|
+
path: "/consent/policy";
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=get-consent-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-consent-policy.d.ts","sourceRoot":"","sources":["../../../src/api/routes/get-consent-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB,MAAM,WAAW,iBAAiB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE;QACL,MAAM,EAAE;YACP,EAAE,EAAE,MAAM,CAAC;YACX,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;YAChB,OAAO,EAAE,MAAM,CAAC;YAChB,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC/C,SAAS,EAAE,MAAM,CAAC;SAClB,CAAC;QACF,oBAAoB,CAAC,EAAE;YACtB,UAAU,EAAE,OAAO,CAAC;YACpB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC;YACzD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;YAC3B,YAAY,EAAE,OAAO,CAAC;YACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;SAC5B,CAAC;KACF,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2EG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8M5B,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export interface GetConsentResponse {
|
|
3
|
+
success: boolean;
|
|
4
|
+
data: {
|
|
5
|
+
hasActiveConsent: boolean;
|
|
6
|
+
records: Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
subjectId: string;
|
|
9
|
+
domain: string;
|
|
10
|
+
status: string;
|
|
11
|
+
givenAt: string;
|
|
12
|
+
policyId: string;
|
|
13
|
+
preferences: Record<string, string | null>;
|
|
14
|
+
}>;
|
|
15
|
+
identifiedBy: string | null;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Endpoint for retrieving active consent records.
|
|
20
|
+
*
|
|
21
|
+
* This endpoint allows clients to retrieve a subject's active consent records by specifying:
|
|
22
|
+
* 1. The subject ID (internal UUID) and an optional domain
|
|
23
|
+
* 2. The external ID and an optional domain
|
|
24
|
+
* 3. The IP address and a required domain (since IP alone is too broad)
|
|
25
|
+
*
|
|
26
|
+
* @endpoint GET /consent/get
|
|
27
|
+
*/
|
|
28
|
+
export declare const getConsent: {
|
|
29
|
+
<C extends [import("better-call").InputContext<"/consent/get", {
|
|
30
|
+
method: "GET";
|
|
31
|
+
query: z.ZodDiscriminatedUnion<"identifierType", [z.ZodObject<{
|
|
32
|
+
subjectId: z.ZodString;
|
|
33
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
34
|
+
identifierType: z.ZodLiteral<"subjectId">;
|
|
35
|
+
}, "strip", z.ZodTypeAny, {
|
|
36
|
+
subjectId: string;
|
|
37
|
+
identifierType: "subjectId";
|
|
38
|
+
domain?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
subjectId: string;
|
|
41
|
+
identifierType: "subjectId";
|
|
42
|
+
domain?: string | undefined;
|
|
43
|
+
}>, z.ZodObject<{
|
|
44
|
+
externalId: z.ZodString;
|
|
45
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
46
|
+
identifierType: z.ZodLiteral<"externalId">;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
externalId: string;
|
|
49
|
+
identifierType: "externalId";
|
|
50
|
+
domain?: string | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
externalId: string;
|
|
53
|
+
identifierType: "externalId";
|
|
54
|
+
domain?: string | undefined;
|
|
55
|
+
}>, z.ZodObject<{
|
|
56
|
+
ipAddress: z.ZodString;
|
|
57
|
+
domain: z.ZodString;
|
|
58
|
+
identifierType: z.ZodLiteral<"ipAddress">;
|
|
59
|
+
}, "strip", z.ZodTypeAny, {
|
|
60
|
+
ipAddress: string;
|
|
61
|
+
domain: string;
|
|
62
|
+
identifierType: "ipAddress";
|
|
63
|
+
}, {
|
|
64
|
+
ipAddress: string;
|
|
65
|
+
domain: string;
|
|
66
|
+
identifierType: "ipAddress";
|
|
67
|
+
}>]>;
|
|
68
|
+
} & {
|
|
69
|
+
use: any[];
|
|
70
|
+
}>]>(...inputCtx: C): Promise<C extends [{
|
|
71
|
+
asResponse: true;
|
|
72
|
+
}] ? Response : C extends [{
|
|
73
|
+
returnHeaders: true;
|
|
74
|
+
}] ? {
|
|
75
|
+
headers: Headers;
|
|
76
|
+
response: {
|
|
77
|
+
success: boolean;
|
|
78
|
+
data: {
|
|
79
|
+
hasActiveConsent: boolean;
|
|
80
|
+
records: {
|
|
81
|
+
id: string;
|
|
82
|
+
subjectId: string;
|
|
83
|
+
domain: string;
|
|
84
|
+
status: string;
|
|
85
|
+
givenAt: string;
|
|
86
|
+
}[];
|
|
87
|
+
identifiedBy: "subjectId" | "ipAddress" | "externalId";
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
} : {
|
|
91
|
+
success: boolean;
|
|
92
|
+
data: {
|
|
93
|
+
hasActiveConsent: boolean;
|
|
94
|
+
records: {
|
|
95
|
+
id: string;
|
|
96
|
+
subjectId: string;
|
|
97
|
+
domain: string;
|
|
98
|
+
status: string;
|
|
99
|
+
givenAt: string;
|
|
100
|
+
}[];
|
|
101
|
+
identifiedBy: "subjectId" | "ipAddress" | "externalId";
|
|
102
|
+
};
|
|
103
|
+
}>;
|
|
104
|
+
options: {
|
|
105
|
+
method: "GET";
|
|
106
|
+
query: z.ZodDiscriminatedUnion<"identifierType", [z.ZodObject<{
|
|
107
|
+
subjectId: z.ZodString;
|
|
108
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
109
|
+
identifierType: z.ZodLiteral<"subjectId">;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
subjectId: string;
|
|
112
|
+
identifierType: "subjectId";
|
|
113
|
+
domain?: string | undefined;
|
|
114
|
+
}, {
|
|
115
|
+
subjectId: string;
|
|
116
|
+
identifierType: "subjectId";
|
|
117
|
+
domain?: string | undefined;
|
|
118
|
+
}>, z.ZodObject<{
|
|
119
|
+
externalId: z.ZodString;
|
|
120
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
121
|
+
identifierType: z.ZodLiteral<"externalId">;
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
externalId: string;
|
|
124
|
+
identifierType: "externalId";
|
|
125
|
+
domain?: string | undefined;
|
|
126
|
+
}, {
|
|
127
|
+
externalId: string;
|
|
128
|
+
identifierType: "externalId";
|
|
129
|
+
domain?: string | undefined;
|
|
130
|
+
}>, z.ZodObject<{
|
|
131
|
+
ipAddress: z.ZodString;
|
|
132
|
+
domain: z.ZodString;
|
|
133
|
+
identifierType: z.ZodLiteral<"ipAddress">;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
ipAddress: string;
|
|
136
|
+
domain: string;
|
|
137
|
+
identifierType: "ipAddress";
|
|
138
|
+
}, {
|
|
139
|
+
ipAddress: string;
|
|
140
|
+
domain: string;
|
|
141
|
+
identifierType: "ipAddress";
|
|
142
|
+
}>]>;
|
|
143
|
+
} & {
|
|
144
|
+
use: any[];
|
|
145
|
+
};
|
|
146
|
+
path: "/consent/get";
|
|
147
|
+
};
|
|
148
|
+
//# sourceMappingURL=get-consent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-consent.d.ts","sourceRoot":"","sources":["../../../src/api/routes/get-consent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAgCxB,MAAM,WAAW,kBAAkB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE;QACL,gBAAgB,EAAE,OAAO,CAAC;QAC1B,OAAO,EAAE,KAAK,CAAC;YACd,EAAE,EAAE,MAAM,CAAC;YACX,SAAS,EAAE,MAAM,CAAC;YAClB,MAAM,EAAE,MAAM,CAAC;YACf,MAAM,EAAE,MAAM,CAAC;YACf,OAAO,EAAE,MAAM,CAAC;YAChB,QAAQ,EAAE,MAAM,CAAC;YACjB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;SAC3C,CAAC,CAAC;QACH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;KAC5B,CAAC;CACF;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBA+Ff,MAAM;+BACC,MAAM;4BACT,MAAM;4BACN,MAAM;6BACL,MAAM;;;;;;;;;;oBAJX,MAAM;2BACC,MAAM;wBACT,MAAM;wBACN,MAAM;yBACL,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuElB,CAAC"}
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
export * from './error';
|
|
2
|
+
export * from './ok';
|
|
3
|
+
export declare const baseEndpoints: {
|
|
4
|
+
setConsent: {
|
|
5
|
+
<C extends [import("better-call").InputContext<"/consent/set", {
|
|
6
|
+
method: "POST";
|
|
7
|
+
body: import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
8
|
+
subjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
9
|
+
externalSubjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
10
|
+
domain: import("zod").ZodString;
|
|
11
|
+
type: import("zod").ZodEnum<["cookie_banner", "privacy_policy", "dpa", "terms_of_service", "marketing_communications", "age_verification", "other"]>;
|
|
12
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
13
|
+
}, {
|
|
14
|
+
type: import("zod").ZodLiteral<"cookie_banner">;
|
|
15
|
+
preferences: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodBoolean>;
|
|
16
|
+
}>, "strip", import("zod").ZodTypeAny, {
|
|
17
|
+
type: "cookie_banner";
|
|
18
|
+
domain: string;
|
|
19
|
+
preferences: Record<string, boolean>;
|
|
20
|
+
subjectId?: string | undefined;
|
|
21
|
+
metadata?: Record<string, unknown> | undefined;
|
|
22
|
+
externalSubjectId?: string | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
type: "cookie_banner";
|
|
25
|
+
domain: string;
|
|
26
|
+
preferences: Record<string, boolean>;
|
|
27
|
+
subjectId?: string | undefined;
|
|
28
|
+
metadata?: Record<string, unknown> | undefined;
|
|
29
|
+
externalSubjectId?: string | undefined;
|
|
30
|
+
}>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
31
|
+
subjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
32
|
+
externalSubjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
33
|
+
domain: import("zod").ZodString;
|
|
34
|
+
type: import("zod").ZodEnum<["cookie_banner", "privacy_policy", "dpa", "terms_of_service", "marketing_communications", "age_verification", "other"]>;
|
|
35
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
36
|
+
}, {
|
|
37
|
+
type: import("zod").ZodEnum<["privacy_policy", "dpa", "terms_of_service"]>;
|
|
38
|
+
policyId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
39
|
+
preferences: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodBoolean>>;
|
|
40
|
+
}>, "strip", import("zod").ZodTypeAny, {
|
|
41
|
+
type: "privacy_policy" | "dpa" | "terms_of_service";
|
|
42
|
+
domain: string;
|
|
43
|
+
subjectId?: string | undefined;
|
|
44
|
+
metadata?: Record<string, unknown> | undefined;
|
|
45
|
+
policyId?: string | undefined;
|
|
46
|
+
externalSubjectId?: string | undefined;
|
|
47
|
+
preferences?: Record<string, boolean> | undefined;
|
|
48
|
+
}, {
|
|
49
|
+
type: "privacy_policy" | "dpa" | "terms_of_service";
|
|
50
|
+
domain: string;
|
|
51
|
+
subjectId?: string | undefined;
|
|
52
|
+
metadata?: Record<string, unknown> | undefined;
|
|
53
|
+
policyId?: string | undefined;
|
|
54
|
+
externalSubjectId?: string | undefined;
|
|
55
|
+
preferences?: Record<string, boolean> | undefined;
|
|
56
|
+
}>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
57
|
+
subjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
|
+
externalSubjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
|
+
domain: import("zod").ZodString;
|
|
60
|
+
type: import("zod").ZodEnum<["cookie_banner", "privacy_policy", "dpa", "terms_of_service", "marketing_communications", "age_verification", "other"]>;
|
|
61
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
62
|
+
}, {
|
|
63
|
+
type: import("zod").ZodEnum<["marketing_communications", "age_verification", "other"]>;
|
|
64
|
+
preferences: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodBoolean>>;
|
|
65
|
+
}>, "strip", import("zod").ZodTypeAny, {
|
|
66
|
+
type: "other" | "marketing_communications" | "age_verification";
|
|
67
|
+
domain: string;
|
|
68
|
+
subjectId?: string | undefined;
|
|
69
|
+
metadata?: Record<string, unknown> | undefined;
|
|
70
|
+
externalSubjectId?: string | undefined;
|
|
71
|
+
preferences?: Record<string, boolean> | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
type: "other" | "marketing_communications" | "age_verification";
|
|
74
|
+
domain: string;
|
|
75
|
+
subjectId?: string | undefined;
|
|
76
|
+
metadata?: Record<string, unknown> | undefined;
|
|
77
|
+
externalSubjectId?: string | undefined;
|
|
78
|
+
preferences?: Record<string, boolean> | undefined;
|
|
79
|
+
}>]>;
|
|
80
|
+
} & {
|
|
81
|
+
use: any[];
|
|
82
|
+
}>]>(...inputCtx: C): Promise<C extends [{
|
|
83
|
+
asResponse: true;
|
|
84
|
+
}] ? Response : C extends [{
|
|
85
|
+
returnHeaders: true;
|
|
86
|
+
}] ? {
|
|
87
|
+
headers: Headers;
|
|
88
|
+
response: {
|
|
89
|
+
id: string;
|
|
90
|
+
subjectId: string;
|
|
91
|
+
externalSubjectId: string | undefined;
|
|
92
|
+
domainId: string;
|
|
93
|
+
domain: string;
|
|
94
|
+
type: "other" | "cookie_banner" | "privacy_policy" | "dpa" | "terms_of_service" | "marketing_communications" | "age_verification";
|
|
95
|
+
status: "active" | "withdrawn" | "expired";
|
|
96
|
+
recordId: string;
|
|
97
|
+
metadata: Record<string, unknown> | undefined;
|
|
98
|
+
givenAt: string;
|
|
99
|
+
};
|
|
100
|
+
} : {
|
|
101
|
+
id: string;
|
|
102
|
+
subjectId: string;
|
|
103
|
+
externalSubjectId: string | undefined;
|
|
104
|
+
domainId: string;
|
|
105
|
+
domain: string;
|
|
106
|
+
type: "other" | "cookie_banner" | "privacy_policy" | "dpa" | "terms_of_service" | "marketing_communications" | "age_verification";
|
|
107
|
+
status: "active" | "withdrawn" | "expired";
|
|
108
|
+
recordId: string;
|
|
109
|
+
metadata: Record<string, unknown> | undefined;
|
|
110
|
+
givenAt: string;
|
|
111
|
+
}>;
|
|
112
|
+
options: {
|
|
113
|
+
method: "POST";
|
|
114
|
+
body: import("zod").ZodDiscriminatedUnion<"type", [import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
115
|
+
subjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
116
|
+
externalSubjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
117
|
+
domain: import("zod").ZodString;
|
|
118
|
+
type: import("zod").ZodEnum<["cookie_banner", "privacy_policy", "dpa", "terms_of_service", "marketing_communications", "age_verification", "other"]>;
|
|
119
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
120
|
+
}, {
|
|
121
|
+
type: import("zod").ZodLiteral<"cookie_banner">;
|
|
122
|
+
preferences: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodBoolean>;
|
|
123
|
+
}>, "strip", import("zod").ZodTypeAny, {
|
|
124
|
+
type: "cookie_banner";
|
|
125
|
+
domain: string;
|
|
126
|
+
preferences: Record<string, boolean>;
|
|
127
|
+
subjectId?: string | undefined;
|
|
128
|
+
metadata?: Record<string, unknown> | undefined;
|
|
129
|
+
externalSubjectId?: string | undefined;
|
|
130
|
+
}, {
|
|
131
|
+
type: "cookie_banner";
|
|
132
|
+
domain: string;
|
|
133
|
+
preferences: Record<string, boolean>;
|
|
134
|
+
subjectId?: string | undefined;
|
|
135
|
+
metadata?: Record<string, unknown> | undefined;
|
|
136
|
+
externalSubjectId?: string | undefined;
|
|
137
|
+
}>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
138
|
+
subjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
139
|
+
externalSubjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
140
|
+
domain: import("zod").ZodString;
|
|
141
|
+
type: import("zod").ZodEnum<["cookie_banner", "privacy_policy", "dpa", "terms_of_service", "marketing_communications", "age_verification", "other"]>;
|
|
142
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
143
|
+
}, {
|
|
144
|
+
type: import("zod").ZodEnum<["privacy_policy", "dpa", "terms_of_service"]>;
|
|
145
|
+
policyId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
146
|
+
preferences: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodBoolean>>;
|
|
147
|
+
}>, "strip", import("zod").ZodTypeAny, {
|
|
148
|
+
type: "privacy_policy" | "dpa" | "terms_of_service";
|
|
149
|
+
domain: string;
|
|
150
|
+
subjectId?: string | undefined;
|
|
151
|
+
metadata?: Record<string, unknown> | undefined;
|
|
152
|
+
policyId?: string | undefined;
|
|
153
|
+
externalSubjectId?: string | undefined;
|
|
154
|
+
preferences?: Record<string, boolean> | undefined;
|
|
155
|
+
}, {
|
|
156
|
+
type: "privacy_policy" | "dpa" | "terms_of_service";
|
|
157
|
+
domain: string;
|
|
158
|
+
subjectId?: string | undefined;
|
|
159
|
+
metadata?: Record<string, unknown> | undefined;
|
|
160
|
+
policyId?: string | undefined;
|
|
161
|
+
externalSubjectId?: string | undefined;
|
|
162
|
+
preferences?: Record<string, boolean> | undefined;
|
|
163
|
+
}>, import("zod").ZodObject<import("zod").objectUtil.extendShape<{
|
|
164
|
+
subjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
165
|
+
externalSubjectId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
166
|
+
domain: import("zod").ZodString;
|
|
167
|
+
type: import("zod").ZodEnum<["cookie_banner", "privacy_policy", "dpa", "terms_of_service", "marketing_communications", "age_verification", "other"]>;
|
|
168
|
+
metadata: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnknown>>;
|
|
169
|
+
}, {
|
|
170
|
+
type: import("zod").ZodEnum<["marketing_communications", "age_verification", "other"]>;
|
|
171
|
+
preferences: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodBoolean>>;
|
|
172
|
+
}>, "strip", import("zod").ZodTypeAny, {
|
|
173
|
+
type: "other" | "marketing_communications" | "age_verification";
|
|
174
|
+
domain: string;
|
|
175
|
+
subjectId?: string | undefined;
|
|
176
|
+
metadata?: Record<string, unknown> | undefined;
|
|
177
|
+
externalSubjectId?: string | undefined;
|
|
178
|
+
preferences?: Record<string, boolean> | undefined;
|
|
179
|
+
}, {
|
|
180
|
+
type: "other" | "marketing_communications" | "age_verification";
|
|
181
|
+
domain: string;
|
|
182
|
+
subjectId?: string | undefined;
|
|
183
|
+
metadata?: Record<string, unknown> | undefined;
|
|
184
|
+
externalSubjectId?: string | undefined;
|
|
185
|
+
preferences?: Record<string, boolean> | undefined;
|
|
186
|
+
}>]>;
|
|
187
|
+
} & {
|
|
188
|
+
use: any[];
|
|
189
|
+
};
|
|
190
|
+
path: "/consent/set";
|
|
191
|
+
};
|
|
192
|
+
showConsentBanner: {
|
|
193
|
+
<C extends [(import("better-call").InputContext<"/show-consent-banner", {
|
|
194
|
+
method: "GET";
|
|
195
|
+
metadata: {
|
|
196
|
+
openapi: {
|
|
197
|
+
responses: {
|
|
198
|
+
'200': {
|
|
199
|
+
description: string;
|
|
200
|
+
content: {
|
|
201
|
+
'application/json': {
|
|
202
|
+
schema: {
|
|
203
|
+
type: "object";
|
|
204
|
+
properties: {
|
|
205
|
+
showConsentBanner: {
|
|
206
|
+
type: string;
|
|
207
|
+
};
|
|
208
|
+
jurisdiction: {
|
|
209
|
+
type: string;
|
|
210
|
+
properties: {
|
|
211
|
+
code: {
|
|
212
|
+
type: string;
|
|
213
|
+
};
|
|
214
|
+
message: {
|
|
215
|
+
type: string;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
location: {
|
|
220
|
+
type: string;
|
|
221
|
+
properties: {
|
|
222
|
+
countryCode: {
|
|
223
|
+
type: string;
|
|
224
|
+
};
|
|
225
|
+
regionCode: {
|
|
226
|
+
type: string;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
} & {
|
|
239
|
+
use: any[];
|
|
240
|
+
}> | undefined)?]>(...inputCtx: C): Promise<C extends [{
|
|
241
|
+
asResponse: true;
|
|
242
|
+
}] ? Response : C extends [{
|
|
243
|
+
returnHeaders: true;
|
|
244
|
+
}] ? {
|
|
245
|
+
headers: Headers;
|
|
246
|
+
response: {
|
|
247
|
+
showConsentBanner: boolean;
|
|
248
|
+
jurisdiction: {
|
|
249
|
+
code: string;
|
|
250
|
+
message: string;
|
|
251
|
+
};
|
|
252
|
+
location: {
|
|
253
|
+
countryCode: string | null | undefined;
|
|
254
|
+
regionCode: string | null | undefined;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
} : {
|
|
258
|
+
showConsentBanner: boolean;
|
|
259
|
+
jurisdiction: {
|
|
260
|
+
code: string;
|
|
261
|
+
message: string;
|
|
262
|
+
};
|
|
263
|
+
location: {
|
|
264
|
+
countryCode: string | null | undefined;
|
|
265
|
+
regionCode: string | null | undefined;
|
|
266
|
+
};
|
|
267
|
+
}>;
|
|
268
|
+
options: {
|
|
269
|
+
method: "GET";
|
|
270
|
+
metadata: {
|
|
271
|
+
openapi: {
|
|
272
|
+
responses: {
|
|
273
|
+
'200': {
|
|
274
|
+
description: string;
|
|
275
|
+
content: {
|
|
276
|
+
'application/json': {
|
|
277
|
+
schema: {
|
|
278
|
+
type: "object";
|
|
279
|
+
properties: {
|
|
280
|
+
showConsentBanner: {
|
|
281
|
+
type: string;
|
|
282
|
+
};
|
|
283
|
+
jurisdiction: {
|
|
284
|
+
type: string;
|
|
285
|
+
properties: {
|
|
286
|
+
code: {
|
|
287
|
+
type: string;
|
|
288
|
+
};
|
|
289
|
+
message: {
|
|
290
|
+
type: string;
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
location: {
|
|
295
|
+
type: string;
|
|
296
|
+
properties: {
|
|
297
|
+
countryCode: {
|
|
298
|
+
type: string;
|
|
299
|
+
};
|
|
300
|
+
regionCode: {
|
|
301
|
+
type: string;
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
} & {
|
|
314
|
+
use: any[];
|
|
315
|
+
};
|
|
316
|
+
path: "/show-consent-banner";
|
|
317
|
+
};
|
|
318
|
+
status: {
|
|
319
|
+
<C extends [(import("better-call").InputContext<"/status", {
|
|
320
|
+
method: "GET";
|
|
321
|
+
} & {
|
|
322
|
+
use: any[];
|
|
323
|
+
}> | undefined)?]>(...inputCtx: C): Promise<C extends [{
|
|
324
|
+
asResponse: true;
|
|
325
|
+
}] ? Response : C extends [{
|
|
326
|
+
returnHeaders: true;
|
|
327
|
+
}] ? {
|
|
328
|
+
headers: Headers;
|
|
329
|
+
response: import("./status").StatusResponse;
|
|
330
|
+
} : import("./status").StatusResponse>;
|
|
331
|
+
options: {
|
|
332
|
+
method: "GET";
|
|
333
|
+
} & {
|
|
334
|
+
use: any[];
|
|
335
|
+
};
|
|
336
|
+
path: "/status";
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/routes/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,MAAM,CAAC;AAErB,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIzB,CAAC"}
|