@easyedu/js-lsm-api 1.87.0 → 1.89.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 (44) hide show
  1. package/README.md +2 -2
  2. package/dist/esm/models/CertificateCanvasElement.d.ts +13 -1
  3. package/dist/esm/models/CertificateCanvasElement.js +36 -48
  4. package/dist/esm/models/CertificateCanvasImageElement.d.ts +0 -13
  5. package/dist/esm/models/CertificateCanvasImageElement.js +0 -10
  6. package/dist/esm/models/CertificateCanvasLineElement.d.ts +0 -13
  7. package/dist/esm/models/CertificateCanvasLineElement.js +0 -10
  8. package/dist/esm/models/CertificateCanvasPortalLogoElement.d.ts +0 -13
  9. package/dist/esm/models/CertificateCanvasPortalLogoElement.js +0 -10
  10. package/dist/esm/models/CertificateCanvasShapeElement.d.ts +0 -13
  11. package/dist/esm/models/CertificateCanvasShapeElement.js +0 -10
  12. package/dist/esm/models/CertificateCanvasTextElement.d.ts +0 -13
  13. package/dist/esm/models/CertificateCanvasTextElement.js +0 -10
  14. package/dist/esm/models/CertificateCanvasVerificationQrElement.d.ts +0 -13
  15. package/dist/esm/models/CertificateCanvasVerificationQrElement.js +0 -10
  16. package/dist/models/CertificateCanvasElement.d.ts +13 -1
  17. package/dist/models/CertificateCanvasElement.js +30 -42
  18. package/dist/models/CertificateCanvasImageElement.d.ts +0 -13
  19. package/dist/models/CertificateCanvasImageElement.js +1 -11
  20. package/dist/models/CertificateCanvasLineElement.d.ts +0 -13
  21. package/dist/models/CertificateCanvasLineElement.js +0 -11
  22. package/dist/models/CertificateCanvasPortalLogoElement.d.ts +0 -13
  23. package/dist/models/CertificateCanvasPortalLogoElement.js +0 -11
  24. package/dist/models/CertificateCanvasShapeElement.d.ts +0 -13
  25. package/dist/models/CertificateCanvasShapeElement.js +0 -11
  26. package/dist/models/CertificateCanvasTextElement.d.ts +0 -13
  27. package/dist/models/CertificateCanvasTextElement.js +1 -11
  28. package/dist/models/CertificateCanvasVerificationQrElement.d.ts +0 -13
  29. package/dist/models/CertificateCanvasVerificationQrElement.js +0 -11
  30. package/docs/CertificateCanvasElement.md +2 -2
  31. package/docs/CertificateCanvasImageElement.md +0 -2
  32. package/docs/CertificateCanvasLineElement.md +0 -2
  33. package/docs/CertificateCanvasPortalLogoElement.md +0 -2
  34. package/docs/CertificateCanvasShapeElement.md +0 -2
  35. package/docs/CertificateCanvasTextElement.md +0 -2
  36. package/docs/CertificateCanvasVerificationQrElement.md +0 -2
  37. package/package.json +1 -1
  38. package/src/models/CertificateCanvasElement.ts +31 -43
  39. package/src/models/CertificateCanvasImageElement.ts +0 -17
  40. package/src/models/CertificateCanvasLineElement.ts +0 -19
  41. package/src/models/CertificateCanvasPortalLogoElement.ts +0 -19
  42. package/src/models/CertificateCanvasShapeElement.ts +0 -19
  43. package/src/models/CertificateCanvasTextElement.ts +0 -17
  44. package/src/models/CertificateCanvasVerificationQrElement.ts +0 -19
@@ -21,12 +21,6 @@ export interface CertificateCanvasImageElement {
21
21
  * @memberof CertificateCanvasImageElement
22
22
  */
23
23
  id: string;
24
- /**
25
- *
26
- * @type {CertificateCanvasImageElementTypeEnum}
27
- * @memberof CertificateCanvasImageElement
28
- */
29
- type: CertificateCanvasImageElementTypeEnum;
30
24
  /**
31
25
  *
32
26
  * @type {number}
@@ -64,13 +58,6 @@ export interface CertificateCanvasImageElement {
64
58
  */
65
59
  fit?: CertificateCanvasImageElementFitEnum;
66
60
  }
67
- /**
68
- * @export
69
- */
70
- export declare const CertificateCanvasImageElementTypeEnum: {
71
- readonly Image: "image";
72
- };
73
- export type CertificateCanvasImageElementTypeEnum = typeof CertificateCanvasImageElementTypeEnum[keyof typeof CertificateCanvasImageElementTypeEnum];
74
61
  /**
75
62
  * @export
76
63
  */
@@ -13,18 +13,12 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CertificateCanvasImageElementFitEnum = exports.CertificateCanvasImageElementTypeEnum = void 0;
16
+ exports.CertificateCanvasImageElementFitEnum = void 0;
17
17
  exports.instanceOfCertificateCanvasImageElement = instanceOfCertificateCanvasImageElement;
18
18
  exports.CertificateCanvasImageElementFromJSON = CertificateCanvasImageElementFromJSON;
19
19
  exports.CertificateCanvasImageElementFromJSONTyped = CertificateCanvasImageElementFromJSONTyped;
20
20
  exports.CertificateCanvasImageElementToJSON = CertificateCanvasImageElementToJSON;
21
21
  exports.CertificateCanvasImageElementToJSONTyped = CertificateCanvasImageElementToJSONTyped;
22
- /**
23
- * @export
24
- */
25
- exports.CertificateCanvasImageElementTypeEnum = {
26
- Image: 'image'
27
- };
28
22
  /**
29
23
  * @export
30
24
  */
@@ -39,8 +33,6 @@ exports.CertificateCanvasImageElementFitEnum = {
39
33
  function instanceOfCertificateCanvasImageElement(value) {
40
34
  if (!('id' in value) || value['id'] === undefined)
41
35
  return false;
42
- if (!('type' in value) || value['type'] === undefined)
43
- return false;
44
36
  if (!('x' in value) || value['x'] === undefined)
45
37
  return false;
46
38
  if (!('y' in value) || value['y'] === undefined)
@@ -62,7 +54,6 @@ function CertificateCanvasImageElementFromJSONTyped(json, ignoreDiscriminator) {
62
54
  }
63
55
  return {
64
56
  'id': json['id'],
65
- 'type': json['type'],
66
57
  'x': json['x'],
67
58
  'y': json['y'],
68
59
  'width': json['width'],
@@ -80,7 +71,6 @@ function CertificateCanvasImageElementToJSONTyped(value, ignoreDiscriminator = f
80
71
  }
81
72
  return {
82
73
  'id': value['id'],
83
- 'type': value['type'],
84
74
  'x': value['x'],
85
75
  'y': value['y'],
86
76
  'width': value['width'],
@@ -21,12 +21,6 @@ export interface CertificateCanvasLineElement {
21
21
  * @memberof CertificateCanvasLineElement
22
22
  */
23
23
  id: string;
24
- /**
25
- *
26
- * @type {CertificateCanvasLineElementTypeEnum}
27
- * @memberof CertificateCanvasLineElement
28
- */
29
- type: CertificateCanvasLineElementTypeEnum;
30
24
  /**
31
25
  *
32
26
  * @type {number}
@@ -64,13 +58,6 @@ export interface CertificateCanvasLineElement {
64
58
  */
65
59
  strokeWidth: number;
66
60
  }
67
- /**
68
- * @export
69
- */
70
- export declare const CertificateCanvasLineElementTypeEnum: {
71
- readonly Line: "line";
72
- };
73
- export type CertificateCanvasLineElementTypeEnum = typeof CertificateCanvasLineElementTypeEnum[keyof typeof CertificateCanvasLineElementTypeEnum];
74
61
  /**
75
62
  * Check if a given object implements the CertificateCanvasLineElement interface.
76
63
  */
@@ -13,26 +13,17 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CertificateCanvasLineElementTypeEnum = void 0;
17
16
  exports.instanceOfCertificateCanvasLineElement = instanceOfCertificateCanvasLineElement;
18
17
  exports.CertificateCanvasLineElementFromJSON = CertificateCanvasLineElementFromJSON;
19
18
  exports.CertificateCanvasLineElementFromJSONTyped = CertificateCanvasLineElementFromJSONTyped;
20
19
  exports.CertificateCanvasLineElementToJSON = CertificateCanvasLineElementToJSON;
21
20
  exports.CertificateCanvasLineElementToJSONTyped = CertificateCanvasLineElementToJSONTyped;
22
- /**
23
- * @export
24
- */
25
- exports.CertificateCanvasLineElementTypeEnum = {
26
- Line: 'line'
27
- };
28
21
  /**
29
22
  * Check if a given object implements the CertificateCanvasLineElement interface.
30
23
  */
31
24
  function instanceOfCertificateCanvasLineElement(value) {
32
25
  if (!('id' in value) || value['id'] === undefined)
33
26
  return false;
34
- if (!('type' in value) || value['type'] === undefined)
35
- return false;
36
27
  if (!('x' in value) || value['x'] === undefined)
37
28
  return false;
38
29
  if (!('y' in value) || value['y'] === undefined)
@@ -56,7 +47,6 @@ function CertificateCanvasLineElementFromJSONTyped(json, ignoreDiscriminator) {
56
47
  }
57
48
  return {
58
49
  'id': json['id'],
59
- 'type': json['type'],
60
50
  'x': json['x'],
61
51
  'y': json['y'],
62
52
  'width': json['width'],
@@ -74,7 +64,6 @@ function CertificateCanvasLineElementToJSONTyped(value, ignoreDiscriminator = fa
74
64
  }
75
65
  return {
76
66
  'id': value['id'],
77
- 'type': value['type'],
78
67
  'x': value['x'],
79
68
  'y': value['y'],
80
69
  'width': value['width'],
@@ -21,12 +21,6 @@ export interface CertificateCanvasPortalLogoElement {
21
21
  * @memberof CertificateCanvasPortalLogoElement
22
22
  */
23
23
  id: string;
24
- /**
25
- *
26
- * @type {CertificateCanvasPortalLogoElementTypeEnum}
27
- * @memberof CertificateCanvasPortalLogoElement
28
- */
29
- type: CertificateCanvasPortalLogoElementTypeEnum;
30
24
  /**
31
25
  *
32
26
  * @type {number}
@@ -52,13 +46,6 @@ export interface CertificateCanvasPortalLogoElement {
52
46
  */
53
47
  height: number;
54
48
  }
55
- /**
56
- * @export
57
- */
58
- export declare const CertificateCanvasPortalLogoElementTypeEnum: {
59
- readonly PortalLogo: "portal_logo";
60
- };
61
- export type CertificateCanvasPortalLogoElementTypeEnum = typeof CertificateCanvasPortalLogoElementTypeEnum[keyof typeof CertificateCanvasPortalLogoElementTypeEnum];
62
49
  /**
63
50
  * Check if a given object implements the CertificateCanvasPortalLogoElement interface.
64
51
  */
@@ -13,26 +13,17 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CertificateCanvasPortalLogoElementTypeEnum = void 0;
17
16
  exports.instanceOfCertificateCanvasPortalLogoElement = instanceOfCertificateCanvasPortalLogoElement;
18
17
  exports.CertificateCanvasPortalLogoElementFromJSON = CertificateCanvasPortalLogoElementFromJSON;
19
18
  exports.CertificateCanvasPortalLogoElementFromJSONTyped = CertificateCanvasPortalLogoElementFromJSONTyped;
20
19
  exports.CertificateCanvasPortalLogoElementToJSON = CertificateCanvasPortalLogoElementToJSON;
21
20
  exports.CertificateCanvasPortalLogoElementToJSONTyped = CertificateCanvasPortalLogoElementToJSONTyped;
22
- /**
23
- * @export
24
- */
25
- exports.CertificateCanvasPortalLogoElementTypeEnum = {
26
- PortalLogo: 'portal_logo'
27
- };
28
21
  /**
29
22
  * Check if a given object implements the CertificateCanvasPortalLogoElement interface.
30
23
  */
31
24
  function instanceOfCertificateCanvasPortalLogoElement(value) {
32
25
  if (!('id' in value) || value['id'] === undefined)
33
26
  return false;
34
- if (!('type' in value) || value['type'] === undefined)
35
- return false;
36
27
  if (!('x' in value) || value['x'] === undefined)
37
28
  return false;
38
29
  if (!('y' in value) || value['y'] === undefined)
@@ -52,7 +43,6 @@ function CertificateCanvasPortalLogoElementFromJSONTyped(json, ignoreDiscriminat
52
43
  }
53
44
  return {
54
45
  'id': json['id'],
55
- 'type': json['type'],
56
46
  'x': json['x'],
57
47
  'y': json['y'],
58
48
  'width': json['width'],
@@ -68,7 +58,6 @@ function CertificateCanvasPortalLogoElementToJSONTyped(value, ignoreDiscriminato
68
58
  }
69
59
  return {
70
60
  'id': value['id'],
71
- 'type': value['type'],
72
61
  'x': value['x'],
73
62
  'y': value['y'],
74
63
  'width': value['width'],
@@ -21,12 +21,6 @@ export interface CertificateCanvasShapeElement {
21
21
  * @memberof CertificateCanvasShapeElement
22
22
  */
23
23
  id: string;
24
- /**
25
- *
26
- * @type {CertificateCanvasShapeElementTypeEnum}
27
- * @memberof CertificateCanvasShapeElement
28
- */
29
- type: CertificateCanvasShapeElementTypeEnum;
30
24
  /**
31
25
  *
32
26
  * @type {number}
@@ -70,13 +64,6 @@ export interface CertificateCanvasShapeElement {
70
64
  */
71
65
  strokeWidth: number;
72
66
  }
73
- /**
74
- * @export
75
- */
76
- export declare const CertificateCanvasShapeElementTypeEnum: {
77
- readonly Shape: "shape";
78
- };
79
- export type CertificateCanvasShapeElementTypeEnum = typeof CertificateCanvasShapeElementTypeEnum[keyof typeof CertificateCanvasShapeElementTypeEnum];
80
67
  /**
81
68
  * Check if a given object implements the CertificateCanvasShapeElement interface.
82
69
  */
@@ -13,26 +13,17 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CertificateCanvasShapeElementTypeEnum = void 0;
17
16
  exports.instanceOfCertificateCanvasShapeElement = instanceOfCertificateCanvasShapeElement;
18
17
  exports.CertificateCanvasShapeElementFromJSON = CertificateCanvasShapeElementFromJSON;
19
18
  exports.CertificateCanvasShapeElementFromJSONTyped = CertificateCanvasShapeElementFromJSONTyped;
20
19
  exports.CertificateCanvasShapeElementToJSON = CertificateCanvasShapeElementToJSON;
21
20
  exports.CertificateCanvasShapeElementToJSONTyped = CertificateCanvasShapeElementToJSONTyped;
22
- /**
23
- * @export
24
- */
25
- exports.CertificateCanvasShapeElementTypeEnum = {
26
- Shape: 'shape'
27
- };
28
21
  /**
29
22
  * Check if a given object implements the CertificateCanvasShapeElement interface.
30
23
  */
31
24
  function instanceOfCertificateCanvasShapeElement(value) {
32
25
  if (!('id' in value) || value['id'] === undefined)
33
26
  return false;
34
- if (!('type' in value) || value['type'] === undefined)
35
- return false;
36
27
  if (!('x' in value) || value['x'] === undefined)
37
28
  return false;
38
29
  if (!('y' in value) || value['y'] === undefined)
@@ -58,7 +49,6 @@ function CertificateCanvasShapeElementFromJSONTyped(json, ignoreDiscriminator) {
58
49
  }
59
50
  return {
60
51
  'id': json['id'],
61
- 'type': json['type'],
62
52
  'x': json['x'],
63
53
  'y': json['y'],
64
54
  'width': json['width'],
@@ -77,7 +67,6 @@ function CertificateCanvasShapeElementToJSONTyped(value, ignoreDiscriminator = f
77
67
  }
78
68
  return {
79
69
  'id': value['id'],
80
- 'type': value['type'],
81
70
  'x': value['x'],
82
71
  'y': value['y'],
83
72
  'width': value['width'],
@@ -21,12 +21,6 @@ export interface CertificateCanvasTextElement {
21
21
  * @memberof CertificateCanvasTextElement
22
22
  */
23
23
  id: string;
24
- /**
25
- *
26
- * @type {CertificateCanvasTextElementTypeEnum}
27
- * @memberof CertificateCanvasTextElement
28
- */
29
- type: CertificateCanvasTextElementTypeEnum;
30
24
  /**
31
25
  *
32
26
  * @type {number}
@@ -82,13 +76,6 @@ export interface CertificateCanvasTextElement {
82
76
  */
83
77
  align?: CertificateCanvasTextElementAlignEnum;
84
78
  }
85
- /**
86
- * @export
87
- */
88
- export declare const CertificateCanvasTextElementTypeEnum: {
89
- readonly Text: "text";
90
- };
91
- export type CertificateCanvasTextElementTypeEnum = typeof CertificateCanvasTextElementTypeEnum[keyof typeof CertificateCanvasTextElementTypeEnum];
92
79
  /**
93
80
  * @export
94
81
  */
@@ -13,18 +13,12 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CertificateCanvasTextElementAlignEnum = exports.CertificateCanvasTextElementFontFamilyEnum = exports.CertificateCanvasTextElementTypeEnum = void 0;
16
+ exports.CertificateCanvasTextElementAlignEnum = exports.CertificateCanvasTextElementFontFamilyEnum = void 0;
17
17
  exports.instanceOfCertificateCanvasTextElement = instanceOfCertificateCanvasTextElement;
18
18
  exports.CertificateCanvasTextElementFromJSON = CertificateCanvasTextElementFromJSON;
19
19
  exports.CertificateCanvasTextElementFromJSONTyped = CertificateCanvasTextElementFromJSONTyped;
20
20
  exports.CertificateCanvasTextElementToJSON = CertificateCanvasTextElementToJSON;
21
21
  exports.CertificateCanvasTextElementToJSONTyped = CertificateCanvasTextElementToJSONTyped;
22
- /**
23
- * @export
24
- */
25
- exports.CertificateCanvasTextElementTypeEnum = {
26
- Text: 'text'
27
- };
28
22
  /**
29
23
  * @export
30
24
  */
@@ -45,8 +39,6 @@ exports.CertificateCanvasTextElementAlignEnum = {
45
39
  function instanceOfCertificateCanvasTextElement(value) {
46
40
  if (!('id' in value) || value['id'] === undefined)
47
41
  return false;
48
- if (!('type' in value) || value['type'] === undefined)
49
- return false;
50
42
  if (!('x' in value) || value['x'] === undefined)
51
43
  return false;
52
44
  if (!('y' in value) || value['y'] === undefined)
@@ -74,7 +66,6 @@ function CertificateCanvasTextElementFromJSONTyped(json, ignoreDiscriminator) {
74
66
  }
75
67
  return {
76
68
  'id': json['id'],
77
- 'type': json['type'],
78
69
  'x': json['x'],
79
70
  'y': json['y'],
80
71
  'width': json['width'],
@@ -95,7 +86,6 @@ function CertificateCanvasTextElementToJSONTyped(value, ignoreDiscriminator = fa
95
86
  }
96
87
  return {
97
88
  'id': value['id'],
98
- 'type': value['type'],
99
89
  'x': value['x'],
100
90
  'y': value['y'],
101
91
  'width': value['width'],
@@ -21,12 +21,6 @@ export interface CertificateCanvasVerificationQrElement {
21
21
  * @memberof CertificateCanvasVerificationQrElement
22
22
  */
23
23
  id: string;
24
- /**
25
- *
26
- * @type {CertificateCanvasVerificationQrElementTypeEnum}
27
- * @memberof CertificateCanvasVerificationQrElement
28
- */
29
- type: CertificateCanvasVerificationQrElementTypeEnum;
30
24
  /**
31
25
  *
32
26
  * @type {number}
@@ -52,13 +46,6 @@ export interface CertificateCanvasVerificationQrElement {
52
46
  */
53
47
  height: number;
54
48
  }
55
- /**
56
- * @export
57
- */
58
- export declare const CertificateCanvasVerificationQrElementTypeEnum: {
59
- readonly VerificationQr: "verification_qr";
60
- };
61
- export type CertificateCanvasVerificationQrElementTypeEnum = typeof CertificateCanvasVerificationQrElementTypeEnum[keyof typeof CertificateCanvasVerificationQrElementTypeEnum];
62
49
  /**
63
50
  * Check if a given object implements the CertificateCanvasVerificationQrElement interface.
64
51
  */
@@ -13,26 +13,17 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.CertificateCanvasVerificationQrElementTypeEnum = void 0;
17
16
  exports.instanceOfCertificateCanvasVerificationQrElement = instanceOfCertificateCanvasVerificationQrElement;
18
17
  exports.CertificateCanvasVerificationQrElementFromJSON = CertificateCanvasVerificationQrElementFromJSON;
19
18
  exports.CertificateCanvasVerificationQrElementFromJSONTyped = CertificateCanvasVerificationQrElementFromJSONTyped;
20
19
  exports.CertificateCanvasVerificationQrElementToJSON = CertificateCanvasVerificationQrElementToJSON;
21
20
  exports.CertificateCanvasVerificationQrElementToJSONTyped = CertificateCanvasVerificationQrElementToJSONTyped;
22
- /**
23
- * @export
24
- */
25
- exports.CertificateCanvasVerificationQrElementTypeEnum = {
26
- VerificationQr: 'verification_qr'
27
- };
28
21
  /**
29
22
  * Check if a given object implements the CertificateCanvasVerificationQrElement interface.
30
23
  */
31
24
  function instanceOfCertificateCanvasVerificationQrElement(value) {
32
25
  if (!('id' in value) || value['id'] === undefined)
33
26
  return false;
34
- if (!('type' in value) || value['type'] === undefined)
35
- return false;
36
27
  if (!('x' in value) || value['x'] === undefined)
37
28
  return false;
38
29
  if (!('y' in value) || value['y'] === undefined)
@@ -52,7 +43,6 @@ function CertificateCanvasVerificationQrElementFromJSONTyped(json, ignoreDiscrim
52
43
  }
53
44
  return {
54
45
  'id': json['id'],
55
- 'type': json['type'],
56
46
  'x': json['x'],
57
47
  'y': json['y'],
58
48
  'width': json['width'],
@@ -68,7 +58,6 @@ function CertificateCanvasVerificationQrElementToJSONTyped(value, ignoreDiscrimi
68
58
  }
69
59
  return {
70
60
  'id': value['id'],
71
- 'type': value['type'],
72
61
  'x': value['x'],
73
62
  'y': value['y'],
74
63
  'width': value['width'],
@@ -7,8 +7,8 @@ A constrained certificate-canvas-v1 element.
7
7
 
8
8
  Name | Type
9
9
  ------------ | -------------
10
- `id` | string
11
10
  `type` | string
11
+ `id` | string
12
12
  `x` | number
13
13
  `y` | number
14
14
  `width` | number
@@ -31,8 +31,8 @@ import type { CertificateCanvasElement } from '@easyedu/js-lsm-api'
31
31
 
32
32
  // TODO: Update the object below with actual values
33
33
  const example = {
34
- "id": null,
35
34
  "type": null,
35
+ "id": null,
36
36
  "x": null,
37
37
  "y": null,
38
38
  "width": null,
@@ -7,7 +7,6 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
- `type` | string
11
10
  `x` | number
12
11
  `y` | number
13
12
  `width` | number
@@ -23,7 +22,6 @@ import type { CertificateCanvasImageElement } from '@easyedu/js-lsm-api'
23
22
  // TODO: Update the object below with actual values
24
23
  const example = {
25
24
  "id": null,
26
- "type": null,
27
25
  "x": null,
28
26
  "y": null,
29
27
  "width": null,
@@ -7,7 +7,6 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
- `type` | string
11
10
  `x` | number
12
11
  `y` | number
13
12
  `width` | number
@@ -23,7 +22,6 @@ import type { CertificateCanvasLineElement } from '@easyedu/js-lsm-api'
23
22
  // TODO: Update the object below with actual values
24
23
  const example = {
25
24
  "id": null,
26
- "type": null,
27
25
  "x": null,
28
26
  "y": null,
29
27
  "width": null,
@@ -7,7 +7,6 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
- `type` | string
11
10
  `x` | number
12
11
  `y` | number
13
12
  `width` | number
@@ -21,7 +20,6 @@ import type { CertificateCanvasPortalLogoElement } from '@easyedu/js-lsm-api'
21
20
  // TODO: Update the object below with actual values
22
21
  const example = {
23
22
  "id": null,
24
- "type": null,
25
23
  "x": null,
26
24
  "y": null,
27
25
  "width": null,
@@ -7,7 +7,6 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
- `type` | string
11
10
  `x` | number
12
11
  `y` | number
13
12
  `width` | number
@@ -24,7 +23,6 @@ import type { CertificateCanvasShapeElement } from '@easyedu/js-lsm-api'
24
23
  // TODO: Update the object below with actual values
25
24
  const example = {
26
25
  "id": null,
27
- "type": null,
28
26
  "x": null,
29
27
  "y": null,
30
28
  "width": null,
@@ -7,7 +7,6 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
- `type` | string
11
10
  `x` | number
12
11
  `y` | number
13
12
  `width` | number
@@ -26,7 +25,6 @@ import type { CertificateCanvasTextElement } from '@easyedu/js-lsm-api'
26
25
  // TODO: Update the object below with actual values
27
26
  const example = {
28
27
  "id": null,
29
- "type": null,
30
28
  "x": null,
31
29
  "y": null,
32
30
  "width": null,
@@ -7,7 +7,6 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `id` | string
10
- `type` | string
11
10
  `x` | number
12
11
  `y` | number
13
12
  `width` | number
@@ -21,7 +20,6 @@ import type { CertificateCanvasVerificationQrElement } from '@easyedu/js-lsm-api
21
20
  // TODO: Update the object below with actual values
22
21
  const example = {
23
22
  "id": null,
24
- "type": null,
25
23
  "x": null,
26
24
  "y": null,
27
25
  "width": null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.87.0",
3
+ "version": "1.89.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -60,7 +60,7 @@ import {
60
60
  * A constrained certificate-canvas-v1 element.
61
61
  * @export
62
62
  */
63
- export type CertificateCanvasElement = CertificateCanvasImageElement | CertificateCanvasLineElement | CertificateCanvasPortalLogoElement | CertificateCanvasShapeElement | CertificateCanvasTextElement | CertificateCanvasVerificationQrElement;
63
+ export type CertificateCanvasElement = { type: 'image' } & CertificateCanvasImageElement | { type: 'line' } & CertificateCanvasLineElement | { type: 'portal_logo' } & CertificateCanvasPortalLogoElement | { type: 'shape' } & CertificateCanvasShapeElement | { type: 'text' } & CertificateCanvasTextElement | { type: 'verification_qr' } & CertificateCanvasVerificationQrElement;
64
64
 
65
65
  export function CertificateCanvasElementFromJSON(json: any): CertificateCanvasElement {
66
66
  return CertificateCanvasElementFromJSONTyped(json, false);
@@ -70,28 +70,22 @@ export function CertificateCanvasElementFromJSONTyped(json: any, ignoreDiscrimin
70
70
  if (json == null) {
71
71
  return json;
72
72
  }
73
- if (typeof json !== 'object') {
74
- return json;
75
- }
76
- if (instanceOfCertificateCanvasImageElement(json)) {
77
- return CertificateCanvasImageElementFromJSONTyped(json, true);
78
- }
79
- if (instanceOfCertificateCanvasLineElement(json)) {
80
- return CertificateCanvasLineElementFromJSONTyped(json, true);
81
- }
82
- if (instanceOfCertificateCanvasPortalLogoElement(json)) {
83
- return CertificateCanvasPortalLogoElementFromJSONTyped(json, true);
84
- }
85
- if (instanceOfCertificateCanvasShapeElement(json)) {
86
- return CertificateCanvasShapeElementFromJSONTyped(json, true);
87
- }
88
- if (instanceOfCertificateCanvasTextElement(json)) {
89
- return CertificateCanvasTextElementFromJSONTyped(json, true);
90
- }
91
- if (instanceOfCertificateCanvasVerificationQrElement(json)) {
92
- return CertificateCanvasVerificationQrElementFromJSONTyped(json, true);
73
+ switch (json['type']) {
74
+ case 'image':
75
+ return Object.assign({}, CertificateCanvasImageElementFromJSONTyped(json, true), { type: 'image' } as const);
76
+ case 'line':
77
+ return Object.assign({}, CertificateCanvasLineElementFromJSONTyped(json, true), { type: 'line' } as const);
78
+ case 'portal_logo':
79
+ return Object.assign({}, CertificateCanvasPortalLogoElementFromJSONTyped(json, true), { type: 'portal_logo' } as const);
80
+ case 'shape':
81
+ return Object.assign({}, CertificateCanvasShapeElementFromJSONTyped(json, true), { type: 'shape' } as const);
82
+ case 'text':
83
+ return Object.assign({}, CertificateCanvasTextElementFromJSONTyped(json, true), { type: 'text' } as const);
84
+ case 'verification_qr':
85
+ return Object.assign({}, CertificateCanvasVerificationQrElementFromJSONTyped(json, true), { type: 'verification_qr' } as const);
86
+ default:
87
+ return json;
93
88
  }
94
- return {} as any;
95
89
  }
96
90
 
97
91
  export function CertificateCanvasElementToJSON(json: any): any {
@@ -102,27 +96,21 @@ export function CertificateCanvasElementToJSONTyped(value?: CertificateCanvasEle
102
96
  if (value == null) {
103
97
  return value;
104
98
  }
105
- if (typeof value !== 'object') {
106
- return value;
107
- }
108
- if (instanceOfCertificateCanvasImageElement(value)) {
109
- return CertificateCanvasImageElementToJSON(value as CertificateCanvasImageElement);
110
- }
111
- if (instanceOfCertificateCanvasLineElement(value)) {
112
- return CertificateCanvasLineElementToJSON(value as CertificateCanvasLineElement);
113
- }
114
- if (instanceOfCertificateCanvasPortalLogoElement(value)) {
115
- return CertificateCanvasPortalLogoElementToJSON(value as CertificateCanvasPortalLogoElement);
116
- }
117
- if (instanceOfCertificateCanvasShapeElement(value)) {
118
- return CertificateCanvasShapeElementToJSON(value as CertificateCanvasShapeElement);
119
- }
120
- if (instanceOfCertificateCanvasTextElement(value)) {
121
- return CertificateCanvasTextElementToJSON(value as CertificateCanvasTextElement);
122
- }
123
- if (instanceOfCertificateCanvasVerificationQrElement(value)) {
124
- return CertificateCanvasVerificationQrElementToJSON(value as CertificateCanvasVerificationQrElement);
99
+ switch (value['type']) {
100
+ case 'image':
101
+ return Object.assign({}, CertificateCanvasImageElementToJSON(value), { type: 'image' } as const);
102
+ case 'line':
103
+ return Object.assign({}, CertificateCanvasLineElementToJSON(value), { type: 'line' } as const);
104
+ case 'portal_logo':
105
+ return Object.assign({}, CertificateCanvasPortalLogoElementToJSON(value), { type: 'portal_logo' } as const);
106
+ case 'shape':
107
+ return Object.assign({}, CertificateCanvasShapeElementToJSON(value), { type: 'shape' } as const);
108
+ case 'text':
109
+ return Object.assign({}, CertificateCanvasTextElementToJSON(value), { type: 'text' } as const);
110
+ case 'verification_qr':
111
+ return Object.assign({}, CertificateCanvasVerificationQrElementToJSON(value), { type: 'verification_qr' } as const);
112
+ default:
113
+ return value;
125
114
  }
126
- return {};
127
115
  }
128
116