@@ -61,18 +61,20 @@ export class AgentController {
61
61
62
62
/**
63
63
* Get Organization agent health
64
- * @param orgId
65
- * @param reqUser
66
- * @param res
64
+ * @param orgId The ID of the organization
65
+ * @param reqUser The user making the request
66
+ * @param res The response object
67
67
* @returns Get agent details
68
68
*/
69
69
@Get ( '/orgs/:orgId/agents/health' )
70
70
@ApiOperation ( {
71
71
summary : 'Get the agent health details' ,
72
- description : 'Get the agent health details'
72
+ description : 'Get the agent health details for the organization '
73
73
} )
74
- @UseGuards ( AuthGuard ( 'jwt' ) )
75
- async getAgentHealth ( @Param ( 'orgId' ) orgId : string , @User ( ) reqUser : user , @Res ( ) res : Response ) : Promise < Response > {
74
+ @UseGuards ( AuthGuard ( 'jwt' ) , OrgRolesGuard )
75
+ @Roles ( OrgRoles . OWNER , OrgRoles . ADMIN , OrgRoles . HOLDER , OrgRoles . ISSUER , OrgRoles . SUPER_ADMIN , OrgRoles . MEMBER , OrgRoles . VERIFIER )
76
+
77
+ async getAgentHealth ( @Param ( 'orgId' ) orgId : string , @User ( ) reqUser : user , @Res ( ) res : Response ) : Promise < Response > {
76
78
const agentData = await this . agentService . getAgentHealth ( reqUser , orgId ) ;
77
79
78
80
const finalResponse : IResponse = {
@@ -84,10 +86,16 @@ export class AgentController {
84
86
return res . status ( HttpStatus . OK ) . json ( finalResponse ) ;
85
87
}
86
88
89
+ /**
90
+ * Get the ledger config details
91
+ * @param reqUser The user making the request
92
+ * @param res The response object
93
+ * @returns Ledger config details
94
+ */
87
95
@Get ( '/orgs/agents/ledgerConfig' )
88
96
@ApiOperation ( {
89
97
summary : 'Get the ledger config details' ,
90
- description : 'Get the ledger config details'
98
+ description : 'Get the all supported ledger configuration details for the platform '
91
99
} )
92
100
@UseGuards ( AuthGuard ( 'jwt' ) )
93
101
async getLedgerDetails ( @User ( ) reqUser : user , @Res ( ) res : Response ) : Promise < Response > {
@@ -104,14 +112,15 @@ export class AgentController {
104
112
105
113
/**
106
114
* Spinup the agent by organization
107
- * @param agentSpinupDto
108
- * @param user
115
+ * @param agentSpinupDto The details of the agent to be spun up
116
+ * @param user The user making the request
117
+ * @param res The response object
109
118
* @returns Get agent status
110
119
*/
111
120
@Post ( '/orgs/:orgId/agents/spinup' )
112
121
@ApiOperation ( {
113
- summary : 'Agent spinup ' ,
114
- description : 'Create a new agent spin up .'
122
+ summary : 'Spinup the platform admin agent ' ,
123
+ description : 'Initialize and configure a new platform admin agent for the platform .'
115
124
} )
116
125
@UseGuards ( AuthGuard ( 'jwt' ) , OrgRolesGuard )
117
126
@Roles ( OrgRoles . OWNER , OrgRoles . ADMIN )
@@ -139,20 +148,20 @@ export class AgentController {
139
148
140
149
/**
141
150
* Create wallet for shared agent
142
- * @param orgId
143
- * @param createTenantDto
144
- * @param user
145
- * @param res
146
- * @returns wallet initialization status
151
+ * @param orgId The ID of the organization
152
+ * @param createTenantDto The details of the tenant to be created
153
+ * @param user The user making the request
154
+ * @param res The response object
155
+ * @returns Wallet initialization status
147
156
*/
148
157
@Post ( '/orgs/:orgId/agents/wallet' )
149
158
@ApiOperation ( {
150
- summary : 'Shared Agent' ,
151
- description : 'Create a shared agent.'
159
+ summary : 'Create Shared Agent Wallet ' ,
160
+ description : 'Initialize and create a shared agent wallet for the organization .'
152
161
} )
153
162
@UseGuards ( AuthGuard ( 'jwt' ) , OrgRolesGuard )
154
163
@Roles ( OrgRoles . OWNER , OrgRoles . ADMIN )
155
- @ApiResponse ( { status : HttpStatus . CREATED , description : 'Success ' , type : ApiResponseDto } )
164
+ @ApiResponse ( { status : HttpStatus . CREATED , description : 'Wallet successfully created ' , type : ApiResponseDto } )
156
165
async createTenant (
157
166
@Param ( 'orgId' ) orgId : string ,
158
167
@Body ( ) createTenantDto : CreateTenantDto ,
@@ -174,13 +183,16 @@ export class AgentController {
174
183
175
184
/**
176
185
* Create wallet
177
- * @param orgId
178
- * @returns wallet
186
+ * @param orgId The ID of the organization
187
+ * @param createWalletDto The details of the wallet to be created
188
+ * @param user The user making the request
189
+ * @param res The response object
190
+ * @returns Wallet details
179
191
*/
180
192
@Post ( '/orgs/:orgId/agents/createWallet' )
181
193
@ApiOperation ( {
182
- summary : 'Create wallet ' ,
183
- description : 'Create wallet'
194
+ summary : 'Create tenant in the agent ' ,
195
+ description : 'Create a new wallet for the organization without storing the wallet details in the platform. '
184
196
} )
185
197
@UseGuards ( AuthGuard ( 'jwt' ) , OrgRolesGuard )
186
198
@Roles ( OrgRoles . OWNER , OrgRoles . ADMIN )
@@ -203,16 +215,18 @@ export class AgentController {
203
215
return res . status ( HttpStatus . CREATED ) . json ( finalResponse ) ;
204
216
}
205
217
206
- // This function will be used after multiple did method implementation in create wallet
207
218
/**
208
219
* Create did
209
- * @param orgId
210
- * @returns did
220
+ * @param orgId The ID of the organization
221
+ * @param createDidDto The details of the DID to be created
222
+ * @param user The user making the request
223
+ * @param res The response object
224
+ * @returns DID details
211
225
*/
212
226
@Post ( '/orgs/:orgId/agents/did' )
213
227
@ApiOperation ( {
214
- summary : 'Create new did ' ,
215
- description : 'Create new did for an organization'
228
+ summary : 'Create new DID ' ,
229
+ description : 'Create a new DID for an organization wallet '
216
230
} )
217
231
@UseGuards ( AuthGuard ( 'jwt' ) , OrgRolesGuard )
218
232
@Roles ( OrgRoles . OWNER , OrgRoles . ADMIN , OrgRoles . ISSUER )
@@ -246,10 +260,15 @@ export class AgentController {
246
260
247
261
/**
248
262
* Create Secp256k1 key pair for polygon DID
249
- * @param orgId
263
+ * @param orgId The ID of the organization
264
+ * @param res The response object
250
265
* @returns Secp256k1 key pair for polygon DID
251
266
*/
252
267
@Post ( '/orgs/:orgId/agents/polygon/create-keys' )
268
+ @ApiOperation ( {
269
+ summary : 'Create Secp256k1 key pair for polygon DID' ,
270
+ description : 'Create Secp256k1 key pair for polygon DID for an organization'
271
+ } )
253
272
@UseGuards ( AuthGuard ( 'jwt' ) , OrgRolesGuard )
254
273
@Roles ( OrgRoles . OWNER , OrgRoles . ADMIN , OrgRoles . PLATFORM_ADMIN , OrgRoles . ISSUER , OrgRoles . VERIFIER )
255
274
@ApiResponse ( { status : HttpStatus . CREATED , description : 'Success' , type : ApiResponseDto } )
@@ -267,14 +286,15 @@ export class AgentController {
267
286
268
287
/**
269
288
* Configure the agent by organization
270
- * @param agentSpinupDto
271
- * @param user
272
- * @returns Get agent status
289
+ * @param agentConfigureDto The details of the agent configuration
290
+ * @param user The user making the request
291
+ * @param res The response object
292
+ * @returns Agent configuration status
273
293
*/
274
294
@Post ( '/orgs/:orgId/agents/configure' )
275
295
@ApiOperation ( {
276
- summary : 'Agent configure ' ,
277
- description : 'Create a new agent configure .'
296
+ summary : 'Configure the organization agent ' ,
297
+ description : 'Configure the running dedicated agent for the organization using the provided configuration details .'
278
298
} )
279
299
@UseGuards ( AuthGuard ( 'jwt' ) , OrgRolesGuard )
280
300
@Roles ( OrgRoles . OWNER , OrgRoles . ADMIN )
@@ -299,10 +319,17 @@ export class AgentController {
299
319
return res . status ( HttpStatus . CREATED ) . json ( finalResponse ) ;
300
320
}
301
321
322
+ /**
323
+ * Delete wallet
324
+ * @param orgId The ID of the organization
325
+ * @param user The user making the request
326
+ * @param res The response object
327
+ * @returns Success message
328
+ */
302
329
@Delete ( '/orgs/:orgId/agents/wallet' )
303
330
@ApiOperation ( {
304
- summary : 'Delete wallet' ,
305
- description : 'Delete agent wallet by organization.'
331
+ summary : 'Delete agent wallet' ,
332
+ description : 'Delete agent wallet for the organization using orgId .'
306
333
} )
307
334
@UseGuards ( AuthGuard ( 'jwt' ) , OrgRolesGuard )
308
335
@Roles ( OrgRoles . OWNER )
@@ -321,4 +348,4 @@ export class AgentController {
321
348
322
349
return res . status ( HttpStatus . OK ) . json ( finalResponse ) ;
323
350
}
324
- }
351
+ }
0 commit comments