@telia-ace/alliance-portal 1.0.5-next.1 → 1.0.5-next.3
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/CHANGELOG.md +128 -115
- package/LICENSE.txt +8 -8
- package/README.md +3 -3
- package/dist/app.controller.js +195 -143
- package/dist/graphql/generated.js +2 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,115 +1,128 @@
|
|
|
1
|
-
# @telia-ace/alliance-portal
|
|
2
|
-
|
|
3
|
-
## 1.0.5-next.
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
- 69d2ced: Update all dependencies to latest.
|
|
97
|
-
|
|
98
|
-
## 1.0.1-next.
|
|
99
|
-
|
|
100
|
-
### Patch Changes
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
## 1.0.1-next.
|
|
105
|
-
|
|
106
|
-
### Patch Changes
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
## 1.0.1-next.
|
|
112
|
-
|
|
113
|
-
### Patch Changes
|
|
114
|
-
|
|
115
|
-
-
|
|
1
|
+
# @telia-ace/alliance-portal
|
|
2
|
+
|
|
3
|
+
## 1.0.5-next.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7a0e643: Show 401 unauthorized page for users without access to the workspace.
|
|
8
|
+
|
|
9
|
+
## 1.0.5-next.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [9c6dc92]
|
|
14
|
+
- @telia-ace/alliance-internal-node-utilities@1.0.2-next.1
|
|
15
|
+
|
|
16
|
+
## 1.0.5-next.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 59f0d3f: Remove unnecessary scripts.
|
|
21
|
+
- Updated dependencies [59f0d3f]
|
|
22
|
+
- @telia-ace/alliance-internal-node-utilities@1.0.2-next.0
|
|
23
|
+
|
|
24
|
+
## 1.0.5-next.0
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- 8763155: Update all dependencies to latest.
|
|
29
|
+
|
|
30
|
+
## 1.0.4
|
|
31
|
+
|
|
32
|
+
### Patch Changes
|
|
33
|
+
|
|
34
|
+
- 511ba31: Implement exception handling with error codes linking to [SDK error code wiki on GitHub](https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes) (https://github.com/telia-company/ace-alliance-sdk/issues/24).
|
|
35
|
+
- 236e315: Add cookie policy document route.
|
|
36
|
+
- 511ba31: Add trace logs.
|
|
37
|
+
- 511ba31: Use PinoJS to handle logging, add support for `SERVICE_LOG_LEVEL` environment variable (https://github.com/telia-company/ace-alliance-sdk/issues/24).
|
|
38
|
+
- Updated dependencies [fd378fe]
|
|
39
|
+
- @telia-ace/alliance-internal-node-utilities@1.0.1
|
|
40
|
+
|
|
41
|
+
## 1.0.4-next.2
|
|
42
|
+
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [fd378fe]
|
|
46
|
+
- @telia-ace/alliance-internal-node-utilities@1.0.1-next.0
|
|
47
|
+
|
|
48
|
+
## 1.0.4-next.1
|
|
49
|
+
|
|
50
|
+
### Patch Changes
|
|
51
|
+
|
|
52
|
+
- 511ba31: Implement exception handling with error codes linking to [SDK error code wiki on GitHub](https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes) (https://github.com/telia-company/ace-alliance-sdk/issues/24).
|
|
53
|
+
- 511ba31: Add trace logs.
|
|
54
|
+
- 511ba31: Use PinoJS to handle logging, add support for `SERVICE_LOG_LEVEL` environment variable (https://github.com/telia-company/ace-alliance-sdk/issues/24).
|
|
55
|
+
|
|
56
|
+
## 1.0.4-next.0
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- 236e315: Add cookie policy document route.
|
|
61
|
+
|
|
62
|
+
## 1.0.3
|
|
63
|
+
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- a327e4e: Replace Passport.js with `express-openid-connect`.
|
|
67
|
+
|
|
68
|
+
## 1.0.3-next.0
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- a327e4e: Replace Passport.js with `express-openid-connect`.
|
|
73
|
+
|
|
74
|
+
## 1.0.2
|
|
75
|
+
|
|
76
|
+
### Patch Changes
|
|
77
|
+
|
|
78
|
+
- 1ea5886: Sync the Alliance JWT content with its .NET counterpart.
|
|
79
|
+
|
|
80
|
+
## 1.0.2-next.0
|
|
81
|
+
|
|
82
|
+
### Patch Changes
|
|
83
|
+
|
|
84
|
+
- 2452588: Sync the Alliance JWT content with its .NET counterpart.
|
|
85
|
+
|
|
86
|
+
## 1.0.1
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- 0397918: Regenerate GraphQL TypeScript.
|
|
91
|
+
- 1569c8b: Support `WEBPROVISIONS_DISTRIBUTION_URL` configuration value.
|
|
92
|
+
- c89a20d: Add loader to portal HTML.
|
|
93
|
+
- 1569c8b: Use enums for configuration.
|
|
94
|
+
- 69d2ced: Create new users in database after logging in.
|
|
95
|
+
- 51a6f19: Add `@telia-ace/alliance-portal` package.
|
|
96
|
+
- 69d2ced: Update all dependencies to latest.
|
|
97
|
+
|
|
98
|
+
## 1.0.1-next.4
|
|
99
|
+
|
|
100
|
+
### Patch Changes
|
|
101
|
+
|
|
102
|
+
- 0397918: Regenerate GraphQL TypeScript.
|
|
103
|
+
|
|
104
|
+
## 1.0.1-next.3
|
|
105
|
+
|
|
106
|
+
### Patch Changes
|
|
107
|
+
|
|
108
|
+
- 69d2ced: Create new users in database after logging in.
|
|
109
|
+
- 69d2ced: Update all dependencies to latest.
|
|
110
|
+
|
|
111
|
+
## 1.0.1-next.2
|
|
112
|
+
|
|
113
|
+
### Patch Changes
|
|
114
|
+
|
|
115
|
+
- c89a20d: Add loader to portal HTML.
|
|
116
|
+
|
|
117
|
+
## 1.0.1-next.1
|
|
118
|
+
|
|
119
|
+
### Patch Changes
|
|
120
|
+
|
|
121
|
+
- 1569c8b: Support `WEBPROVISIONS_DISTRIBUTION_URL` configuration value.
|
|
122
|
+
- 1569c8b: Use enums for configuration.
|
|
123
|
+
|
|
124
|
+
## 1.0.1-next.0
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- 51a6f19: Add `@telia-ace/alliance-portal` package.
|
package/LICENSE.txt
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(c) Copyright Telia Company AB 2023
|
|
2
|
-
|
|
3
|
-
This software may be used and/or copied only with the written
|
|
4
|
-
permission from Telia Company AB, or in accordance with
|
|
5
|
-
the terms and conditions stipulated in the agreement/contract
|
|
6
|
-
under which the software has been supplied.
|
|
7
|
-
All rights reserved.
|
|
8
|
-
|
|
1
|
+
(c) Copyright Telia Company AB 2023
|
|
2
|
+
|
|
3
|
+
This software may be used and/or copied only with the written
|
|
4
|
+
permission from Telia Company AB, or in accordance with
|
|
5
|
+
the terms and conditions stipulated in the agreement/contract
|
|
6
|
+
under which the software has been supplied.
|
|
7
|
+
All rights reserved.
|
|
8
|
+
|
|
9
9
|
Software packages under the scopes @telia-ace, @webprovisions and @webprovisions-registry are also subjected to the above statement.
|
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# ACE Alliance portal
|
|
2
|
-
|
|
3
|
-
ACE Alliance portal.
|
|
1
|
+
# ACE Alliance portal
|
|
2
|
+
|
|
3
|
+
ACE Alliance portal.
|
package/dist/app.controller.js
CHANGED
|
@@ -17,7 +17,9 @@ const axios_1 = require("@nestjs/axios");
|
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
18
|
const config_1 = require("@nestjs/config");
|
|
19
19
|
const alliance_internal_node_utilities_1 = require("@telia-ace/alliance-internal-node-utilities");
|
|
20
|
+
const graphql_request_1 = require("graphql-request");
|
|
20
21
|
const config_2 = require("./config");
|
|
22
|
+
const graphql_1 = require("./graphql");
|
|
21
23
|
let AppController = exports.AppController = class AppController {
|
|
22
24
|
logger;
|
|
23
25
|
configService;
|
|
@@ -36,7 +38,19 @@ let AppController = exports.AppController = class AppController {
|
|
|
36
38
|
const { data } = await this.httpService.axiosRef.get(policyUrl);
|
|
37
39
|
return data;
|
|
38
40
|
}
|
|
39
|
-
index(req) {
|
|
41
|
+
async index(req, workspaceSlug) {
|
|
42
|
+
let userHasAccess = false;
|
|
43
|
+
try {
|
|
44
|
+
const objectId = req.oidc.user.sub;
|
|
45
|
+
const { user } = await (0, graphql_request_1.request)(this.configService.getOrThrow(alliance_internal_node_utilities_1.SharedConfigKeys.DbEndpoint), graphql_1.GetUserDocument, { objectId, workspaceSlug }, {
|
|
46
|
+
authorization: (0, alliance_internal_node_utilities_1.createSystemUserToken)(this.configService),
|
|
47
|
+
});
|
|
48
|
+
userHasAccess = !!user.id;
|
|
49
|
+
}
|
|
50
|
+
catch { }
|
|
51
|
+
if (!userHasAccess) {
|
|
52
|
+
return htmlTemplate(unauthorizedPortalBody());
|
|
53
|
+
}
|
|
40
54
|
const distributionOptions = {};
|
|
41
55
|
const distributionUrl = this.configService.getOrThrow(config_2.ConfigKeys.WebprovisionsDistributionUrl);
|
|
42
56
|
if (!req.query['wp-tag'] && !req.query['wp-version']) {
|
|
@@ -48,7 +62,7 @@ let AppController = exports.AppController = class AppController {
|
|
|
48
62
|
distributionOptions,
|
|
49
63
|
distributionUrl,
|
|
50
64
|
});
|
|
51
|
-
return htmlTemplate(distributionUrl, distributionOptions);
|
|
65
|
+
return htmlTemplate(portalBody(distributionUrl, distributionOptions));
|
|
52
66
|
}
|
|
53
67
|
};
|
|
54
68
|
__decorate([
|
|
@@ -72,9 +86,10 @@ __decorate([
|
|
|
72
86
|
__decorate([
|
|
73
87
|
(0, common_1.Get)(['/:workspace', '/:workspace/*']),
|
|
74
88
|
__param(0, (0, common_1.Req)()),
|
|
89
|
+
__param(1, (0, common_1.Param)('workspace')),
|
|
75
90
|
__metadata("design:type", Function),
|
|
76
|
-
__metadata("design:paramtypes", [Object]),
|
|
77
|
-
__metadata("design:returntype",
|
|
91
|
+
__metadata("design:paramtypes", [Object, String]),
|
|
92
|
+
__metadata("design:returntype", Promise)
|
|
78
93
|
], AppController.prototype, "index", null);
|
|
79
94
|
exports.AppController = AppController = __decorate([
|
|
80
95
|
(0, common_1.Controller)(),
|
|
@@ -83,145 +98,182 @@ exports.AppController = AppController = __decorate([
|
|
|
83
98
|
axios_1.HttpService])
|
|
84
99
|
], AppController);
|
|
85
100
|
// Taken from https://loading.io/css
|
|
86
|
-
const loader = `
|
|
87
|
-
<style>
|
|
88
|
-
.alliance-portal-loader-wrapper {
|
|
89
|
-
position: fixed;
|
|
90
|
-
inset: 0;
|
|
91
|
-
display: flex;
|
|
92
|
-
justify-content: center;
|
|
93
|
-
align-items: center;
|
|
94
|
-
}
|
|
95
|
-
.alliance-portal-loader {
|
|
96
|
-
display: inline-block;
|
|
97
|
-
position: relative;
|
|
98
|
-
width: 80px;
|
|
99
|
-
height: 80px;
|
|
100
|
-
}
|
|
101
|
-
.alliance-portal-loader div {
|
|
102
|
-
animation: alliance-portal-loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
103
|
-
transform-origin: 40px 40px;
|
|
104
|
-
}
|
|
105
|
-
.alliance-portal-loader div:after {
|
|
106
|
-
content: ' ';
|
|
107
|
-
display: block;
|
|
108
|
-
position: absolute;
|
|
109
|
-
width: 7px;
|
|
110
|
-
height: 7px;
|
|
111
|
-
border-radius: 50%;
|
|
112
|
-
background: #29003e;
|
|
113
|
-
margin: -4px 0 0 -4px;
|
|
114
|
-
}
|
|
115
|
-
.alliance-portal-loader div:nth-child(1) {
|
|
116
|
-
animation-delay: -0.036s;
|
|
117
|
-
}
|
|
118
|
-
.alliance-portal-loader div:nth-child(1):after {
|
|
119
|
-
top: 63px;
|
|
120
|
-
left: 63px;
|
|
121
|
-
}
|
|
122
|
-
.alliance-portal-loader div:nth-child(2) {
|
|
123
|
-
animation-delay: -0.072s;
|
|
124
|
-
}
|
|
125
|
-
.alliance-portal-loader div:nth-child(2):after {
|
|
126
|
-
top: 68px;
|
|
127
|
-
left: 56px;
|
|
128
|
-
}
|
|
129
|
-
.alliance-portal-loader div:nth-child(3) {
|
|
130
|
-
animation-delay: -0.108s;
|
|
131
|
-
}
|
|
132
|
-
.alliance-portal-loader div:nth-child(3):after {
|
|
133
|
-
top: 71px;
|
|
134
|
-
left: 48px;
|
|
135
|
-
}
|
|
136
|
-
.alliance-portal-loader div:nth-child(4) {
|
|
137
|
-
animation-delay: -0.144s;
|
|
138
|
-
}
|
|
139
|
-
.alliance-portal-loader div:nth-child(4):after {
|
|
140
|
-
top: 72px;
|
|
141
|
-
left: 40px;
|
|
142
|
-
}
|
|
143
|
-
.alliance-portal-loader div:nth-child(5) {
|
|
144
|
-
animation-delay: -0.18s;
|
|
145
|
-
}
|
|
146
|
-
.alliance-portal-loader div:nth-child(5):after {
|
|
147
|
-
top: 71px;
|
|
148
|
-
left: 32px;
|
|
149
|
-
}
|
|
150
|
-
.alliance-portal-loader div:nth-child(6) {
|
|
151
|
-
animation-delay: -0.216s;
|
|
152
|
-
}
|
|
153
|
-
.alliance-portal-loader div:nth-child(6):after {
|
|
154
|
-
top: 68px;
|
|
155
|
-
left: 24px;
|
|
156
|
-
}
|
|
157
|
-
.alliance-portal-loader div:nth-child(7) {
|
|
158
|
-
animation-delay: -0.252s;
|
|
159
|
-
}
|
|
160
|
-
.alliance-portal-loader div:nth-child(7):after {
|
|
161
|
-
top: 63px;
|
|
162
|
-
left: 17px;
|
|
163
|
-
}
|
|
164
|
-
.alliance-portal-loader div:nth-child(8) {
|
|
165
|
-
animation-delay: -0.288s;
|
|
166
|
-
}
|
|
167
|
-
.alliance-portal-loader div:nth-child(8):after {
|
|
168
|
-
top: 56px;
|
|
169
|
-
left: 12px;
|
|
170
|
-
}
|
|
171
|
-
@keyframes alliance-portal-loader {
|
|
172
|
-
0% {
|
|
173
|
-
transform: rotate(0deg);
|
|
174
|
-
}
|
|
175
|
-
100% {
|
|
176
|
-
transform: rotate(360deg);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
</style>
|
|
180
|
-
<div class="alliance-portal-loader-wrapper">
|
|
181
|
-
<div class="alliance-portal-loader">
|
|
182
|
-
<div></div>
|
|
183
|
-
<div></div>
|
|
184
|
-
<div></div>
|
|
185
|
-
<div></div>
|
|
186
|
-
<div></div>
|
|
187
|
-
<div></div>
|
|
188
|
-
<div></div>
|
|
189
|
-
<div></div>
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
101
|
+
const loader = `
|
|
102
|
+
<style>
|
|
103
|
+
.alliance-portal-loader-wrapper {
|
|
104
|
+
position: fixed;
|
|
105
|
+
inset: 0;
|
|
106
|
+
display: flex;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
align-items: center;
|
|
109
|
+
}
|
|
110
|
+
.alliance-portal-loader {
|
|
111
|
+
display: inline-block;
|
|
112
|
+
position: relative;
|
|
113
|
+
width: 80px;
|
|
114
|
+
height: 80px;
|
|
115
|
+
}
|
|
116
|
+
.alliance-portal-loader div {
|
|
117
|
+
animation: alliance-portal-loader 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
|
|
118
|
+
transform-origin: 40px 40px;
|
|
119
|
+
}
|
|
120
|
+
.alliance-portal-loader div:after {
|
|
121
|
+
content: ' ';
|
|
122
|
+
display: block;
|
|
123
|
+
position: absolute;
|
|
124
|
+
width: 7px;
|
|
125
|
+
height: 7px;
|
|
126
|
+
border-radius: 50%;
|
|
127
|
+
background: #29003e;
|
|
128
|
+
margin: -4px 0 0 -4px;
|
|
129
|
+
}
|
|
130
|
+
.alliance-portal-loader div:nth-child(1) {
|
|
131
|
+
animation-delay: -0.036s;
|
|
132
|
+
}
|
|
133
|
+
.alliance-portal-loader div:nth-child(1):after {
|
|
134
|
+
top: 63px;
|
|
135
|
+
left: 63px;
|
|
136
|
+
}
|
|
137
|
+
.alliance-portal-loader div:nth-child(2) {
|
|
138
|
+
animation-delay: -0.072s;
|
|
139
|
+
}
|
|
140
|
+
.alliance-portal-loader div:nth-child(2):after {
|
|
141
|
+
top: 68px;
|
|
142
|
+
left: 56px;
|
|
143
|
+
}
|
|
144
|
+
.alliance-portal-loader div:nth-child(3) {
|
|
145
|
+
animation-delay: -0.108s;
|
|
146
|
+
}
|
|
147
|
+
.alliance-portal-loader div:nth-child(3):after {
|
|
148
|
+
top: 71px;
|
|
149
|
+
left: 48px;
|
|
150
|
+
}
|
|
151
|
+
.alliance-portal-loader div:nth-child(4) {
|
|
152
|
+
animation-delay: -0.144s;
|
|
153
|
+
}
|
|
154
|
+
.alliance-portal-loader div:nth-child(4):after {
|
|
155
|
+
top: 72px;
|
|
156
|
+
left: 40px;
|
|
157
|
+
}
|
|
158
|
+
.alliance-portal-loader div:nth-child(5) {
|
|
159
|
+
animation-delay: -0.18s;
|
|
160
|
+
}
|
|
161
|
+
.alliance-portal-loader div:nth-child(5):after {
|
|
162
|
+
top: 71px;
|
|
163
|
+
left: 32px;
|
|
164
|
+
}
|
|
165
|
+
.alliance-portal-loader div:nth-child(6) {
|
|
166
|
+
animation-delay: -0.216s;
|
|
167
|
+
}
|
|
168
|
+
.alliance-portal-loader div:nth-child(6):after {
|
|
169
|
+
top: 68px;
|
|
170
|
+
left: 24px;
|
|
171
|
+
}
|
|
172
|
+
.alliance-portal-loader div:nth-child(7) {
|
|
173
|
+
animation-delay: -0.252s;
|
|
174
|
+
}
|
|
175
|
+
.alliance-portal-loader div:nth-child(7):after {
|
|
176
|
+
top: 63px;
|
|
177
|
+
left: 17px;
|
|
178
|
+
}
|
|
179
|
+
.alliance-portal-loader div:nth-child(8) {
|
|
180
|
+
animation-delay: -0.288s;
|
|
181
|
+
}
|
|
182
|
+
.alliance-portal-loader div:nth-child(8):after {
|
|
183
|
+
top: 56px;
|
|
184
|
+
left: 12px;
|
|
185
|
+
}
|
|
186
|
+
@keyframes alliance-portal-loader {
|
|
187
|
+
0% {
|
|
188
|
+
transform: rotate(0deg);
|
|
189
|
+
}
|
|
190
|
+
100% {
|
|
191
|
+
transform: rotate(360deg);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
</style>
|
|
195
|
+
<div class="alliance-portal-loader-wrapper">
|
|
196
|
+
<div class="alliance-portal-loader">
|
|
197
|
+
<div></div>
|
|
198
|
+
<div></div>
|
|
199
|
+
<div></div>
|
|
200
|
+
<div></div>
|
|
201
|
+
<div></div>
|
|
202
|
+
<div></div>
|
|
203
|
+
<div></div>
|
|
204
|
+
<div></div>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
192
207
|
`;
|
|
193
|
-
function
|
|
194
|
-
return `
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
208
|
+
function portalBody(distributionUrl, distributionOpts) {
|
|
209
|
+
return `
|
|
210
|
+
<script>
|
|
211
|
+
/* WEBPROVISIONS */
|
|
212
|
+
!function(e,n){var o=n||{},c=document,t=window,s=function(n,o){e+=(e.indexOf("?")>-1?"&":"?")+encodeURIComponent(n)+"="
|
|
213
|
+
+encodeURIComponent(o)},i=/[?&]{1}(wp[^=]*)=([^&#]*)/g,r=c.getElementsByTagName("script")[0],p=c.createElement("script");p.type="module";e=e+"/index.js";
|
|
214
|
+
for(t.webprovisions=t.webprovisions||{_c:[],configure:function(){t.webprovisions._c.push(arguments)}};matches=i.exec(t.location.search);)
|
|
215
|
+
s(matches[1],matches[2]);Object.keys(o).forEach((function(e){s("wp-"+e,o[e])})),p.async=!0,p.src=e,r.parentNode.insertBefore(p,r)}
|
|
216
|
+
/**
|
|
217
|
+
* Configure the implementation by specifying a remote endpoint with optional arguments.
|
|
218
|
+
* url - The url to the remote endpoint for the implementation.
|
|
219
|
+
* args - Object containing optional arguments for the implementation.
|
|
220
|
+
*/
|
|
221
|
+
("${distributionUrl}", ${JSON.stringify(distributionOpts)})
|
|
222
|
+
</script>
|
|
223
|
+
|
|
224
|
+
${loader}
|
|
225
|
+
`;
|
|
226
|
+
}
|
|
227
|
+
function unauthorizedPortalBody() {
|
|
228
|
+
return `
|
|
229
|
+
<div class="unauthorized">
|
|
230
|
+
<h1>401</h1>
|
|
231
|
+
<p>Your user does access to this workspace</p>
|
|
232
|
+
</div>
|
|
233
|
+
<style>
|
|
234
|
+
@import 'https://cdn.voca.teliacompany.com/fonts/TeliaSansV10/TeliaSans.css';
|
|
235
|
+
.unauthorized {
|
|
236
|
+
position: absolute;
|
|
237
|
+
inset: 0;
|
|
238
|
+
display: flex;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
gap: 1em;
|
|
241
|
+
justify-content: center;
|
|
242
|
+
align-items: center;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
h1 {
|
|
246
|
+
font-family: TeliaSansHeading, TeliaSans, HelveticaNeue, Helvetica, Arial, sans-serif;
|
|
247
|
+
color: #e4175c;
|
|
248
|
+
font-size: 4em;
|
|
249
|
+
margin: 0;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
p {
|
|
253
|
+
font-family: TeliaSans, Helvetica, Arial, Lucida Grande, sans-serif;
|
|
254
|
+
font-size: 2em;
|
|
255
|
+
margin: 0;
|
|
256
|
+
}
|
|
257
|
+
</style>
|
|
258
|
+
`;
|
|
259
|
+
}
|
|
260
|
+
function htmlTemplate(body) {
|
|
261
|
+
return `
|
|
262
|
+
<!DOCTYPE html>
|
|
263
|
+
<html lang="en">
|
|
264
|
+
|
|
265
|
+
<head>
|
|
266
|
+
<meta charset="UTF-8" />
|
|
267
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
268
|
+
<title>Alliance Portal</title>
|
|
269
|
+
<link rel="icon"
|
|
270
|
+
href="data:image/png;base64,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" />
|
|
271
|
+
</head>
|
|
272
|
+
|
|
273
|
+
<body>
|
|
274
|
+
${body}
|
|
275
|
+
</body>
|
|
276
|
+
|
|
277
|
+
</html>
|
|
226
278
|
`;
|
|
227
279
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetOrCreateUserDocument = void 0;
|
|
3
|
+
exports.GetUserDocument = exports.GetOrCreateUserDocument = void 0;
|
|
4
4
|
exports.GetOrCreateUserDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "GetOrCreateUser" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "GetOrCreateUserInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "getOrCreateUser" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "objectId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "displayName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }] } }] } }] };
|
|
5
|
+
exports.GetUserDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetUser" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "objectId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "workspaceSlug" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "user" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "objectId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "objectId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "workspaceSlug" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "workspaceSlug" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }] } }] } }] };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/alliance-portal",
|
|
3
|
-
"version": "1.0.5-next.
|
|
3
|
+
"version": "1.0.5-next.3",
|
|
4
4
|
"description": "ACE Alliance portal",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"@nestjs/config": "^3.0.0",
|
|
20
20
|
"@nestjs/core": "^10.1.0",
|
|
21
21
|
"@nestjs/platform-express": "^10.1.0",
|
|
22
|
-
"@telia-ace/alliance-internal-node-utilities": "1.0.2-next.
|
|
22
|
+
"@telia-ace/alliance-internal-node-utilities": "1.0.2-next.1",
|
|
23
23
|
"express-openid-connect": "^2.16.0",
|
|
24
24
|
"graphql": "^16.7.1",
|
|
25
25
|
"graphql-request": "^6.1.0",
|