-
Notifications
You must be signed in to change notification settings - Fork 82
Expand file tree
/
Copy pathenum.ts
More file actions
executable file
·401 lines (342 loc) · 8.66 KB
/
enum.ts
File metadata and controls
executable file
·401 lines (342 loc) · 8.66 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
export enum NATSReconnects {
maxReconnectAttempts = (10 * 60) / 5, // 10 minutes with a reconnection attempt every 5 seconds
reconnectTimeWait = 5000 // 5 second delay between reconnection attempts
}
export enum SortValue {
ASC = 'asc',
DESC = 'desc'
}
export enum SortFields {
ID = 'id',
CREATED_DATE_TIME = 'createDateTime',
NAME = 'name',
VERSION = 'version',
LEDGER_ID = 'schemaLedgerId',
PUBLISHER_DID = 'publisherDid',
ISSUER_ID = 'issuerId'
}
export enum CredDefSortFields {
CREATED_DATE_TIME = 'createDateTime',
TAG = 'tag',
LEDGER_ID = 'schemaLedgerId',
CRED_DEF_ID = 'credentialDefinitionId'
}
export enum AgentType {
// TODO: Change to Credo
AFJ = 'AFJ',
ACAPY = 'ACAPY'
}
export enum DevelopmentEnvironment {
PRODUCTION = 'production',
DEVELOPMENT = 'development',
TEST = 'test'
}
export enum KeyType {
Ed25519 = 'ed25519',
Bls12381g1g2 = 'bls12381g1g2',
Bls12381g1 = 'bls12381g1',
Bls12381g2 = 'bls12381g2',
X25519 = 'x25519',
P256 = 'p256',
P384 = 'p384',
P521 = 'p521',
K256 = 'k256'
}
export enum DidMethod {
INDY = 'indy',
KEY = 'key',
WEB = 'web',
POLYGON = 'polygon'
}
export enum Ledgers {
Bcovrin_Testnet = 'Bcovrin Testnet',
Indicio_Testnet = 'Indicio Testnet',
Indicio_Demonet = 'Indicio Demonet',
Indicio_Mainnet = 'Indicio Mainnet',
Not_Applicable = 'NA'
}
export enum Invitation {
ACCEPTED = 'accepted',
REJECTED = 'rejected',
PENDING = 'pending'
}
export enum InvitationViewRole {
ECOSYSTEM_MEMBER = 'Ecosystem Member',
ECOSYSTEM_LEAD = 'Ecosystem Lead'
}
export enum InviteType {
ECOSYSTEM = 'ecosystem',
MEMBER = 'member'
}
export enum EndorserTransactionType {
SCHEMA = 'schema',
CREDENTIAL_DEFINITION = 'credential-definition'
}
export enum schemaRequestType {
W3C = 'w3c',
INDY = 'indy'
}
export enum OrgAgentType {
DEDICATED = 'DEDICATED',
SHARED = 'SHARED'
}
export enum AgentSpinUpStatus {
PENDING = 0,
WALLET_CREATED = 1,
DID_CREATED = 2
}
export enum EcosystemRoles {
ECOSYSTEM_LEAD = 'Ecosystem Lead',
ECOSYSTEM_MEMBER = 'Ecosystem Member',
ECOSYSTEM_OWNER = 'Ecosystem Owner'
}
export enum EcosystemConfigSettings {
URL = 'url',
ENABLE_ECOSYSTEM = 'enableEcosystem',
AUTO_ENDORSEMENT = 'autoEndorsement',
PARTICIPATE_IN_ECOSYSTEM = 'participateInEcosystem',
MULTI_ECOSYSTEM = 'multiEcosystemSupport'
}
export enum EcosystemOrgStatus {
ACTIVE = 'ACTIVE',
INACTIVE = 'INACTIVE'
}
export enum MemberStatus {
ACTIVE = 'active',
INACTIVE = 'inactive'
}
export enum UserCertificateId {
WINNER = 'Winner',
PARTICIPANT = 'Participant',
ARBITER = 'Arbiter',
WORLD_RECORD = 'WorldRecord'
}
export enum NodeEnvironment {
DEVELOPMENT = 'DEV',
PRODUCTION = 'PROD'
}
export enum AutoAccept {
Always = 'always',
ContentApproved = 'contentApproved',
Never = 'never'
}
export enum SortMembers {
CREATED_DATE_TIME = 'createDateTime',
STATUS = 'status',
ID = 'id',
ORGANIZATION = 'organization'
}
const transitionMap: { [key in Invitation]: Invitation[] } = {
[Invitation.PENDING]: [Invitation.ACCEPTED, Invitation.REJECTED],
[Invitation.ACCEPTED]: [],
[Invitation.REJECTED]: []
};
export const transition = (currentStatus: Invitation, nextStatus: Invitation): boolean =>
transitionMap[currentStatus].includes(nextStatus);
export enum SchemaType {
INDY = 'indy',
W3C_Schema = 'w3c'
}
export enum IssueCredentialType {
JSONLD = 'jsonld',
INDY = 'indy'
}
export enum TemplateIdentifier {
EMAIL_COLUMN = 'email_identifier'
}
export enum PromiseResult {
REJECTED = 'rejected',
FULFILLED = 'fulfilled'
}
export enum PrismaTables {
PRESENTATIONS = 'presentations',
CREDENTIALS = 'credentials',
ORG_AGENTS = 'org_agents',
ORG_DIDS = 'org_dids',
AGENT_INVITATIONS = 'agent_invitations',
CONNECTIONS = 'connections',
FILE_UPLOAD = 'file_upload',
NOTIFICATION = 'notification',
USER_ACTIVITY = 'user_activity',
USER_ORG_ROLES = 'user_org_roles',
ORG_INVITATIONS = 'org_invitations',
ORGANIZATION = 'organization'
}
export enum IssuanceProcessState {
PROPOSAL_SENT = 'proposal-sent',
PROPOSAL_RECEIVED = 'proposal-received',
OFFER_SENT = 'offer-sent',
OFFER_RECEIVED = 'offer-received',
DECLIEND = 'decliend',
REQUEST_SENT = 'request-sent',
REQUEST_RECEIVED = 'request-received',
CREDENTIAL_ISSUED = 'credential-issued',
CREDENTIAL_RECEIVED = 'credential-received',
DONE = 'done',
ABANDONED = 'abandoned'
}
export enum VerificationProcessState {
PROPOSAL_SENT = 'proposal-sent',
PROPOSAL_RECEIVED = 'proposal-received',
REQUEST_SENT = 'request-sent',
REQUEST_RECEIVED = 'request-received',
PRESENTATION_SENT = 'presentation-sent',
PRESENTATION_RECEIVED = 'presentation-received',
DECLIEND = 'declined',
ABANDONED = 'abandoned',
DONE = 'done'
}
export enum ConnectionProcessState {
START = 'start',
INVITATION_SENT = 'invitation-sent',
INVITATION_RECEIVED = 'invitation-received',
REQUEST_SENT = 'request-sent',
DECLIEND = 'decliend',
REQUEST_RECEIVED = 'request-received',
RESPONSE_SENT = 'response-sent',
RESPONSE_RECEIVED = 'response-received',
COMPLETE = 'completed',
ABANDONED = 'abandoned'
}
export enum SchemaTypeEnum {
JSON = 'json',
INDY = 'indy'
}
export enum W3CSchemaDataType {
NUMBER = 'number',
INTEGER = 'integer',
STRING = 'string',
DATE_TIME = 'datetime-local',
ARRAY = 'array',
OBJECT = 'object',
BOOLEAN = 'boolean'
}
export enum IndySchemaDataType {
NUMBER = 'number',
STRING = 'string',
DATE_TIME = 'datetime-local',
BOOLEAN = 'boolean'
}
export enum JSONSchemaType {
POLYGON_W3C = 'polygon',
LEDGER_LESS = 'no_ledger'
}
export enum NetworkNamespace {
POLYGON_TESTNET = 'polygon:testnet'
}
export enum LedgerLessMethods {
WEB = 'web',
KEY = 'key'
}
export enum LedgerLessConstant {
NO_LEDGER = 'no_ledger'
}
export enum ledgerLessDIDType {
DID_KEY = 'did:key',
DID_WEB = 'did:web'
}
export enum CloudWalletType {
BASE_WALLET = 'CLOUD_BASE_WALLET',
SUB_WALLET = 'CLOUD_SUB_WALLET'
}
export enum UserRole {
DEFAULT_USER = 'DEFAULT_USER',
HOLDER = 'HOLDER'
}
export enum ProofType {
POLYGON_PROOFTYPE = 'EcdsaSecp256k1Signature2019',
NO_LEDGER_PROOFTYPE = 'Ed25519Signature2018'
}
export enum TokenType {
BEARER_TOKEN = 'Bearer'
}
export enum SessionType {
USER_SESSION = 'user-session',
ORG_SESSION = 'organization-session'
}
export enum ProviderType {
KEYCLOAK = 'keycloak',
SUPABASE = 'supabase'
}
export enum OpenId4VcIssuanceSessionState {
OfferCreated = 'OfferCreated',
OfferUriRetrieved = 'OfferUriRetrieved',
AuthorizationInitiated = 'AuthorizationInitiated',
AuthorizationGranted = 'AuthorizationGranted',
AccessTokenRequested = 'AccessTokenRequested',
AccessTokenCreated = 'AccessTokenCreated',
CredentialRequestReceived = 'CredentialRequestReceived',
CredentialsPartiallyIssued = 'CredentialsPartiallyIssued',
Completed = 'Completed',
Error = 'Error'
}
export enum x5cKeyType {
Ed25519 = 'Ed25519',
P256 = 'P-256'
}
export enum x5cRecordStatus {
Active = 'Active',
PendingActivation = 'Pending activation',
InActive = 'In Active'
}
export enum X509KeyUsage {
DigitalSignature = 1,
NonRepudiation = 2,
KeyEncipherment = 4,
DataEncipherment = 8,
KeyAgreement = 16,
KeyCertSign = 32,
CrlSign = 64,
EncipherOnly = 128,
DecipherOnly = 256
}
export enum X509ExtendedKeyUsage {
ServerAuth = '1.3.6.1.5.5.7.3.1',
ClientAuth = '1.3.6.1.5.5.7.3.2',
CodeSigning = '1.3.6.1.5.5.7.3.3',
EmailProtection = '1.3.6.1.5.5.7.3.4',
TimeStamping = '1.3.6.1.5.5.7.3.8',
OcspSigning = '1.3.6.1.5.5.7.3.9',
MdlDs = '1.0.18013.5.1.2'
}
export enum CredentialFormat {
SdJwtVc = 'dc+sd-jwt',
Mdoc = 'mso_mdoc'
}
export enum AttributeType {
STRING = 'string',
NUMBER = 'number',
BOOLEAN = 'boolean',
DATE = 'date',
OBJECT = 'object',
ARRAY = 'array',
IMAGE = 'image'
}
export enum SignerMethodOption {
DID = 'did',
X5C = 'x5c'
}
export declare enum HandshakeProtocol {
Connections = 'https://didcomm.org/connections/1.0',
DidExchange = 'https://didcomm.org/didexchange/1.0'
}
export enum ResponseMode {
DIRECT_POST = 'direct_post',
DIRECT_POST_JWT = 'direct_post.jwt',
DC_API = 'dc_api',
DC_API_JWT = 'dc_api.jwt'
}
export enum NotificationStatus {
INITIATED = 'initiated',
DATA_DELIVERED = 'DataDelivered',
DATA_DELIVERED_AND_NOTIFIED_WITH_NATS = 'DataDeliveredAndNotifiedWithNATS',
DATA_DELIVERED_AND_NOTIFIED_WITH_FCM = 'DataDeliveredAndNotifiedWithFCM',
DATA_PURGED = 'DataPurged',
DATA_PURGED_AND_NOTIFIED_WITH_NATS = 'DataPurgedAndNotifiedWithNATS',
DATA_PURGED_AND_NOTIFIED_WITH_FCM = 'DataPurgedAndNotifiedWithFCM',
NOTIFICATION_CONSUMED = 'NotificationConsumed'
}
export enum ClientIdPrefix {
X509SanDns = 'x509_san_dns',
X509Hash = 'x509_hash'
}