Spaces:
Runtime error
Runtime error
Download src/modules/webhook/entities/webhook.entity.ts from MuhammadNoman7600/qwen_2.5_model: direct link, hf CLI and curl.
- Browser
- Download file 1.97 kB
-
https://huggingface.co/spaces/MuhammadNoman7600/qwen_2.5_model/resolve/main/src/modules/webhook/entities/webhook.entity.ts
- Command line
-
hf download hf://spaces/MuhammadNoman7600/qwen_2.5_model/src/modules/webhook/entities/webhook.entity.ts
-
curl -L -o webhook.entity.ts https://huggingface.co/spaces/MuhammadNoman7600/qwen_2.5_model/resolve/main/src/modules/webhook/entities/webhook.entity.ts
1.97 kB
| import { | |
| Entity, | |
| Column, | |
| Index, | |
| PrimaryGeneratedColumn, | |
| CreateDateColumn, | |
| UpdateDateColumn, | |
| ManyToOne, | |
| JoinColumn, | |
| } from 'typeorm'; | |
| import { Session } from '../../session/entities/session.entity'; | |
| import { DateTransformer } from '../../../common/transformers/date.transformer'; | |
| import { jsonColumnType, dateColumnType } from '../../../common/utils/column-types'; | |
| import { WebhookFilters } from '../filters/filter-types'; | |
| ('webhooks') | |
| export class Webhook { | |
| ('uuid') | |
| id: string; | |
| // varchar (not uuid) to match the authoritative migration DDL and sessions.id; the data connection | |
| // runs synchronize:false, so a 'uuid' decorator here would only mislead schema diffs / a stray sync. | |
| // Indexed: the dispatch path filters webhooks by sessionId on every emitted event (see the | |
| // AddWebhooksSessionIdIndex migration, which creates the index on migration-managed DBs). | |
| ('IDX_webhooks_sessionId') | |
| ({ type: 'varchar' }) | |
| sessionId: string; | |
| (() => Session, { onDelete: 'CASCADE' }) | |
| ({ name: 'sessionId' }) | |
| session: Session; | |
| ({ type: 'varchar', length: 2048 }) | |
| url: string; | |
| ({ type: jsonColumnType(), default: '["message.received"]' }) | |
| events: string[]; | |
| ({ type: 'varchar', length: 255, nullable: true }) | |
| secret: string | null; | |
| ({ type: jsonColumnType(), default: '{}' }) | |
| headers: Record<string, string>; | |
| // Optional smart pre-filter. Null/absent means "no filtering" (fire on every subscribed event). | |
| ({ type: jsonColumnType(), nullable: true }) | |
| filters: WebhookFilters | null; | |
| ({ type: 'boolean', default: true }) | |
| active: boolean; | |
| ({ type: 'int', default: 3 }) | |
| retryCount: number; | |
| ({ type: dateColumnType(), nullable: true, transformer: DateTransformer }) | |
| lastTriggeredAt: Date | null; | |
| () | |
| createdAt: Date; | |
| () | |
| updatedAt: Date; | |
| } | |