-
Notifications
You must be signed in to change notification settings - Fork 10
/
identifierMetadataRecord.ts
63 lines (56 loc) · 1.62 KB
/
identifierMetadataRecord.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { BaseRecord } from "../../storage/storage.types";
interface IdentifierMetadataRecordProps {
id: string;
displayName: string;
signifyName: string;
createdAt?: Date;
isArchived?: boolean;
isDeleted?: boolean;
isPending?: boolean;
theme: number;
signifyOpName?: string;
multisigManageAid?: string;
delegated?: Record<string, unknown>;
}
class IdentifierMetadataRecord
extends BaseRecord
implements IdentifierMetadataRecordProps
{
displayName!: string;
isArchived?: boolean;
isDeleted?: boolean;
isPending?: boolean;
signifyOpName?: string | undefined;
delegated?: Record<string, unknown>;
signifyName!: string;
theme!: number;
multisigManageAid?: string | undefined;
static readonly type = "IdentifierMetadataRecord";
readonly type = IdentifierMetadataRecord.type;
constructor(props: IdentifierMetadataRecordProps) {
super();
if (props) {
this.id = props.id;
this.displayName = props.displayName;
this.signifyName = props.signifyName;
this.isArchived = props.isArchived ?? false;
this.isDeleted = props.isDeleted ?? false;
this.isPending = props.isPending ?? false;
this.signifyOpName = props.signifyOpName;
this.multisigManageAid = props.multisigManageAid;
this.createdAt = props.createdAt ?? new Date();
this.theme = props.theme;
this.delegated = props.delegated;
}
}
getTags() {
return {
...this._tags,
isArchived: this.isArchived,
isDeleted: this.isDeleted,
isPending: this.isPending,
};
}
}
export type { IdentifierMetadataRecordProps };
export { IdentifierMetadataRecord };