-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(backend): Webhook Test一致性+リアクションhook実装
Signed-off-by: eternal-flame-AD <[email protected]>
- Loading branch information
1 parent
a96f09c
commit 4bc97c7
Showing
6 changed files
with
171 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* SPDX-FileCopyrightText: syuilo and misskey-project | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
export const packedUserWebhookNoteBodySchema = { | ||
type: 'object', | ||
properties: { | ||
note: { | ||
type: 'object', | ||
ref: 'Note', | ||
optional: false, | ||
nullable: false, | ||
}, | ||
}, | ||
nullable: false, | ||
optional: false, | ||
} as const; | ||
|
||
export const packedUserWebhookUserBodySchema = { | ||
type: 'object', | ||
properties: { | ||
user: { | ||
type: 'object', | ||
ref: 'UserDetailedNotMe', | ||
optional: false, | ||
nullable: false, | ||
}, | ||
}, | ||
nullable: false, | ||
optional: false, | ||
} as const; | ||
|
||
export const packedUserWebhookReactionBodySchema = { | ||
type: 'object', | ||
properties: { | ||
note: { | ||
type: 'object', | ||
ref: 'Note', | ||
optional: false, | ||
nullable: false, | ||
}, | ||
reaction: { | ||
type: 'object', | ||
properties: { | ||
id: { | ||
type: 'string', | ||
optional: false, | ||
nullable: false, | ||
}, | ||
user: { | ||
type: 'object', | ||
ref: 'UserLite', | ||
optional: false, | ||
nullable: false, | ||
}, | ||
reaction: { | ||
type: 'string', | ||
optional: false, | ||
nullable: false, | ||
}, | ||
}, | ||
optional: false, | ||
nullable: false, | ||
}, | ||
}, | ||
nullable: false, | ||
optional: false, | ||
} as const; | ||
|
||
export const packedUserWebhookBodySchema = { | ||
type: 'object', | ||
oneOf: [ | ||
packedUserWebhookNoteBodySchema, | ||
packedUserWebhookUserBodySchema, | ||
packedUserWebhookReactionBodySchema, | ||
], | ||
nullable: false, | ||
optional: false, | ||
} as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters