2024-03-07 01:28:18 +08:00
|
|
|
import { gql } from '@apollo/client';
|
|
|
|
|
|
|
|
export interface GetUserCurrentResponse {
|
|
|
|
user_current: Array<{
|
|
|
|
userId: string;
|
|
|
|
authToken: string;
|
|
|
|
joined: boolean;
|
|
|
|
joinErrorCode: string;
|
|
|
|
joinErrorMessage: string;
|
|
|
|
ejectReasonCode: string;
|
2024-04-05 21:54:08 +08:00
|
|
|
loggedOut: boolean;
|
2024-03-07 01:28:18 +08:00
|
|
|
meeting: {
|
|
|
|
ended: boolean;
|
|
|
|
endedReasonCode: string;
|
2024-03-07 21:28:34 +08:00
|
|
|
endedByUserName: string;
|
2024-03-07 01:28:18 +08:00
|
|
|
};
|
|
|
|
}>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface GetUserInfoResponse {
|
|
|
|
meeting: Array<{
|
|
|
|
meetingId: string;
|
|
|
|
name: string;
|
|
|
|
logoutUrl: string;
|
|
|
|
bannerColor: string;
|
|
|
|
bannerText: string;
|
|
|
|
}>;
|
|
|
|
user_current: Array<{
|
|
|
|
extId: string;
|
|
|
|
name: string;
|
|
|
|
userId: string;
|
|
|
|
}>;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const getUserInfo = gql`
|
|
|
|
query getUserInfo {
|
|
|
|
meeting {
|
|
|
|
meetingId
|
|
|
|
name
|
|
|
|
logoutUrl
|
|
|
|
bannerColor
|
|
|
|
bannerText
|
|
|
|
}
|
|
|
|
user_current {
|
|
|
|
extId
|
|
|
|
name
|
|
|
|
userId
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const getUserCurrent = gql`
|
|
|
|
subscription getUserCurrent {
|
|
|
|
user_current {
|
|
|
|
userId
|
|
|
|
authToken
|
|
|
|
joinErrorCode
|
|
|
|
joinErrorMessage
|
|
|
|
joined
|
|
|
|
ejectReasonCode
|
2024-04-05 21:54:08 +08:00
|
|
|
loggedOut
|
2024-03-07 01:28:18 +08:00
|
|
|
meeting {
|
|
|
|
ended
|
|
|
|
endedReasonCode
|
2024-03-07 21:28:34 +08:00
|
|
|
endedByUserName
|
2024-03-07 01:28:18 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
export const userJoinMutation = gql`
|
|
|
|
mutation UserJoin($authToken: String!, $clientType: String!) {
|
|
|
|
userJoinMeeting(
|
|
|
|
authToken: $authToken,
|
|
|
|
clientType: $clientType,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
export default {
|
|
|
|
getUserCurrent,
|
|
|
|
userJoinMutation,
|
|
|
|
getUserInfo,
|
|
|
|
};
|