feat: list managed users of an oauth client (#14330)

* feat: list managed users with apiv2 api

* refactor: isPending -> isLoading

* Revert "refactor: isPending -> isLoading"

This reverts commit dc2108e05508070185d57633346f3c532458e2a8.

---------

Co-authored-by: supalarry <[email protected]>
This commit is contained in:
Morganandsupalarry authored and GitHub committed 2024-04-04 09:41:47 +00:00
1 parent 986d196a37
commit 68e7e76b31
6 files changed
+98 -2

No files matched your search

+18
View File
@@ -1,3 +1,5 @@
import { Transform } from "class-transformer";
import { IsNumber, Min, Max, IsOptional } from "class-validator";
import type { Response as BaseResponse } from "express";
import type { ERROR_STATUS, SUCCESS_STATUS, API_ERROR_CODES } from "@calcom/platform-constants";
@@ -29,3 +31,19 @@ export type Response<T = unknown> = BaseResponse<ApiResponse<T>>;
export type ApiResponse<T = undefined> = T extends undefined
? ApiSuccessResponseWithoutData | ApiErrorResponse
: ApiSuccessResponse<T> | ApiErrorResponse;
export class Pagination {
@Transform(({ value }: { value: string }) => value && parseInt(value))
@IsNumber()
@Min(1)
@Max(100)
@IsOptional()
limit?: number;
@Transform(({ value }: { value: string }) => value && parseInt(value))
@IsNumber()
@Min(0)
@Max(100)
@IsOptional()
offset?: number | null;
}