arkos 1.4.10-beta → 1.4.11-beta
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/cjs/app.js +1 -1
- package/dist/cjs/app.js.map +1 -1
- package/dist/cjs/modules/auth/auth.router.js +39 -4
- package/dist/cjs/modules/auth/auth.router.js.map +1 -1
- package/dist/cjs/modules/auth/utils/auth-openapi-generator.js +372 -0
- package/dist/cjs/modules/auth/utils/auth-openapi-generator.js.map +1 -0
- package/dist/cjs/modules/auth/utils/auth-prisma-json-schema-generator.js +102 -0
- package/dist/cjs/modules/auth/utils/auth-prisma-json-schema-generator.js.map +1 -0
- package/dist/cjs/modules/base/base.middlewares.js +1 -1
- package/dist/cjs/modules/base/base.middlewares.js.map +1 -1
- package/dist/cjs/modules/base/types/base.service.types.js.map +1 -1
- package/dist/cjs/modules/base/utils/helpers/base.router.helpers.js +46 -14
- package/dist/cjs/modules/base/utils/helpers/base.router.helpers.js.map +1 -1
- package/dist/cjs/modules/base/utils/helpers/base.service.helpers.js +17 -5
- package/dist/cjs/modules/base/utils/helpers/base.service.helpers.js.map +1 -1
- package/dist/cjs/modules/base/utils/model-openapi-generator.js +443 -0
- package/dist/cjs/modules/base/utils/model-openapi-generator.js.map +1 -0
- package/dist/cjs/modules/error-handler/error-handler.controller.js +0 -2
- package/dist/cjs/modules/error-handler/error-handler.controller.js.map +1 -1
- package/dist/cjs/modules/error-handler/utils/error-handler.helpers.js +0 -106
- package/dist/cjs/modules/error-handler/utils/error-handler.helpers.js.map +1 -1
- package/dist/cjs/modules/file-upload/file-upload.router.js +19 -0
- package/dist/cjs/modules/file-upload/file-upload.router.js.map +1 -1
- package/dist/cjs/modules/file-upload/utils/file-upload-json-schema-generator.js +351 -0
- package/dist/cjs/modules/file-upload/utils/file-upload-json-schema-generator.js.map +1 -0
- package/dist/cjs/modules/swagger/swagger.router.js +35 -16
- package/dist/cjs/modules/swagger/swagger.router.js.map +1 -1
- package/dist/cjs/modules/swagger/utils/helpers/get-swagger-default-configs.js +1 -2
- package/dist/cjs/modules/swagger/utils/helpers/get-swagger-default-configs.js.map +1 -1
- package/dist/cjs/modules/swagger/utils/helpers/openapi-schema-converter.js +68 -31
- package/dist/cjs/modules/swagger/utils/helpers/openapi-schema-converter.js.map +1 -1
- package/dist/cjs/server.js +0 -6
- package/dist/cjs/server.js.map +1 -1
- package/dist/cjs/types/arkos-config.js.map +1 -1
- package/dist/cjs/types/{arkos-config/utils.js → arkos-prisma-input.bak.js} +1 -1
- package/dist/cjs/types/arkos-prisma-input.bak.js.map +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/arkos-router/arkos-router-openapi-manager.js +3 -12
- package/dist/cjs/utils/arkos-router/arkos-router-openapi-manager.js.map +1 -1
- package/dist/cjs/utils/arkos-router/index.js +47 -8
- package/dist/cjs/utils/arkos-router/index.js.map +1 -1
- package/dist/cjs/utils/arkos-router/types/openapi-config.js.map +1 -1
- package/dist/cjs/utils/arkos-router/utils/helpers/index.js +15 -2
- package/dist/cjs/utils/arkos-router/utils/helpers/index.js.map +1 -1
- package/dist/cjs/utils/cli/generate.js +4 -4
- package/dist/cjs/utils/cli/generate.js.map +1 -1
- package/dist/cjs/utils/cli/index.js +11 -11
- package/dist/cjs/utils/cli/index.js.map +1 -1
- package/dist/cjs/utils/cli/utils/cli.helpers.js +1 -1
- package/dist/cjs/utils/cli/utils/template-generator/templates/class-validator/create-dto-template.js +29 -5
- package/dist/cjs/utils/cli/utils/template-generator/templates/class-validator/create-dto-template.js.map +1 -1
- package/dist/cjs/utils/cli/utils/template-generator/templates/class-validator/update-dto-template.js +26 -5
- package/dist/cjs/utils/cli/utils/template-generator/templates/class-validator/update-dto-template.js.map +1 -1
- package/dist/cjs/utils/cli/utils/template-generator/templates/class-validator-dto-generator.js +52 -0
- package/dist/cjs/utils/cli/utils/template-generator/templates/class-validator-dto-generator.js.map +1 -1
- package/dist/cjs/utils/cli/utils/template-generator/templates/zod/create-schema-template.js +10 -1
- package/dist/cjs/utils/cli/utils/template-generator/templates/zod/create-schema-template.js.map +1 -1
- package/dist/cjs/utils/cli/utils/template-generator/templates/zod/update-schema-template.js +9 -2
- package/dist/cjs/utils/cli/utils/template-generator/templates/zod/update-schema-template.js.map +1 -1
- package/dist/cjs/utils/cli/utils/template-generator/templates/zod-schema-generator.js +26 -1
- package/dist/cjs/utils/cli/utils/template-generator/templates/zod-schema-generator.js.map +1 -1
- package/dist/cjs/utils/helpers/routers.helpers.js +2 -4
- package/dist/cjs/utils/helpers/routers.helpers.js.map +1 -1
- package/dist/cjs/utils/prisma/prisma-json-schema-generator.js +144 -257
- package/dist/cjs/utils/prisma/prisma-json-schema-generator.js.map +1 -1
- package/dist/cjs/utils/prisma/prisma-schema-parser.js +15 -2
- package/dist/cjs/utils/prisma/prisma-schema-parser.js.map +1 -1
- package/dist/cjs/utils/prisma/types.js.map +1 -1
- package/dist/esm/app.js +1 -1
- package/dist/esm/app.js.map +1 -1
- package/dist/esm/modules/auth/auth.router.js +39 -4
- package/dist/esm/modules/auth/auth.router.js.map +1 -1
- package/dist/esm/modules/auth/utils/auth-openapi-generator.js +367 -0
- package/dist/esm/modules/auth/utils/auth-openapi-generator.js.map +1 -0
- package/dist/esm/modules/auth/utils/auth-prisma-json-schema-generator.js +97 -0
- package/dist/esm/modules/auth/utils/auth-prisma-json-schema-generator.js.map +1 -0
- package/dist/esm/modules/base/base.middlewares.js +1 -1
- package/dist/esm/modules/base/base.middlewares.js.map +1 -1
- package/dist/esm/modules/base/types/base.service.types.js.map +1 -1
- package/dist/esm/modules/base/utils/helpers/base.router.helpers.js +46 -13
- package/dist/esm/modules/base/utils/helpers/base.router.helpers.js.map +1 -1
- package/dist/esm/modules/base/utils/helpers/base.service.helpers.js +17 -5
- package/dist/esm/modules/base/utils/helpers/base.service.helpers.js.map +1 -1
- package/dist/esm/modules/base/utils/model-openapi-generator.js +438 -0
- package/dist/esm/modules/base/utils/model-openapi-generator.js.map +1 -0
- package/dist/esm/modules/error-handler/error-handler.controller.js +0 -2
- package/dist/esm/modules/error-handler/error-handler.controller.js.map +1 -1
- package/dist/esm/modules/error-handler/utils/error-handler.helpers.js +0 -87
- package/dist/esm/modules/error-handler/utils/error-handler.helpers.js.map +1 -1
- package/dist/esm/modules/file-upload/file-upload.router.js +19 -0
- package/dist/esm/modules/file-upload/file-upload.router.js.map +1 -1
- package/dist/esm/modules/file-upload/utils/file-upload-json-schema-generator.js +346 -0
- package/dist/esm/modules/file-upload/utils/file-upload-json-schema-generator.js.map +1 -0
- package/dist/esm/modules/swagger/swagger.router.js +35 -16
- package/dist/esm/modules/swagger/swagger.router.js.map +1 -1
- package/dist/esm/modules/swagger/utils/helpers/get-swagger-default-configs.js +1 -2
- package/dist/esm/modules/swagger/utils/helpers/get-swagger-default-configs.js.map +1 -1
- package/dist/esm/modules/swagger/utils/helpers/openapi-schema-converter.js +68 -31
- package/dist/esm/modules/swagger/utils/helpers/openapi-schema-converter.js.map +1 -1
- package/dist/esm/server.js +0 -5
- package/dist/esm/server.js.map +1 -1
- package/dist/esm/types/arkos-config.js.map +1 -1
- package/dist/esm/types/arkos-prisma-input.bak.js +2 -0
- package/dist/esm/types/arkos-prisma-input.bak.js.map +1 -0
- package/dist/esm/types/index.js.map +1 -1
- package/dist/esm/utils/arkos-router/arkos-router-openapi-manager.js +3 -12
- package/dist/esm/utils/arkos-router/arkos-router-openapi-manager.js.map +1 -1
- package/dist/esm/utils/arkos-router/index.js +47 -8
- package/dist/esm/utils/arkos-router/index.js.map +1 -1
- package/dist/esm/utils/arkos-router/types/openapi-config.js.map +1 -1
- package/dist/esm/utils/arkos-router/utils/helpers/index.js +15 -2
- package/dist/esm/utils/arkos-router/utils/helpers/index.js.map +1 -1
- package/dist/esm/utils/cli/generate.js +4 -4
- package/dist/esm/utils/cli/generate.js.map +1 -1
- package/dist/esm/utils/cli/index.js +11 -11
- package/dist/esm/utils/cli/index.js.map +1 -1
- package/dist/esm/utils/cli/utils/cli.helpers.js +1 -1
- package/dist/esm/utils/cli/utils/template-generator/templates/class-validator/create-dto-template.js +29 -5
- package/dist/esm/utils/cli/utils/template-generator/templates/class-validator/create-dto-template.js.map +1 -1
- package/dist/esm/utils/cli/utils/template-generator/templates/class-validator/update-dto-template.js +26 -5
- package/dist/esm/utils/cli/utils/template-generator/templates/class-validator/update-dto-template.js.map +1 -1
- package/dist/esm/utils/cli/utils/template-generator/templates/class-validator-dto-generator.js +52 -0
- package/dist/esm/utils/cli/utils/template-generator/templates/class-validator-dto-generator.js.map +1 -1
- package/dist/esm/utils/cli/utils/template-generator/templates/zod/create-schema-template.js +10 -1
- package/dist/esm/utils/cli/utils/template-generator/templates/zod/create-schema-template.js.map +1 -1
- package/dist/esm/utils/cli/utils/template-generator/templates/zod/update-schema-template.js +9 -2
- package/dist/esm/utils/cli/utils/template-generator/templates/zod/update-schema-template.js.map +1 -1
- package/dist/esm/utils/cli/utils/template-generator/templates/zod-schema-generator.js +26 -1
- package/dist/esm/utils/cli/utils/template-generator/templates/zod-schema-generator.js.map +1 -1
- package/dist/esm/utils/helpers/routers.helpers.js +2 -4
- package/dist/esm/utils/helpers/routers.helpers.js.map +1 -1
- package/dist/esm/utils/prisma/prisma-json-schema-generator.js +144 -257
- package/dist/esm/utils/prisma/prisma-json-schema-generator.js.map +1 -1
- package/dist/esm/utils/prisma/prisma-schema-parser.js +15 -2
- package/dist/esm/utils/prisma/prisma-schema-parser.js.map +1 -1
- package/dist/esm/utils/prisma/types.js.map +1 -1
- package/dist/types/modules/auth/utils/auth-openapi-generator.d.ts +9 -0
- package/dist/types/modules/auth/utils/auth-prisma-json-schema-generator.d.ts +13 -0
- package/dist/types/modules/base/base.middlewares.d.ts +3 -0
- package/dist/types/modules/base/types/base.service.types.d.ts +0 -3
- package/dist/types/modules/base/utils/helpers/base.router.helpers.d.ts +0 -1
- package/dist/types/modules/base/utils/helpers/base.service.helpers.d.ts +1 -1
- package/dist/types/modules/base/utils/model-openapi-generator.d.ts +12 -0
- package/dist/types/modules/error-handler/utils/error-handler.helpers.d.ts +0 -19
- package/dist/types/modules/file-upload/utils/file-upload-json-schema-generator.d.ts +12 -0
- package/dist/types/modules/swagger/utils/helpers/get-swagger-default-configs.d.ts +1 -2
- package/dist/types/modules/swagger/utils/helpers/openapi-schema-converter.d.ts +27 -3
- package/dist/types/server.d.ts +0 -6
- package/dist/types/types/arkos-config.d.ts +1 -1
- package/dist/types/types/arkos-prisma-input.bak.d.ts +237 -0
- package/dist/types/types/index.d.ts +0 -48
- package/dist/types/utils/arkos-router/types/openapi-config.d.ts +3 -2
- package/dist/types/utils/helpers/routers.helpers.d.ts +1 -1
- package/dist/types/utils/prisma/prisma-json-schema-generator.d.ts +12 -42
- package/dist/types/utils/prisma/prisma-schema-parser.d.ts +2 -0
- package/dist/types/utils/prisma/types.d.ts +2 -1
- package/package.json +3 -1
- package/dist/cjs/components/arkos-policy/index.js +0 -38
- package/dist/cjs/components/arkos-policy/index.js.map +0 -1
- package/dist/cjs/components/arkos-policy/types.js +0 -3
- package/dist/cjs/components/arkos-policy/types.js.map +0 -1
- package/dist/cjs/exports/config.js +0 -6
- package/dist/cjs/exports/config.js.map +0 -1
- package/dist/cjs/modules/base/utils/helpers/base.controller.helpers.js +0 -80
- package/dist/cjs/modules/base/utils/helpers/base.controller.helpers.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/built-in-route-path-object-manager.js +0 -7
- package/dist/cjs/modules/swagger/utils/built-in-route-path-object-manager.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/get-open-api-login-html.js +0 -276
- package/dist/cjs/modules/swagger/utils/get-open-api-login-html.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/get-authentication-json-schema-paths.js +0 -482
- package/dist/cjs/modules/swagger/utils/helpers/get-authentication-json-schema-paths.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/get-file-upload-json-schema-paths.js +0 -505
- package/dist/cjs/modules/swagger/utils/helpers/get-file-upload-json-schema-paths.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/get-system-json-schema-paths.js +0 -37
- package/dist/cjs/modules/swagger/utils/helpers/get-system-json-schema-paths.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/generate-class-validator-json-schemas.js +0 -50
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/generate-class-validator-json-schemas.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/generate-prisma-json-schemas.js +0 -32
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/generate-prisma-json-schemas.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/generate-system-json-schemas.js +0 -49
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/generate-system-json-schemas.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/generate-zod-json-schemas.js +0 -34
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/generate-zod-json-schemas.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-main-routes-paths.js +0 -508
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-main-routes-paths.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-parent-routes-paths.js +0 -573
- package/dist/cjs/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-parent-routes-paths.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/missing-json-schemas-generator.js +0 -261
- package/dist/cjs/modules/swagger/utils/helpers/missing-json-schemas-generator.js.map +0 -1
- package/dist/cjs/modules/swagger/utils/helpers/swagger.router.helpers.js +0 -114
- package/dist/cjs/modules/swagger/utils/helpers/swagger.router.helpers.js.map +0 -1
- package/dist/cjs/paths.js +0 -9
- package/dist/cjs/paths.js.map +0 -1
- package/dist/cjs/types/arkos-config/utils.js.map +0 -1
- package/dist/cjs/types/arkos.js +0 -3
- package/dist/cjs/types/arkos.js.map +0 -1
- package/dist/cjs/utils/arkos-router/utils/helpers/apply-arkos-router-proxy.js +0 -152
- package/dist/cjs/utils/arkos-router/utils/helpers/apply-arkos-router-proxy.js.map +0 -1
- package/dist/cjs/utils/cli/utils/template-generator/templates/policy-template.js +0 -53
- package/dist/cjs/utils/cli/utils/template-generator/templates/policy-template.js.map +0 -1
- package/dist/cjs/utils/helpers/exit-error.js +0 -12
- package/dist/cjs/utils/helpers/exit-error.js.map +0 -1
- package/dist/cjs/utils/initialize-app.js +0 -56
- package/dist/cjs/utils/initialize-app.js.map +0 -1
- package/dist/cjs/utils/setup-app.js +0 -119
- package/dist/cjs/utils/setup-app.js.map +0 -1
- package/dist/esm/components/arkos-policy/index.js +0 -32
- package/dist/esm/components/arkos-policy/index.js.map +0 -1
- package/dist/esm/components/arkos-policy/types.js +0 -2
- package/dist/esm/components/arkos-policy/types.js.map +0 -1
- package/dist/esm/exports/config.js +0 -3
- package/dist/esm/exports/config.js.map +0 -1
- package/dist/esm/modules/base/utils/helpers/base.controller.helpers.js +0 -76
- package/dist/esm/modules/base/utils/helpers/base.controller.helpers.js.map +0 -1
- package/dist/esm/modules/swagger/utils/built-in-route-path-object-manager.js +0 -5
- package/dist/esm/modules/swagger/utils/built-in-route-path-object-manager.js.map +0 -1
- package/dist/esm/modules/swagger/utils/get-open-api-login-html.js +0 -273
- package/dist/esm/modules/swagger/utils/get-open-api-login-html.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/get-authentication-json-schema-paths.js +0 -477
- package/dist/esm/modules/swagger/utils/helpers/get-authentication-json-schema-paths.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/get-file-upload-json-schema-paths.js +0 -499
- package/dist/esm/modules/swagger/utils/helpers/get-file-upload-json-schema-paths.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/get-system-json-schema-paths.js +0 -34
- package/dist/esm/modules/swagger/utils/helpers/get-system-json-schema-paths.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/generate-class-validator-json-schemas.js +0 -44
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/generate-class-validator-json-schemas.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/generate-prisma-json-schemas.js +0 -26
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/generate-prisma-json-schemas.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/generate-system-json-schemas.js +0 -46
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/generate-system-json-schemas.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/generate-zod-json-schemas.js +0 -28
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/generate-zod-json-schemas.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-main-routes-paths.js +0 -502
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-main-routes-paths.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-parent-routes-paths.js +0 -567
- package/dist/esm/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-parent-routes-paths.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/missing-json-schemas-generator.js +0 -256
- package/dist/esm/modules/swagger/utils/helpers/missing-json-schemas-generator.js.map +0 -1
- package/dist/esm/modules/swagger/utils/helpers/swagger.router.helpers.js +0 -103
- package/dist/esm/modules/swagger/utils/helpers/swagger.router.helpers.js.map +0 -1
- package/dist/esm/paths.js +0 -3
- package/dist/esm/paths.js.map +0 -1
- package/dist/esm/types/arkos-config/utils.js +0 -2
- package/dist/esm/types/arkos-config/utils.js.map +0 -1
- package/dist/esm/types/arkos.js +0 -2
- package/dist/esm/types/arkos.js.map +0 -1
- package/dist/esm/utils/arkos-router/utils/helpers/apply-arkos-router-proxy.js +0 -146
- package/dist/esm/utils/arkos-router/utils/helpers/apply-arkos-router-proxy.js.map +0 -1
- package/dist/esm/utils/cli/utils/template-generator/templates/policy-template.js +0 -47
- package/dist/esm/utils/cli/utils/template-generator/templates/policy-template.js.map +0 -1
- package/dist/esm/utils/helpers/exit-error.js +0 -6
- package/dist/esm/utils/helpers/exit-error.js.map +0 -1
- package/dist/esm/utils/initialize-app.js +0 -50
- package/dist/esm/utils/initialize-app.js.map +0 -1
- package/dist/esm/utils/setup-app.js +0 -113
- package/dist/esm/utils/setup-app.js.map +0 -1
- package/dist/types/components/arkos-policy/index.d.ts +0 -31
- package/dist/types/components/arkos-policy/types.d.ts +0 -21
- package/dist/types/exports/config.d.ts +0 -2
- package/dist/types/modules/base/utils/helpers/base.controller.helpers.d.ts +0 -4
- package/dist/types/modules/swagger/utils/built-in-route-path-object-manager.d.ts +0 -4
- package/dist/types/modules/swagger/utils/get-open-api-login-html.d.ts +0 -1
- package/dist/types/modules/swagger/utils/helpers/get-authentication-json-schema-paths.d.ts +0 -4
- package/dist/types/modules/swagger/utils/helpers/get-file-upload-json-schema-paths.d.ts +0 -3
- package/dist/types/modules/swagger/utils/helpers/get-system-json-schema-paths.d.ts +0 -2
- package/dist/types/modules/swagger/utils/helpers/json-schema-generators/generate-class-validator-json-schemas.d.ts +0 -1
- package/dist/types/modules/swagger/utils/helpers/json-schema-generators/generate-prisma-json-schemas.d.ts +0 -2
- package/dist/types/modules/swagger/utils/helpers/json-schema-generators/generate-system-json-schemas.d.ts +0 -4
- package/dist/types/modules/swagger/utils/helpers/json-schema-generators/generate-zod-json-schemas.d.ts +0 -1
- package/dist/types/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-main-routes-paths.d.ts +0 -3
- package/dist/types/modules/swagger/utils/helpers/json-schema-generators/prisma-models/generate-prisma-model-parent-routes-paths.d.ts +0 -3
- package/dist/types/modules/swagger/utils/helpers/missing-json-schemas-generator.d.ts +0 -77
- package/dist/types/modules/swagger/utils/helpers/swagger.router.helpers.d.ts +0 -20
- package/dist/types/paths.d.ts +0 -1
- package/dist/types/types/arkos-config/utils.d.ts +0 -35
- package/dist/types/types/arkos.d.ts +0 -31
- package/dist/types/utils/arkos-router/utils/helpers/apply-arkos-router-proxy.d.ts +0 -7
- package/dist/types/utils/cli/utils/template-generator/templates/policy-template.d.ts +0 -2
- package/dist/types/utils/helpers/exit-error.d.ts +0 -1
- package/dist/types/utils/initialize-app.d.ts +0 -2
- package/dist/types/utils/setup-app.d.ts +0 -2
|
@@ -1,477 +0,0 @@
|
|
|
1
|
-
import { getSchemaRef, localValidatorFileExists, } from "./swagger.router.helpers.js";
|
|
2
|
-
import { getModuleComponents } from "../../../../utils/dynamic-loader.js";
|
|
3
|
-
import { isEndpointDisabled } from "../../../base/utils/helpers/base.router.helpers.js";
|
|
4
|
-
export const getSchemaMode = (action, arkosConfig) => {
|
|
5
|
-
const swaggerMode = arkosConfig.swagger?.mode;
|
|
6
|
-
const isStrict = arkosConfig.swagger?.strict;
|
|
7
|
-
if (!swaggerMode)
|
|
8
|
-
return "prisma";
|
|
9
|
-
if (isStrict)
|
|
10
|
-
return swaggerMode;
|
|
11
|
-
const actionKey = action;
|
|
12
|
-
const localFileExists = localValidatorFileExists(actionKey, "auth", arkosConfig);
|
|
13
|
-
if (!localFileExists)
|
|
14
|
-
return "prisma";
|
|
15
|
-
return swaggerMode;
|
|
16
|
-
};
|
|
17
|
-
export default function getAuthenticationJsonSchemaPaths(arkosConfig, existingPaths) {
|
|
18
|
-
const paths = { ...existingPaths };
|
|
19
|
-
if (!arkosConfig.swagger?.mode)
|
|
20
|
-
return paths;
|
|
21
|
-
const AuthModuleComponents = getModuleComponents("auth");
|
|
22
|
-
const routerConfig = AuthModuleComponents?.router
|
|
23
|
-
?.config;
|
|
24
|
-
if (routerConfig?.disable === true)
|
|
25
|
-
return paths;
|
|
26
|
-
const isAuthEndpointDisabled = (endpoint) => {
|
|
27
|
-
return isEndpointDisabled(routerConfig, endpoint);
|
|
28
|
-
};
|
|
29
|
-
if (!isAuthEndpointDisabled("login")) {
|
|
30
|
-
const pathname = "/api/auth/login";
|
|
31
|
-
if (!paths[pathname])
|
|
32
|
-
paths[pathname] = {};
|
|
33
|
-
const loginMode = getSchemaMode("login", arkosConfig);
|
|
34
|
-
const currentPath = paths[pathname].post;
|
|
35
|
-
const defaultSpec = {
|
|
36
|
-
tags: ["Authentication", ...(currentPath?.tags || [])].filter((tag) => tag !== "Defaults"),
|
|
37
|
-
summary: currentPath?.summary === pathname || !currentPath?.summary
|
|
38
|
-
? "Login to the system"
|
|
39
|
-
: currentPath?.summary,
|
|
40
|
-
description: currentPath?.description ||
|
|
41
|
-
"Authenticates a user and returns an access token",
|
|
42
|
-
operationId: currentPath?.operationId?.includes(pathname)
|
|
43
|
-
? "login"
|
|
44
|
-
: currentPath?.operationId,
|
|
45
|
-
requestBody: currentPath?.requestBody || {
|
|
46
|
-
description: "User credentials",
|
|
47
|
-
required: true,
|
|
48
|
-
content: {
|
|
49
|
-
"application/json": {
|
|
50
|
-
schema: {
|
|
51
|
-
$ref: getSchemaRef("Login", loginMode),
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
responses: {
|
|
57
|
-
...(currentPath?.responses || {}),
|
|
58
|
-
"200": currentPath?.responses?.["200"] || {
|
|
59
|
-
description: "Login successful",
|
|
60
|
-
content: {
|
|
61
|
-
"application/json": {
|
|
62
|
-
schema: {
|
|
63
|
-
type: "object",
|
|
64
|
-
properties: {
|
|
65
|
-
accessToken: {
|
|
66
|
-
type: "string",
|
|
67
|
-
description: "JWT access token",
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
"400": currentPath?.responses?.["400"] || {
|
|
75
|
-
description: "Invalid input data",
|
|
76
|
-
},
|
|
77
|
-
"401": currentPath?.responses?.["401"] || {
|
|
78
|
-
description: "Invalid credentials",
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
};
|
|
82
|
-
paths[pathname].post = { ...(currentPath || {}), ...defaultSpec };
|
|
83
|
-
}
|
|
84
|
-
if (!isAuthEndpointDisabled("logout")) {
|
|
85
|
-
const pathname = "/api/auth/logout";
|
|
86
|
-
if (!paths[pathname])
|
|
87
|
-
paths[pathname] = {};
|
|
88
|
-
const currentPath = paths[pathname].delete;
|
|
89
|
-
const defaultSpec = {
|
|
90
|
-
tags: ["Authentication", ...(currentPath?.tags || [])].filter((tag) => tag !== "Defaults"),
|
|
91
|
-
summary: currentPath?.summary === pathname || !currentPath?.summary
|
|
92
|
-
? "Logout from the system"
|
|
93
|
-
: currentPath?.summary,
|
|
94
|
-
description: currentPath?.description || "Invalidates the current user's JWT token",
|
|
95
|
-
operationId: currentPath?.operationId?.includes(pathname)
|
|
96
|
-
? "logout"
|
|
97
|
-
: currentPath?.operationId,
|
|
98
|
-
security: [{ BearerAuth: [] }],
|
|
99
|
-
responses: {
|
|
100
|
-
...(currentPath?.responses || {}),
|
|
101
|
-
"204": currentPath?.responses?.["204"] || {
|
|
102
|
-
description: "Logout successful",
|
|
103
|
-
},
|
|
104
|
-
"401": currentPath?.responses?.["401"] || {
|
|
105
|
-
description: "Authentication required",
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
};
|
|
109
|
-
paths[pathname].delete = { ...(currentPath || {}), ...defaultSpec };
|
|
110
|
-
}
|
|
111
|
-
if (!isAuthEndpointDisabled("signup")) {
|
|
112
|
-
const pathname = "/api/auth/signup";
|
|
113
|
-
if (!paths[pathname])
|
|
114
|
-
paths[pathname] = {};
|
|
115
|
-
const signupMode = getSchemaMode("signup", arkosConfig);
|
|
116
|
-
const userMode = getSchemaMode("user", arkosConfig);
|
|
117
|
-
const currentPath = paths[pathname].post;
|
|
118
|
-
const defaultSpec = {
|
|
119
|
-
tags: ["Authentication", ...(currentPath?.tags || [])].filter((tag) => tag !== "Defaults"),
|
|
120
|
-
summary: currentPath?.summary === pathname || !currentPath?.summary
|
|
121
|
-
? "Register a new user"
|
|
122
|
-
: currentPath?.summary,
|
|
123
|
-
description: currentPath?.description || "Creates a new user account",
|
|
124
|
-
operationId: currentPath?.operationId?.includes(pathname)
|
|
125
|
-
? "signup"
|
|
126
|
-
: currentPath?.operationId,
|
|
127
|
-
requestBody: currentPath?.requestBody || {
|
|
128
|
-
description: "User registration data",
|
|
129
|
-
required: true,
|
|
130
|
-
content: {
|
|
131
|
-
"application/json": {
|
|
132
|
-
schema: {
|
|
133
|
-
$ref: getSchemaRef("Signup", signupMode),
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
responses: {
|
|
139
|
-
...(currentPath?.responses || {}),
|
|
140
|
-
"201": currentPath?.responses?.["201"] || {
|
|
141
|
-
description: "User created successfully",
|
|
142
|
-
content: {
|
|
143
|
-
"application/json": {
|
|
144
|
-
schema: {
|
|
145
|
-
$ref: getSchemaRef("User", userMode),
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
"400": currentPath?.responses?.["400"] || {
|
|
151
|
-
description: "Invalid input data",
|
|
152
|
-
},
|
|
153
|
-
"409": currentPath?.responses?.["409"] || {
|
|
154
|
-
description: "User already exists",
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
};
|
|
158
|
-
paths[pathname].post = { ...(currentPath || {}), ...defaultSpec };
|
|
159
|
-
}
|
|
160
|
-
if (!isAuthEndpointDisabled("updatePassword")) {
|
|
161
|
-
const pathname = "/api/auth/update-password";
|
|
162
|
-
if (!paths[pathname])
|
|
163
|
-
paths[pathname] = {};
|
|
164
|
-
const updatePasswordMode = getSchemaMode("updatePassword", arkosConfig);
|
|
165
|
-
const currentPath = paths[pathname].post;
|
|
166
|
-
const defaultSpec = {
|
|
167
|
-
tags: ["Authentication", ...(currentPath?.tags || [])].filter((tag) => tag !== "Defaults"),
|
|
168
|
-
summary: currentPath?.summary === pathname || !currentPath?.summary
|
|
169
|
-
? "Update user password"
|
|
170
|
-
: currentPath?.summary,
|
|
171
|
-
description: currentPath?.description ||
|
|
172
|
-
"Changes the password for the authenticated user",
|
|
173
|
-
operationId: currentPath?.operationId?.includes(pathname)
|
|
174
|
-
? "updatePassword"
|
|
175
|
-
: currentPath?.operationId,
|
|
176
|
-
security: [{ BearerAuth: [] }],
|
|
177
|
-
requestBody: currentPath?.requestBody || {
|
|
178
|
-
description: "Current and new password",
|
|
179
|
-
required: true,
|
|
180
|
-
content: {
|
|
181
|
-
"application/json": {
|
|
182
|
-
schema: {
|
|
183
|
-
$ref: getSchemaRef("UpdatePassword", updatePasswordMode),
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
responses: {
|
|
189
|
-
...(currentPath?.responses || {}),
|
|
190
|
-
"200": currentPath?.responses?.["200"] || {
|
|
191
|
-
description: "Password updated successfully",
|
|
192
|
-
content: {
|
|
193
|
-
"application/json": {
|
|
194
|
-
schema: {
|
|
195
|
-
type: "object",
|
|
196
|
-
properties: {
|
|
197
|
-
status: {
|
|
198
|
-
type: "string",
|
|
199
|
-
example: "success",
|
|
200
|
-
},
|
|
201
|
-
message: {
|
|
202
|
-
type: "string",
|
|
203
|
-
example: "Password updated successfully!",
|
|
204
|
-
},
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
"400": currentPath?.responses?.["400"] || {
|
|
211
|
-
description: "Invalid input data or current password incorrect",
|
|
212
|
-
},
|
|
213
|
-
"401": currentPath?.responses?.["401"] || {
|
|
214
|
-
description: "Authentication required",
|
|
215
|
-
},
|
|
216
|
-
},
|
|
217
|
-
};
|
|
218
|
-
paths[pathname].post = { ...(currentPath || {}), ...defaultSpec };
|
|
219
|
-
}
|
|
220
|
-
if (!isAuthEndpointDisabled("getMe")) {
|
|
221
|
-
const pathname = "/api/users/me";
|
|
222
|
-
if (!paths[pathname])
|
|
223
|
-
paths[pathname] = {};
|
|
224
|
-
const findMeMode = getSchemaMode("getMe", arkosConfig);
|
|
225
|
-
const currentPath = paths[pathname].get;
|
|
226
|
-
const defaultSpec = {
|
|
227
|
-
tags: ["Authentication", ...(currentPath?.tags || [])].filter((tag) => tag !== "Defaults"),
|
|
228
|
-
summary: currentPath?.summary === pathname || !currentPath?.summary
|
|
229
|
-
? "Get current user information"
|
|
230
|
-
: currentPath?.summary,
|
|
231
|
-
description: currentPath?.description ||
|
|
232
|
-
"Retrieves information about the currently authenticated user",
|
|
233
|
-
operationId: currentPath?.operationId?.includes(pathname)
|
|
234
|
-
? "getMe"
|
|
235
|
-
: currentPath?.operationId,
|
|
236
|
-
security: [{ BearerAuth: [] }],
|
|
237
|
-
responses: {
|
|
238
|
-
...(currentPath?.responses || {}),
|
|
239
|
-
"200": currentPath?.responses?.["200"] || {
|
|
240
|
-
description: "User information retrieved successfully",
|
|
241
|
-
content: {
|
|
242
|
-
"application/json": {
|
|
243
|
-
schema: {
|
|
244
|
-
$ref: getSchemaRef("GetMe", findMeMode),
|
|
245
|
-
},
|
|
246
|
-
},
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
"401": currentPath?.responses?.["401"] || {
|
|
250
|
-
description: "Authentication required",
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
};
|
|
254
|
-
paths[pathname].get = { ...(currentPath || {}), ...defaultSpec };
|
|
255
|
-
}
|
|
256
|
-
if (!isAuthEndpointDisabled("updateMe")) {
|
|
257
|
-
const pathname = "/api/users/me";
|
|
258
|
-
if (!paths[pathname])
|
|
259
|
-
paths[pathname] = {};
|
|
260
|
-
const updateMeMode = getSchemaMode("updateMe", arkosConfig);
|
|
261
|
-
const userMode = getSchemaMode("user", arkosConfig);
|
|
262
|
-
const currentPath = paths[pathname].patch;
|
|
263
|
-
const defaultSpec = {
|
|
264
|
-
tags: ["Authentication", ...(currentPath?.tags || [])].filter((tag) => tag !== "Defaults"),
|
|
265
|
-
summary: currentPath?.summary === pathname || !currentPath?.summary
|
|
266
|
-
? "Update current user information"
|
|
267
|
-
: currentPath?.summary,
|
|
268
|
-
description: currentPath?.description ||
|
|
269
|
-
"Updates information for the currently authenticated user",
|
|
270
|
-
operationId: currentPath?.operationId?.includes(pathname)
|
|
271
|
-
? "updateMe"
|
|
272
|
-
: currentPath?.operationId,
|
|
273
|
-
security: [{ BearerAuth: [] }],
|
|
274
|
-
requestBody: currentPath?.requestBody || {
|
|
275
|
-
description: "User data to update",
|
|
276
|
-
required: true,
|
|
277
|
-
content: {
|
|
278
|
-
"application/json": {
|
|
279
|
-
schema: {
|
|
280
|
-
$ref: getSchemaRef("UpdateMe", updateMeMode),
|
|
281
|
-
},
|
|
282
|
-
},
|
|
283
|
-
},
|
|
284
|
-
},
|
|
285
|
-
responses: {
|
|
286
|
-
...(currentPath?.responses || {}),
|
|
287
|
-
"200": currentPath?.responses?.["200"] || {
|
|
288
|
-
description: "User updated successfully",
|
|
289
|
-
content: {
|
|
290
|
-
"application/json": {
|
|
291
|
-
schema: {
|
|
292
|
-
$ref: getSchemaRef("User", userMode),
|
|
293
|
-
},
|
|
294
|
-
},
|
|
295
|
-
},
|
|
296
|
-
},
|
|
297
|
-
"400": currentPath?.responses?.["400"] || {
|
|
298
|
-
description: "Invalid input data",
|
|
299
|
-
},
|
|
300
|
-
"401": currentPath?.responses?.["401"] || {
|
|
301
|
-
description: "Authentication required",
|
|
302
|
-
},
|
|
303
|
-
},
|
|
304
|
-
};
|
|
305
|
-
paths[pathname].patch = { ...(currentPath || {}), ...defaultSpec };
|
|
306
|
-
}
|
|
307
|
-
if (!isAuthEndpointDisabled("deleteMe")) {
|
|
308
|
-
const pathname = "/api/users/me";
|
|
309
|
-
if (!paths[pathname])
|
|
310
|
-
paths[pathname] = {};
|
|
311
|
-
const currentPath = paths[pathname].delete;
|
|
312
|
-
const defaultSpec = {
|
|
313
|
-
tags: ["Authentication", ...(currentPath?.tags || [])].filter((tag) => tag !== "Defaults"),
|
|
314
|
-
summary: currentPath?.summary === pathname || !currentPath?.summary
|
|
315
|
-
? "Delete current user account"
|
|
316
|
-
: currentPath?.summary,
|
|
317
|
-
description: currentPath?.description ||
|
|
318
|
-
"Marks the current user's account as deleted",
|
|
319
|
-
operationId: currentPath?.operationId?.includes(pathname)
|
|
320
|
-
? "deleteMe"
|
|
321
|
-
: currentPath?.operationId,
|
|
322
|
-
security: [{ BearerAuth: [] }],
|
|
323
|
-
responses: {
|
|
324
|
-
...(currentPath?.responses || {}),
|
|
325
|
-
"200": currentPath?.responses?.["200"] || {
|
|
326
|
-
description: "Account deleted successfully",
|
|
327
|
-
content: {
|
|
328
|
-
"application/json": {
|
|
329
|
-
schema: {
|
|
330
|
-
type: "object",
|
|
331
|
-
properties: {
|
|
332
|
-
message: {
|
|
333
|
-
type: "string",
|
|
334
|
-
example: "Account deleted successfully",
|
|
335
|
-
},
|
|
336
|
-
},
|
|
337
|
-
},
|
|
338
|
-
},
|
|
339
|
-
},
|
|
340
|
-
},
|
|
341
|
-
"401": currentPath?.responses?.["401"] || {
|
|
342
|
-
description: "Authentication required",
|
|
343
|
-
},
|
|
344
|
-
},
|
|
345
|
-
};
|
|
346
|
-
paths[pathname].delete = { ...(currentPath || {}), ...defaultSpec };
|
|
347
|
-
}
|
|
348
|
-
if (!isAuthEndpointDisabled("findManyAuthAction")) {
|
|
349
|
-
const pathname = "/api/auth-actions";
|
|
350
|
-
if (!paths[pathname])
|
|
351
|
-
paths[pathname] = {};
|
|
352
|
-
const currentPath = paths[pathname].get;
|
|
353
|
-
const defaultSpec = {
|
|
354
|
-
tags: ["Authentication", ...(currentPath?.tags || [])].filter((tag) => tag !== "Defaults"),
|
|
355
|
-
summary: currentPath?.summary === pathname || !currentPath?.summary
|
|
356
|
-
? "Get all authentication actions"
|
|
357
|
-
: currentPath?.summary,
|
|
358
|
-
description: currentPath?.description ||
|
|
359
|
-
"Retrieves a list of all available authentication actions and permissions",
|
|
360
|
-
operationId: currentPath?.operationId?.includes(pathname)
|
|
361
|
-
? "findManyAuthAction"
|
|
362
|
-
: currentPath?.operationId,
|
|
363
|
-
security: [{ BearerAuth: [] }],
|
|
364
|
-
responses: {
|
|
365
|
-
...(currentPath?.responses || {}),
|
|
366
|
-
"200": currentPath?.responses?.["200"] || {
|
|
367
|
-
description: "Auth actions retrieved successfully",
|
|
368
|
-
content: {
|
|
369
|
-
"application/json": {
|
|
370
|
-
schema: {
|
|
371
|
-
type: "object",
|
|
372
|
-
properties: {
|
|
373
|
-
total: {
|
|
374
|
-
type: "number",
|
|
375
|
-
description: "Total number of auth actions",
|
|
376
|
-
},
|
|
377
|
-
results: {
|
|
378
|
-
type: "number",
|
|
379
|
-
description: "Number of auth actions returned",
|
|
380
|
-
},
|
|
381
|
-
data: {
|
|
382
|
-
type: "array",
|
|
383
|
-
items: {
|
|
384
|
-
$ref: "#/components/schemas/FindManyAuthActionSystemSchema",
|
|
385
|
-
},
|
|
386
|
-
},
|
|
387
|
-
},
|
|
388
|
-
},
|
|
389
|
-
},
|
|
390
|
-
},
|
|
391
|
-
},
|
|
392
|
-
"401": currentPath?.responses?.["401"] || {
|
|
393
|
-
description: "Authentication required",
|
|
394
|
-
},
|
|
395
|
-
"403": currentPath?.responses?.["403"] || {
|
|
396
|
-
description: "Insufficient permissions",
|
|
397
|
-
},
|
|
398
|
-
},
|
|
399
|
-
};
|
|
400
|
-
paths[pathname].get = { ...(currentPath || {}), ...defaultSpec };
|
|
401
|
-
}
|
|
402
|
-
if (!isAuthEndpointDisabled("findOneAuthAction")) {
|
|
403
|
-
const pathname = "/api/auth-actions/{resourceName}";
|
|
404
|
-
if (!paths[pathname])
|
|
405
|
-
paths[pathname] = {};
|
|
406
|
-
const currentPath = paths[pathname].get;
|
|
407
|
-
const defaultParameters = [
|
|
408
|
-
{
|
|
409
|
-
name: "resourceName",
|
|
410
|
-
in: "path",
|
|
411
|
-
description: "Name of the resource to retrieve auth actions for",
|
|
412
|
-
required: true,
|
|
413
|
-
schema: { type: "string" },
|
|
414
|
-
},
|
|
415
|
-
];
|
|
416
|
-
const existingParams = currentPath?.parameters || [];
|
|
417
|
-
const existingParamKeys = new Set(existingParams.map((p) => `${p.in}-${p.name}`));
|
|
418
|
-
const mergedParameters = [
|
|
419
|
-
...existingParams,
|
|
420
|
-
...defaultParameters.filter((p) => !existingParamKeys.has(`${p.in}-${p.name}`)),
|
|
421
|
-
];
|
|
422
|
-
const defaultSpec = {
|
|
423
|
-
tags: ["Authentication", ...(currentPath?.tags || [])].filter((tag) => tag !== "Defaults"),
|
|
424
|
-
summary: currentPath?.summary === pathname || !currentPath?.summary
|
|
425
|
-
? "Get authentication actions by resource"
|
|
426
|
-
: currentPath?.summary,
|
|
427
|
-
description: currentPath?.description ||
|
|
428
|
-
"Retrieves all authentication actions for a specific resource",
|
|
429
|
-
operationId: currentPath?.operationId?.includes(pathname)
|
|
430
|
-
? "findOneAuthAction"
|
|
431
|
-
: currentPath?.operationId,
|
|
432
|
-
security: [{ BearerAuth: [] }],
|
|
433
|
-
parameters: mergedParameters,
|
|
434
|
-
responses: {
|
|
435
|
-
...(currentPath?.responses || {}),
|
|
436
|
-
"200": currentPath?.responses?.["200"] || {
|
|
437
|
-
description: "Auth actions for resource retrieved successfully",
|
|
438
|
-
content: {
|
|
439
|
-
"application/json": {
|
|
440
|
-
schema: {
|
|
441
|
-
type: "object",
|
|
442
|
-
properties: {
|
|
443
|
-
total: {
|
|
444
|
-
type: "number",
|
|
445
|
-
description: "Total number of auth actions for this resource",
|
|
446
|
-
},
|
|
447
|
-
results: {
|
|
448
|
-
type: "number",
|
|
449
|
-
description: "Number of auth actions returned",
|
|
450
|
-
},
|
|
451
|
-
data: {
|
|
452
|
-
type: "array",
|
|
453
|
-
items: {
|
|
454
|
-
$ref: "#/components/schemas/FindManyAuthActionSystemSchema",
|
|
455
|
-
},
|
|
456
|
-
},
|
|
457
|
-
},
|
|
458
|
-
},
|
|
459
|
-
},
|
|
460
|
-
},
|
|
461
|
-
},
|
|
462
|
-
"401": currentPath?.responses?.["401"] || {
|
|
463
|
-
description: "Authentication required",
|
|
464
|
-
},
|
|
465
|
-
"403": currentPath?.responses?.["403"] || {
|
|
466
|
-
description: "Insufficient permissions",
|
|
467
|
-
},
|
|
468
|
-
"404": currentPath?.responses?.["404"] || {
|
|
469
|
-
description: "Resource not found",
|
|
470
|
-
},
|
|
471
|
-
},
|
|
472
|
-
};
|
|
473
|
-
paths[pathname].get = { ...(currentPath || {}), ...defaultSpec };
|
|
474
|
-
}
|
|
475
|
-
return paths;
|
|
476
|
-
}
|
|
477
|
-
//# sourceMappingURL=get-authentication-json-schema-paths.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-authentication-json-schema-paths.js","sourceRoot":"","sources":["../../../../../../src/modules/swagger/utils/helpers/get-authentication-json-schema-paths.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAErF,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,MAAc,EACd,WAAwB,EACc,EAAE;IACxC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC;IAC9C,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC;IAE7C,IAAI,CAAC,WAAW;QAAE,OAAO,QAAQ,CAAC;IAClC,IAAI,QAAQ;QAAE,OAAO,WAAW,CAAC;IAEjC,MAAM,SAAS,GAAG,MAAa,CAAC;IAChC,MAAM,eAAe,GAAG,wBAAwB,CAC9C,SAAS,EACT,MAAM,EACN,WAAW,CACZ,CAAC;IAEF,IAAI,CAAC,eAAe;QAAE,OAAO,QAAQ,CAAC;IACtC,OAAO,WAAW,CAAC;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AAW,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,IAAI;oBACxC,WAAW,EAAE,yBAAyB;iBACvC;gBACD,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,IAAI;oBACxC,WAAW,EAAE,0BAA0B;iBACxC;gBACD,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,KAAK,CAAC,IAAI;oBACxC,WAAW,EAAE,oBAAoB;iBAClC;aACF;SACF,CAAC;QAEF,KAAK,CAAC,QAAQ,CAAE,CAAC,GAAG,GAAG,EAAE,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC;IACpE,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { OpenAPIV3 } from \"openapi-types\";\nimport {\n getSchemaRef,\n localValidatorFileExists,\n} from \"./swagger.router.helpers\";\nimport { ArkosConfig, RouterConfig } from \"../../../../exports\";\nimport { getModuleComponents } from \"../../../../utils/dynamic-loader\";\nimport { isEndpointDisabled } from \"../../../base/utils/helpers/base.router.helpers\";\n\nexport const getSchemaMode = (\n action: string,\n arkosConfig: ArkosConfig\n): \"prisma\" | \"zod\" | \"class-validator\" => {\n const swaggerMode = arkosConfig.swagger?.mode;\n const isStrict = arkosConfig.swagger?.strict;\n\n if (!swaggerMode) return \"prisma\";\n if (isStrict) return swaggerMode;\n\n const actionKey = action as any;\n const localFileExists = localValidatorFileExists(\n actionKey,\n \"auth\",\n arkosConfig\n );\n\n if (!localFileExists) return \"prisma\";\n return swaggerMode;\n};\n\nexport default function getAuthenticationJsonSchemaPaths(\n arkosConfig: ArkosConfig,\n existingPaths: OpenAPIV3.PathsObject\n) {\n const paths: OpenAPIV3.PathsObject = { ...existingPaths };\n\n if (!arkosConfig.swagger?.mode) return paths;\n\n const AuthModuleComponents = getModuleComponents(\"auth\");\n const routerConfig = AuthModuleComponents?.router\n ?.config as RouterConfig<\"auth\">;\n\n if (routerConfig?.disable === true) return paths;\n\n const isAuthEndpointDisabled = (endpoint: string): boolean => {\n return isEndpointDisabled(routerConfig, endpoint as any);\n };\n\n // Login\n if (!isAuthEndpointDisabled(\"login\")) {\n const pathname = \"/api/auth/login\";\n if (!paths[pathname]) paths[pathname] = {};\n const loginMode = getSchemaMode(\"login\", arkosConfig);\n const currentPath = paths[pathname]!.post;\n\n const defaultSpec = {\n tags: [\"Authentication\", ...(currentPath?.tags || [])].filter(\n (tag) => tag !== \"Defaults\"\n ),\n summary:\n currentPath?.summary === pathname || !currentPath?.summary\n ? \"Login to the system\"\n : currentPath?.summary,\n description:\n currentPath?.description ||\n \"Authenticates a user and returns an access token\",\n operationId: currentPath?.operationId?.includes(pathname)\n ? \"login\"\n : currentPath?.operationId,\n requestBody: currentPath?.requestBody || {\n description: \"User credentials\",\n required: true,\n content: {\n \"application/json\": {\n schema: {\n $ref: getSchemaRef(\"Login\", loginMode),\n },\n },\n },\n },\n responses: {\n ...(currentPath?.responses || {}),\n \"200\": currentPath?.responses?.[\"200\"] || {\n description: \"Login successful\",\n content: {\n \"application/json\": {\n schema: {\n type: \"object\",\n properties: {\n accessToken: {\n type: \"string\",\n description: \"JWT access token\",\n },\n },\n },\n },\n },\n },\n \"400\": currentPath?.responses?.[\"400\"] || {\n description: \"Invalid input data\",\n },\n \"401\": currentPath?.responses?.[\"401\"] || {\n description: \"Invalid credentials\",\n },\n },\n };\n\n paths[pathname]!.post = { ...(currentPath || {}), ...defaultSpec };\n }\n\n // Logout\n if (!isAuthEndpointDisabled(\"logout\")) {\n const pathname = \"/api/auth/logout\";\n if (!paths[pathname]) paths[pathname] = {};\n const currentPath = paths[pathname]!.delete;\n\n const defaultSpec = {\n tags: [\"Authentication\", ...(currentPath?.tags || [])].filter(\n (tag) => tag !== \"Defaults\"\n ),\n summary:\n currentPath?.summary === pathname || !currentPath?.summary\n ? \"Logout from the system\"\n : currentPath?.summary,\n description:\n currentPath?.description || \"Invalidates the current user's JWT token\",\n operationId: currentPath?.operationId?.includes(pathname)\n ? \"logout\"\n : currentPath?.operationId,\n security: [{ BearerAuth: [] }],\n responses: {\n ...(currentPath?.responses || {}),\n \"204\": currentPath?.responses?.[\"204\"] || {\n description: \"Logout successful\",\n },\n \"401\": currentPath?.responses?.[\"401\"] || {\n description: \"Authentication required\",\n },\n },\n };\n\n paths[pathname]!.delete = { ...(currentPath || {}), ...defaultSpec };\n }\n\n // Signup\n if (!isAuthEndpointDisabled(\"signup\")) {\n const pathname = \"/api/auth/signup\";\n if (!paths[pathname]) paths[pathname] = {};\n const signupMode = getSchemaMode(\"signup\", arkosConfig);\n const userMode = getSchemaMode(\"user\", arkosConfig);\n const currentPath = paths[pathname]!.post;\n\n const defaultSpec = {\n tags: [\"Authentication\", ...(currentPath?.tags || [])].filter(\n (tag) => tag !== \"Defaults\"\n ),\n summary:\n currentPath?.summary === pathname || !currentPath?.summary\n ? \"Register a new user\"\n : currentPath?.summary,\n description: currentPath?.description || \"Creates a new user account\",\n operationId: currentPath?.operationId?.includes(pathname)\n ? \"signup\"\n : currentPath?.operationId,\n requestBody: currentPath?.requestBody || {\n description: \"User registration data\",\n required: true,\n content: {\n \"application/json\": {\n schema: {\n $ref: getSchemaRef(\"Signup\", signupMode),\n },\n },\n },\n },\n responses: {\n ...(currentPath?.responses || {}),\n \"201\": currentPath?.responses?.[\"201\"] || {\n description: \"User created successfully\",\n content: {\n \"application/json\": {\n schema: {\n $ref: getSchemaRef(\"User\", userMode),\n },\n },\n },\n },\n \"400\": currentPath?.responses?.[\"400\"] || {\n description: \"Invalid input data\",\n },\n \"409\": currentPath?.responses?.[\"409\"] || {\n description: \"User already exists\",\n },\n },\n };\n\n paths[pathname]!.post = { ...(currentPath || {}), ...defaultSpec };\n }\n\n // Update Password\n if (!isAuthEndpointDisabled(\"updatePassword\")) {\n const pathname = \"/api/auth/update-password\";\n if (!paths[pathname]) paths[pathname] = {};\n const updatePasswordMode = getSchemaMode(\"updatePassword\", arkosConfig);\n const currentPath = paths[pathname]!.post;\n\n const defaultSpec = {\n tags: [\"Authentication\", ...(currentPath?.tags || [])].filter(\n (tag) => tag !== \"Defaults\"\n ),\n summary:\n currentPath?.summary === pathname || !currentPath?.summary\n ? \"Update user password\"\n : currentPath?.summary,\n description:\n currentPath?.description ||\n \"Changes the password for the authenticated user\",\n operationId: currentPath?.operationId?.includes(pathname)\n ? \"updatePassword\"\n : currentPath?.operationId,\n security: [{ BearerAuth: [] }],\n requestBody: currentPath?.requestBody || {\n description: \"Current and new password\",\n required: true,\n content: {\n \"application/json\": {\n schema: {\n $ref: getSchemaRef(\"UpdatePassword\", updatePasswordMode),\n },\n },\n },\n },\n responses: {\n ...(currentPath?.responses || {}),\n \"200\": currentPath?.responses?.[\"200\"] || {\n description: \"Password updated successfully\",\n content: {\n \"application/json\": {\n schema: {\n type: \"object\",\n properties: {\n status: {\n type: \"string\",\n example: \"success\",\n },\n message: {\n type: \"string\",\n example: \"Password updated successfully!\",\n },\n },\n },\n },\n },\n },\n \"400\": currentPath?.responses?.[\"400\"] || {\n description: \"Invalid input data or current password incorrect\",\n },\n \"401\": currentPath?.responses?.[\"401\"] || {\n description: \"Authentication required\",\n },\n },\n };\n\n paths[pathname]!.post = { ...(currentPath || {}), ...defaultSpec };\n }\n\n // Get Me\n if (!isAuthEndpointDisabled(\"getMe\")) {\n const pathname = \"/api/users/me\";\n if (!paths[pathname]) paths[pathname] = {};\n const findMeMode = getSchemaMode(\"getMe\", arkosConfig);\n const currentPath = paths[pathname]!.get;\n\n const defaultSpec = {\n tags: [\"Authentication\", ...(currentPath?.tags || [])].filter(\n (tag) => tag !== \"Defaults\"\n ),\n summary:\n currentPath?.summary === pathname || !currentPath?.summary\n ? \"Get current user information\"\n : currentPath?.summary,\n description:\n currentPath?.description ||\n \"Retrieves information about the currently authenticated user\",\n operationId: currentPath?.operationId?.includes(pathname)\n ? \"getMe\"\n : currentPath?.operationId,\n security: [{ BearerAuth: [] }],\n responses: {\n ...(currentPath?.responses || {}),\n \"200\": currentPath?.responses?.[\"200\"] || {\n description: \"User information retrieved successfully\",\n content: {\n \"application/json\": {\n schema: {\n $ref: getSchemaRef(\"GetMe\", findMeMode),\n },\n },\n },\n },\n \"401\": currentPath?.responses?.[\"401\"] || {\n description: \"Authentication required\",\n },\n },\n };\n\n paths[pathname]!.get = { ...(currentPath || {}), ...defaultSpec };\n }\n\n // Update Me\n if (!isAuthEndpointDisabled(\"updateMe\")) {\n const pathname = \"/api/users/me\";\n if (!paths[pathname]) paths[pathname] = {};\n const updateMeMode = getSchemaMode(\"updateMe\", arkosConfig);\n const userMode = getSchemaMode(\"user\", arkosConfig);\n const currentPath = paths[pathname]!.patch;\n\n const defaultSpec = {\n tags: [\"Authentication\", ...(currentPath?.tags || [])].filter(\n (tag) => tag !== \"Defaults\"\n ),\n summary:\n currentPath?.summary === pathname || !currentPath?.summary\n ? \"Update current user information\"\n : currentPath?.summary,\n description:\n currentPath?.description ||\n \"Updates information for the currently authenticated user\",\n operationId: currentPath?.operationId?.includes(pathname)\n ? \"updateMe\"\n : currentPath?.operationId,\n security: [{ BearerAuth: [] }],\n requestBody: currentPath?.requestBody || {\n description: \"User data to update\",\n required: true,\n content: {\n \"application/json\": {\n schema: {\n $ref: getSchemaRef(\"UpdateMe\", updateMeMode),\n },\n },\n },\n },\n responses: {\n ...(currentPath?.responses || {}),\n \"200\": currentPath?.responses?.[\"200\"] || {\n description: \"User updated successfully\",\n content: {\n \"application/json\": {\n schema: {\n $ref: getSchemaRef(\"User\", userMode),\n },\n },\n },\n },\n \"400\": currentPath?.responses?.[\"400\"] || {\n description: \"Invalid input data\",\n },\n \"401\": currentPath?.responses?.[\"401\"] || {\n description: \"Authentication required\",\n },\n },\n };\n\n paths[pathname]!.patch = { ...(currentPath || {}), ...defaultSpec };\n }\n\n // Delete Me\n if (!isAuthEndpointDisabled(\"deleteMe\")) {\n const pathname = \"/api/users/me\";\n if (!paths[pathname]) paths[pathname] = {};\n const currentPath = paths[pathname]!.delete;\n\n const defaultSpec = {\n tags: [\"Authentication\", ...(currentPath?.tags || [])].filter(\n (tag) => tag !== \"Defaults\"\n ),\n summary:\n currentPath?.summary === pathname || !currentPath?.summary\n ? \"Delete current user account\"\n : currentPath?.summary,\n description:\n currentPath?.description ||\n \"Marks the current user's account as deleted\",\n operationId: currentPath?.operationId?.includes(pathname)\n ? \"deleteMe\"\n : currentPath?.operationId,\n security: [{ BearerAuth: [] }],\n responses: {\n ...(currentPath?.responses || {}),\n \"200\": currentPath?.responses?.[\"200\"] || {\n description: \"Account deleted successfully\",\n content: {\n \"application/json\": {\n schema: {\n type: \"object\",\n properties: {\n message: {\n type: \"string\",\n example: \"Account deleted successfully\",\n },\n },\n },\n },\n },\n },\n \"401\": currentPath?.responses?.[\"401\"] || {\n description: \"Authentication required\",\n },\n },\n };\n\n paths[pathname]!.delete = { ...(currentPath || {}), ...defaultSpec };\n }\n\n // Find Many Auth Action\n if (!isAuthEndpointDisabled(\"findManyAuthAction\")) {\n const pathname = \"/api/auth-actions\";\n if (!paths[pathname]) paths[pathname] = {};\n const currentPath = paths[pathname]!.get;\n\n const defaultSpec = {\n tags: [\"Authentication\", ...(currentPath?.tags || [])].filter(\n (tag) => tag !== \"Defaults\"\n ),\n summary:\n currentPath?.summary === pathname || !currentPath?.summary\n ? \"Get all authentication actions\"\n : currentPath?.summary,\n description:\n currentPath?.description ||\n \"Retrieves a list of all available authentication actions and permissions\",\n operationId: currentPath?.operationId?.includes(pathname)\n ? \"findManyAuthAction\"\n : currentPath?.operationId,\n security: [{ BearerAuth: [] }],\n responses: {\n ...(currentPath?.responses || {}),\n \"200\": currentPath?.responses?.[\"200\"] || {\n description: \"Auth actions retrieved successfully\",\n content: {\n \"application/json\": {\n schema: {\n type: \"object\",\n properties: {\n total: {\n type: \"number\",\n description: \"Total number of auth actions\",\n },\n results: {\n type: \"number\",\n description: \"Number of auth actions returned\",\n },\n data: {\n type: \"array\",\n items: {\n $ref: \"#/components/schemas/FindManyAuthActionSystemSchema\",\n },\n },\n },\n },\n },\n },\n },\n \"401\": currentPath?.responses?.[\"401\"] || {\n description: \"Authentication required\",\n },\n \"403\": currentPath?.responses?.[\"403\"] || {\n description: \"Insufficient permissions\",\n },\n },\n };\n\n paths[pathname]!.get = { ...(currentPath || {}), ...defaultSpec };\n }\n\n if (!isAuthEndpointDisabled(\"findOneAuthAction\")) {\n const pathname = \"/api/auth-actions/{resourceName}\";\n if (!paths[pathname]) paths[pathname] = {};\n const currentPath = paths[pathname]!.get;\n\n const defaultParameters: OpenAPIV3.ParameterObject[] = [\n {\n name: \"resourceName\",\n in: \"path\",\n description: \"Name of the resource to retrieve auth actions for\",\n required: true,\n schema: { type: \"string\" },\n },\n ];\n\n const existingParams =\n (currentPath?.parameters as OpenAPIV3.ParameterObject[]) || [];\n const existingParamKeys = new Set(\n existingParams.map((p) => `${p.in}-${p.name}`)\n );\n\n const mergedParameters = [\n ...existingParams,\n ...defaultParameters.filter(\n (p) => !existingParamKeys.has(`${p.in}-${p.name}`)\n ),\n ];\n\n const defaultSpec = {\n tags: [\"Authentication\", ...(currentPath?.tags || [])].filter(\n (tag) => tag !== \"Defaults\"\n ),\n summary:\n currentPath?.summary === pathname || !currentPath?.summary\n ? \"Get authentication actions by resource\"\n : currentPath?.summary,\n description:\n currentPath?.description ||\n \"Retrieves all authentication actions for a specific resource\",\n operationId: currentPath?.operationId?.includes(pathname)\n ? \"findOneAuthAction\"\n : currentPath?.operationId,\n security: [{ BearerAuth: [] }],\n parameters: mergedParameters,\n responses: {\n ...(currentPath?.responses || {}),\n \"200\": currentPath?.responses?.[\"200\"] || {\n description: \"Auth actions for resource retrieved successfully\",\n content: {\n \"application/json\": {\n schema: {\n type: \"object\",\n properties: {\n total: {\n type: \"number\",\n description:\n \"Total number of auth actions for this resource\",\n },\n results: {\n type: \"number\",\n description: \"Number of auth actions returned\",\n },\n data: {\n type: \"array\",\n items: {\n $ref: \"#/components/schemas/FindManyAuthActionSystemSchema\",\n },\n },\n },\n },\n },\n },\n },\n \"401\": currentPath?.responses?.[\"401\"] || {\n description: \"Authentication required\",\n },\n \"403\": currentPath?.responses?.[\"403\"] || {\n description: \"Insufficient permissions\",\n },\n \"404\": currentPath?.responses?.[\"404\"] || {\n description: \"Resource not found\",\n },\n },\n };\n\n paths[pathname]!.get = { ...(currentPath || {}), ...defaultSpec };\n }\n\n return paths;\n}\n"]}
|