@gataca/qr 2.0.0

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 (99) hide show
  1. package/LICENSE +21 -0
  2. package/dist/cjs/gat-icon-refresh-751505ff.js +14 -0
  3. package/dist/cjs/gataca-autoqr.cjs.entry.js +88 -0
  4. package/dist/cjs/gataca-qr.cjs.entry.js +175 -0
  5. package/dist/cjs/gataca-qrdisplay_2.cjs.entry.js +219 -0
  6. package/dist/cjs/gataca-ssibutton_2.cjs.entry.js +114 -0
  7. package/dist/cjs/gatacaqr.cjs.js +19 -0
  8. package/dist/cjs/index-0b7a1532.js +1410 -0
  9. package/dist/cjs/index.cjs.js +16 -0
  10. package/dist/cjs/loader.cjs.js +21 -0
  11. package/dist/cjs/qr-code-styling-412bbc7a.js +28 -0
  12. package/dist/cjs/utils-383ee834.js +26 -0
  13. package/dist/collection/assets/icons/gat-icon-alert.svg +5 -0
  14. package/dist/collection/assets/icons/gat-icon-check.svg +5 -0
  15. package/dist/collection/assets/icons/gat-icon-refresh.svg +4 -0
  16. package/dist/collection/assets/images/logo_gataca.svg +26 -0
  17. package/dist/collection/collection-manifest.json +17 -0
  18. package/dist/collection/components/gataca-autoqr/gataca-autoqr.css +116 -0
  19. package/dist/collection/components/gataca-autoqr/gataca-autoqr.js +306 -0
  20. package/dist/collection/components/gataca-qr/gataca-qr.css +249 -0
  21. package/dist/collection/components/gataca-qr/gataca-qr.js +557 -0
  22. package/dist/collection/components/gataca-qrdisplay/gataca-qrdisplay.js +154 -0
  23. package/dist/collection/components/gataca-qrws/gataca-qrws.css +249 -0
  24. package/dist/collection/components/gataca-qrws/gataca-qrws.js +566 -0
  25. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.css +116 -0
  26. package/dist/collection/components/gataca-ssibutton/gataca-ssibutton.js +395 -0
  27. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.css +116 -0
  28. package/dist/collection/components/gataca-ssibuttonws/gataca-ssibuttonws.js +410 -0
  29. package/dist/collection/index.js +2 -0
  30. package/dist/collection/utils/index.js +1 -0
  31. package/dist/collection/utils/utils.js +21 -0
  32. package/dist/components/gat-icon-refresh.js +29 -0
  33. package/dist/components/gataca-autoqr.d.ts +11 -0
  34. package/dist/components/gataca-autoqr.js +144 -0
  35. package/dist/components/gataca-qr.d.ts +11 -0
  36. package/dist/components/gataca-qr.js +6 -0
  37. package/dist/components/gataca-qr2.js +211 -0
  38. package/dist/components/gataca-qrdisplay.d.ts +11 -0
  39. package/dist/components/gataca-qrdisplay.js +6 -0
  40. package/dist/components/gataca-qrdisplay2.js +93 -0
  41. package/dist/components/gataca-qrws.d.ts +11 -0
  42. package/dist/components/gataca-qrws.js +6 -0
  43. package/dist/components/gataca-qrws2.js +212 -0
  44. package/dist/components/gataca-ssibutton.d.ts +11 -0
  45. package/dist/components/gataca-ssibutton.js +6 -0
  46. package/dist/components/gataca-ssibutton2.js +100 -0
  47. package/dist/components/gataca-ssibuttonws.d.ts +11 -0
  48. package/dist/components/gataca-ssibuttonws.js +6 -0
  49. package/dist/components/gataca-ssibuttonws2.js +102 -0
  50. package/dist/components/index.d.ts +27 -0
  51. package/dist/components/index.js +8 -0
  52. package/dist/esm/gat-icon-refresh-179ea123.js +9 -0
  53. package/dist/esm/gataca-autoqr.entry.js +84 -0
  54. package/dist/esm/gataca-qr.entry.js +171 -0
  55. package/dist/esm/gataca-qrdisplay_2.entry.js +214 -0
  56. package/dist/esm/gataca-ssibutton_2.entry.js +109 -0
  57. package/dist/esm/gatacaqr.js +17 -0
  58. package/dist/esm/index-19eef502.js +1384 -0
  59. package/dist/esm/index.js +1 -0
  60. package/dist/esm/loader.js +17 -0
  61. package/dist/esm/polyfills/core-js.js +11 -0
  62. package/dist/esm/polyfills/css-shim.js +1 -0
  63. package/dist/esm/polyfills/dom.js +79 -0
  64. package/dist/esm/polyfills/es5-html-element.js +1 -0
  65. package/dist/esm/polyfills/index.js +34 -0
  66. package/dist/esm/polyfills/system.js +6 -0
  67. package/dist/esm/qr-code-styling-0eeb38d5.js +26 -0
  68. package/dist/esm/utils-05ba6c9f.js +23 -0
  69. package/dist/gatacaqr/gatacaqr.esm.js +1 -0
  70. package/dist/gatacaqr/index.esm.js +1 -0
  71. package/dist/gatacaqr/p-0905677f.entry.js +1 -0
  72. package/dist/gatacaqr/p-0be4566d.js +1 -0
  73. package/dist/gatacaqr/p-1d35273f.entry.js +1 -0
  74. package/dist/gatacaqr/p-2f22c7fc.js +1 -0
  75. package/dist/gatacaqr/p-4139a068.entry.js +1 -0
  76. package/dist/gatacaqr/p-a6f85341.js +2 -0
  77. package/dist/gatacaqr/p-b8ba109f.js +1 -0
  78. package/dist/gatacaqr/p-f85d7e76.entry.js +1 -0
  79. package/dist/index.cjs.js +1 -0
  80. package/dist/index.js +1 -0
  81. package/dist/types/components/gataca-autoqr/gataca-autoqr.d.ts +85 -0
  82. package/dist/types/components/gataca-qr/gataca-qr.d.ts +131 -0
  83. package/dist/types/components/gataca-qrdisplay/gataca-qrdisplay.d.ts +35 -0
  84. package/dist/types/components/gataca-qrws/gataca-qrws.d.ts +124 -0
  85. package/dist/types/components/gataca-ssibutton/gataca-ssibutton.d.ts +114 -0
  86. package/dist/types/components/gataca-ssibuttonws/gataca-ssibuttonws.d.ts +110 -0
  87. package/dist/types/components.d.ts +830 -0
  88. package/dist/types/index.d.ts +2 -0
  89. package/dist/types/stencil-public-runtime.d.ts +1581 -0
  90. package/dist/types/utils/index.d.ts +1 -0
  91. package/dist/types/utils/utils.d.ts +56 -0
  92. package/loader/cdn.js +3 -0
  93. package/loader/index.cjs.js +3 -0
  94. package/loader/index.d.ts +12 -0
  95. package/loader/index.es2017.js +3 -0
  96. package/loader/index.js +4 -0
  97. package/loader/package.json +11 -0
  98. package/package.json +40 -0
  99. package/readme.md +67 -0
@@ -0,0 +1,830 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { RESULT_STATUS } from "./utils";
9
+ import { RESULT_STATUS as RESULT_STATUS1, WSResponse } from "./utils/utils";
10
+ export namespace Components {
11
+ interface GatacaAutoqr {
12
+ /**
13
+ * ___Just for polling flavour___ ***Mandatory*** Check status function to query the current status of the session The function must query a client endpoint to check the status. That endpoint must return an error if the session has expired.
14
+ */
15
+ "checkStatus"?: (
16
+ id?: string
17
+ ) => Promise<{ result: RESULT_STATUS; data?: any }>;
18
+ /**
19
+ * ***Mandatory*** ID of the QR configuration to display
20
+ */
21
+ "configId": string;
22
+ /**
23
+ * ___Optional___ ConfigURL Repository to download the config from
24
+ */
25
+ "configRepository": string;
26
+ /**
27
+ * ***Mandatory*** Create session function to generate a new Session Using V1, it can provide just a session Id Using V2, it must provide also the authentication request. The session Id is the id of the presentation definition
28
+ */
29
+ "createSession"?: () => Promise<{
30
+ sessionId: string;
31
+ authenticationRequest?: string;
32
+ }>;
33
+ /**
34
+ * ___Just for polling flavour___ ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
35
+ */
36
+ "errorCallback": (error?: Error) => void;
37
+ /**
38
+ * Retrieve manually the session data on a successful login
39
+ */
40
+ "getSessionData": () => Promise<any>;
41
+ /**
42
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
43
+ */
44
+ "successCallback": (data?: any) => void;
45
+ /**
46
+ * ___Just for WS flavour___ **RECOMMENDED** Callback to invoke an a message has been received on the socket. It provides the socket itself and the message as parameters. If not used, the messages provided by the server on the Socket connection must conform to the WSReponse interface If used, an Event named **sessionMsg** must be triggered with a WSReponse as data
47
+ */
48
+ "wsOnMessage": (socket: WebSocket, msg: MessageEvent) => void;
49
+ /**
50
+ * ___Just for WS flavour___ [Optional] Function to send a message to the server upon socket creation
51
+ */
52
+ "wsOnOpen": (socket: WebSocket) => void;
53
+ }
54
+ interface GatacaQr {
55
+ /**
56
+ * _[Optional]_ Set to refresh the session automatically upon expiration. By default it is false
57
+ */
58
+ "autorefresh": boolean;
59
+ /**
60
+ * _[Optional]_ Set to enable autoload when the QR is displayed. By default it is true
61
+ */
62
+ "autostart": boolean;
63
+ /**
64
+ * ***Mandatory just for V1*** Connect/Certify Server where the wallet will send the data
65
+ */
66
+ "callbackServer": string;
67
+ /**
68
+ * ***Mandatory*** Check status function to query the current status of the session The function must query a client endpoint to check the status. That endpoint must return an error if the session has expired.
69
+ */
70
+ "checkStatus"?: (
71
+ id?: string
72
+ ) => Promise<{ result: RESULT_STATUS1; data?: any }>;
73
+ /**
74
+ * ***Mandatory*** Create session function to generate a new Session Using V1, it can provide just a session Id Using V2, it must provide also the authentication request. The session Id is the id of the presentation definition
75
+ */
76
+ "createSession"?: () => Promise<{
77
+ sessionId: string;
78
+ authenticationRequest?: string;
79
+ }>;
80
+ /**
81
+ * Force manually the display of a QR
82
+ */
83
+ "display": () => Promise<void>;
84
+ /**
85
+ * _[Optional]_ Display a link containing a dynamic link to invoke the wallet if closed
86
+ */
87
+ "dynamicLink"?: boolean;
88
+ /**
89
+ * ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
90
+ */
91
+ "errorCallback": (error?: Error) => void;
92
+ /**
93
+ * Retrieve manually the session data on a successful login
94
+ */
95
+ "getSessionData": () => Promise<any>;
96
+ /**
97
+ * _[Optional]_ Boolean to show or not show the gataca brand title
98
+ */
99
+ "hideBrandTitle"?: boolean;
100
+ /**
101
+ * _[Optional]_ Frequency in seconds to check if the session has been validated
102
+ */
103
+ "pollingFrequency"?: number;
104
+ /**
105
+ * _[Optional]_ Modifies the Modal description
106
+ */
107
+ "qrModalDescription"?: string;
108
+ /**
109
+ * _[Optional]_ Modifies the qr headline title
110
+ */
111
+ "qrModalTitle"?: string;
112
+ /**
113
+ * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
114
+ */
115
+ "qrRole": string;
116
+ /**
117
+ * _[Optional]_ Maximum time window to display the session
118
+ */
119
+ "sessionTimeout"?: number;
120
+ /**
121
+ * Stop manually an ongoing session
122
+ */
123
+ "stop": () => Promise<void>;
124
+ /**
125
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
126
+ */
127
+ "successCallback": (data?: any) => void;
128
+ /**
129
+ * _[Optional]_ Set to use v2 links. The create session must be providing both an authentication request and a session Id
130
+ */
131
+ "v2"?: boolean;
132
+ }
133
+ interface GatacaQrdisplay {
134
+ /**
135
+ * _[Optional]_ Size of the logo to display in percentage to the total size [0-1]. 0 means no logo will be displayed. Default is the GATACA logo. Recommended size is around 0.33
136
+ */
137
+ "logoSize"?: number;
138
+ /**
139
+ * _[Optional]_ Logo to display, just if the logo size is greater than 0. No logo is the GATACA logo.
140
+ */
141
+ "logoSrc"?: string;
142
+ /**
143
+ * _[Optional]_ QR Color.
144
+ */
145
+ "qrColor"?: string;
146
+ /**
147
+ * _[Mandatory]_ Sets the contents of the QR
148
+ */
149
+ "qrData": string;
150
+ /**
151
+ * _[Optional]_ Round usage
152
+ */
153
+ "rounded"?: boolean;
154
+ /**
155
+ * _[Optional]_ Size of the QR Displayed
156
+ */
157
+ "size"?: number;
158
+ }
159
+ interface GatacaQrws {
160
+ /**
161
+ * _[Optional]_ Set to refresh the session automatically upon expiration. By default it is false
162
+ */
163
+ "autorefresh": boolean;
164
+ /**
165
+ * _[Optional]_ Set to enable autoload when the QR is displayed. By default it is true
166
+ */
167
+ "autostart": boolean;
168
+ /**
169
+ * ***Mandatory just for V1*** Connect/Certify Server where the wallet will send the data
170
+ */
171
+ "callbackServer": string;
172
+ /**
173
+ * Force manually the display of a QR
174
+ */
175
+ "display": () => Promise<void>;
176
+ /**
177
+ * _[Optional]_ Display a link containing a dynamic link to invoke the wallet if closed
178
+ */
179
+ "dynamicLink"?: boolean;
180
+ /**
181
+ * ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
182
+ */
183
+ "errorCallback": (error?: Error) => void;
184
+ /**
185
+ * Retrieve manually the session data on a successful login
186
+ */
187
+ "getSessionData": () => Promise<any>;
188
+ /**
189
+ * _[Optional]_ Boolean to show or not show the gataca brand title
190
+ */
191
+ "hideBrandTitle"?: boolean;
192
+ /**
193
+ * _[Optional]_ Modifies the Modal description
194
+ */
195
+ "qrModalDescription"?: string;
196
+ /**
197
+ * _[Optional]_ Modifies the qr headline title
198
+ */
199
+ "qrModalTitle"?: string;
200
+ /**
201
+ * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
202
+ */
203
+ "qrRole": string;
204
+ /**
205
+ * ***Mandatory*** Maximum time window to display the session and keep the websocket connection. It's needed to ensure the socket is closed.
206
+ */
207
+ "sessionTimeout"?: number;
208
+ /**
209
+ * ***Mandatory*** WS Endpoint on your service to be invoked upon display
210
+ */
211
+ "socketEndpoint": string;
212
+ /**
213
+ * Stop manually an ongoing session
214
+ */
215
+ "stop": () => Promise<void>;
216
+ /**
217
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
218
+ */
219
+ "successCallback": (data?: any) => void;
220
+ /**
221
+ * **RECOMMENDED** Set to use v2 links. The create session must be providing both an authentication request and a session Id
222
+ */
223
+ "v2"?: boolean;
224
+ /**
225
+ * **RECOMMENDED** Callback to invoke an a message has been received on the socket. It provides the socket itself and the message as parameters. If not used, the messages provided by the server on the Socket connection must conform to the WSReponse interface If used, an Event named **sessionMsg** must be triggered with a WSReponse as data
226
+ */
227
+ "wsOnMessage": (socket: WebSocket, msg: MessageEvent) => void;
228
+ /**
229
+ * [Optional] Function to send a message to the server upon socket creation
230
+ */
231
+ "wsOnOpen": (socket: WebSocket) => void;
232
+ }
233
+ interface GatacaSsibutton {
234
+ /**
235
+ * _[Optional]_ Set to refresh the session automatically upon expiration. By default it is false
236
+ */
237
+ "autorefresh": boolean;
238
+ /**
239
+ * _[Optional]_ In the case of being a button, modifies its text
240
+ */
241
+ "buttonText"?: string;
242
+ /**
243
+ * ***Mandatory just for V1*** Connect/Certify Server where the wallet will send the data
244
+ */
245
+ "callbackServer": string;
246
+ /**
247
+ * ***Mandatory*** Check status function to query the current status of the session The function must query a client endpoint to check the status. That endpoint must return an error if the session has expired.
248
+ */
249
+ "checkStatus"?: (
250
+ id?: string
251
+ ) => Promise<{ result: RESULT_STATUS1; data?: any }>;
252
+ /**
253
+ * ***Mandatory*** Create session function to generate a new Session Using V1, it can provide just a session Id Using V2, it must provide also the authentication request. The session Id is the id of the presentation definition
254
+ */
255
+ "createSession"?: () => Promise<{
256
+ sessionId: string;
257
+ authenticationRequest?: string;
258
+ }>;
259
+ /**
260
+ * _[Optional]_ Display a link containing a dynamic link to invoke the wallet if closed
261
+ */
262
+ "dynamicLink"?: boolean;
263
+ /**
264
+ * ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
265
+ */
266
+ "errorCallback": (error?: Error) => void;
267
+ /**
268
+ * Retrieve manually the session data on a successful login
269
+ */
270
+ "getSessionData": () => Promise<any>;
271
+ /**
272
+ * _[Optional]_ Boolean to show or not show the gataca brand title
273
+ */
274
+ "hideBrandTitle"?: boolean;
275
+ /**
276
+ * _[Optional]_ Frequency in seconds to check if the session has been validated
277
+ */
278
+ "pollingFrequency"?: number;
279
+ /**
280
+ * _[Optional]_ Modifies the Modal description
281
+ */
282
+ "qrModalDescription"?: string;
283
+ /**
284
+ * _[Optional]_ Modifies the qr headline title
285
+ */
286
+ "qrModalTitle"?: string;
287
+ /**
288
+ * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
289
+ */
290
+ "qrRole": string;
291
+ /**
292
+ * _[Optional]_ Maximum time window to display the session
293
+ */
294
+ "sessionTimeout"?: number;
295
+ /**
296
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
297
+ */
298
+ "successCallback": (data?: any) => void;
299
+ /**
300
+ * _[Optional]_ Set to use v2 links. The create session must be providing both an authentication request and a session Id
301
+ */
302
+ "v2"?: boolean;
303
+ }
304
+ interface GatacaSsibuttonws {
305
+ /**
306
+ * _[Optional]_ Set to refresh the session automatically upon expiration. By default it is false
307
+ */
308
+ "autorefresh": boolean;
309
+ /**
310
+ * _[Optional]_ Set to enable autoload when the QR is displayed. By default it is true
311
+ */
312
+ "autostart": boolean;
313
+ /**
314
+ * _[Optional]_ In the case of being a button, modifies its text
315
+ */
316
+ "buttonText"?: string;
317
+ /**
318
+ * ***Mandatory just for V1*** Connect/Certify Server where the wallet will send the data
319
+ */
320
+ "callbackServer": string;
321
+ /**
322
+ * _[Optional]_ Display a link containing a dynamic link to invoke the wallet if closed
323
+ */
324
+ "dynamicLink"?: boolean;
325
+ /**
326
+ * ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
327
+ */
328
+ "errorCallback": (error?: Error) => void;
329
+ /**
330
+ * Retrieve manually the session data on a successful login
331
+ */
332
+ "getSessionData": () => Promise<any>;
333
+ /**
334
+ * _[Optional]_ Boolean to show or not show the gataca brand title
335
+ */
336
+ "hideBrandTitle"?: boolean;
337
+ /**
338
+ * _[Optional]_ Modifies the Modal description
339
+ */
340
+ "qrModalDescription"?: string;
341
+ /**
342
+ * _[Optional]_ Modifies the qr headline title
343
+ */
344
+ "qrModalTitle"?: string;
345
+ /**
346
+ * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
347
+ */
348
+ "qrRole": string;
349
+ /**
350
+ * ***Mandatory*** Maximum time window to display the session and keep the websocket connection. It's needed to ensure the socket is closed.
351
+ */
352
+ "sessionTimeout"?: number;
353
+ /**
354
+ * ***Mandatory*** WS Endpoint on your service to be invoked upon display
355
+ */
356
+ "socketEndpoint": string;
357
+ /**
358
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
359
+ */
360
+ "successCallback": (data?: any) => void;
361
+ /**
362
+ * **RECOMMENDED** Set to use v2 links. The create session must be providing both an authentication request and a session Id
363
+ */
364
+ "v2"?: boolean;
365
+ /**
366
+ * **RECOMMENDED** Callback to invoke an a message has been received on the socket. It provides the socket itself and the message as parameters. If not used, the messages provided by the server on the Socket connection must conform to the WSReponse interface If used, an Event named **sessionMsg** must be triggered with a WSReponse as data
367
+ */
368
+ "wsOnMessage": (socket: WebSocket, msg: MessageEvent) => void;
369
+ /**
370
+ * [Optional] Function to send a message to the server upon socket creation
371
+ */
372
+ "wsOnOpen": (socket: WebSocket) => void;
373
+ }
374
+ }
375
+ export interface GatacaAutoqrCustomEvent<T> extends CustomEvent<T> {
376
+ detail: T;
377
+ target: HTMLGatacaAutoqrElement;
378
+ }
379
+ export interface GatacaQrCustomEvent<T> extends CustomEvent<T> {
380
+ detail: T;
381
+ target: HTMLGatacaQrElement;
382
+ }
383
+ export interface GatacaQrwsCustomEvent<T> extends CustomEvent<T> {
384
+ detail: T;
385
+ target: HTMLGatacaQrwsElement;
386
+ }
387
+ export interface GatacaSsibuttonCustomEvent<T> extends CustomEvent<T> {
388
+ detail: T;
389
+ target: HTMLGatacaSsibuttonElement;
390
+ }
391
+ export interface GatacaSsibuttonwsCustomEvent<T> extends CustomEvent<T> {
392
+ detail: T;
393
+ target: HTMLGatacaSsibuttonwsElement;
394
+ }
395
+ declare global {
396
+ interface HTMLGatacaAutoqrElement extends Components.GatacaAutoqr, HTMLStencilElement {
397
+ }
398
+ var HTMLGatacaAutoqrElement: {
399
+ prototype: HTMLGatacaAutoqrElement;
400
+ new (): HTMLGatacaAutoqrElement;
401
+ };
402
+ interface HTMLGatacaQrElement extends Components.GatacaQr, HTMLStencilElement {
403
+ }
404
+ var HTMLGatacaQrElement: {
405
+ prototype: HTMLGatacaQrElement;
406
+ new (): HTMLGatacaQrElement;
407
+ };
408
+ interface HTMLGatacaQrdisplayElement extends Components.GatacaQrdisplay, HTMLStencilElement {
409
+ }
410
+ var HTMLGatacaQrdisplayElement: {
411
+ prototype: HTMLGatacaQrdisplayElement;
412
+ new (): HTMLGatacaQrdisplayElement;
413
+ };
414
+ interface HTMLGatacaQrwsElement extends Components.GatacaQrws, HTMLStencilElement {
415
+ }
416
+ var HTMLGatacaQrwsElement: {
417
+ prototype: HTMLGatacaQrwsElement;
418
+ new (): HTMLGatacaQrwsElement;
419
+ };
420
+ interface HTMLGatacaSsibuttonElement extends Components.GatacaSsibutton, HTMLStencilElement {
421
+ }
422
+ var HTMLGatacaSsibuttonElement: {
423
+ prototype: HTMLGatacaSsibuttonElement;
424
+ new (): HTMLGatacaSsibuttonElement;
425
+ };
426
+ interface HTMLGatacaSsibuttonwsElement extends Components.GatacaSsibuttonws, HTMLStencilElement {
427
+ }
428
+ var HTMLGatacaSsibuttonwsElement: {
429
+ prototype: HTMLGatacaSsibuttonwsElement;
430
+ new (): HTMLGatacaSsibuttonwsElement;
431
+ };
432
+ interface HTMLElementTagNameMap {
433
+ "gataca-autoqr": HTMLGatacaAutoqrElement;
434
+ "gataca-qr": HTMLGatacaQrElement;
435
+ "gataca-qrdisplay": HTMLGatacaQrdisplayElement;
436
+ "gataca-qrws": HTMLGatacaQrwsElement;
437
+ "gataca-ssibutton": HTMLGatacaSsibuttonElement;
438
+ "gataca-ssibuttonws": HTMLGatacaSsibuttonwsElement;
439
+ }
440
+ }
441
+ declare namespace LocalJSX {
442
+ interface GatacaAutoqr {
443
+ /**
444
+ * ___Just for polling flavour___ ***Mandatory*** Check status function to query the current status of the session The function must query a client endpoint to check the status. That endpoint must return an error if the session has expired.
445
+ */
446
+ "checkStatus"?: (
447
+ id?: string
448
+ ) => Promise<{ result: RESULT_STATUS; data?: any }>;
449
+ /**
450
+ * ***Mandatory*** ID of the QR configuration to display
451
+ */
452
+ "configId"?: string;
453
+ /**
454
+ * ___Optional___ ConfigURL Repository to download the config from
455
+ */
456
+ "configRepository"?: string;
457
+ /**
458
+ * ***Mandatory*** Create session function to generate a new Session Using V1, it can provide just a session Id Using V2, it must provide also the authentication request. The session Id is the id of the presentation definition
459
+ */
460
+ "createSession"?: () => Promise<{
461
+ sessionId: string;
462
+ authenticationRequest?: string;
463
+ }>;
464
+ /**
465
+ * ___Just for polling flavour___ ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
466
+ */
467
+ "errorCallback"?: (error?: Error) => void;
468
+ /**
469
+ * GatacaLoginCompleted event, triggered with session data upon login success
470
+ */
471
+ "onGatacaLoginCompleted"?: (event: GatacaAutoqrCustomEvent<any>) => void;
472
+ /**
473
+ * GatacaLoginFailed event, triggered with error upon login failure
474
+ */
475
+ "onGatacaLoginFailed"?: (event: GatacaAutoqrCustomEvent<any>) => void;
476
+ /**
477
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
478
+ */
479
+ "successCallback"?: (data?: any) => void;
480
+ /**
481
+ * ___Just for WS flavour___ **RECOMMENDED** Callback to invoke an a message has been received on the socket. It provides the socket itself and the message as parameters. If not used, the messages provided by the server on the Socket connection must conform to the WSReponse interface If used, an Event named **sessionMsg** must be triggered with a WSReponse as data
482
+ */
483
+ "wsOnMessage"?: (socket: WebSocket, msg: MessageEvent) => void;
484
+ /**
485
+ * ___Just for WS flavour___ [Optional] Function to send a message to the server upon socket creation
486
+ */
487
+ "wsOnOpen"?: (socket: WebSocket) => void;
488
+ }
489
+ interface GatacaQr {
490
+ /**
491
+ * _[Optional]_ Set to refresh the session automatically upon expiration. By default it is false
492
+ */
493
+ "autorefresh"?: boolean;
494
+ /**
495
+ * _[Optional]_ Set to enable autoload when the QR is displayed. By default it is true
496
+ */
497
+ "autostart"?: boolean;
498
+ /**
499
+ * ***Mandatory just for V1*** Connect/Certify Server where the wallet will send the data
500
+ */
501
+ "callbackServer"?: string;
502
+ /**
503
+ * ***Mandatory*** Check status function to query the current status of the session The function must query a client endpoint to check the status. That endpoint must return an error if the session has expired.
504
+ */
505
+ "checkStatus"?: (
506
+ id?: string
507
+ ) => Promise<{ result: RESULT_STATUS1; data?: any }>;
508
+ /**
509
+ * ***Mandatory*** Create session function to generate a new Session Using V1, it can provide just a session Id Using V2, it must provide also the authentication request. The session Id is the id of the presentation definition
510
+ */
511
+ "createSession"?: () => Promise<{
512
+ sessionId: string;
513
+ authenticationRequest?: string;
514
+ }>;
515
+ /**
516
+ * _[Optional]_ Display a link containing a dynamic link to invoke the wallet if closed
517
+ */
518
+ "dynamicLink"?: boolean;
519
+ /**
520
+ * ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
521
+ */
522
+ "errorCallback"?: (error?: Error) => void;
523
+ /**
524
+ * _[Optional]_ Boolean to show or not show the gataca brand title
525
+ */
526
+ "hideBrandTitle"?: boolean;
527
+ /**
528
+ * GatacaLoginCompleted event, triggered with session data upon login success
529
+ */
530
+ "onGatacaLoginCompleted"?: (event: GatacaQrCustomEvent<any>) => void;
531
+ /**
532
+ * GatacaLoginFailed event, triggered with error upon login failure
533
+ */
534
+ "onGatacaLoginFailed"?: (event: GatacaQrCustomEvent<any>) => void;
535
+ /**
536
+ * _[Optional]_ Frequency in seconds to check if the session has been validated
537
+ */
538
+ "pollingFrequency"?: number;
539
+ /**
540
+ * _[Optional]_ Modifies the Modal description
541
+ */
542
+ "qrModalDescription"?: string;
543
+ /**
544
+ * _[Optional]_ Modifies the qr headline title
545
+ */
546
+ "qrModalTitle"?: string;
547
+ /**
548
+ * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
549
+ */
550
+ "qrRole"?: string;
551
+ /**
552
+ * _[Optional]_ Maximum time window to display the session
553
+ */
554
+ "sessionTimeout"?: number;
555
+ /**
556
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
557
+ */
558
+ "successCallback"?: (data?: any) => void;
559
+ /**
560
+ * _[Optional]_ Set to use v2 links. The create session must be providing both an authentication request and a session Id
561
+ */
562
+ "v2"?: boolean;
563
+ }
564
+ interface GatacaQrdisplay {
565
+ /**
566
+ * _[Optional]_ Size of the logo to display in percentage to the total size [0-1]. 0 means no logo will be displayed. Default is the GATACA logo. Recommended size is around 0.33
567
+ */
568
+ "logoSize"?: number;
569
+ /**
570
+ * _[Optional]_ Logo to display, just if the logo size is greater than 0. No logo is the GATACA logo.
571
+ */
572
+ "logoSrc"?: string;
573
+ /**
574
+ * _[Optional]_ QR Color.
575
+ */
576
+ "qrColor"?: string;
577
+ /**
578
+ * _[Mandatory]_ Sets the contents of the QR
579
+ */
580
+ "qrData"?: string;
581
+ /**
582
+ * _[Optional]_ Round usage
583
+ */
584
+ "rounded"?: boolean;
585
+ /**
586
+ * _[Optional]_ Size of the QR Displayed
587
+ */
588
+ "size"?: number;
589
+ }
590
+ interface GatacaQrws {
591
+ /**
592
+ * _[Optional]_ Set to refresh the session automatically upon expiration. By default it is false
593
+ */
594
+ "autorefresh"?: boolean;
595
+ /**
596
+ * _[Optional]_ Set to enable autoload when the QR is displayed. By default it is true
597
+ */
598
+ "autostart"?: boolean;
599
+ /**
600
+ * ***Mandatory just for V1*** Connect/Certify Server where the wallet will send the data
601
+ */
602
+ "callbackServer"?: string;
603
+ /**
604
+ * _[Optional]_ Display a link containing a dynamic link to invoke the wallet if closed
605
+ */
606
+ "dynamicLink"?: boolean;
607
+ /**
608
+ * ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
609
+ */
610
+ "errorCallback"?: (error?: Error) => void;
611
+ /**
612
+ * _[Optional]_ Boolean to show or not show the gataca brand title
613
+ */
614
+ "hideBrandTitle"?: boolean;
615
+ /**
616
+ * GatacaLoginCompleted event, triggered with session data upon login success
617
+ */
618
+ "onGatacaLoginCompleted"?: (event: GatacaQrwsCustomEvent<any>) => void;
619
+ /**
620
+ * GatacaLoginFailed event, triggered with error upon login failure
621
+ */
622
+ "onGatacaLoginFailed"?: (event: GatacaQrwsCustomEvent<any>) => void;
623
+ /**
624
+ * _[Optional]_ Modifies the Modal description
625
+ */
626
+ "qrModalDescription"?: string;
627
+ /**
628
+ * _[Optional]_ Modifies the qr headline title
629
+ */
630
+ "qrModalTitle"?: string;
631
+ /**
632
+ * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
633
+ */
634
+ "qrRole"?: string;
635
+ /**
636
+ * ***Mandatory*** Maximum time window to display the session and keep the websocket connection. It's needed to ensure the socket is closed.
637
+ */
638
+ "sessionTimeout"?: number;
639
+ /**
640
+ * ***Mandatory*** WS Endpoint on your service to be invoked upon display
641
+ */
642
+ "socketEndpoint"?: string;
643
+ /**
644
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
645
+ */
646
+ "successCallback"?: (data?: any) => void;
647
+ /**
648
+ * **RECOMMENDED** Set to use v2 links. The create session must be providing both an authentication request and a session Id
649
+ */
650
+ "v2"?: boolean;
651
+ /**
652
+ * **RECOMMENDED** Callback to invoke an a message has been received on the socket. It provides the socket itself and the message as parameters. If not used, the messages provided by the server on the Socket connection must conform to the WSReponse interface If used, an Event named **sessionMsg** must be triggered with a WSReponse as data
653
+ */
654
+ "wsOnMessage"?: (socket: WebSocket, msg: MessageEvent) => void;
655
+ /**
656
+ * [Optional] Function to send a message to the server upon socket creation
657
+ */
658
+ "wsOnOpen"?: (socket: WebSocket) => void;
659
+ }
660
+ interface GatacaSsibutton {
661
+ /**
662
+ * _[Optional]_ Set to refresh the session automatically upon expiration. By default it is false
663
+ */
664
+ "autorefresh"?: boolean;
665
+ /**
666
+ * _[Optional]_ In the case of being a button, modifies its text
667
+ */
668
+ "buttonText"?: string;
669
+ /**
670
+ * ***Mandatory just for V1*** Connect/Certify Server where the wallet will send the data
671
+ */
672
+ "callbackServer"?: string;
673
+ /**
674
+ * ***Mandatory*** Check status function to query the current status of the session The function must query a client endpoint to check the status. That endpoint must return an error if the session has expired.
675
+ */
676
+ "checkStatus"?: (
677
+ id?: string
678
+ ) => Promise<{ result: RESULT_STATUS1; data?: any }>;
679
+ /**
680
+ * ***Mandatory*** Create session function to generate a new Session Using V1, it can provide just a session Id Using V2, it must provide also the authentication request. The session Id is the id of the presentation definition
681
+ */
682
+ "createSession"?: () => Promise<{
683
+ sessionId: string;
684
+ authenticationRequest?: string;
685
+ }>;
686
+ /**
687
+ * _[Optional]_ Display a link containing a dynamic link to invoke the wallet if closed
688
+ */
689
+ "dynamicLink"?: boolean;
690
+ /**
691
+ * ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
692
+ */
693
+ "errorCallback"?: (error?: Error) => void;
694
+ /**
695
+ * _[Optional]_ Boolean to show or not show the gataca brand title
696
+ */
697
+ "hideBrandTitle"?: boolean;
698
+ /**
699
+ * GatacaLoginCompleted event, triggered with session data upon login success
700
+ */
701
+ "onGatacaLoginCompleted"?: (event: GatacaSsibuttonCustomEvent<any>) => void;
702
+ /**
703
+ * GatacaLoginFailed event, triggered with error upon login failure
704
+ */
705
+ "onGatacaLoginFailed"?: (event: GatacaSsibuttonCustomEvent<any>) => void;
706
+ /**
707
+ * _[Optional]_ Frequency in seconds to check if the session has been validated
708
+ */
709
+ "pollingFrequency"?: number;
710
+ /**
711
+ * _[Optional]_ Modifies the Modal description
712
+ */
713
+ "qrModalDescription"?: string;
714
+ /**
715
+ * _[Optional]_ Modifies the qr headline title
716
+ */
717
+ "qrModalTitle"?: string;
718
+ /**
719
+ * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
720
+ */
721
+ "qrRole"?: string;
722
+ /**
723
+ * _[Optional]_ Maximum time window to display the session
724
+ */
725
+ "sessionTimeout"?: number;
726
+ /**
727
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
728
+ */
729
+ "successCallback"?: (data?: any) => void;
730
+ /**
731
+ * _[Optional]_ Set to use v2 links. The create session must be providing both an authentication request and a session Id
732
+ */
733
+ "v2"?: boolean;
734
+ }
735
+ interface GatacaSsibuttonws {
736
+ /**
737
+ * _[Optional]_ Set to refresh the session automatically upon expiration. By default it is false
738
+ */
739
+ "autorefresh"?: boolean;
740
+ /**
741
+ * _[Optional]_ Set to enable autoload when the QR is displayed. By default it is true
742
+ */
743
+ "autostart"?: boolean;
744
+ /**
745
+ * _[Optional]_ In the case of being a button, modifies its text
746
+ */
747
+ "buttonText"?: string;
748
+ /**
749
+ * ***Mandatory just for V1*** Connect/Certify Server where the wallet will send the data
750
+ */
751
+ "callbackServer"?: string;
752
+ /**
753
+ * _[Optional]_ Display a link containing a dynamic link to invoke the wallet if closed
754
+ */
755
+ "dynamicLink"?: boolean;
756
+ /**
757
+ * ***Mandatory*** Callback fired upon session expired or invalid If not set, session error would not be handled An error containing information will be passed as parameter
758
+ */
759
+ "errorCallback"?: (error?: Error) => void;
760
+ /**
761
+ * _[Optional]_ Boolean to show or not show the gataca brand title
762
+ */
763
+ "hideBrandTitle"?: boolean;
764
+ /**
765
+ * GatacaLoginCompleted event, triggered with session data upon login success
766
+ */
767
+ "onGatacaLoginCompleted"?: (event: GatacaSsibuttonwsCustomEvent<any>) => void;
768
+ /**
769
+ * GatacaLoginFailed event, triggered with error upon login failure
770
+ */
771
+ "onGatacaLoginFailed"?: (event: GatacaSsibuttonwsCustomEvent<any>) => void;
772
+ /**
773
+ * _[Optional]_ Modifies the Modal description
774
+ */
775
+ "qrModalDescription"?: string;
776
+ /**
777
+ * _[Optional]_ Modifies the qr headline title
778
+ */
779
+ "qrModalTitle"?: string;
780
+ /**
781
+ * ***Mandatory*** Decide if scanning the credential as a verifier to request credentials or as an issuer too issue credentials. Options: connect | certify
782
+ */
783
+ "qrRole"?: string;
784
+ /**
785
+ * ***Mandatory*** Maximum time window to display the session and keep the websocket connection. It's needed to ensure the socket is closed.
786
+ */
787
+ "sessionTimeout"?: number;
788
+ /**
789
+ * ***Mandatory*** WS Endpoint on your service to be invoked upon display
790
+ */
791
+ "socketEndpoint"?: string;
792
+ /**
793
+ * ***Mandatory*** Callback fired upon session correctly verified If not set, session validation wouldn't trigger any action The session data and a possible token will be sent as parameters to the callback
794
+ */
795
+ "successCallback"?: (data?: any) => void;
796
+ /**
797
+ * **RECOMMENDED** Set to use v2 links. The create session must be providing both an authentication request and a session Id
798
+ */
799
+ "v2"?: boolean;
800
+ /**
801
+ * **RECOMMENDED** Callback to invoke an a message has been received on the socket. It provides the socket itself and the message as parameters. If not used, the messages provided by the server on the Socket connection must conform to the WSReponse interface If used, an Event named **sessionMsg** must be triggered with a WSReponse as data
802
+ */
803
+ "wsOnMessage"?: (socket: WebSocket, msg: MessageEvent) => void;
804
+ /**
805
+ * [Optional] Function to send a message to the server upon socket creation
806
+ */
807
+ "wsOnOpen"?: (socket: WebSocket) => void;
808
+ }
809
+ interface IntrinsicElements {
810
+ "gataca-autoqr": GatacaAutoqr;
811
+ "gataca-qr": GatacaQr;
812
+ "gataca-qrdisplay": GatacaQrdisplay;
813
+ "gataca-qrws": GatacaQrws;
814
+ "gataca-ssibutton": GatacaSsibutton;
815
+ "gataca-ssibuttonws": GatacaSsibuttonws;
816
+ }
817
+ }
818
+ export { LocalJSX as JSX };
819
+ declare module "@stencil/core" {
820
+ export namespace JSX {
821
+ interface IntrinsicElements {
822
+ "gataca-autoqr": LocalJSX.GatacaAutoqr & JSXBase.HTMLAttributes<HTMLGatacaAutoqrElement>;
823
+ "gataca-qr": LocalJSX.GatacaQr & JSXBase.HTMLAttributes<HTMLGatacaQrElement>;
824
+ "gataca-qrdisplay": LocalJSX.GatacaQrdisplay & JSXBase.HTMLAttributes<HTMLGatacaQrdisplayElement>;
825
+ "gataca-qrws": LocalJSX.GatacaQrws & JSXBase.HTMLAttributes<HTMLGatacaQrwsElement>;
826
+ "gataca-ssibutton": LocalJSX.GatacaSsibutton & JSXBase.HTMLAttributes<HTMLGatacaSsibuttonElement>;
827
+ "gataca-ssibuttonws": LocalJSX.GatacaSsibuttonws & JSXBase.HTMLAttributes<HTMLGatacaSsibuttonwsElement>;
828
+ }
829
+ }
830
+ }