Merge pull request #19301 from gustavotrott/graphql-actions-presenter
graphql-actions: Presenter actions
This commit is contained in:
commit
56f9f13a06
@ -0,0 +1,24 @@
|
||||
import { RedisMessage } from '../types';
|
||||
import {throwErrorIfNotPresenter} from "../imports/validation";
|
||||
|
||||
export default function buildRedisMessage(sessionVariables: Record<string, unknown>, input: Record<string, unknown>): RedisMessage {
|
||||
throwErrorIfNotPresenter(sessionVariables);
|
||||
const eventName = `StartExternalVideoPubMsg`;
|
||||
|
||||
const routing = {
|
||||
meetingId: sessionVariables['x-hasura-meetingid'] as String,
|
||||
userId: sessionVariables['x-hasura-userid'] as String
|
||||
};
|
||||
|
||||
const header = {
|
||||
name: eventName,
|
||||
meetingId: routing.meetingId,
|
||||
userId: routing.userId
|
||||
};
|
||||
|
||||
const body = {
|
||||
externalVideoUrl: input.externalVideoUrl
|
||||
};
|
||||
|
||||
return { eventName, routing, header, body };
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
import { RedisMessage } from '../types';
|
||||
import {throwErrorIfNotPresenter} from "../imports/validation";
|
||||
|
||||
export default function buildRedisMessage(sessionVariables: Record<string, unknown>, input: Record<string, unknown>): RedisMessage {
|
||||
throwErrorIfNotPresenter(sessionVariables);
|
||||
const eventName = `StopExternalVideoPubMsg`;
|
||||
|
||||
const routing = {
|
||||
meetingId: sessionVariables['x-hasura-meetingid'] as String,
|
||||
userId: sessionVariables['x-hasura-userid'] as String
|
||||
};
|
||||
|
||||
const header = {
|
||||
name: eventName,
|
||||
meetingId: routing.meetingId,
|
||||
userId: routing.userId
|
||||
};
|
||||
|
||||
const body = {};
|
||||
|
||||
return { eventName, routing, header, body };
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
import { RedisMessage } from '../types';
|
||||
import {throwErrorIfNotPresenter} from "../imports/validation";
|
||||
|
||||
export default function buildRedisMessage(sessionVariables: Record<string, unknown>, input: Record<string, unknown>): RedisMessage {
|
||||
throwErrorIfNotPresenter(sessionVariables);
|
||||
const eventName = `UpdateExternalVideoPubMsg`;
|
||||
|
||||
const routing = {
|
||||
meetingId: sessionVariables['x-hasura-meetingid'] as String,
|
||||
userId: sessionVariables['x-hasura-userid'] as String
|
||||
};
|
||||
|
||||
const header = {
|
||||
name: eventName,
|
||||
meetingId: routing.meetingId,
|
||||
userId: routing.userId
|
||||
};
|
||||
|
||||
const body = {
|
||||
status: input.status,
|
||||
rate: input.rate,
|
||||
time: input.time,
|
||||
state: input.state,
|
||||
};
|
||||
|
||||
return { eventName, routing, header, body };
|
||||
}
|
@ -86,6 +86,25 @@ type Mutation {
|
||||
): Boolean
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
externalVideoStart(
|
||||
externalVideoUrl: String!
|
||||
): Boolean
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
externalVideoStop: Boolean
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
externalVideoUpdate(
|
||||
status: String!
|
||||
rate: Float!
|
||||
time: Float!
|
||||
state: Float!
|
||||
): Boolean
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
guestUsersSetLobbyMessage(
|
||||
message: String!
|
||||
@ -167,10 +186,6 @@ type Mutation {
|
||||
): Boolean
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
pickRandomViewer: Boolean
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
pollCancel: Boolean
|
||||
}
|
||||
@ -267,6 +282,10 @@ type Mutation {
|
||||
): Boolean
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
randomViewerPick: Boolean
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
timerActivate(
|
||||
stopwatch: Boolean!
|
||||
|
@ -83,6 +83,24 @@ actions:
|
||||
handler: '{{HASURA_BBB_GRAPHQL_ACTIONS_ADAPTER_URL}}'
|
||||
permissions:
|
||||
- role: bbb_client
|
||||
- name: externalVideoStart
|
||||
definition:
|
||||
kind: synchronous
|
||||
handler: '{{HASURA_BBB_GRAPHQL_ACTIONS_ADAPTER_URL}}'
|
||||
permissions:
|
||||
- role: bbb_client
|
||||
- name: externalVideoStop
|
||||
definition:
|
||||
kind: synchronous
|
||||
handler: '{{HASURA_BBB_GRAPHQL_ACTIONS_ADAPTER_URL}}'
|
||||
permissions:
|
||||
- role: bbb_client
|
||||
- name: externalVideoUpdate
|
||||
definition:
|
||||
kind: synchronous
|
||||
handler: '{{HASURA_BBB_GRAPHQL_ACTIONS_ADAPTER_URL}}'
|
||||
permissions:
|
||||
- role: bbb_client
|
||||
- name: guestUsersSetLobbyMessage
|
||||
definition:
|
||||
kind: synchronous
|
||||
@ -149,12 +167,6 @@ actions:
|
||||
handler: '{{HASURA_BBB_GRAPHQL_ACTIONS_ADAPTER_URL}}'
|
||||
permissions:
|
||||
- role: bbb_client
|
||||
- name: pickRandomViewer
|
||||
definition:
|
||||
kind: synchronous
|
||||
handler: '{{HASURA_BBB_GRAPHQL_ACTIONS_ADAPTER_URL}}'
|
||||
permissions:
|
||||
- role: bbb_client
|
||||
- name: pollCancel
|
||||
definition:
|
||||
kind: synchronous
|
||||
@ -239,6 +251,12 @@ actions:
|
||||
handler: '{{HASURA_BBB_GRAPHQL_ACTIONS_ADAPTER_URL}}'
|
||||
permissions:
|
||||
- role: bbb_client
|
||||
- name: randomViewerPick
|
||||
definition:
|
||||
kind: synchronous
|
||||
handler: '{{HASURA_BBB_GRAPHQL_ACTIONS_ADAPTER_URL}}'
|
||||
permissions:
|
||||
- role: bbb_client
|
||||
- name: timerActivate
|
||||
definition:
|
||||
kind: synchronous
|
||||
|
Loading…
Reference in New Issue
Block a user