@icure/cardinal-sdk 2.4.4 → 2.6.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.
- package/Kotlin-DateTime-library-kotlinx-datetime.mjs +1 -1
- package/api/RoleApi.d.mts +6 -4
- package/cardinal-sdk-ts.d.mts +78 -78
- package/cardinal-sdk-ts.mjs +39335 -39225
- package/cardinal-sdk.mjs +68660 -69414
- package/filters/ContactFilters.d.mts +9 -26
- package/filters/DocumentFilters.d.mts +6 -12
- package/filters/HealthElementFilters.d.mts +15 -41
- package/filters/MaintenanceTaskFilters.d.mts +2 -8
- package/filters/MessageFilters.d.mts +8 -22
- package/filters/PatientFilters.d.mts +24 -62
- package/filters/ServiceFilters.d.mts +19 -52
- package/kotlin-kotlin-stdlib.mjs +10 -10
- package/model/Agenda.d.mts +4 -4
- package/model/Agenda.mjs +4 -4
- package/model/CalendarItem.d.mts +9 -9
- package/model/CalendarItem.mjs +6 -6
- package/model/Group.d.mts +1 -1
- package/model/Group.mjs +1 -1
- package/model/Patient.d.mts +3 -3
- package/model/Patient.mjs +3 -3
- package/model/Role.d.mts +16 -6
- package/model/Role.mjs +20 -5
- package/model/User.d.mts +6 -0
- package/model/User.mjs +11 -0
- package/model/base/CryptoActor.mjs +3 -3
- package/model/embed/Partnership.d.mts +60 -3
- package/model/embed/Partnership.mjs +85 -4
- package/model/embed/Service.d.mts +306 -0
- package/model/embed/Service.mjs +214 -0
- package/model/embed/form/template/Field.d.mts +1 -1
- package/model/embed/form/template/StructureElement.mjs +6 -6
- package/model/filter/predicate/Predicate.d.mts +1 -1
- package/model/filter/predicate/Predicate.mjs +3 -3
- package/model/security/Enable2faRequest.d.mts +20 -1
- package/model/security/Enable2faRequest.mjs +23 -1
- package/package.json +1 -1
package/model/embed/Service.mjs
CHANGED
|
@@ -11,33 +11,140 @@ import { SecurityMetadata } from './SecurityMetadata.mjs';
|
|
|
11
11
|
export class DecryptedService {
|
|
12
12
|
constructor(partial) {
|
|
13
13
|
var _a;
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* The transactionId is used when a single service had to be split into parts for technical
|
|
17
|
+
* reasons. Several services with the same non null transaction id form one single service
|
|
18
|
+
*/
|
|
14
19
|
this.transactionId = undefined;
|
|
15
20
|
this.identifier = [];
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* Id of the contact during which the service is provided. Only used when the Service is emitted
|
|
24
|
+
* outside of its contact
|
|
25
|
+
*/
|
|
16
26
|
this.contactId = undefined;
|
|
17
27
|
this.subContactIds = undefined;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* List of IDs of all plans of actions (healthcare approaches) as a part of which the Service is
|
|
31
|
+
* provided. Only used when the Service is emitted outside of its contact
|
|
32
|
+
*/
|
|
18
33
|
this.plansOfActionIds = undefined;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* List of IDs of all healthcare elements for which the service is provided. Only used when the
|
|
37
|
+
* Service is emitted outside of its contact
|
|
38
|
+
*/
|
|
19
39
|
this.healthElementsIds = undefined;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* List of Ids of all forms linked to the Service. Only used when the Service is emitted outside of
|
|
43
|
+
* its contact.
|
|
44
|
+
*/
|
|
20
45
|
this.formIds = undefined;
|
|
21
46
|
this.secretForeignKeys = [];
|
|
47
|
+
/**
|
|
48
|
+
*
|
|
49
|
+
* The public patient key, encrypted here for separate Crypto Actors.
|
|
50
|
+
*/
|
|
22
51
|
this.cryptedForeignKeys = {};
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* The delegations giving access to connected healthcare information.
|
|
55
|
+
*/
|
|
23
56
|
this.delegations = {};
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* The contact secret encryption key used to encrypt the secured properties (like services for
|
|
60
|
+
* example), encrypted for separate Crypto Actors.
|
|
61
|
+
*/
|
|
24
62
|
this.encryptionKeys = {};
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
* Description / Unambiguous qualification (LOINC code) of the type of information contained in the
|
|
66
|
+
* service. Could be a code to qualify temperature, complaint, diagnostic, ...
|
|
67
|
+
*/
|
|
25
68
|
this.label = undefined;
|
|
69
|
+
/**
|
|
70
|
+
*
|
|
71
|
+
* Used for sorting services inside an upper object (A contact, a transaction, a FHIR bundle, ...)
|
|
72
|
+
*/
|
|
26
73
|
this.index = undefined;
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* Information contained in the service. Content is localized, using ISO language code as key
|
|
77
|
+
*/
|
|
27
78
|
this.content = {};
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* Information contained in the service. Content is localized, using ISO language code as key
|
|
82
|
+
*/
|
|
28
83
|
this.textIndexes = {};
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* The date (YYYYMMDDhhmmss) when the Service is noted to have started and also closes on the same
|
|
87
|
+
* date
|
|
88
|
+
*/
|
|
29
89
|
this.valueDate = undefined;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* The date (YYYYMMDDhhmmss) of the start of the Service
|
|
93
|
+
*/
|
|
30
94
|
this.openingDate = undefined;
|
|
95
|
+
/**
|
|
96
|
+
*
|
|
97
|
+
* The date (YYYYMMDDhhmmss) marking the end of the Service
|
|
98
|
+
*/
|
|
31
99
|
this.closingDate = undefined;
|
|
100
|
+
/**
|
|
101
|
+
*
|
|
102
|
+
* The timestamp (unix epoch in ms) of creation of the service, will be filled automatically if
|
|
103
|
+
* missing. Not enforced by the application server.
|
|
104
|
+
*/
|
|
32
105
|
this.created = undefined;
|
|
106
|
+
/**
|
|
107
|
+
*
|
|
108
|
+
* The date (unix epoch in ms) of the latest modification of the service, will be filled
|
|
109
|
+
* automatically if missing. Not enforced by the application server.
|
|
110
|
+
*/
|
|
33
111
|
this.modified = undefined;
|
|
34
112
|
this.endOfLife = undefined;
|
|
113
|
+
/**
|
|
114
|
+
*
|
|
115
|
+
* The id of the User that has created this service, if absent, falls back on the contact's author
|
|
116
|
+
*/
|
|
35
117
|
this.author = undefined;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* The id of the HealthcareParty that is responsible for this service, if absent, falls back on the
|
|
121
|
+
* contact's responsible
|
|
122
|
+
*/
|
|
36
123
|
this.responsible = undefined;
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* Text, comments on the Service provided
|
|
127
|
+
*/
|
|
37
128
|
this.comment = undefined;
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
* List of invoicing codes
|
|
132
|
+
*/
|
|
38
133
|
this.invoicingCodes = [];
|
|
134
|
+
/**
|
|
135
|
+
*
|
|
136
|
+
* Comments - Notes recorded by a HCP about this service
|
|
137
|
+
*/
|
|
39
138
|
this.notes = [];
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
* Links towards related services (possibly in other contacts)
|
|
142
|
+
*/
|
|
40
143
|
this.qualifiedLinks = {};
|
|
144
|
+
/**
|
|
145
|
+
*
|
|
146
|
+
* Links towards related services (possibly in other contacts)
|
|
147
|
+
*/
|
|
41
148
|
this.codes = [];
|
|
42
149
|
this.tags = [];
|
|
43
150
|
this.encryptedSelf = undefined;
|
|
@@ -217,33 +324,140 @@ export class DecryptedService {
|
|
|
217
324
|
export class EncryptedService {
|
|
218
325
|
constructor(partial) {
|
|
219
326
|
var _a;
|
|
327
|
+
/**
|
|
328
|
+
*
|
|
329
|
+
* The transactionId is used when a single service had to be split into parts for technical
|
|
330
|
+
* reasons. Several services with the same non null transaction id form one single service
|
|
331
|
+
*/
|
|
220
332
|
this.transactionId = undefined;
|
|
221
333
|
this.identifier = [];
|
|
334
|
+
/**
|
|
335
|
+
*
|
|
336
|
+
* Id of the contact during which the service is provided. Only used when the Service is emitted
|
|
337
|
+
* outside of its contact
|
|
338
|
+
*/
|
|
222
339
|
this.contactId = undefined;
|
|
223
340
|
this.subContactIds = undefined;
|
|
341
|
+
/**
|
|
342
|
+
*
|
|
343
|
+
* List of IDs of all plans of actions (healthcare approaches) as a part of which the Service is
|
|
344
|
+
* provided. Only used when the Service is emitted outside of its contact
|
|
345
|
+
*/
|
|
224
346
|
this.plansOfActionIds = undefined;
|
|
347
|
+
/**
|
|
348
|
+
*
|
|
349
|
+
* List of IDs of all healthcare elements for which the service is provided. Only used when the
|
|
350
|
+
* Service is emitted outside of its contact
|
|
351
|
+
*/
|
|
225
352
|
this.healthElementsIds = undefined;
|
|
353
|
+
/**
|
|
354
|
+
*
|
|
355
|
+
* List of Ids of all forms linked to the Service. Only used when the Service is emitted outside of
|
|
356
|
+
* its contact.
|
|
357
|
+
*/
|
|
226
358
|
this.formIds = undefined;
|
|
227
359
|
this.secretForeignKeys = [];
|
|
360
|
+
/**
|
|
361
|
+
*
|
|
362
|
+
* The public patient key, encrypted here for separate Crypto Actors.
|
|
363
|
+
*/
|
|
228
364
|
this.cryptedForeignKeys = {};
|
|
365
|
+
/**
|
|
366
|
+
*
|
|
367
|
+
* The delegations giving access to connected healthcare information.
|
|
368
|
+
*/
|
|
229
369
|
this.delegations = {};
|
|
370
|
+
/**
|
|
371
|
+
*
|
|
372
|
+
* The contact secret encryption key used to encrypt the secured properties (like services for
|
|
373
|
+
* example), encrypted for separate Crypto Actors.
|
|
374
|
+
*/
|
|
230
375
|
this.encryptionKeys = {};
|
|
376
|
+
/**
|
|
377
|
+
*
|
|
378
|
+
* Description / Unambiguous qualification (LOINC code) of the type of information contained in the
|
|
379
|
+
* service. Could be a code to qualify temperature, complaint, diagnostic, ...
|
|
380
|
+
*/
|
|
231
381
|
this.label = undefined;
|
|
382
|
+
/**
|
|
383
|
+
*
|
|
384
|
+
* Used for sorting services inside an upper object (A contact, a transaction, a FHIR bundle, ...)
|
|
385
|
+
*/
|
|
232
386
|
this.index = undefined;
|
|
387
|
+
/**
|
|
388
|
+
*
|
|
389
|
+
* Information contained in the service. Content is localized, using ISO language code as key
|
|
390
|
+
*/
|
|
233
391
|
this.content = {};
|
|
392
|
+
/**
|
|
393
|
+
*
|
|
394
|
+
* Information contained in the service. Content is localized, using ISO language code as key
|
|
395
|
+
*/
|
|
234
396
|
this.textIndexes = {};
|
|
397
|
+
/**
|
|
398
|
+
*
|
|
399
|
+
* The date (YYYYMMDDhhmmss) when the Service is noted to have started and also closes on the same
|
|
400
|
+
* date
|
|
401
|
+
*/
|
|
235
402
|
this.valueDate = undefined;
|
|
403
|
+
/**
|
|
404
|
+
*
|
|
405
|
+
* The date (YYYYMMDDhhmmss) of the start of the Service
|
|
406
|
+
*/
|
|
236
407
|
this.openingDate = undefined;
|
|
408
|
+
/**
|
|
409
|
+
*
|
|
410
|
+
* The date (YYYYMMDDhhmmss) marking the end of the Service
|
|
411
|
+
*/
|
|
237
412
|
this.closingDate = undefined;
|
|
413
|
+
/**
|
|
414
|
+
*
|
|
415
|
+
* The timestamp (unix epoch in ms) of creation of the service, will be filled automatically if
|
|
416
|
+
* missing. Not enforced by the application server.
|
|
417
|
+
*/
|
|
238
418
|
this.created = undefined;
|
|
419
|
+
/**
|
|
420
|
+
*
|
|
421
|
+
* The date (unix epoch in ms) of the latest modification of the service, will be filled
|
|
422
|
+
* automatically if missing. Not enforced by the application server.
|
|
423
|
+
*/
|
|
239
424
|
this.modified = undefined;
|
|
240
425
|
this.endOfLife = undefined;
|
|
426
|
+
/**
|
|
427
|
+
*
|
|
428
|
+
* The id of the User that has created this service, if absent, falls back on the contact's author
|
|
429
|
+
*/
|
|
241
430
|
this.author = undefined;
|
|
431
|
+
/**
|
|
432
|
+
*
|
|
433
|
+
* The id of the HealthcareParty that is responsible for this service, if absent, falls back on the
|
|
434
|
+
* contact's responsible
|
|
435
|
+
*/
|
|
242
436
|
this.responsible = undefined;
|
|
437
|
+
/**
|
|
438
|
+
*
|
|
439
|
+
* Text, comments on the Service provided
|
|
440
|
+
*/
|
|
243
441
|
this.comment = undefined;
|
|
442
|
+
/**
|
|
443
|
+
*
|
|
444
|
+
* List of invoicing codes
|
|
445
|
+
*/
|
|
244
446
|
this.invoicingCodes = [];
|
|
447
|
+
/**
|
|
448
|
+
*
|
|
449
|
+
* Comments - Notes recorded by a HCP about this service
|
|
450
|
+
*/
|
|
245
451
|
this.notes = [];
|
|
452
|
+
/**
|
|
453
|
+
*
|
|
454
|
+
* Links towards related services (possibly in other contacts)
|
|
455
|
+
*/
|
|
246
456
|
this.qualifiedLinks = {};
|
|
457
|
+
/**
|
|
458
|
+
*
|
|
459
|
+
* Links towards related services (possibly in other contacts)
|
|
460
|
+
*/
|
|
247
461
|
this.codes = [];
|
|
248
462
|
this.tags = [];
|
|
249
463
|
this.encryptedSelf = undefined;
|
|
@@ -17,4 +17,4 @@ import { TimePicker } from './TimePicker.mjs';
|
|
|
17
17
|
* validation rules, and optional codification and tagging.
|
|
18
18
|
* /
|
|
19
19
|
*/
|
|
20
|
-
export type Field =
|
|
20
|
+
export type Field = DropdownField | DateTimePicker | RadioButton | MultipleChoice | MeasureField | CheckBox | TextField | TimePicker | DatePicker | NumberField;
|
|
@@ -14,16 +14,16 @@ export var StructureElement;
|
|
|
14
14
|
(function (StructureElement) {
|
|
15
15
|
function fromJSON(json, ignoreUnknownKeys = false, path = ['StructureElement']) {
|
|
16
16
|
switch (json.$ktClass) {
|
|
17
|
-
case 'com.icure.cardinal.sdk.model.embed.form.template.
|
|
18
|
-
case 'com.icure.cardinal.sdk.model.embed.form.template.NumberField': return NumberField.fromJSON(json, ignoreUnknownKeys);
|
|
19
|
-
case 'com.icure.cardinal.sdk.model.embed.form.template.TimePicker': return TimePicker.fromJSON(json, ignoreUnknownKeys);
|
|
17
|
+
case 'com.icure.cardinal.sdk.model.embed.form.template.DropdownField': return DropdownField.fromJSON(json, ignoreUnknownKeys);
|
|
20
18
|
case 'com.icure.cardinal.sdk.model.embed.form.template.DateTimePicker': return DateTimePicker.fromJSON(json, ignoreUnknownKeys);
|
|
21
|
-
case 'com.icure.cardinal.sdk.model.embed.form.template.
|
|
19
|
+
case 'com.icure.cardinal.sdk.model.embed.form.template.RadioButton': return RadioButton.fromJSON(json, ignoreUnknownKeys);
|
|
22
20
|
case 'com.icure.cardinal.sdk.model.embed.form.template.MultipleChoice': return MultipleChoice.fromJSON(json, ignoreUnknownKeys);
|
|
23
|
-
case 'com.icure.cardinal.sdk.model.embed.form.template.
|
|
21
|
+
case 'com.icure.cardinal.sdk.model.embed.form.template.MeasureField': return MeasureField.fromJSON(json, ignoreUnknownKeys);
|
|
24
22
|
case 'com.icure.cardinal.sdk.model.embed.form.template.CheckBox': return CheckBox.fromJSON(json, ignoreUnknownKeys);
|
|
25
|
-
case 'com.icure.cardinal.sdk.model.embed.form.template.DatePicker': return DatePicker.fromJSON(json, ignoreUnknownKeys);
|
|
26
23
|
case 'com.icure.cardinal.sdk.model.embed.form.template.TextField': return TextField.fromJSON(json, ignoreUnknownKeys);
|
|
24
|
+
case 'com.icure.cardinal.sdk.model.embed.form.template.TimePicker': return TimePicker.fromJSON(json, ignoreUnknownKeys);
|
|
25
|
+
case 'com.icure.cardinal.sdk.model.embed.form.template.DatePicker': return DatePicker.fromJSON(json, ignoreUnknownKeys);
|
|
26
|
+
case 'com.icure.cardinal.sdk.model.embed.form.template.NumberField': return NumberField.fromJSON(json, ignoreUnknownKeys);
|
|
27
27
|
case 'com.icure.cardinal.sdk.model.embed.form.template.FieldsGroup': return FieldsGroup.fromJSON(json, ignoreUnknownKeys);
|
|
28
28
|
default: throw new Error('Unexpected discriminator for StructureElement: ' + json.$ktClass);
|
|
29
29
|
}
|
|
@@ -9,7 +9,7 @@ import { OrPredicate } from './OrPredicate.mjs';
|
|
|
9
9
|
* chain.
|
|
10
10
|
* /
|
|
11
11
|
*/
|
|
12
|
-
export type Predicate =
|
|
12
|
+
export type Predicate = AlwaysPredicate | OrPredicate | NotPredicate | AndPredicate | KeyValuePredicate;
|
|
13
13
|
export declare namespace Predicate {
|
|
14
14
|
function fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Predicate;
|
|
15
15
|
}
|
|
@@ -8,11 +8,11 @@ export var Predicate;
|
|
|
8
8
|
(function (Predicate) {
|
|
9
9
|
function fromJSON(json, ignoreUnknownKeys = false, path = ['Predicate']) {
|
|
10
10
|
switch (json.$ktClass) {
|
|
11
|
-
case 'com.icure.cardinal.sdk.model.filter.predicate.
|
|
11
|
+
case 'com.icure.cardinal.sdk.model.filter.predicate.AlwaysPredicate': return AlwaysPredicate.fromJSON(json, ignoreUnknownKeys);
|
|
12
|
+
case 'com.icure.cardinal.sdk.model.filter.predicate.OrPredicate': return OrPredicate.fromJSON(json, ignoreUnknownKeys);
|
|
12
13
|
case 'com.icure.cardinal.sdk.model.filter.predicate.NotPredicate': return NotPredicate.fromJSON(json, ignoreUnknownKeys);
|
|
13
14
|
case 'com.icure.cardinal.sdk.model.filter.predicate.AndPredicate': return AndPredicate.fromJSON(json, ignoreUnknownKeys);
|
|
14
|
-
case 'com.icure.cardinal.sdk.model.filter.predicate.
|
|
15
|
-
case 'com.icure.cardinal.sdk.model.filter.predicate.AlwaysPredicate': return AlwaysPredicate.fromJSON(json, ignoreUnknownKeys);
|
|
15
|
+
case 'com.icure.cardinal.sdk.model.filter.predicate.KeyValuePredicate': return KeyValuePredicate.fromJSON(json, ignoreUnknownKeys);
|
|
16
16
|
default: throw new Error('Unexpected discriminator for Predicate: ' + json.$ktClass);
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -14,7 +14,26 @@ export declare class Enable2faRequest {
|
|
|
14
14
|
* The number of digits in each generated one-time password.
|
|
15
15
|
*/
|
|
16
16
|
otpLength: number;
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
* The otp at the current time for the provided configuration
|
|
21
|
+
*/
|
|
22
|
+
otp: string;
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* If null defaults to SHA1 as many authenticator apps still do not support different algorithms
|
|
27
|
+
*/
|
|
28
|
+
algorithm: Enable2faRequest.Algorithm | undefined;
|
|
29
|
+
constructor(partial: Partial<Enable2faRequest> & Pick<Enable2faRequest, "secret" | "otpLength" | "otp">);
|
|
18
30
|
toJSON(): object;
|
|
19
31
|
static fromJSON(json: any, ignoreUnknownKeys?: boolean, path?: Array<string>): Enable2faRequest;
|
|
20
32
|
}
|
|
33
|
+
export declare namespace Enable2faRequest {
|
|
34
|
+
enum Algorithm {
|
|
35
|
+
Sha1 = "Sha1",
|
|
36
|
+
Sha256 = "Sha256",
|
|
37
|
+
Sha512 = "Sha512"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// auto-generated file
|
|
2
|
-
import { expectNumber, expectString, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
2
|
+
import { expectNumber, expectString, expectStringEnum, extractEntry } from '../../internal/JsonDecodeUtils.mjs';
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
5
|
*
|
|
@@ -7,13 +7,25 @@ import { expectNumber, expectString, extractEntry } from '../../internal/JsonDec
|
|
|
7
7
|
*/
|
|
8
8
|
export class Enable2faRequest {
|
|
9
9
|
constructor(partial) {
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* If null defaults to SHA1 as many authenticator apps still do not support different algorithms
|
|
14
|
+
*/
|
|
15
|
+
this.algorithm = undefined;
|
|
10
16
|
this.secret = partial.secret;
|
|
11
17
|
this.otpLength = partial.otpLength;
|
|
18
|
+
this.otp = partial.otp;
|
|
19
|
+
if ('algorithm' in partial)
|
|
20
|
+
this.algorithm = partial.algorithm;
|
|
12
21
|
}
|
|
13
22
|
toJSON() {
|
|
14
23
|
const res = {};
|
|
15
24
|
res['secret'] = this.secret;
|
|
16
25
|
res['otpLength'] = this.otpLength;
|
|
26
|
+
res['otp'] = this.otp;
|
|
27
|
+
if (this.algorithm != undefined)
|
|
28
|
+
res['algorithm'] = this.algorithm;
|
|
17
29
|
return res;
|
|
18
30
|
}
|
|
19
31
|
static fromJSON(json, ignoreUnknownKeys = false, path = ['Enable2faRequest']) {
|
|
@@ -23,6 +35,8 @@ export class Enable2faRequest {
|
|
|
23
35
|
const res = new Enable2faRequest({
|
|
24
36
|
secret: expectString(extractEntry(jCpy, 'secret', true, path), false, [...path, ".secret"]),
|
|
25
37
|
otpLength: expectNumber(extractEntry(jCpy, 'otpLength', true, path), false, true, [...path, ".otpLength"]),
|
|
38
|
+
otp: expectString(extractEntry(jCpy, 'otp', true, path), false, [...path, ".otp"]),
|
|
39
|
+
algorithm: expectStringEnum(extractEntry(jCpy, 'algorithm', false, path), true, [...path, ".algorithm"], Enable2faRequest.Algorithm, 'Enable2faRequest.Algorithm'),
|
|
26
40
|
});
|
|
27
41
|
if (!ignoreUnknownKeys) {
|
|
28
42
|
const unused = Object.keys(jCpy);
|
|
@@ -32,3 +46,11 @@ export class Enable2faRequest {
|
|
|
32
46
|
return res;
|
|
33
47
|
}
|
|
34
48
|
}
|
|
49
|
+
(function (Enable2faRequest) {
|
|
50
|
+
let Algorithm;
|
|
51
|
+
(function (Algorithm) {
|
|
52
|
+
Algorithm["Sha1"] = "Sha1";
|
|
53
|
+
Algorithm["Sha256"] = "Sha256";
|
|
54
|
+
Algorithm["Sha512"] = "Sha512";
|
|
55
|
+
})(Algorithm = Enable2faRequest.Algorithm || (Enable2faRequest.Algorithm = {}));
|
|
56
|
+
})(Enable2faRequest || (Enable2faRequest = {}));
|