mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 12:36:08 +00:00

* FINALLY WE REACHED AN AGREEMENT * chore: d-types adapt * websocket sucks, rest * changes * new look for core * 💀 * fix cdn routes, more structures Co-authored-by: Free 公園 <FreeAoi@users.noreply.github.com> * CDN routes * chore: change to rome Co-authored-by: Free 公園 <FreeAoi@users.noreply.github.com> * Oh shit, here we go again Co-authored-by: Free 公園 <FreeAoi@users.noreply.github.com> * fixes * mixin, handler events, ws Co-authored-by: Yuzu <yuzudev@users.noreply.github.com> Co-authored-by: Free 公園 <FreeAoi@users.noreply.github.com> * change type * Error system (#133) * Co-authored-by: Free 公園 <FreeAoi@users.noreply.github.com> * chore: biscuit rebase * token leak goes brrrr * fix: events * chore: road to raw data * fix: managers typing * chore: fix gateway typing * feat: helpers * style: linter * Types for routes (#134) * typing for routes * managers Co-authored-by: Marcos Susaña <marcosjgs03@gmail.com> * Types for routes (#134) * I wanna cry * Next (#136) * Merge #137 * chore: lineWidth to 140 * chore: README update --------- Co-authored-by: Yuzu <yuzuru@programmer.net> Co-authored-by: Free 公園 <FreeAoi@users.noreply.github.com> Co-authored-by: ThisIsAName <46913407+NejireSupremacy@users.noreply.github.com> Co-authored-by: MARCROCK22 <57925328+MARCROCK22@users.noreply.github.com> Co-authored-by: MARCROCK22 <marcos22dev@gmail.com>
62 lines
2.9 KiB
TypeScript
62 lines
2.9 KiB
TypeScript
import {
|
|
RESTDeleteAPIWebhookResult,
|
|
RESTDeleteAPIWebhookWithTokenMessageResult,
|
|
RESTDeleteAPIWebhookWithTokenResult,
|
|
RESTGetAPIWebhookResult,
|
|
RESTGetAPIWebhookWithTokenMessageResult,
|
|
RESTGetAPIWebhookWithTokenResult,
|
|
RESTPatchAPIWebhookJSONBody,
|
|
RESTPatchAPIWebhookResult,
|
|
RESTPatchAPIWebhookWithTokenJSONBody,
|
|
RESTPatchAPIWebhookWithTokenMessageJSONBody,
|
|
RESTPatchAPIWebhookWithTokenMessageResult,
|
|
RESTPatchAPIWebhookWithTokenResult,
|
|
RESTPostAPIWebhookWithTokenGitHubQuery,
|
|
RESTPostAPIWebhookWithTokenGitHubResult,
|
|
RESTPostAPIWebhookWithTokenGitHubWaitResult,
|
|
RESTPostAPIWebhookWithTokenJSONBody,
|
|
RESTPostAPIWebhookWithTokenQuery,
|
|
RESTPostAPIWebhookWithTokenResult,
|
|
RESTPostAPIWebhookWithTokenSlackQuery,
|
|
RESTPostAPIWebhookWithTokenSlackResult,
|
|
RESTPostAPIWebhookWithTokenSlackWaitResult,
|
|
RESTPostAPIWebhookWithTokenWaitResult
|
|
} from '@biscuitland/common';
|
|
import { RestArguments } from '../REST';
|
|
import { RequestMethod } from '../Router';
|
|
|
|
export interface WebhookRoutes {
|
|
webhooks(id: string): {
|
|
get(args?: RestArguments<RequestMethod.Get>): Promise<RESTGetAPIWebhookResult>;
|
|
patch(args: RestArguments<RequestMethod.Patch, RESTPatchAPIWebhookJSONBody>): Promise<RESTPatchAPIWebhookResult>;
|
|
delete(args?: RestArguments<RequestMethod.Delete>): Promise<RESTDeleteAPIWebhookResult>;
|
|
(token: string): {
|
|
get(args?: RestArguments<RequestMethod.Get>): Promise<RESTGetAPIWebhookWithTokenResult>;
|
|
patch(args: RestArguments<RequestMethod.Patch, RESTPatchAPIWebhookWithTokenJSONBody>): Promise<RESTPatchAPIWebhookWithTokenResult>;
|
|
delete(args?: RestArguments<RequestMethod.Delete>): Promise<RESTDeleteAPIWebhookWithTokenResult>;
|
|
post(
|
|
args: RestArguments<RequestMethod.Post, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery>
|
|
): Promise<RESTPostAPIWebhookWithTokenResult | RESTPostAPIWebhookWithTokenWaitResult>;
|
|
slack: {
|
|
post(
|
|
args: RestArguments<RequestMethod.Post, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenSlackQuery>
|
|
): Promise<RESTPostAPIWebhookWithTokenSlackResult | RESTPostAPIWebhookWithTokenSlackWaitResult>;
|
|
};
|
|
github: {
|
|
post(
|
|
args: RestArguments<RequestMethod.Post, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenGitHubQuery>
|
|
): Promise<RESTPostAPIWebhookWithTokenGitHubResult | RESTPostAPIWebhookWithTokenGitHubWaitResult>;
|
|
};
|
|
messages: {
|
|
(id: string | '@original'): {
|
|
get(args?: RestArguments<RequestMethod.Get>): Promise<RESTGetAPIWebhookWithTokenMessageResult>;
|
|
patch(
|
|
args: RestArguments<RequestMethod.Patch, RESTPatchAPIWebhookWithTokenMessageJSONBody>
|
|
): Promise<RESTPatchAPIWebhookWithTokenMessageResult>;
|
|
delete(args?: RestArguments<RequestMethod.Delete>): Promise<RESTDeleteAPIWebhookWithTokenMessageResult>;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|