@pronto-tools-and-more/api 12.35.1

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 (43) hide show
  1. package/package.json +22 -0
  2. package/src/main.js +3 -0
  3. package/src/parts/Callback/Callback.js +1 -0
  4. package/src/parts/Command/Command.js +9 -0
  5. package/src/parts/CommandMap/CommandMap.js +5 -0
  6. package/src/parts/CommandState/CommandState.js +17 -0
  7. package/src/parts/ErrorCodes/ErrorCodes.js +2 -0
  8. package/src/parts/GetPostIds/GetPostIds.js +41 -0
  9. package/src/parts/GraphQlQueryAppSettings/GraphQlQueryAppSettings.js +42 -0
  10. package/src/parts/GraphQlQueryAuthors/GraphQlQueryAuthors.js +66 -0
  11. package/src/parts/GraphQlQueryCategories/GraphQlQueryCategories.js +66 -0
  12. package/src/parts/GraphQlQueryCollection/GraphQlQueryCollection.js +227 -0
  13. package/src/parts/GraphQlQueryCollections/GraphQlQueryCollections.js +227 -0
  14. package/src/parts/GraphQlQueryContent/GraphQlQueryContent.js +198 -0
  15. package/src/parts/GraphQlQueryDossier/GraphQlQueryDossier.js +221 -0
  16. package/src/parts/GraphQlQueryDossiers/GraphQlQueryDossiers.js +201 -0
  17. package/src/parts/GraphQlQueryIssues/GraphQlQueryIssues.js +202 -0
  18. package/src/parts/GraphQlQueryMenus/GraphQlQueryMenus.js +77 -0
  19. package/src/parts/GraphQlQueryPathSegment/GraphQlQueryPathSegment.js +57 -0
  20. package/src/parts/GraphQlQueryPathSegments/GraphQlQueryPathSegments.js +59 -0
  21. package/src/parts/GraphQlQueryTaxonomies/GraphQlQueryTaxonomies.js +66 -0
  22. package/src/parts/HandleApi/HandleApi.js +52 -0
  23. package/src/parts/HandleApiAppSettings/HandleApiAppSettings.js +41 -0
  24. package/src/parts/HandleApiArticle/HandleApiArticle.js +26 -0
  25. package/src/parts/HandleApiArticleByCategoryId/HandleApiArticleByCategoryId.js +97 -0
  26. package/src/parts/HandleApiAuthors/HandleApiAuthors.js +38 -0
  27. package/src/parts/HandleApiCategories/HandleApiCategories.js +38 -0
  28. package/src/parts/HandleApiCollection/HandleApiCollection.js +62 -0
  29. package/src/parts/HandleApiCollections/HandleApiCollections.js +52 -0
  30. package/src/parts/HandleApiDossier/HandleApiDossier.js +109 -0
  31. package/src/parts/HandleApiDossiers/HandleApiDossiers.js +39 -0
  32. package/src/parts/HandleApiIndex/HandleApiIndex.js +30 -0
  33. package/src/parts/HandleApiIssues/HandleApiIssues.js +39 -0
  34. package/src/parts/HandleApiMenus/HandleApiMenus.js +40 -0
  35. package/src/parts/HandleApiPostByName/HandleApiPostByName.js +63 -0
  36. package/src/parts/HandleIpc/HandleIpc.js +10 -0
  37. package/src/parts/HandleMessage/HandleMessage.js +27 -0
  38. package/src/parts/IpcChild/IpcChild.js +15 -0
  39. package/src/parts/IpcChildModule/IpcChildModule.js +25 -0
  40. package/src/parts/IpcChildType/IpcChildType.js +20 -0
  41. package/src/parts/JsonRpc/JsonRpc.js +1 -0
  42. package/src/parts/Listen/Listen.js +8 -0
  43. package/src/parts/Main/Main.js +8 -0
@@ -0,0 +1,201 @@
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
+ };
@@ -0,0 +1,202 @@
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
+ };
@@ -0,0 +1,77 @@
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";
@@ -0,0 +1,57 @@
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
+ };
@@ -0,0 +1,59 @@
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";
@@ -0,0 +1,66 @@
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
+ };
@@ -0,0 +1,52 @@
1
+ import * as HandleApiArticle from "../HandleApiArticle/HandleApiArticle.js";
2
+ import * as HandleApiAuthors from "../HandleApiAuthors/HandleApiAuthors.js";
3
+ import * as HandleCategories from "../HandleApiCategories/HandleApiCategories.js";
4
+ import * as HandleApiCollection from "../HandleApiCollection/HandleApiCollection.js";
5
+ import * as HandleApiCollections from "../HandleApiCollections/HandleApiCollections.js";
6
+ import * as HandleApiDossier from "../HandleApiDossier/HandleApiDossier.js";
7
+ import * as HandleDossiers from "../HandleApiDossiers/HandleApiDossiers.js";
8
+ import * as HandleApiIndex from "../HandleApiIndex/HandleApiIndex.js";
9
+ import * as HandleApiAppSettings from "../HandleApiAppSettings/HandleApiAppSettings.js";
10
+ import * as HandleApiIssues from "../HandleApiIssues/HandleApiIssues.js";
11
+ import * as HandleApiMenus from "../HandleApiMenus/HandleApiMenus.js";
12
+
13
+ export const handleApi = ({ appId, apiUrl, req }) => {
14
+ if (req.url === "/") {
15
+ return HandleApiIndex.handleIndex(req);
16
+ }
17
+ if (req.url === "/appSettings") {
18
+ return HandleApiAppSettings.handleApiAppSettings({ appId, apiUrl, req });
19
+ }
20
+ if (req.url === "/categories") {
21
+ return HandleCategories.handleCategories({ appId, apiUrl, req });
22
+ }
23
+ if (req.url === "/dossiers") {
24
+ return HandleDossiers.handleDossiers({ appId, apiUrl, req });
25
+ }
26
+ if (req.url.startsWith("/dossiers")) {
27
+ return HandleApiDossier.handleDossier({ appId, apiUrl, req });
28
+ }
29
+ if (req.url === "/issues") {
30
+ return HandleApiIssues.handleIssues({ appId, apiUrl, req });
31
+ }
32
+ if (req.url === "/authors") {
33
+ return HandleApiAuthors.handleAuthors({ appId, apiUrl, req });
34
+ }
35
+ if (req.url.startsWith("/articles")) {
36
+ return HandleApiArticle.handleApiArticle({ appId, apiUrl, req });
37
+ }
38
+ if (req.url === "/collections" || req.url === "/collections/") {
39
+ return HandleApiCollections.handleApiCollections({ appId, apiUrl, req });
40
+ }
41
+ if (req.url.startsWith("/collections")) {
42
+ return HandleApiCollection.handleApiCollection({ appId, apiUrl, req });
43
+ }
44
+ if (req.url === "/menus" || req.url === "/menus/") {
45
+ return HandleApiMenus.handleMenus({ apiUrl, appId, req });
46
+ }
47
+ return {
48
+ status: 404,
49
+ headers: {},
50
+ body: "not found",
51
+ };
52
+ };