@ekyc_qoobiss/qbs-ect-cmp 1.2.10 → 1.2.11

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.
@@ -10,6 +10,7 @@ var OrderStatuses;
10
10
  OrderStatuses[OrderStatuses["FinishedCapturing"] = 1] = "FinishedCapturing";
11
11
  OrderStatuses[OrderStatuses["Waiting"] = 2] = "Waiting";
12
12
  OrderStatuses[OrderStatuses["NotFound"] = 3] = "NotFound";
13
+ OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
13
14
  })(OrderStatuses || (OrderStatuses = {}));
14
15
 
15
16
  const appendToMap = (map, propName, value) => {
@@ -336,6 +337,7 @@ class ApiUrls {
336
337
  this.SendLink = this.uriEnv + 'validation/otp/sendlink';
337
338
  this.GetStatus = this.uriEnv + 'validation/identity/status';
338
339
  this.AddLog = this.uriEnv + 'validation/logs/add';
340
+ this.AbortRequest = this.uriEnv + 'validation/identity/abort';
339
341
  }
340
342
  }
341
343
  class MobileRedirectValues extends GlobalValues {
@@ -343,7 +345,8 @@ class MobileRedirectValues extends GlobalValues {
343
345
  MobileRedirectValues.InfoTop = 'Pentru a continua scanați codul de mai jos cu un smartphone.';
344
346
  MobileRedirectValues.InfoBottom = 'Sau introduceți un număr de telefon pentru a primi link-ul pe smartphone.';
345
347
  MobileRedirectValues.Validation = 'Număr de telefon invalid!';
346
- MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
348
+ MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
349
+ MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
347
350
 
348
351
  const { state, onChange } = createStore({
349
352
  flowStatus: FlowStatus.LANDING,
@@ -492,6 +495,10 @@ class ApiCall {
492
495
  }
493
496
  catch (_a) { }
494
497
  }
498
+ async AbortRequest() {
499
+ let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: state.requestId }));
500
+ return result.saved;
501
+ }
495
502
  }
496
503
 
497
504
  const agreementCheckCss = "";
@@ -6061,12 +6068,12 @@ const IdentificationComponent = class {
6061
6068
  this.apiCall.GenerateAgreement(data.detail.agreementType);
6062
6069
  }
6063
6070
  catch (e) {
6064
- this.apiErrorEmitter(e);
6071
+ this.apiErrorEmitter(e, 'Agreement Acceptance');
6065
6072
  }
6066
6073
  }
6067
- async apiErrorEmitter(data) {
6074
+ async apiErrorEmitter(data, zone) {
6068
6075
  var _a, _b;
6069
- let apiLogData = { message: '', stack: '' };
6076
+ let apiLogData = { message: '', stack: '', zone };
6070
6077
  if (data.detail) {
6071
6078
  this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
6072
6079
  this.errorMessage = (_b = data.detail.stack) !== null && _b !== void 0 ? _b : '';
@@ -6174,7 +6181,7 @@ const IdentificationComponent = class {
6174
6181
  }
6175
6182
  }
6176
6183
  catch (e) {
6177
- this.apiErrorEmitter(e);
6184
+ this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
6178
6185
  }
6179
6186
  }
6180
6187
  render() {
@@ -6240,11 +6247,12 @@ const landingValidationCss = "";
6240
6247
  const LandingValidation = class {
6241
6248
  constructor(hostRef) {
6242
6249
  index.registerInstance(this, hostRef);
6250
+ this.apiErrorEvent = index.createEvent(this, "apiError", 7);
6243
6251
  this.device = undefined;
6244
6252
  this.warningText = undefined;
6245
6253
  }
6246
6254
  async componentWillLoad() {
6247
- await new Promise(f => setTimeout(f, 500));
6255
+ this.apiCall = new ApiCall();
6248
6256
  await this.initRequest();
6249
6257
  }
6250
6258
  componentDidLoad() {
@@ -6274,7 +6282,14 @@ const LandingValidation = class {
6274
6282
  }
6275
6283
  async leaveFlow() {
6276
6284
  state.initialised = false;
6277
- Events.flowAborted();
6285
+ try {
6286
+ await this.apiCall.AbortRequest();
6287
+ Events.flowAborted();
6288
+ }
6289
+ catch (e) {
6290
+ Events.flowAborted();
6291
+ this.apiErrorEvent.emit(e);
6292
+ }
6278
6293
  }
6279
6294
  render() {
6280
6295
  return (index.h("div", { class: "container" }, index.h("div", { class: "row" }, index.h("div", null, index.h("h1", { class: "text-center" }, LandingValues.Title), index.h("div", { class: "d-flex space-between align-center" }, index.h("p", { class: "main-text font-size-2" }, LandingValues.Description), index.h("div", { class: "img-info" }, index.h("div", { class: "i-effect" }), index.h("img", { src: infoSvg })))), index.h("div", { class: "info-container" }, index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: idSvg })), index.h("h3", null, LandingValues.IdInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: deviceSvg })), index.h("h3", null, LandingValues.DeviceInfo)), index.h("div", { class: "img-text" }, index.h("div", { class: "bg-img" }, index.h("img", { src: validationSvg })), index.h("h3", null, LandingValues.SmsInfo))), index.h("div", { class: "terms-container" }, index.h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), index.h("div", { class: "pos-relative show-bottom" }, index.h("div", { class: "btn-buletin" }, index.h("button", { class: "main-button", type: "button", disabled: !state.initialised, onClick: () => this.startFlow() }, LandingValues.Button), index.h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, LandingValues.ButtonLeave), index.h("p", { class: "main-text font-size-18 text-right mb-0" }, LandingValues.FooterText))))));
@@ -9214,6 +9229,12 @@ const MobileRedirect = class {
9214
9229
  this.infoTextTop = MobileRedirectValues.InfoWaiting;
9215
9230
  this.waitingMobile = true;
9216
9231
  }
9232
+ if (this.orderStatus == OrderStatuses.Aborted) {
9233
+ this.waitingMobile = false;
9234
+ this.infoTextTop = MobileRedirectValues.InfoAborted;
9235
+ Events.init(window);
9236
+ Events.flowAborted();
9237
+ }
9217
9238
  }
9218
9239
  async buttonClick() {
9219
9240
  if (this.contact == '' || this.contact.length != 10) {
@@ -8,13 +8,14 @@ import idValidation from '../../../assets/landing/validation.svg';
8
8
  import store from '../../../helpers/store';
9
9
  import Events from '../../../helpers/Events';
10
10
  import { FlowStatus } from '../../../models/FlowStatus';
11
+ import { ApiCall } from '../../../helpers/ApiCall';
11
12
  export class LandingValidation {
12
13
  constructor() {
13
14
  this.device = undefined;
14
15
  this.warningText = undefined;
15
16
  }
16
17
  async componentWillLoad() {
17
- await new Promise(f => setTimeout(f, 500));
18
+ this.apiCall = new ApiCall();
18
19
  await this.initRequest();
19
20
  }
20
21
  componentDidLoad() {
@@ -44,7 +45,14 @@ export class LandingValidation {
44
45
  }
45
46
  async leaveFlow() {
46
47
  store.initialised = false;
47
- Events.flowAborted();
48
+ try {
49
+ await this.apiCall.AbortRequest();
50
+ Events.flowAborted();
51
+ }
52
+ catch (e) {
53
+ Events.flowAborted();
54
+ this.apiErrorEvent.emit(e);
55
+ }
48
56
  }
49
57
  render() {
50
58
  return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, LandingValues.Title), h("div", { class: "d-flex space-between align-center" }, h("p", { class: "main-text font-size-2" }, LandingValues.Description), h("div", { class: "img-info" }, h("div", { class: "i-effect" }), h("img", { src: info })))), h("div", { class: "info-container" }, h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idSvg })), h("h3", null, LandingValues.IdInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idDevice })), h("h3", null, LandingValues.DeviceInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idValidation })), h("h3", null, LandingValues.SmsInfo))), h("div", { class: "terms-container" }, h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !store.initialised, onClick: () => this.startFlow() }, LandingValues.Button), h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, LandingValues.ButtonLeave), h("p", { class: "main-text font-size-18 text-right mb-0" }, LandingValues.FooterText))))));
@@ -89,4 +97,22 @@ export class LandingValidation {
89
97
  "warningText": {}
90
98
  };
91
99
  }
100
+ static get events() {
101
+ return [{
102
+ "method": "apiErrorEvent",
103
+ "name": "apiError",
104
+ "bubbles": true,
105
+ "cancelable": true,
106
+ "composed": true,
107
+ "docs": {
108
+ "tags": [],
109
+ "text": ""
110
+ },
111
+ "complexType": {
112
+ "original": "any",
113
+ "resolved": "any",
114
+ "references": {}
115
+ }
116
+ }];
117
+ }
92
118
  }
@@ -3,6 +3,7 @@ import { MobileRedirectValues } from '../../../helpers/textValues';
3
3
  import QRCode from 'qrcode';
4
4
  import store from '../../../helpers/store';
5
5
  import { ApiCall } from '../../../helpers/ApiCall';
6
+ import Events from '../../../helpers/Events';
6
7
  import { OrderStatuses } from '../../../models/OrderStatuses';
7
8
  import { FlowStatus } from '../../../models/FlowStatus';
8
9
  export class MobileRedirect {
@@ -60,6 +61,12 @@ export class MobileRedirect {
60
61
  this.infoTextTop = MobileRedirectValues.InfoWaiting;
61
62
  this.waitingMobile = true;
62
63
  }
64
+ if (this.orderStatus == OrderStatuses.Aborted) {
65
+ this.waitingMobile = false;
66
+ this.infoTextTop = MobileRedirectValues.InfoAborted;
67
+ Events.init(window);
68
+ Events.flowAborted();
69
+ }
63
70
  }
64
71
  async buttonClick() {
65
72
  if (this.contact == '' || this.contact.length != 10) {
@@ -70,12 +70,12 @@ export class IdentificationComponent {
70
70
  this.apiCall.GenerateAgreement(data.detail.agreementType);
71
71
  }
72
72
  catch (e) {
73
- this.apiErrorEmitter(e);
73
+ this.apiErrorEmitter(e, 'Agreement Acceptance');
74
74
  }
75
75
  }
76
- async apiErrorEmitter(data) {
76
+ async apiErrorEmitter(data, zone) {
77
77
  var _a, _b;
78
- let apiLogData = { message: '', stack: '' };
78
+ let apiLogData = { message: '', stack: '', zone };
79
79
  if (data.detail) {
80
80
  this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
81
81
  this.errorMessage = (_b = data.detail.stack) !== null && _b !== void 0 ? _b : '';
@@ -182,7 +182,7 @@ export class IdentificationComponent {
182
182
  }
183
183
  }
184
184
  catch (e) {
185
- this.apiErrorEmitter(e);
185
+ this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
186
186
  }
187
187
  }
188
188
  render() {
@@ -112,4 +112,8 @@ export class ApiCall {
112
112
  }
113
113
  catch (_a) { }
114
114
  }
115
+ async AbortRequest() {
116
+ let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: store.requestId }));
117
+ return result.saved;
118
+ }
115
119
  }
@@ -119,6 +119,7 @@ export class ApiUrls {
119
119
  this.SendLink = this.uriEnv + 'validation/otp/sendlink';
120
120
  this.GetStatus = this.uriEnv + 'validation/identity/status';
121
121
  this.AddLog = this.uriEnv + 'validation/logs/add';
122
+ this.AbortRequest = this.uriEnv + 'validation/identity/abort';
122
123
  }
123
124
  }
124
125
  export class MobileRedirectValues extends GlobalValues {
@@ -127,3 +128,4 @@ MobileRedirectValues.InfoTop = 'Pentru a continua scanați codul de mai jos cu u
127
128
  MobileRedirectValues.InfoBottom = 'Sau introduceți un număr de telefon pentru a primi link-ul pe smartphone.';
128
129
  MobileRedirectValues.Validation = 'Număr de telefon invalid!';
129
130
  MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
131
+ MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
@@ -0,0 +1 @@
1
+ export {};
@@ -4,4 +4,5 @@ export var OrderStatuses;
4
4
  OrderStatuses[OrderStatuses["FinishedCapturing"] = 1] = "FinishedCapturing";
5
5
  OrderStatuses[OrderStatuses["Waiting"] = 2] = "Waiting";
6
6
  OrderStatuses[OrderStatuses["NotFound"] = 3] = "NotFound";
7
+ OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
7
8
  })(OrderStatuses || (OrderStatuses = {}));
@@ -6,6 +6,7 @@ var OrderStatuses;
6
6
  OrderStatuses[OrderStatuses["FinishedCapturing"] = 1] = "FinishedCapturing";
7
7
  OrderStatuses[OrderStatuses["Waiting"] = 2] = "Waiting";
8
8
  OrderStatuses[OrderStatuses["NotFound"] = 3] = "NotFound";
9
+ OrderStatuses[OrderStatuses["Aborted"] = 4] = "Aborted";
9
10
  })(OrderStatuses || (OrderStatuses = {}));
10
11
 
11
12
  const appendToMap = (map, propName, value) => {
@@ -332,6 +333,7 @@ class ApiUrls {
332
333
  this.SendLink = this.uriEnv + 'validation/otp/sendlink';
333
334
  this.GetStatus = this.uriEnv + 'validation/identity/status';
334
335
  this.AddLog = this.uriEnv + 'validation/logs/add';
336
+ this.AbortRequest = this.uriEnv + 'validation/identity/abort';
335
337
  }
336
338
  }
337
339
  class MobileRedirectValues extends GlobalValues {
@@ -339,7 +341,8 @@ class MobileRedirectValues extends GlobalValues {
339
341
  MobileRedirectValues.InfoTop = 'Pentru a continua scanați codul de mai jos cu un smartphone.';
340
342
  MobileRedirectValues.InfoBottom = 'Sau introduceți un număr de telefon pentru a primi link-ul pe smartphone.';
341
343
  MobileRedirectValues.Validation = 'Număr de telefon invalid!';
342
- MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
344
+ MobileRedirectValues.InfoWaiting = 'Așteptăm finalizarea procesului pe smartphone.';
345
+ MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
343
346
 
344
347
  const { state, onChange } = createStore({
345
348
  flowStatus: FlowStatus.LANDING,
@@ -488,6 +491,10 @@ class ApiCall {
488
491
  }
489
492
  catch (_a) { }
490
493
  }
494
+ async AbortRequest() {
495
+ let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: state.requestId }));
496
+ return result.saved;
497
+ }
491
498
  }
492
499
 
493
500
  const agreementCheckCss = "";
@@ -6057,12 +6064,12 @@ const IdentificationComponent = class {
6057
6064
  this.apiCall.GenerateAgreement(data.detail.agreementType);
6058
6065
  }
6059
6066
  catch (e) {
6060
- this.apiErrorEmitter(e);
6067
+ this.apiErrorEmitter(e, 'Agreement Acceptance');
6061
6068
  }
6062
6069
  }
6063
- async apiErrorEmitter(data) {
6070
+ async apiErrorEmitter(data, zone) {
6064
6071
  var _a, _b;
6065
- let apiLogData = { message: '', stack: '' };
6072
+ let apiLogData = { message: '', stack: '', zone };
6066
6073
  if (data.detail) {
6067
6074
  this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
6068
6075
  this.errorMessage = (_b = data.detail.stack) !== null && _b !== void 0 ? _b : '';
@@ -6170,7 +6177,7 @@ const IdentificationComponent = class {
6170
6177
  }
6171
6178
  }
6172
6179
  catch (e) {
6173
- this.apiErrorEmitter(e);
6180
+ this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + state.requestId + ' RedirectId:' + state.redirectId);
6174
6181
  }
6175
6182
  }
6176
6183
  render() {
@@ -6236,11 +6243,12 @@ const landingValidationCss = "";
6236
6243
  const LandingValidation = class {
6237
6244
  constructor(hostRef) {
6238
6245
  registerInstance(this, hostRef);
6246
+ this.apiErrorEvent = createEvent(this, "apiError", 7);
6239
6247
  this.device = undefined;
6240
6248
  this.warningText = undefined;
6241
6249
  }
6242
6250
  async componentWillLoad() {
6243
- await new Promise(f => setTimeout(f, 500));
6251
+ this.apiCall = new ApiCall();
6244
6252
  await this.initRequest();
6245
6253
  }
6246
6254
  componentDidLoad() {
@@ -6270,7 +6278,14 @@ const LandingValidation = class {
6270
6278
  }
6271
6279
  async leaveFlow() {
6272
6280
  state.initialised = false;
6273
- Events.flowAborted();
6281
+ try {
6282
+ await this.apiCall.AbortRequest();
6283
+ Events.flowAborted();
6284
+ }
6285
+ catch (e) {
6286
+ Events.flowAborted();
6287
+ this.apiErrorEvent.emit(e);
6288
+ }
6274
6289
  }
6275
6290
  render() {
6276
6291
  return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, LandingValues.Title), h("div", { class: "d-flex space-between align-center" }, h("p", { class: "main-text font-size-2" }, LandingValues.Description), h("div", { class: "img-info" }, h("div", { class: "i-effect" }), h("img", { src: infoSvg })))), h("div", { class: "info-container" }, h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idSvg })), h("h3", null, LandingValues.IdInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: deviceSvg })), h("h3", null, LandingValues.DeviceInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: validationSvg })), h("h3", null, LandingValues.SmsInfo))), h("div", { class: "terms-container" }, h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !state.initialised, onClick: () => this.startFlow() }, LandingValues.Button), h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, LandingValues.ButtonLeave), h("p", { class: "main-text font-size-18 text-right mb-0" }, LandingValues.FooterText))))));
@@ -9210,6 +9225,12 @@ const MobileRedirect = class {
9210
9225
  this.infoTextTop = MobileRedirectValues.InfoWaiting;
9211
9226
  this.waitingMobile = true;
9212
9227
  }
9228
+ if (this.orderStatus == OrderStatuses.Aborted) {
9229
+ this.waitingMobile = false;
9230
+ this.infoTextTop = MobileRedirectValues.InfoAborted;
9231
+ Events.init(window);
9232
+ Events.flowAborted();
9233
+ }
9213
9234
  }
9214
9235
  async buttonClick() {
9215
9236
  if (this.contact == '' || this.contact.length != 10) {