@pronto-tools-and-more/pronto 12.34.0 → 12.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. package/package.json +12 -11
  2. package/src/parts/ApiProcess/ApiProcess.js +32 -0
  3. package/src/parts/ApiProcessPath/ApiProcessPath.js +7 -0
  4. package/src/parts/HandleApi/HandleApi.js +30 -48
  5. package/src/parts/LaunchApiProcess/LaunchApiProcess.js +15 -0
  6. package/src/parts/Version/Version.js +1 -1
  7. package/src/parts/GetPostIds/GetPostIds.js +0 -41
  8. package/src/parts/GraphQlQueryAuthors/GraphQlQueryAuthors.js +0 -66
  9. package/src/parts/GraphQlQueryCategories/GraphQlQueryCategories.js +0 -66
  10. package/src/parts/GraphQlQueryCollection/GraphQlQueryCollection.js +0 -227
  11. package/src/parts/GraphQlQueryCollections/GraphQlQueryCollections.js +0 -227
  12. package/src/parts/GraphQlQueryContent/GraphQlQueryContent.js +0 -198
  13. package/src/parts/GraphQlQueryDossier/GraphQlQueryDossier.js +0 -221
  14. package/src/parts/GraphQlQueryDossiers/GraphQlQueryDossiers.js +0 -201
  15. package/src/parts/GraphQlQueryIssues/GraphQlQueryIssues.js +0 -202
  16. package/src/parts/GraphQlQueryMenus/GraphQlQueryMenus.js +0 -77
  17. package/src/parts/GraphQlQueryPathSegment/GraphQlQueryPathSegment.js +0 -57
  18. package/src/parts/GraphQlQueryPathSegments/GraphQlQueryPathSegments.js +0 -59
  19. package/src/parts/GraphQlQueryTaxonomies/GraphQlQueryTaxonomies.js +0 -66
  20. package/src/parts/HandleApiArticle/HandleApiArticle.js +0 -30
  21. package/src/parts/HandleApiArticleByCategoryId/HandleApiArticleByCategoryId.js +0 -93
  22. package/src/parts/HandleApiAuthors/HandleApiAuthors.js +0 -35
  23. package/src/parts/HandleApiCategories/HandleApiCategories.js +0 -35
  24. package/src/parts/HandleApiCollection/HandleApiCollection.js +0 -59
  25. package/src/parts/HandleApiCollections/HandleApiCollections.js +0 -49
  26. package/src/parts/HandleApiDossier/HandleApiDossier.js +0 -104
  27. package/src/parts/HandleApiDossiers/HandleApiDossiers.js +0 -36
  28. package/src/parts/HandleApiIndex/HandleApiIndex.js +0 -24
  29. package/src/parts/HandleApiIssues/HandleApiIssues.js +0 -35
  30. package/src/parts/HandleApiMenus/HandleApiMenus.js +0 -36
  31. package/src/parts/HandleApiPostByName/HandleApiPostByName.js +0 -54
  32. package/src/parts/HandleTaxonomies/HandleTaxonomies.js +0 -33
@@ -1,201 +0,0 @@
1
- export const top = `query CatalogContentsQuery($appInfo: AppInfo!, $deviceInfo: DeviceInfo!, $authorization: Authorization!, $filter: ContentFilter, $sort: [ContentComparator!], $first: Int, $after: String, $includeBundledContent: Boolean!, $includeResources: Boolean!, $includeBlocks: Boolean!, $includeHtml: Boolean!, $includeContentSeoMetadata: Boolean!, $propertyFilter: PropertyFilter) {
2
- catalog(
3
- appInfo: $appInfo
4
- deviceInfo: $deviceInfo
5
- authorization: $authorization
6
- ) {
7
- contentsConnection(filter: $filter, sort: $sort, first: $first, after: $after) {
8
- pageInfo {
9
- hasNextPage
10
- endCursor
11
- }
12
- edges {
13
- content: node {
14
- __typename
15
- ...ContentFragment
16
- ...PostFragment
17
- ...IssueFragment
18
- ...BundleFragment
19
- }
20
- }
21
- }
22
- }
23
- }
24
-
25
- fragment ContentFragment on Content {
26
- __typename
27
- id
28
- version
29
- name
30
- description
31
- index
32
- alias
33
- externalId
34
- publicationDate
35
- unpublishDate
36
- lastModified
37
- access
38
- productId
39
- purchaseData {
40
- purchased
41
- purchasedBy
42
- }
43
- publication {
44
- id
45
- }
46
- properties(filter: $propertyFilter) {
47
- key
48
- value
49
- }
50
- seoMetadata @include(if: $includeContentSeoMetadata) {
51
- key
52
- value
53
- }
54
- thumbnails {
55
- kind
56
- url
57
- properties {
58
- key
59
- value
60
- }
61
- }
62
- categories
63
- tags
64
- }
65
-
66
- fragment PostFragment on Post {
67
- postType
68
- bundleId
69
- bundles {
70
- id
71
- bundleType
72
- }
73
- taxonomies {
74
- ...TaxonomySummaryFragment
75
- }
76
- authors {
77
- name
78
- email
79
- }
80
- bundleId
81
- content @include(if: $includeBlocks) {
82
- ...ContentBlockFragment
83
- }
84
- previewContentBlocks @include(if: $includeBlocks) {
85
- ...ContentBlockFragment
86
- }
87
- contentHtml @include(if: $includeHtml)
88
- previewContentHtml @include(if: $includeHtml)
89
- resources @include(if: $includeResources) {
90
- id
91
- url
92
- type
93
- contentLength
94
- properties {
95
- key
96
- value
97
- type
98
- }
99
- }
100
- }
101
-
102
- fragment ContentBlockFragment on ContentBlock {
103
- id
104
- type
105
- parentId
106
- children
107
- sequence
108
- html
109
- level
110
- properties {
111
- key
112
- value
113
- type
114
- }
115
- }
116
-
117
- fragment BundleFragment on Bundle {
118
- bundleType
119
- taxonomies {
120
- ...TaxonomySummaryFragment
121
- }
122
- authors {
123
- name
124
- email
125
- }
126
- contents @include(if: $includeBundledContent) {
127
- id
128
- content {
129
- ...ContentFragment
130
- ...PostFragment
131
- }
132
- }
133
- }
134
-
135
- fragment IssueFragment on Issue {
136
- contentLength
137
- numberOfPages
138
- previewContentLength
139
- resources @include(if: $includeResources) {
140
- id
141
- url
142
- type
143
- contentLength
144
- properties {
145
- key
146
- value
147
- type
148
- }
149
- }
150
- }
151
-
152
- fragment TaxonomySummaryFragment on Taxonomy {
153
- id
154
- internalId
155
- name
156
- type
157
- parentId
158
- seoMetadata @include(if: $includeContentSeoMetadata) {
159
- key
160
- value
161
- }
162
- properties {
163
- key
164
- value
165
- }
166
- }`;
167
-
168
- export const bottom = {
169
- filter: {
170
- AND: [
171
- {
172
- bundleType: {
173
- value: "DOSSIER",
174
- },
175
- },
176
- ],
177
- },
178
- sort: [],
179
- first: 12,
180
- includeBlocks: false,
181
- includeHtml: false,
182
- includeResources: false,
183
- includeBundledContent: false,
184
- includeContentSeoMetadata: false,
185
- appInfo: {
186
- appId: "",
187
- appVersion: "1.0-SNAPSHOT",
188
- preview: true,
189
- },
190
- deviceInfo: {
191
- deviceId: "editor-preview",
192
- deviceModel: "web",
193
- locale: "de_DE",
194
- smallestScreenWidthDp: 0,
195
- deviceOs: "web",
196
- platform: "WEB",
197
- },
198
- authorization: {
199
- subscriptionCodes: [],
200
- },
201
- };
@@ -1,202 +0,0 @@
1
- export const top = `query CatalogContentsQuery($appInfo: AppInfo!, $deviceInfo: DeviceInfo!, $authorization: Authorization!, $filter: ContentFilter, $sort: [ContentComparator!], $first: Int, $after: String, $includeBundledContent: Boolean!, $includeResources: Boolean!, $includeBlocks: Boolean!, $includeHtml: Boolean!, $includeContentSeoMetadata: Boolean!, $propertyFilter: PropertyFilter) {
2
- catalog(
3
- appInfo: $appInfo
4
- deviceInfo: $deviceInfo
5
- authorization: $authorization
6
- ) {
7
- contentsConnection(filter: $filter, sort: $sort, first: $first, after: $after) {
8
- pageInfo {
9
- hasNextPage
10
- endCursor
11
- }
12
- totalCount
13
- edges {
14
- content: node {
15
- __typename
16
- ...ContentFragment
17
- ...PostFragment
18
- ...IssueFragment
19
- ...BundleFragment
20
- }
21
- }
22
- }
23
- }
24
- }
25
-
26
- fragment ContentFragment on Content {
27
- __typename
28
- id
29
- version
30
- name
31
- description
32
- index
33
- alias
34
- externalId
35
- publicationDate
36
- unpublishDate
37
- lastModified
38
- access
39
- productId
40
- purchaseData {
41
- purchased
42
- purchasedBy
43
- }
44
- publication {
45
- id
46
- }
47
- properties(filter: $propertyFilter) {
48
- key
49
- value
50
- }
51
- seoMetadata @include(if: $includeContentSeoMetadata) {
52
- key
53
- value
54
- }
55
- thumbnails {
56
- kind
57
- url
58
- properties {
59
- key
60
- value
61
- }
62
- }
63
- categories
64
- tags
65
- }
66
-
67
- fragment PostFragment on Post {
68
- postType
69
- bundleId
70
- bundles {
71
- id
72
- bundleType
73
- }
74
- taxonomies {
75
- ...TaxonomySummaryFragment
76
- }
77
- authors {
78
- name
79
- email
80
- }
81
- bundleId
82
- content @include(if: $includeBlocks) {
83
- ...ContentBlockFragment
84
- }
85
- previewContentBlocks @include(if: $includeBlocks) {
86
- ...ContentBlockFragment
87
- }
88
- contentHtml @include(if: $includeHtml)
89
- previewContentHtml @include(if: $includeHtml)
90
- resources @include(if: $includeResources) {
91
- id
92
- url
93
- type
94
- contentLength
95
- properties {
96
- key
97
- value
98
- type
99
- }
100
- }
101
- }
102
-
103
- fragment ContentBlockFragment on ContentBlock {
104
- id
105
- type
106
- parentId
107
- children
108
- sequence
109
- html
110
- level
111
- properties {
112
- key
113
- value
114
- type
115
- }
116
- }
117
-
118
- fragment BundleFragment on Bundle {
119
- bundleType
120
- taxonomies {
121
- ...TaxonomySummaryFragment
122
- }
123
- authors {
124
- name
125
- email
126
- }
127
- contents @include(if: $includeBundledContent) {
128
- id
129
- content {
130
- ...ContentFragment
131
- ...PostFragment
132
- }
133
- }
134
- }
135
-
136
- fragment IssueFragment on Issue {
137
- contentLength
138
- numberOfPages
139
- previewContentLength
140
- resources @include(if: $includeResources) {
141
- id
142
- url
143
- type
144
- contentLength
145
- properties {
146
- key
147
- value
148
- type
149
- }
150
- }
151
- }
152
-
153
- fragment TaxonomySummaryFragment on Taxonomy {
154
- id
155
- internalId
156
- name
157
- type
158
- parentId
159
- seoMetadata @include(if: $includeContentSeoMetadata) {
160
- key
161
- value
162
- }
163
- properties {
164
- key
165
- value
166
- }
167
- }`;
168
-
169
- export const bottom = {
170
- filter: {
171
- AND: [
172
- {
173
- contentType: {
174
- value: "ISSUE",
175
- },
176
- },
177
- {},
178
- ],
179
- },
180
- first: 24,
181
- includeBlocks: false,
182
- includeHtml: false,
183
- includeResources: false,
184
- includeBundledContent: false,
185
- includeContentSeoMetadata: false,
186
- appInfo: {
187
- appId: "",
188
- appVersion: "1.0-SNAPSHOT",
189
- preview: true,
190
- },
191
- deviceInfo: {
192
- deviceId: "editor-preview",
193
- deviceModel: "web",
194
- locale: "de_DE",
195
- smallestScreenWidthDp: 0,
196
- deviceOs: "web",
197
- platform: "WEB",
198
- },
199
- authorization: {
200
- subscriptionCodes: [],
201
- },
202
- };
@@ -1,77 +0,0 @@
1
- export const top = `query MenuQuery($appInfo: AppInfo!, $deviceInfo: DeviceInfo!, $authorization: Authorization!, $filter: MenuFilter, $first: Int, $after: String, $includeItems: Boolean!) {
2
- catalog(
3
- appInfo: $appInfo
4
- deviceInfo: $deviceInfo
5
- authorization: $authorization
6
- ) {
7
- menusConnection(filter: $filter, first: $first, after: $after) {
8
- edges {
9
- node {
10
- id
11
- name
12
- properties {
13
- key
14
- value
15
- type
16
- }
17
- items @include(if: $includeItems) {
18
- id
19
- sortIndex
20
- parentId
21
- url
22
- name
23
- title
24
- description
25
- target
26
- cssClasses
27
- properties {
28
- key
29
- value
30
- type
31
- }
32
- thumbnails {
33
- kind
34
- url
35
- properties {
36
- key
37
- value
38
- }
39
- }
40
- }
41
- }
42
- }
43
- pageInfo {
44
- hasNextPage
45
- endCursor
46
- }
47
- }
48
- }
49
- }`;
50
-
51
- export const bottom = {
52
- filter: {
53
- name: {
54
- value: "",
55
- },
56
- },
57
- first: 24,
58
- includeItems: true,
59
- appInfo: {
60
- appId: "",
61
- appVersion: "1.0-SNAPSHOT",
62
- preview: true,
63
- },
64
- deviceInfo: {
65
- deviceId: "editor-preview",
66
- deviceModel: "web",
67
- locale: "de_DE",
68
- smallestScreenWidthDp: 0,
69
- deviceOs: "web",
70
- platform: "WEB",
71
- },
72
- authorization: {
73
- subscriptionCodes: [],
74
- },
75
- };
76
-
77
- export const queryName = "MenuQuery";
@@ -1,57 +0,0 @@
1
- export const top1 = `query LookupPathSegmentsQuery($appInfo: AppInfo!, $deviceInfo: DeviceInfo!, $authorization: Authorization!, $pathSegments: [String!]!) {
2
- catalog(
3
- appInfo: $appInfo
4
- deviceInfo: $deviceInfo
5
- authorization: $authorization
6
- ) {
7
- lookupPathSegments(pathSegments: $pathSegments) {
8
- identifier
9
- matches {
10
- __typename
11
- ... on ContentMatch {
12
- id
13
- contentType
14
- postType
15
- }
16
- ... on TaxonomyMatch {
17
- id
18
- identifier
19
- parentIdentifier
20
- name
21
- taxonomyType
22
- }
23
- ... on CollectionMatch {
24
- id
25
- name
26
- }
27
- ... on RedirectMatch {
28
- id
29
- identifier
30
- redirectType
31
- target
32
- statusCode
33
- }
34
- }
35
- }
36
- }
37
- }`;
38
-
39
- export const bottom1 = {
40
- pathSegments: [],
41
- appInfo: {
42
- appId: "",
43
- appVersion: "1.0-SNAPSHOT",
44
- preview: true,
45
- },
46
- deviceInfo: {
47
- deviceId: "editor-preview",
48
- deviceModel: "web",
49
- locale: "de_DE",
50
- smallestScreenWidthDp: 0,
51
- deviceOs: "web",
52
- platform: "WEB",
53
- },
54
- authorization: {
55
- subscriptionCodes: [],
56
- },
57
- };
@@ -1,59 +0,0 @@
1
- export const top = `query LookupPathSegmentsQuery($appInfo: AppInfo!, $deviceInfo: DeviceInfo!, $authorization: Authorization!, $pathSegments: [String!]!) {
2
- catalog(
3
- appInfo: $appInfo
4
- deviceInfo: $deviceInfo
5
- authorization: $authorization
6
- ) {
7
- lookupPathSegments(pathSegments: $pathSegments) {
8
- identifier
9
- matches {
10
- __typename
11
- ... on ContentMatch {
12
- id
13
- contentType
14
- postType
15
- }
16
- ... on TaxonomyMatch {
17
- id
18
- identifier
19
- parentIdentifier
20
- name
21
- taxonomyType
22
- }
23
- ... on CollectionMatch {
24
- id
25
- name
26
- }
27
- ... on RedirectMatch {
28
- id
29
- identifier
30
- redirectType
31
- target
32
- statusCode
33
- }
34
- }
35
- }
36
- }
37
- }`;
38
-
39
- export const bottom = {
40
- pathSegments: [],
41
- appInfo: {
42
- appId: "",
43
- appVersion: "1.0-SNAPSHOT",
44
- preview: true,
45
- },
46
- deviceInfo: {
47
- deviceId: "editor-preview",
48
- deviceModel: "web",
49
- locale: "de_DE",
50
- smallestScreenWidthDp: 0,
51
- deviceOs: "web",
52
- platform: "WEB",
53
- },
54
- authorization: {
55
- subscriptionCodes: [],
56
- },
57
- };
58
-
59
- export const queryName = "LookupPathSegmentsQuery";
@@ -1,66 +0,0 @@
1
- export const top = `query CatalogContentsQuery($appInfo: AppInfo!, $deviceInfo: DeviceInfo!, $authorization: Authorization!, $first: Int, $after: String, ) {
2
- catalog(
3
- appInfo: $appInfo
4
- deviceInfo: $deviceInfo
5
- authorization: $authorization
6
- ) {
7
- taxonomiesConnection(first: $first, after: $after, filter:{type:{
8
- value:"category"
9
- }}) {
10
- pageInfo {
11
- hasNextPage
12
- __typename
13
- }
14
- totalCount
15
- edges {
16
- cursor
17
- node {
18
- name
19
- properties {
20
- key
21
- value
22
- }
23
- thumbnails {
24
- properties {
25
- key
26
- value
27
- }
28
- }
29
-
30
- __typename
31
- }
32
- __typename
33
- }
34
- __typename
35
- }
36
- __typename
37
- }
38
- }`;
39
-
40
- export const bottom = {
41
- appInfo: {
42
- appId: "",
43
- appVersion: "1.0-SNAPSHOT",
44
- preview: true,
45
- },
46
- deviceInfo: {
47
- deviceId: "editor-preview",
48
- deviceModel: "web",
49
- locale: "de_DE",
50
- deviceOs: "web",
51
- platform: "WEB",
52
- },
53
- comparators: [
54
- {
55
- publicationDate: {
56
- direction: "DESC",
57
- },
58
- },
59
- ],
60
- first: 99999,
61
- includeBlocks: false,
62
- includeHtml: false,
63
- includeResources: false,
64
- includeBundledContent: false,
65
- authorization: {},
66
- };
@@ -1,30 +0,0 @@
1
- import * as GetPostIds from "../GetPostIds/GetPostIds.js";
2
- import * as HandleApiPostByName from "../HandleApiPostByName/HandleApiPostByName.js";
3
- import * as HandleApiArticleByCategoryId from "../HandleApiArticleByCategoryId/HandleApiArticleByCategoryId.js";
4
-
5
- export const handleApiArticle =
6
- ({ appId, apiUrl }) =>
7
- async (req, res, next) => {
8
- const articleSlug = req.url.slice("/articles/".length);
9
- const url = new URL(req.url, "https://example.com");
10
- const categoryId = url.searchParams.get("categoryId");
11
- if (categoryId) {
12
- return HandleApiArticleByCategoryId.handleApiArticleByCategoryId({
13
- apiUrl,
14
- appId,
15
- categoryId,
16
- res,
17
- });
18
- }
19
- const postIds = await GetPostIds.getPostIds({
20
- appId,
21
- apiUrl,
22
- slug: articleSlug,
23
- });
24
- return HandleApiPostByName.handleApiPostByName({
25
- apiUrl,
26
- appId,
27
- postIds,
28
- res,
29
- });
30
- };