-
Notifications
You must be signed in to change notification settings - Fork 7
/
cacheServerClient.types.ts
107 lines (94 loc) · 2.17 KB
/
cacheServerClient.types.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { IDIDDocument } from "@ew-did-registry/did-resolver-interface";
import { IRoleDefinition, IAppDefinition, IOrganizationDefinition } from "@energyweb/iam-contracts";
export interface IRole {
uid: string;
name: string;
namespace: string;
owner: string;
definition: IRoleDefinition;
isOwnedByCurrentUser?: boolean;
}
export interface IOrganization {
uid: string;
name: string;
namespace: string;
owner: string;
definition: IOrganizationDefinition;
apps?: IApp[];
roles?: IRole[];
subOrgs?: IOrganization[];
isOwnedByCurrentUser?: boolean;
}
export interface IApp {
uid: string;
name: string;
namespace: string;
owner: string;
definition: IAppDefinition;
roles?: IRole[];
isOwnedByCurrentUser?: boolean;
}
export enum RegistrationTypes {
OffChain = "RegistrationTypes::OffChain",
OnChain = "RegistrationTypes::OnChain"
}
export interface Claim {
id: string;
requester: string;
subject: string;
claimIssuer: string[];
claimType: string;
claimTypeVersion: string;
registrationTypes: RegistrationTypes[];
token: string;
subjectAgreement?: string;
onChainProof?: string;
issuedToken?: string;
isAccepted: boolean;
acceptedBy?: string;
isRejected?: boolean;
namespace: string;
}
export interface Asset {
id: string;
owner: string;
offeredTo?: string;
document: IDIDDocument;
}
export interface AssetHistory {
id: number;
emittedBy: string;
relatedTo?: string;
at: number;
timestamp: string;
assetId?: string;
}
export interface AssetProfile {
name?: string;
icon?: string;
}
export interface AssetProfiles {
[key:string]: AssetProfile;
}
export interface Profile {
name?: string;
birthdate?: string;
address?: string;
assetProfiles?: AssetProfiles;
}
export interface ClaimData extends Record<string, unknown> {
profile?: Profile;
claimType?: string;
claimTypeVersion?: number;
}
export enum Order {
"ASC" = "ASC",
"DESC" = "DESC"
}
export enum AssetHistoryEventType {
ASSET_CREATED = "ASSET_CREATED",
ASSET_OFFERED = "ASSET_OFFERED",
ASSET_OFFER_CANCELED = "ASSET_OFFER_CANCELED",
ASSET_TRANSFERRED = "ASSET_TRANSFERRED",
ASSET_OFFER_REJECTED = "ASSET_OFFER_REJECTED"
}