feat: v2 get managed users by email (#19526)
* feat: v2 get managed users by email * docs * fix: offset query param not showing up in docs * finish merge main * fix: check if each email in emails query param is email
This commit is contained in:
1 parent
b1bcbe9dfb
commit
b7c5cfcf02
9 files changed
+283
-21
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { ApiProperty } from "@nestjs/swagger";
|
||||
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
|
||||
import { Transform } from "class-transformer";
|
||||
import { IsNumber, Min, Max, IsOptional } from "class-validator";
|
||||
import { IsEnum } from "class-validator";
|
||||
@@ -39,7 +39,7 @@ export type ApiResponse<T = undefined> = T extends undefined
|
||||
export type ApiResponseMaybeRedirect<T = undefined> = ApiResponse<T> | ApiRedirectResponseType;
|
||||
|
||||
export class Pagination {
|
||||
@ApiProperty({ required: false, description: "The number of items to return", example: 10 })
|
||||
@ApiPropertyOptional({ description: "The number of items to return", example: 10 })
|
||||
@Transform(({ value }: { value: string }) => value && parseInt(value))
|
||||
@IsNumber()
|
||||
@Min(1)
|
||||
@@ -47,13 +47,13 @@ export class Pagination {
|
||||
@IsOptional()
|
||||
limit?: number;
|
||||
|
||||
@ApiPropertyOptional({ description: "The number of items to skip", example: 0 })
|
||||
@Transform(({ value }: { value: string }) => value && parseInt(value))
|
||||
@ApiProperty({ required: false, description: "The number of items to skip", example: 0 })
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@Max(250)
|
||||
@IsOptional()
|
||||
offset?: number | null;
|
||||
offset?: number;
|
||||
}
|
||||
|
||||
export class SkipTakePagination {
|
||||
|
||||
Reference in new issue
Block a user