Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(@blindnet/bridge): bridge updates #278

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/release-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ jobs:
yarn typecheck
yarn test

- name: Modify Build Directory for Staging
run: |
yarn bundle:production

- name: Deploy to Azure 🚀
uses: Azure/static-web-apps-deploy@v1
with:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:
yarn typecheck
yarn test

- name: Modify Build Directory for Staging
run: |
yarn bundle:staging

- name: Deploy to Azure 🚀
uses: Azure/static-web-apps-deploy@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion demos/dpo/bridge/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h2 class="text-white">Sign In</h2>
const password = document.getElementById('password').value;

return fetch(
'https://blindnet-connector-demo.azurewebsites.net/auth/admin/token',
'https://blindnet-connector-demo-staging.azurewebsites.net/auth/admin/token',
{
method: 'POST',
body: JSON.stringify({
Expand Down
4 changes: 2 additions & 2 deletions demos/dpo/common/js/auth.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const auth0 = new window.Auth0Client({
domain: 'blindnet.eu.auth0.com',
client_id: '1C0uhFCpzvJAkFi4uqoq2oAWSgQicqHc',
audience: 'https://blindnet-connector-demo.azurewebsites.net',
audience: 'https://blindnet-connector-demo-staging.azurewebsites.net',
redirect_uri: `${window.location.origin}/demos/dpo/privacy-portal`,
authorizationParams: {
redirect_uri: `${window.location.origin}/demos/dpo/privacy-portal`,
Expand Down Expand Up @@ -33,7 +33,7 @@ async function renderLoggedInState() {

// Exchange auth0 token for blindnet token from backend
const blindnetToken = await fetch(
'https://blindnet-connector-demo.azurewebsites.net/auth/token',
'https://blindnet-connector-demo-staging.azurewebsites.net/auth/token',
{
method: 'GET',
headers,
Expand Down
2 changes: 1 addition & 1 deletion demos/dpo/privacy-portal/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h2 id="priv-request">Privacy Portal</h2>

<bldn-privacy-portal
id="privacy-portal"
computation-base-url="https://computing.blindnet.io/v0/"
computation-base-url="https://stage.computing.blindnet.io/v0/"
data-categories='["contact", "name", "uid", "other-data"]'
>
<!-- Addon wrapper element -->
Expand Down
2 changes: 1 addition & 1 deletion demos/modules/src/views/addons/BackOffice.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class AppBackOffice extends LitElement {
*/
async getBlindnetAdminToken(username, password) {
return fetch(
'https://blindnet-connector-demo.azurewebsites.net/auth/admin/token',
'https://blindnet-connector-demo-staging.azurewebsites.net/auth/admin/token',
{
method: 'POST',
body: JSON.stringify({
Expand Down
15 changes: 9 additions & 6 deletions demos/modules/src/views/addons/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,13 @@ export class AppParticipateForm extends LitElement {
if (this._files.length === 0) return;
formData.set('proof', this._files[0].file);

await fetch('https://blindnet-connector-demo.azurewebsites.net/form', {
method: 'POST',
body: formData,
});
await fetch(
'https://blindnet-connector-demo-staging.azurewebsites.net/form',
{
method: 'POST',
body: formData,
}
);

this._notificationSuccess.open = true;
}
Expand All @@ -173,7 +176,7 @@ export class AppParticipateForm extends LitElement {
// Authorization: `Bearer ${this._apiToken}`,
};
await fetch(
'https://stage.computing.blindnet.io/v0/user-events/consent/public',
'https://stage.stage.computing.blindnet.io/v0/user-events/consent/public',
{
method: 'POST',
headers,
Expand Down Expand Up @@ -298,7 +301,7 @@ export class AppParticipateForm extends LitElement {
};

return fetch(
'https://blindnet-connector-demo.azurewebsites.net/auth/token',
'https://blindnet-connector-demo-staging.azurewebsites.net/auth/token',
{
method: 'GET',
headers,
Expand Down
2 changes: 1 addition & 1 deletion demos/modules/src/views/addons/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Auth0Client } from '@auth0/auth0-spa-js';
const auth0 = new Auth0Client({
domain: 'blindnet.eu.auth0.com',
client_id: '1C0uhFCpzvJAkFi4uqoq2oAWSgQicqHc',
audience: 'https://blindnet-connector-demo.azurewebsites.net',
audience: 'https://blindnet-connector-demo-staging.azurewebsites.net',
redirect_uri: `${window.location.origin}/demos/modules/addons/privacy`,
authorizationParams: {
redirect_uri: `${window.location.origin}/demos/modules/addons/privacy`,
Expand Down
6 changes: 3 additions & 3 deletions demos/modules/src/views/addons/Privacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const fileUpload = new URL('../../../assets/file-upload.svg', import.meta.url)
const auth0 = new Auth0Client({
domain: 'blindnet.eu.auth0.com',
client_id: '1C0uhFCpzvJAkFi4uqoq2oAWSgQicqHc',
audience: 'https://blindnet-connector-demo.azurewebsites.net',
audience: 'https://blindnet-connector-demo-staging.azurewebsites.net',
redirect_uri: `${window.location.origin}/demos/modules/addons/privacy`,
authorizationParams: {
redirect_uri: `${window.location.origin}/demos/modules/addons/privacy`,
Expand Down Expand Up @@ -85,7 +85,7 @@ export class AppPrivacy extends LitElement {
};

return fetch(
'https://blindnet-connector-demo.azurewebsites.net/auth/token',
'https://blindnet-connector-demo-staging.azurewebsites.net/auth/token',
{
method: 'GET',
headers,
Expand Down Expand Up @@ -155,7 +155,7 @@ export class AppPrivacy extends LitElement {
return html`

<bldn-privacy-portal
computation-base-url="https://computing.blindnet.io/v0/"
computation-base-url="https://stage.computing.blindnet.io/v0/"
data-categories='["contact", "name", "uid", "other-data"]'
api-token=${ifDefined(this._apiToken)}
>
Expand Down
2 changes: 1 addition & 1 deletion demos/modules/src/views/basic/BackOffice.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class AppBackOffice extends LitElement {
*/
async getBlindnetAdminToken(username, password) {
return fetch(
'https://blindnet-connector-demo.azurewebsites.net/auth/admin/token',
'https://blindnet-connector-demo-staging.azurewebsites.net/auth/admin/token',
{
method: 'POST',
body: JSON.stringify({
Expand Down
15 changes: 9 additions & 6 deletions demos/modules/src/views/basic/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,13 @@ export class AppParticipateForm extends LitElement {
if (this._files.length === 0) return;
formData.set('proof', this._files[0].file);

await fetch('https://blindnet-connector-demo.azurewebsites.net/form', {
method: 'POST',
body: formData,
});
await fetch(
'https://blindnet-connector-demo-staging.azurewebsites.net/form',
{
method: 'POST',
body: formData,
}
);

this._notificationSuccess.open = true;
}
Expand All @@ -173,7 +176,7 @@ export class AppParticipateForm extends LitElement {
// Authorization: `Bearer ${this._apiToken}`,
};
await fetch(
'https://stage.computing.blindnet.io/v0/user-events/consent/public',
'https://stage.stage.computing.blindnet.io/v0/user-events/consent/public',
{
method: 'POST',
headers,
Expand Down Expand Up @@ -298,7 +301,7 @@ export class AppParticipateForm extends LitElement {
};

return fetch(
'https://blindnet-connector-demo.azurewebsites.net/auth/token',
'https://blindnet-connector-demo-staging.azurewebsites.net/auth/token',
{
method: 'GET',
headers,
Expand Down
2 changes: 1 addition & 1 deletion demos/modules/src/views/basic/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Auth0Client } from '@auth0/auth0-spa-js';
const auth0 = new Auth0Client({
domain: 'blindnet.eu.auth0.com',
client_id: '1C0uhFCpzvJAkFi4uqoq2oAWSgQicqHc',
audience: 'https://blindnet-connector-demo.azurewebsites.net',
audience: 'https://blindnet-connector-demo-staging.azurewebsites.net',
redirect_uri: `${window.location.origin}/demos/modules/basic/privacy`,
authorizationParams: {
redirect_uri: `${window.location.origin}/demos/modules/basic/privacy`,
Expand Down
6 changes: 3 additions & 3 deletions demos/modules/src/views/basic/Privacy.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import '@blindnet/privacy-portal';
const auth0 = new Auth0Client({
domain: 'blindnet.eu.auth0.com',
client_id: '1C0uhFCpzvJAkFi4uqoq2oAWSgQicqHc',
audience: 'https://blindnet-connector-demo.azurewebsites.net',
audience: 'https://blindnet-connector-demo-staging.azurewebsites.net',
redirect_uri: `${window.location.origin}/demos/modules/basic/privacy`,
authorizationParams: {
redirect_uri: `${window.location.origin}/demos/modules/basic/privacy`,
Expand Down Expand Up @@ -84,7 +84,7 @@ export class AppPrivacy extends LitElement {
};

return fetch(
'https://blindnet-connector-demo.azurewebsites.net/auth/token',
'https://blindnet-connector-demo-staging.azurewebsites.net/auth/token',
{
method: 'GET',
headers,
Expand Down Expand Up @@ -155,7 +155,7 @@ export class AppPrivacy extends LitElement {

return html`
<bldn-privacy-portal
computation-base-url="https://computing.blindnet.io/v0/"
computation-base-url="https://stage.computing.blindnet.io/v0/"
data-categories='["contact", "name", "uid", "other-data"]'
api-token=${ifDefined(this._apiToken)}
>
Expand Down
17 changes: 11 additions & 6 deletions localization/translations/fr-CA.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1050,9 +1050,14 @@
<source>Submit</source>
<target>Envoyer</target>
</trans-unit>
<trans-unit id="s2b7bb3f9a459d7dd">
<source>History view coming soon!</source>
<target>Historique bientôt disponible !</target>
<trans-unit id="sf4a1596b084a80cb">
<source>Show previous 5 events</source>
</trans-unit>
<trans-unit id="s605c649dc507a7e7">
<source>Show next 5 events</source>
</trans-unit>
<trans-unit id="s922272b2380415cd">
<source>No events to display!</source>
</trans-unit>
<trans-unit id="s61d28f3db3da4264">
<source>Response Submmitted</source>
Expand All @@ -1066,9 +1071,9 @@
<source>Data Subject</source>
<target>Personne concernée</target>
</trans-unit>
<trans-unit id="sa442044b586ec8bf">
<source>Action</source>
<target>Action</target>
<trans-unit id="sd2223afb7d6b100d">
<source>Type</source>
<target>Type</target>
</trans-unit>
<trans-unit id="sb852d100f91db23f">
<source>No requests to display.</source>
Expand Down
17 changes: 11 additions & 6 deletions localization/translations/fr-FR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1050,9 +1050,14 @@
<source>Submit</source>
<target>Envoyer</target>
</trans-unit>
<trans-unit id="s2b7bb3f9a459d7dd">
<source>History view coming soon!</source>
<target>Historique bientôt disponible !</target>
<trans-unit id="sf4a1596b084a80cb">
<source>Show previous 5 events</source>
</trans-unit>
<trans-unit id="s605c649dc507a7e7">
<source>Show next 5 events</source>
</trans-unit>
<trans-unit id="s922272b2380415cd">
<source>No events to display!</source>
</trans-unit>
<trans-unit id="s61d28f3db3da4264">
<source>Response Submmitted</source>
Expand All @@ -1066,9 +1071,9 @@
<source>Data Subject</source>
<target>Personne concernée</target>
</trans-unit>
<trans-unit id="sa442044b586ec8bf">
<source>Action</source>
<target>Action</target>
<trans-unit id="sd2223afb7d6b100d">
<source>Type</source>
<target>Type</target>
</trans-unit>
<trans-unit id="sb852d100f91db23f">
<source>No requests to display.</source>
Expand Down
17 changes: 11 additions & 6 deletions localization/translations/fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1050,9 +1050,14 @@
<source>Submit</source>
<target>Envoyer</target>
</trans-unit>
<trans-unit id="s2b7bb3f9a459d7dd">
<source>History view coming soon!</source>
<target>Historique bientôt disponible !</target>
<trans-unit id="sf4a1596b084a80cb">
<source>Show previous 5 events</source>
</trans-unit>
<trans-unit id="s605c649dc507a7e7">
<source>Show next 5 events</source>
</trans-unit>
<trans-unit id="s922272b2380415cd">
<source>No events to display!</source>
</trans-unit>
<trans-unit id="s61d28f3db3da4264">
<source>Response Submmitted</source>
Expand All @@ -1066,9 +1071,9 @@
<source>Data Subject</source>
<target>Personne concernée</target>
</trans-unit>
<trans-unit id="sa442044b586ec8bf">
<source>Action</source>
<target>Action</target>
<trans-unit id="sd2223afb7d6b100d">
<source>Type</source>
<target>Type</target>
</trans-unit>
<trans-unit id="sb852d100f91db23f">
<source>No requests to display.</source>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"ignore-sync": "ignore-sync .",
"bundle:build-demos": "lerna run build --scope \"@blindnet-demos/*\"",
"bundle:copy": "node ./tasks/bundle-copy.js && node ./tasks/copy-azure-settings.js",
"bundle:staging": "node ./tasks/bundle-staging.js",
"bundle:production": "node ./tasks/bundle-production.js",
"bundle": "yarn bundle:build-demos && yarn storybook:build && yarn bundle:copy"
},
"dependencies": {
Expand Down
10 changes: 10 additions & 0 deletions packages/bridge/src/assets/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/bridge/src/assets/consent-given.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/bridge/src/assets/consent-revoked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions packages/bridge/src/assets/expand.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/bridge/src/assets/legal-base.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/bridge/src/assets/request-submitted.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions packages/bridge/src/assets/response-denied.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/bridge/src/assets/response-granted.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading