@raketa-cloud/admin 0.0.37 → 0.0.38
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.
package/package.json
CHANGED
package/src/cloud/Articles.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DeleteArticleDocument,
|
|
8
8
|
TranslateArticleDocument,
|
|
9
9
|
ChangeArticleSlugDocument,
|
|
10
|
+
MinimalArticlesDocument,
|
|
10
11
|
} from "./documents/articlesDocuments";
|
|
11
12
|
import { toDateTimeInput, toUTCISO8601String } from "../utils";
|
|
12
13
|
|
|
@@ -41,6 +42,19 @@ export default class Articles extends RaketaClient {
|
|
|
41
42
|
];
|
|
42
43
|
}
|
|
43
44
|
|
|
45
|
+
async minimal(query, locale, articleTypeSlug) {
|
|
46
|
+
const vars = this.buildListInput(query, locale);
|
|
47
|
+
|
|
48
|
+
const { articles: items } = await this.query(MinimalArticlesDocument, {
|
|
49
|
+
input: {
|
|
50
|
+
...vars.input,
|
|
51
|
+
filters: { ...vars.input.filters, articleTypeSlug },
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
return items;
|
|
56
|
+
}
|
|
57
|
+
|
|
44
58
|
async find(id, locale) {
|
|
45
59
|
const { article: item } = await this.query(ArticleByIdDocument, {
|
|
46
60
|
input: {
|
|
@@ -52,6 +66,19 @@ export default class Articles extends RaketaClient {
|
|
|
52
66
|
return item;
|
|
53
67
|
}
|
|
54
68
|
|
|
69
|
+
async minimal(query, locale, articleTypeSlug) {
|
|
70
|
+
const vars = this.buildListInput(query, locale);
|
|
71
|
+
|
|
72
|
+
const { articles: items } = await this.query(MinimalArticlesDocument, {
|
|
73
|
+
input: {
|
|
74
|
+
...vars.input,
|
|
75
|
+
filters: { ...vars.input.filters, articleTypeSlug },
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
return items;
|
|
80
|
+
}
|
|
81
|
+
|
|
55
82
|
async all(query, locale, articleTypeSlug) {
|
|
56
83
|
const vars = this.buildAllInput(query, locale);
|
|
57
84
|
|
package/src/cloud/Events.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DeleteEventDocument,
|
|
8
8
|
TranslateEventDocument,
|
|
9
9
|
ChangeEventSlugDocument,
|
|
10
|
+
MinimalEventsDocument,
|
|
10
11
|
} from "./documents/eventsDocuments";
|
|
11
12
|
import { toDateTimeInput, toUTCISO8601String } from "../utils";
|
|
12
13
|
|
|
@@ -62,6 +63,19 @@ export default class Events extends RaketaClient {
|
|
|
62
63
|
return item;
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
async minimal(query, locale, eventTypeSlug) {
|
|
67
|
+
const vars = this.buildListInput(query, locale);
|
|
68
|
+
|
|
69
|
+
const { events: items } = await this.query(MinimalEventsDocument, {
|
|
70
|
+
input: {
|
|
71
|
+
...vars.input,
|
|
72
|
+
filters: { ...vars.input.filters, eventTypeSlug },
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
return items;
|
|
77
|
+
}
|
|
78
|
+
|
|
65
79
|
async all(query, locale, eventTypeSlug) {
|
|
66
80
|
const vars = this.buildAllInput(query, locale);
|
|
67
81
|
|
package/src/cloud/Pages.js
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DeletePageDocument,
|
|
8
8
|
TranslatePageDocument,
|
|
9
9
|
ChangePageSlugDocument,
|
|
10
|
+
MinimalPagesDocument,
|
|
10
11
|
} from "./documents/pagesDocuments";
|
|
11
12
|
|
|
12
13
|
export default class Pages extends RaketaClient {
|
|
@@ -42,6 +43,19 @@ export default class Pages extends RaketaClient {
|
|
|
42
43
|
return item;
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
async minimal(query, locale, pageTypeSlug) {
|
|
47
|
+
const vars = this.buildListInput(query, locale);
|
|
48
|
+
|
|
49
|
+
const { pages: items } = await this.query(MinimalPagesDocument, {
|
|
50
|
+
input: {
|
|
51
|
+
...vars.input,
|
|
52
|
+
filters: { ...vars.input.filters, pageTypeSlug },
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
return items;
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
async all(query, locale, pageTypeSlug) {
|
|
46
60
|
const vars = this.buildAllInput(query, locale);
|
|
47
61
|
|
|
@@ -8,6 +8,16 @@ import {
|
|
|
8
8
|
tagFragment,
|
|
9
9
|
} from "./common";
|
|
10
10
|
|
|
11
|
+
function minimalArticleFragment() {
|
|
12
|
+
return gql`
|
|
13
|
+
{
|
|
14
|
+
id
|
|
15
|
+
slug
|
|
16
|
+
title
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
function articleFragment() {
|
|
12
22
|
return gql`
|
|
13
23
|
{
|
|
@@ -70,6 +80,15 @@ const ArticleChangesDocument = gql`
|
|
|
70
80
|
}
|
|
71
81
|
`;
|
|
72
82
|
|
|
83
|
+
const MinimalArticlesDocument = gql`
|
|
84
|
+
query Articles($input: ArticlesInput!) {
|
|
85
|
+
articles(input: $input) {
|
|
86
|
+
list ${minimalArticleFragment()}
|
|
87
|
+
pagination ${paginationFragment()}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
`;
|
|
91
|
+
|
|
73
92
|
const ArticlesDocument = gql`
|
|
74
93
|
query Articles($input: ArticlesInput!) {
|
|
75
94
|
articles(input: $input) {
|
|
@@ -229,6 +248,7 @@ const UnlockArticleRevisionDocument = gql`
|
|
|
229
248
|
export {
|
|
230
249
|
ArticleByIdDocument,
|
|
231
250
|
ArticlesDocument,
|
|
251
|
+
MinimalArticlesDocument,
|
|
232
252
|
CreateArticleDocument,
|
|
233
253
|
UpdateArticleDocument,
|
|
234
254
|
UpdateArticleWidgetsDocument,
|
|
@@ -8,6 +8,16 @@ import {
|
|
|
8
8
|
tagFragment,
|
|
9
9
|
} from "./common";
|
|
10
10
|
|
|
11
|
+
function minimalEventFragment() {
|
|
12
|
+
return gql`
|
|
13
|
+
{
|
|
14
|
+
id
|
|
15
|
+
slug
|
|
16
|
+
title
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
function eventFragment() {
|
|
12
22
|
return gql`
|
|
13
23
|
{
|
|
@@ -74,6 +84,15 @@ const EventChangesDocument = gql`
|
|
|
74
84
|
}
|
|
75
85
|
`;
|
|
76
86
|
|
|
87
|
+
const MinimalEventsDocument = gql`
|
|
88
|
+
query MinimalEvents($input: EventsInput!) {
|
|
89
|
+
events(input: $input) {
|
|
90
|
+
list ${minimalEventFragment()}
|
|
91
|
+
pagination ${paginationFragment()}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
|
|
77
96
|
const EventsDocument = gql`
|
|
78
97
|
query Events($input: EventsInput!) {
|
|
79
98
|
events(input: $input) {
|
|
@@ -235,6 +254,7 @@ const UnlockEventRevisionDocument = gql`
|
|
|
235
254
|
export {
|
|
236
255
|
EventByIdDocument,
|
|
237
256
|
EventsDocument,
|
|
257
|
+
MinimalEventsDocument,
|
|
238
258
|
CreateEventDocument,
|
|
239
259
|
UpdateEventDocument,
|
|
240
260
|
UpdateEventWidgetsDocument,
|
|
@@ -8,6 +8,16 @@ import {
|
|
|
8
8
|
tagFragment,
|
|
9
9
|
} from "./common";
|
|
10
10
|
|
|
11
|
+
function minimalPageFragment() {
|
|
12
|
+
return gql`
|
|
13
|
+
{
|
|
14
|
+
id
|
|
15
|
+
slug
|
|
16
|
+
title
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
}
|
|
20
|
+
|
|
11
21
|
function pageFragment() {
|
|
12
22
|
return gql`
|
|
13
23
|
{
|
|
@@ -68,6 +78,15 @@ const PageChangesDocument = gql`
|
|
|
68
78
|
}
|
|
69
79
|
`;
|
|
70
80
|
|
|
81
|
+
const MinimalPagesDocument = gql`
|
|
82
|
+
query Pages($input: PagesInput!) {
|
|
83
|
+
pages(input: $input) {
|
|
84
|
+
list ${minimalPageFragment()}
|
|
85
|
+
pagination ${paginationFragment()}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
|
|
71
90
|
const PagesDocument = gql`
|
|
72
91
|
query Pages($input: PagesInput!) {
|
|
73
92
|
pages(input: $input) {
|
|
@@ -226,6 +245,7 @@ const UnlockPageRevisionDocument = gql`
|
|
|
226
245
|
export {
|
|
227
246
|
PageByIdDocument,
|
|
228
247
|
PagesDocument,
|
|
248
|
+
MinimalPagesDocument,
|
|
229
249
|
CreatePageDocument,
|
|
230
250
|
UpdatePageDocument,
|
|
231
251
|
UpdatePageWidgetsDocument,
|