@verana-labs/vs-agent-client 2.0.0-dev.1 → 2.0.0-dev.100

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 (86) hide show
  1. package/README.md +58 -111
  2. package/build/ApiClient.d.ts +12 -39
  3. package/build/ApiClient.js +13 -40
  4. package/build/ApiClient.js.map +1 -1
  5. package/build/api/AgentApi.d.ts +9 -0
  6. package/build/api/AgentApi.js +19 -0
  7. package/build/api/AgentApi.js.map +1 -0
  8. package/build/api/AnoncredsApi.d.ts +15 -0
  9. package/build/api/AnoncredsApi.js +37 -0
  10. package/build/api/AnoncredsApi.js.map +1 -0
  11. package/build/api/AuthApi.d.ts +8 -0
  12. package/build/api/AuthApi.js +16 -0
  13. package/build/api/AuthApi.js.map +1 -0
  14. package/build/api/DidcommApi.d.ts +44 -0
  15. package/build/api/DidcommApi.js +124 -0
  16. package/build/api/DidcommApi.js.map +1 -0
  17. package/build/api/VtApi.d.ts +17 -0
  18. package/build/api/VtApi.js +51 -0
  19. package/build/api/VtApi.js.map +1 -0
  20. package/build/events.d.ts +7 -0
  21. package/build/events.js +52 -0
  22. package/build/events.js.map +1 -0
  23. package/build/http.d.ts +19 -0
  24. package/build/http.js +61 -0
  25. package/build/http.js.map +1 -0
  26. package/build/index.d.ts +7 -3
  27. package/build/index.js +7 -3
  28. package/build/index.js.map +1 -1
  29. package/build/types/agent.d.ts +10 -0
  30. package/build/types/agent.js +3 -0
  31. package/build/types/agent.js.map +1 -0
  32. package/build/types/anoncreds.d.ts +48 -0
  33. package/build/types/anoncreds.js +3 -0
  34. package/build/types/anoncreds.js.map +1 -0
  35. package/build/types/auth.d.ts +18 -0
  36. package/build/types/auth.js +3 -0
  37. package/build/types/auth.js.map +1 -0
  38. package/build/types/common.d.ts +34 -0
  39. package/build/types/common.js +3 -0
  40. package/build/types/common.js.map +1 -0
  41. package/build/types/didcomm.d.ts +312 -0
  42. package/build/types/didcomm.js +3 -0
  43. package/build/types/didcomm.js.map +1 -0
  44. package/build/types/events.d.ts +193 -0
  45. package/build/types/events.js +3 -0
  46. package/build/types/events.js.map +1 -0
  47. package/build/types/index.d.ts +7 -1
  48. package/build/types/index.js +7 -1
  49. package/build/types/index.js.map +1 -1
  50. package/build/types/vt.d.ts +116 -0
  51. package/build/types/vt.js +3 -0
  52. package/build/types/vt.js.map +1 -0
  53. package/package.json +3 -15
  54. package/build/handlers/ExpressEventHandler.d.ts +0 -71
  55. package/build/handlers/ExpressEventHandler.js +0 -102
  56. package/build/handlers/ExpressEventHandler.js.map +0 -1
  57. package/build/handlers/index.d.ts +0 -1
  58. package/build/handlers/index.js +0 -18
  59. package/build/handlers/index.js.map +0 -1
  60. package/build/services/CredentialTypeService.d.ts +0 -19
  61. package/build/services/CredentialTypeService.js +0 -66
  62. package/build/services/CredentialTypeService.js.map +0 -1
  63. package/build/services/InvitationService.d.ts +0 -16
  64. package/build/services/InvitationService.js +0 -56
  65. package/build/services/InvitationService.js.map +0 -1
  66. package/build/services/MessageService.d.ts +0 -18
  67. package/build/services/MessageService.js +0 -57
  68. package/build/services/MessageService.js.map +0 -1
  69. package/build/services/RevocationRegistryService.d.ts +0 -18
  70. package/build/services/RevocationRegistryService.js +0 -58
  71. package/build/services/RevocationRegistryService.js.map +0 -1
  72. package/build/services/TrustCredentialService.d.ts +0 -33
  73. package/build/services/TrustCredentialService.js +0 -75
  74. package/build/services/TrustCredentialService.js.map +0 -1
  75. package/build/services/index.d.ts +0 -5
  76. package/build/services/index.js +0 -22
  77. package/build/services/index.js.map +0 -1
  78. package/build/types/enums.d.ts +0 -3
  79. package/build/types/enums.js +0 -9
  80. package/build/types/enums.js.map +0 -1
  81. package/build/utils/HttpUtils.d.ts +0 -4
  82. package/build/utils/HttpUtils.js +0 -18
  83. package/build/utils/HttpUtils.js.map +0 -1
  84. package/build/utils/index.d.ts +0 -1
  85. package/build/utils/index.js +0 -18
  86. package/build/utils/index.js.map +0 -1
@@ -0,0 +1,312 @@
1
+ import { BasicMessageRole, Claim, CredentialRole, CredentialState, DidCommVersion, DidExchangeRole, DidExchangeState, InvitationState, PaginationQuery, ProofRole, ProofState, RequestedCredential } from './common';
2
+ export interface ProtocolModule {
3
+ module: string;
4
+ protocols: string[];
5
+ }
6
+ export interface ConnectionRecord {
7
+ id: string;
8
+ state: DidExchangeState;
9
+ role: DidExchangeRole;
10
+ did?: string;
11
+ theirDid?: string;
12
+ theirLabel?: string;
13
+ alias?: string;
14
+ threadId?: string;
15
+ imageUrl?: string;
16
+ invitationId: string | null;
17
+ parentConnectionId: string | null;
18
+ invitationDid?: string;
19
+ didcommVersion?: DidCommVersion;
20
+ mediatorId?: string;
21
+ previousDids?: string[];
22
+ previousTheirDids?: string[];
23
+ createdAt: string;
24
+ updatedAt: string;
25
+ }
26
+ export interface ListConnectionsQuery extends PaginationQuery {
27
+ invitationId?: string;
28
+ parentConnectionId?: string;
29
+ state?: DidExchangeState;
30
+ role?: DidExchangeRole;
31
+ did?: string;
32
+ theirDid?: string;
33
+ threadId?: string;
34
+ invitationDid?: string;
35
+ didcommVersion?: DidCommVersion;
36
+ mediatorId?: string;
37
+ }
38
+ export interface CreateInvitationBody {
39
+ /** When absent, the agent creates a standalone invitation and returns it. */
40
+ connectionId?: string;
41
+ /** A referral. Requires `connectionId`. */
42
+ did?: string;
43
+ /** Requires that `connectionId` is absent. */
44
+ reusable?: boolean;
45
+ /** Ignored for a standalone invitation. */
46
+ label?: string;
47
+ /** Ignored for a standalone invitation. */
48
+ imageUrl?: string;
49
+ goal?: string;
50
+ goalCode?: string;
51
+ /** The agent ignores it when `connectionId` is present. */
52
+ useLegacyDid?: boolean;
53
+ /** The agent ignores it when `connectionId` is present. */
54
+ didcommVersion?: DidCommVersion;
55
+ }
56
+ export interface CreateInvitationResponse {
57
+ /** Absent for a referral. */
58
+ id?: string;
59
+ /** Present for a standalone invitation only. */
60
+ invitation?: Record<string, unknown>;
61
+ /** Present for a standalone invitation only. */
62
+ shortUrl?: string;
63
+ /** Present when the request named a `connectionId`. */
64
+ messageId?: string;
65
+ }
66
+ export interface InvitationAcceptance {
67
+ connectionId: string;
68
+ /** True when the peer accepted the invitation on a connection that it already held. */
69
+ reused: boolean;
70
+ acceptedAt: string;
71
+ }
72
+ export interface InvitationRecord {
73
+ id: string;
74
+ state: InvitationState;
75
+ didcommVersion: DidCommVersion;
76
+ reusable: boolean;
77
+ invitation: Record<string, unknown>;
78
+ shortUrl: string | null;
79
+ parentConnectionId: string | null;
80
+ acceptances: InvitationAcceptance[];
81
+ createdAt: string;
82
+ updatedAt: string;
83
+ }
84
+ export interface ListInvitationsQuery extends PaginationQuery {
85
+ state?: InvitationState;
86
+ parentConnectionId?: string;
87
+ /** A connection that appears in `acceptances`. */
88
+ connectionId?: string;
89
+ reusable?: boolean;
90
+ didcommVersion?: DidCommVersion;
91
+ }
92
+ export interface SendBasicMessageBody {
93
+ connectionId: string;
94
+ content: string;
95
+ }
96
+ export interface ListBasicMessagesQuery extends PaginationQuery {
97
+ connectionId?: string;
98
+ role?: BasicMessageRole;
99
+ }
100
+ export interface BasicMessageRecord {
101
+ id: string;
102
+ connectionId: string;
103
+ role: BasicMessageRole;
104
+ content: string;
105
+ sentTime: string;
106
+ createdAt: string;
107
+ }
108
+ export type MessageState = 'created' | 'submitted' | 'received' | 'viewed' | 'deleted';
109
+ export interface MessageReceipt {
110
+ messageId: string;
111
+ state: MessageState;
112
+ timestamp?: string;
113
+ }
114
+ export interface SendReceiptsBody {
115
+ connectionId: string;
116
+ receipts: MessageReceipt[];
117
+ }
118
+ export type MessageReactionAction = 'react' | 'unreact';
119
+ export interface MessageReaction {
120
+ messageId: string;
121
+ emoji: string;
122
+ action: MessageReactionAction;
123
+ timestamp?: string;
124
+ }
125
+ export interface SendReactionsBody {
126
+ connectionId: string;
127
+ reactions: MessageReaction[];
128
+ }
129
+ export interface ProfilePicture {
130
+ mimeType?: string;
131
+ links?: string[];
132
+ base64?: string;
133
+ }
134
+ export interface UserProfile {
135
+ displayName?: string;
136
+ displayPicture?: ProfilePicture;
137
+ displayIcon?: ProfilePicture;
138
+ description?: string;
139
+ preferredLanguage?: string;
140
+ }
141
+ export interface SendProfileBody {
142
+ connectionId: string;
143
+ profile?: UserProfile;
144
+ sendBackYours?: boolean;
145
+ threadId?: string;
146
+ }
147
+ export interface RequestProfileBody {
148
+ connectionId: string;
149
+ query?: string[];
150
+ }
151
+ export interface MediaCiphering {
152
+ algorithm: string;
153
+ parameters: Record<string, unknown>;
154
+ }
155
+ export interface SharedMediaItem {
156
+ id?: string;
157
+ uri: string;
158
+ mimeType: string;
159
+ fileName?: string;
160
+ description?: string;
161
+ byteCount?: number;
162
+ ciphering?: MediaCiphering;
163
+ metadata?: Record<string, unknown>;
164
+ }
165
+ export interface ShareMediaBody {
166
+ connectionId: string;
167
+ description?: string;
168
+ threadId?: string;
169
+ items: SharedMediaItem[];
170
+ }
171
+ export type CallType = 'audio' | 'video' | 'service';
172
+ export interface OfferCallBody {
173
+ connectionId: string;
174
+ callType: CallType;
175
+ parameters: Record<string, unknown>;
176
+ description?: string;
177
+ offerStartTime?: string;
178
+ offerExpirationTime?: string;
179
+ }
180
+ export interface CallThreadBody {
181
+ connectionId: string;
182
+ threadId: string;
183
+ }
184
+ export interface AcceptCallBody extends CallThreadBody {
185
+ parameters: Record<string, unknown>;
186
+ }
187
+ export type ActionMenuFormInputType = 'text';
188
+ export interface ActionMenuFormParameter {
189
+ name: string;
190
+ title: string;
191
+ description: string;
192
+ default?: string;
193
+ required?: boolean;
194
+ type?: ActionMenuFormInputType;
195
+ }
196
+ export interface ActionMenuForm {
197
+ description: string;
198
+ submitLabel: string;
199
+ params: ActionMenuFormParameter[];
200
+ }
201
+ export interface ActionMenuOption {
202
+ name: string;
203
+ title: string;
204
+ description: string;
205
+ disabled?: boolean;
206
+ form?: ActionMenuForm;
207
+ }
208
+ export interface ActionMenu {
209
+ title: string;
210
+ description: string;
211
+ options: ActionMenuOption[];
212
+ }
213
+ export interface SendMenuBody {
214
+ connectionId: string;
215
+ menu: ActionMenu;
216
+ }
217
+ export interface ValidResponse {
218
+ text: string;
219
+ }
220
+ export interface SendQuestionBody {
221
+ connectionId: string;
222
+ question: string;
223
+ validResponses: ValidResponse[];
224
+ detail?: string;
225
+ }
226
+ export interface RequestMrtdBody {
227
+ connectionId: string;
228
+ }
229
+ export interface ListPresentationsQuery extends PaginationQuery {
230
+ connectionId?: string;
231
+ threadId?: string;
232
+ role?: ProofRole;
233
+ state?: ProofState;
234
+ }
235
+ export interface PresentationRecord {
236
+ proofExchangeId: string;
237
+ state: ProofState;
238
+ role: ProofRole;
239
+ connectionId?: string;
240
+ requestedCredentials: RequestedCredential[];
241
+ claims: Claim[];
242
+ verified: boolean;
243
+ threadId?: string;
244
+ errorMessage?: string;
245
+ createdAt: string;
246
+ updatedAt: string;
247
+ }
248
+ export interface RequestedCredentialInput {
249
+ credentialDefinitionId?: string;
250
+ jsonSchemaCredentialId?: string;
251
+ attributes?: string[];
252
+ }
253
+ export interface CreatePresentationRequestBody {
254
+ requestedCredentials: RequestedCredentialInput[];
255
+ /** An established connection to send the request on, in place of an invitation. */
256
+ connectionId?: string;
257
+ requireNonRevocation?: boolean;
258
+ autoAccept?: boolean;
259
+ /** The agent ignores it when `connectionId` is present. */
260
+ useLegacyDid?: boolean;
261
+ /** The agent ignores it when `connectionId` is present. */
262
+ didcommVersion?: DidCommVersion;
263
+ }
264
+ export interface CreatePresentationRequestResponse {
265
+ proofExchangeId: string;
266
+ /** Absent when the request named a `connectionId`. */
267
+ invitation?: Record<string, unknown>;
268
+ /** Absent when the request named a `connectionId`. */
269
+ shortUrl?: string;
270
+ }
271
+ export interface DeclineExchangeBody {
272
+ reason?: string;
273
+ }
274
+ export interface ListCredentialExchangesQuery extends PaginationQuery {
275
+ connectionId?: string;
276
+ threadId?: string;
277
+ role?: CredentialRole;
278
+ state?: CredentialState;
279
+ }
280
+ export interface CredentialExchangeRecord {
281
+ credentialExchangeId: string;
282
+ state: CredentialState;
283
+ role: CredentialRole;
284
+ threadId: string;
285
+ connectionId?: string;
286
+ credentialDefinitionId?: string;
287
+ schemaId?: string;
288
+ claims: Claim[];
289
+ errorMessage?: string;
290
+ createdAt: string;
291
+ updatedAt: string;
292
+ }
293
+ export interface CreateCredentialOfferBody {
294
+ credentialDefinitionId: string;
295
+ claims: Claim[];
296
+ /** An established connection to send the offer on, in place of an invitation. */
297
+ connectionId?: string;
298
+ revocationRegistryDefinitionId?: string;
299
+ revocationRegistryIndex?: number;
300
+ autoAccept?: boolean;
301
+ /** The agent ignores it when `connectionId` is present. */
302
+ useLegacyDid?: boolean;
303
+ /** The agent ignores it when `connectionId` is present. */
304
+ didcommVersion?: DidCommVersion;
305
+ }
306
+ export interface CreateCredentialOfferResponse {
307
+ credentialExchangeId: string;
308
+ /** Absent when the request named a `connectionId`. */
309
+ invitation?: Record<string, unknown>;
310
+ /** Absent when the request named a `connectionId`. */
311
+ shortUrl?: string;
312
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=didcomm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"didcomm.js","sourceRoot":"","sources":["../../src/types/didcomm.ts"],"names":[],"mappings":""}
@@ -0,0 +1,193 @@
1
+ import { CredentialState, DidExchangeState, InvitationState, ProofState, VtFlowState } from './common';
2
+ import { BasicMessageRecord, ConnectionRecord, CredentialExchangeRecord, InvitationRecord, MessageReactionAction, MessageState, PresentationRecord, ProfilePicture, SharedMediaItem } from './didcomm';
3
+ import { VtFlowRecord } from './vt';
4
+ export type ConnectionStateUpdatedData = ConnectionRecord & {
5
+ previousState: DidExchangeState | null;
6
+ };
7
+ export type InvitationStateUpdatedData = InvitationRecord & {
8
+ previousState: InvitationState | null;
9
+ };
10
+ export type PresentationStateUpdatedData = PresentationRecord & {
11
+ previousState: ProofState | null;
12
+ };
13
+ export type CredentialExchangeStateUpdatedData = CredentialExchangeRecord & {
14
+ previousState: CredentialState | null;
15
+ };
16
+ export type VtFlowStateUpdatedData = VtFlowRecord & {
17
+ previousState: VtFlowState | null;
18
+ };
19
+ export interface MessageReceiptsReceivedData {
20
+ connectionId: string;
21
+ receipts?: {
22
+ messageId: string;
23
+ state: MessageState;
24
+ timestamp: string;
25
+ }[];
26
+ }
27
+ export interface MessageReactionsReceivedData {
28
+ connectionId: string;
29
+ reactions?: {
30
+ messageId: string;
31
+ emoji: string;
32
+ action: MessageReactionAction;
33
+ timestamp: string;
34
+ }[];
35
+ }
36
+ export interface ReceivedUserProfile {
37
+ displayName?: string;
38
+ displayPicture?: ProfilePicture | null | '';
39
+ displayIcon?: ProfilePicture | null | '';
40
+ description?: string;
41
+ preferredLanguage?: string;
42
+ }
43
+ export interface ProfileReceivedData {
44
+ connectionId: string;
45
+ threadId?: string;
46
+ profile: ReceivedUserProfile;
47
+ sendBackYours: boolean;
48
+ }
49
+ export interface RequestProfileReceivedData {
50
+ connectionId: string;
51
+ threadId: string;
52
+ query?: string[];
53
+ }
54
+ export interface ShareMediaReceivedData {
55
+ connectionId: string;
56
+ threadId?: string;
57
+ description?: string;
58
+ items?: (SharedMediaItem & {
59
+ id: string;
60
+ })[];
61
+ }
62
+ export interface RequestMediaReceivedData {
63
+ connectionId: string;
64
+ threadId: string;
65
+ description?: string;
66
+ itemIds: string[];
67
+ }
68
+ export interface CallOfferReceivedData {
69
+ connectionId: string;
70
+ threadId: string;
71
+ callType: string;
72
+ parameters: Record<string, unknown>;
73
+ description?: string;
74
+ offerStartTime?: string;
75
+ offerExpirationTime?: string;
76
+ }
77
+ export interface CallAcceptReceivedData {
78
+ connectionId: string;
79
+ threadId: string;
80
+ parameters: Record<string, unknown>;
81
+ }
82
+ export interface CallThreadData {
83
+ connectionId: string;
84
+ threadId: string;
85
+ }
86
+ export interface MenuRequestReceivedData {
87
+ connectionId: string;
88
+ threadId: string;
89
+ }
90
+ export interface PerformReceivedData {
91
+ connectionId: string;
92
+ threadId: string;
93
+ name: string;
94
+ params?: Record<string, string>;
95
+ }
96
+ export interface AnswerReceivedData {
97
+ connectionId: string;
98
+ threadId: string;
99
+ response: string;
100
+ }
101
+ export interface MrzDataReceivedData {
102
+ connectionId: string;
103
+ threadId: string;
104
+ mrzData: {
105
+ raw: string | string[];
106
+ parsed: {
107
+ format?: string;
108
+ fields: Partial<Record<string, string | null>>;
109
+ valid: boolean;
110
+ };
111
+ };
112
+ }
113
+ export interface EmrtdDataReceivedData {
114
+ connectionId: string;
115
+ threadId: string;
116
+ dataGroups: {
117
+ raw: Record<string, string>;
118
+ parsed: {
119
+ fields?: Record<string, unknown>;
120
+ valid: boolean;
121
+ };
122
+ verification?: {
123
+ authenticity: boolean;
124
+ integrity: boolean;
125
+ details?: string;
126
+ };
127
+ };
128
+ }
129
+ export type MrtdProblemReportReason = 'e.p.mrz-refused' | 'e.p.emrtd-refused' | 'e.p.mrz-timeout' | 'e.p.emrtd-timeout';
130
+ export interface MrtdProblemReportReceivedData {
131
+ connectionId: string;
132
+ threadId: string;
133
+ reason: MrtdProblemReportReason;
134
+ }
135
+ export interface VprNotificationPayload {
136
+ module: string;
137
+ action: string;
138
+ messageType: string;
139
+ txIndex: number;
140
+ messageIndex: number;
141
+ sender: string;
142
+ relatedDids: string[];
143
+ entityType?: string;
144
+ entityId?: string;
145
+ }
146
+ export interface VprNotificationData {
147
+ timestamp: string;
148
+ eventType: string;
149
+ did: string;
150
+ blockHeight: number;
151
+ txHash: string;
152
+ payload: VprNotificationPayload;
153
+ changes?: Record<string, unknown>;
154
+ }
155
+ export interface EventDataMap {
156
+ 'didcomm.connections.state-updated': ConnectionStateUpdatedData;
157
+ 'didcomm.invitations.state-updated': InvitationStateUpdatedData;
158
+ 'didcomm.basic-messages.message-received': BasicMessageRecord;
159
+ 'didcomm.receipts.message-receipts-received': MessageReceiptsReceivedData;
160
+ 'didcomm.reactions.message-reactions-received': MessageReactionsReceivedData;
161
+ 'didcomm.user-profile.profile-received': ProfileReceivedData;
162
+ 'didcomm.user-profile.request-profile-received': RequestProfileReceivedData;
163
+ 'didcomm.media-sharing.share-media-received': ShareMediaReceivedData;
164
+ 'didcomm.media-sharing.request-media-received': RequestMediaReceivedData;
165
+ 'didcomm.calls.call-offer-received': CallOfferReceivedData;
166
+ 'didcomm.calls.call-accept-received': CallAcceptReceivedData;
167
+ 'didcomm.calls.call-reject-received': CallThreadData;
168
+ 'didcomm.calls.call-end-received': CallThreadData;
169
+ 'didcomm.action-menu.menu-request-received': MenuRequestReceivedData;
170
+ 'didcomm.action-menu.perform-received': PerformReceivedData;
171
+ 'didcomm.question-answer.answer-received': AnswerReceivedData;
172
+ 'didcomm.mrtd.mrz-data-received': MrzDataReceivedData;
173
+ 'didcomm.mrtd.emrtd-data-received': EmrtdDataReceivedData;
174
+ 'didcomm.mrtd.problem-report-received': MrtdProblemReportReceivedData;
175
+ 'didcomm.presentations.state-updated': PresentationStateUpdatedData;
176
+ 'didcomm.credential-exchanges.state-updated': CredentialExchangeStateUpdatedData;
177
+ 'vt.flows.state-updated': VtFlowStateUpdatedData;
178
+ 'vpr.notification': VprNotificationData;
179
+ }
180
+ export type EventType = keyof EventDataMap;
181
+ export type EventEnvelope<T extends EventType = EventType> = T extends EventType ? {
182
+ id: string;
183
+ type: T;
184
+ timestamp: string;
185
+ data: EventDataMap[T];
186
+ } : never;
187
+ export interface UnknownEventEnvelope {
188
+ id: string;
189
+ type: string;
190
+ timestamp: string;
191
+ data: unknown;
192
+ }
193
+ export type EventHandlerFn<T extends EventType> = (data: EventDataMap[T], envelope: EventEnvelope<T>) => void | Promise<void>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":""}
@@ -1 +1,7 @@
1
- export * from './enums';
1
+ export * from './agent';
2
+ export * from './anoncreds';
3
+ export * from './auth';
4
+ export * from './common';
5
+ export * from './didcomm';
6
+ export * from './events';
7
+ export * from './vt';
@@ -14,5 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./enums"), exports);
17
+ __exportStar(require("./agent"), exports);
18
+ __exportStar(require("./anoncreds"), exports);
19
+ __exportStar(require("./auth"), exports);
20
+ __exportStar(require("./common"), exports);
21
+ __exportStar(require("./didcomm"), exports);
22
+ __exportStar(require("./events"), exports);
23
+ __exportStar(require("./vt"), exports);
18
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,8CAA2B;AAC3B,yCAAsB;AACtB,2CAAwB;AACxB,4CAAyB;AACzB,2CAAwB;AACxB,uCAAoB"}
@@ -0,0 +1,116 @@
1
+ import { PaginationQuery, VtConnectionState, VtFlowRole, VtFlowState, VtFlowVariant } from './common';
2
+ export type VtFlowPendingAction = 'APPLICANT' | 'VALIDATOR' | 'AGENT' | 'CHAIN' | 'NONE';
3
+ export interface VtFlowOobLink {
4
+ url: string;
5
+ description: string;
6
+ expiresAt?: string;
7
+ at: string;
8
+ }
9
+ export interface VtFlowMessage {
10
+ type: 'oob-link' | 'validating' | 'problem-report';
11
+ text?: string;
12
+ at: string;
13
+ url?: string;
14
+ }
15
+ export interface VtFlowTx {
16
+ hash?: string;
17
+ submittedAt?: string;
18
+ height?: number;
19
+ status: 'SUBMITTED' | 'SUCCEEDED' | 'FAILED';
20
+ reason?: string;
21
+ error?: string;
22
+ }
23
+ export interface VtFlowValidation {
24
+ decidedAt: string;
25
+ submission: 'AGENT' | 'OPERATOR';
26
+ validationFees?: number;
27
+ issuanceFees?: number;
28
+ verificationFees?: number;
29
+ issuanceFeeDiscount?: number;
30
+ verificationFeeDiscount?: number;
31
+ effectiveUntil?: string;
32
+ opSummaryDigest?: string;
33
+ tx?: VtFlowTx;
34
+ }
35
+ export interface VtFlowRecord {
36
+ id: string;
37
+ participantSessionId: string;
38
+ flowState: VtFlowState;
39
+ connectionState: VtConnectionState;
40
+ role: VtFlowRole;
41
+ variant: VtFlowVariant;
42
+ threadId: string;
43
+ connectionId: string;
44
+ agentParticipantId: string;
45
+ walletAgentParticipantId: string;
46
+ peerDid?: string;
47
+ applicantParticipantId?: string;
48
+ validatorParticipantId?: string;
49
+ schemaId?: string;
50
+ claims?: Record<string, unknown>;
51
+ proofs?: unknown[];
52
+ oobLink?: VtFlowOobLink;
53
+ messages: VtFlowMessage[];
54
+ pendingAction: VtFlowPendingAction;
55
+ validation?: VtFlowValidation;
56
+ issuance?: {
57
+ tx?: VtFlowTx;
58
+ };
59
+ credentialExchangeRecordId?: string;
60
+ credentialId?: string;
61
+ credentialDigest?: string;
62
+ subprotocolThid?: string;
63
+ errorMessage?: string;
64
+ createdAt: string;
65
+ updatedAt: string;
66
+ lastEventAt: string;
67
+ }
68
+ export interface ListFlowsQuery extends PaginationQuery {
69
+ role?: VtFlowRole;
70
+ connectionState?: VtConnectionState;
71
+ flowState?: VtFlowState;
72
+ peerDid?: string;
73
+ applicantParticipantId?: string;
74
+ validatorParticipantId?: string;
75
+ schemaId?: string;
76
+ participantSessionId?: string;
77
+ }
78
+ export interface EditClaimsBody {
79
+ claims: Record<string, unknown>;
80
+ }
81
+ export interface SendOobLinkBody {
82
+ url: string;
83
+ description: string;
84
+ expiresAt?: string;
85
+ }
86
+ export interface StartValidationBody {
87
+ comment?: string;
88
+ }
89
+ export interface ValidateFlowBody {
90
+ validationFees?: number;
91
+ issuanceFees?: number;
92
+ verificationFees?: number;
93
+ issuanceFeeDiscount?: number;
94
+ verificationFeeDiscount?: number;
95
+ effectiveUntil?: string;
96
+ opSummaryDigest?: string;
97
+ }
98
+ export interface RejectFlowBody {
99
+ code?: 'vt-flow.validation-refused' | 'vt-flow.session-terminated' | 'vt-flow.oob-expired';
100
+ description: string;
101
+ }
102
+ export type ServiceEndpointValue = string | Record<string, unknown> | Array<string | Record<string, unknown>>;
103
+ export interface ServiceEndpoint {
104
+ id: string;
105
+ type: string;
106
+ serviceEndpoint: ServiceEndpointValue;
107
+ }
108
+ export interface AddServiceEndpointBody {
109
+ type: string;
110
+ serviceEndpoint: ServiceEndpointValue;
111
+ id?: string;
112
+ }
113
+ export interface UpdateServiceEndpointBody {
114
+ type?: string;
115
+ serviceEndpoint?: ServiceEndpointValue;
116
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=vt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vt.js","sourceRoot":"","sources":["../../src/types/vt.ts"],"names":[],"mappings":""}