@vocollege/app 0.0.58 → 0.0.60

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 (102) 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 +14 -9
  6. package/dist/modules/Services/I18n/I18n.js +1 -1
  7. package/dist/modules/Services/I18n/strings.json +515 -25
  8. package/dist/modules/Services/Vapor/Vapor.js +3 -1
  9. package/dist/modules/VoApi/GraphClient.d.ts +3 -2
  10. package/dist/modules/VoApi/GraphClient.js +51 -13
  11. package/dist/modules/VoApi/VoApi.d.ts +4 -1
  12. package/dist/modules/VoApi/VoApi.js +18 -2
  13. package/dist/modules/VoApi/graphql.d.ts +5 -0
  14. package/dist/modules/VoApi/graphql.js +12 -3
  15. package/dist/modules/VoApi/index.js +5 -1
  16. package/dist/modules/VoApi/mutations/acl.js +5 -5
  17. package/dist/modules/VoApi/mutations/applications.d.ts +3 -0
  18. package/dist/modules/VoApi/mutations/applications.js +12 -0
  19. package/dist/modules/VoApi/mutations/articles.js +3 -3
  20. package/dist/modules/VoApi/mutations/books.d.ts +3 -0
  21. package/dist/modules/VoApi/mutations/books.js +12 -0
  22. package/dist/modules/VoApi/mutations/cards.js +3 -3
  23. package/dist/modules/VoApi/mutations/events.js +3 -3
  24. package/dist/modules/VoApi/mutations/navigation.js +3 -3
  25. package/dist/modules/VoApi/mutations/pages.js +3 -3
  26. package/dist/modules/VoApi/mutations/queues.js +3 -3
  27. package/dist/modules/VoApi/mutations/sections.js +3 -3
  28. package/dist/modules/VoApi/mutations/settings.js +1 -1
  29. package/dist/modules/VoApi/mutations/users.js +3 -3
  30. package/dist/modules/VoApi/mutations/vodocs.js +9 -9
  31. package/dist/modules/VoApi/mutations/vogroups.d.ts +1 -0
  32. package/dist/modules/VoApi/mutations/vogroups.js +10 -9
  33. package/dist/modules/VoApi/queries/acl.js +4 -4
  34. package/dist/modules/VoApi/queries/applications.d.ts +2 -0
  35. package/dist/modules/VoApi/queries/applications.js +11 -0
  36. package/dist/modules/VoApi/queries/articles.js +2 -2
  37. package/dist/modules/VoApi/queries/books.d.ts +4 -0
  38. package/dist/modules/VoApi/queries/books.js +13 -0
  39. package/dist/modules/VoApi/queries/cards.js +2 -2
  40. package/dist/modules/VoApi/queries/events.js +2 -2
  41. package/dist/modules/VoApi/queries/help.d.ts +1 -0
  42. package/dist/modules/VoApi/queries/help.js +11 -0
  43. package/dist/modules/VoApi/queries/navigation.js +4 -4
  44. package/dist/modules/VoApi/queries/pages.js +2 -2
  45. package/dist/modules/VoApi/queries/queues.js +2 -2
  46. package/dist/modules/VoApi/queries/search.d.ts +2 -0
  47. package/dist/modules/VoApi/queries/search.js +5 -3
  48. package/dist/modules/VoApi/queries/sections.js +2 -2
  49. package/dist/modules/VoApi/queries/settings.js +1 -1
  50. package/dist/modules/VoApi/queries/users.d.ts +1 -0
  51. package/dist/modules/VoApi/queries/users.js +5 -4
  52. package/dist/modules/VoApi/queries/vodocs.js +3 -3
  53. package/dist/modules/VoApi/queries/vogroups.js +7 -7
  54. package/dist/modules/VoApp.d.ts +1 -0
  55. package/dist/modules/VoApp.js +17 -0
  56. package/dist/modules/VoAuth.d.ts +2 -1
  57. package/dist/modules/VoAuth.js +119 -38
  58. package/dist/modules/VoBase.js +2 -2
  59. package/dist/modules/VoConfig.js +9 -0
  60. package/dist/modules/VoDocs/VoDocs.js +7 -2
  61. package/dist/modules/VoGroups.d.ts +7 -0
  62. package/dist/modules/VoGroups.js +40 -0
  63. package/dist/modules/VoHelpers.d.ts +36 -1
  64. package/dist/modules/VoHelpers.js +320 -48
  65. package/dist/modules/VoRouter.js +10 -2
  66. package/dist/modules/VoUtils_REMOVE.js +9 -5
  67. package/package.json +17 -9
  68. package/src/global.ts +44 -0
  69. package/src/index.ts +3 -2
  70. package/src/interceptor.ts +15 -8
  71. package/src/modules/Services/I18n/strings.json +514 -24
  72. package/src/modules/Services/Vapor/Vapor.ts +2 -1
  73. package/src/modules/VoApi/GraphClient.ts +66 -8
  74. package/src/modules/VoApi/VoApi.ts +23 -3
  75. package/src/modules/VoApi/graphql.ts +5 -0
  76. package/src/modules/VoApi/mutations/applications.ts +27 -0
  77. package/src/modules/VoApi/mutations/books.ts +27 -0
  78. package/src/modules/VoApi/mutations/users.ts +5 -0
  79. package/src/modules/VoApi/mutations/vodocs.ts +2 -0
  80. package/src/modules/VoApi/mutations/vogroups.ts +21 -7
  81. package/src/modules/VoApi/queries/applications.ts +71 -0
  82. package/src/modules/VoApi/queries/articles.ts +1 -1
  83. package/src/modules/VoApi/queries/books.ts +113 -0
  84. package/src/modules/VoApi/queries/cards.ts +14 -1
  85. package/src/modules/VoApi/queries/events.ts +1 -1
  86. package/src/modules/VoApi/queries/help.ts +12 -0
  87. package/src/modules/VoApi/queries/navigation.ts +3 -4
  88. package/src/modules/VoApi/queries/pages.ts +1 -1
  89. package/src/modules/VoApi/queries/queues.ts +18 -1
  90. package/src/modules/VoApi/queries/search.ts +98 -1
  91. package/src/modules/VoApi/queries/sections.ts +1 -1
  92. package/src/modules/VoApi/queries/users.ts +74 -8
  93. package/src/modules/VoApi/queries/vodocs.ts +8 -4
  94. package/src/modules/VoApi/queries/vogroups.ts +40 -11
  95. package/src/modules/VoApp.ts +25 -8
  96. package/src/modules/VoAuth.ts +134 -37
  97. package/src/modules/VoConfig.ts +11 -0
  98. package/src/modules/VoDocs/VoDocs.ts +5 -0
  99. package/src/modules/VoGroups.ts +34 -0
  100. package/src/modules/VoHelpers.ts +254 -42
  101. package/src/modules/VoRouter.ts +10 -3
  102. 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,
@@ -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(
@@ -79,9 +114,9 @@ class GraphClient {
79
114
 
80
115
  // @TODO Handle network error, e.g. through @apollo/client/link/retry
81
116
 
82
- if ("statusCode" in networkError && networkError.statusCode === 403) {
83
- redirect();
84
- }
117
+ // if ("statusCode" in networkError && networkError.statusCode === 403) {
118
+ // redirect();
119
+ // }
85
120
  }
86
121
  }
87
122
  );
@@ -89,14 +124,22 @@ class GraphClient {
89
124
  // Create authLink that ensures that all calls include
90
125
  // the access token.
91
126
  const authLink = new ApolloLink((operation, forward) => {
92
- const token = VoAuth.getToken();
127
+ const token = params.token || VoAuth.getToken();
93
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
+ }
94
136
  operation.setContext(() => ({
95
137
  ...currentHeaders,
96
138
  headers: {
97
139
  Authorization: token
98
140
  ? `${token.token_type} ${token.access_token}`
99
141
  : "",
142
+ VoGroup: groupId,
100
143
  },
101
144
  }));
102
145
  return forward(operation);
@@ -107,6 +150,21 @@ class GraphClient {
107
150
  authLink,
108
151
  };
109
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
+ // }
110
168
  }
111
169
 
112
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");
@@ -1,10 +1,13 @@
1
1
  import { gql } from "@apollo/client";
2
2
 
3
3
  // Queries.
4
+ export * from "./queries/applications";
4
5
  export * from "./queries/articles";
5
6
  export * from "./queries/acl";
7
+ export * from "./queries/books";
6
8
  export * from "./queries/cards";
7
9
  export * from "./queries/events";
10
+ export * from "./queries/help";
8
11
  export * from "./queries/navigation";
9
12
  export * from "./queries/pages";
10
13
  export * from "./queries/queues";
@@ -18,7 +21,9 @@ export * from "./queries/sections";
18
21
  // Mutations.
19
22
  export * from "./mutations/users";
20
23
  export * from "./mutations/acl";
24
+ export * from "./mutations/applications";
21
25
  export * from "./mutations/articles";
26
+ export * from "./mutations/books";
22
27
  export * from "./mutations/cards";
23
28
  export * from "./mutations/events";
24
29
  export * from "./mutations/navigation";
@@ -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
+ `;
@@ -40,6 +40,11 @@ export const UPDATE_USER = gql`
40
40
  label
41
41
  type
42
42
  }
43
+ groupRoles {
44
+ id
45
+ label
46
+ type
47
+ }
43
48
  }
44
49
  }
45
50
  `;
@@ -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
@@ -1,4 +1,4 @@
1
- import { gql } from '@apollo/client';
1
+ import { gql } from "@apollo/client";
2
2
 
3
3
  export const CREATE_GROUP = gql`
4
4
  mutation CreateGroup($input: UpdateGroupInput!) {
@@ -36,11 +36,25 @@ export const DELETE_GROUP = gql`
36
36
 
37
37
  export const UPDATE_GROUPS_PERMISSION = gql`
38
38
  mutation UpdateGroupsPermission($id: ID!, $roles: [ID!]) {
39
- updateGroupsPermission(id: $id, roles: { sync: $roles } ) {
39
+ updateGroupsPermission(id: $id, roles: { sync: $roles }) {
40
40
  id
41
41
  subject
42
42
  name
43
- label,
43
+ label
44
+ roles {
45
+ id
46
+ }
47
+ }
48
+ }
49
+ `;
50
+
51
+ export const UPDATE_GROUPS_PERMISSIONS = gql`
52
+ mutation UpdateGroupsPermissions($input: [UpdatePermissionInput!]!) {
53
+ updateGroupsPermissions(input: $input) {
54
+ id
55
+ subject
56
+ name
57
+ label
44
58
  roles {
45
59
  id
46
60
  }
@@ -53,7 +67,7 @@ export const CREATE_GROUPS_ROLE = gql`
53
67
  createGroupsRole(input: $input) {
54
68
  id
55
69
  name
56
- label,
70
+ label
57
71
  }
58
72
  }
59
73
  `;
@@ -63,7 +77,7 @@ export const UPDATE_GROUPS_ROLE = gql`
63
77
  updateGroupsRole(id: $id, input: $input) {
64
78
  id
65
79
  name
66
- label,
80
+ label
67
81
  }
68
82
  }
69
83
  `;
@@ -73,7 +87,7 @@ export const DELETE_GROUPS_ROLE = gql`
73
87
  deleteGroupsRole(id: $id) {
74
88
  id
75
89
  name
76
- label,
90
+ label
77
91
  }
78
92
  }
79
- `;
93
+ `;
@@ -0,0 +1,71 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ export const GET_APPLICATION = gql`
4
+ query Application($id: ID!, $categories: [String]) {
5
+ application(id: $id) {
6
+ id
7
+ email
8
+ firstname
9
+ lastname
10
+ category
11
+ status
12
+ responsible {
13
+ id
14
+ email
15
+ name
16
+ firstname
17
+ lastname
18
+ type
19
+ }
20
+ comments
21
+ content
22
+ created_at
23
+ updated_at
24
+ }
25
+ allGroups(categories: $categories) {
26
+ id
27
+ title
28
+ category
29
+ }
30
+ }
31
+ `;
32
+
33
+ export const GET_APPLICATIONS = gql`
34
+ query Applications(
35
+ $search: String
36
+ $page: Int
37
+ $limit: Int
38
+ $orderBy: [GetApplicationsOrderByClause]
39
+ ) {
40
+ applications(
41
+ search: $search
42
+ page: $page
43
+ limit: $limit
44
+ orderBy: $orderBy
45
+ ) {
46
+ paginatorInfo {
47
+ total
48
+ currentPage
49
+ hasMorePages
50
+ }
51
+ data {
52
+ id
53
+ email
54
+ firstname
55
+ lastname
56
+ category
57
+ status
58
+ responsible {
59
+ id
60
+ email
61
+ name
62
+ firstname
63
+ lastname
64
+ type
65
+ }
66
+ created_at
67
+ updated_at
68
+ }
69
+ }
70
+ }
71
+ `;
@@ -65,7 +65,7 @@ export const GET_ARTICLES = gql`
65
65
  $search: String
66
66
  $page: Int
67
67
  $limit: Int
68
- $orderBy: [GetArticlesOrderByOrderByClause]
68
+ $orderBy: [GetArticlesOrderByClause]
69
69
  ) {
70
70
  articles(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
71
71
  paginatorInfo {
@@ -0,0 +1,113 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ export const GET_BOOK_FIELDS = gql`
4
+ fragment BookFields on Book {
5
+ id
6
+ title
7
+ body
8
+ status
9
+ access
10
+ editUrl
11
+ author {
12
+ ... on User {
13
+ id
14
+ name
15
+ type
16
+ }
17
+ }
18
+ parent {
19
+ ... on Book {
20
+ id
21
+ title
22
+ type
23
+ }
24
+ }
25
+ created_at
26
+ updated_at
27
+ tags {
28
+ id
29
+ label
30
+ }
31
+ attachments {
32
+ id
33
+ title
34
+ filename
35
+ filesize
36
+ filetype
37
+ url
38
+ type
39
+ }
40
+ roles {
41
+ id
42
+ name
43
+ label
44
+ type
45
+ }
46
+ groupRoles {
47
+ id
48
+ name
49
+ label
50
+ type
51
+ }
52
+ }
53
+ `;
54
+
55
+ export const GET_BOOKS_FIELDS = gql`
56
+ fragment BooksFields on Book {
57
+ id
58
+ title
59
+ status
60
+ access
61
+ parent {
62
+ ... on Book {
63
+ id
64
+ title
65
+ type
66
+ }
67
+ }
68
+ roles {
69
+ id
70
+ name
71
+ label
72
+ type
73
+ }
74
+ groupRoles {
75
+ id
76
+ name
77
+ label
78
+ type
79
+ }
80
+ created_at
81
+ updated_at
82
+ }
83
+ `;
84
+
85
+ export const GET_BOOK = gql`
86
+ query Book($id: ID!) {
87
+ book(id: $id) {
88
+ ...BookFields
89
+ }
90
+ }
91
+ ${GET_BOOK_FIELDS}
92
+ `;
93
+
94
+ export const GET_BOOKS = gql`
95
+ query Books(
96
+ $search: String
97
+ $page: Int
98
+ $limit: Int
99
+ $orderBy: [GetBooksOrderByClause]
100
+ ) {
101
+ books(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
102
+ paginatorInfo {
103
+ total
104
+ currentPage
105
+ hasMorePages
106
+ }
107
+ data {
108
+ ...BooksFields
109
+ }
110
+ }
111
+ }
112
+ ${GET_BOOKS_FIELDS}
113
+ `;
@@ -34,6 +34,19 @@ export const GET_CARD = gql`
34
34
  title
35
35
  type
36
36
  }
37
+ ... on Queue {
38
+ id
39
+ title
40
+ type
41
+ }
42
+ }
43
+ images {
44
+ id
45
+ title
46
+ filename
47
+ filesize
48
+ filetype
49
+ url
37
50
  }
38
51
  created_at
39
52
  updated_at
@@ -46,7 +59,7 @@ export const GET_CARDS = gql`
46
59
  $search: String
47
60
  $page: Int
48
61
  $limit: Int
49
- $orderBy: [GetCardsOrderByOrderByClause]
62
+ $orderBy: [GetCardsOrderByClause]
50
63
  ) {
51
64
  cards(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
52
65
  paginatorInfo {
@@ -46,7 +46,7 @@ export const GET_EVENTS = gql`
46
46
  $end_date: Date
47
47
  $page: Int
48
48
  $limit: Int
49
- $orderBy: [GetEventsOrderByOrderByClause]
49
+ $orderBy: [GetEventsOrderByClause]
50
50
  ) {
51
51
  events(
52
52
  search: $search
@@ -0,0 +1,12 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ import { GET_BOOK_FIELDS } from "./books";
4
+
5
+ export const GET_HELP = gql`
6
+ query Help($name: String, $parent: ID) {
7
+ help(name: $name, parent: $parent) {
8
+ ...BookFields
9
+ }
10
+ }
11
+ ${GET_BOOK_FIELDS}
12
+ `;
@@ -1,4 +1,4 @@
1
- import { gql } from '@apollo/client';
1
+ import { gql } from "@apollo/client";
2
2
 
3
3
  export const GET_MENU = gql`
4
4
  query Menu($name: String!) {
@@ -27,7 +27,7 @@ export const GET_MENUS = gql`
27
27
  $search: String
28
28
  $page: Int
29
29
  $limit: Int
30
- $orderBy: [GetMenusOrderByOrderByClause]
30
+ $orderBy: [GetMenusOrderByClause]
31
31
  ) {
32
32
  menus(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
33
33
  paginatorInfo {
@@ -63,7 +63,7 @@ export const GET_MENU_LINKS = gql`
63
63
  $search: String
64
64
  $page: Int
65
65
  $limit: Int
66
- $orderBy: [GetMenusOrderByOrderByClause]
66
+ $orderBy: [GetMenusOrderByClause]
67
67
  ) {
68
68
  menuLinks(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
69
69
  paginatorInfo {
@@ -79,4 +79,3 @@ export const GET_MENU_LINKS = gql`
79
79
  }
80
80
  }
81
81
  `;
82
-
@@ -50,7 +50,7 @@ export const GET_PAGES = gql`
50
50
  $search: String
51
51
  $page: Int
52
52
  $limit: Int
53
- $orderBy: [GetPagesOrderByOrderByClause]
53
+ $orderBy: [GetPagesOrderByClause]
54
54
  ) {
55
55
  pages(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
56
56
  paginatorInfo {
@@ -20,6 +20,14 @@ export const GET_QUEUE = gql`
20
20
  id
21
21
  label
22
22
  }
23
+ images {
24
+ id
25
+ title
26
+ filename
27
+ filesize
28
+ filetype
29
+ url
30
+ }
23
31
  items {
24
32
  ... on Card {
25
33
  id
@@ -52,6 +60,15 @@ export const GET_QUEUE = gql`
52
60
  type
53
61
  }
54
62
  }
63
+ attachments {
64
+ id
65
+ title
66
+ filename
67
+ filesize
68
+ filetype
69
+ url
70
+ type
71
+ }
55
72
  created_at
56
73
  updated_at
57
74
  }
@@ -78,7 +95,7 @@ export const GET_QUEUES = gql`
78
95
  $search: String
79
96
  $page: Int
80
97
  $limit: Int
81
- $orderBy: [GetQueuesOrderByOrderByClause]
98
+ $orderBy: [GetQueuesOrderByClause]
82
99
  ) {
83
100
  queues(search: $search, page: $page, limit: $limit, orderBy: $orderBy) {
84
101
  paginatorInfo {