@@ -18,7 +18,7 @@ import { PrismaService } from '@/prisma/prisma.service';
18
18
import type { AnyRecord , InputJsonValue , TProjectId , TProjectIds } from '@/types' ;
19
19
import { WORKFLOW_DEFINITION_TAG } from '@/workflow-defintion/workflow-definition.controller' ;
20
20
import { WorkflowDefinitionService } from '@/workflow-defintion/workflow-definition.service' ;
21
- import { CreateCollectionFlowUrlDto } from '@/workflow/dtos/create-collection-flow-url' ;
21
+ import { CreateCollectionFlowUrlDto } from '@/workflow/dtos/create-collection-flow-url.dto ' ;
22
22
import { GetWorkflowsRuntimeInputDto } from '@/workflow/dtos/get-workflows-runtime-input.dto' ;
23
23
import { GetWorkflowsRuntimeOutputDto } from '@/workflow/dtos/get-workflows-runtime-output.dto' ;
24
24
import { WorkflowHookQuery } from '@/workflow/dtos/workflow-hook-query' ;
@@ -44,6 +44,7 @@ import { defaultContextSchema } from '@ballerine/common';
44
44
import { WorkflowRunSchema } from './schemas/workflow-run' ;
45
45
import { ValidationError } from '@/errors' ;
46
46
import { WorkflowRuntimeListItemModel } from '@/workflow/workflow-runtime-list-item.model' ;
47
+ import { CreateTokenDto } from '@/workflow/dtos/create-token.dto' ;
47
48
48
49
export const WORKFLOW_TAG = 'Workflows' ;
49
50
@swagger . ApiBearerAuth ( )
@@ -378,7 +379,7 @@ export class WorkflowControllerExternal {
378
379
@swagger . ApiForbiddenResponse ( { type : errors . ForbiddenException } )
379
380
async createCollectionFlowUrl (
380
381
@common . Body ( )
381
- { workflowRuntimeDataId } : Pick < CreateCollectionFlowUrlDto , 'workflowRuntimeDataId' > ,
382
+ { workflowRuntimeDataId } : CreateCollectionFlowUrlDto ,
382
383
) {
383
384
const result = await this . workflowTokenService . findFirstByWorkflowruntimeDataIdUnscoped (
384
385
workflowRuntimeDataId ,
@@ -401,7 +402,7 @@ export class WorkflowControllerExternal {
401
402
@common . HttpCode ( 200 )
402
403
@swagger . ApiForbiddenResponse ( { type : errors . ForbiddenException } )
403
404
async createToken (
404
- @common . Body ( ) { expiry, workflowRuntimeDataId, endUserId } : CreateCollectionFlowUrlDto ,
405
+ @common . Body ( ) { expiry, workflowRuntimeDataId, endUserId } : CreateTokenDto ,
405
406
@CurrentProject ( ) currentProjectId : TProjectId ,
406
407
) {
407
408
const expiresAt = new Date ( Date . now ( ) + ( expiry || 30 ) * 24 * 60 * 60 * 1000 ) ;
0 commit comments