diff --git a/bin/generate-swagger.js b/bin/generate-swagger.js index 5facd33..186d470 100644 --- a/bin/generate-swagger.js +++ b/bin/generate-swagger.js @@ -6,6 +6,17 @@ const commander = require('commander'); const { AppModule } = require('../dist/app.module'); const { SHA256 } = require('crypto-js'); +const { ListUsersQuery } = require('../dist/user/dto/list-users.dto'); +const { ListNamespacesQuery } = require('../dist/namespace/dto/list-namespaces.dto'); +const { GetAuthorizerQuery } = require('../dist/auth/dto/authorize-query.dto'); +const { ListCaptchasQuery } = require('../dist/captcha/dto/list-captchas.dto'); +const { ListEmailRecordsQuery } = require('../dist/email/dto/list-email-records.dto'); +const { ListGroupsQuery } = require('../dist/group/dto/list-groups.dto'); +const { ListIndustriesQuery } = require('../dist/industry/dto/list-industries.dto'); +const { ListRolesQuery } = require('../dist/role/dto/list-roles.dto'); +const { ListSessionsQuery } = require('../dist/session/dto/list-sessions.dto'); +const { ListSmsRecordsQuery } = require('../dist/sms/dto/list-sms-records.dto'); +const { ListThirdPartyQuery } = require('../dist/third-party/dto/list-third-party.dto'); async function bootstrap(prefix) { const app = await NestFactory.create(AppModule, { logger: false }); @@ -14,7 +25,7 @@ async function bootstrap(prefix) { const config = new DocumentBuilder() .setTitle('Auth API Server') .setDescription('Auth API for auth service') - .setVersion('1.0') + .setVersion('2.0') .addApiKey( { in: 'header', @@ -25,7 +36,21 @@ async function bootstrap(prefix) { ) .build(); - const document = SwaggerModule.createDocument(app, config); + const document = SwaggerModule.createDocument(app, config, { + extraModels: [ + ListUsersQuery, + ListNamespacesQuery, + GetAuthorizerQuery, + ListCaptchasQuery, + ListEmailRecordsQuery, + ListGroupsQuery, + ListIndustriesQuery, + ListRolesQuery, + ListSessionsQuery, + ListSmsRecordsQuery, + ListThirdPartyQuery, + ], + }); const documentWithSha = { hash: SHA256(JSON.stringify(document, null, 2)).toString(), ...document, diff --git a/openapi.json b/openapi.json index 2c30cf8..d7b2e09 100644 --- a/openapi.json +++ b/openapi.json @@ -1,5 +1,5 @@ { - "hash": "a499cd3dde02dd82d308aa0d3fcd3f082c1ee0cb50da627a71c9257fa5083fc4", + "hash": "e26e3af00836f78f0427468d6934febb637790646375504417d292334e01d500", "openapi": "3.0.0", "paths": { "/hello": { @@ -83,35 +83,11 @@ "operationId": "getAuthorizer", "parameters": [ { - "name": "provider", + "name": "GetAuthorizerQuery", "required": true, "in": "query", "schema": { - "type": "string" - } - }, - { - "name": "redirectUri", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "responseType", - "required": false, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "state", - "required": false, - "in": "query", - "schema": { - "type": "string" + "$ref": "#/components/schemas/GetAuthorizerQuery" } } ], @@ -531,56 +507,11 @@ "operationId": "listCaptchas", "parameters": [ { - "name": "_sort", - "required": false, - "in": "query", - "description": "排序参数", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "-createdAt", - "updatedAt", - "-updatedAt", - "expireAt", - "-expireAt" - ] - } - }, - { - "name": "code", - "required": false, - "in": "query", - "description": "验证码", - "schema": { - "type": "string" - } - }, - { - "name": "key", - "required": false, - "in": "query", - "description": "key", - "schema": { - "type": "string" - } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" - } - }, - { - "name": "_offset", - "required": false, + "name": "ListCaptchasQuery", + "required": true, "in": "query", - "description": "分页偏移", "schema": { - "type": "number" + "$ref": "#/components/schemas/ListCaptchasQuery" } } ], @@ -794,105 +725,11 @@ "operationId": "listEmailRecords", "parameters": [ { - "name": "status", - "required": false, - "in": "query", - "description": "发送状态", - "schema": { - "$ref": "#/components/schemas/EmailStatus" - } - }, - { - "name": "_sort", - "required": false, - "in": "query", - "description": "排序参数", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "-createdAt", - "updatedAt", - "-updatedAt", - "sentAt", - "-sentAt" - ] - } - }, - { - "name": "createdAt_gt", - "required": false, - "in": "query", - "description": "创建时间大于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "createdAt_lt", - "required": false, - "in": "query", - "description": "创建时间小于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "sentAt_gt", - "required": false, - "in": "query", - "description": "发送时间大于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "sentAt_lt", - "required": false, - "in": "query", - "description": "发送时间小于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "from", - "required": false, - "in": "query", - "description": "发件者", - "schema": { - "type": "string" - } - }, - { - "name": "to", - "required": false, - "in": "query", - "description": "收件者", - "schema": { - "type": "string" - } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" - } - }, - { - "name": "_offset", - "required": false, + "name": "ListEmailRecordsQuery", + "required": true, "in": "query", - "description": "分页偏移", "schema": { - "type": "number" + "$ref": "#/components/schemas/ListEmailRecordsQuery" } } ], @@ -1070,75 +907,11 @@ "operationId": "listGroups", "parameters": [ { - "name": "_sort", - "required": false, - "in": "query", - "description": "排序参数", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "-createdAt", - "updatedAt", - "-updatedAt" - ] - } - }, - { - "name": "id", - "required": false, - "in": "query", - "description": "按 id 筛选", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "name_like", - "required": false, - "in": "query", - "description": "名称 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "name", - "required": false, - "in": "query", - "description": "名称", - "schema": { - "type": "string" - } - }, - { - "name": "active", - "required": false, - "in": "query", - "description": "是否启用", - "schema": { - "type": "boolean" - } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" - } - }, - { - "name": "_offset", - "required": false, + "name": "ListGroupsQuery", + "required": true, "in": "query", - "description": "分页偏移", "schema": { - "type": "number" + "$ref": "#/components/schemas/ListGroupsQuery" } } ], @@ -1374,155 +1147,51 @@ "operationId": "listNamespaces", "parameters": [ { - "name": "key_start", - "required": false, + "name": "ListNamespacesQuery", + "required": true, "in": "query", - "description": "key start 查询", "schema": { - "$ref": "#/components/schemas/Object" + "$ref": "#/components/schemas/ListNamespacesQuery" } - }, - { - "name": "key_tree", - "required": false, - "in": "query", - "description": "key tree 查询", - "schema": { - "type": "string" + } + ], + "responses": { + "200": { + "description": "A paged array of namespaces.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Namespace" + } + } + } } - }, + } + }, + "security": [ { - "name": "ns", - "required": false, - "in": "query", - "description": "所属命名空间", + "ApiKey": [] + } + ], + "summary": "List namespaces", + "tags": [ + "namespace" + ] + } + }, + "/namespaces/{namespaceIdOrKey}": { + "get": { + "operationId": "getNamespace", + "parameters": [ + { + "name": "namespaceIdOrKey", + "required": true, + "in": "path", + "description": "Namespace id or key, if key should encodeURIComponent", "schema": { - "$ref": "#/components/schemas/Object" - } - }, - { - "name": "ns_start", - "required": false, - "in": "query", - "description": "所属命名空间 start 查询", - "schema": { - "$ref": "#/components/schemas/Object" - } - }, - { - "name": "ns_tree", - "required": false, - "in": "query", - "description": "所属命名空间 tree 查询", - "schema": { - "type": "string" - } - }, - { - "name": "_sort", - "required": false, - "in": "query", - "description": "排序参数", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "-createdAt", - "updatedAt", - "-updatedAt", - "key", - "-key", - "name", - "-name" - ] - } - }, - { - "name": "key", - "required": false, - "in": "query", - "description": "按 key 查询", - "schema": { - "$ref": "#/components/schemas/Object" - } - }, - { - "name": "name_like", - "required": false, - "in": "query", - "description": "名称 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "labels", - "required": false, - "in": "query", - "description": "标签", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" - } - }, - { - "name": "_offset", - "required": false, - "in": "query", - "description": "分页偏移", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "A paged array of namespaces.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Namespace" - } - } - } - } - } - }, - "security": [ - { - "ApiKey": [] - } - ], - "summary": "List namespaces", - "tags": [ - "namespace" - ] - } - }, - "/namespaces/{namespaceIdOrKey}": { - "get": { - "operationId": "getNamespace", - "parameters": [ - { - "name": "namespaceIdOrKey", - "required": true, - "in": "path", - "description": "Namespace id or key, if key should encodeURIComponent", - "schema": { - "type": "string" + "type": "string" } } ], @@ -1662,128 +1331,11 @@ "operationId": "listSessions", "parameters": [ { - "name": "_sort", - "required": false, - "in": "query", - "description": "排序参数", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "-createdAt", - "updatedAt", - "-updatedAt", - "expireAt", - "-expireAt" - ] - } - }, - { - "name": "refreshToken", - "required": false, - "in": "query", - "description": "用 key 进行查询", - "schema": { - "type": "string" - } - }, - { - "name": "subject", - "required": false, - "in": "query", - "description": "用户或第三方用户 id", - "schema": { - "type": "string" - } - }, - { - "name": "source", - "required": false, - "in": "query", - "description": "如果来自第三方,则会加上 source", - "schema": { - "type": "string" - } - }, - { - "name": "permissions", - "required": false, - "in": "query", - "description": "角色之外的权限", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "roles", - "required": false, - "in": "query", - "description": "角色", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "groups", - "required": false, - "in": "query", - "description": "用户所属的组", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "ns", - "required": false, - "in": "query", - "description": "user ns", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "required": false, - "in": "query", - "description": "用户类型", - "schema": { - "type": "string" - } - }, - { - "name": "oneTimeUse", - "required": false, - "in": "query", - "description": "一次性的,禁止轮换", - "schema": { - "type": "boolean" - } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" - } - }, - { - "name": "_offset", - "required": false, + "name": "ListSessionsQuery", + "required": true, "in": "query", - "description": "分页偏移", "schema": { - "type": "number" + "$ref": "#/components/schemas/ListSessionsQuery" } } ], @@ -2021,124 +1573,30 @@ "operationId": "listSmsRecords", "parameters": [ { - "name": "status", - "required": false, - "in": "query", - "description": "发送状态", - "schema": { - "$ref": "#/components/schemas/SmsStatus" - } - }, - { - "name": "_sort", - "required": false, - "in": "query", - "description": "排序参数", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "-createdAt", - "updatedAt", - "-updatedAt", - "sentAt", - "-sentAt" - ] - } - }, - { - "name": "createdAt_gt", - "required": false, + "name": "ListSmsRecordsQuery", + "required": true, "in": "query", - "description": "创建时间大于该时间", "schema": { - "format": "date-time", - "type": "string" + "$ref": "#/components/schemas/ListSmsRecordsQuery" } - }, - { - "name": "createdAt_lt", - "required": false, - "in": "query", - "description": "创建时间小于该时间", - "schema": { - "format": "date-time", - "type": "string" + } + ], + "responses": { + "200": { + "description": "A paged of sms record list.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SmsRecord" + } + } + } } - }, - { - "name": "sentAt_gt", - "required": false, - "in": "query", - "description": "发送时间大于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "sentAt_lt", - "required": false, - "in": "query", - "description": "发送时间小于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "phone", - "required": false, - "in": "query", - "description": "手机号", - "schema": { - "type": "string" - } - }, - { - "name": "sign", - "required": false, - "in": "query", - "description": "签名", - "schema": { - "type": "string" - } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" - } - }, - { - "name": "_offset", - "required": false, - "in": "query", - "description": "分页偏移", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "A paged of sms record list.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SmsRecord" - } - } - } - } - } - }, - "security": [ + } + }, + "security": [ { "ApiKey": [] } @@ -2292,102 +1750,11 @@ "operationId": "listThirdParty", "parameters": [ { - "name": "source", - "required": false, - "in": "query", - "description": "第三方登录来源", - "schema": { - "type": "string" - } - }, - { - "name": "tid", - "required": false, - "in": "query", - "description": "第三方登录的用户唯一标识", - "schema": { - "type": "string" - } - }, - { - "name": "accessToken", - "required": false, - "in": "query", - "description": "第三方登录 accessToken", - "schema": { - "type": "string" - } - }, - { - "name": "expireAt", - "required": false, - "in": "query", - "description": "第三方登录过期时间", - "schema": { - "type": "number" - } - }, - { - "name": "tokenType", - "required": false, - "in": "query", - "description": "第三方登录 token 类型", - "schema": { - "type": "string" - } - }, - { - "name": "refreshToken", - "required": false, - "in": "query", - "description": "第三方登录 refreshToken", - "schema": { - "type": "string" - } - }, - { - "name": "refreshTokenExpireAt", - "required": false, - "in": "query", - "description": "第三方登录 refreshToken 过期时间", - "schema": { - "type": "number" - } - }, - { - "name": "uid", - "required": false, - "in": "query", - "description": "关联uid", - "schema": { - "type": "string" - } - }, - { - "name": "data", - "required": false, - "in": "query", - "description": "用于存储第三方的额外数据", - "schema": { - "type": "string" - } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" - } - }, - { - "name": "_offset", - "required": false, + "name": "ListThirdPartyQuery", + "required": true, "in": "query", - "description": "分页偏移", "schema": { - "type": "number" + "$ref": "#/components/schemas/ListThirdPartyQuery" } } ], @@ -2669,520 +2036,56 @@ } } } - } - }, - "summary": "Create user", - "tags": [ - "user" - ] - }, - "get": { - "operationId": "listUsers", - "parameters": [ - { - "name": "_sort", - "required": false, - "in": "query", - "description": "排序参数", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "-createdAt", - "updatedAt", - "-updatedAt", - "lastLoginAt", - "-lastLoginAt", - "expireAt", - "-expireAt" - ] - } - }, - { - "name": "id", - "required": false, - "in": "query", - "description": "按 id 筛选", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "name_like", - "required": false, - "in": "query", - "description": "名称 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "username_like", - "required": false, - "in": "query", - "description": "用户名 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "nickname_like", - "required": false, - "in": "query", - "description": "昵称 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "ns", - "required": false, - "in": "query", - "description": "所属命名空间的 ns 本级查询", - "schema": { - "$ref": "#/components/schemas/Object" - } - }, - { - "name": "ns_start", - "required": false, - "in": "query", - "description": "所属命名空间的前缀匹配查询", - "schema": { - "$ref": "#/components/schemas/Object" - } - }, - { - "name": "ns_tree", - "required": false, - "in": "query", - "description": "所属命名空间的 tree 查询", - "schema": { - "type": "string" - } - }, - { - "name": "expireAt_gte", - "required": false, - "in": "query", - "description": "过期时间大于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "expireAt_lte", - "required": false, - "in": "query", - "description": "过期时间小于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "active", - "required": false, - "in": "query", - "description": "是否启用", - "schema": { - "type": "boolean" - } - }, - { - "name": "email", - "required": false, - "in": "query", - "description": "邮箱", - "schema": { - "type": "string" - } - }, - { - "name": "groups", - "required": false, - "in": "query", - "description": "团队", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "inviter", - "required": false, - "in": "query", - "description": "邀请人", - "schema": { - "type": "string" - } - }, - { - "name": "labels", - "required": false, - "in": "query", - "description": "标签", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "name", - "required": false, - "in": "query", - "description": "姓名", - "schema": { - "type": "string" - } - }, - { - "name": "phone", - "required": false, - "in": "query", - "description": "手机号", - "schema": { - "type": "string" - } - }, - { - "name": "registerRegion", - "required": false, - "in": "query", - "description": "注册地区,存地区编号", - "schema": { - "type": "string" - } - }, - { - "name": "roles", - "required": false, - "in": "query", - "description": "角色", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "status", - "required": false, - "in": "query", - "description": "状态", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "required": false, - "in": "query", - "description": "类型, 登录端", - "schema": { - "type": "string" - } - }, - { - "name": "username", - "required": false, - "in": "query", - "description": "用户名", - "schema": { - "type": "string" - } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" - } - }, - { - "name": "_offset", - "required": false, - "in": "query", - "description": "分页偏移", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "A paged array of users.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/User" - } - } - } - } - } - }, - "summary": "List users", - "tags": [ - "user" - ] - } - }, - "/users/@countUsers": { - "post": { - "operationId": "countUsers", - "parameters": [ - { - "name": "_sort", - "required": false, - "in": "query", - "description": "排序参数", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "-createdAt", - "updatedAt", - "-updatedAt", - "lastLoginAt", - "-lastLoginAt", - "expireAt", - "-expireAt" - ] - } - }, - { - "name": "id", - "required": false, - "in": "query", - "description": "按 id 筛选", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "name_like", - "required": false, - "in": "query", - "description": "名称 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "username_like", - "required": false, - "in": "query", - "description": "用户名 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "nickname_like", - "required": false, - "in": "query", - "description": "昵称 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "ns", - "required": false, - "in": "query", - "description": "所属命名空间的 ns 本级查询", - "schema": { - "$ref": "#/components/schemas/Object" - } - }, - { - "name": "ns_start", - "required": false, - "in": "query", - "description": "所属命名空间的前缀匹配查询", - "schema": { - "$ref": "#/components/schemas/Object" - } - }, - { - "name": "ns_tree", - "required": false, - "in": "query", - "description": "所属命名空间的 tree 查询", - "schema": { - "type": "string" - } - }, - { - "name": "expireAt_gte", - "required": false, - "in": "query", - "description": "过期时间大于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "expireAt_lte", - "required": false, - "in": "query", - "description": "过期时间小于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "active", - "required": false, - "in": "query", - "description": "是否启用", - "schema": { - "type": "boolean" - } - }, - { - "name": "email", - "required": false, - "in": "query", - "description": "邮箱", - "schema": { - "type": "string" - } - }, - { - "name": "groups", - "required": false, - "in": "query", - "description": "团队", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "inviter", - "required": false, - "in": "query", - "description": "邀请人", - "schema": { - "type": "string" - } - }, - { - "name": "labels", - "required": false, - "in": "query", - "description": "标签", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "name", - "required": false, - "in": "query", - "description": "姓名", - "schema": { - "type": "string" - } - }, - { - "name": "phone", - "required": false, - "in": "query", - "description": "手机号", - "schema": { - "type": "string" - } - }, - { - "name": "registerRegion", - "required": false, - "in": "query", - "description": "注册地区,存地区编号", - "schema": { - "type": "string" - } - }, - { - "name": "roles", - "required": false, - "in": "query", - "description": "角色", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "status", - "required": false, - "in": "query", - "description": "状态", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "required": false, - "in": "query", - "description": "类型, 登录端", - "schema": { - "type": "string" - } - }, + } + }, + "summary": "Create user", + "tags": [ + "user" + ] + }, + "get": { + "operationId": "listUsers", + "parameters": [ { - "name": "username", - "required": false, + "name": "ListUsersQuery", + "required": true, "in": "query", - "description": "用户名", "schema": { - "type": "string" + "$ref": "#/components/schemas/ListUsersQuery" } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" + } + ], + "responses": { + "200": { + "description": "A paged array of users.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/User" + } + } + } } - }, + } + }, + "summary": "List users", + "tags": [ + "user" + ] + } + }, + "/users/@countUsers": { + "post": { + "operationId": "countUsers", + "parameters": [ { - "name": "_offset", - "required": false, + "name": "ListUsersQuery", + "required": true, "in": "query", - "description": "分页偏移", "schema": { - "type": "number" + "$ref": "#/components/schemas/ListUsersQuery" } } ], @@ -3581,243 +2484,11 @@ "operationId": "aggregateUsers", "parameters": [ { - "name": "_sort", - "required": false, - "in": "query", - "description": "排序参数", - "schema": { - "type": "string", - "enum": [ - "createdAt", - "-createdAt", - "updatedAt", - "-updatedAt", - "lastLoginAt", - "-lastLoginAt", - "expireAt", - "-expireAt" - ] - } - }, - { - "name": "id", - "required": false, - "in": "query", - "description": "按 id 筛选", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "name_like", - "required": false, - "in": "query", - "description": "名称 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "username_like", - "required": false, - "in": "query", - "description": "用户名 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "nickname_like", - "required": false, - "in": "query", - "description": "昵称 模糊查询", - "schema": { - "type": "string" - } - }, - { - "name": "ns", - "required": false, - "in": "query", - "description": "所属命名空间的 ns 本级查询", - "schema": { - "$ref": "#/components/schemas/Object" - } - }, - { - "name": "ns_start", - "required": false, - "in": "query", - "description": "所属命名空间的前缀匹配查询", - "schema": { - "$ref": "#/components/schemas/Object" - } - }, - { - "name": "ns_tree", - "required": false, - "in": "query", - "description": "所属命名空间的 tree 查询", - "schema": { - "type": "string" - } - }, - { - "name": "expireAt_gte", - "required": false, - "in": "query", - "description": "过期时间大于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "expireAt_lte", - "required": false, - "in": "query", - "description": "过期时间小于该时间", - "schema": { - "format": "date-time", - "type": "string" - } - }, - { - "name": "active", - "required": false, - "in": "query", - "description": "是否启用", - "schema": { - "type": "boolean" - } - }, - { - "name": "email", - "required": false, - "in": "query", - "description": "邮箱", - "schema": { - "type": "string" - } - }, - { - "name": "groups", - "required": false, - "in": "query", - "description": "团队", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "inviter", - "required": false, - "in": "query", - "description": "邀请人", - "schema": { - "type": "string" - } - }, - { - "name": "labels", - "required": false, - "in": "query", - "description": "标签", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "name", - "required": false, - "in": "query", - "description": "姓名", - "schema": { - "type": "string" - } - }, - { - "name": "phone", - "required": false, - "in": "query", - "description": "手机号", - "schema": { - "type": "string" - } - }, - { - "name": "registerRegion", - "required": false, - "in": "query", - "description": "注册地区,存地区编号", - "schema": { - "type": "string" - } - }, - { - "name": "roles", - "required": false, - "in": "query", - "description": "角色", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "status", - "required": false, - "in": "query", - "description": "状态", - "schema": { - "type": "string" - } - }, - { - "name": "type", - "required": false, - "in": "query", - "description": "类型, 登录端", - "schema": { - "type": "string" - } - }, - { - "name": "username", - "required": false, - "in": "query", - "description": "用户名", - "schema": { - "type": "string" - } - }, - { - "name": "_limit", - "required": false, - "in": "query", - "description": "分页大小", - "schema": { - "type": "number" - } - }, - { - "name": "_offset", - "required": false, + "name": "ListUsersQuery", + "required": true, "in": "query", - "description": "分页偏移", "schema": { - "type": "number" + "$ref": "#/components/schemas/ListUsersQuery" } } ], @@ -3868,7 +2539,16 @@ "/industries": { "get": { "operationId": "listIndustries", - "parameters": [], + "parameters": [ + { + "name": "ListIndustriesQuery", + "required": true, + "in": "query", + "schema": { + "$ref": "#/components/schemas/ListIndustriesQuery" + } + } + ], "responses": { "200": { "description": "A paged array of region.", @@ -4155,7 +2835,7 @@ "info": { "title": "Auth API Server", "description": "Auth API for auth service", - "version": "1.0", + "version": "2.0", "contact": {} }, "tags": [], @@ -4302,6 +2982,26 @@ "tokenExpireAt" ] }, + "GetAuthorizerQuery": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "redirectUri": { + "type": "string" + }, + "responseType": { + "type": "string" + }, + "state": { + "type": "string" + } + }, + "required": [ + "provider" + ] + }, "Authorizer": { "type": "object", "properties": { @@ -4905,6 +3605,39 @@ "id" ] }, + "ListCaptchasQuery": { + "type": "object", + "properties": { + "_sort": { + "type": "string", + "description": "排序参数", + "enum": [ + "createdAt", + "-createdAt", + "updatedAt", + "-updatedAt", + "expireAt", + "-expireAt" + ] + }, + "code": { + "type": "string", + "description": "验证码" + }, + "key": { + "type": "string", + "description": "key" + }, + "_limit": { + "type": "number", + "description": "分页大小" + }, + "_offset": { + "type": "number", + "description": "分页偏移" + } + } + }, "UpdateCaptchaDto": { "type": "object", "properties": { @@ -5088,6 +3821,67 @@ "id" ] }, + "ListEmailRecordsQuery": { + "type": "object", + "properties": { + "status": { + "description": "发送状态", + "allOf": [ + { + "$ref": "#/components/schemas/EmailStatus" + } + ] + }, + "_sort": { + "type": "string", + "description": "排序参数", + "enum": [ + "createdAt", + "-createdAt", + "updatedAt", + "-updatedAt", + "sentAt", + "-sentAt" + ] + }, + "createdAt_gt": { + "format": "date-time", + "type": "string", + "description": "创建时间大于该时间" + }, + "createdAt_lt": { + "format": "date-time", + "type": "string", + "description": "创建时间小于该时间" + }, + "sentAt_gt": { + "format": "date-time", + "type": "string", + "description": "发送时间大于该时间" + }, + "sentAt_lt": { + "format": "date-time", + "type": "string", + "description": "发送时间小于该时间" + }, + "from": { + "type": "string", + "description": "发件者" + }, + "to": { + "type": "string", + "description": "收件者" + }, + "_limit": { + "type": "number", + "description": "分页大小" + }, + "_offset": { + "type": "number", + "description": "分页偏移" + } + } + }, "UpdateEmailRecordDto": { "type": "object", "properties": { @@ -5199,6 +3993,48 @@ "id" ] }, + "ListGroupsQuery": { + "type": "object", + "properties": { + "_sort": { + "type": "string", + "description": "排序参数", + "enum": [ + "createdAt", + "-createdAt", + "updatedAt", + "-updatedAt" + ] + }, + "id": { + "description": "按 id 筛选", + "type": "array", + "items": { + "type": "string" + } + }, + "name_like": { + "type": "string", + "description": "名称 模糊查询" + }, + "name": { + "type": "string", + "description": "名称" + }, + "active": { + "type": "boolean", + "description": "是否启用" + }, + "_limit": { + "type": "number", + "description": "分页大小" + }, + "_offset": { + "type": "number", + "description": "分页偏移" + } + } + }, "UpdateGroupDto": { "type": "object", "properties": { @@ -5356,9 +4192,107 @@ "id" ] }, - "Object": { + "ListNamespacesQuery": { "type": "object", - "properties": {} + "properties": { + "key": { + "description": "按 key 查询", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "key_start": { + "description": "key start 查询", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "key_tree": { + "type": "string", + "description": "key tree 查询" + }, + "ns": { + "description": "所属命名空间", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ns_start": { + "description": "所属命名空间 start 查询", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ns_tree": { + "type": "string", + "description": "所属命名空间 tree 查询" + }, + "_sort": { + "type": "string", + "description": "排序参数", + "enum": [ + "createdAt", + "-createdAt", + "updatedAt", + "-updatedAt", + "key", + "-key", + "name", + "-name" + ] + }, + "name_like": { + "type": "string", + "description": "名称 模糊查询" + }, + "labels": { + "description": "标签", + "type": "array", + "items": { + "type": "string" + } + }, + "_limit": { + "type": "number", + "description": "分页大小" + }, + "_offset": { + "type": "number", + "description": "分页偏移" + } + } }, "UpdateNamespaceDto": { "type": "object", @@ -5466,9 +4400,99 @@ "type": "string", "description": "会话过期时间" }, - "key": { + "key": { + "type": "string", + "description": "session key\n可以作为 refresh token" + }, + "subject": { + "type": "string", + "description": "用户或第三方用户 id" + }, + "source": { + "type": "string", + "description": "如果来自第三方,则会加上 source" + }, + "permissions": { + "description": "角色之外的权限", + "type": "array", + "items": { + "type": "string" + } + }, + "roles": { + "description": "角色", + "type": "array", + "items": { + "type": "string" + } + }, + "groups": { + "description": "用户所属的组", + "type": "array", + "items": { + "type": "string" + } + }, + "ns": { + "type": "string", + "description": "user ns" + }, + "type": { + "type": "string", + "description": "用户类型" + }, + "oneTimeUse": { + "type": "boolean", + "description": "一次性的,禁止轮换" + }, + "id": { + "type": "string", + "description": "Entity id" + }, + "createdAt": { + "format": "date-time", + "type": "string", + "description": "Entity created at when" + }, + "updatedAt": { + "format": "date-time", + "type": "string", + "description": "Entity updated at when" + }, + "createdBy": { + "type": "string", + "description": "Entity created by who" + }, + "updatedBy": { + "type": "string", + "description": "Entity updated by who" + } + }, + "required": [ + "expireAt", + "key", + "subject", + "id" + ] + }, + "ListSessionsQuery": { + "type": "object", + "properties": { + "_sort": { + "type": "string", + "description": "排序参数", + "enum": [ + "createdAt", + "-createdAt", + "updatedAt", + "-updatedAt", + "expireAt", + "-expireAt" + ] + }, + "refreshToken": { "type": "string", - "description": "session key\n可以作为 refresh token" + "description": "用 key 进行查询" }, "subject": { "type": "string", @@ -5511,35 +4535,15 @@ "type": "boolean", "description": "一次性的,禁止轮换" }, - "id": { - "type": "string", - "description": "Entity id" - }, - "createdAt": { - "format": "date-time", - "type": "string", - "description": "Entity created at when" - }, - "updatedAt": { - "format": "date-time", - "type": "string", - "description": "Entity updated at when" - }, - "createdBy": { - "type": "string", - "description": "Entity created by who" + "_limit": { + "type": "number", + "description": "分页大小" }, - "updatedBy": { - "type": "string", - "description": "Entity updated by who" + "_offset": { + "type": "number", + "description": "分页偏移" } - }, - "required": [ - "expireAt", - "key", - "subject", - "id" - ] + } }, "UpdateSessionDto": { "type": "object", @@ -5725,6 +4729,67 @@ "id" ] }, + "ListSmsRecordsQuery": { + "type": "object", + "properties": { + "status": { + "description": "发送状态", + "allOf": [ + { + "$ref": "#/components/schemas/SmsStatus" + } + ] + }, + "_sort": { + "type": "string", + "description": "排序参数", + "enum": [ + "createdAt", + "-createdAt", + "updatedAt", + "-updatedAt", + "sentAt", + "-sentAt" + ] + }, + "createdAt_gt": { + "format": "date-time", + "type": "string", + "description": "创建时间大于该时间" + }, + "createdAt_lt": { + "format": "date-time", + "type": "string", + "description": "创建时间小于该时间" + }, + "sentAt_gt": { + "format": "date-time", + "type": "string", + "description": "发送时间大于该时间" + }, + "sentAt_lt": { + "format": "date-time", + "type": "string", + "description": "发送时间小于该时间" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "sign": { + "type": "string", + "description": "签名" + }, + "_limit": { + "type": "number", + "description": "分页大小" + }, + "_offset": { + "type": "number", + "description": "分页偏移" + } + } + }, "UpdateSmsRecordDto": { "type": "object", "properties": { @@ -5876,6 +4941,55 @@ "id" ] }, + "ListThirdPartyQuery": { + "type": "object", + "properties": { + "source": { + "type": "string", + "description": "第三方登录来源" + }, + "tid": { + "type": "string", + "description": "第三方登录的用户唯一标识" + }, + "accessToken": { + "type": "string", + "description": "第三方登录 accessToken" + }, + "expireAt": { + "type": "number", + "description": "第三方登录过期时间" + }, + "tokenType": { + "type": "string", + "description": "第三方登录 token 类型" + }, + "refreshToken": { + "type": "string", + "description": "第三方登录 refreshToken" + }, + "refreshTokenExpireAt": { + "type": "number", + "description": "第三方登录 refreshToken 过期时间" + }, + "uid": { + "type": "string", + "description": "关联uid" + }, + "data": { + "type": "string", + "description": "用于存储第三方的额外数据" + }, + "_limit": { + "type": "number", + "description": "分页大小" + }, + "_offset": { + "type": "number", + "description": "分页偏移" + } + } + }, "UpdateThirdPartyDto": { "type": "object", "properties": { @@ -6076,6 +5190,151 @@ } } }, + "ListUsersQuery": { + "type": "object", + "properties": { + "id": { + "description": "按 id 筛选", + "type": "array", + "items": { + "type": "string" + } + }, + "ns": { + "description": "所属命名空间", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ns_start": { + "description": "所属命名空间 start 查询", + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "_sort": { + "type": "string", + "description": "排序参数", + "enum": [ + "createdAt", + "-createdAt", + "updatedAt", + "-updatedAt", + "lastLoginAt", + "-lastLoginAt", + "expireAt", + "-expireAt" + ] + }, + "name_like": { + "type": "string", + "description": "名称 模糊查询" + }, + "username_like": { + "type": "string", + "description": "用户名 模糊查询" + }, + "nickname_like": { + "type": "string", + "description": "昵称 模糊查询" + }, + "ns_tree": { + "type": "string", + "description": "所属命名空间的 tree 查询" + }, + "expireAt_gte": { + "format": "date-time", + "type": "string", + "description": "过期时间大于该时间" + }, + "expireAt_lte": { + "format": "date-time", + "type": "string", + "description": "过期时间小于该时间" + }, + "active": { + "type": "boolean", + "description": "是否启用" + }, + "email": { + "type": "string", + "description": "邮箱" + }, + "groups": { + "description": "团队", + "type": "array", + "items": { + "type": "string" + } + }, + "inviter": { + "type": "string", + "description": "邀请人" + }, + "labels": { + "description": "标签", + "type": "array", + "items": { + "type": "string" + } + }, + "name": { + "type": "string", + "description": "姓名" + }, + "phone": { + "type": "string", + "description": "手机号" + }, + "registerRegion": { + "type": "string", + "description": "注册地区,存地区编号" + }, + "roles": { + "description": "角色", + "type": "array", + "items": { + "type": "string" + } + }, + "status": { + "type": "string", + "description": "状态" + }, + "type": { + "type": "string", + "description": "类型, 登录端" + }, + "username": { + "type": "string", + "description": "用户名" + }, + "_limit": { + "type": "number", + "description": "分页大小" + }, + "_offset": { + "type": "number", + "description": "分页偏移" + } + } + }, "CountResult": { "type": "object", "properties": { @@ -6346,6 +5605,15 @@ "count" ] }, + "ListIndustriesQuery": { + "type": "object", + "properties": { + "depth": { + "type": "number", + "description": "返回的层数\n默认返回所有层级" + } + } + }, "Industry": { "type": "object", "properties": { @@ -6490,6 +5758,41 @@ } } } + }, + "ListRolesQuery": { + "type": "object", + "properties": { + "_sort": { + "type": "string", + "description": "排序参数", + "enum": [ + "createdAt", + "-createdAt", + "updatedAt", + "-updatedAt" + ] + }, + "name_like": { + "type": "string", + "description": "名称 模糊查询" + }, + "name": { + "type": "string", + "description": "名称" + }, + "key": { + "type": "string", + "description": "role key" + }, + "_limit": { + "type": "number", + "description": "分页大小" + }, + "_offset": { + "type": "number", + "description": "分页偏移" + } + } } } } diff --git a/package.json b/package.json index 7c552b2..d513ff4 100644 --- a/package.json +++ b/package.json @@ -24,22 +24,23 @@ "github-secret": "ts-node scripts/github-action-secret.ts" }, "dependencies": { + "@fastify/static": "8.2.0", "@alicloud/sms-sdk": "^1.1.6", "@nestjs/bull": "^11.0.2", "@nestjs/cache-manager": "^3.0.1", - "@nestjs/common": "^11.1.2", - "@nestjs/core": "^11.1.2", + "@nestjs/common": "^11.1.6", + "@nestjs/core": "^11.1.6", "@nestjs/event-emitter": "^3.0.1", "@nestjs/jwt": "^11.0.0", "@nestjs/mongoose": "^11.0.3", - "@nestjs/platform-express": "^11.1.2", + "@nestjs/platform-express": "^11.1.6", "@nestjs/swagger": "^11.2.0", "axios": "^1.7.2", "bull": "^4.13.0", "cache-manager": "^6.4.3", "cache-manager-redis-yet": "^5.1.1", "class-transformer": "^0.5.1", - "class-validator": "^0.14.1", + "class-validator": "^0.14.2", "compression": "^1.7.4", "crypto-js": "^4.2.0", "dayjs": "^1.11.10", @@ -58,7 +59,7 @@ "path-to-regexp": "0.1.7", "postmark": "^4.0.2", "redis": "^4.6.14", - "reflect-metadata": "^0.1.13", + "reflect-metadata": "0.2.2", "rxjs": "^7.2.0", "source-map-support": "^0.5.20" }, @@ -73,7 +74,7 @@ "@ianvs/prettier-plugin-sort-imports": "^4.1.1", "@nestjs/cli": "^11.0.7", "@nestjs/schematics": "^11.0.5", - "@nestjs/testing": "^11.1.2", + "@nestjs/testing": "^11.1.6", "@octokit/core": "^5.1.0", "@types/crypto-js": "^4.2.2", "@types/express": "^4.17.13", @@ -101,6 +102,25 @@ "tsconfig-paths": "4.2.0", "typescript": "~5.1.0" }, + "peerDependencies": { + "@fastify/static": "^8.0.0", + "@nestjs/common": "^11.0.1", + "@nestjs/core": "^11.0.1", + "class-transformer": "*", + "class-validator": "*", + "reflect-metadata": "^0.1.12 || ^0.2.0" + }, + "peerDependenciesMeta": { + "@fastify/static": { + "optional": true + }, + "class-transformer": { + "optional": true + }, + "class-validator": { + "optional": true + } + }, "jest": { "moduleNameMapper": { "src/(.*)": "/src/$1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cf9ceb2..3bc7c9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,33 +14,36 @@ importers: '@alicloud/sms-sdk': specifier: ^1.1.6 version: 1.1.6 + '@fastify/static': + specifier: 8.2.0 + version: 8.2.0 '@nestjs/bull': specifier: ^11.0.2 - version: 11.0.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(bull@4.13.0) + version: 11.0.2(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(bull@4.13.0) '@nestjs/cache-manager': specifier: ^3.0.1 - version: 3.0.1(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(cache-manager@6.4.3)(keyv@5.3.3)(rxjs@7.8.1) + version: 3.0.1(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(cache-manager@6.4.3)(keyv@5.3.3)(rxjs@7.8.1) '@nestjs/common': - specifier: ^11.1.2 - version: 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) + specifier: ^11.1.6 + version: 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nestjs/core': - specifier: ^11.1.2 - version: 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1) + specifier: ^11.1.6 + version: 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nestjs/event-emitter': specifier: ^3.0.1 - version: 3.0.1(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2) + version: 3.0.1(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1)) '@nestjs/jwt': specifier: ^11.0.0 - version: 11.0.0(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1)) + version: 11.0.0(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1)) '@nestjs/mongoose': specifier: ^11.0.3 - version: 11.0.3(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(mongoose@8.1.3)(rxjs@7.8.1) + version: 11.0.3(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(mongoose@8.1.3)(rxjs@7.8.1) '@nestjs/platform-express': - specifier: ^11.1.2 - version: 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2) + specifier: ^11.1.6 + version: 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6) '@nestjs/swagger': specifier: ^11.2.0 - version: 11.2.0(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14) + version: 11.2.0(@fastify/static@8.2.0)(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2) axios: specifier: ^1.7.2 version: 1.7.2(debug@4.3.4) @@ -57,8 +60,8 @@ importers: specifier: ^0.5.1 version: 0.5.1 class-validator: - specifier: ^0.14.1 - version: 0.14.1 + specifier: ^0.14.2 + version: 0.14.2 compression: specifier: ^1.7.4 version: 1.7.4 @@ -114,8 +117,8 @@ importers: specifier: ^4.6.14 version: 4.6.14 reflect-metadata: - specifier: ^0.1.13 - version: 0.1.14 + specifier: 0.2.2 + version: 0.2.2 rxjs: specifier: ^7.2.0 version: 7.8.1 @@ -154,8 +157,8 @@ importers: specifier: ^11.0.5 version: 11.0.5(chokidar@4.0.3)(typescript@5.1.6) '@nestjs/testing': - specifier: ^11.1.2 - version: 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(@nestjs/platform-express@11.1.2) + specifier: ^11.1.6 + version: 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6)) '@octokit/core': specifier: ^5.1.0 version: 5.1.0 @@ -594,6 +597,15 @@ packages: resolution: {integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} + '@fastify/accept-negotiator@2.0.1': + resolution: {integrity: sha512-/c/TW2bO/v9JeEgoD/g1G5GxGeCF1Hafdf79WPmUlgYiBXummY0oX3VVq4yFkKKVBKDNlaDUYoab7g38RpPqCQ==} + + '@fastify/send@4.1.0': + resolution: {integrity: sha512-TMYeQLCBSy2TOFmV95hQWkiTYgC/SEx7vMdV+wnZVX4tt8VBLKzmH8vV9OzJehV0+XBfg+WxPMt5wp+JBUKsVw==} + + '@fastify/static@8.2.0': + resolution: {integrity: sha512-PejC/DtT7p1yo3p+W7LiUtLMsV8fEvxAK15sozHy9t8kwo5r0uLYmhV/inURmGz1SkHZFz/8CNtHLPyhKcx4SQ==} + '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -879,6 +891,10 @@ packages: resolution: {integrity: sha512-Z7C/xXCiGWsg0KuKsHTKJxbWhpI3Vs5GwLfOean7MGyVFGqdRgBbAjOCh6u4bbjPc/8MJ2pZmK/0DLdCbivLDA==} engines: {node: '>=8'} + '@lukeed/ms@2.0.2': + resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==} + engines: {node: '>=8'} + '@microsoft/tsdoc@0.15.1': resolution: {integrity: sha512-4aErSrCR/On/e5G2hDP0wjooqDdauzEbIq8hIkIe5pXV0rtWJZvdCEKL0ykZxex+IxIwBp0eGeV48hQN07dXtw==} @@ -953,8 +969,8 @@ packages: '@swc/core': optional: true - '@nestjs/common@11.1.2': - resolution: {integrity: sha512-cHh4OPH44PjaHM93D1jgE1HO/B7XTZVRDxy/cPuGgyMEA4p2zXO+qqcOgTMC5FYcp7dX9jLeCjXAU0ToFAnODw==} + '@nestjs/common@11.1.6': + resolution: {integrity: sha512-krKwLLcFmeuKDqngG2N/RuZHCs2ycsKcxWIDgcm7i1lf3sQ0iG03ci+DsP/r3FcT/eJDFsIHnKtNta2LIi7PzQ==} peerDependencies: class-transformer: '>=0.4.1' class-validator: '>=0.13.2' @@ -966,8 +982,8 @@ packages: class-validator: optional: true - '@nestjs/core@11.1.2': - resolution: {integrity: sha512-QRuyxwu0BjNfmmmunsw1ylX7RSyfDQHt+xD+tKncdtgiMOOzAu+LA1gB4WoZnw4frQkk+qZbhEbM61cIjOxD3w==} + '@nestjs/core@11.1.6': + resolution: {integrity: sha512-siWX7UDgErisW18VTeJA+x+/tpNZrJewjTBsRPF3JVxuWRuAB1kRoiJcxHgln8Lb5UY9NdvklITR84DUEXD0Cg==} engines: {node: '>= 20'} peerDependencies: '@nestjs/common': ^11.0.0 @@ -1016,8 +1032,8 @@ packages: mongoose: ^7.0.0 || ^8.0.0 rxjs: ^7.0.0 - '@nestjs/platform-express@11.1.2': - resolution: {integrity: sha512-GlNwOT4htRp8RpZ+TpqGtSHwGKw/abdxxBRse40XE2SWs5ikaoujr9Yd+5sJWDNXB4QTftwb+FplXhyk1Ra+4A==} + '@nestjs/platform-express@11.1.6': + resolution: {integrity: sha512-HErwPmKnk+loTq8qzu1up+k7FC6Kqa8x6lJ4cDw77KnTxLzsCaPt+jBvOq6UfICmfqcqCCf3dKXg+aObQp+kIQ==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/core': ^11.0.0 @@ -1044,8 +1060,8 @@ packages: class-validator: optional: true - '@nestjs/testing@11.1.2': - resolution: {integrity: sha512-BQxVKUVW6gzEbbHAvmg5RgcP3s++pRgTCmsgaDF/DtcLRUeKi8SjAdqzLm14xbkMeibxOf3fNqM2iwqUKj8ffw==} + '@nestjs/testing@11.1.6': + resolution: {integrity: sha512-srYzzDNxGvVCe1j0SpTS9/ix75PKt6Sn6iMaH1rpJ6nj2g8vwNrhK0CoJJXvpCYgrnI+2WES2pprYnq8rAMYHA==} peerDependencies: '@nestjs/common': ^11.0.0 '@nestjs/core': ^11.0.0 @@ -1803,8 +1819,8 @@ packages: class-transformer@0.5.1: resolution: {integrity: sha512-SQa1Ws6hUbfC98vKGxZH3KFY0Y1lm5Zm0SY8XX9zbK7FJCyVEac3ATW0RIpwzW+oOfmHE5PMPufDG9hCfoEOMw==} - class-validator@0.14.1: - resolution: {integrity: sha512-2VEG9JICxIqTpoK1eMzZqaV+u/EiwEJkMGzTrZf6sU/fwsnOITVgYJ8yojSy6CaXtO9V0Cc6ZQZ8h8m4UBuLwQ==} + class-validator@0.14.2: + resolution: {integrity: sha512-3kMVRF2io8N8pY1IFIXlho9r8IPUUIfHe2hYVtiebvAzU2XeQFXTv+XI4WX+TnXmtwXMDcjngcpkiPM0O9PvLw==} cli-cursor@3.1.0: resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} @@ -1896,9 +1912,9 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - concat-stream@1.6.2: - resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} - engines: {'0': node >= 0.8} + concat-stream@2.0.0: + resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} + engines: {'0': node >= 6.0} consola@3.4.2: resolution: {integrity: sha512-5IKcdX0nnYavi6G7TtOhwkYzyjfJlatbjMjuLSfE2kYT5pMDOilZ4OvMhi637CcDICTmz3wARPoyhqyX1Y+XvA==} @@ -1907,6 +1923,10 @@ packages: constant-case@3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} + content-disposition@0.5.4: + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} + content-disposition@1.0.0: resolution: {integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==} engines: {node: '>= 0.6'} @@ -1935,8 +1955,8 @@ packages: resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} engines: {node: '>=6.6.0'} - cookie@0.7.2: - resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} + cookie@0.7.1: + resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} engines: {node: '>= 0.6'} cookiejar@2.1.4: @@ -2383,6 +2403,9 @@ packages: resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} engines: {node: '>=4'} + fast-decode-uri-component@1.0.1: + resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -2408,6 +2431,9 @@ packages: fast-uri@3.0.6: resolution: {integrity: sha512-Atfo14OibSv5wAp4VWNsFYE1AchQRTv9cBGWET4pZWHzYshFSS9NQI6I57rdKn9croWVMbYFbLhJ+yJvmZIIHw==} + fastify-plugin@5.0.1: + resolution: {integrity: sha512-HCxs+YnRaWzCl+cWRYFnHmeRFyR5GVnJTAaCJQiYzQSDwK9MgJdyAsuL3nh0EWRCYMgQ5MeziymvmAhUHYHDUQ==} + fastq@1.19.1: resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} @@ -2718,6 +2744,10 @@ packages: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + iconv-lite@0.7.0: + resolution: {integrity: sha512-cf6L2Ds3h57VVmkZe+Pn+5APsT7FpqJtEhhieDCvrE2MK5Qk9MyffgQyuxQTm6BChfeZNtcOLHp9IcWRVcIcBQ==} + engines: {node: '>=0.10.0'} + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -2912,9 +2942,6 @@ packages: resolution: {integrity: sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==} engines: {node: '>= 0.4'} - isarray@1.0.0: - resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} - isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} @@ -3182,8 +3209,8 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - libphonenumber-js@1.10.56: - resolution: {integrity: sha512-d0GdKshNnyfl5gM7kZ9rXjGiAbxT/zCXp0k+EAzh8H4zrb2R7GXtMCrULrX7UQxtfx6CLy/vz/lomvW79FAFdA==} + libphonenumber-js@1.12.23: + resolution: {integrity: sha512-RN3q3gImZ91BvRDYjWp7ICz3gRn81mW5L4SW+2afzNCC0I/nkXstBgZThQGTE3S/9q5J90FH4dP+TXx8NhdZKg==} libsodium-wrappers@0.7.13: resolution: {integrity: sha512-kasvDsEi/r1fMzKouIDv7B8I6vNmknXwGiYodErGuESoFTohGSKZplFtVxZqHaoQ217AynyIFgnOVRitpHs0Qw==} @@ -3395,6 +3422,11 @@ packages: engines: {node: '>=4.0.0'} hasBin: true + mime@3.0.0: + resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} + engines: {node: '>=10.0.0'} + hasBin: true + mimic-fn@2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} @@ -3537,8 +3569,8 @@ packages: msgpackr@1.10.1: resolution: {integrity: sha512-r5VRLv9qouXuLiIBrLpl2d5ZvPt8svdQTl5/vMvE4nzDMyEX4sgW5yWhuBBj5UmgwOTWj8CIdSXn5sAfsHAWIQ==} - multer@2.0.0: - resolution: {integrity: sha512-bS8rPZurbAuHGAnApbM9d4h1wSoYqrOqkE+6a64KLMK9yWU7gJXBDDVklKQ3TPi9DRb85cRs6yXaC0+cjxRtRg==} + multer@2.0.2: + resolution: {integrity: sha512-u7f2xaZ/UG8oLXHvtF/oWTRvT44p9ecwBBqTwgJVq0+4BW1g8OW01TyMEGWBHbyMOYVHXslaut7qEQ1meATXgw==} engines: {node: '>= 10.16.0'} mute-stream@2.0.0: @@ -3802,9 +3834,6 @@ packages: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - process-nextick-args@2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - promise-coalesce@1.1.2: resolution: {integrity: sha512-zLaJ9b8hnC564fnJH6NFSOGZYYdzrAJn2JUUIwzoQb32fG2QAakpDNM+CZo1km6keXkRXRM+hml1BFAPVnPkxg==} engines: {node: '>=16'} @@ -3849,9 +3878,9 @@ packages: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} - raw-body@3.0.0: - resolution: {integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==} - engines: {node: '>= 0.8'} + raw-body@3.0.1: + resolution: {integrity: sha512-9G8cA+tuMS75+6G/TzW8OtLzmBDMo8p1JRxN5AZ+LAp8uxGA8V8GZm4GQ4/N5QNQEnLmg6SS7wyuSmbKepiKqA==} + engines: {node: '>= 0.10'} react-is@18.2.0: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} @@ -3864,9 +3893,6 @@ packages: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} - readable-stream@2.3.8: - resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} - readable-stream@3.6.2: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} @@ -3890,8 +3916,8 @@ packages: redis@4.6.14: resolution: {integrity: sha512-GrNg/e33HtsQwNXL7kJT+iNFPSwE1IPmd7wzV3j4f2z0EYxZfZE7FVTmUysgAtqQQtg5NXF5SNLR9OdO/UHOfw==} - reflect-metadata@0.1.14: - resolution: {integrity: sha512-ZhYeb6nRaXCfhnndflDK8qI6ZQ/YcWZCISRAWICW9XYqMUwjZM9Z0DveWX/ABN01oxSHwVxKQmxeYZSsm0jh5A==} + reflect-metadata@0.2.2: + resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} reflect.getprototypeof@1.0.10: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} @@ -4179,9 +4205,6 @@ packages: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} engines: {node: '>= 0.4'} - string_decoder@1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} @@ -5171,6 +5194,25 @@ snapshots: '@faker-js/faker@8.4.1': {} + '@fastify/accept-negotiator@2.0.1': {} + + '@fastify/send@4.1.0': + dependencies: + '@lukeed/ms': 2.0.2 + escape-html: 1.0.3 + fast-decode-uri-component: 1.0.1 + http-errors: 2.0.0 + mime: 3.0.0 + + '@fastify/static@8.2.0': + dependencies: + '@fastify/accept-negotiator': 2.0.1 + '@fastify/send': 4.1.0 + content-disposition: 0.5.4 + fastify-plugin: 5.0.1 + fastq: 1.19.1 + glob: 11.0.1 + '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.6': @@ -5558,6 +5600,8 @@ snapshots: '@lukeed/csprng@1.1.0': {} + '@lukeed/ms@2.0.2': {} + '@microsoft/tsdoc@0.15.1': {} '@mongodb-js/saslprep@1.1.4': @@ -5586,24 +5630,24 @@ snapshots: '@msgpackr-extract/msgpackr-extract-win32-x64@3.0.3': optional: true - '@nestjs/bull-shared@11.0.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)': + '@nestjs/bull-shared@11.0.2(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))': dependencies: - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) tslib: 2.8.1 - '@nestjs/bull@11.0.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(bull@4.13.0)': + '@nestjs/bull@11.0.2(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(bull@4.13.0)': dependencies: - '@nestjs/bull-shared': 11.0.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2) - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/bull-shared': 11.0.2(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1)) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) bull: 4.13.0 tslib: 2.8.1 - '@nestjs/cache-manager@3.0.1(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(cache-manager@6.4.3)(keyv@5.3.3)(rxjs@7.8.1)': + '@nestjs/cache-manager@3.0.1(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(cache-manager@6.4.3)(keyv@5.3.3)(rxjs@7.8.1)': dependencies: - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) cache-manager: 6.4.3 keyv: 5.3.3 rxjs: 7.8.1 @@ -5635,69 +5679,69 @@ snapshots: - uglify-js - webpack-cli - '@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1)': + '@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1)': dependencies: file-type: 21.0.0 iterare: 1.2.1 load-esm: 1.0.2 - reflect-metadata: 0.1.14 + reflect-metadata: 0.2.2 rxjs: 7.8.1 tslib: 2.8.1 uid: 2.0.2 optionalDependencies: class-transformer: 0.5.1 - class-validator: 0.14.1 + class-validator: 0.14.2 transitivePeerDependencies: - supports-color - '@nestjs/core@11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1)': + '@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1)': dependencies: - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@nuxt/opencollective': 0.4.1 fast-safe-stringify: 2.1.1 iterare: 1.2.1 path-to-regexp: 8.2.0 - reflect-metadata: 0.1.14 + reflect-metadata: 0.2.2 rxjs: 7.8.1 tslib: 2.8.1 uid: 2.0.2 optionalDependencies: - '@nestjs/platform-express': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2) + '@nestjs/platform-express': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6) - '@nestjs/event-emitter@3.0.1(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)': + '@nestjs/event-emitter@3.0.1(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))': dependencies: - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) eventemitter2: 6.4.9 - '@nestjs/jwt@11.0.0(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))': + '@nestjs/jwt@11.0.0(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))': dependencies: - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) '@types/jsonwebtoken': 9.0.7 jsonwebtoken: 9.0.2 - '@nestjs/mapped-types@2.1.0(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)': + '@nestjs/mapped-types@2.1.0(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)': dependencies: - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) - reflect-metadata: 0.1.14 + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) + reflect-metadata: 0.2.2 optionalDependencies: class-transformer: 0.5.1 - class-validator: 0.14.1 + class-validator: 0.14.2 - '@nestjs/mongoose@11.0.3(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(mongoose@8.1.3)(rxjs@7.8.1)': + '@nestjs/mongoose@11.0.3(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(mongoose@8.1.3)(rxjs@7.8.1)': dependencies: - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) mongoose: 8.1.3 rxjs: 7.8.1 - '@nestjs/platform-express@11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)': + '@nestjs/platform-express@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6)': dependencies: - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) cors: 2.8.5 express: 5.1.0 - multer: 2.0.0 + multer: 2.0.2 path-to-regexp: 8.2.0 tslib: 2.8.1 transitivePeerDependencies: @@ -5725,28 +5769,29 @@ snapshots: transitivePeerDependencies: - chokidar - '@nestjs/swagger@11.2.0(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)': + '@nestjs/swagger@11.2.0(@fastify/static@8.2.0)(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)': dependencies: '@microsoft/tsdoc': 0.15.1 - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/mapped-types': 2.1.0(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/mapped-types': 2.1.0(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2) js-yaml: 4.1.0 lodash: 4.17.21 path-to-regexp: 8.2.0 - reflect-metadata: 0.1.14 + reflect-metadata: 0.2.2 swagger-ui-dist: 5.21.0 optionalDependencies: + '@fastify/static': 8.2.0 class-transformer: 0.5.1 - class-validator: 0.14.1 + class-validator: 0.14.2 - '@nestjs/testing@11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2)(@nestjs/platform-express@11.1.2)': + '@nestjs/testing@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6))': dependencies: - '@nestjs/common': 11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1) - '@nestjs/core': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/platform-express@11.1.2)(reflect-metadata@0.1.14)(rxjs@7.8.1) + '@nestjs/common': 11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1) + '@nestjs/core': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/platform-express@11.1.6)(reflect-metadata@0.2.2)(rxjs@7.8.1) tslib: 2.8.1 optionalDependencies: - '@nestjs/platform-express': 11.1.2(@nestjs/common@11.1.2(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.1.14)(rxjs@7.8.1))(@nestjs/core@11.1.2) + '@nestjs/platform-express': 11.1.6(@nestjs/common@11.1.6(class-transformer@0.5.1)(class-validator@0.14.2)(reflect-metadata@0.2.2)(rxjs@7.8.1))(@nestjs/core@11.1.6) '@nodelib/fs.scandir@2.1.5': dependencies: @@ -6461,7 +6506,7 @@ snapshots: iconv-lite: 0.6.3 on-finished: 2.4.1 qs: 6.14.0 - raw-body: 3.0.0 + raw-body: 3.0.1 type-is: 2.0.1 transitivePeerDependencies: - supports-color @@ -6597,7 +6642,7 @@ snapshots: camel-case@4.1.2: dependencies: pascal-case: 3.1.2 - tslib: 2.6.2 + tslib: 2.8.1 camelcase-keys@6.2.2: dependencies: @@ -6616,7 +6661,7 @@ snapshots: capital-case@1.0.4: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.8.1 upper-case-first: 2.0.2 chalk@2.4.2: @@ -6643,7 +6688,7 @@ snapshots: path-case: 3.0.4 sentence-case: 3.0.4 snake-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.8.1 char-regex@1.0.2: {} @@ -6661,10 +6706,10 @@ snapshots: class-transformer@0.5.1: {} - class-validator@0.14.1: + class-validator@0.14.2: dependencies: '@types/validator': 13.11.9 - libphonenumber-js: 1.10.56 + libphonenumber-js: 1.12.23 validator: 13.11.0 cli-cursor@3.1.0: @@ -6754,11 +6799,11 @@ snapshots: concat-map@0.0.1: {} - concat-stream@1.6.2: + concat-stream@2.0.0: dependencies: buffer-from: 1.1.2 inherits: 2.0.4 - readable-stream: 2.3.8 + readable-stream: 3.6.2 typedarray: 0.0.6 consola@3.4.2: {} @@ -6766,9 +6811,13 @@ snapshots: constant-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.8.1 upper-case: 2.0.2 + content-disposition@0.5.4: + dependencies: + safe-buffer: 5.2.1 + content-disposition@1.0.0: dependencies: safe-buffer: 5.2.1 @@ -6794,7 +6843,7 @@ snapshots: cookie-signature@1.2.2: {} - cookie@0.7.2: {} + cookie@0.7.1: {} cookiejar@2.1.4: {} @@ -6963,7 +7012,7 @@ snapshots: dot-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.8.1 dot-prop@5.3.0: dependencies: @@ -7292,7 +7341,7 @@ snapshots: body-parser: 2.2.0 content-disposition: 1.0.0 content-type: 1.0.5 - cookie: 0.7.2 + cookie: 0.7.1 cookie-signature: 1.2.2 debug: 4.4.1 encodeurl: 2.0.0 @@ -7324,6 +7373,8 @@ snapshots: iconv-lite: 0.4.24 tmp: 0.0.33 + fast-decode-uri-component@1.0.1: {} + fast-deep-equal@3.1.3: {} fast-diff@1.3.0: {} @@ -7346,6 +7397,8 @@ snapshots: fast-uri@3.0.6: {} + fastify-plugin@5.0.1: {} + fastq@1.19.1: dependencies: reusify: 1.1.0 @@ -7456,7 +7509,7 @@ snapshots: dezalgo: 1.0.4 hexoid: 1.0.0 once: 1.4.0 - qs: 6.11.2 + qs: 6.14.0 forwarded@0.2.0: {} @@ -7630,7 +7683,7 @@ snapshots: header-case@2.0.4: dependencies: capital-case: 1.0.4 - tslib: 2.6.2 + tslib: 2.8.1 hexoid@1.0.0: {} @@ -7653,7 +7706,7 @@ snapshots: https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.3 - debug: 4.3.4 + debug: 4.4.1 transitivePeerDependencies: - supports-color @@ -7676,6 +7729,10 @@ snapshots: dependencies: safer-buffer: 2.1.2 + iconv-lite@0.7.0: + dependencies: + safer-buffer: 2.1.2 + ieee754@1.2.1: {} ignore@5.3.2: {} @@ -7865,8 +7922,6 @@ snapshots: call-bound: 1.0.4 get-intrinsic: 1.3.0 - isarray@1.0.0: {} - isarray@2.0.5: {} isexe@2.0.0: {} @@ -8325,7 +8380,7 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - libphonenumber-js@1.10.56: {} + libphonenumber-js@1.12.23: {} libsodium-wrappers@0.7.13: dependencies: @@ -8396,7 +8451,7 @@ snapshots: lower-case@2.0.2: dependencies: - tslib: 2.6.2 + tslib: 2.8.1 lru-cache@10.2.2: {} @@ -8494,6 +8549,8 @@ snapshots: mime@2.6.0: {} + mime@3.0.0: {} + mimic-fn@2.1.0: {} min-indent@1.0.1: {} @@ -8643,11 +8700,11 @@ snapshots: optionalDependencies: msgpackr-extract: 3.0.3 - multer@2.0.0: + multer@2.0.2: dependencies: append-field: 1.0.0 busboy: 1.6.0 - concat-stream: 1.6.2 + concat-stream: 2.0.0 mkdirp: 0.5.6 object-assign: 4.1.1 type-is: 1.6.18 @@ -8667,14 +8724,14 @@ snapshots: new-find-package-json@2.0.0: dependencies: - debug: 4.3.4 + debug: 4.4.1 transitivePeerDependencies: - supports-color no-case@3.0.4: dependencies: lower-case: 2.0.2 - tslib: 2.6.2 + tslib: 2.8.1 node-abort-controller@3.1.1: {} @@ -8818,7 +8875,7 @@ snapshots: param-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.8.1 parent-module@1.0.1: dependencies: @@ -8836,12 +8893,12 @@ snapshots: pascal-case@3.1.2: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.8.1 path-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.8.1 path-exists@4.0.0: {} @@ -8904,8 +8961,6 @@ snapshots: ansi-styles: 5.2.0 react-is: 18.2.0 - process-nextick-args@2.0.1: {} - promise-coalesce@1.1.2: {} prompts@2.4.2: @@ -8942,11 +8997,11 @@ snapshots: range-parser@1.2.1: {} - raw-body@3.0.0: + raw-body@3.0.1: dependencies: bytes: 3.1.2 http-errors: 2.0.0 - iconv-lite: 0.6.3 + iconv-lite: 0.7.0 unpipe: 1.0.0 react-is@18.2.0: {} @@ -8964,16 +9019,6 @@ snapshots: parse-json: 5.2.0 type-fest: 0.6.0 - readable-stream@2.3.8: - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - readable-stream@3.6.2: dependencies: inherits: 2.0.4 @@ -9002,7 +9047,7 @@ snapshots: '@redis/search': 1.1.6(@redis/client@1.5.16) '@redis/time-series': 1.0.5(@redis/client@1.5.16) - reflect-metadata@0.1.14: {} + reflect-metadata@0.2.2: {} reflect.getprototypeof@1.0.10: dependencies: @@ -9152,7 +9197,7 @@ snapshots: sentence-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.8.1 upper-case-first: 2.0.2 serialize-javascript@6.0.2: @@ -9255,7 +9300,7 @@ snapshots: snake-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.8.1 source-map-support@0.5.13: dependencies: @@ -9359,10 +9404,6 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.1.1 - string_decoder@1.1.1: - dependencies: - safe-buffer: 5.1.2 - string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 @@ -9687,11 +9728,11 @@ snapshots: upper-case-first@2.0.2: dependencies: - tslib: 2.6.2 + tslib: 2.8.1 upper-case@2.0.2: dependencies: - tslib: 2.6.2 + tslib: 2.8.1 uri-js@4.4.1: dependencies: diff --git a/src/auth/auth.controller.ts b/src/auth/auth.controller.ts index 86f7f8c..e7110c1 100644 --- a/src/auth/auth.controller.ts +++ b/src/auth/auth.controller.ts @@ -101,7 +101,7 @@ export class AuthController { @ApiOperation({ operationId: 'getAuthorizer' }) @Get('authorizer') - getAuthorizer(@Query() query: GetAuthorizerQuery): Authorizer { + getAuthorizer(@Query('GetAuthorizerQuery') query: GetAuthorizerQuery): Authorizer { const { provider, redirectUri: redirect_uri, diff --git a/src/auth/index.ts b/src/auth/index.ts index 4427f40..1f101e1 100644 --- a/src/auth/index.ts +++ b/src/auth/index.ts @@ -2,3 +2,4 @@ export * from './auth.module'; export * from './entities/jwt.entity'; export * from './entities/session-with-token.entity'; export * from './api-key-auth.guard'; +export * from './dto/authorize-query.dto'; diff --git a/src/captcha/captcha.controller.ts b/src/captcha/captcha.controller.ts index 717adfe..59df579 100644 --- a/src/captcha/captcha.controller.ts +++ b/src/captcha/captcha.controller.ts @@ -62,7 +62,10 @@ export class CaptchaController { type: [Captcha], }) @Get() - async list(@Query() query: ListCaptchasQuery, @Res() res: Response): Promise { + async list( + @Query('ListCaptchasQuery') query: ListCaptchasQuery, + @Res() res: Response + ): Promise { const count = await this.captchaService.count(query); const data = await this.captchaService.list(query); res.set({ 'X-Total-Count': count.toString() }).json(data); diff --git a/src/captcha/index.ts b/src/captcha/index.ts index 90f4a36..1207267 100644 --- a/src/captcha/index.ts +++ b/src/captcha/index.ts @@ -3,3 +3,4 @@ export * from './captcha.controller'; export * from './captcha.service'; export * from './dto/create-captcha.dto'; export * from './entities/captcha.entity'; +export * from './dto/list-captchas.dto'; diff --git a/src/common/decorator.ts b/src/common/decorator.ts new file mode 100644 index 0000000..3c06483 --- /dev/null +++ b/src/common/decorator.ts @@ -0,0 +1,9 @@ +import { ApiProperty } from '@nestjs/swagger'; + +export function ApiStringOrArray(description: string, required: boolean = false) { + return ApiProperty({ + oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }], + description, + required, + }); +} diff --git a/src/email/email-record.controller.ts b/src/email/email-record.controller.ts index 8855a51..e9ad5bb 100644 --- a/src/email/email-record.controller.ts +++ b/src/email/email-record.controller.ts @@ -60,7 +60,11 @@ export class EmailRecordController { type: [EmailRecord], }) @Get() - async list(@Req() req: Request, @Query() query: ListEmailRecordsQuery, @Res() res: Response) { + async list( + @Req() req: Request, + @Query('ListEmailRecordsQuery') query: ListEmailRecordsQuery, + @Res() res: Response + ) { const count = await this.emailRecordService.count(query); const data = await this.emailRecordService.list(query); res.set({ 'X-Total-Count': count.toString() }).json(data); diff --git a/src/email/index.ts b/src/email/index.ts index cda2879..fea5916 100644 --- a/src/email/index.ts +++ b/src/email/index.ts @@ -1,3 +1,4 @@ export * from './email.module'; export * from './email.service'; export * from './dto/send-email.dto'; +export * from './dto/list-email-records.dto'; diff --git a/src/group/group.controller.ts b/src/group/group.controller.ts index f9434d8..7b58f25 100644 --- a/src/group/group.controller.ts +++ b/src/group/group.controller.ts @@ -74,7 +74,10 @@ export class GroupController { type: [Group], }) @Get() - async list(@Query() query: ListGroupsQuery, @Res() res: Response): Promise { + async list( + @Query('ListGroupsQuery') query: ListGroupsQuery, + @Res() res: Response + ): Promise { const count = await this.groupService.count(query); const data = await this.groupService.list(query); res.set({ 'X-Total-Count': count.toString() }).json(data); diff --git a/src/group/index.ts b/src/group/index.ts index 360cf02..e2a72c2 100644 --- a/src/group/index.ts +++ b/src/group/index.ts @@ -2,3 +2,4 @@ export * from './group.module'; export * from './group.controller'; export * from './group.service'; export * from './entities/group.entity'; +export * from './dto/list-groups.dto'; diff --git a/src/industry/dto/list-industries.dot.ts b/src/industry/dto/list-industries.dto.ts similarity index 87% rename from src/industry/dto/list-industries.dot.ts rename to src/industry/dto/list-industries.dto.ts index 7bd0bb8..6f24767 100644 --- a/src/industry/dto/list-industries.dot.ts +++ b/src/industry/dto/list-industries.dto.ts @@ -1,7 +1,7 @@ import { Type } from 'class-transformer'; import { IsInt, IsOptional, IsPositive } from 'class-validator'; -export class ListIndustiesQuery { +export class ListIndustriesQuery { /** * 返回的层数 * 默认返回所有层级 diff --git a/src/industry/index.ts b/src/industry/index.ts index 4d41ff0..d38ca6f 100644 --- a/src/industry/index.ts +++ b/src/industry/index.ts @@ -1,2 +1,3 @@ export * from './industry.module'; export * from './industry.controller'; +export * from './dto/list-industries.dto'; diff --git a/src/industry/industry.controller.ts b/src/industry/industry.controller.ts index 968617b..7fafa9f 100644 --- a/src/industry/industry.controller.ts +++ b/src/industry/industry.controller.ts @@ -1,7 +1,7 @@ import { Controller, Get, Query } from '@nestjs/common'; import { ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger'; -import { ListIndustiesQuery } from './dto/list-industries.dot'; +import { ListIndustriesQuery } from './dto/list-industries.dto'; import { Industry } from './entities/industry.entity'; import { IndustryService } from './industry.service'; @@ -19,7 +19,7 @@ export class IndustryController { type: [Industry], }) @Get() - list(@Query() query: ListIndustiesQuery) { + list(@Query('ListIndustriesQuery') query: ListIndustriesQuery) { return this.industryService.list(query); } } diff --git a/src/industry/industry.service.ts b/src/industry/industry.service.ts index a21849d..9ea44dc 100644 --- a/src/industry/industry.service.ts +++ b/src/industry/industry.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@nestjs/common'; import { isInteger } from 'lodash'; import { industries } from './data'; -import { ListIndustiesQuery } from './dto/list-industries.dot'; +import { ListIndustriesQuery } from './dto/list-industries.dto'; const prune = (industries, depth) => { return industries.map((industry) => { @@ -19,7 +19,7 @@ const prune = (industries, depth) => { @Injectable() export class IndustryService { - list(query: ListIndustiesQuery = {}) { + list(query: ListIndustriesQuery = {}) { const { depth } = query; if (!depth || !isInteger(depth) || depth < 1) { return industries; diff --git a/src/main.ts b/src/main.ts index aa5ef31..3e260db 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,9 +13,20 @@ import * as sourceMapSupport from 'source-map-support'; import { MongoErrorsInterceptor } from 'src/mongo'; import { AppModule } from './app.module'; +import { GetAuthorizerQuery } from './auth'; +import { ListCaptchasQuery } from './captcha'; import { AllExceptionsFilter } from './common/all-exceptions.filter'; import { exceptionFactory } from './common/exception-factory'; import { port, prefix } from './config/config'; +import { ListEmailRecordsQuery } from './email'; +import { ListGroupsQuery } from './group'; +import { ListIndustriesQuery } from './industry'; +import { ListNamespacesQuery } from './namespace'; +import { ListRolesQuery } from './role'; +import { ListSessionsQuery } from './session'; +import { ListSmsRecordsQuery } from './sms'; +import { ListThirdPartyQuery } from './third-party'; +import { ListUsersQuery } from './user'; dayjs.extend(isoWeek); dayjs.extend(minMax); @@ -37,7 +48,7 @@ async function bootstrap() { const swaggerConfig = new DocumentBuilder() .setTitle('Auth API Server') .setDescription('Auth API for auth service') - .setVersion('1.0') + .setVersion('2.0') .addApiKey( { in: 'header', @@ -47,7 +58,21 @@ async function bootstrap() { 'ApiKey' ) .build(); - const document = SwaggerModule.createDocument(app, swaggerConfig); + const document = SwaggerModule.createDocument(app, swaggerConfig, { + extraModels: [ + ListUsersQuery, + ListNamespacesQuery, + GetAuthorizerQuery, + ListCaptchasQuery, + ListEmailRecordsQuery, + ListGroupsQuery, + ListIndustriesQuery, + ListRolesQuery, + ListSessionsQuery, + ListSmsRecordsQuery, + ListThirdPartyQuery, + ], + }); SwaggerModule.setup(swaggerPrefix, app, document); app.use(compression()); diff --git a/src/namespace/dto/list-namespaces.dto.ts b/src/namespace/dto/list-namespaces.dto.ts index 205bf85..1f42dae 100644 --- a/src/namespace/dto/list-namespaces.dto.ts +++ b/src/namespace/dto/list-namespaces.dto.ts @@ -2,6 +2,7 @@ import { ApiProperty, IntersectionType, OmitType, PartialType, PickType } from ' import { IsOptional, IsString } from 'class-validator'; import { QueryDto } from 'src/common'; +import { ApiStringOrArray } from 'src/common/decorator'; import { getSortParams } from 'src/lib/sort'; import { NamespaceDoc } from '../entities/namespace.entity'; @@ -17,6 +18,7 @@ export class ListNamespacesQuery extends IntersectionType( */ @IsOptional() @IsString({ each: true }) + @ApiStringOrArray('按 key 查询') key?: string | string[]; /** @@ -31,7 +33,7 @@ export class ListNamespacesQuery extends IntersectionType( */ @IsOptional() @IsString({ each: true }) - @ApiProperty({ description: 'key start 查询' }) + @ApiStringOrArray('key start 查询') key_start?: string | string[]; /** @@ -47,7 +49,7 @@ export class ListNamespacesQuery extends IntersectionType( */ @IsOptional() @IsString({ each: true }) - @ApiProperty({ description: '所属命名空间' }) + @ApiStringOrArray('所属命名空间') ns?: string | string[]; /** @@ -55,7 +57,7 @@ export class ListNamespacesQuery extends IntersectionType( */ @IsOptional() @IsString({ each: true }) - @ApiProperty({ description: '所属命名空间 start 查询' }) + @ApiStringOrArray('所属命名空间 start 查询') ns_start?: string | string[]; /** diff --git a/src/namespace/index.ts b/src/namespace/index.ts index 123ebbc..ab0bb93 100644 --- a/src/namespace/index.ts +++ b/src/namespace/index.ts @@ -2,3 +2,4 @@ export * from './namespace.module'; export * from './namespace.controller'; export * from './namespace.service'; export * from './entities/namespace.entity'; +export * from './dto/list-namespaces.dto'; diff --git a/src/namespace/namespace.controller.ts b/src/namespace/namespace.controller.ts index 9dad3d9..68bd922 100644 --- a/src/namespace/namespace.controller.ts +++ b/src/namespace/namespace.controller.ts @@ -98,7 +98,7 @@ export class NamespaceController { }) @Get() async list( - @Query() query: ListNamespacesQuery, + @Query('ListNamespacesQuery') query: ListNamespacesQuery, @Res() res: Response ): Promise { const count = await this.namespaceService.count(query); diff --git a/src/role/index.ts b/src/role/index.ts index 665051c..ee3ef8c 100644 --- a/src/role/index.ts +++ b/src/role/index.ts @@ -2,3 +2,4 @@ export * from './role.module'; export * from './role.controller'; export * from './role.service'; export * from './entities/role.entity'; +export * from './dto/list-roles.dto'; diff --git a/src/session/index.ts b/src/session/index.ts index d2ebe41..02871f9 100644 --- a/src/session/index.ts +++ b/src/session/index.ts @@ -5,3 +5,4 @@ export * from './dto/create-session.dto'; export * from './dto/list-sessions.dto'; export * from '../auth/dto/login.dto'; export * from './dto/update-session.dto'; +export * from './dto/list-sessions.dto'; diff --git a/src/session/session.controller.ts b/src/session/session.controller.ts index d4aa131..220e56e 100644 --- a/src/session/session.controller.ts +++ b/src/session/session.controller.ts @@ -62,7 +62,10 @@ export class SessionController { type: [Session], }) @Get() - async list(@Query() query: ListSessionsQuery, @Res() res: Response): Promise { + async list( + @Query('ListSessionsQuery') query: ListSessionsQuery, + @Res() res: Response + ): Promise { const count = await this.sessionService.count(query); const data = await this.sessionService.list(query); res.set({ 'X-Total-Count': count.toString() }).json(data); diff --git a/src/sms/sms-record.controller.ts b/src/sms/sms-record.controller.ts index f964b21..b1965b4 100644 --- a/src/sms/sms-record.controller.ts +++ b/src/sms/sms-record.controller.ts @@ -10,7 +10,6 @@ import { Patch, Post, Query, - Req, Res, } from '@nestjs/common'; import { @@ -22,7 +21,7 @@ import { ApiSecurity, ApiTags, } from '@nestjs/swagger'; -import { Request, Response } from 'express'; +import { Response } from 'express'; import { ErrorCodes } from 'src/constants'; @@ -60,7 +59,7 @@ export class SmsRecordController { type: [SmsRecord], }) @Get() - async list(@Req() req: Request, @Query() query: ListSmsRecordsQuery, @Res() res: Response) { + async list(@Query('ListSmsRecordsQuery') query: ListSmsRecordsQuery, @Res() res: Response) { const count = await this.smsRecordService.count(query); const data = await this.smsRecordService.list(query); res.set({ 'X-Total-Count': count.toString() }).json(data); diff --git a/src/third-party/dto/list-third-party.dto.ts b/src/third-party/dto/list-third-party.dto.ts index 75063c0..abf471c 100644 --- a/src/third-party/dto/list-third-party.dto.ts +++ b/src/third-party/dto/list-third-party.dto.ts @@ -4,7 +4,7 @@ import { QueryDto } from 'src/common'; import { ThirdPartyDoc } from '../entities/third-party.entity'; -export class ListThirdPartyDto extends IntersectionType( +export class ListThirdPartyQuery extends IntersectionType( PartialType(ThirdPartyDoc), OmitType(QueryDto, ['_sort']) ) {} diff --git a/src/third-party/index.ts b/src/third-party/index.ts index a86c385..5784067 100644 --- a/src/third-party/index.ts +++ b/src/third-party/index.ts @@ -3,3 +3,4 @@ export * from './third-party.module'; export * from './third-party.service'; export * from './entities/third-party.entity'; export * from './dto/bind-third-party.dto'; +export * from './dto/list-third-party.dto'; diff --git a/src/third-party/third-party.controller.ts b/src/third-party/third-party.controller.ts index 58dd8c9..8666b96 100644 --- a/src/third-party/third-party.controller.ts +++ b/src/third-party/third-party.controller.ts @@ -18,7 +18,7 @@ import { UserService } from 'src/user'; import { bindThirdPartyDto } from './dto/bind-third-party.dto'; import { createThirdPartyDto } from './dto/create-third-party.dto'; -import { ListThirdPartyDto } from './dto/list-third-party.dto'; +import { ListThirdPartyQuery } from './dto/list-third-party.dto'; import { UpdateThirdPartyDto } from './dto/update-third-party.dto'; import { ThirdParty, ThirdPartyDocument } from './entities/third-party.entity'; import { ThirdPartyService } from './third-party.service'; @@ -54,7 +54,7 @@ export class ThirdPartyController { }) @Get() async list( - @Query() query: ListThirdPartyDto, + @Query('ListThirdPartyQuery') query: ListThirdPartyQuery, @Res() res: Response ): Promise { const count = await this.thirdPartyService.count(query); diff --git a/src/third-party/third-party.service.ts b/src/third-party/third-party.service.ts index 381627e..290e223 100644 --- a/src/third-party/third-party.service.ts +++ b/src/third-party/third-party.service.ts @@ -5,7 +5,7 @@ import { Model } from 'mongoose'; import { buildMongooseQuery } from 'src/mongo'; import { createThirdPartyDto } from './dto/create-third-party.dto'; -import { ListThirdPartyDto } from './dto/list-third-party.dto'; +import { ListThirdPartyQuery } from './dto/list-third-party.dto'; import { UpdateThirdPartyDto } from './dto/update-third-party.dto'; import { ThirdParty, ThirdPartyDocument } from './entities/third-party.entity'; @@ -20,12 +20,12 @@ export class ThirdPartyService { return createdThirdParty.save(); } - count(query: ListThirdPartyDto): Promise { + count(query: ListThirdPartyQuery): Promise { const { filter } = buildMongooseQuery(query); return this.thirdPartyModel.countDocuments(filter).exec(); } - list(query: ListThirdPartyDto): Promise { + list(query: ListThirdPartyQuery): Promise { const { limit = 10, sort, offset = 0, filter } = buildMongooseQuery(query); return this.thirdPartyModel.find(filter).sort(sort).skip(offset).limit(limit).exec(); } diff --git a/src/user/dto/list-users.dto.ts b/src/user/dto/list-users.dto.ts index fc3da4d..00b244d 100644 --- a/src/user/dto/list-users.dto.ts +++ b/src/user/dto/list-users.dto.ts @@ -3,6 +3,7 @@ import { Type } from 'class-transformer'; import { IsDate, IsMongoId, IsOptional, IsString } from 'class-validator'; import { QueryDto } from 'src/common'; +import { ApiStringOrArray } from 'src/common/decorator'; import { getSortParams } from 'src/lib/sort'; import { UserDoc } from '../entities/user.entity'; @@ -33,6 +34,7 @@ export class ListUsersQuery extends IntersectionType( */ @IsOptional() @IsMongoId({ each: true }) + @ApiProperty({ description: '按 id 筛选' }) id?: string[]; /** @@ -61,6 +63,7 @@ export class ListUsersQuery extends IntersectionType( */ @IsOptional() @IsString({ each: true }) + @ApiStringOrArray('所属命名空间') ns?: string | string[]; /** @@ -68,6 +71,7 @@ export class ListUsersQuery extends IntersectionType( */ @IsOptional() @IsString({ each: true }) + @ApiStringOrArray('所属命名空间 start 查询') ns_start?: string | string[]; /** diff --git a/src/user/index.ts b/src/user/index.ts index 685a318..33874ce 100644 --- a/src/user/index.ts +++ b/src/user/index.ts @@ -2,3 +2,4 @@ export * from './user.module'; export * from './user.controller'; export * from './user.service'; export * from './entities/user.entity'; +export * from './dto/list-users.dto'; diff --git a/src/user/user.controller.ts b/src/user/user.controller.ts index e6dd551..365cf86 100644 --- a/src/user/user.controller.ts +++ b/src/user/user.controller.ts @@ -157,7 +157,10 @@ export class UserController { type: [User], }) @Get() - async list(@Query() query: ListUsersQuery, @Res() res: Response): Promise { + async list( + @Query('ListUsersQuery') query: ListUsersQuery, + @Res() res: Response + ): Promise { const count = await this.userService.count(query); const data = await this.userService.list(query); res.set({ 'X-Total-Count': count.toString() }).json(data); @@ -174,7 +177,7 @@ export class UserController { type: CountResult, }) @Post('@countUsers') - async count(@Query() query: ListUsersQuery): Promise { + async count(@Query('ListUsersQuery') query: ListUsersQuery): Promise { const count = await this.userService.count(query); return { count }; } @@ -543,7 +546,7 @@ export class UserController { type: [UserAggregateResult], }) @Post('@aggregate') - async aggregate(@Query() query: ListUsersQuery, @Body() body: AggregateUserDto) { + async aggregate(@Query('ListUsersQuery') query: ListUsersQuery, @Body() body: AggregateUserDto) { return this.userService.aggregate(query, body); } } diff --git a/test/namespace.e2e-spec.ts b/test/namespace.e2e-spec.ts index 94cad3c..7e9063f 100644 --- a/test/namespace.e2e-spec.ts +++ b/test/namespace.e2e-spec.ts @@ -97,7 +97,7 @@ describe('Namespace crud (e2e)', () => { .set('x-api-key', auth.apiKey) .set('Accept', 'application/json') .expect(200); - expect(resp2.body).toHaveLength(2); + expect(resp2.body).toHaveLength(5); // 使用 ns_start 参数 const resp3 = await request(app.getHttpServer()) @@ -106,7 +106,7 @@ describe('Namespace crud (e2e)', () => { .set('x-api-key', auth.apiKey) .set('Accept', 'application/json') .expect(200); - expect(resp3.body).toHaveLength(3); + expect(resp3.body).toHaveLength(5); }); it(`get namespace`, async () => {