@telia-ace/widget-id-hub 1.1.120-rc.4 → 1.1.120-rc.5

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 (3) hide show
  1. package/index.js +1 -1
  2. package/index.mjs +1 -1
  3. package/package.json +2 -2
package/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  "agentId": "ACEWIDGET",
6
6
  "userName": "ACEWIDGET"
7
7
  }
8
- }`,method:"POST"})).json();return console.log("\x1B[31mID-Hub \x1B[32m - Initializing result",t),this.tunnistusUrl=t.tunnistusURL,this.orderRef=t.orderRef,this.tunnistusUrl}catch{return}}async collectPolling(){let e=this.maxRetries,t;do await new Promise(s=>setTimeout(s,5e3)),t=await this.collect(),e--;while(t.status=="pending"&&e>0);return t}async collect(){if(this.orderRef==="")throw new Error("OrderRef is missing");const t=await(await fetch(this.url+"/collect",{headers:{accept:"application/json","accept-language":"sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7","content-type":"application/json"},body:`{
8
+ }`,method:"POST"})).json();return console.log("\x1B[31mID-Hub \x1B[32m - Initializing result",t),this.tunnistusUrl=t.tunnistusURL,this.orderRef=t.orderRef,this.tunnistusUrl}catch{return}}async collectPolling(){let e=this.maxRetries,t;do await new Promise(s=>setTimeout(s,1e3)),t=await this.collect(),e--;while(t.status=="pending"&&e>0);return t}async collect(){if(this.orderRef==="")throw new Error("OrderRef is missing");const t=await(await fetch(this.url+"/collect",{headers:{accept:"application/json","accept-language":"sv-SE,sv;q=0.9,en-US;q=0.8,en;q=0.7","content-type":"application/json"},body:`{
9
9
  "clientName": "idhub-web-1.0.0",
10
10
  "orderRef": "${this.orderRef}",
11
11
  "method": "auth"
package/index.mjs CHANGED
@@ -29,7 +29,7 @@ class n {
29
29
  async collectPolling() {
30
30
  let e = this.maxRetries, t;
31
31
  do
32
- await new Promise((s) => setTimeout(s, 5e3)), t = await this.collect(), e--;
32
+ await new Promise((s) => setTimeout(s, 1e3)), t = await this.collect(), e--;
33
33
  while (t.status == "pending" && e > 0);
34
34
  return t;
35
35
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-id-hub",
3
- "version": "1.1.120-rc.4",
3
+ "version": "1.1.120-rc.5",
4
4
  "dependencies": {
5
- "@telia-ace/widget-core-flamingo": "1.1.120-rc.4"
5
+ "@telia-ace/widget-core-flamingo": "1.1.120-rc.5"
6
6
  },
7
7
  "main": "./index.js",
8
8
  "module": "./index.mjs",