@icure/cardinal-sdk 2.5.0 → 2.6.1

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.
@@ -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.OrPredicate': return OrPredicate.fromJSON(json, ignoreUnknownKeys);
12
11
  case 'com.icure.cardinal.sdk.model.filter.predicate.AlwaysPredicate': return AlwaysPredicate.fromJSON(json, ignoreUnknownKeys);
13
- case 'com.icure.cardinal.sdk.model.filter.predicate.KeyValuePredicate': return KeyValuePredicate.fromJSON(json, ignoreUnknownKeys);
14
- case 'com.icure.cardinal.sdk.model.filter.predicate.AndPredicate': return AndPredicate.fromJSON(json, ignoreUnknownKeys);
12
+ case 'com.icure.cardinal.sdk.model.filter.predicate.OrPredicate': return OrPredicate.fromJSON(json, ignoreUnknownKeys);
15
13
  case 'com.icure.cardinal.sdk.model.filter.predicate.NotPredicate': return NotPredicate.fromJSON(json, ignoreUnknownKeys);
14
+ case 'com.icure.cardinal.sdk.model.filter.predicate.AndPredicate': return AndPredicate.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
- constructor(partial: Partial<Enable2faRequest> & Pick<Enable2faRequest, "secret" | "otpLength">);
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 = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icure/cardinal-sdk",
3
- "version": "2.5.0",
3
+ "version": "2.6.1",
4
4
  "main": "cardinal-sdk-ts.mjs",
5
5
  "types": "cardinal-sdk-ts.d.mts",
6
6
  "devDependencies": {