@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.
- package/README.md +2 -2
- package/dist/esm/models/CertificateCanvasElement.d.ts +13 -1
- package/dist/esm/models/CertificateCanvasElement.js +36 -48
- package/dist/esm/models/CertificateCanvasImageElement.d.ts +0 -13
- package/dist/esm/models/CertificateCanvasImageElement.js +0 -10
- package/dist/esm/models/CertificateCanvasLineElement.d.ts +0 -13
- package/dist/esm/models/CertificateCanvasLineElement.js +0 -10
- package/dist/esm/models/CertificateCanvasPortalLogoElement.d.ts +0 -13
- package/dist/esm/models/CertificateCanvasPortalLogoElement.js +0 -10
- package/dist/esm/models/CertificateCanvasShapeElement.d.ts +0 -13
- package/dist/esm/models/CertificateCanvasShapeElement.js +0 -10
- package/dist/esm/models/CertificateCanvasTextElement.d.ts +0 -13
- package/dist/esm/models/CertificateCanvasTextElement.js +0 -10
- package/dist/esm/models/CertificateCanvasVerificationQrElement.d.ts +0 -13
- package/dist/esm/models/CertificateCanvasVerificationQrElement.js +0 -10
- package/dist/models/CertificateCanvasElement.d.ts +13 -1
- package/dist/models/CertificateCanvasElement.js +30 -42
- package/dist/models/CertificateCanvasImageElement.d.ts +0 -13
- package/dist/models/CertificateCanvasImageElement.js +1 -11
- package/dist/models/CertificateCanvasLineElement.d.ts +0 -13
- package/dist/models/CertificateCanvasLineElement.js +0 -11
- package/dist/models/CertificateCanvasPortalLogoElement.d.ts +0 -13
- package/dist/models/CertificateCanvasPortalLogoElement.js +0 -11
- package/dist/models/CertificateCanvasShapeElement.d.ts +0 -13
- package/dist/models/CertificateCanvasShapeElement.js +0 -11
- package/dist/models/CertificateCanvasTextElement.d.ts +0 -13
- package/dist/models/CertificateCanvasTextElement.js +1 -11
- package/dist/models/CertificateCanvasVerificationQrElement.d.ts +0 -13
- package/dist/models/CertificateCanvasVerificationQrElement.js +0 -11
- package/docs/CertificateCanvasElement.md +2 -2
- package/docs/CertificateCanvasImageElement.md +0 -2
- package/docs/CertificateCanvasLineElement.md +0 -2
- package/docs/CertificateCanvasPortalLogoElement.md +0 -2
- package/docs/CertificateCanvasShapeElement.md +0 -2
- package/docs/CertificateCanvasTextElement.md +0 -2
- package/docs/CertificateCanvasVerificationQrElement.md +0 -2
- package/package.json +1 -1
- package/src/models/CertificateCanvasElement.ts +31 -43
- package/src/models/CertificateCanvasImageElement.ts +0 -17
- package/src/models/CertificateCanvasLineElement.ts +0 -19
- package/src/models/CertificateCanvasPortalLogoElement.ts +0 -19
- package/src/models/CertificateCanvasShapeElement.ts +0 -19
- package/src/models/CertificateCanvasTextElement.ts +0 -17
- package/src/models/CertificateCanvasVerificationQrElement.ts +0 -19
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @easyedu/js-lsm-api@1.
|
|
1
|
+
# @easyedu/js-lsm-api@1.89.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
|
|
4
4
|
|
|
@@ -764,7 +764,7 @@ and is automatically generated by the
|
|
|
764
764
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
765
765
|
|
|
766
766
|
- API version: `1.0.0`
|
|
767
|
-
- Package version: `1.
|
|
767
|
+
- Package version: `1.89.0`
|
|
768
768
|
- Generator version: `7.22.0`
|
|
769
769
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
770
770
|
|
|
@@ -20,7 +20,19 @@ import type { CertificateCanvasVerificationQrElement } from './CertificateCanvas
|
|
|
20
20
|
* A constrained certificate-canvas-v1 element.
|
|
21
21
|
* @export
|
|
22
22
|
*/
|
|
23
|
-
export type CertificateCanvasElement =
|
|
23
|
+
export type CertificateCanvasElement = {
|
|
24
|
+
type: 'image';
|
|
25
|
+
} & CertificateCanvasImageElement | {
|
|
26
|
+
type: 'line';
|
|
27
|
+
} & CertificateCanvasLineElement | {
|
|
28
|
+
type: 'portal_logo';
|
|
29
|
+
} & CertificateCanvasPortalLogoElement | {
|
|
30
|
+
type: 'shape';
|
|
31
|
+
} & CertificateCanvasShapeElement | {
|
|
32
|
+
type: 'text';
|
|
33
|
+
} & CertificateCanvasTextElement | {
|
|
34
|
+
type: 'verification_qr';
|
|
35
|
+
} & CertificateCanvasVerificationQrElement;
|
|
24
36
|
export declare function CertificateCanvasElementFromJSON(json: any): CertificateCanvasElement;
|
|
25
37
|
export declare function CertificateCanvasElementFromJSONTyped(json: any, ignoreDiscriminator: boolean): CertificateCanvasElement;
|
|
26
38
|
export declare function CertificateCanvasElementToJSON(json: any): any;
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
14
|
+
import { CertificateCanvasImageElementFromJSONTyped, CertificateCanvasImageElementToJSON, } from './CertificateCanvasImageElement';
|
|
15
|
+
import { CertificateCanvasLineElementFromJSONTyped, CertificateCanvasLineElementToJSON, } from './CertificateCanvasLineElement';
|
|
16
|
+
import { CertificateCanvasPortalLogoElementFromJSONTyped, CertificateCanvasPortalLogoElementToJSON, } from './CertificateCanvasPortalLogoElement';
|
|
17
|
+
import { CertificateCanvasShapeElementFromJSONTyped, CertificateCanvasShapeElementToJSON, } from './CertificateCanvasShapeElement';
|
|
18
|
+
import { CertificateCanvasTextElementFromJSONTyped, CertificateCanvasTextElementToJSON, } from './CertificateCanvasTextElement';
|
|
19
|
+
import { CertificateCanvasVerificationQrElementFromJSONTyped, CertificateCanvasVerificationQrElementToJSON, } from './CertificateCanvasVerificationQrElement';
|
|
20
20
|
export function CertificateCanvasElementFromJSON(json) {
|
|
21
21
|
return CertificateCanvasElementFromJSONTyped(json, false);
|
|
22
22
|
}
|
|
@@ -24,28 +24,22 @@ export function CertificateCanvasElementFromJSONTyped(json, ignoreDiscriminator)
|
|
|
24
24
|
if (json == null) {
|
|
25
25
|
return json;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (instanceOfCertificateCanvasTextElement(json)) {
|
|
43
|
-
return CertificateCanvasTextElementFromJSONTyped(json, true);
|
|
44
|
-
}
|
|
45
|
-
if (instanceOfCertificateCanvasVerificationQrElement(json)) {
|
|
46
|
-
return CertificateCanvasVerificationQrElementFromJSONTyped(json, true);
|
|
27
|
+
switch (json['type']) {
|
|
28
|
+
case 'image':
|
|
29
|
+
return Object.assign({}, CertificateCanvasImageElementFromJSONTyped(json, true), { type: 'image' });
|
|
30
|
+
case 'line':
|
|
31
|
+
return Object.assign({}, CertificateCanvasLineElementFromJSONTyped(json, true), { type: 'line' });
|
|
32
|
+
case 'portal_logo':
|
|
33
|
+
return Object.assign({}, CertificateCanvasPortalLogoElementFromJSONTyped(json, true), { type: 'portal_logo' });
|
|
34
|
+
case 'shape':
|
|
35
|
+
return Object.assign({}, CertificateCanvasShapeElementFromJSONTyped(json, true), { type: 'shape' });
|
|
36
|
+
case 'text':
|
|
37
|
+
return Object.assign({}, CertificateCanvasTextElementFromJSONTyped(json, true), { type: 'text' });
|
|
38
|
+
case 'verification_qr':
|
|
39
|
+
return Object.assign({}, CertificateCanvasVerificationQrElementFromJSONTyped(json, true), { type: 'verification_qr' });
|
|
40
|
+
default:
|
|
41
|
+
return json;
|
|
47
42
|
}
|
|
48
|
-
return {};
|
|
49
43
|
}
|
|
50
44
|
export function CertificateCanvasElementToJSON(json) {
|
|
51
45
|
return CertificateCanvasElementToJSONTyped(json, false);
|
|
@@ -54,26 +48,20 @@ export function CertificateCanvasElementToJSONTyped(value, ignoreDiscriminator =
|
|
|
54
48
|
if (value == null) {
|
|
55
49
|
return value;
|
|
56
50
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (instanceOfCertificateCanvasTextElement(value)) {
|
|
73
|
-
return CertificateCanvasTextElementToJSON(value);
|
|
74
|
-
}
|
|
75
|
-
if (instanceOfCertificateCanvasVerificationQrElement(value)) {
|
|
76
|
-
return CertificateCanvasVerificationQrElementToJSON(value);
|
|
51
|
+
switch (value['type']) {
|
|
52
|
+
case 'image':
|
|
53
|
+
return Object.assign({}, CertificateCanvasImageElementToJSON(value), { type: 'image' });
|
|
54
|
+
case 'line':
|
|
55
|
+
return Object.assign({}, CertificateCanvasLineElementToJSON(value), { type: 'line' });
|
|
56
|
+
case 'portal_logo':
|
|
57
|
+
return Object.assign({}, CertificateCanvasPortalLogoElementToJSON(value), { type: 'portal_logo' });
|
|
58
|
+
case 'shape':
|
|
59
|
+
return Object.assign({}, CertificateCanvasShapeElementToJSON(value), { type: 'shape' });
|
|
60
|
+
case 'text':
|
|
61
|
+
return Object.assign({}, CertificateCanvasTextElementToJSON(value), { type: 'text' });
|
|
62
|
+
case 'verification_qr':
|
|
63
|
+
return Object.assign({}, CertificateCanvasVerificationQrElementToJSON(value), { type: 'verification_qr' });
|
|
64
|
+
default:
|
|
65
|
+
return value;
|
|
77
66
|
}
|
|
78
|
-
return {};
|
|
79
67
|
}
|
|
@@ -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
|
*/
|
|
@@ -11,12 +11,6 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* @export
|
|
16
|
-
*/
|
|
17
|
-
export const CertificateCanvasImageElementTypeEnum = {
|
|
18
|
-
Image: 'image'
|
|
19
|
-
};
|
|
20
14
|
/**
|
|
21
15
|
* @export
|
|
22
16
|
*/
|
|
@@ -31,8 +25,6 @@ export const CertificateCanvasImageElementFitEnum = {
|
|
|
31
25
|
export function instanceOfCertificateCanvasImageElement(value) {
|
|
32
26
|
if (!('id' in value) || value['id'] === undefined)
|
|
33
27
|
return false;
|
|
34
|
-
if (!('type' in value) || value['type'] === undefined)
|
|
35
|
-
return false;
|
|
36
28
|
if (!('x' in value) || value['x'] === undefined)
|
|
37
29
|
return false;
|
|
38
30
|
if (!('y' in value) || value['y'] === undefined)
|
|
@@ -54,7 +46,6 @@ export function CertificateCanvasImageElementFromJSONTyped(json, ignoreDiscrimin
|
|
|
54
46
|
}
|
|
55
47
|
return {
|
|
56
48
|
'id': json['id'],
|
|
57
|
-
'type': json['type'],
|
|
58
49
|
'x': json['x'],
|
|
59
50
|
'y': json['y'],
|
|
60
51
|
'width': json['width'],
|
|
@@ -72,7 +63,6 @@ export function CertificateCanvasImageElementToJSONTyped(value, ignoreDiscrimina
|
|
|
72
63
|
}
|
|
73
64
|
return {
|
|
74
65
|
'id': value['id'],
|
|
75
|
-
'type': value['type'],
|
|
76
66
|
'x': value['x'],
|
|
77
67
|
'y': value['y'],
|
|
78
68
|
'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
|
*/
|
|
@@ -11,20 +11,12 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* @export
|
|
16
|
-
*/
|
|
17
|
-
export const CertificateCanvasLineElementTypeEnum = {
|
|
18
|
-
Line: 'line'
|
|
19
|
-
};
|
|
20
14
|
/**
|
|
21
15
|
* Check if a given object implements the CertificateCanvasLineElement interface.
|
|
22
16
|
*/
|
|
23
17
|
export function instanceOfCertificateCanvasLineElement(value) {
|
|
24
18
|
if (!('id' in value) || value['id'] === undefined)
|
|
25
19
|
return false;
|
|
26
|
-
if (!('type' in value) || value['type'] === undefined)
|
|
27
|
-
return false;
|
|
28
20
|
if (!('x' in value) || value['x'] === undefined)
|
|
29
21
|
return false;
|
|
30
22
|
if (!('y' in value) || value['y'] === undefined)
|
|
@@ -48,7 +40,6 @@ export function CertificateCanvasLineElementFromJSONTyped(json, ignoreDiscrimina
|
|
|
48
40
|
}
|
|
49
41
|
return {
|
|
50
42
|
'id': json['id'],
|
|
51
|
-
'type': json['type'],
|
|
52
43
|
'x': json['x'],
|
|
53
44
|
'y': json['y'],
|
|
54
45
|
'width': json['width'],
|
|
@@ -66,7 +57,6 @@ export function CertificateCanvasLineElementToJSONTyped(value, ignoreDiscriminat
|
|
|
66
57
|
}
|
|
67
58
|
return {
|
|
68
59
|
'id': value['id'],
|
|
69
|
-
'type': value['type'],
|
|
70
60
|
'x': value['x'],
|
|
71
61
|
'y': value['y'],
|
|
72
62
|
'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
|
*/
|
|
@@ -11,20 +11,12 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* @export
|
|
16
|
-
*/
|
|
17
|
-
export const CertificateCanvasPortalLogoElementTypeEnum = {
|
|
18
|
-
PortalLogo: 'portal_logo'
|
|
19
|
-
};
|
|
20
14
|
/**
|
|
21
15
|
* Check if a given object implements the CertificateCanvasPortalLogoElement interface.
|
|
22
16
|
*/
|
|
23
17
|
export function instanceOfCertificateCanvasPortalLogoElement(value) {
|
|
24
18
|
if (!('id' in value) || value['id'] === undefined)
|
|
25
19
|
return false;
|
|
26
|
-
if (!('type' in value) || value['type'] === undefined)
|
|
27
|
-
return false;
|
|
28
20
|
if (!('x' in value) || value['x'] === undefined)
|
|
29
21
|
return false;
|
|
30
22
|
if (!('y' in value) || value['y'] === undefined)
|
|
@@ -44,7 +36,6 @@ export function CertificateCanvasPortalLogoElementFromJSONTyped(json, ignoreDisc
|
|
|
44
36
|
}
|
|
45
37
|
return {
|
|
46
38
|
'id': json['id'],
|
|
47
|
-
'type': json['type'],
|
|
48
39
|
'x': json['x'],
|
|
49
40
|
'y': json['y'],
|
|
50
41
|
'width': json['width'],
|
|
@@ -60,7 +51,6 @@ export function CertificateCanvasPortalLogoElementToJSONTyped(value, ignoreDiscr
|
|
|
60
51
|
}
|
|
61
52
|
return {
|
|
62
53
|
'id': value['id'],
|
|
63
|
-
'type': value['type'],
|
|
64
54
|
'x': value['x'],
|
|
65
55
|
'y': value['y'],
|
|
66
56
|
'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
|
*/
|
|
@@ -11,20 +11,12 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* @export
|
|
16
|
-
*/
|
|
17
|
-
export const CertificateCanvasShapeElementTypeEnum = {
|
|
18
|
-
Shape: 'shape'
|
|
19
|
-
};
|
|
20
14
|
/**
|
|
21
15
|
* Check if a given object implements the CertificateCanvasShapeElement interface.
|
|
22
16
|
*/
|
|
23
17
|
export function instanceOfCertificateCanvasShapeElement(value) {
|
|
24
18
|
if (!('id' in value) || value['id'] === undefined)
|
|
25
19
|
return false;
|
|
26
|
-
if (!('type' in value) || value['type'] === undefined)
|
|
27
|
-
return false;
|
|
28
20
|
if (!('x' in value) || value['x'] === undefined)
|
|
29
21
|
return false;
|
|
30
22
|
if (!('y' in value) || value['y'] === undefined)
|
|
@@ -50,7 +42,6 @@ export function CertificateCanvasShapeElementFromJSONTyped(json, ignoreDiscrimin
|
|
|
50
42
|
}
|
|
51
43
|
return {
|
|
52
44
|
'id': json['id'],
|
|
53
|
-
'type': json['type'],
|
|
54
45
|
'x': json['x'],
|
|
55
46
|
'y': json['y'],
|
|
56
47
|
'width': json['width'],
|
|
@@ -69,7 +60,6 @@ export function CertificateCanvasShapeElementToJSONTyped(value, ignoreDiscrimina
|
|
|
69
60
|
}
|
|
70
61
|
return {
|
|
71
62
|
'id': value['id'],
|
|
72
|
-
'type': value['type'],
|
|
73
63
|
'x': value['x'],
|
|
74
64
|
'y': value['y'],
|
|
75
65
|
'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
|
*/
|
|
@@ -11,12 +11,6 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* @export
|
|
16
|
-
*/
|
|
17
|
-
export const CertificateCanvasTextElementTypeEnum = {
|
|
18
|
-
Text: 'text'
|
|
19
|
-
};
|
|
20
14
|
/**
|
|
21
15
|
* @export
|
|
22
16
|
*/
|
|
@@ -37,8 +31,6 @@ export const CertificateCanvasTextElementAlignEnum = {
|
|
|
37
31
|
export function instanceOfCertificateCanvasTextElement(value) {
|
|
38
32
|
if (!('id' in value) || value['id'] === undefined)
|
|
39
33
|
return false;
|
|
40
|
-
if (!('type' in value) || value['type'] === undefined)
|
|
41
|
-
return false;
|
|
42
34
|
if (!('x' in value) || value['x'] === undefined)
|
|
43
35
|
return false;
|
|
44
36
|
if (!('y' in value) || value['y'] === undefined)
|
|
@@ -66,7 +58,6 @@ export function CertificateCanvasTextElementFromJSONTyped(json, ignoreDiscrimina
|
|
|
66
58
|
}
|
|
67
59
|
return {
|
|
68
60
|
'id': json['id'],
|
|
69
|
-
'type': json['type'],
|
|
70
61
|
'x': json['x'],
|
|
71
62
|
'y': json['y'],
|
|
72
63
|
'width': json['width'],
|
|
@@ -87,7 +78,6 @@ export function CertificateCanvasTextElementToJSONTyped(value, ignoreDiscriminat
|
|
|
87
78
|
}
|
|
88
79
|
return {
|
|
89
80
|
'id': value['id'],
|
|
90
|
-
'type': value['type'],
|
|
91
81
|
'x': value['x'],
|
|
92
82
|
'y': value['y'],
|
|
93
83
|
'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
|
*/
|
|
@@ -11,20 +11,12 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
/**
|
|
15
|
-
* @export
|
|
16
|
-
*/
|
|
17
|
-
export const CertificateCanvasVerificationQrElementTypeEnum = {
|
|
18
|
-
VerificationQr: 'verification_qr'
|
|
19
|
-
};
|
|
20
14
|
/**
|
|
21
15
|
* Check if a given object implements the CertificateCanvasVerificationQrElement interface.
|
|
22
16
|
*/
|
|
23
17
|
export function instanceOfCertificateCanvasVerificationQrElement(value) {
|
|
24
18
|
if (!('id' in value) || value['id'] === undefined)
|
|
25
19
|
return false;
|
|
26
|
-
if (!('type' in value) || value['type'] === undefined)
|
|
27
|
-
return false;
|
|
28
20
|
if (!('x' in value) || value['x'] === undefined)
|
|
29
21
|
return false;
|
|
30
22
|
if (!('y' in value) || value['y'] === undefined)
|
|
@@ -44,7 +36,6 @@ export function CertificateCanvasVerificationQrElementFromJSONTyped(json, ignore
|
|
|
44
36
|
}
|
|
45
37
|
return {
|
|
46
38
|
'id': json['id'],
|
|
47
|
-
'type': json['type'],
|
|
48
39
|
'x': json['x'],
|
|
49
40
|
'y': json['y'],
|
|
50
41
|
'width': json['width'],
|
|
@@ -60,7 +51,6 @@ export function CertificateCanvasVerificationQrElementToJSONTyped(value, ignoreD
|
|
|
60
51
|
}
|
|
61
52
|
return {
|
|
62
53
|
'id': value['id'],
|
|
63
|
-
'type': value['type'],
|
|
64
54
|
'x': value['x'],
|
|
65
55
|
'y': value['y'],
|
|
66
56
|
'width': value['width'],
|
|
@@ -20,7 +20,19 @@ import type { CertificateCanvasVerificationQrElement } from './CertificateCanvas
|
|
|
20
20
|
* A constrained certificate-canvas-v1 element.
|
|
21
21
|
* @export
|
|
22
22
|
*/
|
|
23
|
-
export type CertificateCanvasElement =
|
|
23
|
+
export type CertificateCanvasElement = {
|
|
24
|
+
type: 'image';
|
|
25
|
+
} & CertificateCanvasImageElement | {
|
|
26
|
+
type: 'line';
|
|
27
|
+
} & CertificateCanvasLineElement | {
|
|
28
|
+
type: 'portal_logo';
|
|
29
|
+
} & CertificateCanvasPortalLogoElement | {
|
|
30
|
+
type: 'shape';
|
|
31
|
+
} & CertificateCanvasShapeElement | {
|
|
32
|
+
type: 'text';
|
|
33
|
+
} & CertificateCanvasTextElement | {
|
|
34
|
+
type: 'verification_qr';
|
|
35
|
+
} & CertificateCanvasVerificationQrElement;
|
|
24
36
|
export declare function CertificateCanvasElementFromJSON(json: any): CertificateCanvasElement;
|
|
25
37
|
export declare function CertificateCanvasElementFromJSONTyped(json: any, ignoreDiscriminator: boolean): CertificateCanvasElement;
|
|
26
38
|
export declare function CertificateCanvasElementToJSON(json: any): any;
|
|
@@ -30,28 +30,22 @@ function CertificateCanvasElementFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
30
30
|
if (json == null) {
|
|
31
31
|
return json;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if ((0, CertificateCanvasTextElement_1.instanceOfCertificateCanvasTextElement)(json)) {
|
|
49
|
-
return (0, CertificateCanvasTextElement_1.CertificateCanvasTextElementFromJSONTyped)(json, true);
|
|
50
|
-
}
|
|
51
|
-
if ((0, CertificateCanvasVerificationQrElement_1.instanceOfCertificateCanvasVerificationQrElement)(json)) {
|
|
52
|
-
return (0, CertificateCanvasVerificationQrElement_1.CertificateCanvasVerificationQrElementFromJSONTyped)(json, true);
|
|
33
|
+
switch (json['type']) {
|
|
34
|
+
case 'image':
|
|
35
|
+
return Object.assign({}, (0, CertificateCanvasImageElement_1.CertificateCanvasImageElementFromJSONTyped)(json, true), { type: 'image' });
|
|
36
|
+
case 'line':
|
|
37
|
+
return Object.assign({}, (0, CertificateCanvasLineElement_1.CertificateCanvasLineElementFromJSONTyped)(json, true), { type: 'line' });
|
|
38
|
+
case 'portal_logo':
|
|
39
|
+
return Object.assign({}, (0, CertificateCanvasPortalLogoElement_1.CertificateCanvasPortalLogoElementFromJSONTyped)(json, true), { type: 'portal_logo' });
|
|
40
|
+
case 'shape':
|
|
41
|
+
return Object.assign({}, (0, CertificateCanvasShapeElement_1.CertificateCanvasShapeElementFromJSONTyped)(json, true), { type: 'shape' });
|
|
42
|
+
case 'text':
|
|
43
|
+
return Object.assign({}, (0, CertificateCanvasTextElement_1.CertificateCanvasTextElementFromJSONTyped)(json, true), { type: 'text' });
|
|
44
|
+
case 'verification_qr':
|
|
45
|
+
return Object.assign({}, (0, CertificateCanvasVerificationQrElement_1.CertificateCanvasVerificationQrElementFromJSONTyped)(json, true), { type: 'verification_qr' });
|
|
46
|
+
default:
|
|
47
|
+
return json;
|
|
53
48
|
}
|
|
54
|
-
return {};
|
|
55
49
|
}
|
|
56
50
|
function CertificateCanvasElementToJSON(json) {
|
|
57
51
|
return CertificateCanvasElementToJSONTyped(json, false);
|
|
@@ -60,26 +54,20 @@ function CertificateCanvasElementToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
60
54
|
if (value == null) {
|
|
61
55
|
return value;
|
|
62
56
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if ((0, CertificateCanvasTextElement_1.instanceOfCertificateCanvasTextElement)(value)) {
|
|
79
|
-
return (0, CertificateCanvasTextElement_1.CertificateCanvasTextElementToJSON)(value);
|
|
80
|
-
}
|
|
81
|
-
if ((0, CertificateCanvasVerificationQrElement_1.instanceOfCertificateCanvasVerificationQrElement)(value)) {
|
|
82
|
-
return (0, CertificateCanvasVerificationQrElement_1.CertificateCanvasVerificationQrElementToJSON)(value);
|
|
57
|
+
switch (value['type']) {
|
|
58
|
+
case 'image':
|
|
59
|
+
return Object.assign({}, (0, CertificateCanvasImageElement_1.CertificateCanvasImageElementToJSON)(value), { type: 'image' });
|
|
60
|
+
case 'line':
|
|
61
|
+
return Object.assign({}, (0, CertificateCanvasLineElement_1.CertificateCanvasLineElementToJSON)(value), { type: 'line' });
|
|
62
|
+
case 'portal_logo':
|
|
63
|
+
return Object.assign({}, (0, CertificateCanvasPortalLogoElement_1.CertificateCanvasPortalLogoElementToJSON)(value), { type: 'portal_logo' });
|
|
64
|
+
case 'shape':
|
|
65
|
+
return Object.assign({}, (0, CertificateCanvasShapeElement_1.CertificateCanvasShapeElementToJSON)(value), { type: 'shape' });
|
|
66
|
+
case 'text':
|
|
67
|
+
return Object.assign({}, (0, CertificateCanvasTextElement_1.CertificateCanvasTextElementToJSON)(value), { type: 'text' });
|
|
68
|
+
case 'verification_qr':
|
|
69
|
+
return Object.assign({}, (0, CertificateCanvasVerificationQrElement_1.CertificateCanvasVerificationQrElementToJSON)(value), { type: 'verification_qr' });
|
|
70
|
+
default:
|
|
71
|
+
return value;
|
|
83
72
|
}
|
|
84
|
-
return {};
|
|
85
73
|
}
|