Members

Search Members

Method: GET

URL: https://zstatus.io/api/v0/members

Params

KeyDescriptionRequired

Example

const members = await api.getMembers({
})

Example Response

{
"edges": [
{
"node": {
"id": "cl4ww9v04016709mjddfxlgyb",
"pageId": "cl4ww9v04016509mjisnijiwe",
"userId": "cl4ww9o71012909mjg92ih1cm",
"role": "OWNER",
"createdAt": "2022-06-27T15:28:20.788Z",
"updatedAt": "2022-06-27T15:28:20.788Z",
"user": {
"id": "cl4ww9o71012909mjg92ih1cm",
"name": "Eric Campbell",
"email": "eric@zeusdev.co",
"emailVerified": null,
"image": "https://secure.gravatar.com/avatar/d173138bfc73cbc561fbc2144fce2544.png?d=mm&r=PG",
"createdAt": "2022-06-27T15:28:11.965Z",
"updatedAt": "2022-06-27T15:28:11.965Z"
}
},
"cursor": "cl4ww9v04016709mjddfxlgyb"
}
],
"nodes": [
{
"id": "cl4ww9v04016709mjddfxlgyb",
"pageId": "cl4ww9v04016509mjisnijiwe",
"userId": "cl4ww9o71012909mjg92ih1cm",
"role": "OWNER",
"createdAt": "2022-06-27T15:28:20.788Z",
"updatedAt": "2022-06-27T15:28:20.788Z",
"user": {
"id": "cl4ww9o71012909mjg92ih1cm",
"name": "Eric Campbell",
"email": "eric@zeusdev.co",
"emailVerified": null,
"image": "https://secure.gravatar.com/avatar/d173138bfc73cbc561fbc2144fce2544.png?d=mm&r=PG",
"createdAt": "2022-06-27T15:28:11.965Z",
"updatedAt": "2022-06-27T15:28:11.965Z"
}
}
],
"pageInfo": {
"hasNextPage": false,
"hasPreviousPage": false,
"startCursor": "cl4ww9v04016709mjddfxlgyb",
"endCursor": "cl4ww9v04016709mjddfxlgyb"
},
"totalCount": 1
}

API Types

export enum APIPageMemberRole {
OWNER = 'OWNER',
MEMBER = 'MEMBER',
EDITOR = 'EDITOR',
READONLY = 'READONLY',
}
export type APIMembersResponse = APIMember[];
export interface APIMemberDeleteResponse {
success: boolean;
}
export interface CreateMemberProps {
pageId: string;
userId: string;
role: APIPageMemberRole;
}
export interface UpdateMemberProps {
id: string;
role: APIPageMemberRole;
}
export interface APIMember extends CreateMemberProps {
id: string;
userId: string;
pageId: string;
page?: APIPage;
user?: APIUser;
createdAt: string;
updatedAt: string;
}
export interface APIMemberSearchArgs {
pageId: string;
}