Skip to content

Commit

Permalink
feat: add updated api models
Browse files Browse the repository at this point in the history
  • Loading branch information
zaida04 committed May 29, 2024
1 parent b204d66 commit f36bd67
Show file tree
Hide file tree
Showing 89 changed files with 3,354 additions and 2,957 deletions.
10 changes: 8 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"node_modules",
"types",
".next",
"generated",
"*.json"
]
},
Expand All @@ -30,7 +29,14 @@
},
"suspicious": {
"noArrayIndexKey": "off",
"noExplicitAny": "warn"
"noExplicitAny": "off",
"noPrototypeBuiltins": "off"
},
"complexity": {
"noForEach": "off"
},
"performance": {
"noAccumulatingSpread": "off"
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions packages/api/lib/generated/api-typings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@ export type JSON<T extends JSONContent> = T["application/json"];

export type WSSchema<T extends keyof components["schemas"]> = components["schemas"][T];
export type WSContent = { content: JSONContent };
export type WSPayload<T extends keyof components["responses"]> =
components["responses"][T]["content"]["application/json"];
export type WSPayload<T extends keyof components["responses"]> = components["responses"][T]["content"]["application/json"];
export type WSPacket<T extends keyof components["responses"]> = SkeletonWSPayload & { d: WSPayload<T> };
8 changes: 2 additions & 6 deletions packages/api/lib/generated/api-typings/v1/structs/Webhook.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export type WebhookContentPayload = {
botId:
| string
| null;
botId: string | null;
channelId: string;
content: APIContent;
createdAt: string;
Expand All @@ -18,9 +16,7 @@ export type APIContent = {

type APILeaf = {
marks: APIMark[];
object:
| string
| "leaf";
object: string | "leaf";
text: string;
};

Expand Down
8 changes: 1 addition & 7 deletions packages/api/lib/generated/api-typings/v1/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ export type RESTPostWebhookBody = {
avatar_url?: string;
content?: string;
embeds?: APIEmbed[];
payload_json?: Pick<
RESTPostWebhookBody,
| "avatar_url"
| "content"
| "embeds"
| "username"
>;
payload_json?: Pick<RESTPostWebhookBody, "avatar_url" | "content" | "embeds" | "username">;
username?: string;
};

Expand Down
Loading

0 comments on commit f36bd67

Please sign in to comment.