+ // chris added a div with the key={room.id} to solve error 22/06/23
+
{room.attributes && (
-
-
-
+
)}
))}
diff --git a/apps/codac-quasseln/src/pages/main-chat/[chatId].tsx b/apps/codac-quasseln/src/pages/main-chat/[chatId].tsx
new file mode 100644
index 00000000..da3231de
--- /dev/null
+++ b/apps/codac-quasseln/src/pages/main-chat/[chatId].tsx
@@ -0,0 +1,766 @@
+import { useRouter } from "next/router";
+import { gql, useQuery, useMutation } from "@apollo/client";
+import React, { FormEvent, useState } from "react";
+import { useAuth } from "#/contexts/authContext";
+import { timeStamp } from "console";
+
+// This query is to find the chatroom.... NOT all the messages... (do you mean conversations????)
+
+const getSingleChat = gql`
+ query GetChatQuery($id: ID) {
+ chatroom(id: $id) {
+ data {
+ id
+ attributes {
+ name
+ conversations {
+ data {
+ id
+ attributes {
+ title
+ pinned
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+`;
+
+const getChatHistoryById = gql`
+ query getChatHistoryById($id: ID) {
+ conversation(id: $id) {
+ data {
+ id
+ attributes {
+ pinned
+ messages {
+ data {
+ id
+ attributes {
+ body
+ createdAt
+ updatedAt
+ author {
+ data {
+ id
+ attributes {
+ username
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+`;
+// I have to add the pinned property to the query/mutation---
+const createNewMessage = gql`
+ mutation createMessage($body: String!, $conversationId: ID!, $authorId: ID!) {
+ createMessage(data: { body: $body, conversation: $conversationId, author: $authorId }) {
+ data {
+ id
+ attributes {
+ author {
+ data {
+ id
+ }
+ }
+ body
+ conversation {
+ data {
+ id
+ }
+ }
+ }
+ }
+ }
+ }
+`;
+// Collection of pinned messages inside the user----
+const deleteChatMessage = gql`
+ mutation deleteMessage($id: ID!) {
+ deleteMessage(id: $id) {
+ data {
+ id
+ }
+ }
+ }
+`;
+
+const upDateChatMessage = gql`
+ mutation updateMessage($id: ID!, $body: String!) {
+ updateMessage(id: $id, data: { body: $body }) {
+ data {
+ id
+ attributes {
+ body
+ author {
+ data {
+ id
+ attributes {
+ username
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+`;
+type Props = {};
+
+// fetching all pinned messages
+// const getPinnedMessages = gql`
+// query pinnedMessages {
+// messages(filters: { pinned: { eq: true } }) {
+// data {
+// id
+// attributes {
+// pinned
+// }
+// }
+// }
+// }
+// `;
+
+// UPDATE PINNED CONVERSATION MUTATION/QUERY
+const updatePinnedConversation = gql`
+ mutation updateArticle($id: ID!, $pinned: Boolean!) {
+ updateConversation(id: $id, data: { pinned: $pinned }) {
+ data {
+ id
+ attributes {
+ title
+ pinned
+ }
+ }
+ }
+ }
+`;
+
+const SingleChat = (props: Props) => {
+ const { user } = useAuth();
+ console.log("user :>> ", user);
+ const userId = user?.id;
+ // console.log("userId :>> ", userId);
+
+ // UPDATE PINNED CONVERSATION FUNCTION
+ const [updatePinnedMutation] = useMutation(updatePinnedConversation);
+ const updatePinned = async (
+ e: React.MouseEvent
,
+ conversation: any
+ ) => {
+ e.preventDefault();
+ // const { user } = useAuth();
+ // console.log("message.id :>> ", message.id);
+ if (user?.role?.name === "Mentor") {
+ if (conversation?.attributes?.pinned === false) {
+ updatePinnedMutation({
+ variables: {
+ id: conversation.id,
+ pinned: true,
+ },
+ });
+ } else if (conversation?.attributes?.pinned === true) {
+ updatePinnedMutation({
+ variables: {
+ id: conversation.id,
+ pinned: false,
+ },
+ });
+ }
+
+ await refetch();
+ }
+ };
+ ///////////////////////////////////////////////////////////////////////////////////////////
+
+ // const router = useRouter();
+ const { chatId } = useRouter().query;
+ const [active, setActive] = useState("");
+ // Refetching enables you to refrescdh query results in response to a particular user action, as opposed to using a fixed interval.
+ const {
+ data: chatRooms,
+ error,
+ loading,
+ } = useQuery(getSingleChat, { variables: { id: chatId } });
+ // the refecth should be for the chat history...
+ // console.log("chatRooms :>> ", chatRooms);
+ const {
+ data: allMessages,
+ loading: chatLoading,
+ error: messageError,
+ refetch,
+ } = useQuery(getChatHistoryById, { variables: { id: active } });
+
+ // do I need this chatHistory state????
+ // const [chatHistory, setChatHistory] = useState([]);
+ const [messageText, setMessageText] = useState("");
+ // do I need this typing state????
+ // const [typing, setTyping] = useState(false);
+
+ const [newMessageMutation] = useMutation(createNewMessage);
+
+ const sendMessage = async () => {
+ if (messageText) {
+ newMessageMutation({
+ variables: {
+ conversationId: active,
+ authorId: userId,
+ body: messageText,
+ },
+ });
+ setMessageText("");
+ }
+ await refetch();
+ };
+
+ const [deleteMessageMutation] = useMutation(deleteChatMessage);
+ // the mentor has permmision to delete as well... condicional... id not working and only deleting first message...
+ const deleteMessage = async (e: FormEvent, message: any) => {
+ e.preventDefault();
+ console.log("object :>> ", message.attributes.author.data?.id);
+ if (userId === message.attributes.author.data.id || user?.role?.name === "Mentor") {
+ deleteMessageMutation({
+ variables: {
+ id: message.id,
+ },
+ });
+ await refetch();
+ }
+ setDeleteModal(!deleteModal);
+ };
+ // when fetch the message we let graphql
+ // sort property and sort the messages by created.... display them like that
+
+ const [updateMessageMutation] = useMutation(upDateChatMessage);
+
+ const updateMessage = async (e: FormEvent, message: any) => {
+ e.preventDefault();
+ console.log("message.id :>> ", message.id);
+ if (userId === message.attributes.author.data.id || user?.role?.name === "Mentor") {
+ if (messageText) {
+ updateMessageMutation({
+ variables: {
+ id: message.id,
+ body: messageText,
+ },
+ });
+ }
+ setMessageText("");
+ await refetch();
+ }
+ setOptionsModal(!optionsModal);
+ };
+
+ // this is for the date in each message...
+ const formatDate = (timestamp: string) => {
+ const date = new Date(timestamp);
+ const today = new Date();
+ const yesterday = new Date();
+ yesterday.setDate(today.getDate() - 1);
+ let formattedDate = "";
+ if (date.getDate() === today.getDate()) {
+ formattedDate = "Today";
+ } else if (date.getDate() === yesterday.getDate()) {
+ formattedDate = "Yesterday";
+ } else {
+ formattedDate = `${date.getDate()}/${date.getMonth() + 1}/${date.getFullYear()}`;
+ }
+ // what it that???? += ?
+ formattedDate += `@ ${date.getHours() < 10 ? "0" : ""}${date.getHours()}:
+ ${date.getMinutes() < 10 ? "0" : ""}${date.getMinutes()} `;
+ return formattedDate;
+ };
+
+ // console.log('chatId :>> ', chatId);
+ // console.log('router :>> ', router);
+ // console.log('data :>> ', chatRooms);
+ console.log("messages history :>> ", allMessages?.conversation?.data.attributes.messages.data);
+
+ // +++++++++++++++++++++++ MODALS ++++++++++++++++++++++
+
+ const [deleteModal, setDeleteModal] = useState(false);
+ const [optionsModal, setOptionsModal] = useState(false);
+ const toogleDeleteModal = () => {
+ setDeleteModal(!deleteModal);
+ };
+ const toogleOptionsModal = () => {
+ setOptionsModal(!optionsModal);
+ };
+
+ return (
+
+
+ Welcome to {chatRooms?.chatroom.data?.attributes.name}
+
+
+ {/* Este es el div que alberga todo el chat!!!!!! */}
+
+
+ {/* CONVERSATIONS DIV */}
+
+ {/* HIER ARE THE PINNED CONVERSATIONS */}
+
+
+ {chatRooms &&
+ chatRooms.chatroom?.data?.attributes.conversations?.data?.map((conversation: any) => {
+ // console.log("conversation :>> ", conversation);
+ if (conversation.attributes.pinned === true) {
+ return (
+
{
+ setActive(conversation.id);
+ }}
+ >
+ {/* HIER COME THE PINN ICON; PLEASE CHANGE IT FOR THE
*/}
+ <>
+ {user?.role?.name === "Mentor" ? (
+
updatePinned(e, conversation)}
+ style={{ cursor: "pointer" }}
+ >
+ X
+
+ ) : (
+ ""
+ )}
+ >
+
+ {conversation.attributes?.title}
+
+
+ );
+ }
+ })}
+
+
+
+
+ {/* HIER ARE THE NOT PINNED CONVERSATIONS */}
+
+
+ {chatRooms &&
+ chatRooms.chatroom?.data?.attributes.conversations?.data?.map((conversation: any) => {
+ console.log("conversation :>> ", conversation);
+ if (conversation.attributes.pinned === false) {
+ return (
+
{
+ setActive(conversation.id);
+ }}
+ >
+ {/* HIER COME THE PINN ICON; PLEASE CHANGE IT FOR THE
*/}
+ <>
+ {user?.role?.name === "Mentor" ? (
+
updatePinned(e, conversation)}
+ style={{ cursor: "pointer" }}
+ >
+ X
+
+ ) : (
+ ""
+ )}
+ >
+
+
+ {conversation.attributes?.title}
+
+
+ );
+ }
+ })}
+
+
+
+ {/* All Messages from a conversation.... */}
+
+
+ {allMessages &&
+ allMessages?.conversation?.data.attributes?.messages?.data?.map((message: any) => {
+ return (
+
+
+
+ {/*
id: {message.id}
*/}
+
+ {user?.username !== message.attributes.author.data?.attributes.username ? (
+ {message.attributes.author.data?.attributes.username}
+ ) : (
+ me
+ )}
+
+ {formatDate(message.attributes.createdAt)}
+
+
+
+
+
+
+
+
+
{message.attributes.body}
+
+ {/* +++++++++++++++++++++++++++++ EDIT MODAL +++++++++++++++++++++ */}
+ {optionsModal && (
+
+
+
{
+ e.stopPropagation();
+ }}
+ style={{
+ position: "relative",
+ zIndex: "1000",
+ display: "flex",
+ flexDirection: "column",
+ width: "35%",
+ height: "25%",
+ border: "white solid 3px",
+ borderRadius: "10px",
+ backgroundColor: "white",
+ margin: "auto",
+ marginTop: "200px",
+ }}
+ >
+ {/*
+
+
+
+ )}
+
+ {/* // +++++++++++++++++++++++++ DELETE MODAL +++++++++++++++++++ */}
+ {deleteModal && (
+
+
+
{
+ e.stopPropagation();
+ }}
+ style={{
+ position: "relative",
+ zIndex: "1000",
+ display: "flex",
+ flexDirection: "column",
+ width: "35%",
+ height: "25%",
+ border: "white solid 3px",
+ borderRadius: "10px",
+ backgroundColor: "white",
+ margin: "auto",
+ marginTop: "200px",
+ }}
+ >
+ {/* onSubmit={deleteMessage} */}
+ {/* {(
+
+
+ )}
+
+ );
+ })}
+
+
+ {/* +++++++++++++++++++++++++ TEXT BODY +++++++++++++++++++ */}
+
+
+
+
+
+
+
+ );
+};
+
+export default SingleChat;
diff --git a/apps/codac-quasseln/src/pages/main-chat/index.tsx b/apps/codac-quasseln/src/pages/main-chat/index.tsx
new file mode 100644
index 00000000..33ed6b84
--- /dev/null
+++ b/apps/codac-quasseln/src/pages/main-chat/index.tsx
@@ -0,0 +1,103 @@
+import { useAuth } from '#/contexts/authContext';
+
+import React, { useEffect, useState } from 'react'
+import { gql, useQuery } from "@apollo/client";
+import Link from 'next/link';
+import { useSocket } from '#/contexts/socketContext';
+import { Enum_Componentleadlifecycle_State } from 'codac-graphql-types';
+
+
+
+const GetAllChats = gql`
+query getAllChats {
+ chatrooms {
+ data {
+ id
+ attributes {
+ name
+ createdAt
+ users_permissions_users {
+ data {
+ id
+ attributes {
+ username
+ avatar {
+ data {
+ attributes {
+ url
+ }
+ }
+ }
+ role {
+ data {
+ attributes {
+ name
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+`;
+
+type Props = {}
+
+const ChrisChat = (props: Props) => {
+ const { data, error, loading } = useQuery(GetAllChats);
+ const { user } = useAuth();
+ console.log('user :>> ', user);
+
+ // do I need this connected state???
+ const [connected, setConnected] = useState(false);
+
+ const { socket } = useSocket();
+ useEffect(() => {
+ if (socket) {
+ setConnected(true);
+ } else {
+ setConnected(false)
+ }
+ }, [socket]);
+ console.log('socket :>> ', socket);
+
+ console.log('user :>> ', user);
+ console.log('data from chris query :>> ', data);
+
+ return (
+ <>
+
+
Chat Rooms
+
index
+
Index For Alls Chatrooms...
+
+
+ {data && data?.chatrooms?.data.map((chat: any) => {
+ return (
+
+ {/* se puede con el nombre?? sería mejor... */}
+
+
{chat.attributes.name}
+
+
+ )
+ })}
+
+
+
+
+ >
+ )
+}
+
+export default ChrisChat
\ No newline at end of file
diff --git a/apps/codac-quasseln/styles/_chatrooms.scss b/apps/codac-quasseln/styles/_chatrooms.scss
new file mode 100644
index 00000000..cf34dff8
--- /dev/null
+++ b/apps/codac-quasseln/styles/_chatrooms.scss
@@ -0,0 +1,76 @@
+/** messages chronology **/
+
+.chatroom-container {
+ display: flex;
+ flex-direction: column;
+ gap: $reg-space;
+ border: 2px solid orange;
+ // display: grid;
+ // grid-template-columns: 1fr 1fr;
+ // gap: $reg-space;
+
+ // .message-container {
+ // display: grid;
+ // grid-template-columns: 1fr 1fr;
+ // gap: $reg-space;
+ // }
+ // applying to all messages
+ // .message {
+ // grid-column: span 1;
+ // padding: $sm-space $reg-space $reg-space;
+ // border-radius: $border-radius;
+
+ // .message-label {
+ // font-size: $smaller-text;
+ // padding: $sm-space 0;
+ // }
+ // }
+ // my messages
+ // .my-message {
+ // background-color: white;
+ // grid-column-start: 2;
+
+ // .message-label {
+ // text-align: right;
+ // }
+ // }
+ // other users' messages
+ // .you-all-message {
+ // background-color: lighten($codac-primary-color, 60%);
+ // grid-column-start: 1;
+ // }
+}
+
+/** send a message **/
+
+.send-message-container {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: $reg-space;
+
+ div {
+ display: flex;
+ gap: $sm-space;
+ flex-direction: column;
+ width: 100%;
+ grid-column-start: 2;
+ align-items: flex-end;
+ }
+
+ textarea {
+ width: 100%;
+ border-radius: $border-radius;
+ background-color: lighten($codac-primary-color, 70%);
+ }
+}
+
+.activity-message {
+ color: white;
+ font-size: $smaller-text;
+}
+
+.chatroom-nav {
+ display: flex;
+ gap: $reg-space;
+ align-items: center;
+}
diff --git a/apps/codac-quasseln/styles/_vars.scss b/apps/codac-quasseln/styles/_vars.scss
new file mode 100644
index 00000000..430d6515
--- /dev/null
+++ b/apps/codac-quasseln/styles/_vars.scss
@@ -0,0 +1,15 @@
+//Colors
+$codac-primary-color: #02645a;
+
+$border-solid: 1px solid;
+$border-radius: 0.75em;
+
+//T
+$smaller-text: 60%;
+
+//Spacing
+$reg-space: 1rem;
+$sm-space: 0.5rem;
+$xs-space: 0.25rem;
+
+$font: "Noto Sans", sans-serif;
diff --git a/apps/codac-quasseln/styles/globals.css b/apps/codac-quasseln/styles/globals.css
new file mode 100644
index 00000000..14af92d7
--- /dev/null
+++ b/apps/codac-quasseln/styles/globals.css
@@ -0,0 +1,38 @@
+/** messages chronology **/
+.chatroom-container {
+ display: flex;
+ flex-direction: column;
+ gap: 1rem;
+ border: 2px solid orange;
+}
+
+/** send a message **/
+.send-message-container {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 1rem;
+}
+.send-message-container div {
+ display: flex;
+ gap: 0.5rem;
+ flex-direction: column;
+ width: 100%;
+ grid-column-start: 2;
+ align-items: flex-end;
+}
+.send-message-container textarea {
+ width: 100%;
+ border-radius: 0.75em;
+ background-color: #cdfef9;
+}
+
+.activity-message {
+ color: white;
+ font-size: 60%;
+}
+
+.chatroom-nav {
+ display: flex;
+ gap: 1rem;
+ align-items: center;
+}/*# sourceMappingURL=globals.css.map */
\ No newline at end of file
diff --git a/apps/codac-quasseln/styles/globals.css.map b/apps/codac-quasseln/styles/globals.css.map
new file mode 100644
index 00000000..478f12eb
--- /dev/null
+++ b/apps/codac-quasseln/styles/globals.css.map
@@ -0,0 +1 @@
+{"version":3,"sources":["_chatrooms.scss","_vars.scss","globals.css"],"names":[],"mappings":"AAAA,0BAAA;AAEA;EACE,aAAA;EACA,sBAAA;EACA,SCKU;EDJV,wBAAA;AEAF;;AFqCA,qBAAA;AAEA;EACE,aAAA;EACA,8BAAA;EACA,SCtCU;ACGZ;AFqCE;EACE,aAAA;EACA,WCzCO;ED0CP,sBAAA;EACA,WAAA;EACA,oBAAA;EACA,qBAAA;AEnCJ;AFsCE;EACE,WAAA;EACA,qBCzDY;ED0DZ,yBAAA;AEpCJ;;AFwCA;EACE,YAAA;EACA,cC7Da;ACwBf;;AFwCA;EACE,aAAA;EACA,SC/DU;EDgEV,mBAAA;AErCF","file":"globals.css"}
\ No newline at end of file
diff --git a/apps/codac-quasseln/styles/globals.scss b/apps/codac-quasseln/styles/globals.scss
new file mode 100644
index 00000000..0e27dbae
--- /dev/null
+++ b/apps/codac-quasseln/styles/globals.scss
@@ -0,0 +1,2 @@
+@import "vars";
+@import "chatrooms";
diff --git a/apps/codac-quasseln/tsconfig.json b/apps/codac-quasseln/tsconfig.json
index a6c295a5..3a62bb7b 100644
--- a/apps/codac-quasseln/tsconfig.json
+++ b/apps/codac-quasseln/tsconfig.json
@@ -10,7 +10,8 @@
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
- "incremental": true
+ "incremental": true,
+ "noEmit": true
},
"include": [
"next-env.d.ts",
diff --git a/packages/codac-graphql-types/src/__generated__/apollo.ts b/packages/codac-graphql-types/src/__generated__/apollo.ts
index 60b93538..1722d321 100644
--- a/packages/codac-graphql-types/src/__generated__/apollo.ts
+++ b/packages/codac-graphql-types/src/__generated__/apollo.ts
@@ -1083,6 +1083,14 @@ export const GetMeDocument = gql`
url
}
}
+ chatrooms {
+ data {
+ id
+ attributes {
+ name
+ }
+ }
+ }
}
`;
diff --git a/packages/codac-graphql-types/src/__generated__/schema.ts b/packages/codac-graphql-types/src/__generated__/schema.ts
index c1ce6d8b..137fcad7 100644
--- a/packages/codac-graphql-types/src/__generated__/schema.ts
+++ b/packages/codac-graphql-types/src/__generated__/schema.ts
@@ -20,31 +20,31 @@ export type Scalars = {
};
export type Achievement = {
- __typename?: 'Achievement';
+ __typename?: "Achievement";
badge?: Maybe;
course?: Maybe;
- course_date?: Maybe;
- createdAt?: Maybe;
- description?: Maybe;
- name?: Maybe;
- points?: Maybe;
+ course_date?: Maybe;
+ createdAt?: Maybe;
+ description?: Maybe;
+ name?: Maybe;
+ points?: Maybe;
type?: Maybe;
- updatedAt?: Maybe;
+ updatedAt?: Maybe;
};
export type AchievementEntity = {
- __typename?: 'AchievementEntity';
-attributes: Achievement;
+ __typename?: "AchievementEntity";
+ attributes: Achievement;
id: string;
};
export type AchievementEntityResponse = {
- __typename?: 'AchievementEntityResponse';
-data: AchievementEntity;
+ __typename?: "AchievementEntityResponse";
+ data: AchievementEntity;
};
export type AchievementEntityResponseCollection = {
- __typename?: 'AchievementEntityResponseCollection';
+ __typename?: "AchievementEntityResponseCollection";
data: Array;
meta: ResponseCollectionMeta;
};
@@ -65,51 +65,50 @@ export type AchievementFiltersInput = {
};
export type AchievementInput = {
- badge?: InputMaybe;
- course?: InputMaybe;
- course_date?: InputMaybe;
- description?: InputMaybe;
- name?: InputMaybe;
- points?: InputMaybe;
+ badge?: InputMaybe;
+ course?: InputMaybe;
+ course_date?: InputMaybe;
+ description?: InputMaybe;
+ name?: InputMaybe;
+ points?: InputMaybe;
type?: InputMaybe;
};
export type Attendance = {
- __typename?: 'Attendance';
- checkedOn?: Maybe;
+ __typename?: "Attendance";
+ checkedOn?: Maybe;
cohort?: Maybe;
- createdAt?: Maybe;
- day?: Maybe;
- done?: Maybe;
- excuse?: Maybe;
+ createdAt?: Maybe;
+ day?: Maybe;
+ done?: Maybe;
+ excuse?: Maybe;
hours?: Maybe>>;
- present?: Maybe;
- project?: Maybe;
+ present?: Maybe;
+ project?: Maybe;
student?: Maybe;
time_off?: Maybe;
- updatedAt?: Maybe;
+ updatedAt?: Maybe;
};
-
export type AttendanceHoursArgs = {
filters?: InputMaybe;
pagination?: InputMaybe;
- sort?: InputMaybe>>;
+ sort?: InputMaybe>>;
};
export type AttendanceEntity = {
- __typename?: 'AttendanceEntity';
-attributes: Attendance;
+ __typename?: "AttendanceEntity";
+ attributes: Attendance;
id: string;
};
export type AttendanceEntityResponse = {
- __typename?: 'AttendanceEntityResponse';
-data: AttendanceEntity;
+ __typename?: "AttendanceEntityResponse";
+ data: AttendanceEntity;
};
export type AttendanceEntityResponseCollection = {
- __typename?: 'AttendanceEntityResponseCollection';
+ __typename?: "AttendanceEntityResponseCollection";
data: Array;
meta: ResponseCollectionMeta;
};
@@ -134,85 +133,83 @@ export type AttendanceFiltersInput = {
};
export type AttendanceInput = {
- checkedOn?: InputMaybe;
- cohort?: InputMaybe;
- day?: InputMaybe;
- done?: InputMaybe;
- excuse?: InputMaybe;
+ checkedOn?: InputMaybe;
+ cohort?: InputMaybe;
+ day?: InputMaybe;
+ done?: InputMaybe;
+ excuse?: InputMaybe;
hours?: InputMaybe>>;
- present?: InputMaybe;
- project?: InputMaybe;
- student?: InputMaybe;
+ present?: InputMaybe;
+ project?: InputMaybe;
+ student?: InputMaybe;
time_off?: InputMaybe;
};
export type AttendanceRelationResponseCollection = {
- __typename?: 'AttendanceRelationResponseCollection';
+ __typename?: "AttendanceRelationResponseCollection";
data: Array;
};
export type BooleanFilterInput = {
- and?: InputMaybe>>;
- between?: InputMaybe>>;
- contains?: InputMaybe;
- containsi?: InputMaybe;
- endsWith?: InputMaybe;
- eq?: InputMaybe;
- eqi?: InputMaybe;
- gt?: InputMaybe;
- gte?: InputMaybe;
- in?: InputMaybe>>;
- lt?: InputMaybe;
- lte?: InputMaybe;
- ne?: InputMaybe;
+ and?: InputMaybe>>;
+ between?: InputMaybe>>;
+ contains?: InputMaybe;
+ containsi?: InputMaybe;
+ endsWith?: InputMaybe;
+ eq?: InputMaybe;
+ eqi?: InputMaybe;
+ gt?: InputMaybe;
+ gte?: InputMaybe;
+ in?: InputMaybe>>;
+ lt?: InputMaybe;
+ lte?: InputMaybe;
+ ne?: InputMaybe;
not?: InputMaybe;
- notContains?: InputMaybe;
- notContainsi?: InputMaybe;
- notIn?: InputMaybe>>;
- notNull?: InputMaybe;
- null?: InputMaybe;
- or?: InputMaybe>>;
- startsWith?: InputMaybe;
+ notContains?: InputMaybe;
+ notContainsi?: InputMaybe;
+ notIn?: InputMaybe>>;
+ notNull?: InputMaybe;
+ null?: InputMaybe;
+ or?: InputMaybe>>;
+ startsWith?: InputMaybe;
};
export type Chat = {
- __typename?: 'Chat';
- createdAt?: Maybe;
+ __typename?: "Chat";
+ createdAt?: Maybe;
messages?: Maybe>>;
- name?: Maybe;
- pinned?: Maybe;
- publishedAt?: Maybe;
- updatedAt?: Maybe;
+ name?: Maybe;
+ pinned?: Maybe;
+ publishedAt?: Maybe;
+ updatedAt?: Maybe;
users?: Maybe;
};
-
export type ChatMessagesArgs = {
filters?: InputMaybe;
pagination?: InputMaybe;
- sort?: InputMaybe>>;
+ sort?: InputMaybe>>;
};
-
export type ChatUsersArgs = {
filters?: InputMaybe;
pagination?: InputMaybe;
- sort?: InputMaybe>>;
+ sort?: InputMaybe>>;
};
export type ChatEntity = {
- __typename?: 'ChatEntity';
-attributes: Chat;
+ __typename?: "ChatEntity";
+ attributes: Chat;
id: string;
};
export type ChatEntityResponse = {
- __typename?: 'ChatEntityResponse';
-data: ChatEntity;
+ __typename?: "ChatEntityResponse";
+ data: ChatEntity;
};
export type ChatEntityResponseCollection = {
- __typename?: 'ChatEntityResponseCollection';
+ __typename?: "ChatEntityResponseCollection";
data: Array;
meta: ResponseCollectionMeta;
};
@@ -233,50 +230,47 @@ export type ChatFiltersInput = {
export type ChatInput = {
messages?: InputMaybe>>;
- name?: InputMaybe;
- pinned?: InputMaybe;
- publishedAt?: InputMaybe;
- users?: InputMaybe>>;
+ name?: InputMaybe;
+ pinned?: InputMaybe;
+ publishedAt?: InputMaybe;
+ users?: InputMaybe>>;
};
export type Chatroom = {
- __typename?: 'Chatroom';
+ __typename?: "Chatroom";
conversations?: Maybe;
- createdAt?: Maybe;
- name?: Maybe;
- publishedAt?: Maybe;
- updatedAt?: Maybe;
+ createdAt?: Maybe;
+ name?: Maybe;
+ publishedAt?: Maybe;
+ updatedAt?: Maybe;
users_permissions_users?: Maybe;
};
-
export type ChatroomConversationsArgs = {
filters?: InputMaybe;
pagination?: InputMaybe;
- publicationState?: InputMaybe;
- sort?: InputMaybe>>;
+ sort?: InputMaybe>>;
};
-
export type ChatroomUsers_Permissions_UsersArgs = {
filters?: InputMaybe;
pagination?: InputMaybe;
- sort?: InputMaybe>>;
+ sort?: InputMaybe>>;
};
export type ChatroomEntity = {
- __typename?: 'ChatroomEntity';
-attributes: Chatroom;
+ __typename?: "ChatroomEntity";
+ attributes: Chatroom;
id: string;
};
export type ChatroomEntityResponse = {
- __typename?: 'ChatroomEntityResponse';
-data: ChatroomEntity;
+ __typename?: "ChatroomEntityResponse";
+ data: ChatroomEntity;
};
export type ChatroomEntityResponseCollection = {
- __typename?: 'ChatroomEntityResponseCollection';
+ __typename?: "ChatroomEntityResponseCollection";
data: Array;
meta: ResponseCollectionMeta;
};
@@ -295,51 +289,50 @@ export type ChatroomFiltersInput = {
};
export type ChatroomInput = {
- conversations?: InputMaybe>>;
- name?: InputMaybe;
- publishedAt?: InputMaybe;
- users_permissions_users?: InputMaybe>>;
+ conversations?: InputMaybe>>;
+ name?: InputMaybe;
+ publishedAt?: InputMaybe;
+ users_permissions_users?: InputMaybe>>;
};
export type ChatroomRelationResponseCollection = {
- __typename?: 'ChatroomRelationResponseCollection';
+ __typename?: "ChatroomRelationResponseCollection";
data: Array;
};
export type CodacOverflow = {
- __typename?: 'CodacOverflow';
+ __typename?: "CodacOverflow";
author?: Maybe;
comments?: Maybe>>;
- course?: Maybe;
- createdAt?: Maybe;
- date?: Maybe;
- description?: Maybe;
- publishedAt?: Maybe;
- slug?: Maybe;
- title?: Maybe;
- updatedAt?: Maybe;
+ course?: Maybe;
+ createdAt?: Maybe;
+ date?: Maybe;
+ description?: Maybe;
+ publishedAt?: Maybe;
+ slug?: Maybe;
+ title?: Maybe;
+ updatedAt?: Maybe;
};
-
export type CodacOverflowCommentsArgs = {
filters?: InputMaybe;
pagination?: InputMaybe;
- sort?: InputMaybe>>;
+ sort?: InputMaybe>>;
};
export type CodacOverflowEntity = {
- __typename?: 'CodacOverflowEntity';
-attributes: CodacOverflow;
+ __typename?: "CodacOverflowEntity";
+ attributes: CodacOverflow;
id: string;
};
export type CodacOverflowEntityResponse = {
- __typename?: 'CodacOverflowEntityResponse';
-data: CodacOverflowEntity;
+ __typename?: "CodacOverflowEntityResponse";
+ data: CodacOverflowEntity;
};
export type CodacOverflowEntityResponseCollection = {
- __typename?: 'CodacOverflowEntityResponseCollection';
+ __typename?: "CodacOverflowEntityResponseCollection";
data: Array;
meta: ResponseCollectionMeta;
};
@@ -362,49 +355,48 @@ export type CodacOverflowFiltersInput = {
};
export type CodacOverflowInput = {
- author?: InputMaybe;
+ author?: InputMaybe;
comments?: InputMaybe>>;
- course?: InputMaybe;
- date?: InputMaybe;
- description?: InputMaybe;
- publishedAt?: InputMaybe;
- slug?: InputMaybe;
- title?: InputMaybe;
+ course?: InputMaybe;
+ date?: InputMaybe;
+ description?: InputMaybe;
+ publishedAt?: InputMaybe;
+ slug?: InputMaybe;
+ title?: InputMaybe;
};
export type CodingChallenge = {
- __typename?: 'CodingChallenge';
+ __typename?: "CodingChallenge";
author?: Maybe;
- challenge?: Maybe;
+ challenge?: Maybe;
comments?: Maybe>>;
- createdAt?: Maybe;
- difficulty?: Maybe;
- publishedAt?: Maybe;
+ createdAt?: Maybe;
+ difficulty?: Maybe;
+ publishedAt?: Maybe;
tags?: Maybe;
- title?: Maybe;
- updatedAt?: Maybe