-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add pending status to the endpoint
- Loading branch information
1 parent
2cb1c1d
commit 9f14c8f
Showing
3 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
packages/rest-typings/src/v1/users/UsersListStatusParamsGET.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Ajv from 'ajv'; | ||
|
||
import type { PaginatedRequest } from '../../helpers/PaginatedRequest'; | ||
|
||
const ajv = new Ajv({ | ||
coerceTypes: true, | ||
}); | ||
|
||
export type UsersListStatusParamsGET = { role: string } & PaginatedRequest<{ fields: string }>; | ||
|
||
const UsersListStatusParamsGetSchema = { | ||
type: 'object', | ||
properties: { | ||
role: { | ||
type: 'string', | ||
}, | ||
}, | ||
required: ['role'], | ||
additionalProperties: false, | ||
}; | ||
|
||
export const isUsersListStatusProps = ajv.compile<UsersListStatusParamsGET>(UsersListStatusParamsGetSchema); |