feat: v2 routing forms responses endpoints (#19319)

* wip: routing forms responses

* refactor structure

* Revert "refactor structure"

This reverts commit b641c06592cd9314008e81c4584039bd42393ac7.

* routing forms

* remove unused file
This commit is contained in:
Lauris Skraucis authored and GitHub committed 2025-02-21 13:38:00 +05:30
1 parent 0b3aa4fd34
commit e6daed762b
19 files changed
+714

No files matched your search

+1
View File
@@ -10,3 +10,4 @@ export * from "./event-types";
export * from "./organizations";
export * from "./teams";
export * from "./embed";
export * from "./routing-forms";
@@ -0,0 +1 @@
export * from "./responses";
@@ -0,0 +1 @@
export * from "./routing-form-response.output";
@@ -0,0 +1,54 @@
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import { Expose } from "class-transformer";
import { IsDate, IsInt, IsString, IsObject } from "class-validator";
export class RoutingFormResponseResponseOutput {
@ApiProperty()
@IsString()
@Expose()
label!: string;
@ApiPropertyOptional()
@IsString()
@Expose()
identifier?: string;
@ApiProperty()
@IsString()
@Expose()
value!: string | number | string[];
}
export class RoutingFormResponseOutput {
@ApiProperty()
@IsInt()
@Expose()
id!: string;
@ApiProperty()
@IsInt()
@Expose()
formId!: string;
@ApiProperty()
@IsString()
@Expose()
formFillerId!: string;
@ApiProperty()
@Expose()
@IsString()
routedToBookingUid!: string;
@ApiProperty({
example: { "f00b26df-f54b-4985-8d98-17c5482c6a24": { label: "participant", value: "mamut" } },
})
@IsObject()
@Expose()
response!: Record<string, RoutingFormResponseResponseOutput>;
@ApiProperty()
@Expose()
@IsDate()
createdAt!: Date;
}