@vocollege/app 0.0.56 → 0.0.59

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (120) hide show
  1. package/dist/{types.d.ts → global.d.ts} +4 -0
  2. package/dist/{types.js → global.js} +0 -0
  3. package/dist/index.d.ts +3 -2
  4. package/dist/index.js +9 -3
  5. package/dist/interceptor.js +41 -12
  6. package/dist/modules/Services/I18n/I18n.js +1 -1
  7. package/dist/modules/Services/I18n/strings.json +716 -21
  8. package/dist/modules/Services/Vapor/Vapor.js +15 -7
  9. package/dist/modules/VoApi/GraphClient.d.ts +3 -2
  10. package/dist/modules/VoApi/GraphClient.js +57 -14
  11. package/dist/modules/VoApi/VoApi.d.ts +4 -1
  12. package/dist/modules/VoApi/VoApi.js +20 -2
  13. package/dist/modules/VoApi/graphql.d.ts +32 -0
  14. package/dist/modules/VoApi/graphql.js +57 -0
  15. package/dist/modules/VoApi/index.d.ts +1 -21
  16. package/dist/modules/VoApi/index.js +7 -31
  17. package/dist/modules/VoApi/mutations/acl.js +5 -5
  18. package/dist/modules/VoApi/mutations/applications.d.ts +3 -0
  19. package/dist/modules/VoApi/mutations/applications.js +12 -0
  20. package/dist/modules/VoApi/mutations/articles.js +3 -3
  21. package/dist/modules/VoApi/mutations/books.d.ts +3 -0
  22. package/dist/modules/VoApi/mutations/books.js +12 -0
  23. package/dist/modules/VoApi/mutations/cards.d.ts +3 -0
  24. package/dist/modules/VoApi/mutations/cards.js +12 -0
  25. package/dist/modules/VoApi/mutations/events.d.ts +3 -0
  26. package/dist/modules/VoApi/mutations/events.js +12 -0
  27. package/dist/modules/VoApi/mutations/navigation.js +3 -3
  28. package/dist/modules/VoApi/mutations/pages.js +3 -3
  29. package/dist/modules/VoApi/mutations/queues.js +3 -3
  30. package/dist/modules/VoApi/mutations/sections.d.ts +3 -0
  31. package/dist/modules/VoApi/mutations/sections.js +12 -0
  32. package/dist/modules/VoApi/mutations/settings.js +1 -1
  33. package/dist/modules/VoApi/mutations/users.js +3 -3
  34. package/dist/modules/VoApi/mutations/vodocs.js +9 -9
  35. package/dist/modules/VoApi/mutations/vogroups.d.ts +1 -0
  36. package/dist/modules/VoApi/mutations/vogroups.js +10 -9
  37. package/dist/modules/VoApi/queries/acl.js +4 -4
  38. package/dist/modules/VoApi/queries/applications.d.ts +2 -0
  39. package/dist/modules/VoApi/queries/applications.js +11 -0
  40. package/dist/modules/VoApi/queries/articles.js +2 -2
  41. package/dist/modules/VoApi/queries/books.d.ts +4 -0
  42. package/dist/modules/VoApi/queries/books.js +13 -0
  43. package/dist/modules/VoApi/queries/cards.d.ts +2 -0
  44. package/dist/modules/VoApi/queries/cards.js +11 -0
  45. package/dist/modules/VoApi/queries/events.d.ts +2 -0
  46. package/dist/modules/VoApi/queries/events.js +11 -0
  47. package/dist/modules/VoApi/queries/help.d.ts +1 -0
  48. package/dist/modules/VoApi/queries/help.js +11 -0
  49. package/dist/modules/VoApi/queries/navigation.js +4 -4
  50. package/dist/modules/VoApi/queries/pages.js +2 -2
  51. package/dist/modules/VoApi/queries/queues.js +2 -2
  52. package/dist/modules/VoApi/queries/search.d.ts +2 -0
  53. package/dist/modules/VoApi/queries/search.js +5 -3
  54. package/dist/modules/VoApi/queries/sections.d.ts +2 -0
  55. package/dist/modules/VoApi/queries/sections.js +11 -0
  56. package/dist/modules/VoApi/queries/settings.js +1 -1
  57. package/dist/modules/VoApi/queries/users.d.ts +1 -0
  58. package/dist/modules/VoApi/queries/users.js +5 -4
  59. package/dist/modules/VoApi/queries/vodocs.js +3 -3
  60. package/dist/modules/VoApi/queries/vogroups.d.ts +1 -0
  61. package/dist/modules/VoApi/queries/vogroups.js +9 -8
  62. package/dist/modules/VoApp.d.ts +1 -0
  63. package/dist/modules/VoApp.js +17 -0
  64. package/dist/modules/VoAuth.d.ts +2 -1
  65. package/dist/modules/VoAuth.js +126 -42
  66. package/dist/modules/VoBase.js +2 -2
  67. package/dist/modules/VoConfig.js +10 -0
  68. package/dist/modules/VoDocs/VoDocs.d.ts +1 -2
  69. package/dist/modules/VoDocs/VoDocs.js +12 -44
  70. package/dist/modules/VoGroups.d.ts +7 -0
  71. package/dist/modules/VoGroups.js +39 -0
  72. package/dist/modules/VoHelpers.d.ts +38 -1
  73. package/dist/modules/VoHelpers.js +348 -51
  74. package/dist/modules/VoRouter.js +10 -2
  75. package/dist/modules/{VoUtils.d.ts → VoUtils_REMOVE.d.ts} +1 -1
  76. package/dist/modules/{VoUtils.js → VoUtils_REMOVE.js} +16 -12
  77. package/package.json +17 -8
  78. package/src/global.ts +44 -0
  79. package/src/index.ts +3 -2
  80. package/src/interceptor.ts +39 -8
  81. package/src/modules/Services/I18n/strings.json +718 -22
  82. package/src/modules/Services/Vapor/Vapor.ts +14 -15
  83. package/src/modules/VoApi/GraphClient.ts +87 -24
  84. package/src/modules/VoApi/VoApi.ts +23 -3
  85. package/src/modules/VoApi/graphql.ts +47 -0
  86. package/src/modules/VoApi/index.ts +1 -37
  87. package/src/modules/VoApi/mutations/applications.ts +27 -0
  88. package/src/modules/VoApi/mutations/books.ts +27 -0
  89. package/src/modules/VoApi/mutations/cards.ts +27 -0
  90. package/src/modules/VoApi/mutations/events.ts +27 -0
  91. package/src/modules/VoApi/mutations/queues.ts +9 -1
  92. package/src/modules/VoApi/mutations/sections.ts +27 -0
  93. package/src/modules/VoApi/mutations/settings.ts +11 -3
  94. package/src/modules/VoApi/mutations/users.ts +19 -9
  95. package/src/modules/VoApi/mutations/vodocs.ts +4 -0
  96. package/src/modules/VoApi/mutations/vogroups.ts +21 -7
  97. package/src/modules/VoApi/queries/applications.ts +71 -0
  98. package/src/modules/VoApi/queries/articles.ts +26 -4
  99. package/src/modules/VoApi/queries/books.ts +101 -0
  100. package/src/modules/VoApi/queries/cards.ts +87 -0
  101. package/src/modules/VoApi/queries/events.ts +80 -0
  102. package/src/modules/VoApi/queries/help.ts +12 -0
  103. package/src/modules/VoApi/queries/navigation.ts +3 -4
  104. package/src/modules/VoApi/queries/pages.ts +29 -4
  105. package/src/modules/VoApi/queries/queues.ts +69 -4
  106. package/src/modules/VoApi/queries/search.ts +105 -4
  107. package/src/modules/VoApi/queries/sections.ts +63 -0
  108. package/src/modules/VoApi/queries/settings.ts +9 -3
  109. package/src/modules/VoApi/queries/users.ts +93 -8
  110. package/src/modules/VoApi/queries/vodocs.ts +8 -4
  111. package/src/modules/VoApi/queries/vogroups.ts +48 -2
  112. package/src/modules/VoApp.ts +25 -8
  113. package/src/modules/VoAuth.ts +136 -37
  114. package/src/modules/VoConfig.ts +13 -0
  115. package/src/modules/VoDocs/VoDocs.ts +31 -58
  116. package/src/modules/VoGroups.ts +33 -0
  117. package/src/modules/VoHelpers.ts +283 -43
  118. package/src/modules/VoRouter.ts +10 -3
  119. package/src/modules/{VoUtils.ts → VoUtils_REMOVE.ts} +17 -13
  120. package/src/types.ts +0 -38
@@ -20,7 +20,8 @@ class Vapor {
20
20
  */
21
21
  async store(file: any, options: { [key: string]: any } = {}) {
22
22
  const response = await axios.post(
23
- "/vapor/signed-storage-url",
23
+ // "/vapor/signed-storage-url",
24
+ "/api/v1/vapor/signed-storage-url",
24
25
  {
25
26
  bucket: options.bucket || "",
26
27
  content_type: options.contentType || file.type,
@@ -53,20 +54,18 @@ class Vapor {
53
54
  await instance.put(response.data.url, file, {
54
55
  cancelToken: cancelToken,
55
56
  headers: headers,
56
- onUploadProgress: function (progressEvent: any) {
57
- console.log("progressEvent.loaded", progressEvent.loaded);
58
-
59
- // options.progress(progressEvent.loaded / progressEvent.total);
60
-
61
- let percentCompleted = Math.round(
62
- (progressEvent.loaded * 100) / progressEvent.total
63
- );
64
- console.log(
65
- "onUploadProgress called with",
66
- arguments,
67
- "Percent Completed:" + percentCompleted
68
- );
69
- },
57
+ // onUploadProgress: function (progressEvent: any) {
58
+ // // console.log("progressEvent.loaded", progressEvent.loaded);
59
+ // // options.progress(progressEvent.loaded / progressEvent.total);
60
+ // // let percentCompleted = Math.round(
61
+ // // (progressEvent.loaded * 100) / progressEvent.total
62
+ // // );
63
+ // // console.log(
64
+ // // "onUploadProgress called with",
65
+ // // arguments,
66
+ // // "Percent Completed:" + percentCompleted
67
+ // // );
68
+ // },
70
69
  });
71
70
 
72
71
  response.data.extension = file.name.split(".").pop();
@@ -5,12 +5,18 @@ import {
5
5
  InMemoryCache,
6
6
  Observable,
7
7
  from,
8
+ split,
8
9
  } from "@apollo/client";
9
10
  import { onError } from "@apollo/client/link/error";
10
11
  import { createUploadLink } from "apollo-upload-client";
11
-
12
+ // import { getMainDefinition } from "@apollo/client/utilities";
13
+ // import { WebSocketLink } from "@apollo/client/link/ws";
12
14
  import VoAuth from "../VoAuth";
13
15
  import VoRouter from "../VoRouter";
16
+ // import ws from "ws";
17
+ import VoGroups from "../VoGroups";
18
+ // import VoApp from "../VoApp";
19
+ import { GeneralObject } from "../../global";
14
20
 
15
21
  async function redirect() {
16
22
  await VoAuth.logout();
@@ -18,7 +24,11 @@ async function redirect() {
18
24
  }
19
25
 
20
26
  class GraphClient {
21
- static createGraphClient(url: string, uploadLink = false) {
27
+ static createGraphClient(
28
+ url: string,
29
+ uploadLink = false,
30
+ params: GeneralObject = {}
31
+ ) {
22
32
  let httpLink;
23
33
 
24
34
  if (!uploadLink) {
@@ -29,9 +39,34 @@ class GraphClient {
29
39
  httpLink = createUploadLink({ uri: url });
30
40
  }
31
41
 
42
+ // const wsLink = new WebSocketLink({
43
+ // uri: wsUrl,
44
+ // options: {
45
+ // reconnect: true,
46
+ // },
47
+ // // webSocketImpl: ws,
48
+ // });
49
+
50
+ // The split function takes three parameters:
51
+ //
52
+ // * A function that's called for each operation to execute
53
+ // * The Link to use for an operation if the function returns a "truthy" value
54
+ // * The Link to use for an operation if the function returns a "falsy" value
55
+ // const splitLink = split(
56
+ // ({ query }) => {
57
+ // const definition = getMainDefinition(query);
58
+ // return (
59
+ // definition.kind === "OperationDefinition" &&
60
+ // definition.operation === "subscription"
61
+ // );
62
+ // },
63
+ // wsLink,
64
+ // httpLink
65
+ // );
66
+
32
67
  // Get other Apollo Links.
33
68
  // const links = this.getGraphClientLinks(getToken, refreshToken);
34
- const links = this.getGraphClientLinks();
69
+ const links = this.getGraphClientLinks(params);
35
70
 
36
71
  return new ApolloClient({
37
72
  cache: new InMemoryCache(),
@@ -39,7 +74,7 @@ class GraphClient {
39
74
  });
40
75
  }
41
76
 
42
- static getGraphClientLinks() {
77
+ static getGraphClientLinks(params: GeneralObject = {}) {
43
78
  // Create an errorLink to handle errors, e.g. when the token has expired
44
79
  // and has to be renewed. This works as an interceptor for GraphQL calls.
45
80
  const errorLink = onError(
@@ -49,23 +84,28 @@ class GraphClient {
49
84
  switch (err.message) {
50
85
  case "Unauthenticated.":
51
86
  return new Observable((observer) => {
52
- VoAuth.refreshToken().then((token: any) => {
53
- const oldHeaders = operation.getContext().headers;
54
- operation.setContext({
55
- headers: {
56
- ...oldHeaders,
57
- Authorization: token
58
- ? `${token.token_type} ${token.access_token}`
59
- : "",
60
- },
87
+ VoAuth.refreshToken()
88
+ .then((token: any) => {
89
+ const oldHeaders = operation.getContext().headers;
90
+ operation.setContext({
91
+ headers: {
92
+ ...oldHeaders,
93
+ Authorization: token
94
+ ? `${token.token_type} ${token.access_token}`
95
+ : "",
96
+ },
97
+ });
98
+ const subscriber = {
99
+ next: observer.next.bind(observer),
100
+ error: observer.error.bind(observer),
101
+ complete: observer.complete.bind(observer),
102
+ };
103
+ forward(operation).subscribe(subscriber);
104
+ })
105
+ .catch((error: any) => {
106
+ console.error(error);
107
+ redirect();
61
108
  });
62
- const subscriber = {
63
- next: observer.next.bind(observer),
64
- error: observer.error.bind(observer),
65
- complete: observer.complete.bind(observer),
66
- };
67
- forward(operation).subscribe(subscriber);
68
- });
69
109
  });
70
110
  }
71
111
  }
@@ -74,9 +114,9 @@ class GraphClient {
74
114
 
75
115
  // @TODO Handle network error, e.g. through @apollo/client/link/retry
76
116
 
77
- if ("statusCode" in networkError && networkError.statusCode === 403) {
78
- redirect();
79
- }
117
+ // if ("statusCode" in networkError && networkError.statusCode === 403) {
118
+ // redirect();
119
+ // }
80
120
  }
81
121
  }
82
122
  );
@@ -84,14 +124,22 @@ class GraphClient {
84
124
  // Create authLink that ensures that all calls include
85
125
  // the access token.
86
126
  const authLink = new ApolloLink((operation, forward) => {
87
- const token = VoAuth.getToken();
127
+ const token = params.token || VoAuth.getToken();
88
128
  const currentHeaders = operation.getContext().headers;
129
+ let groupId = "";
130
+ if (params.group) {
131
+ groupId = params.group;
132
+ } else {
133
+ const currentGroup = VoGroups.getCurrent(true);
134
+ groupId = currentGroup ? currentGroup.id : "";
135
+ }
89
136
  operation.setContext(() => ({
90
137
  ...currentHeaders,
91
138
  headers: {
92
139
  Authorization: token
93
140
  ? `${token.token_type} ${token.access_token}`
94
141
  : "",
142
+ VoGroup: groupId,
95
143
  },
96
144
  }));
97
145
  return forward(operation);
@@ -102,6 +150,21 @@ class GraphClient {
102
150
  authLink,
103
151
  };
104
152
  }
153
+
154
+ // static createGraphSubscriptionClient(url: string) {
155
+ // const wsLink = new WebSocketLink({
156
+ // uri: url,
157
+ // options: {
158
+ // reconnect: true,
159
+ // },
160
+ // // webSocketImpl: ws,
161
+ // });
162
+ // const links = this.getGraphClientLinks();
163
+ // return new ApolloClient({
164
+ // cache: new InMemoryCache(),
165
+ // link: from([links.errorLink, links.authLink, wsLink]),
166
+ // });
167
+ // }
105
168
  }
106
169
 
107
170
  export default GraphClient;
@@ -13,20 +13,40 @@ import { onError } from "@apollo/client/link/error";
13
13
  // Custom.
14
14
  import GraphClient from "./GraphClient";
15
15
  import VoBase from "../VoBase";
16
- import VoAuth from "../VoAuth";
16
+ // import VoAuth from "../VoAuth";
17
17
  import VoConfig from "../VoConfig";
18
+ import { GeneralObject } from "../../global";
18
19
 
19
20
  class VoApi extends VoBase {
20
21
  graphqlClient: any;
22
+ graphqlSubscriptionClient: any;
21
23
 
22
- init() {
23
- this.graphqlClient = GraphClient.createGraphClient(this.getGraphqlUrl);
24
+ init(params: GeneralObject = {}) {
25
+ this.graphqlClient = GraphClient.createGraphClient(
26
+ this.getGraphqlUrl,
27
+ false,
28
+ params
29
+ );
24
30
  }
25
31
 
32
+ // initSubscriptions() {
33
+ // this.graphqlSubscriptionClient = GraphClient.createGraphSubscriptionClient(
34
+ // this.getGraphqlSubscriptionUrl
35
+ // );
36
+ // }
37
+
26
38
  get getGraphqlUrl() {
27
39
  return VoConfig.get.API_BASE_URL + "" + VoConfig.get.API_GRAPHQL;
28
40
  }
29
41
 
42
+ get getGraphqlSubscriptionUrl() {
43
+ return (
44
+ VoConfig.get.API_SUBSCRIPTIONS_BASE_URL +
45
+ "" +
46
+ VoConfig.get.API_GRAPHQL_SUBSCRIPTIONS
47
+ );
48
+ }
49
+
30
50
  async getUser() {
31
51
  try {
32
52
  const user = await axios.get(this.getUrl + "/user");
@@ -0,0 +1,47 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ // Queries.
4
+ export * from "./queries/applications";
5
+ export * from "./queries/articles";
6
+ export * from "./queries/acl";
7
+ export * from "./queries/books";
8
+ export * from "./queries/cards";
9
+ export * from "./queries/events";
10
+ export * from "./queries/help";
11
+ export * from "./queries/navigation";
12
+ export * from "./queries/pages";
13
+ export * from "./queries/queues";
14
+ export * from "./queries/users";
15
+ export * from "./queries/vodocs";
16
+ export * from "./queries/vogroups";
17
+ export * from "./queries/settings";
18
+ export * from "./queries/search";
19
+ export * from "./queries/sections";
20
+
21
+ // Mutations.
22
+ export * from "./mutations/users";
23
+ export * from "./mutations/acl";
24
+ export * from "./mutations/applications";
25
+ export * from "./mutations/articles";
26
+ export * from "./mutations/books";
27
+ export * from "./mutations/cards";
28
+ export * from "./mutations/events";
29
+ export * from "./mutations/navigation";
30
+ export * from "./mutations/pages";
31
+ export * from "./mutations/queues";
32
+ export * from "./mutations/settings";
33
+ export * from "./mutations/sections";
34
+ export * from "./mutations/vodocs";
35
+ export * from "./mutations/vogroups";
36
+
37
+ export const fakeMutation = gql`
38
+ mutation fake {
39
+ id
40
+ }
41
+ `;
42
+
43
+ export const fakeQuery = gql`
44
+ query fake {
45
+ id
46
+ }
47
+ `;
@@ -2,40 +2,4 @@ import VoApi from "./VoApi";
2
2
  import GraphClient from "./GraphClient";
3
3
  export default VoApi;
4
4
  export { VoApi, GraphClient };
5
-
6
- import { gql } from "@apollo/client";
7
-
8
- // Queries.
9
- export * from "./queries/articles";
10
- export * from "./queries/acl";
11
- export * from "./queries/navigation";
12
- export * from "./queries/pages";
13
- export * from "./queries/queues";
14
- export * from "./queries/users";
15
- export * from "./queries/vodocs";
16
- export * from "./queries/vogroups";
17
- export * from "./queries/settings";
18
- export * from "./queries/search";
19
-
20
- // Mutations.
21
- export * from "./mutations/users";
22
- export * from "./mutations/acl";
23
- export * from "./mutations/articles";
24
- export * from "./mutations/navigation";
25
- export * from "./mutations/pages";
26
- export * from "./mutations/queues";
27
- export * from "./mutations/settings";
28
- export * from "./mutations/vodocs";
29
- export * from "./mutations/vogroups";
30
-
31
- export const fakeMutation = gql`
32
- mutation fake {
33
- id
34
- }
35
- `;
36
-
37
- export const fakeQuery = gql`
38
- query fake {
39
- id
40
- }
41
- `;
5
+ export * from "./graphql";
@@ -0,0 +1,27 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ export const CREATE_APPLICATION = gql`
4
+ mutation CreateApplication($input: UpdateApplicationInput!) {
5
+ createApplication(input: $input) {
6
+ id
7
+ email
8
+ }
9
+ }
10
+ `;
11
+
12
+ export const UPDATE_APPLICATION = gql`
13
+ mutation UpdateApplication($id: ID!, $input: UpdateApplicationInput!) {
14
+ updateApplication(id: $id, input: $input) {
15
+ id
16
+ email
17
+ }
18
+ }
19
+ `;
20
+
21
+ export const DELETE_APPLICATION = gql`
22
+ mutation DeleteApplication($id: ID!) {
23
+ deleteApplication(id: $id) {
24
+ id
25
+ }
26
+ }
27
+ `;
@@ -0,0 +1,27 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ export const CREATE_BOOK = gql`
4
+ mutation CreateBook($input: UpdateBookInput!) {
5
+ createBook(input: $input) {
6
+ id
7
+ title
8
+ }
9
+ }
10
+ `;
11
+
12
+ export const UPDATE_BOOK = gql`
13
+ mutation UpdateBook($id: ID!, $input: UpdateBookInput!) {
14
+ updateBook(id: $id, input: $input) {
15
+ id
16
+ title
17
+ }
18
+ }
19
+ `;
20
+
21
+ export const DELETE_BOOK = gql`
22
+ mutation DeleteBook($id: ID!) {
23
+ deleteBook(id: $id) {
24
+ id
25
+ }
26
+ }
27
+ `;
@@ -0,0 +1,27 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ export const CREATE_CARD = gql`
4
+ mutation CreateCard($input: UpdateCardInput!) {
5
+ createCard(input: $input) {
6
+ id
7
+ title
8
+ }
9
+ }
10
+ `;
11
+
12
+ export const UPDATE_CARD = gql`
13
+ mutation UpdateCard($id: ID!, $input: UpdateCardInput!) {
14
+ updateCard(id: $id, input: $input) {
15
+ id
16
+ title
17
+ }
18
+ }
19
+ `;
20
+
21
+ export const DELETE_CARD = gql`
22
+ mutation DeleteCard($id: ID!) {
23
+ deleteCard(id: $id) {
24
+ id
25
+ }
26
+ }
27
+ `;
@@ -0,0 +1,27 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ export const CREATE_EVENT = gql`
4
+ mutation CreateEvent($input: UpdateEventInput!) {
5
+ createEvent(input: $input) {
6
+ id
7
+ title
8
+ }
9
+ }
10
+ `;
11
+
12
+ export const UPDATE_EVENT = gql`
13
+ mutation UpdateEvent($id: ID!, $input: UpdateEventInput!) {
14
+ updateEvent(id: $id, input: $input) {
15
+ id
16
+ title
17
+ }
18
+ }
19
+ `;
20
+
21
+ export const DELETE_EVENT = gql`
22
+ mutation DeleteEvent($id: ID!) {
23
+ deleteEvent(id: $id) {
24
+ id
25
+ }
26
+ }
27
+ `;
@@ -1,4 +1,4 @@
1
- import { gql } from '@apollo/client';
1
+ import { gql } from "@apollo/client";
2
2
 
3
3
  export const CREATE_QUEUE = gql`
4
4
  mutation CreateQueue($input: UpdateQueueInput!) {
@@ -14,6 +14,10 @@ export const CREATE_QUEUE = gql`
14
14
  id
15
15
  title
16
16
  }
17
+ ... on Section {
18
+ id
19
+ title
20
+ }
17
21
  }
18
22
  }
19
23
  }
@@ -34,6 +38,10 @@ export const UPDATE_QUEUE = gql`
34
38
  id
35
39
  title
36
40
  }
41
+ ... on Section {
42
+ id
43
+ title
44
+ }
37
45
  }
38
46
  created_at
39
47
  updated_at
@@ -0,0 +1,27 @@
1
+ import { gql } from '@apollo/client';
2
+
3
+ export const CREATE_SECTION = gql`
4
+ mutation CreateSection($input: UpdateSectionInput!) {
5
+ createSection(input: $input) {
6
+ id
7
+ title
8
+ }
9
+ }
10
+ `;
11
+
12
+ export const UPDATE_SECTION = gql`
13
+ mutation UpdateSection($id: ID!, $input: UpdateSectionInput!) {
14
+ updateSection(id: $id, input: $input) {
15
+ id
16
+ title
17
+ }
18
+ }
19
+ `;
20
+
21
+ export const DELETE_SECTION = gql`
22
+ mutation DeleteSection($id: ID!) {
23
+ deleteSection(id: $id) {
24
+ id
25
+ }
26
+ }
27
+ `;
@@ -1,11 +1,19 @@
1
- import { gql } from '@apollo/client';
1
+ import { gql } from "@apollo/client";
2
2
 
3
3
  export const UPDATE_SETTINGS = gql`
4
- mutation UpdateQueue($settings: [UpdateSettingInput]!) {
4
+ mutation UpdateSettings($settings: [UpdateSettingInput]!) {
5
5
  updateSettings(settings: $settings) {
6
6
  name
7
7
  category
8
8
  value
9
+ file {
10
+ id
11
+ title
12
+ filename
13
+ filesize
14
+ filetype
15
+ url
16
+ }
9
17
  }
10
18
  }
11
- `;
19
+ `;
@@ -1,12 +1,12 @@
1
- import { gql } from '@apollo/client';
1
+ import { gql } from "@apollo/client";
2
2
 
3
3
  export const CREATE_USER = gql`
4
4
  mutation CreateUser($input: UpdateUserInput!) {
5
5
  createUser(input: $input) {
6
6
  id
7
7
  name
8
- email,
9
- firstname,
8
+ email
9
+ firstname
10
10
  lastname
11
11
  }
12
12
  }
@@ -17,9 +17,17 @@ export const UPDATE_USER = gql`
17
17
  updateUser(id: $id, input: $input) {
18
18
  id
19
19
  name
20
- email,
21
- firstname,
22
- lastname,
20
+ email
21
+ firstname
22
+ lastname
23
+ images {
24
+ id
25
+ title
26
+ filename
27
+ filesize
28
+ filetype
29
+ url
30
+ }
23
31
  updated_at
24
32
  created_at
25
33
  groups {
@@ -32,6 +40,11 @@ export const UPDATE_USER = gql`
32
40
  label
33
41
  type
34
42
  }
43
+ groupRoles {
44
+ id
45
+ label
46
+ type
47
+ }
35
48
  }
36
49
  }
37
50
  `;
@@ -43,6 +56,3 @@ export const DELETE_USER = gql`
43
56
  }
44
57
  }
45
58
  `;
46
-
47
-
48
-
@@ -5,6 +5,7 @@ export const CREATE_PORTFOLIO = gql`
5
5
  createPortfolio(input: $input) {
6
6
  id
7
7
  disk
8
+ status
8
9
  name
9
10
  disk
10
11
  title
@@ -20,6 +21,7 @@ export const UPDATE_PORTFOLIO = gql`
20
21
  updatePortfolio(id: $id, input: $input) {
21
22
  id
22
23
  disk
24
+ status
23
25
  name
24
26
  disk
25
27
  title
@@ -87,6 +89,7 @@ export const CREATE_FILE = gql`
87
89
  filename
88
90
  filesize
89
91
  filetype
92
+ url
90
93
  created_at
91
94
  updated_at
92
95
  }
@@ -106,6 +109,7 @@ export const UPDATE_FILE = gql`
106
109
  filename
107
110
  filesize
108
111
  filetype
112
+ url
109
113
  created_at
110
114
  updated_at
111
115
  }