diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-27 15:59:39 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-08-27 15:59:39 +0900 |
| commit | 87d09f255dd702627bbc6fa58692eebba3830889 (patch) | |
| tree | b5defcefd421adcc24c56708ea3393b91c788c93 /packages/backend/src/models | |
| parent | perf(frontend): use WeakMap (diff) | |
| download | misskey-87d09f255dd702627bbc6fa58692eebba3830889.tar.gz misskey-87d09f255dd702627bbc6fa58692eebba3830889.tar.bz2 misskey-87d09f255dd702627bbc6fa58692eebba3830889.zip | |
refactor
Diffstat (limited to 'packages/backend/src/models')
| -rw-r--r-- | packages/backend/src/models/json-schema/user-webhook.ts | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/packages/backend/src/models/json-schema/user-webhook.ts b/packages/backend/src/models/json-schema/user-webhook.ts new file mode 100644 index 0000000000..8ea0991716 --- /dev/null +++ b/packages/backend/src/models/json-schema/user-webhook.ts @@ -0,0 +1,55 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { webhookEventTypes } from '@/models/Webhook.js'; + +export const packedUserWebhookSchema = { + type: 'object', + properties: { + id: { + type: 'string', + format: 'id', + optional: false, nullable: false, + }, + userId: { + type: 'string', + format: 'id', + optional: false, nullable: false, + }, + name: { + type: 'string', + optional: false, nullable: false, + }, + on: { + type: 'array', + items: { + type: 'string', + optional: false, nullable: false, + enum: webhookEventTypes, + }, + }, + url: { + type: 'string', + optional: false, nullable: false, + }, + secret: { + type: 'string', + optional: false, nullable: false, + }, + active: { + type: 'boolean', + optional: false, nullable: false, + }, + latestSentAt: { + type: 'string', + format: 'date-time', + optional: false, nullable: true, + }, + latestStatus: { + type: 'integer', + optional: false, nullable: true, + }, + }, +} as const; |