diff --git a/biome.json b/biome.json index 7d5f322b..70d2811a 100644 --- a/biome.json +++ b/biome.json @@ -9,7 +9,6 @@ "node_modules", "types", ".next", - "generated", "*.json" ] }, @@ -30,7 +29,14 @@ }, "suspicious": { "noArrayIndexKey": "off", - "noExplicitAny": "warn" + "noExplicitAny": "off", + "noPrototypeBuiltins": "off" + }, + "complexity": { + "noForEach": "off" + }, + "performance": { + "noAccumulatingSpread": "off" } } } diff --git a/packages/api/lib/generated/api-typings/index.ts b/packages/api/lib/generated/api-typings/index.ts index fb0d5430..789dc649 100644 --- a/packages/api/lib/generated/api-typings/index.ts +++ b/packages/api/lib/generated/api-typings/index.ts @@ -7,6 +7,5 @@ export type JSON = T["application/json"]; export type WSSchema = components["schemas"][T]; export type WSContent = { content: JSONContent }; -export type WSPayload = - components["responses"][T]["content"]["application/json"]; +export type WSPayload = components["responses"][T]["content"]["application/json"]; export type WSPacket = SkeletonWSPayload & { d: WSPayload }; diff --git a/packages/api/lib/generated/api-typings/v1/structs/Webhook.ts b/packages/api/lib/generated/api-typings/v1/structs/Webhook.ts index 3af631ac..55209c02 100644 --- a/packages/api/lib/generated/api-typings/v1/structs/Webhook.ts +++ b/packages/api/lib/generated/api-typings/v1/structs/Webhook.ts @@ -1,7 +1,5 @@ export type WebhookContentPayload = { - botId: - | string - | null; + botId: string | null; channelId: string; content: APIContent; createdAt: string; @@ -18,9 +16,7 @@ export type APIContent = { type APILeaf = { marks: APIMark[]; - object: - | string - | "leaf"; + object: string | "leaf"; text: string; }; diff --git a/packages/api/lib/generated/api-typings/v1/webhook.ts b/packages/api/lib/generated/api-typings/v1/webhook.ts index 97a0be79..be702665 100644 --- a/packages/api/lib/generated/api-typings/v1/webhook.ts +++ b/packages/api/lib/generated/api-typings/v1/webhook.ts @@ -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; username?: string; }; diff --git a/packages/api/lib/generated/api-typings/v1/ws.ts b/packages/api/lib/generated/api-typings/v1/ws.ts index 81be3f06..2195a1fd 100644 --- a/packages/api/lib/generated/api-typings/v1/ws.ts +++ b/packages/api/lib/generated/api-typings/v1/ws.ts @@ -7,39 +7,27 @@ export type paths = Record; export type webhooks = Record; -export type components = { +export interface components { schemas: { _SocketEventEnvelope: { /** * Opcode - * * @description An operation code corresponding to the nature of the sent message (for example, success, failure, etc.) * @enum {integer} */ - op: - | 0 - | 1 - | 2 - | 8 - | 9; + op: 0 | 1 | 2 | 8 | 9; /** * Data - * * @description Data of any form depending on the underlying event */ - d?: Record< - string, - never - >; + d?: Record; /** * Message ID - * * @description Message ID used for replaying events after a disconnect */ s?: string; /** * Event name - * * @description Event name for the given message */ t?: string; @@ -100,85 +88,81 @@ export type components = { /** * Message ID * Format: uuid - * * @description The ID of the message */ id: string; /** * Type - * * @description The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. * @enum {string} */ - type: - | "default" - | "system"; + type: "default" | "system"; /** * Server ID - * * @description The ID of the server */ serverId?: string; /** * Group ID - * * @description The ID of the group */ groupId?: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Content - * Format: markdown - * + * Format: chat markdown * @description The content of the message */ content?: string; + /** + * Hidden content link preview URLs + * @description Links in `content` to prevent unfurling as a link preview when displaying in Guilded + */ + hiddenLinkPreviewUrls?: string[]; embeds?: components["schemas"]["ChatEmbed"][]; /** @description Message IDs that were replied to */ replyMessageIds?: string[]; /** * Is private - * * @description If set, this message will only be seen by those mentioned or replied to */ isPrivate?: boolean; /** * Is silent - * * @description If set, this message did not notify mention or reply recipients * @default false */ isSilent?: boolean; + /** + * Is pinned + * @default false + */ + isPinned?: boolean; mentions?: components["schemas"]["Mentions"]; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the message was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this message (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) */ createdBy: string; /** * Created by Webhook ID - * * @description The ID of the webhook who created this message, if it was created by a webhook */ createdByWebhookId?: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the message was updated at, if relevant */ updatedAt?: string; @@ -190,7 +174,7 @@ export type components = { * "emote": { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * }, * "messageId": "00000000-0000-0000-0000-000000000000" * } @@ -199,13 +183,12 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * User ID - * + * Format: user-id * @description The ID of the user who added the reaction */ createdBy: string; @@ -213,13 +196,12 @@ export type components = { /** * Message ID * Format: uuid - * * @description The ID of the message */ messageId: string; }; /** - * @description Rich content sections optionally associated with chat messages. Properties with "webhook-markdown" support allow for the following: link, italic, bold, strikethrough, underline, inline code, block code, reaction, and mention. + * @description Rich content sections optionally associated with chat messages. Properties with "webhook-markdown" support allow for the following: link, italic, bold, strikethrough, underline, inline code, block code, reaction, mention, and role mention. * @example { * "title": "embed title", * "description": "embeds support a **different** __subset__ *of* markdown than other markdown fields. <@Ann6LewA>\n\n [links](https://www.guilded.gg) ```\ncheck this code out```\n\n:pizza: time!! ttyl", @@ -262,29 +244,25 @@ export type components = { ChatEmbed: { /** * Format: webhook-markdown - * * @description Main header of the embed */ title?: string; /** * Format: webhook-markdown - * * @description Subtext of the embed */ description?: string; /** * Format: uri - * * @description URL to linkify the `title` field with */ url?: string; - /** @description Decimal value of the color that the left border should be */ + /** @description The integer value corresponds to the decimal RGB representation for the color. The color that the left border should be */ color?: number; /** @description A small section at the bottom of the embed */ footer?: { /** * Format: media-uri - * * @description URL of a small image to put in the footer */ icon_url?: string; @@ -293,7 +271,6 @@ export type components = { }; /** * Format: date-time - * * @description A timestamp to put in the footer */ timestamp?: string; @@ -301,7 +278,6 @@ export type components = { thumbnail?: { /** * Format: media-uri - * * @description URL of the image */ url?: string; @@ -310,7 +286,6 @@ export type components = { image?: { /** * Format: media-uri - * * @description URL of the image */ url?: string; @@ -321,13 +296,11 @@ export type components = { name?: string; /** * Format: uri - * * @description URL to linkify the author's `name` field */ url?: string; /** * Format: media-uri - * * @description URL of a small image to display to the left of the author's `name` */ icon_url?: string; @@ -336,13 +309,11 @@ export type components = { fields?: { /** * Format: webhook-markdown - * * @description Header of the table-like cell */ name: string; /** * Format: webhook-markdown - * * @description Subtext of the table-like cell */ value: string; @@ -365,27 +336,13 @@ export type components = { SocialLink: { /** * Social link type - * * @description The type of social link that Guilded supports. Depending on this value, `handle` or `serviceId` may or may not be present * @enum {string} */ - type: - | "bnet" - | "epic" - | "facebook" - | "origin" - | "patreon" - | "psn" - | "roblox" - | "steam" - | "switch" - | "twitch" - | "twitter" - | "xbox" - | "youtube"; + type: "twitch" | "bnet" | "psn" | "xbox" | "steam" | "origin" | "youtube" | "twitter" | "facebook" | "switch" | "patreon" | "roblox" | "epic"; /** * User ID - * + * Format: user-id * @description The ID of the user that the social link is associated with */ userId: string; @@ -396,7 +353,6 @@ export type components = { /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the social link was created at */ createdAt: string; @@ -426,53 +382,46 @@ export type components = { Mentions: { /** * Users - * * @description Info on mentioned users */ users?: { /** * User ID - * + * Format: user-id * @description The ID of the user */ id: string; }[]; /** * Channels - * * @description Info on mentioned channels */ channels?: { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ id: string; }[]; /** * Roles - * * @description Info on mentioned roles */ roles?: { /** * Role ID - * * @description The ID of the role */ id: number; }[]; /** * Everyone - * * @description If @everyone was mentioned */ everyone?: boolean; /** * Here - * * @description If @here was mentioned */ here?: boolean; @@ -492,29 +441,25 @@ export type components = { id: number; /** * Content - * Format: markdown - * + * Format: long-form markdown * @description The content of the forum topic comment */ content: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the forum topic comment was created at */ createdAt: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the forum topic comment was updated at, if relevant */ updatedAt?: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; @@ -522,7 +467,6 @@ export type components = { forumTopicId: number; /** * Created by - * * @description The ID of the user who created this forum topic comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) */ createdBy: string; @@ -535,7 +479,7 @@ export type components = { * "emote": { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * }, * "forumTopicId": 123456 * } @@ -544,13 +488,12 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * User ID - * + * Format: user-id * @description The ID of the user who added the reaction */ createdBy: string; @@ -565,7 +508,7 @@ export type components = { * "emote": { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * }, * "forumTopicId": 123456, * "forumTopicCommentId": 1234567890 @@ -575,13 +518,12 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * User ID - * + * Format: user-id * @description The ID of the user who added the reaction */ createdBy: string; @@ -595,6 +537,7 @@ export type components = { * @example { * "id": 123456, * "serverId": "wlVr3Ggl", + * "groupId": "ZVzBo83p", * "channelId": "00000000-0000-0000-0000-000000000000", * "title": "Welcome new members!!", * "createdAt": "2021-06-15T20:15:00.706Z", @@ -607,66 +550,61 @@ export type components = { id: number; /** * Server ID - * * @description The ID of the server */ serverId: string; + /** + * Group ID + * @description The ID of the group + */ + groupId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Title - * * @description The title of the forum topic */ title: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the forum topic was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) */ createdBy: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the forum topic was updated at, if relevant */ updatedAt?: string; /** * Bumped at * Format: date-time - * * @description The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. */ bumpedAt?: string; /** * Is pinned - * * @default false */ isPinned?: boolean; /** * Is locked - * * @default false */ isLocked?: boolean; /** * Content - * Format: markdown - * + * Format: long-form markdown * @description The content of the forum topic */ content: string; @@ -676,6 +614,7 @@ export type components = { * @example { * "id": 123456, * "serverId": "wlVr3Ggl", + * "groupId": "ZVzBo83p", * "channelId": "00000000-0000-0000-0000-000000000000", * "title": "Welcome new members!!", * "createdAt": "2021-06-15T20:15:00.706Z", @@ -687,59 +626,55 @@ export type components = { id: number; /** * Server ID - * * @description The ID of the server */ serverId: string; + /** + * Group ID + * @description The ID of the group + */ + groupId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Title - * * @description The title of the forum topic */ title: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the forum topic was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) */ createdBy: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the forum topic was updated at, if relevant */ updatedAt?: string; /** * Bumped at * Format: date-time - * * @description The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. */ bumpedAt?: string; /** * Is pinned - * * @default false */ isPinned?: boolean; /** * Is locked - * * @default false */ isLocked?: boolean; @@ -748,6 +683,7 @@ export type components = { * @example { * "id": "00000000-0000-0000-0000-000000000000", * "serverId": "wlVr3Ggl", + * "groupId": "ZVzBo83p", * "channelId": "00000000-0000-0000-0000-000000000000", * "message": "Remember to say hello **world**!", * "createdAt": "2021-06-15T20:15:00.706Z", @@ -762,27 +698,28 @@ export type components = { ListItem: { /** * Format: uuid - * * @description The ID of the list item */ id: string; /** * Server ID - * * @description The ID of the server */ serverId: string; + /** + * Group ID + * @description The ID of the group + */ + groupId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Message - * Format: markdown - * + * Format: list item markdown * @description The message of the list item */ message: string; @@ -790,51 +727,43 @@ export type components = { /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the list item was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) */ createdBy: string; /** * Created by Webhook ID - * * @description The ID of the webhook who created this list item, if it was created by a webhook */ createdByWebhookId?: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the list item was updated at, if relevant */ updatedAt?: string; /** * Updated by - * * @description The ID of the user who updated this list item */ updatedBy?: string; /** * Format: uuid - * * @description The ID of the parent list item if this list item is nested */ parentListItemId?: string; /** * Completed at * Format: date-time - * * @description The ISO 8601 timestamp that the list item was completed at */ completedAt?: string; /** * Completed by - * * @description The ID of the user who completed this list item */ completedBy?: string; @@ -842,34 +771,29 @@ export type components = { /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item */ createdAt: string; /** * Created by - * * @description The ID of the user who created this note */ createdBy: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the note was updated at, if relevant */ updatedAt?: string; /** * Updated by - * * @description The ID of the user who updated this note */ updatedBy?: string; mentions?: components["schemas"]["Mentions"]; /** * Note - * Format: markdown - * + * Format: long-form markdown * @description The note of the list item */ content: string; @@ -892,27 +816,23 @@ export type components = { ListItemSummary: { /** * Format: uuid - * * @description The ID of the list item */ id: string; /** * Server ID - * * @description The ID of the server */ serverId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Message - * Format: markdown - * + * Format: list item markdown * @description The message of the list item */ message: string; @@ -920,51 +840,43 @@ export type components = { /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the list item was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) */ createdBy: string; /** * Created by Webhook ID - * * @description The ID of the webhook who created this list item, if it was created by a webhook */ createdByWebhookId?: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the list item was updated at, if relevant */ updatedAt?: string; /** * Updated by - * * @description The ID of the user who updated this list item */ updatedBy?: string; /** * Format: uuid - * * @description The ID of the parent list item if this list item is nested */ parentListItemId?: string; /** * Completed at * Format: date-time - * * @description The ISO 8601 timestamp that the list item was completed at */ completedAt?: string; /** * Completed by - * * @description The ID of the user who completed this list item */ completedBy?: string; @@ -972,26 +884,22 @@ export type components = { /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item */ createdAt: string; /** * Created by - * * @description The ID of the user who created this note */ createdBy: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the note was updated at, if relevant */ updatedAt?: string; /** * Updated by - * * @description The ID of the user who updated this note */ updatedBy?: string; @@ -1001,6 +909,7 @@ export type components = { * @example { * "id": 0, * "serverId": "wlVr3Ggl", + * "groupId": "ZVzBo83p", * "channelId": "00000000-0000-0000-0000-000000000000", * "title": "HOW-TO: Smoke These Meats with Sweet Baby Ray's", * "content": "Spicy jalapeno bacon ipsum dolor amet sirloin ground round short loin, meatball brisket capicola tri-tip ham pork belly biltong corned beef chuck. Chicken ham brisket shank rump buffalo t-bone. Short loin sausage buffalo porchetta pork belly rump tri-tip frankfurter tail pork chop cow sirloin. Pancetta porchetta tail ball tip chislic beef ribs. Buffalo andouille leberkas jerky. Fatback shankle andouille beef. Cow kielbasa buffalo pork loin chislic meatloaf short loin rump meatball prosciutto.", @@ -1013,33 +922,33 @@ export type components = { Doc: { /** * Doc ID - * * @description The ID of the doc */ id: number; /** * Server ID - * * @description The ID of the server */ serverId: string; + /** + * Group ID + * @description The ID of the group + */ + groupId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Title - * * @description The title of the doc */ title: string; /** * Content - * Format: markdown - * + * Format: long-form markdown * @description The content of the doc */ content: string; @@ -1047,26 +956,22 @@ export type components = { /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the doc was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this doc */ createdBy: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the doc was updated at, if relevant */ updatedAt?: string; /** * Updated by - * * @description The ID of the user who updated this doc */ updatedBy?: string; @@ -1084,47 +989,40 @@ export type components = { DocComment: { /** * Doc comment ID - * * @description The ID of the doc comment */ id: number; /** * Content - * Format: markdown - * + * Format: long-form markdown * @description The content of the doc comment */ content: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the doc comment was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this doc comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) */ createdBy: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the doc comment was updated at, if relevant */ updatedAt?: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Doc ID - * * @description The ID of the doc */ docId: number; @@ -1137,7 +1035,7 @@ export type components = { * "emote": { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * }, * "docId": 0 * } @@ -1146,20 +1044,18 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * User ID - * + * Format: user-id * @description The ID of the user who added the reaction */ createdBy: string; emote: components["schemas"]["Emote"]; /** * Doc ID - * * @description The ID of the doc */ docId: number; @@ -1171,7 +1067,7 @@ export type components = { * "emote": { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * }, * "docId": 0, * "docCommentId": 123456 @@ -1181,26 +1077,23 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * User ID - * + * Format: user-id * @description The ID of the user who added the reaction */ createdBy: string; emote: components["schemas"]["Emote"]; /** * Doc ID - * * @description The ID of the doc */ docId: number; /** * Doc comment ID - * * @description The ID of the doc comment */ docCommentId: number; @@ -1227,13 +1120,11 @@ export type components = { /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the member was created at */ joinedAt: string; /** * Is owner - * * @default false */ isOwner?: boolean; @@ -1264,46 +1155,40 @@ export type components = { User: { /** * User ID - * + * Format: user-id * @description The ID of the user */ id: string; /** * User type - * * @description The type of user. If this property is absent, it can assumed to be of type `user` * @enum {string} */ - type?: - | "bot" - | "user"; + type?: "bot" | "user"; /** * User name - * * @description The user's name */ name: string; /** * Avatar * Format: media-uri - * * @description The avatar image associated with the user */ avatar?: string; /** * Banner * Format: media-uri - * * @description The banner image associated with the user */ banner?: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the user was created at */ createdAt: string; + status?: components["schemas"]["UserStatus"]; }; /** * @example { @@ -1315,29 +1200,24 @@ export type components = { UserSummary: { /** * User ID - * + * Format: user-id * @description The ID of the user */ id: string; /** * User type - * * @description The type of user. If this property is absent, it can assumed to be of type `user` * @enum {string} */ - type?: - | "bot" - | "user"; + type?: "bot" | "user"; /** * User name - * * @description The user's name */ name: string; /** * Avatar * Format: media-uri - * * @description The avatar image associated with the user */ avatar?: string; @@ -1358,20 +1238,17 @@ export type components = { user: components["schemas"]["UserSummary"]; /** * Reason - * * @description The reason for the ban as submitted by the banner */ reason?: string; /** * Created by - * * @description The ID of the user who created this server member ban */ createdBy: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the server member ban was created at */ createdAt: string; @@ -1392,7 +1269,6 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ id: string; @@ -1400,82 +1276,79 @@ export type components = { * @description The type of channel. This will determine what routes to use for creating content in a channel. For example, if this "chat", then one must use the routes for creating channel messages * @enum {string} */ - type: - | "announcements" - | "calendar" - | "chat" - | "docs" - | "forums" - | "list" - | "media" - | "scheduling" - | "stream" - | "voice"; + type: "announcements" | "chat" | "calendar" | "forums" | "media" | "docs" | "voice" | "list" | "scheduling" | "stream"; /** @description The name of the channel */ name: string; - /** @description The topic of the channel */ + /** @description The topic of the channel. Not applicable to threads */ topic?: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the channel was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this channel */ createdBy: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the channel was updated at, if relevant */ updatedAt?: string; /** * Server ID - * * @description The ID of the server */ serverId: string; /** * Channel ID * Format: uuid - * - * @description ID of the parent channel or parent thread, if present. Only relevant for server channels + * @description ID of the **root** channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present + */ + rootId?: string; + /** + * Channel ID + * Format: uuid + * @description ID of the **immediate** parent channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present */ parentId?: string; - /** @description Only relevant for server channels */ + /** + * Message ID + * Format: uuid + * @description The ID of the message that this channel was created off of. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present + */ + messageId?: string; + /** @description The category that the channel exists in. Only relevant for server channels */ categoryId?: number; /** * Group ID - * * @description The ID of the group */ groupId: string; /** - * Is public - * - * @description Whether the channel can be accessed from users who are not member of the server - * @default false + * @description What users can access the channel. Only applicable to server channels. If not present, this channel will respect normal permissions. `public` is accessible to everyone, even those who aren't of the server. `private` is only accessible to explicitly mentioned users. Currently, threads cannot be `public` and other channels cannot be `private`. Additionally, `private` threads can only exist with an associated `messageId` that is for a private message + * @enum {string|null} */ - isPublic?: boolean; + visibility?: "" | "private" | "public" | null; /** * Archived by - * * @description The ID of the user who archived this channel */ archivedBy?: string; /** * Archived at * Format: date-time - * * @description The ISO 8601 timestamp that the channel was archived at, if relevant */ archivedAt?: string; + /** + * Priority + * @description The priority of the channel will determine its position relative to other categories in the group. The higher the value, the higher up it will be displayed in the UI. Returned values can be null, in which case sorting will be done by `createdAt` in ascending order. Due to legacy issues, sending a null value is not possible + */ + priority?: number; }; /** * @example { @@ -1493,86 +1366,66 @@ export type components = { Server: { /** * Server ID - * * @description The ID of the server */ id: string; /** * Created by - * * @description The ID of the user who created this server */ ownerId: string; /** * Server type - * * @description The type of server designated from the server's settings page * @enum {string} */ - type?: - | "clan" - | "community" - | "friends" - | "guild" - | "organization" - | "other" - | "streaming" - | "team"; + type?: "team" | "organization" | "community" | "clan" | "guild" | "friends" | "streaming" | "other"; /** * Server name - * * @description The name given to the server */ name: string; /** * Server URL - * * @description The URL that the server can be accessible from. For example, a value of "Guilded-Official" means the server can be accessible from https://www.guilded.gg/Guilded-Official */ url?: string; /** * Description - * * @description The description associated with the server */ about?: string; /** * Avatar * Format: media-uri - * * @description The avatar image associated with the server */ avatar?: string; /** * Banner * Format: media-uri - * * @description The banner image associated with the server */ banner?: string; /** * Timezone - * * @description The timezone associated with the server */ timezone?: string; /** * Is verified - * * @description The verified status of the server */ isVerified?: boolean; /** * Channel ID * Format: uuid - * * @description The channel ID of the default channel of the server. This channel is defined as the first chat or voice channel in the left sidebar of a server in our UI. This channel is useful for sending welcome messages, though note that a bot may not have permissions to interact with this channel depending on how the server is configured. */ defaultChannelId?: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the server was created at */ createdAt: string; @@ -1591,59 +1444,50 @@ export type components = { /** * Webhook ID * Format: uuid - * * @description The ID of the webhook */ id: string; /** * Name - * * @description The name of the webhook */ name: string; /** * Avatar * Format: media-uri - * * @description The avatar image associated with the webhook */ avatar?: string; /** * Server ID - * * @description The ID of the server */ serverId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the webhook was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this webhook */ createdBy: string; /** * Deleted at * Format: date-time - * * @description The ISO 8601 timestamp that the webhook was deleted at */ deletedAt?: string; /** * Token - * * @description The token of the webhook */ token?: string; @@ -1658,7 +1502,7 @@ export type components = { * "location": "My house!", * "url": "https://www.surprisepartygame.com/", * "duration": 60, - * "color": 16106496, + * "color": 6118369, * "startsAt": "2022-06-16T00:00:00.000Z", * "createdAt": "2021-06-15T20:15:00.706Z", * "createdBy": "Ann6LewA" @@ -1667,74 +1511,68 @@ export type components = { CalendarEvent: { /** * Calendar event ID - * * @description The ID of the calendar event */ id: number; /** * Server ID - * * @description The ID of the server */ serverId: string; + /** + * Group ID + * @description The ID of the group + */ + groupId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Name - * * @description The name of the event */ name: string; /** * Description - * Format: markdown - * + * Format: long-form markdown * @description The description of the event */ description?: string; /** * Location - * * @description The location of the event */ location?: string; /** * Format: uri - * * @description A URL to associate with the event */ url?: string; - /** @description The color of the event when viewing in the calendar */ + /** @description The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar */ color?: number; /** @description Is this event a repeating event */ repeats?: boolean; /** * Calendar event series ID * Format: uuid - * * @description The ID of the calendar event series. Only shows if the event is repeating */ seriesId?: string; /** * Role IDs - * * @description The role IDs to restrict the event to */ roleIds?: number[]; /** * RSVP disabled - * * @description When disabled, users will not be able to RSVP to the event */ rsvpDisabled?: boolean; /** * Is all day - * * @description Does the event last all day */ isAllDay?: boolean; @@ -1745,13 +1583,11 @@ export type components = { /** * Starts at * Format: date-time - * * @description The ISO 8601 timestamp that the event starts at */ startsAt: string; /** * Duration - * * @description The duration of the event _**in minutes**_ */ duration?: number; @@ -1761,27 +1597,23 @@ export type components = { /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the event was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this event */ createdBy: string; cancellation?: { /** * Description - * Format: markdown - * + * Format: long-form markdown * @description The description of event cancellation */ description?: string; /** * Created by - * * @description The ID of the user who created this event cancellation */ createdBy: string; @@ -1791,32 +1623,28 @@ export type components = { * @example { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * } */ Emote: { /** * Emote ID - * * @description The ID of the emote */ id: number; /** * Name - * * @description The name of the emote */ name: string; /** * Emote URL * Format: media-uri - * * @description The URL of the emote image */ url: string; /** * Server ID - * * @description The ID of the server the emote was created on */ serverId?: string; @@ -1835,65 +1663,51 @@ export type components = { CalendarEventRsvp: { /** * Calendar event ID - * * @description The ID of the calendar event */ calendarEventId: number; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Server ID - * * @description The ID of the server */ serverId: string; /** * User ID - * + * Format: user-id * @description The ID of the user */ userId: string; /** * Status - * * @description The status of the RSVP * @enum {string} */ - status: - | "declined" - | "going" - | "invited" - | "maybe" - | "not responded" - | "waitlisted"; + status: "going" | "maybe" | "declined" | "invited" | "waitlisted" | "not responded"; /** * Created by - * * @description The ID of the user who created this RSVP */ createdBy: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the RSVP was created at */ createdAt: string; /** * Updated by - * * @description The ID of the user who updated this RSVP */ updatedBy?: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the RSVP was updated at, if relevant */ updatedAt?: string; @@ -1911,47 +1725,40 @@ export type components = { CalendarEventComment: { /** * Calendar event comment ID - * * @description The ID of the calendar event comment */ id: number; /** * Content - * Format: markdown - * + * Format: long-form markdown * @description The content of the calendar event comment */ content: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the calendar event comment was created at */ createdAt: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the calendar event comment was updated at, if relevant */ updatedAt?: string; /** * Calendar event ID - * * @description The ID of the calendar event */ calendarEventId: number; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Created by - * * @description The ID of the user who created this calendar event comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) */ createdBy: string; @@ -1964,7 +1771,7 @@ export type components = { * "emote": { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * }, * "calendarEventId": 1 * } @@ -1973,20 +1780,18 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * User ID - * + * Format: user-id * @description The ID of the user who added the reaction */ createdBy: string; emote: components["schemas"]["Emote"]; /** * Calendar event ID - * * @description The ID of the calendar event */ calendarEventId: number; @@ -1998,7 +1803,7 @@ export type components = { * "emote": { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * }, * "calendarEventId": 1, * "calendarEventCommentId": 1234567890 @@ -2008,26 +1813,23 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * User ID - * + * Format: user-id * @description The ID of the user who added the reaction */ createdBy: string; emote: components["schemas"]["Emote"]; /** * Calendar event ID - * * @description The ID of the calendar event */ calendarEventId: number; /** * Calendar event comment ID - * * @description The ID of the calendar event comment */ calendarEventCommentId: number; @@ -2043,20 +1845,17 @@ export type components = { /** * Calendar event series ID * Format: uuid - * * @description The ID of the calendar event series */ id: string; /** * Server ID - * * @description The ID of the server */ serverId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; @@ -2075,47 +1874,45 @@ export type components = { Announcement: { /** * Announcement ID - * * @description The ID of the announcement */ id: string; /** * Server ID - * * @description The ID of the server */ serverId: string; + /** + * Group ID + * @description The ID of the group + */ + groupId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the announcement was created at */ createdAt: string; /** * Created by - * * @description The ID of the user who created this announcement */ createdBy: string; /** * Content - * Format: markdown - * + * Format: long-form markdown * @description The content of the announcement */ content: string; mentions?: components["schemas"]["Mentions"]; /** * Title - * * @description The title of the announcement */ title: string; @@ -2127,7 +1924,7 @@ export type components = { * "emote": { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * }, * "announcementId": "9RVMoDZy" * } @@ -2136,20 +1933,18 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * User ID - * + * Format: user-id * @description The ID of the user who added the reaction */ createdBy: string; emote: components["schemas"]["Emote"]; /** * Announcement ID - * * @description The ID of the announcement */ announcementId: string; @@ -2167,47 +1962,40 @@ export type components = { AnnouncementComment: { /** * Announcement comment ID - * * @description The ID of the announcement comment */ id: number; /** * Content - * Format: markdown - * + * Format: long-form markdown * @description The content of the announcement comment */ content: string; /** * Created at * Format: date-time - * * @description The ISO 8601 timestamp that the announcement comment was created at */ createdAt: string; /** * Updated at * Format: date-time - * * @description The ISO 8601 timestamp that the announcement comment was updated at, if relevant */ updatedAt?: string; /** * Created by - * * @description The ID of the user who created this announcement comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) */ createdBy: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Announcement ID - * * @description The ID of the announcement */ announcementId: string; @@ -2220,7 +2008,7 @@ export type components = { * "emote": { * "id": 90000000, * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * "url": "https://www.guilded.gg/asset/Emojis/grinning.webp" * }, * "announcementId": "9RVMoDZy", * "announcementCommentId": 123456 @@ -2230,100 +2018,550 @@ export type components = { /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * User ID - * + * Format: user-id * @description The ID of the user who added the reaction */ createdBy: string; emote: components["schemas"]["Emote"]; /** * Announcement ID - * * @description The ID of the announcement */ announcementId: string; /** * Announcement comment ID - * * @description The ID of the announcement comment */ announcementCommentId: number; }; - }; - responses: { - _WelcomeMessage: { - content: { - "application/json": { - /** @description The interval in milliseconds that your bot should be configured to send ping frames for the bot's [heartbeat](/docs/api/heartbeat) to be considered valid. */ - heartbeatIntervalMs: number; - /** @description The last message's ID that was sent to this bot. See [event replay](/docs/api/replay) for more details */ - lastMessageId: string; - /** - * Bot ID - * Format: uuid - * - * @description The ID of the bot - */ - botId: string; - user: components["schemas"]["User"]; - }; - }; + /** + * @example { + * "id": "ZVzBo83p", + * "serverId": "wlVr3Ggl", + * "name": "Fans of Turnip Boy Commits Tax Evasion", + * "description": "Best game on steam!", + * "isPublic": true, + * "createdAt": "2021-06-15T00:04:20.696Z", + * "createdBy": "Ann6LewA" + * } + */ + Group: { + /** + * Group ID + * @description The ID of the group + */ + id: string; + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + /** @description The name of the group */ + name: string; + /** + * Description + * @description The description associated with the group + */ + description?: string; + /** + * Avatar + * Format: media-uri + * @description The avatar image associated with the group + */ + avatar?: string; + /** + * Is home + * @description If `true`, this is the server's home group + */ + isHome?: boolean; + /** @description The emote to associate with the group */ + emoteId?: number; + /** + * Is public + * @description Is this group open for anyone to join? + * @default false + */ + isPublic?: boolean; + /** + * Created at + * Format: date-time + * @description The ISO 8601 timestamp that the group was created at + */ + createdAt: string; + /** + * Created by + * @description The ID of the user who created this group + */ + createdBy: string; + /** + * Updated at + * Format: date-time + * @description The ISO 8601 timestamp that the group was updated at, if relevant + */ + updatedAt?: string; + /** + * Updated by + * @description The ID of the user who updated this group + */ + updatedBy?: string; + /** + * Archived at + * Format: date-time + * @description The ISO 8601 timestamp that the group was archived at, if relevant + */ + archivedAt?: string; + /** + * Archived by + * @description The ID of the user who archived this group + */ + archivedBy?: string; }; - /** @description Emitted when a bot is added to a server */ - BotServerMembershipCreated: { - content: { - "application/json": { - server: components["schemas"]["Server"]; - /** - * Created by - * - * @description The ID of the user who created this server membership - */ - createdBy: string; - }; - }; + /** + * @example { + * "content": "Ready for the weekend!", + * "emoteId": 90000000 + * } + */ + UserStatus: { + /** + * Content + * Format: status markdown + * @description The content of the user status. The supported markdown for this content only includes reactions and plaintext for now + */ + content?: string; + /** @description Emote ID */ + emoteId: number; }; - /** @description Emitted when a bot is removed from a server */ - BotServerMembershipDeleted: { - content: { - "application/json": { - server: components["schemas"]["Server"]; - /** - * Deleted by - * - * @description The ID of the user who deleted this server membership - */ - deletedBy: string; - }; - }; + /** + * @example { + * "id": 591232, + * "serverId": "wlVr3Ggl", + * "createdAt": "2023-04-15T20:15:00.706Z", + * "updatedAt": "2023-04-16T20:15:00.706Z", + * "name": "Captain", + * "isSelfAssignable": true, + * "permissions": [ + * "CanUpdateServer", + * "CanReadChats", + * "CanCreateChats" + * ], + * "colors": [ + * 6118369 + * ] + * } + */ + Role: { + /** + * Role ID + * @description The ID of the role + */ + id: number; + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + /** + * Created at + * Format: date-time + * @description The ISO 8601 timestamp that the role was created at + */ + createdAt: string; + /** + * Updated at + * Format: date-time + * @description The ISO 8601 timestamp that the role was updated at, if relevant + */ + updatedAt?: string; + /** + * Role name + * @description The role's name + */ + name: string; + /** + * Display Separately + * @description If set, the role will be displayed separately in the channel member list + * @default false + */ + isDisplayedSeparately?: boolean; + /** + * Self Assignable + * @description If set, this roll will be self assigned + * @default false + */ + isSelfAssignable?: boolean; + /** + * Mentionable + * @description If set, this role can be mentioned + * @default false + */ + isMentionable?: boolean; + /** @description Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section */ + permissions: string[]; + /** @description An array of integer values corresponding to the decimal RGB representation for a color. The first color is solid, and a second color indicates a gradient */ + colors?: number[]; + /** + * Role icon URL + * Format: media-uri + * @description The URL of the role icon + */ + icon?: string; + /** + * Priority + * @description The priority the role will be in relation to other roles in the server. The higher the value, the more precedence the role has over lower priority roles, and the higher up it will be displayed in the UI. Values can be zero or negative! + */ + priority?: number; + /** + * Is Base + * @description The default role users are given when joining the server. Base roles are tied directly to the server and cannot be created or deleted + * @default false + */ + isBase?: boolean; + /** + * Bot user ID + * Format: user-id + * @description The bot user ID this role has been defined for. Roles with this populated can only be deleted by kicking the bot + */ + botUserId?: string; }; - ChatMessageCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - message: components["schemas"]["ChatMessage"]; - }; - }; + /** + * @example { + * "type": "Gold", + * "serverId": "wlVr3Ggl", + * "roleId": 591232, + * "description": "Once you subscribe, this tier's benefits are free for the rest of the month!", + * "cost": 500, + * "createdAt": "2021-06-15T20:15:00.706Z" + * } + */ + ServerSubscriptionTier: { + /** + * Server subscription tier type + * @description The type of the server subscription tier. This field is case sensitive!! + * @enum {string} + */ + type: "Gold" | "Silver" | "Copper"; + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + /** + * Description + * @description The description associated with the server subscription tier + */ + description?: string; + /** + * Role ID + * @description The ID of the role + */ + roleId?: number; + /** @description The cost of the tier in cents USD per month */ + cost: number; + /** + * Created at + * Format: date-time + * @description The ISO 8601 timestamp that the server subscription tier was created at + */ + createdAt: string; }; - ChatMessageUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; + /** + * @example { + * "permissions": [ + * "CanUpdateServer", + * "CanReadChats", + * "CanCreateChats" + * ] + * } + */ + ServerMemberPermissions: { + /** @description Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section */ + permissions: string[]; + }; + /** + * @example { + * "id": 1337, + * "serverId": "wlVr3Ggl", + * "groupId": "ZVzBo83p", + * "name": "Social", + * "createdAt": "2023-07-07T20:15:00.706Z", + * "updatedAt": "2023-07-08T20:15:00.706Z" + * } + */ + Category: { + /** @description The ID of the category */ + id: number; + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + /** + * Group ID + * @description The ID of the group + */ + groupId: string; + /** + * Created at + * Format: date-time + * @description The ISO 8601 timestamp that the category was created at + */ + createdAt: string; + /** + * Updated at + * Format: date-time + * @description The ISO 8601 timestamp that the category was updated at, if relevant + */ + updatedAt?: string; + /** @description Name of the category */ + name: string; + /** + * Priority + * @description The priority of the category will determine its position relative to other categories in the group. The higher the value, the higher up it will be displayed in the UI. Returned values can be null, in which case sorting will be done by `createdAt` in descending order. Due to legacy issues, sending a null value is not possible + */ + priority?: number; + }; + /** + * @example { + * "id": 591232, + * "serverId": "wlVr3Ggl", + * "createdAt": "2023-06-15T20:15:00.706Z", + * "permissions": { + * "CanUpdateServer": true, + * "CanReadChats": true + * }, + * "roleId": 591232, + * "channelId": "00000000-0000-0000-0000-000000000000" + * } + */ + ChannelRolePermission: { + permissions: { + [key: string]: boolean | undefined; + }; + /** + * Created at + * Format: date-time + * @description The ISO 8601 timestamp that the permission override was created at + */ + createdAt: string; + /** + * Updated at + * Format: date-time + * @description The ISO 8601 timestamp that the permission override was updated at, if relevant + */ + updatedAt?: string; + /** + * Role ID + * @description The ID of the role + */ + roleId: number; + /** + * Channel ID + * Format: uuid + * @description The ID of the channel + */ + channelId: string; + }; + /** + * @example { + * "id": 591232, + * "serverId": "wlVr3Ggl", + * "createdAt": "2023-06-15T20:15:00.706Z", + * "permissions": { + * "CanUpdateServer": true, + * "CanReadChats": true + * }, + * "userId": "Ann6LewA", + * "channelId": "00000000-0000-0000-0000-000000000000" + * } + */ + ChannelUserPermission: { + permissions: { + [key: string]: boolean | undefined; + }; + /** + * Created at + * Format: date-time + * @description The ISO 8601 timestamp that the permission override was created at + */ + createdAt: string; + /** + * Updated at + * Format: date-time + * @description The ISO 8601 timestamp that the permission override was updated at, if relevant + */ + updatedAt?: string; + /** + * User ID + * Format: user-id + * @description The ID of the user + */ + userId: string; + /** + * Channel ID + * Format: uuid + * @description The ID of the channel + */ + channelId: string; + }; + /** + * @example { + * "id": 591232, + * "serverId": "wlVr3Ggl", + * "createdAt": "2023-06-15T20:15:00.706Z", + * "permissions": { + * "CanUpdateServer": true, + * "CanReadChats": true + * }, + * "userId": "Ann6LewA", + * "categoryId": 1337 + * } + */ + ChannelCategoryUserPermission: { + permissions: { + [key: string]: boolean | undefined; + }; + /** + * Created at + * Format: date-time + * @description The ISO 8601 timestamp that the permission override was created at + */ + createdAt: string; + /** + * Updated at + * Format: date-time + * @description The ISO 8601 timestamp that the permission override was updated at, if relevant + */ + updatedAt?: string; + /** + * User ID + * Format: user-id + * @description The ID of the user + */ + userId: string; + /** @description The ID of the category */ + categoryId: number; + }; + /** + * @example { + * "id": 591232, + * "serverId": "wlVr3Ggl", + * "createdAt": "2023-06-15T20:15:00.706Z", + * "permissions": { + * "CanUpdateServer": true, + * "CanReadChats": true + * }, + * "roleId": 591232, + * "categoryId": 1337 + * } + */ + ChannelCategoryRolePermission: { + permissions: { + [key: string]: boolean | undefined; + }; + /** + * Created at + * Format: date-time + * @description The ISO 8601 timestamp that the permission override was created at + */ + createdAt: string; + /** + * Updated at + * Format: date-time + * @description The ISO 8601 timestamp that the permission override was updated at, if relevant + */ + updatedAt?: string; + /** + * Role ID + * @description The ID of the role + */ + roleId: number; + /** @description The ID of the category */ + categoryId: number; + }; + /** + * @example { + * "url": "https://cdn.gilcdn.com/TeamAvatar/f3ca3496e7f2b6bfaeddfbb6526bdec7-Large.png?w=450&h=450" + * } + */ + UrlSignature: { + /** @description The URL that is to be signed */ + url: string; + /** @description The url with a valid signature that has a 5 minute expiration on the signature */ + signature?: string; + /** @description The number of seconds to wait before retrying the request */ + retryAfter?: number; + }; + }; + responses: { + _WelcomeMessage: { + content: { + "application/json": { + /** @description The interval in milliseconds that your bot should be configured to send ping frames for the bot's [heartbeat](/docs/api/heartbeat) to be considered valid. */ + heartbeatIntervalMs: number; + /** @description The last message's ID that was sent to this bot. See [event replay](/docs/api/replay) for more details */ + lastMessageId: string; + /** + * Bot ID + * Format: uuid + * @description The ID of the bot + */ + botId: string; + user: components["schemas"]["User"]; + }; + }; + }; + /** @description Emitted when a bot is added to a server */ + BotServerMembershipCreated: { + content: { + "application/json": { + server: components["schemas"]["Server"]; + /** + * Created by + * @description The ID of the user who created this server membership + */ + createdBy: string; + }; + }; + }; + /** @description Emitted when a bot is removed from a server */ + BotServerMembershipDeleted: { + content: { + "application/json": { + server: components["schemas"]["Server"]; + /** + * Deleted by + * @description The ID of the user who deleted this server membership + */ + deletedBy: string; + }; + }; + }; + ChatMessageCreated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + message: components["schemas"]["ChatMessage"]; + }; + }; + }; + ChatMessageUpdated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; message: components["schemas"]["ChatMessage"]; }; }; @@ -2333,40 +2571,155 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; + /** + * Deleted at + * Format: date-time + * @description The ISO 8601 timestamp that the message was deleted at + */ + deletedAt: string; + /** + * @example { + * "id": "00000000-0000-0000-0000-000000000000", + * "type": "default", + * "serverId": "wlVr3Ggl", + * "groupId": "ZVzBo83p", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "content": "Hello **world**!", + * "embeds": [ + * { + * "title": "embed title", + * "description": "embeds support a **different** __subset__ *of* markdown than other markdown fields. <@Ann6LewA>\n\n [links](https://www.guilded.gg) ```\ncheck this code out```\n\n:pizza: time!! ttyl", + * "url": "https://www.guilded.gg", + * "color": 6118369, + * "timestamp": "2022-04-12T22:14:36.737Z", + * "footer": { + * "icon_url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png", + * "text": "footer text" + * }, + * "thumbnail": { + * "url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png" + * }, + * "image": { + * "url": "https://www.guilded.gg/asset/Logos/logomark_wordmark/Color/Guilded_Logomark_Wordmark_Color.png" + * }, + * "author": { + * "name": "Gil", + * "url": "https://www.guilded.gg", + * "icon_url": "https://www.guilded.gg/asset/Default/Gil-md.png" + * }, + * "fields": [ + * { + * "name": "hello", + * "value": "these are fields" + * }, + * { + * "name": "~~help i have been crossed out~~", + * "value": "~~oh noes~~", + * "inline": true + * }, + * { + * "name": "another inline", + * "value": "field", + * "inline": true + * } + * ] + * } + * ], + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA" + * } + */ message: { /** * Message ID * Format: uuid - * * @description The ID of the message */ id: string; + /** + * Type + * @description The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. + * @enum {string} + */ + type: "default" | "system"; /** * Server ID - * * @description The ID of the server */ serverId?: string; + /** + * Group ID + * @description The ID of the group + */ + groupId?: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; + /** + * Content + * Format: chat markdown + * @description The content of the message + */ + content?: string; + /** + * Hidden content link preview URLs + * @description Links in `content` to prevent unfurling as a link preview when displaying in Guilded + */ + hiddenLinkPreviewUrls?: string[]; + embeds?: components["schemas"]["ChatEmbed"][]; + /** @description Message IDs that were replied to */ + replyMessageIds?: string[]; + /** + * Is private + * @description If set, this message will only be seen by those mentioned or replied to + */ + isPrivate?: boolean; + /** + * Is silent + * @description If set, this message did not notify mention or reply recipients + * @default false + */ + isSilent?: boolean; + /** + * Is pinned + * @default false + */ + isPinned?: boolean; + mentions?: components["schemas"]["Mentions"]; + /** + * Created at + * Format: date-time + * @description The ISO 8601 timestamp that the message was created at + */ + createdAt: string; + /** + * Created by + * @description The ID of the user who created this message (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * Created by Webhook ID + * @description The ID of the webhook who created this message, if it was created by a webhook + */ + createdByWebhookId?: string; + /** + * Updated at + * Format: date-time + * @description The ISO 8601 timestamp that the message was updated at, if relevant + */ + updatedAt?: string; /** * Deleted at * Format: date-time - * * @description The ISO 8601 timestamp that the message was deleted at */ deletedAt: string; - /** Is private */ - isPrivate?: boolean; }; }; }; @@ -2376,11 +2729,12 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; member: components["schemas"]["ServerMember"]; + /** @description Count of members in this server after this join. **Note:** at higher member counts (1000+), this value is only updated periodically and should not be used in situations that require absolute accuracy */ + serverMemberCount: number; }; }; }; @@ -2389,25 +2743,22 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; /** * User ID - * + * Format: user-id * @description The ID of the user */ userId: string; /** * Is kick? - * * @description If this member leaving was the result of a kick */ isKick?: boolean; /** * Is ban? - * * @description If this member leaving was the result of a ban */ isBan?: boolean; @@ -2419,7 +2770,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2432,7 +2782,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2445,25 +2794,21 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; userInfo: { /** * User ID - * + * Format: user-id * @description The ID of the user */ id: string; /** * Nickname - * * @description The nickname that was just updated for the user */ - nickname?: - | string - | null; + nickname?: string | null; }; }; }; @@ -2473,20 +2818,18 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; memberRoleIds: { /** * User ID - * + * Format: user-id * @description The ID of the member that had roles updated */ userId: string; /** * Role IDs - * * @description The IDs of the roles that the member currently has _after_ this operation */ roleIds: number[]; @@ -2499,7 +2842,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2512,7 +2854,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2525,7 +2866,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2538,7 +2878,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2551,7 +2890,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2564,7 +2902,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2577,7 +2914,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2590,7 +2926,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2603,7 +2938,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2616,7 +2950,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2629,7 +2962,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2642,7 +2974,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2655,7 +2986,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2668,7 +2998,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2681,7 +3010,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2694,7 +3022,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2707,7 +3034,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2720,7 +3046,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2733,7 +3058,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2746,7 +3070,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2759,7 +3082,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2772,7 +3094,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2785,7 +3106,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2798,7 +3118,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2811,7 +3130,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2824,7 +3142,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2837,7 +3154,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2850,7 +3166,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2863,7 +3178,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2876,7 +3190,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2889,7 +3202,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2902,7 +3214,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2915,7 +3226,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2928,7 +3238,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2941,7 +3250,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2954,7 +3262,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2967,7 +3274,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2980,7 +3286,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -2993,13 +3298,11 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; /** * Deleted by - * * @description The ID of the user who deleted this reaction */ deletedBy: string; @@ -3012,27 +3315,23 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; /** * Channel ID * Format: uuid - * * @description The ID of the channel */ channelId: string; /** * Message ID * Format: uuid - * * @description The ID of the message */ messageId: string; /** * Deleted by - * * @description The ID of the user who deleted this reaction */ deletedBy: string; @@ -3048,7 +3347,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3061,7 +3359,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3074,7 +3371,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3087,7 +3383,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3100,7 +3395,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3113,7 +3407,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3126,7 +3419,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3139,7 +3431,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3152,7 +3443,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3165,7 +3455,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3178,7 +3467,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3191,7 +3479,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3204,7 +3491,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3217,14 +3503,12 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; calendarEventSeries: components["schemas"]["CalendarEventSeries"]; /** * Calendar event ID - * * @description The calendar event updates started at */ calendarEventId?: number; @@ -3236,95 +3520,123 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; calendarEventSeries: components["schemas"]["CalendarEventSeries"]; /** * Calendar event ID - * * @description The calendar event deletions started at */ calendarEventId?: number; }; }; }; - AnnouncementCreated: { + GroupCreated: { content: { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; - announcement: components["schemas"]["Announcement"]; + group: components["schemas"]["Group"]; }; }; }; - AnnouncementUpdated: { + GroupUpdated: { content: { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; - announcement: components["schemas"]["Announcement"]; + group: components["schemas"]["Group"]; }; }; }; - AnnouncementDeleted: { + GroupDeleted: { content: { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; - announcement: components["schemas"]["Announcement"]; + group: components["schemas"]["Group"]; }; }; }; - AnnouncementReactionCreated: { + AnnouncementCreated: { content: { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; - reaction: components["schemas"]["AnnouncementReaction"]; + announcement: components["schemas"]["Announcement"]; }; }; }; - AnnouncementReactionDeleted: { + AnnouncementUpdated: { content: { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; - reaction: components["schemas"]["AnnouncementReaction"]; + announcement: components["schemas"]["Announcement"]; }; }; }; - AnnouncementCommentCreated: { + AnnouncementDeleted: { content: { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; - announcementComment: components["schemas"]["AnnouncementComment"]; + announcement: components["schemas"]["Announcement"]; + }; + }; + }; + AnnouncementReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["AnnouncementReaction"]; + }; + }; + }; + AnnouncementReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["AnnouncementReaction"]; + }; + }; + }; + AnnouncementCommentCreated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + announcementComment: components["schemas"]["AnnouncementComment"]; }; }; }; @@ -3333,7 +3645,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3346,7 +3657,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3359,7 +3669,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3372,7 +3681,6 @@ export type components = { "application/json": { /** * Server ID - * * @description The ID of the server */ serverId: string; @@ -3380,12 +3688,308 @@ export type components = { }; }; }; + UserStatusCreated: { + content: { + "application/json": { + /** + * Expires at + * Format: date-time + * @description An ISO 8601 timestamp that will be used to indicate when an expiration occurs. Expiration usually will not occur exactly at this time. Bot logic should not expect a guarantee of timing as a result, but can expect that it'll happen very shortly afterwards + */ + expiresAt?: string; + /** + * User ID + * Format: user-id + * @description The ID of the user + */ + userId: string; + userStatus: components["schemas"]["UserStatus"]; + }; + }; + }; + UserStatusDeleted: { + content: { + "application/json": { + /** + * User ID + * Format: user-id + * @description The ID of the user + */ + userId: string; + userStatus: components["schemas"]["UserStatus"]; + }; + }; + }; + RoleCreated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + role: components["schemas"]["Role"]; + }; + }; + }; + RoleUpdated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + role: components["schemas"]["Role"]; + }; + }; + }; + RoleDeleted: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + role: components["schemas"]["Role"]; + }; + }; + }; + ChannelArchived: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channel: components["schemas"]["ServerChannel"]; + }; + }; + }; + ChannelRestored: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channel: components["schemas"]["ServerChannel"]; + }; + }; + }; + CategoryCreated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + category: components["schemas"]["Category"]; + }; + }; + }; + CategoryUpdated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + category: components["schemas"]["Category"]; + }; + }; + }; + CategoryDeleted: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + category: components["schemas"]["Category"]; + }; + }; + }; + ChannelMessagePinned: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + message: components["schemas"]["ChatMessage"]; + }; + }; + }; + ChannelMessageUnpinned: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + message: components["schemas"]["ChatMessage"]; + }; + }; + }; + ChannelRolePermissionCreated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelRolePermission: components["schemas"]["ChannelRolePermission"]; + }; + }; + }; + ChannelRolePermissionUpdated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelRolePermission: components["schemas"]["ChannelRolePermission"]; + }; + }; + }; + ChannelRolePermissionDeleted: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelRolePermission: components["schemas"]["ChannelRolePermission"]; + }; + }; + }; + ChannelUserPermissionCreated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelUserPermission: components["schemas"]["ChannelUserPermission"]; + }; + }; + }; + ChannelUserPermissionUpdated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelUserPermission: components["schemas"]["ChannelUserPermission"]; + }; + }; + }; + ChannelUserPermissionDeleted: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelUserPermission: components["schemas"]["ChannelUserPermission"]; + }; + }; + }; + ChannelCategoryUserPermissionCreated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelCategoryUserPermission: components["schemas"]["ChannelCategoryUserPermission"]; + }; + }; + }; + ChannelCategoryRolePermissionCreated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelCategoryRolePermission: components["schemas"]["ChannelCategoryRolePermission"]; + }; + }; + }; + ChannelCategoryUserPermissionUpdated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelCategoryUserPermission: components["schemas"]["ChannelCategoryUserPermission"]; + }; + }; + }; + ChannelCategoryRolePermissionUpdated: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelCategoryRolePermission: components["schemas"]["ChannelCategoryRolePermission"]; + }; + }; + }; + ChannelCategoryUserPermissionDeleted: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelCategoryUserPermission: components["schemas"]["ChannelCategoryUserPermission"]; + }; + }; + }; + ChannelCategoryRolePermissionDeleted: { + content: { + "application/json": { + /** + * Server ID + * @description The ID of the server + */ + serverId: string; + channelCategoryRolePermission: components["schemas"]["ChannelCategoryRolePermission"]; + }; + }; + }; }; parameters: never; requestBodies: never; headers: never; pathItems: never; -}; +} export type external = Record; diff --git a/packages/api/lib/generated/router/GuildedRouter.ts b/packages/api/lib/generated/router/GuildedRouter.ts index bda0f9bc..564588c1 100644 --- a/packages/api/lib/generated/router/GuildedRouter.ts +++ b/packages/api/lib/generated/router/GuildedRouter.ts @@ -63,148 +63,35 @@ export class GuildedRouter { public readonly request: BaseHttpRequest; - constructor( - rest: RestManager, - ) { - this.request = - new FetchHttpRequest( - rest, - ); + constructor(rest: RestManager) { + this.request = new FetchHttpRequest(rest); - this.announcementComments = - new AnnouncementCommentsService( - this - .request, - ); - this.announcements = - new AnnouncementsService( - this - .request, - ); - this.calendarEventComments = - new CalendarEventCommentsService( - this - .request, - ); - this.calendarEvents = - new CalendarEventsService( - this - .request, - ); - this.calendarEventSeries = - new CalendarEventSeriesService( - this - .request, - ); - this.categories = - new CategoriesService( - this - .request, - ); - this.channels = - new ChannelsService( - this - .request, - ); - this.chat = - new ChatService( - this - .request, - ); - this.docComments = - new DocCommentsService( - this - .request, - ); - this.docs = - new DocsService( - this - .request, - ); - this.forumComments = - new ForumCommentsService( - this - .request, - ); - this.forums = - new ForumsService( - this - .request, - ); - this.groupMembership = - new GroupMembershipService( - this - .request, - ); - this.groups = - new GroupsService( - this - .request, - ); - this.listItems = - new ListItemsService( - this - .request, - ); - this.memberBans = - new MemberBansService( - this - .request, - ); - this.members = - new MembersService( - this - .request, - ); - this.reactions = - new ReactionsService( - this - .request, - ); - this.roleMembership = - new RoleMembershipService( - this - .request, - ); - this.roles = - new RolesService( - this - .request, - ); - this.servers = - new ServersService( - this - .request, - ); - this.serverXp = - new ServerXpService( - this - .request, - ); - this.socialLinks = - new SocialLinksService( - this - .request, - ); - this.users = - new UsersService( - this - .request, - ); - this.userStatus = - new UserStatusService( - this - .request, - ); - this.webhook = - new WebhookService( - this - .request, - ); - this.serverSubscriptions = - new ServerSubscriptionService( - this - .request, - ); + this.announcementComments = new AnnouncementCommentsService(this.request); + this.announcements = new AnnouncementsService(this.request); + this.calendarEventComments = new CalendarEventCommentsService(this.request); + this.calendarEvents = new CalendarEventsService(this.request); + this.calendarEventSeries = new CalendarEventSeriesService(this.request); + this.categories = new CategoriesService(this.request); + this.channels = new ChannelsService(this.request); + this.chat = new ChatService(this.request); + this.docComments = new DocCommentsService(this.request); + this.docs = new DocsService(this.request); + this.forumComments = new ForumCommentsService(this.request); + this.forums = new ForumsService(this.request); + this.groupMembership = new GroupMembershipService(this.request); + this.groups = new GroupsService(this.request); + this.listItems = new ListItemsService(this.request); + this.memberBans = new MemberBansService(this.request); + this.members = new MembersService(this.request); + this.reactions = new ReactionsService(this.request); + this.roleMembership = new RoleMembershipService(this.request); + this.roles = new RolesService(this.request); + this.servers = new ServersService(this.request); + this.serverXp = new ServerXpService(this.request); + this.socialLinks = new SocialLinksService(this.request); + this.users = new UsersService(this.request); + this.userStatus = new UserStatusService(this.request); + this.webhook = new WebhookService(this.request); + this.serverSubscriptions = new ServerSubscriptionService(this.request); } } diff --git a/packages/api/lib/generated/router/core/ApiError.ts b/packages/api/lib/generated/router/core/ApiError.ts index 5e0d5cdd..3411fe2e 100644 --- a/packages/api/lib/generated/router/core/ApiError.ts +++ b/packages/api/lib/generated/router/core/ApiError.ts @@ -10,26 +10,14 @@ export class ApiError extends Error { public readonly body: any; public readonly request: ApiRequestOptions; - constructor( - request: ApiRequestOptions, - response: ApiResult, - message: string, - ) { - super( - message, - ); + constructor(request: ApiRequestOptions, response: ApiResult, message: string) { + super(message); - this.name = - "ApiError"; - this.url = - response.url; - this.status = - response.status; - this.statusText = - response.statusText; - this.body = - response.body; - this.request = - request; + this.name = "ApiError"; + this.url = response.url; + this.status = response.status; + this.statusText = response.statusText; + this.body = response.body; + this.request = request; } } diff --git a/packages/api/lib/generated/router/core/ApiRequestOptions.ts b/packages/api/lib/generated/router/core/ApiRequestOptions.ts index e2e11e4b..4a45fbfb 100644 --- a/packages/api/lib/generated/router/core/ApiRequestOptions.ts +++ b/packages/api/lib/generated/router/core/ApiRequestOptions.ts @@ -1,40 +1,15 @@ /* istanbul ignore file */ /* eslint-disable */ export type ApiRequestOptions = { - readonly method: - | "GET" - | "PUT" - | "POST" - | "DELETE" - | "OPTIONS" - | "HEAD" - | "PATCH"; + readonly method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH"; readonly url: string; - readonly path?: Record< - string, - any - >; - readonly cookies?: Record< - string, - any - >; - readonly headers?: Record< - string, - any - >; - readonly query?: Record< - string, - any - >; - readonly formData?: Record< - string, - any - >; + readonly path?: Record; + readonly cookies?: Record; + readonly headers?: Record; + readonly query?: Record; + readonly formData?: Record; readonly body?: any; readonly mediaType?: string; readonly responseHeader?: string; - readonly errors?: Record< - number, - string - >; + readonly errors?: Record; }; diff --git a/packages/api/lib/generated/router/core/BaseHttpRequest.ts b/packages/api/lib/generated/router/core/BaseHttpRequest.ts index d5a2243d..d0c54769 100644 --- a/packages/api/lib/generated/router/core/BaseHttpRequest.ts +++ b/packages/api/lib/generated/router/core/BaseHttpRequest.ts @@ -5,13 +5,7 @@ import type { ApiRequestOptions } from "./ApiRequestOptions"; import type { CancelablePromise } from "./CancelablePromise"; export abstract class BaseHttpRequest { - constructor( - public readonly rest: RestManager, - ) {} + constructor(public readonly rest: RestManager) {} - public abstract request< - T, - >( - options: ApiRequestOptions, - ): CancelablePromise; + public abstract request(options: ApiRequestOptions): CancelablePromise; } diff --git a/packages/api/lib/generated/router/core/FetchHttpRequest.ts b/packages/api/lib/generated/router/core/FetchHttpRequest.ts index e21e8a58..7f80ce41 100644 --- a/packages/api/lib/generated/router/core/FetchHttpRequest.ts +++ b/packages/api/lib/generated/router/core/FetchHttpRequest.ts @@ -13,15 +13,7 @@ export class FetchHttpRequest extends BaseHttpRequest { * @returns CancelablePromise * @throws ApiError */ - public override request< - T, - >( - options: ApiRequestOptions, - ): CancelablePromise { - return __request( - this - .rest, - options, - ); + public override request(options: ApiRequestOptions): CancelablePromise { + return __request(this.rest, options); } } diff --git a/packages/api/lib/generated/router/core/OpenAPI.ts b/packages/api/lib/generated/router/core/OpenAPI.ts index 481cde80..295ae70e 100644 --- a/packages/api/lib/generated/router/core/OpenAPI.ts +++ b/packages/api/lib/generated/router/core/OpenAPI.ts @@ -9,25 +9,12 @@ export type OpenAPIConfig = { BASE: string; VERSION: string; WITH_CREDENTIALS: boolean; - CREDENTIALS: - | "include" - | "omit" - | "same-origin"; - TOKEN?: - | string - | Resolver; - USERNAME?: - | string - | Resolver; - PASSWORD?: - | string - | Resolver; - HEADERS?: - | Headers - | Resolver; - ENCODE_PATH?: ( - path: string, - ) => string; + CREDENTIALS: "include" | "omit" | "same-origin"; + TOKEN?: string | Resolver; + USERNAME?: string | Resolver; + PASSWORD?: string | Resolver; + HEADERS?: Headers | Resolver; + ENCODE_PATH?: (path: string) => string; }; export const OpenAPI: OpenAPIConfig = { diff --git a/packages/api/lib/generated/router/core/request.ts b/packages/api/lib/generated/router/core/request.ts index 35a60b41..40899cfd 100644 --- a/packages/api/lib/generated/router/core/request.ts +++ b/packages/api/lib/generated/router/core/request.ts @@ -4,38 +4,21 @@ import { RestManager } from "../../../rest/RestManager"; import type { ApiRequestOptions } from "./ApiRequestOptions"; export function request(rest: RestManager, options: ApiRequestOptions) { - let formattedPath = - options.url; - if ( - options.path - ) { + let formattedPath = options.url; + if (options.path) { for (const key in options.path) { - formattedPath = - formattedPath.replace( - `{${key}}`, - options - .path[ - key - ], - ); + formattedPath = formattedPath.replace(`{${key}}`, options.path[key]); } } return rest - .make( - { - method: options.method, - headers: options.headers, - isFormData: false, - path: formattedPath, - query: options.query, - body: options.body, - }, - ) - .then( - ( - x, - ) => - x[1] as T, - ); + .make({ + method: options.method, + headers: options.headers, + isFormData: false, + path: formattedPath, + query: options.query, + body: options.body, + }) + .then((x) => x[1] as T); } diff --git a/packages/api/lib/generated/router/index.ts b/packages/api/lib/generated/router/index.ts index 5720bdbf..25ba3439 100644 --- a/packages/api/lib/generated/router/index.ts +++ b/packages/api/lib/generated/router/index.ts @@ -1,4 +1,4 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ @@ -21,6 +21,10 @@ export type { CalendarEventReaction as CalendarEventReactionPayload } from "./mo export type { CalendarEventRsvp as CalendarEventRsvpPayload } from "./models/CalendarEventRsvp"; export type { CalendarEventSeries as CalendarEventSeriesPayload } from "./models/CalendarEventSeries"; export type { Category as CategoryPayload } from "./models/Category"; +export type { ChannelCategoryRolePermission as ChannelCategoryRolePermissionPayload } from "./models/ChannelCategoryRolePermission"; +export type { ChannelCategoryUserPermission as ChannelCategoryUserPermissionPayload } from "./models/ChannelCategoryUserPermission"; +export type { ChannelRolePermission as ChannelRolePermissionPayload } from "./models/ChannelRolePermission"; +export type { ChannelUserPermission as ChannelUserPermissionPayload } from "./models/ChannelUserPermission"; export type { ChatEmbed as ChatEmbedPayload } from "./models/ChatEmbed"; export type { ChatMessage as ChatMessagePayload } from "./models/ChatMessage"; export type { ChatMessageReaction as ChatMessageReactionPayload } from "./models/ChatMessageReaction"; @@ -47,6 +51,7 @@ export type { ServerMemberPermissions as ServerMemberPermissionsPayload } from " export type { ServerMemberSummary as ServerMemberSummaryPayload } from "./models/ServerMemberSummary"; export type { ServerSubscriptionTier as ServerSubscriptionTierPayload } from "./models/ServerSubscriptionTier"; export type { SocialLink as SocialLinkPayload } from "./models/SocialLink"; +export type { UrlSignature as UrlSignaturePayload } from "./models/UrlSignature"; export type { User as UserPayload } from "./models/User"; export type { UserStatus as UserStatusPayload } from "./models/UserStatus"; export type { UserSummary as UserSummaryPayload } from "./models/UserSummary"; @@ -69,6 +74,7 @@ export { GroupsService } from "./services/GroupsService"; export { ListItemsService } from "./services/ListItemsService"; export { MemberBansService } from "./services/MemberBansService"; export { MembersService } from "./services/MembersService"; +export { PermissionOverrideService } from "./services/PermissionOverrideService"; export { ReactionsService } from "./services/ReactionsService"; export { RoleMembershipService } from "./services/RoleMembershipService"; export { RolesService } from "./services/RolesService"; @@ -76,6 +82,7 @@ export { ServersService } from "./services/ServersService"; export { ServerSubscriptionService } from "./services/ServerSubscriptionService"; export { ServerXpService } from "./services/ServerXpService"; export { SocialLinksService } from "./services/SocialLinksService"; +export { UrlSignatureService } from "./services/UrlSignatureService"; export { UsersService } from "./services/UsersService"; export { UserStatusService } from "./services/UserStatusService"; export { WebhookService } from "./services/WebhookService"; diff --git a/packages/api/lib/generated/router/models/Announcement.ts b/packages/api/lib/generated/router/models/Announcement.ts index fcff3c93..b1077080 100644 --- a/packages/api/lib/generated/router/models/Announcement.ts +++ b/packages/api/lib/generated/router/models/Announcement.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type Announcement = { /** * The ID of the announcement @@ -14,6 +12,10 @@ export type Announcement = { * The ID of the server */ serverId: string; + /** + * The ID of the group + */ + groupId: string; /** * The ID of the channel */ diff --git a/packages/api/lib/generated/router/models/AnnouncementComment.ts b/packages/api/lib/generated/router/models/AnnouncementComment.ts index 6a1dc50c..2aa44f80 100644 --- a/packages/api/lib/generated/router/models/AnnouncementComment.ts +++ b/packages/api/lib/generated/router/models/AnnouncementComment.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type AnnouncementComment = { /** * The ID of the announcement comment diff --git a/packages/api/lib/generated/router/models/AnnouncementCommentReaction.ts b/packages/api/lib/generated/router/models/AnnouncementCommentReaction.ts index cc87bd46..37125e97 100644 --- a/packages/api/lib/generated/router/models/AnnouncementCommentReaction.ts +++ b/packages/api/lib/generated/router/models/AnnouncementCommentReaction.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Emote } from "./Emote"; - export type AnnouncementCommentReaction = { /** * The ID of the channel diff --git a/packages/api/lib/generated/router/models/AnnouncementReaction.ts b/packages/api/lib/generated/router/models/AnnouncementReaction.ts index 0eb5e752..2f8883f9 100644 --- a/packages/api/lib/generated/router/models/AnnouncementReaction.ts +++ b/packages/api/lib/generated/router/models/AnnouncementReaction.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Emote } from "./Emote"; - export type AnnouncementReaction = { /** * The ID of the channel diff --git a/packages/api/lib/generated/router/models/CalendarEvent.ts b/packages/api/lib/generated/router/models/CalendarEvent.ts index 6097e7b3..6e5cfc3e 100644 --- a/packages/api/lib/generated/router/models/CalendarEvent.ts +++ b/packages/api/lib/generated/router/models/CalendarEvent.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type CalendarEvent = { /** * The ID of the calendar event @@ -14,6 +12,10 @@ export type CalendarEvent = { * The ID of the server */ serverId: string; + /** + * The ID of the group + */ + groupId: string; /** * The ID of the channel */ diff --git a/packages/api/lib/generated/router/models/CalendarEventComment.ts b/packages/api/lib/generated/router/models/CalendarEventComment.ts index 588ebdf6..3af88922 100644 --- a/packages/api/lib/generated/router/models/CalendarEventComment.ts +++ b/packages/api/lib/generated/router/models/CalendarEventComment.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type CalendarEventComment = { /** * The ID of the calendar event comment diff --git a/packages/api/lib/generated/router/models/CalendarEventCommentReaction.ts b/packages/api/lib/generated/router/models/CalendarEventCommentReaction.ts index 6f04f1a5..eec71ce7 100644 --- a/packages/api/lib/generated/router/models/CalendarEventCommentReaction.ts +++ b/packages/api/lib/generated/router/models/CalendarEventCommentReaction.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Emote } from "./Emote"; - export type CalendarEventCommentReaction = { /** * The ID of the channel diff --git a/packages/api/lib/generated/router/models/CalendarEventReaction.ts b/packages/api/lib/generated/router/models/CalendarEventReaction.ts index 55a241f0..499607e2 100644 --- a/packages/api/lib/generated/router/models/CalendarEventReaction.ts +++ b/packages/api/lib/generated/router/models/CalendarEventReaction.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Emote } from "./Emote"; - export type CalendarEventReaction = { /** * The ID of the channel diff --git a/packages/api/lib/generated/router/models/CalendarEventRsvp.ts b/packages/api/lib/generated/router/models/CalendarEventRsvp.ts index 4790654f..8ee166dd 100644 --- a/packages/api/lib/generated/router/models/CalendarEventRsvp.ts +++ b/packages/api/lib/generated/router/models/CalendarEventRsvp.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type CalendarEventRsvp = { /** * The ID of the calendar event @@ -23,13 +22,7 @@ export type CalendarEventRsvp = { /** * The status of the RSVP */ - status: - | "going" - | "maybe" - | "declined" - | "invited" - | "waitlisted" - | "not responded"; + status: "going" | "maybe" | "declined" | "invited" | "waitlisted" | "not responded"; /** * The ID of the user who created this RSVP */ diff --git a/packages/api/lib/generated/router/models/CalendarEventSeries.ts b/packages/api/lib/generated/router/models/CalendarEventSeries.ts index 88ff6e0f..17400297 100644 --- a/packages/api/lib/generated/router/models/CalendarEventSeries.ts +++ b/packages/api/lib/generated/router/models/CalendarEventSeries.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type CalendarEventSeries = { /** * The ID of the calendar event series diff --git a/packages/api/lib/generated/router/models/Category.ts b/packages/api/lib/generated/router/models/Category.ts index 83b66ef5..7b3d153b 100644 --- a/packages/api/lib/generated/router/models/Category.ts +++ b/packages/api/lib/generated/router/models/Category.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type Category = { /** * The ID of the category @@ -28,4 +27,8 @@ export type Category = { * Name of the category */ name: string; + /** + * The priority of the category will determine its position relative to other categories in the group. The higher the value, the higher up it will be displayed in the UI. Returned values can be null, in which case sorting will be done by `createdAt` in descending order. Due to legacy issues, sending a null value is not possible + */ + priority?: number; }; diff --git a/packages/api/lib/generated/router/models/ChannelCategoryRolePermission.ts b/packages/api/lib/generated/router/models/ChannelCategoryRolePermission.ts new file mode 100644 index 00000000..2b384d88 --- /dev/null +++ b/packages/api/lib/generated/router/models/ChannelCategoryRolePermission.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ChannelCategoryRolePermission = { + permissions: Record; + /** + * The ISO 8601 timestamp that the permission override was created at + */ + createdAt: string; + /** + * The ISO 8601 timestamp that the permission override was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the role + */ + roleId: number; + /** + * The ID of the category + */ + categoryId: number; +}; diff --git a/packages/api/lib/generated/router/models/ChannelCategoryUserPermission.ts b/packages/api/lib/generated/router/models/ChannelCategoryUserPermission.ts new file mode 100644 index 00000000..0a79659a --- /dev/null +++ b/packages/api/lib/generated/router/models/ChannelCategoryUserPermission.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ChannelCategoryUserPermission = { + permissions: Record; + /** + * The ISO 8601 timestamp that the permission override was created at + */ + createdAt: string; + /** + * The ISO 8601 timestamp that the permission override was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the user + */ + userId: string; + /** + * The ID of the category + */ + categoryId: number; +}; diff --git a/packages/api/lib/generated/router/models/ChannelRolePermission.ts b/packages/api/lib/generated/router/models/ChannelRolePermission.ts new file mode 100644 index 00000000..1cf4765d --- /dev/null +++ b/packages/api/lib/generated/router/models/ChannelRolePermission.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ChannelRolePermission = { + permissions: Record; + /** + * The ISO 8601 timestamp that the permission override was created at + */ + createdAt: string; + /** + * The ISO 8601 timestamp that the permission override was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the role + */ + roleId: number; + /** + * The ID of the channel + */ + channelId: string; +}; diff --git a/packages/api/lib/generated/router/models/ChannelUserPermission.ts b/packages/api/lib/generated/router/models/ChannelUserPermission.ts new file mode 100644 index 00000000..6a59597f --- /dev/null +++ b/packages/api/lib/generated/router/models/ChannelUserPermission.ts @@ -0,0 +1,23 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type ChannelUserPermission = { + permissions: Record; + /** + * The ISO 8601 timestamp that the permission override was created at + */ + createdAt: string; + /** + * The ISO 8601 timestamp that the permission override was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the user + */ + userId: string; + /** + * The ID of the channel + */ + channelId: string; +}; diff --git a/packages/api/lib/generated/router/models/ChatEmbed.ts b/packages/api/lib/generated/router/models/ChatEmbed.ts index cb6dc61f..7190f8c8 100644 --- a/packages/api/lib/generated/router/models/ChatEmbed.ts +++ b/packages/api/lib/generated/router/models/ChatEmbed.ts @@ -1,10 +1,9 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - /** - * Rich content sections optionally associated with chat messages. Properties with "webhook-markdown" support allow for the following: link, italic, bold, strikethrough, underline, inline code, block code, reaction, and mention. + * Rich content sections optionally associated with chat messages. Properties with "webhook-markdown" support allow for the following: link, italic, bold, strikethrough, underline, inline code, block code, reaction, mention, and role mention. */ export type ChatEmbed = { /** diff --git a/packages/api/lib/generated/router/models/ChatMessage.ts b/packages/api/lib/generated/router/models/ChatMessage.ts index 06effdd7..1329fef5 100644 --- a/packages/api/lib/generated/router/models/ChatMessage.ts +++ b/packages/api/lib/generated/router/models/ChatMessage.ts @@ -1,11 +1,9 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { ChatEmbed } from "./ChatEmbed"; import type { Mentions } from "./Mentions"; - export type ChatMessage = { /** * The ID of the message @@ -14,9 +12,7 @@ export type ChatMessage = { /** * The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. */ - type: - | "default" - | "system"; + type: "default" | "system"; /** * The ID of the server */ @@ -33,6 +29,10 @@ export type ChatMessage = { * The content of the message */ content?: string; + /** + * Links in `content` to prevent unfurling as a link preview when displaying in Guilded + */ + hiddenLinkPreviewUrls?: Array; embeds?: Array; /** * Message IDs that were replied to diff --git a/packages/api/lib/generated/router/models/ChatMessageReaction.ts b/packages/api/lib/generated/router/models/ChatMessageReaction.ts index 5a82d582..c46300f5 100644 --- a/packages/api/lib/generated/router/models/ChatMessageReaction.ts +++ b/packages/api/lib/generated/router/models/ChatMessageReaction.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Emote } from "./Emote"; - export type ChatMessageReaction = { /** * The ID of the channel diff --git a/packages/api/lib/generated/router/models/Doc.ts b/packages/api/lib/generated/router/models/Doc.ts index e72719dd..cfd8b655 100644 --- a/packages/api/lib/generated/router/models/Doc.ts +++ b/packages/api/lib/generated/router/models/Doc.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type Doc = { /** * The ID of the doc @@ -14,6 +12,10 @@ export type Doc = { * The ID of the server */ serverId: string; + /** + * The ID of the group + */ + groupId: string; /** * The ID of the channel */ diff --git a/packages/api/lib/generated/router/models/DocComment.ts b/packages/api/lib/generated/router/models/DocComment.ts index 9b0eaa24..8afd8936 100644 --- a/packages/api/lib/generated/router/models/DocComment.ts +++ b/packages/api/lib/generated/router/models/DocComment.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type DocComment = { /** * The ID of the doc comment diff --git a/packages/api/lib/generated/router/models/DocCommentReaction.ts b/packages/api/lib/generated/router/models/DocCommentReaction.ts index 19cfa7e8..1db8c3fd 100644 --- a/packages/api/lib/generated/router/models/DocCommentReaction.ts +++ b/packages/api/lib/generated/router/models/DocCommentReaction.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Emote } from "./Emote"; - export type DocCommentReaction = { /** * The ID of the channel diff --git a/packages/api/lib/generated/router/models/DocReaction.ts b/packages/api/lib/generated/router/models/DocReaction.ts index ba20fcf3..16ba6333 100644 --- a/packages/api/lib/generated/router/models/DocReaction.ts +++ b/packages/api/lib/generated/router/models/DocReaction.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Emote } from "./Emote"; - export type DocReaction = { /** * The ID of the channel diff --git a/packages/api/lib/generated/router/models/Emote.ts b/packages/api/lib/generated/router/models/Emote.ts index 9fbdf056..10ec6d1a 100644 --- a/packages/api/lib/generated/router/models/Emote.ts +++ b/packages/api/lib/generated/router/models/Emote.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type Emote = { /** * The ID of the emote diff --git a/packages/api/lib/generated/router/models/ForumTopic.ts b/packages/api/lib/generated/router/models/ForumTopic.ts index ef009af7..48ab08d4 100644 --- a/packages/api/lib/generated/router/models/ForumTopic.ts +++ b/packages/api/lib/generated/router/models/ForumTopic.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type ForumTopic = { /** * The ID of the forum topic @@ -14,6 +12,10 @@ export type ForumTopic = { * The ID of the server */ serverId: string; + /** + * The ID of the group + */ + groupId: string; /** * The ID of the channel */ diff --git a/packages/api/lib/generated/router/models/ForumTopicComment.ts b/packages/api/lib/generated/router/models/ForumTopicComment.ts index a05d3def..fa0af655 100644 --- a/packages/api/lib/generated/router/models/ForumTopicComment.ts +++ b/packages/api/lib/generated/router/models/ForumTopicComment.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type ForumTopicComment = { /** * The ID of the forum topic comment diff --git a/packages/api/lib/generated/router/models/ForumTopicCommentReaction.ts b/packages/api/lib/generated/router/models/ForumTopicCommentReaction.ts index 6c8db78e..d2466519 100644 --- a/packages/api/lib/generated/router/models/ForumTopicCommentReaction.ts +++ b/packages/api/lib/generated/router/models/ForumTopicCommentReaction.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Emote } from "./Emote"; - export type ForumTopicCommentReaction = { /** * The ID of the channel diff --git a/packages/api/lib/generated/router/models/ForumTopicReaction.ts b/packages/api/lib/generated/router/models/ForumTopicReaction.ts index 572a1744..eff98d7e 100644 --- a/packages/api/lib/generated/router/models/ForumTopicReaction.ts +++ b/packages/api/lib/generated/router/models/ForumTopicReaction.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Emote } from "./Emote"; - export type ForumTopicReaction = { /** * The ID of the channel diff --git a/packages/api/lib/generated/router/models/ForumTopicSummary.ts b/packages/api/lib/generated/router/models/ForumTopicSummary.ts index 9059069a..ad34a459 100644 --- a/packages/api/lib/generated/router/models/ForumTopicSummary.ts +++ b/packages/api/lib/generated/router/models/ForumTopicSummary.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type ForumTopicSummary = { /** * The ID of the forum topic @@ -12,6 +11,10 @@ export type ForumTopicSummary = { * The ID of the server */ serverId: string; + /** + * The ID of the group + */ + groupId: string; /** * The ID of the channel */ diff --git a/packages/api/lib/generated/router/models/Group.ts b/packages/api/lib/generated/router/models/Group.ts index bb5a9c17..57012757 100644 --- a/packages/api/lib/generated/router/models/Group.ts +++ b/packages/api/lib/generated/router/models/Group.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type Group = { /** * The ID of the group diff --git a/packages/api/lib/generated/router/models/ListItem.ts b/packages/api/lib/generated/router/models/ListItem.ts index 226aa8a7..e1783f7b 100644 --- a/packages/api/lib/generated/router/models/ListItem.ts +++ b/packages/api/lib/generated/router/models/ListItem.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type ListItem = { /** * The ID of the list item @@ -14,6 +12,10 @@ export type ListItem = { * The ID of the server */ serverId: string; + /** + * The ID of the group + */ + groupId: string; /** * The ID of the channel */ diff --git a/packages/api/lib/generated/router/models/ListItemSummary.ts b/packages/api/lib/generated/router/models/ListItemSummary.ts index 14a36d38..a0bcd908 100644 --- a/packages/api/lib/generated/router/models/ListItemSummary.ts +++ b/packages/api/lib/generated/router/models/ListItemSummary.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { Mentions } from "./Mentions"; - export type ListItemSummary = { /** * The ID of the list item diff --git a/packages/api/lib/generated/router/models/Mentions.ts b/packages/api/lib/generated/router/models/Mentions.ts index 957678d0..f6167ba2 100644 --- a/packages/api/lib/generated/router/models/Mentions.ts +++ b/packages/api/lib/generated/router/models/Mentions.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - /** * Metadata of who or what is mentioned in content */ diff --git a/packages/api/lib/generated/router/models/Role.ts b/packages/api/lib/generated/router/models/Role.ts index 71f9f6cc..744833e2 100644 --- a/packages/api/lib/generated/router/models/Role.ts +++ b/packages/api/lib/generated/router/models/Role.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type Role = { /** * The ID of the role @@ -49,9 +48,9 @@ export type Role = { */ icon?: string; /** - * The position the role will be in relation to the roles in the server + * The priority the role will be in relation to other roles in the server. The higher the value, the more precedence the role has over lower priority roles, and the higher up it will be displayed in the UI. Values can be zero or negative! */ - position: number; + priority?: number; /** * The default role users are given when joining the server. Base roles are tied directly to the server and cannot be created or deleted */ diff --git a/packages/api/lib/generated/router/models/Server.ts b/packages/api/lib/generated/router/models/Server.ts index 15fe96a5..67ed3d6e 100644 --- a/packages/api/lib/generated/router/models/Server.ts +++ b/packages/api/lib/generated/router/models/Server.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type Server = { /** * The ID of the server @@ -15,15 +14,7 @@ export type Server = { /** * The type of server designated from the server's settings page */ - type?: - | "team" - | "organization" - | "community" - | "clan" - | "guild" - | "friends" - | "streaming" - | "other"; + type?: "team" | "organization" | "community" | "clan" | "guild" | "friends" | "streaming" | "other"; /** * The name given to the server */ diff --git a/packages/api/lib/generated/router/models/ServerChannel.ts b/packages/api/lib/generated/router/models/ServerChannel.ts index 1d10e8c7..3d5f3b54 100644 --- a/packages/api/lib/generated/router/models/ServerChannel.ts +++ b/packages/api/lib/generated/router/models/ServerChannel.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type ServerChannel = { /** * The ID of the channel @@ -11,17 +10,7 @@ export type ServerChannel = { /** * The type of channel. This will determine what routes to use for creating content in a channel. For example, if this "chat", then one must use the routes for creating channel messages */ - type: - | "announcements" - | "chat" - | "calendar" - | "forums" - | "media" - | "docs" - | "voice" - | "list" - | "scheduling" - | "stream"; + type: "announcements" | "chat" | "calendar" | "forums" | "media" | "docs" | "voice" | "list" | "scheduling" | "stream"; /** * The name of the channel */ @@ -69,14 +58,7 @@ export type ServerChannel = { /** * What users can access the channel. Only applicable to server channels. If not present, this channel will respect normal permissions. `public` is accessible to everyone, even those who aren't of the server. `private` is only accessible to explicitly mentioned users. Currently, threads cannot be `public` and other channels cannot be `private`. Additionally, `private` threads can only exist with an associated `messageId` that is for a private message */ - visibility?: - | "private" - | "public" - | null; - /** - * [DEPRECATED - use `visibility` instead] Whether the channel can be accessed from users who are not member of the server. Not applicable to threads - */ - isPublic?: boolean; + visibility?: "private" | "public" | null; /** * The ID of the user who archived this channel */ @@ -85,4 +67,8 @@ export type ServerChannel = { * The ISO 8601 timestamp that the channel was archived at, if relevant */ archivedAt?: string; + /** + * The priority of the channel will determine its position relative to other categories in the group. The higher the value, the higher up it will be displayed in the UI. Returned values can be null, in which case sorting will be done by `createdAt` in ascending order. Due to legacy issues, sending a null value is not possible + */ + priority?: number; }; diff --git a/packages/api/lib/generated/router/models/ServerMember.ts b/packages/api/lib/generated/router/models/ServerMember.ts index a4d28c05..62865e86 100644 --- a/packages/api/lib/generated/router/models/ServerMember.ts +++ b/packages/api/lib/generated/router/models/ServerMember.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { User } from "./User"; - export type ServerMember = { user: User; roleIds: Array; diff --git a/packages/api/lib/generated/router/models/ServerMemberBan.ts b/packages/api/lib/generated/router/models/ServerMemberBan.ts index 38da162b..972e74ca 100644 --- a/packages/api/lib/generated/router/models/ServerMemberBan.ts +++ b/packages/api/lib/generated/router/models/ServerMemberBan.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { UserSummary } from "./UserSummary"; - export type ServerMemberBan = { user: UserSummary; /** diff --git a/packages/api/lib/generated/router/models/ServerMemberPermissions.ts b/packages/api/lib/generated/router/models/ServerMemberPermissions.ts index 52be42fe..a72ae6cc 100644 --- a/packages/api/lib/generated/router/models/ServerMemberPermissions.ts +++ b/packages/api/lib/generated/router/models/ServerMemberPermissions.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type ServerMemberPermissions = { /** * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section diff --git a/packages/api/lib/generated/router/models/ServerMemberSummary.ts b/packages/api/lib/generated/router/models/ServerMemberSummary.ts index b2ba99a7..bc22dd33 100644 --- a/packages/api/lib/generated/router/models/ServerMemberSummary.ts +++ b/packages/api/lib/generated/router/models/ServerMemberSummary.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { UserSummary } from "./UserSummary"; - export type ServerMemberSummary = { user: UserSummary; roleIds: Array; diff --git a/packages/api/lib/generated/router/models/ServerSubscriptionTier.ts b/packages/api/lib/generated/router/models/ServerSubscriptionTier.ts index 5a8f73c5..c583302a 100644 --- a/packages/api/lib/generated/router/models/ServerSubscriptionTier.ts +++ b/packages/api/lib/generated/router/models/ServerSubscriptionTier.ts @@ -1,16 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type ServerSubscriptionTier = { /** * The type of the server subscription tier. This field is case sensitive!! */ - type: - | "Gold" - | "Silver" - | "Copper"; + type: "Gold" | "Silver" | "Copper"; /** * The ID of the server */ diff --git a/packages/api/lib/generated/router/models/SocialLink.ts b/packages/api/lib/generated/router/models/SocialLink.ts index e0a5c0b3..21298132 100644 --- a/packages/api/lib/generated/router/models/SocialLink.ts +++ b/packages/api/lib/generated/router/models/SocialLink.ts @@ -1,26 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type SocialLink = { /** * The type of social link that Guilded supports. Depending on this value, `handle` or `serviceId` may or may not be present */ - type: - | "twitch" - | "bnet" - | "psn" - | "xbox" - | "steam" - | "origin" - | "youtube" - | "twitter" - | "facebook" - | "switch" - | "patreon" - | "roblox" - | "epic"; + type: "twitch" | "bnet" | "psn" | "xbox" | "steam" | "origin" | "youtube" | "twitter" | "facebook" | "switch" | "patreon" | "roblox" | "epic"; /** * The ID of the user that the social link is associated with */ diff --git a/packages/api/lib/generated/router/models/UrlSignature.ts b/packages/api/lib/generated/router/models/UrlSignature.ts new file mode 100644 index 00000000..762a3c3b --- /dev/null +++ b/packages/api/lib/generated/router/models/UrlSignature.ts @@ -0,0 +1,18 @@ +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +export type UrlSignature = { + /** + * The URL that is to be signed + */ + url: string; + /** + * The url with a valid signature that has a 5 minute expiration on the signature + */ + signature?: string; + /** + * The number of seconds to wait before retrying the request + */ + retryAfter?: number; +}; diff --git a/packages/api/lib/generated/router/models/User.ts b/packages/api/lib/generated/router/models/User.ts index 602a0daa..2778d55e 100644 --- a/packages/api/lib/generated/router/models/User.ts +++ b/packages/api/lib/generated/router/models/User.ts @@ -1,10 +1,8 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - import type { UserStatus } from "./UserStatus"; - export type User = { /** * The ID of the user @@ -13,9 +11,7 @@ export type User = { /** * The type of user. If this property is absent, it can assumed to be of type `user` */ - type?: - | "bot" - | "user"; + type?: "bot" | "user"; /** * The user's name */ diff --git a/packages/api/lib/generated/router/models/UserStatus.ts b/packages/api/lib/generated/router/models/UserStatus.ts index 262167bc..1b3fe10c 100644 --- a/packages/api/lib/generated/router/models/UserStatus.ts +++ b/packages/api/lib/generated/router/models/UserStatus.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type UserStatus = { /** * The content of the user status. The supported markdown for this content only includes reactions and plaintext for now diff --git a/packages/api/lib/generated/router/models/UserSummary.ts b/packages/api/lib/generated/router/models/UserSummary.ts index 2bebb335..81eb912e 100644 --- a/packages/api/lib/generated/router/models/UserSummary.ts +++ b/packages/api/lib/generated/router/models/UserSummary.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type UserSummary = { /** * The ID of the user @@ -11,9 +10,7 @@ export type UserSummary = { /** * The type of user. If this property is absent, it can assumed to be of type `user` */ - type?: - | "bot" - | "user"; + type?: "bot" | "user"; /** * The user's name */ diff --git a/packages/api/lib/generated/router/models/Webhook.ts b/packages/api/lib/generated/router/models/Webhook.ts index 0df1b144..948da294 100644 --- a/packages/api/lib/generated/router/models/Webhook.ts +++ b/packages/api/lib/generated/router/models/Webhook.ts @@ -1,8 +1,7 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ - export type Webhook = { /** * The ID of the webhook diff --git a/packages/api/lib/generated/router/services/AnnouncementCommentsService.ts b/packages/api/lib/generated/router/services/AnnouncementCommentsService.ts index 5a421914..20a8fee9 100644 --- a/packages/api/lib/generated/router/services/AnnouncementCommentsService.ts +++ b/packages/api/lib/generated/router/services/AnnouncementCommentsService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { AnnouncementComment } from "../models/AnnouncementComment"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class AnnouncementCommentsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a comment on an announcement * @returns any Success @@ -33,20 +28,17 @@ export class AnnouncementCommentsService { }): CancelablePromise<{ announcementComment: AnnouncementComment; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/announcements/{announcementId}/comments", - path: { - channelId: channelId, - announcementId: announcementId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/announcements/{announcementId}/comments", + path: { + channelId: channelId, + announcementId: announcementId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get an announcement's comments * @returns any Success @@ -61,18 +53,15 @@ export class AnnouncementCommentsService { }): CancelablePromise<{ announcementComments: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/announcements/{announcementId}/comments", - path: { - channelId: channelId, - announcementId: announcementId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/announcements/{announcementId}/comments", + path: { + channelId: channelId, + announcementId: announcementId, }, - ); + }); } - /** * Get a comment on the announcement * @returns any Success @@ -89,19 +78,16 @@ export class AnnouncementCommentsService { }): CancelablePromise<{ announcementComment: AnnouncementComment; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}", - path: { - channelId: channelId, - announcementId: announcementId, - announcementCommentId: announcementCommentId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}", + path: { + channelId: channelId, + announcementId: announcementId, + announcementCommentId: announcementCommentId, }, - ); + }); } - /** * Update an announcement comment * @returns any Success @@ -125,21 +111,18 @@ export class AnnouncementCommentsService { }): CancelablePromise<{ announcementComment: AnnouncementComment; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}", - path: { - channelId: channelId, - announcementId: announcementId, - announcementCommentId: announcementCommentId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}", + path: { + channelId: channelId, + announcementId: announcementId, + announcementCommentId: announcementCommentId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete an announcement comment * @returns void @@ -154,16 +137,14 @@ export class AnnouncementCommentsService { announcementId: string; announcementCommentId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}", - path: { - channelId: channelId, - announcementId: announcementId, - announcementCommentId: announcementCommentId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}", + path: { + channelId: channelId, + announcementId: announcementId, + announcementCommentId: announcementCommentId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/AnnouncementsService.ts b/packages/api/lib/generated/router/services/AnnouncementsService.ts index 714b0ba1..38ae37e4 100644 --- a/packages/api/lib/generated/router/services/AnnouncementsService.ts +++ b/packages/api/lib/generated/router/services/AnnouncementsService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Announcement } from "../models/Announcement"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class AnnouncementsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create an announcement * @returns any Success @@ -30,29 +25,21 @@ export class AnnouncementsService { /** * The content of the announcement */ - content: - | Record< - string, - any - > - | string; + content: Record | string; }; }): CancelablePromise<{ announcement: Announcement; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/announcements", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/announcements", + path: { + channelId: channelId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get announcements * Results returned will be ordered ascending by the announcement's `createdAt`. `before` will filter based on the announcement's `createdAt` @@ -70,21 +57,18 @@ export class AnnouncementsService { }): CancelablePromise<{ announcements: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/announcements", - path: { - channelId: channelId, - }, - query: { - before: before, - limit: limit, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/announcements", + path: { + channelId: channelId, + }, + query: { + before: before, + limit: limit, }, - ); + }); } - /** * Read an announcement * @returns any Success @@ -99,18 +83,15 @@ export class AnnouncementsService { }): CancelablePromise<{ announcement: Announcement; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/announcements/{announcementId}", - path: { - channelId: channelId, - announcementId: announcementId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/announcements/{announcementId}", + path: { + channelId: channelId, + announcementId: announcementId, }, - ); + }); } - /** * Update an announcement * @returns any Success @@ -131,30 +112,22 @@ export class AnnouncementsService { /** * The content of the announcement */ - content?: - | Record< - string, - any - > - | string; + content?: Record | string; }; }): CancelablePromise<{ announcement: Announcement; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}/announcements/{announcementId}", - path: { - channelId: channelId, - announcementId: announcementId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}/announcements/{announcementId}", + path: { + channelId: channelId, + announcementId: announcementId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete an announcement * @returns void @@ -167,15 +140,13 @@ export class AnnouncementsService { channelId: string; announcementId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/announcements/{announcementId}", - path: { - channelId: channelId, - announcementId: announcementId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/announcements/{announcementId}", + path: { + channelId: channelId, + announcementId: announcementId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/CalendarEventCommentsService.ts b/packages/api/lib/generated/router/services/CalendarEventCommentsService.ts index 19a39861..e65b6ea1 100644 --- a/packages/api/lib/generated/router/services/CalendarEventCommentsService.ts +++ b/packages/api/lib/generated/router/services/CalendarEventCommentsService.ts @@ -1,19 +1,14 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CalendarEventComment } from "../models/CalendarEventComment"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class CalendarEventCommentsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** - * Create a comment on an event + * Create a comment on a calendar event * @returns any Success * @throws ApiError */ @@ -33,20 +28,17 @@ export class CalendarEventCommentsService { }): CancelablePromise<{ calendarEventComment: CalendarEventComment; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/events/{calendarEventId}/comments", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/events/{calendarEventId}/comments", + path: { + channelId: channelId, + calendarEventId: calendarEventId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get a calendar event's comments * @returns any Success @@ -61,18 +53,15 @@ export class CalendarEventCommentsService { }): CancelablePromise<{ calendarEventComments: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/events/{calendarEventId}/comments", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/events/{calendarEventId}/comments", + path: { + channelId: channelId, + calendarEventId: calendarEventId, }, - ); + }); } - /** * Get a comment on the calendar event * @returns any Success @@ -89,19 +78,16 @@ export class CalendarEventCommentsService { }): CancelablePromise<{ calendarEventComment: CalendarEventComment; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - calendarEventCommentId: calendarEventCommentId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + calendarEventCommentId: calendarEventCommentId, }, - ); + }); } - /** * Update a calendar event comment * @returns any Success @@ -125,21 +111,18 @@ export class CalendarEventCommentsService { }): CancelablePromise<{ calendarEventComment: CalendarEventComment; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - calendarEventCommentId: calendarEventCommentId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + calendarEventCommentId: calendarEventCommentId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a calendar event comment * @returns void @@ -154,16 +137,14 @@ export class CalendarEventCommentsService { calendarEventId: number; calendarEventCommentId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - calendarEventCommentId: calendarEventCommentId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + calendarEventCommentId: calendarEventCommentId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/CalendarEventSeriesService.ts b/packages/api/lib/generated/router/services/CalendarEventSeriesService.ts index 43e7c0a9..c42ec64e 100644 --- a/packages/api/lib/generated/router/services/CalendarEventSeriesService.ts +++ b/packages/api/lib/generated/router/services/CalendarEventSeriesService.ts @@ -1,15 +1,11 @@ import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; - export class CalendarEventSeriesService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Update a calendar event series * @returns void @@ -74,14 +70,9 @@ export class CalendarEventSeriesService { roleIds?: Array; repeatInfo?: { /** - * How often you want your event to repeat (important note: this will repeat for the next 180 days unless custom is defined) + * How often you want your event to repeat (important note: this will repeat for the next 365 days unless custom is defined) */ - type: - | "once" - | "everyDay" - | "everyWeek" - | "everyMonth" - | "custom"; + type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom"; /** * Apply further clarification to your events. This **must** have `type` set to `custom` */ @@ -93,11 +84,7 @@ export class CalendarEventSeriesService { /** * Coupled with `count`, this indicates the time range you are repeating your event over */ - interval: - | "day" - | "month" - | "year" - | "week"; + interval: "day" | "month" | "year" | "week"; }; /** * Used to control the end date of the event repeat (only used when `type` is `custom`; if used with `endDate`, the earliest resultant date of the two will be used) @@ -110,15 +97,7 @@ export class CalendarEventSeriesService { /** * Used to control the day of the week that the event should repeat on (only used when `type` is `custom` and when `every.interval` is `week`) */ - on?: Array< - | "sunday" - | "monday" - | "tuesday" - | "wednesday" - | "thursday" - | "friday" - | "saturday" - >; + on?: Array<"sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday">; }; /** * Control the updating of the series from the `calendarEventId` forward. If not defined, it will edit all events @@ -126,20 +105,17 @@ export class CalendarEventSeriesService { calendarEventId?: number; }; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}/event_series/{calendarEventSeriesId}", - path: { - channelId: channelId, - calendarEventSeriesId: calendarEventSeriesId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}/event_series/{calendarEventSeriesId}", + path: { + channelId: channelId, + calendarEventSeriesId: calendarEventSeriesId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a calendar event series * @returns void @@ -159,17 +135,15 @@ export class CalendarEventSeriesService { calendarEventId?: number; }; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/event_series/{calendarEventSeriesId}", - path: { - channelId: channelId, - calendarEventSeriesId: calendarEventSeriesId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/event_series/{calendarEventSeriesId}", + path: { + channelId: channelId, + calendarEventSeriesId: calendarEventSeriesId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } } diff --git a/packages/api/lib/generated/router/services/CalendarEventsService.ts b/packages/api/lib/generated/router/services/CalendarEventsService.ts index 1fb8233d..0819aec0 100644 --- a/packages/api/lib/generated/router/services/CalendarEventsService.ts +++ b/packages/api/lib/generated/router/services/CalendarEventsService.ts @@ -1,18 +1,13 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CalendarEvent } from "../models/CalendarEvent"; import type { CalendarEventRsvp } from "../models/CalendarEventRsvp"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class CalendarEventsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a calendar event * We currently do not have a way to surface the `repeatInfo` after event series are updated. Stay tuned! @@ -79,14 +74,9 @@ export class CalendarEventsService { roleIds?: Array; repeatInfo?: { /** - * How often you want your event to repeat (important note: this will repeat for the next 180 days unless custom is defined) + * How often you want your event to repeat (important note: this will repeat for the next 365 days unless custom is defined) */ - type: - | "once" - | "everyDay" - | "everyWeek" - | "everyMonth" - | "custom"; + type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom"; /** * Apply further clarification to your events. This **must** have `type` set to `custom` */ @@ -98,11 +88,7 @@ export class CalendarEventsService { /** * Coupled with `count`, this indicates the time range you are repeating your event over */ - interval: - | "day" - | "month" - | "year" - | "week"; + interval: "day" | "month" | "year" | "week"; }; /** * Used to control the end date of the event repeat (only used when `type` is `custom`; if used with `endDate`, the earliest resultant date of the two will be used) @@ -115,33 +101,22 @@ export class CalendarEventsService { /** * Used to control the day of the week that the event should repeat on (only used when `type` is `custom` and when `every.interval` is `week`) */ - on?: Array< - | "sunday" - | "monday" - | "tuesday" - | "wednesday" - | "thursday" - | "friday" - | "saturday" - >; + on?: Array<"sunday" | "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday">; }; }; }): CancelablePromise<{ calendarEvent: CalendarEvent; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/events", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/events", + path: { + channelId: channelId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get calendar events * Results returned will be ordered ascending by the event's `startsAt`. `before` and `after` will filter based on the event's `startsAt` @@ -161,22 +136,19 @@ export class CalendarEventsService { }): CancelablePromise<{ calendarEvents: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/events", - path: { - channelId: channelId, - }, - query: { - before: before, - after: after, - limit: limit, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/events", + path: { + channelId: channelId, + }, + query: { + before: before, + after: after, + limit: limit, }, - ); + }); } - /** * Get a calendar event * @returns any Success @@ -191,18 +163,15 @@ export class CalendarEventsService { }): CancelablePromise<{ calendarEvent: CalendarEvent; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/events/{calendarEventId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/events/{calendarEventId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, }, - ); + }); } - /** * Update a calendar event * We currently do not have a way to surface the `repeatInfo` after event series are updated. Stay tuned! @@ -276,20 +245,17 @@ export class CalendarEventsService { }): CancelablePromise<{ calendarEvent: CalendarEvent; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}/events/{calendarEventId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}/events/{calendarEventId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a calendar event * @returns void @@ -302,18 +268,15 @@ export class CalendarEventsService { channelId: string; calendarEventId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/events/{calendarEventId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/events/{calendarEventId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, }, - ); + }); } - /** * Get a calendar event RSVP * @returns any Success @@ -326,25 +289,20 @@ export class CalendarEventsService { }: { channelId: string; calendarEventId: number; - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise<{ calendarEventRsvp: CalendarEventRsvp; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/events/{calendarEventId}/rsvps/{userId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - userId: userId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/events/{calendarEventId}/rsvps/{userId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + userId: userId, }, - ); + }); } - /** * Create or update a calendar event RSVP * @returns any Success @@ -358,37 +316,28 @@ export class CalendarEventsService { }: { channelId: string; calendarEventId: number; - userId: - | string - | "@me"; + userId: string | "@me"; requestBody: { /** * The status of the RSVP */ - status: - | "going" - | "maybe" - | "declined" - | "invited"; + status: "going" | "maybe" | "declined" | "invited"; }; }): CancelablePromise<{ calendarEventRsvp: CalendarEventRsvp; }> { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/events/{calendarEventId}/rsvps/{userId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - userId: userId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/events/{calendarEventId}/rsvps/{userId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + userId: userId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a calendar event RSVP * @returns void @@ -401,23 +350,18 @@ export class CalendarEventsService { }: { channelId: string; calendarEventId: number; - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/events/{calendarEventId}/rsvps/{userId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - userId: userId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/events/{calendarEventId}/rsvps/{userId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + userId: userId, }, - ); + }); } - /** * Get calendar event RSVPs * @returns any Success @@ -432,18 +376,15 @@ export class CalendarEventsService { }): CancelablePromise<{ calendarEventRsvps: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/events/{calendarEventId}/rsvps", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/events/{calendarEventId}/rsvps", + path: { + channelId: channelId, + calendarEventId: calendarEventId, }, - ); + }); } - /** * Create or update a calendar event RSVP for multiple users * @returns void @@ -457,31 +398,22 @@ export class CalendarEventsService { channelId: string; calendarEventId: number; requestBody: { - userIds: Array< - | string - | "@me" - >; + userIds: Array; /** * The status of the RSVP */ - status: - | "going" - | "maybe" - | "declined" - | "invited"; + status: "going" | "maybe" | "declined" | "invited"; }; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/events/{calendarEventId}/rsvps", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/events/{calendarEventId}/rsvps", + path: { + channelId: channelId, + calendarEventId: calendarEventId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } } diff --git a/packages/api/lib/generated/router/services/CategoriesService.ts b/packages/api/lib/generated/router/services/CategoriesService.ts index ff43283a..a3bddab5 100644 --- a/packages/api/lib/generated/router/services/CategoriesService.ts +++ b/packages/api/lib/generated/router/services/CategoriesService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Category } from "../models/Category"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class CategoriesService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a category * @returns any Success @@ -35,19 +30,16 @@ export class CategoriesService { }): CancelablePromise<{ category: Category; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/servers/{serverId}/categories", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/categories", + path: { + serverId: serverId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Read a category * @returns any Success @@ -62,18 +54,15 @@ export class CategoriesService { }): CancelablePromise<{ category: Category; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/categories/{categoryId}", - path: { - serverId: serverId, - categoryId: categoryId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/categories/{categoryId}", + path: { + serverId: serverId, + categoryId: categoryId, }, - ); + }); } - /** * Update a category * @returns any Success @@ -90,25 +79,26 @@ export class CategoriesService { /** * Name of the category */ - name: string; + name?: string; + /** + * The priority of the category will determine its position relative to other categories in the group. The higher the value, the higher up it will be displayed in the UI. Returned values can be null, in which case sorting will be done by `createdAt` in descending order. Due to legacy issues, sending a null value is not possible + */ + priority?: number; }; }): CancelablePromise<{ category: Category; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/servers/{serverId}/categories/{categoryId}", - path: { - serverId: serverId, - categoryId: categoryId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/servers/{serverId}/categories/{categoryId}", + path: { + serverId: serverId, + categoryId: categoryId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a category * @returns any Success @@ -123,15 +113,13 @@ export class CategoriesService { }): CancelablePromise<{ category: Category; }> { - return this.httpRequest.request( - { - method: "DELETE", - url: "/servers/{serverId}/categories/{categoryId}", - path: { - serverId: serverId, - categoryId: categoryId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/categories/{categoryId}", + path: { + serverId: serverId, + categoryId: categoryId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/ChannelsService.ts b/packages/api/lib/generated/router/services/ChannelsService.ts index 908e8551..29fd40a3 100644 --- a/packages/api/lib/generated/router/services/ChannelsService.ts +++ b/packages/api/lib/generated/router/services/ChannelsService.ts @@ -1,20 +1,15 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ServerChannel } from "../models/ServerChannel"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class ChannelsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a channel - * Only server channels are supported at this time (coming soonâ„¢: DM Channels!) + * Only server channels are supported at this time (coming soonâ„¢: DM Channels!). By default, a channel will be created with a null value for priority on a server. You can update its priority using [the channel update route](/docs/api/channels/ChannelUpdate) * @returns any Success * @throws ApiError */ @@ -30,31 +25,14 @@ export class ChannelsService { * The topic of the channel. Not applicable to threads */ topic?: string; - /** - * [DEPRECATED - use `visibility` instead] Whether the channel can be accessed from users who are not member of the server. Not applicable to threads - */ - isPublic?: boolean; /** * What users can access the channel. Only applicable to server channels. If not present, this channel will respect normal permissions. `public` is accessible to everyone, even those who aren't of the server. `private` is only accessible to explicitly mentioned users. Currently, threads cannot be `public` and other channels cannot be `private`. Additionally, `private` threads can only exist with an associated `messageId` that is for a private message */ - visibility?: - | "private" - | "public" - | null; + visibility?: "private" | "public" | null; /** * The type of channel. This will determine what routes to use for creating content in a channel. For example, if this "chat", then one must use the routes for creating channel messages. For threads, this **must** be "chat" for now */ - type: - | "announcements" - | "chat" - | "calendar" - | "forums" - | "media" - | "docs" - | "voice" - | "list" - | "scheduling" - | "stream"; + type: "announcements" | "chat" | "calendar" | "forums" | "media" | "docs" | "voice" | "list" | "scheduling" | "stream"; /** * The ID of the server. Optional if providing a `groupId`, `categoryId`, `parentId` or `messageId` */ @@ -79,16 +57,13 @@ export class ChannelsService { }): CancelablePromise<{ channel: ServerChannel; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels", - body: requestBody, - mediaType: "application/json", - }, - ); + return this.httpRequest.request({ + method: "POST", + url: "/channels", + body: requestBody, + mediaType: "application/json", + }); } - /** * Get a channel * Must be a member of the server to get the channel. Only server channels are supported at this time (coming soonâ„¢: DM Channels!) @@ -102,17 +77,14 @@ export class ChannelsService { }): CancelablePromise<{ channel: ServerChannel; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}", - path: { - channelId: channelId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}", + path: { + channelId: channelId, }, - ); + }); } - /** * Update a channel * Only server channels are supported at this time (coming soonâ„¢: DM Channels!) @@ -132,36 +104,29 @@ export class ChannelsService { /** * The topic of the channel. Not applicable to threads */ - topic?: - | string - | null; + topic?: string | null; /** - * [DEPRECATED - use `visibility` instead] Whether the channel can be accessed from users who are not member of the server. Not applicable to threads + * What users can access the channel. Only applicable to server channels. If not present, this channel will respect normal permissions. `public` is accessible to everyone, even those who aren't of the server. `private` is only accessible to explicitly mentioned users. Currently, threads cannot be `public` and other channels cannot be `private`. Additionally, `private` threads can only exist with an associated `messageId` that is for a private message. At this time, you cannot update the visibility on a channel to `private`; this must be set at creation */ - isPublic?: boolean; + visibility?: "public" | null; /** - * What users can access the channel. Only applicable to server channels. If not present, this channel will respect normal permissions. `public` is accessible to everyone, even those who aren't of the server. `private` is only accessible to explicitly mentioned users. Currently, threads cannot be `public` and other channels cannot be `private`. Additionally, `private` threads can only exist with an associated `messageId` that is for a private message. At this time, you cannot update the visibility on a channel to `private`; this must be set at creation + * The priority of the channel will determine its position relative to other categories in the group. The higher the value, the higher up it will be displayed in the UI. Returned values can be null, in which case sorting will be done by `createdAt` in ascending order. Due to legacy issues, sending a null value is not possible */ - visibility?: - | "public" - | null; + priority?: number; }; }): CancelablePromise<{ channel: ServerChannel; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}", + path: { + channelId: channelId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a channel * Only server channels are supported at this time (coming soonâ„¢: DM Channels!) @@ -173,17 +138,14 @@ export class ChannelsService { }: { channelId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}", - path: { - channelId: channelId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}", + path: { + channelId: channelId, }, - ); + }); } - /** * Archive a channel * @returns void @@ -194,17 +156,14 @@ export class ChannelsService { }: { channelId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/archive", - path: { - channelId: channelId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/archive", + path: { + channelId: channelId, }, - ); + }); } - /** * Restore an archived channel * @returns void @@ -215,14 +174,12 @@ export class ChannelsService { }: { channelId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/archive", - path: { - channelId: channelId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/archive", + path: { + channelId: channelId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/ChatService.ts b/packages/api/lib/generated/router/services/ChatService.ts index 9c69966f..dad817b3 100644 --- a/packages/api/lib/generated/router/services/ChatService.ts +++ b/packages/api/lib/generated/router/services/ChatService.ts @@ -1,19 +1,14 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ChatEmbed } from "../models/ChatEmbed"; import type { ChatMessage } from "../models/ChatMessage"; import type { Mentions } from "../models/Mentions"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class ChatService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a channel message * @returns any Success @@ -44,6 +39,10 @@ export class ChatService { * The content of the message */ content?: string; + /** + * Links in `content` to prevent unfurling as a link preview when displaying in Guilded + */ + hiddenLinkPreviewUrls?: Array; /** * At this time, only one embed is supported per message, and attachments are not supported. If you need to send more than one embed or upload attachments, consider creating the message via a webhook. */ @@ -52,19 +51,16 @@ export class ChatService { }): CancelablePromise<{ message: ChatMessage; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/messages", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/messages", + path: { + channelId: channelId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get channel messages * Results returned will be ordered ascending by the message's `createdAt`. `before` and `after` will filter based on the message's `createdAt` @@ -95,23 +91,20 @@ export class ChatService { }): CancelablePromise<{ messages: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/messages", - path: { - channelId: channelId, - }, - query: { - before: before, - after: after, - limit: limit, - includePrivate: includePrivate, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/messages", + path: { + channelId: channelId, }, - ); + query: { + before: before, + after: after, + limit: limit, + includePrivate: includePrivate, + }, + }); } - /** * Get a channel message * Get details for a specific chat message from a chat channel. @@ -130,18 +123,15 @@ export class ChatService { }): CancelablePromise<{ message: ChatMessage; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/messages/{messageId}", - path: { - channelId: channelId, - messageId: messageId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/messages/{messageId}", + path: { + channelId: channelId, + messageId: messageId, }, - ); + }); } - /** * Update a channel message * @returns any Success @@ -161,12 +151,11 @@ export class ChatService { /** * The content of the message */ - content?: - | Record< - string, - any - > - | string; + content?: Record | string; + /** + * Links in `content` to prevent unfurling as a link preview when displaying in Guilded + */ + hiddenLinkPreviewUrls?: Array; /** * At this time, only one embed is supported per message, and attachments are not supported. If you need to send more than one embed or upload attachments, consider creating the message via a webhook. */ @@ -181,9 +170,7 @@ export class ChatService { /** * The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. */ - type?: - | "default" - | "system"; + type?: "default" | "system"; /** * The ID of the server */ @@ -200,6 +187,10 @@ export class ChatService { * The content of the message */ content?: string; + /** + * Links in `content` to prevent unfurling as a link preview when displaying in Guilded + */ + hiddenLinkPreviewUrls?: Array; embeds?: Array; /** * Message IDs that were replied to @@ -233,20 +224,17 @@ export class ChatService { updatedAt: string; }; }> { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/messages/{messageId}", - path: { - channelId: channelId, - messageId: messageId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/messages/{messageId}", + path: { + channelId: channelId, + messageId: messageId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a channel message * @returns void @@ -259,18 +247,15 @@ export class ChatService { channelId: string; messageId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/messages/{messageId}", - path: { - channelId: channelId, - messageId: messageId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/messages/{messageId}", + path: { + channelId: channelId, + messageId: messageId, }, - ); + }); } - /** * Pin a message * @returns void @@ -283,18 +268,15 @@ export class ChatService { channelId: string; messageId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/messages/{messageId}/pin", - path: { - channelId: channelId, - messageId: messageId, - }, + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/messages/{messageId}/pin", + path: { + channelId: channelId, + messageId: messageId, }, - ); + }); } - /** * Unpin a message * @returns void @@ -307,15 +289,13 @@ export class ChatService { channelId: string; messageId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/messages/{messageId}/pin", - path: { - channelId: channelId, - messageId: messageId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/messages/{messageId}/pin", + path: { + channelId: channelId, + messageId: messageId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/DocCommentsService.ts b/packages/api/lib/generated/router/services/DocCommentsService.ts index 762e770e..82a7c682 100644 --- a/packages/api/lib/generated/router/services/DocCommentsService.ts +++ b/packages/api/lib/generated/router/services/DocCommentsService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { DocComment } from "../models/DocComment"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class DocCommentsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a comment on a doc * @returns any Success @@ -33,20 +28,17 @@ export class DocCommentsService { }): CancelablePromise<{ docComment: DocComment; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/docs/{docId}/comments", - path: { - channelId: channelId, - docId: docId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/docs/{docId}/comments", + path: { + channelId: channelId, + docId: docId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get a doc's comments * @returns any Success @@ -61,18 +53,15 @@ export class DocCommentsService { }): CancelablePromise<{ docComments: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/docs/{docId}/comments", - path: { - channelId: channelId, - docId: docId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/docs/{docId}/comments", + path: { + channelId: channelId, + docId: docId, }, - ); + }); } - /** * Get a comment on a doc * @returns any Success @@ -89,19 +78,16 @@ export class DocCommentsService { }): CancelablePromise<{ docComment: DocComment; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}", - path: { - channelId: channelId, - docId: docId, - docCommentId: docCommentId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}", + path: { + channelId: channelId, + docId: docId, + docCommentId: docCommentId, }, - ); + }); } - /** * Update a doc comment * @returns any Success @@ -125,21 +111,18 @@ export class DocCommentsService { }): CancelablePromise<{ docComment: DocComment; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}", - path: { - channelId: channelId, - docId: docId, - docCommentId: docCommentId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}", + path: { + channelId: channelId, + docId: docId, + docCommentId: docCommentId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a doc comment * @returns void @@ -154,16 +137,14 @@ export class DocCommentsService { docId: number; docCommentId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}", - path: { - channelId: channelId, - docId: docId, - docCommentId: docCommentId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}", + path: { + channelId: channelId, + docId: docId, + docCommentId: docCommentId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/DocsService.ts b/packages/api/lib/generated/router/services/DocsService.ts index 9fb3749b..eed38194 100644 --- a/packages/api/lib/generated/router/services/DocsService.ts +++ b/packages/api/lib/generated/router/services/DocsService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Doc } from "../models/Doc"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class DocsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a doc * @returns any Success @@ -30,29 +25,21 @@ export class DocsService { /** * The content of the doc */ - content: - | Record< - string, - any - > - | string; + content: Record | string; }; }): CancelablePromise<{ doc: Doc; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/docs", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/docs", + path: { + channelId: channelId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get docs * Results returned will be ordered descending by the doc's `updatedAt`. `before` will filter based on the doc's `updatedAt` @@ -70,21 +57,18 @@ export class DocsService { }): CancelablePromise<{ docs: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/docs", - path: { - channelId: channelId, - }, - query: { - before: before, - limit: limit, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/docs", + path: { + channelId: channelId, + }, + query: { + before: before, + limit: limit, }, - ); + }); } - /** * Get a doc * @returns any Success @@ -99,18 +83,15 @@ export class DocsService { }): CancelablePromise<{ doc: Doc; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/docs/{docId}", - path: { - channelId: channelId, - docId: docId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/docs/{docId}", + path: { + channelId: channelId, + docId: docId, }, - ); + }); } - /** * Update a doc * @returns any Success @@ -136,20 +117,17 @@ export class DocsService { }): CancelablePromise<{ doc: Doc; }> { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/docs/{docId}", - path: { - channelId: channelId, - docId: docId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/docs/{docId}", + path: { + channelId: channelId, + docId: docId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a doc * @returns void @@ -162,15 +140,13 @@ export class DocsService { channelId: string; docId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/docs/{docId}", - path: { - channelId: channelId, - docId: docId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/docs/{docId}", + path: { + channelId: channelId, + docId: docId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/ForumCommentsService.ts b/packages/api/lib/generated/router/services/ForumCommentsService.ts index 5c5c5eb7..7e7baab4 100644 --- a/packages/api/lib/generated/router/services/ForumCommentsService.ts +++ b/packages/api/lib/generated/router/services/ForumCommentsService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ForumTopicComment } from "../models/ForumTopicComment"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class ForumCommentsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a forum topic comment * @returns any Success @@ -33,20 +28,17 @@ export class ForumCommentsService { }): CancelablePromise<{ forumTopicComment: ForumTopicComment; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/topics/{forumTopicId}/comments", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/topics/{forumTopicId}/comments", + path: { + channelId: channelId, + forumTopicId: forumTopicId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get a forum topic's comments * @returns any Success @@ -61,18 +53,15 @@ export class ForumCommentsService { }): CancelablePromise<{ forumTopicComments: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/topics/{forumTopicId}/comments", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/topics/{forumTopicId}/comments", + path: { + channelId: channelId, + forumTopicId: forumTopicId, }, - ); + }); } - /** * Get a comment on a forum topic * @returns any Success @@ -89,19 +78,16 @@ export class ForumCommentsService { }): CancelablePromise<{ forumTopicComment: ForumTopicComment; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - forumTopicCommentId: forumTopicCommentId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + forumTopicCommentId: forumTopicCommentId, }, - ); + }); } - /** * Update a forum topic comment * @returns any Success @@ -125,21 +111,18 @@ export class ForumCommentsService { }): CancelablePromise<{ forumTopicComment: ForumTopicComment; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - forumTopicCommentId: forumTopicCommentId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + forumTopicCommentId: forumTopicCommentId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a forum topic comment * @returns void @@ -154,16 +137,14 @@ export class ForumCommentsService { forumTopicId: number; forumTopicCommentId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - forumTopicCommentId: forumTopicCommentId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + forumTopicCommentId: forumTopicCommentId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/ForumsService.ts b/packages/api/lib/generated/router/services/ForumsService.ts index 69d4b092..63c3836f 100644 --- a/packages/api/lib/generated/router/services/ForumsService.ts +++ b/packages/api/lib/generated/router/services/ForumsService.ts @@ -1,18 +1,13 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ForumTopic } from "../models/ForumTopic"; import type { ForumTopicSummary } from "../models/ForumTopicSummary"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class ForumsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a topic in a forum * @returns any Success @@ -31,29 +26,21 @@ export class ForumsService { /** * The content of the forum topic */ - content: - | Record< - string, - any - > - | string; + content: Record | string; }; }): CancelablePromise<{ forumTopic: ForumTopic; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/topics", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/topics", + path: { + channelId: channelId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get forum topics * @returns any Success @@ -70,21 +57,18 @@ export class ForumsService { }): CancelablePromise<{ forumTopics: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/topics", - path: { - channelId: channelId, - }, - query: { - before: before, - limit: limit, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/topics", + path: { + channelId: channelId, + }, + query: { + before: before, + limit: limit, }, - ); + }); } - /** * Get a forum topic * @returns any Success @@ -99,18 +83,15 @@ export class ForumsService { }): CancelablePromise<{ forumTopic: ForumTopic; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/topics/{forumTopicId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/topics/{forumTopicId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, }, - ); + }); } - /** * Update a forum topic * @returns any Success @@ -136,20 +117,17 @@ export class ForumsService { }): CancelablePromise<{ forumTopic: ForumTopic; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}/topics/{forumTopicId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}/topics/{forumTopicId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a forum topic * @returns void @@ -162,18 +140,15 @@ export class ForumsService { channelId: string; forumTopicId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/topics/{forumTopicId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, }, - ); + }); } - /** * Pin a forum topic * @returns void @@ -186,18 +161,15 @@ export class ForumsService { channelId: string; forumTopicId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/topics/{forumTopicId}/pin", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/topics/{forumTopicId}/pin", + path: { + channelId: channelId, + forumTopicId: forumTopicId, }, - ); + }); } - /** * Unpin a forum topic * @returns void @@ -210,18 +182,15 @@ export class ForumsService { channelId: string; forumTopicId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}/pin", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/topics/{forumTopicId}/pin", + path: { + channelId: channelId, + forumTopicId: forumTopicId, }, - ); + }); } - /** * Lock a forum topic * @returns void @@ -234,18 +203,15 @@ export class ForumsService { channelId: string; forumTopicId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/topics/{forumTopicId}/lock", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/topics/{forumTopicId}/lock", + path: { + channelId: channelId, + forumTopicId: forumTopicId, }, - ); + }); } - /** * Unlock a forum topic * @returns void @@ -258,15 +224,13 @@ export class ForumsService { channelId: string; forumTopicId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}/lock", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/topics/{forumTopicId}/lock", + path: { + channelId: channelId, + forumTopicId: forumTopicId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/GroupMembershipService.ts b/packages/api/lib/generated/router/services/GroupMembershipService.ts index bfd86861..b3a5a850 100644 --- a/packages/api/lib/generated/router/services/GroupMembershipService.ts +++ b/packages/api/lib/generated/router/services/GroupMembershipService.ts @@ -1,15 +1,11 @@ import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; - export class GroupMembershipService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Add member to group * @returns void @@ -26,22 +22,17 @@ export class GroupMembershipService { /** * Member ID to add to the group */ - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/groups/{groupId}/members/{userId}", - path: { - groupId: groupId, - userId: userId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/groups/{groupId}/members/{userId}", + path: { + groupId: groupId, + userId: userId, }, - ); + }); } - /** * Remove member from group * @returns void @@ -58,19 +49,15 @@ export class GroupMembershipService { /** * Member ID to remove from the group */ - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/groups/{groupId}/members/{userId}", - path: { - groupId: groupId, - userId: userId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/groups/{groupId}/members/{userId}", + path: { + groupId: groupId, + userId: userId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/GroupsService.ts b/packages/api/lib/generated/router/services/GroupsService.ts index bda03b9a..62bf503b 100644 --- a/packages/api/lib/generated/router/services/GroupsService.ts +++ b/packages/api/lib/generated/router/services/GroupsService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Group } from "../models/Group"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class GroupsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a group * Note: only 100 unarchived groups can exist on a server at any time @@ -44,19 +39,16 @@ export class GroupsService { }): CancelablePromise<{ group: Group; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/servers/{serverId}/groups", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/groups", + path: { + serverId: serverId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get groups * @returns any Success @@ -69,17 +61,14 @@ export class GroupsService { }): CancelablePromise<{ groups: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/groups", - path: { - serverId: serverId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/groups", + path: { + serverId: serverId, }, - ); + }); } - /** * Get a group * @returns any Success @@ -94,18 +83,15 @@ export class GroupsService { }): CancelablePromise<{ group: Group; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/groups/{groupId}", - path: { - serverId: serverId, - groupId: groupId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/groups/{groupId}", + path: { + serverId: serverId, + groupId: groupId, }, - ); + }); } - /** * Update a group * @returns any Success @@ -141,20 +127,17 @@ export class GroupsService { }): CancelablePromise<{ group: Group; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/servers/{serverId}/groups/{groupId}", - path: { - serverId: serverId, - groupId: groupId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/servers/{serverId}/groups/{groupId}", + path: { + serverId: serverId, + groupId: groupId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a group * Note: you cannot delete the home group @@ -168,15 +151,13 @@ export class GroupsService { serverId: string; groupId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/servers/{serverId}/groups/{groupId}", - path: { - serverId: serverId, - groupId: groupId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/groups/{groupId}", + path: { + serverId: serverId, + groupId: groupId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/ListItemsService.ts b/packages/api/lib/generated/router/services/ListItemsService.ts index 5975b092..b4565234 100644 --- a/packages/api/lib/generated/router/services/ListItemsService.ts +++ b/packages/api/lib/generated/router/services/ListItemsService.ts @@ -1,18 +1,13 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ListItem } from "../models/ListItem"; import type { ListItemSummary } from "../models/ListItemSummary"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class ListItemsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a list item * @returns any Success @@ -27,40 +22,27 @@ export class ListItemsService { /** * The message of the list item */ - message: - | Record< - string, - any - > - | string; + message: Record | string; note?: { /** * The note of the list item */ - content: - | Record< - string, - any - > - | string; + content: Record | string; }; }; }): CancelablePromise<{ listItem: ListItem; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/items", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/items", + path: { + channelId: channelId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get list items within a channel * @returns any Success @@ -73,17 +55,14 @@ export class ListItemsService { }): CancelablePromise<{ listItems: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/items", - path: { - channelId: channelId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/items", + path: { + channelId: channelId, }, - ); + }); } - /** * Get a list item * @returns any Success @@ -98,18 +77,15 @@ export class ListItemsService { }): CancelablePromise<{ listItem: ListItem; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/channels/{channelId}/items/{listItemId}", - path: { - channelId: channelId, - listItemId: listItemId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/channels/{channelId}/items/{listItemId}", + path: { + channelId: channelId, + listItemId: listItemId, }, - ); + }); } - /** * Update a list item * @returns any Success @@ -137,20 +113,17 @@ export class ListItemsService { }): CancelablePromise<{ listItem: ListItem; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/channels/{channelId}/items/{listItemId}", - path: { - channelId: channelId, - listItemId: listItemId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/channels/{channelId}/items/{listItemId}", + path: { + channelId: channelId, + listItemId: listItemId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a list item * @returns void @@ -163,18 +136,15 @@ export class ListItemsService { channelId: string; listItemId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/items/{listItemId}", - path: { - channelId: channelId, - listItemId: listItemId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/items/{listItemId}", + path: { + channelId: channelId, + listItemId: listItemId, }, - ); + }); } - /** * Complete a list item * @returns void @@ -187,18 +157,15 @@ export class ListItemsService { channelId: string; listItemId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "POST", - url: "/channels/{channelId}/items/{listItemId}/complete", - path: { - channelId: channelId, - listItemId: listItemId, - }, + return this.httpRequest.request({ + method: "POST", + url: "/channels/{channelId}/items/{listItemId}/complete", + path: { + channelId: channelId, + listItemId: listItemId, }, - ); + }); } - /** * Uncomplete a list item * @returns void @@ -211,15 +178,13 @@ export class ListItemsService { channelId: string; listItemId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/items/{listItemId}/complete", - path: { - channelId: channelId, - listItemId: listItemId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/items/{listItemId}/complete", + path: { + channelId: channelId, + listItemId: listItemId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/MemberBansService.ts b/packages/api/lib/generated/router/services/MemberBansService.ts index f0d24702..d5ba6420 100644 --- a/packages/api/lib/generated/router/services/MemberBansService.ts +++ b/packages/api/lib/generated/router/services/MemberBansService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ServerMemberBan } from "../models/ServerMemberBan"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class MemberBansService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a server ban * Also known as banning a server member @@ -27,9 +22,7 @@ export class MemberBansService { /** * The ID of the user to ban from this server */ - userId: - | string - | "@me"; + userId: string | "@me"; requestBody?: { /** * The reason for the ban @@ -39,20 +32,17 @@ export class MemberBansService { }): CancelablePromise<{ serverMemberBan: ServerMemberBan; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/servers/{serverId}/bans/{userId}", - path: { - serverId: serverId, - userId: userId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/bans/{userId}", + path: { + serverId: serverId, + userId: userId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get a server ban * @returns any Success @@ -66,24 +56,19 @@ export class MemberBansService { /** * The ID of the user to get a server ban for */ - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise<{ serverMemberBan: ServerMemberBan; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/bans/{userId}", - path: { - serverId: serverId, - userId: userId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/bans/{userId}", + path: { + serverId: serverId, + userId: userId, }, - ); + }); } - /** * Delete a server ban * Also known as unbanning a server member @@ -98,22 +83,17 @@ export class MemberBansService { /** * The ID of the user to unban from this server */ - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/servers/{serverId}/bans/{userId}", - path: { - serverId: serverId, - userId: userId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/bans/{userId}", + path: { + serverId: serverId, + userId: userId, }, - ); + }); } - /** * Get server bans * @returns any Success @@ -126,14 +106,12 @@ export class MemberBansService { }): CancelablePromise<{ serverMemberBans: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/bans", - path: { - serverId: serverId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/bans", + path: { + serverId: serverId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/MembersService.ts b/packages/api/lib/generated/router/services/MembersService.ts index e301d43c..f47b86d2 100644 --- a/packages/api/lib/generated/router/services/MembersService.ts +++ b/packages/api/lib/generated/router/services/MembersService.ts @@ -1,18 +1,13 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ServerMember } from "../models/ServerMember"; import type { ServerMemberSummary } from "../models/ServerMemberSummary"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class MembersService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Update a member's nickname * @returns any Success @@ -27,9 +22,7 @@ export class MembersService { /** * The ID of the user to update nickname for */ - userId: - | string - | "@me"; + userId: string | "@me"; requestBody: { /** * The nickname to assign to the member @@ -42,20 +35,17 @@ export class MembersService { */ nickname: string; }> { - return this.httpRequest.request( - { - method: "PUT", - url: "/servers/{serverId}/members/{userId}/nickname", - path: { - serverId: serverId, - userId: userId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PUT", + url: "/servers/{serverId}/members/{userId}/nickname", + path: { + serverId: serverId, + userId: userId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a member's nickname * @returns void @@ -69,22 +59,17 @@ export class MembersService { /** * The ID of the user to remove nickname from */ - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/servers/{serverId}/members/{userId}/nickname", - path: { - serverId: serverId, - userId: userId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/members/{userId}/nickname", + path: { + serverId: serverId, + userId: userId, }, - ); + }); } - /** * Get a server member * @returns any Success @@ -95,24 +80,19 @@ export class MembersService { userId, }: { serverId: string; - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise<{ member: ServerMember; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/members/{userId}", - path: { - serverId: serverId, - userId: userId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/members/{userId}", + path: { + serverId: serverId, + userId: userId, }, - ); + }); } - /** * Kick a server member * This route can be used to leave servers by passing in your own user ID or `@me` for `userId` @@ -130,22 +110,17 @@ export class MembersService { /** * The ID of the user to kick. If the value provided here is your own user's ID, the request will attempt to make you leave the server */ - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/servers/{serverId}/members/{userId}", - path: { - serverId: serverId, - userId: userId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/members/{userId}", + path: { + serverId: serverId, + userId: userId, }, - ); + }); } - /** * Get members of a server * Results returned will be ordered ascending by the member's `joinedAt` @@ -159,14 +134,12 @@ export class MembersService { }): CancelablePromise<{ members: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/members", - path: { - serverId: serverId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/members", + path: { + serverId: serverId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/PermissionOverrideService.ts b/packages/api/lib/generated/router/services/PermissionOverrideService.ts new file mode 100644 index 00000000..1d29bcf1 --- /dev/null +++ b/packages/api/lib/generated/router/services/PermissionOverrideService.ts @@ -0,0 +1,585 @@ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { ChannelCategoryRolePermission } from "../models/ChannelCategoryRolePermission"; +import type { ChannelCategoryUserPermission } from "../models/ChannelCategoryUserPermission"; +import type { ChannelRolePermission } from "../models/ChannelRolePermission"; +import type { ChannelUserPermission } from "../models/ChannelUserPermission"; +export class PermissionOverrideService { + constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Create a channel role permission + * @returns any Success + * @throws ApiError + */ + public channelRolePermissionCreate({ + serverId, + channelId, + roleId, + requestBody, + }: { + serverId: string; + channelId: string; + roleId: number; + requestBody: { + /** + * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true`, `false` or null values. Permission list can only contain relevant permissions for the channel type + */ + permissions: Record; + }; + }): CancelablePromise<{ + channelRolePermission: ChannelRolePermission; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/channels/{channelId}/permissions/roles/{roleId}", + path: { + serverId: serverId, + channelId: channelId, + roleId: roleId, + }, + body: requestBody, + mediaType: "application/json", + }); + } + /** + * Read a channel role permission + * @returns any Success + * @throws ApiError + */ + public channelRolePermissionRead({ + serverId, + channelId, + roleId, + }: { + serverId: string; + channelId: string; + roleId: number; + }): CancelablePromise<{ + channelRolePermission: ChannelRolePermission; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/channels/{channelId}/permissions/roles/{roleId}", + path: { + serverId: serverId, + channelId: channelId, + roleId: roleId, + }, + }); + } + /** + * Update a channel role permission + * @returns any Success + * @throws ApiError + */ + public channelRolePermissionUpdate({ + serverId, + channelId, + roleId, + requestBody, + }: { + serverId: string; + channelId: string; + roleId: number; + requestBody: { + /** + * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true`, `false` or null values. Permission list can only contain relevant permissions for the channel type + */ + permissions: Record; + }; + }): CancelablePromise<{ + channelRolePermission: ChannelRolePermission; + }> { + return this.httpRequest.request({ + method: "PATCH", + url: "/servers/{serverId}/channels/{channelId}/permissions/roles/{roleId}", + path: { + serverId: serverId, + channelId: channelId, + roleId: roleId, + }, + body: requestBody, + mediaType: "application/json", + }); + } + /** + * Delete a channel role permission + * @returns void + * @throws ApiError + */ + public channelRolePermissionDelete({ + serverId, + channelId, + roleId, + }: { + serverId: string; + channelId: string; + roleId: number; + }): CancelablePromise { + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/channels/{channelId}/permissions/roles/{roleId}", + path: { + serverId: serverId, + channelId: channelId, + roleId: roleId, + }, + }); + } + /** + * ReadMany a channel role permission + * @returns any Success + * @throws ApiError + */ + public channelRolePermissionReadMany({ + serverId, + channelId, + }: { + serverId: string; + channelId: string; + }): CancelablePromise<{ + channelRolePermissions: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/channels/{channelId}/permissions/roles", + path: { + serverId: serverId, + channelId: channelId, + }, + }); + } + /** + * Create a channel user permission + * @returns any Success + * @throws ApiError + */ + public channelUserPermissionCreate({ + serverId, + channelId, + userId, + requestBody, + }: { + serverId: string; + channelId: string; + userId: string | "@me"; + requestBody: { + /** + * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true`, `false` or null values. Permission list can only contain relevant permissions for the channel type + */ + permissions: Record; + }; + }): CancelablePromise<{ + channelUserPermission: ChannelUserPermission; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/channels/{channelId}/permissions/users/{userId}", + path: { + serverId: serverId, + channelId: channelId, + userId: userId, + }, + body: requestBody, + mediaType: "application/json", + }); + } + /** + * Read a channel user permission + * @returns any Success + * @throws ApiError + */ + public channelUserPermissionRead({ + serverId, + channelId, + userId, + }: { + serverId: string; + channelId: string; + userId: string | "@me"; + }): CancelablePromise<{ + channelUserPermission: ChannelUserPermission; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/channels/{channelId}/permissions/users/{userId}", + path: { + serverId: serverId, + channelId: channelId, + userId: userId, + }, + }); + } + /** + * Update a channel user permission + * @returns any Success + * @throws ApiError + */ + public channelUserPermissionUpdate({ + serverId, + channelId, + userId, + requestBody, + }: { + serverId: string; + channelId: string; + userId: string | "@me"; + requestBody: { + /** + * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true`, `false` or null values. Permission list can only contain relevant permissions for the channel type + */ + permissions: Record; + }; + }): CancelablePromise<{ + channelUserPermission: ChannelUserPermission; + }> { + return this.httpRequest.request({ + method: "PATCH", + url: "/servers/{serverId}/channels/{channelId}/permissions/users/{userId}", + path: { + serverId: serverId, + channelId: channelId, + userId: userId, + }, + body: requestBody, + mediaType: "application/json", + }); + } + /** + * Delete a channel user permission + * @returns void + * @throws ApiError + */ + public channelUserPermissionDelete({ + serverId, + channelId, + userId, + }: { + serverId: string; + channelId: string; + userId: string | "@me"; + }): CancelablePromise { + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/channels/{channelId}/permissions/users/{userId}", + path: { + serverId: serverId, + channelId: channelId, + userId: userId, + }, + }); + } + /** + * Read a channel user permission + * @returns any Success + * @throws ApiError + */ + public channelUserPermissionReadMany({ + serverId, + channelId, + }: { + serverId: string; + channelId: string; + }): CancelablePromise<{ + channelUserPermissions: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/channels/{channelId}/permissions/users", + path: { + serverId: serverId, + channelId: channelId, + }, + }); + } + /** + * Create a channel category user permission + * @returns any Success + * @throws ApiError + */ + public channelCategoryUserPermissionCreate({ + serverId, + categoryId, + userId, + requestBody, + }: { + serverId: string; + categoryId: number; + userId: string | "@me"; + requestBody: { + /** + * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true`, `false` or null values. Permission list can only contain relevant permissions for the channel type + */ + permissions: Record; + }; + }): CancelablePromise<{ + channelCategoryUserPermission: ChannelCategoryUserPermission; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/categories/{categoryId}/permissions/users/{userId}", + path: { + serverId: serverId, + categoryId: categoryId, + userId: userId, + }, + body: requestBody, + mediaType: "application/json", + }); + } + /** + * Read a channel category user permission + * @returns any Success + * @throws ApiError + */ + public channelCategoryUserPermissionRead({ + serverId, + categoryId, + userId, + }: { + serverId: string; + categoryId: number; + userId: string | "@me"; + }): CancelablePromise<{ + channelCategoryUserPermission: ChannelCategoryUserPermission; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/categories/{categoryId}/permissions/users/{userId}", + path: { + serverId: serverId, + categoryId: categoryId, + userId: userId, + }, + }); + } + /** + * Update a channel category user permission + * @returns any Success + * @throws ApiError + */ + public channelCategoryUserPermissionUpdate({ + serverId, + categoryId, + userId, + requestBody, + }: { + serverId: string; + categoryId: number; + userId: string | "@me"; + requestBody: { + /** + * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true`, `false` or null values. Permission list can only contain relevant permissions for the channel type + */ + permissions: Record; + }; + }): CancelablePromise<{ + channelCategoryUserPermission: ChannelCategoryUserPermission; + }> { + return this.httpRequest.request({ + method: "PATCH", + url: "/servers/{serverId}/categories/{categoryId}/permissions/users/{userId}", + path: { + serverId: serverId, + categoryId: categoryId, + userId: userId, + }, + body: requestBody, + mediaType: "application/json", + }); + } + /** + * Delete a channel category user permission + * @returns void + * @throws ApiError + */ + public channelCategoryUserPermissionDelete({ + serverId, + categoryId, + userId, + }: { + serverId: string; + categoryId: number; + userId: string | "@me"; + }): CancelablePromise { + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/categories/{categoryId}/permissions/users/{userId}", + path: { + serverId: serverId, + categoryId: categoryId, + userId: userId, + }, + }); + } + /** + * Get a list of the channel category user permissions + * @returns any Success + * @throws ApiError + */ + public channelCategoryUserPermissionReadMany({ + serverId, + categoryId, + }: { + serverId: string; + categoryId: number; + }): CancelablePromise<{ + channelCategoryUserPermissions: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/categories/{categoryId}/permissions/users", + path: { + serverId: serverId, + categoryId: categoryId, + }, + }); + } + /** + * Create a channel category role permission + * @returns any Success + * @throws ApiError + */ + public channelCategoryRolePermissionCreate({ + serverId, + categoryId, + roleId, + requestBody, + }: { + serverId: string; + categoryId: number; + roleId: number; + requestBody: { + /** + * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true`, `false` or null values. Permission list can only contain relevant permissions for the channel type + */ + permissions: Record; + }; + }): CancelablePromise<{ + channelCategoryRolePermission: ChannelCategoryRolePermission; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/categories/{categoryId}/permissions/roles/{roleId}", + path: { + serverId: serverId, + categoryId: categoryId, + roleId: roleId, + }, + body: requestBody, + mediaType: "application/json", + }); + } + /** + * Read a channel category role permission + * @returns any Success + * @throws ApiError + */ + public channelCategoryRolePermissionRead({ + serverId, + categoryId, + roleId, + }: { + serverId: string; + categoryId: number; + roleId: number; + }): CancelablePromise<{ + channelCategoryRolePermission: ChannelCategoryRolePermission; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/categories/{categoryId}/permissions/roles/{roleId}", + path: { + serverId: serverId, + categoryId: categoryId, + roleId: roleId, + }, + }); + } + /** + * Update a channel category role permission + * @returns any Success + * @throws ApiError + */ + public channelCategoryRolePermissionUpdate({ + serverId, + categoryId, + roleId, + requestBody, + }: { + serverId: string; + categoryId: number; + roleId: number; + requestBody: { + /** + * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true`, `false` or null values. Permission list can only contain relevant permissions for the channel type + */ + permissions: Record; + }; + }): CancelablePromise<{ + channelCategoryRolePermission: ChannelCategoryRolePermission; + }> { + return this.httpRequest.request({ + method: "PATCH", + url: "/servers/{serverId}/categories/{categoryId}/permissions/roles/{roleId}", + path: { + serverId: serverId, + categoryId: categoryId, + roleId: roleId, + }, + body: requestBody, + mediaType: "application/json", + }); + } + /** + * Delete a channel category role permission + * @returns void + * @throws ApiError + */ + public channelCategoryRolePermissionDelete({ + serverId, + categoryId, + roleId, + }: { + serverId: string; + categoryId: number; + roleId: number; + }): CancelablePromise { + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/categories/{categoryId}/permissions/roles/{roleId}", + path: { + serverId: serverId, + categoryId: categoryId, + roleId: roleId, + }, + }); + } + /** + * Get a list of the channel category role permissions + * @returns any Success + * @throws ApiError + */ + public channelCategoryRolePermissionReadMany({ + serverId, + categoryId, + }: { + serverId: string; + categoryId: number; + }): CancelablePromise<{ + channelCategoryRolePermissions: Array; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/categories/{categoryId}/permissions/roles", + path: { + serverId: serverId, + categoryId: categoryId, + }, + }); + } +} diff --git a/packages/api/lib/generated/router/services/ReactionsService.ts b/packages/api/lib/generated/router/services/ReactionsService.ts index 96af8afc..adc31472 100644 --- a/packages/api/lib/generated/router/services/ReactionsService.ts +++ b/packages/api/lib/generated/router/services/ReactionsService.ts @@ -1,15 +1,11 @@ import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; - export class ReactionsService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create forum topic reaction * @returns void @@ -33,19 +29,16 @@ export class ReactionsService { */ emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/topics/{forumTopicId}/emotes/{emoteId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/topics/{forumTopicId}/emotes/{emoteId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + emoteId: emoteId, }, - ); + }); } - /** * Delete forum topic reaction * @returns void @@ -69,19 +62,16 @@ export class ReactionsService { */ emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}/emotes/{emoteId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/topics/{forumTopicId}/emotes/{emoteId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + emoteId: emoteId, }, - ); + }); } - /** * Create forum topic comment reaction * @returns void @@ -101,20 +91,17 @@ export class ReactionsService { forumTopicCommentId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}/emotes/{emoteId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - forumTopicCommentId: forumTopicCommentId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}/emotes/{emoteId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + forumTopicCommentId: forumTopicCommentId, + emoteId: emoteId, }, - ); + }); } - /** * Delete forum topic comment reaction * @returns void @@ -134,20 +121,17 @@ export class ReactionsService { forumTopicCommentId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}/emotes/{emoteId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - forumTopicCommentId: forumTopicCommentId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}/emotes/{emoteId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + forumTopicCommentId: forumTopicCommentId, + emoteId: emoteId, }, - ); + }); } - /** * Create calendar event reaction * @returns void @@ -162,19 +146,16 @@ export class ReactionsService { calendarEventId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/events/{calendarEventId}/emotes/{emoteId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/events/{calendarEventId}/emotes/{emoteId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + emoteId: emoteId, }, - ); + }); } - /** * Delete calendar event reaction * @returns void @@ -189,19 +170,16 @@ export class ReactionsService { calendarEventId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/events/{calendarEventId}/emotes/{emoteId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/events/{calendarEventId}/emotes/{emoteId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + emoteId: emoteId, }, - ); + }); } - /** * Create calendar event comment reaction * @returns void @@ -218,20 +196,17 @@ export class ReactionsService { calendarEventCommentId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}/emotes/{emoteId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - calendarEventCommentId: calendarEventCommentId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}/emotes/{emoteId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + calendarEventCommentId: calendarEventCommentId, + emoteId: emoteId, }, - ); + }); } - /** * Delete calendar event comment reaction * @returns void @@ -248,20 +223,17 @@ export class ReactionsService { calendarEventCommentId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}/emotes/{emoteId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - calendarEventCommentId: calendarEventCommentId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}/emotes/{emoteId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + calendarEventCommentId: calendarEventCommentId, + emoteId: emoteId, }, - ); + }); } - /** * Create doc reaction * @returns void @@ -276,19 +248,16 @@ export class ReactionsService { docId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/docs/{docId}/emotes/{emoteId}", - path: { - channelId: channelId, - docId: docId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/docs/{docId}/emotes/{emoteId}", + path: { + channelId: channelId, + docId: docId, + emoteId: emoteId, }, - ); + }); } - /** * Delete doc reaction * @returns void @@ -303,19 +272,16 @@ export class ReactionsService { docId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/docs/{docId}/emotes/{emoteId}", - path: { - channelId: channelId, - docId: docId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/docs/{docId}/emotes/{emoteId}", + path: { + channelId: channelId, + docId: docId, + emoteId: emoteId, }, - ); + }); } - /** * Create doc comment reaction * @returns void @@ -332,20 +298,17 @@ export class ReactionsService { docCommentId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}/emotes/{emoteId}", - path: { - channelId: channelId, - docId: docId, - docCommentId: docCommentId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}/emotes/{emoteId}", + path: { + channelId: channelId, + docId: docId, + docCommentId: docCommentId, + emoteId: emoteId, }, - ); + }); } - /** * Delete doc comment reaction * @returns void @@ -362,20 +325,17 @@ export class ReactionsService { docCommentId: number; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}/emotes/{emoteId}", - path: { - channelId: channelId, - docId: docId, - docCommentId: docCommentId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}/emotes/{emoteId}", + path: { + channelId: channelId, + docId: docId, + docCommentId: docCommentId, + emoteId: emoteId, }, - ); + }); } - /** * Create announcement reaction * @returns void @@ -393,19 +353,16 @@ export class ReactionsService { */ emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/announcements/{announcementId}/emotes/{emoteId}", - path: { - channelId: channelId, - announcementId: announcementId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/announcements/{announcementId}/emotes/{emoteId}", + path: { + channelId: channelId, + announcementId: announcementId, + emoteId: emoteId, }, - ); + }); } - /** * Delete announcement reaction * @returns void @@ -423,19 +380,16 @@ export class ReactionsService { */ emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/announcements/{announcementId}/emotes/{emoteId}", - path: { - channelId: channelId, - announcementId: announcementId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/announcements/{announcementId}/emotes/{emoteId}", + path: { + channelId: channelId, + announcementId: announcementId, + emoteId: emoteId, }, - ); + }); } - /** * Create an announcement comment reaction * @returns void @@ -458,20 +412,17 @@ export class ReactionsService { */ emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}/emotes/{emoteId}", - path: { - channelId: channelId, - announcementId: announcementId, - announcementCommentId: announcementCommentId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}/emotes/{emoteId}", + path: { + channelId: channelId, + announcementId: announcementId, + announcementCommentId: announcementCommentId, + emoteId: emoteId, }, - ); + }); } - /** * Delete an announcement comment reaction * @returns void @@ -494,20 +445,17 @@ export class ReactionsService { */ emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}/emotes/{emoteId}", - path: { - channelId: channelId, - announcementId: announcementId, - announcementCommentId: announcementCommentId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}/emotes/{emoteId}", + path: { + channelId: channelId, + announcementId: announcementId, + announcementCommentId: announcementCommentId, + emoteId: emoteId, }, - ); + }); } - /** * Create a message reaction * @returns void @@ -522,19 +470,16 @@ export class ReactionsService { messageId: string; emoteId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/channels/{channelId}/messages/{messageId}/emotes/{emoteId}", - path: { - channelId: channelId, - messageId: messageId, - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/channels/{channelId}/messages/{messageId}/emotes/{emoteId}", + path: { + channelId: channelId, + messageId: messageId, + emoteId: emoteId, }, - ); + }); } - /** * Delete a message reaction * @returns void @@ -549,26 +494,21 @@ export class ReactionsService { channelId: string; messageId: string; emoteId: number; - userId?: - | string - | "@me"; + userId?: string | "@me"; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/messages/{messageId}/emotes/{emoteId}", - path: { - channelId: channelId, - messageId: messageId, - emoteId: emoteId, - }, - query: { - userId: userId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/messages/{messageId}/emotes/{emoteId}", + path: { + channelId: channelId, + messageId: messageId, + emoteId: emoteId, }, - ); + query: { + userId: userId, + }, + }); } - /** * Bulk delete a message's reactions * @returns void @@ -583,18 +523,16 @@ export class ReactionsService { messageId: string; emoteId?: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/channels/{channelId}/messages/{messageId}/emotes", - path: { - channelId: channelId, - messageId: messageId, - }, - query: { - emoteId: emoteId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/channels/{channelId}/messages/{messageId}/emotes", + path: { + channelId: channelId, + messageId: messageId, + }, + query: { + emoteId: emoteId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/RoleMembershipService.ts b/packages/api/lib/generated/router/services/RoleMembershipService.ts index 4c7728ce..666b28dc 100644 --- a/packages/api/lib/generated/router/services/RoleMembershipService.ts +++ b/packages/api/lib/generated/router/services/RoleMembershipService.ts @@ -1,15 +1,11 @@ import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; - export class RoleMembershipService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Assign role to member * @returns void @@ -24,27 +20,22 @@ export class RoleMembershipService { /** * The ID of the member that the role should be assigned to */ - userId: - | string - | "@me"; + userId: string | "@me"; /** * The role ID to apply to the user */ roleId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/servers/{serverId}/members/{userId}/roles/{roleId}", - path: { - serverId: serverId, - userId: userId, - roleId: roleId, - }, + return this.httpRequest.request({ + method: "PUT", + url: "/servers/{serverId}/members/{userId}/roles/{roleId}", + path: { + serverId: serverId, + userId: userId, + roleId: roleId, }, - ); + }); } - /** * Remove role from member * @returns void @@ -59,27 +50,22 @@ export class RoleMembershipService { /** * The ID of the member that the role should be removed from */ - userId: - | string - | "@me"; + userId: string | "@me"; /** * The role ID to remove from the user */ roleId: number; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/servers/{serverId}/members/{userId}/roles/{roleId}", - path: { - serverId: serverId, - userId: userId, - roleId: roleId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/members/{userId}/roles/{roleId}", + path: { + serverId: serverId, + userId: userId, + roleId: roleId, }, - ); + }); } - /** * Get member roles * Get a list of the roles assigned to a member @@ -94,24 +80,20 @@ export class RoleMembershipService { /** * The ID of the member to obtain roles from */ - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise<{ /** * The IDs of the roles that the member currently has */ roleIds: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/members/{userId}/roles", - path: { - serverId: serverId, - userId: userId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/members/{userId}/roles", + path: { + serverId: serverId, + userId: userId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/RolesService.ts b/packages/api/lib/generated/router/services/RolesService.ts index c6b31419..a2f7b6c2 100644 --- a/packages/api/lib/generated/router/services/RolesService.ts +++ b/packages/api/lib/generated/router/services/RolesService.ts @@ -1,86 +1,28 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Role } from "../models/Role"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class RolesService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - - /** - * Get a role - * @returns any Success - * @throws ApiError - */ - public roleRead({ - serverId, - roleId, - }: { - serverId: string; - roleId: number; - }): CancelablePromise<{ - role: Role; - }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/roles/{roleId}", - path: { - serverId: serverId, - roleId: roleId, - }, - }, - ); - } - - /** - * Delete a role - * @returns any Success - * @throws ApiError - */ - public roleDelete({ - serverId, - roleId, - }: { - serverId: string; - roleId: number; - }): CancelablePromise<{ - role: Role; - }> { - return this.httpRequest.request( - { - method: "DELETE", - url: "/servers/{serverId}/roles/{roleId}", - path: { - serverId: serverId, - roleId: roleId, - }, - }, - ); - } - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** - * Update a role + * Create a role + * By default, a role will be created with the lowest priority on a server. You can update its priority using [the role update route](/docs/api/roles/RoleUpdate) * @returns any Success * @throws ApiError */ - public roleUpdate({ + public roleCreate({ serverId, - roleId, requestBody, }: { serverId: string; - roleId: number; requestBody: { /** * The role's name */ - name?: string; + name: string; /** * If set, the role will be displayed separately in the channel member list */ @@ -96,7 +38,7 @@ export class RolesService { /** * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section */ - permissions?: Array; + permissions: Array; /** * An array of integer values corresponding to the decimal RGB representation for a color. The first color is solid, and a second color indicates a gradient */ @@ -105,20 +47,16 @@ export class RolesService { }): CancelablePromise<{ role: Role; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/servers/{serverId}/roles/{roleId}", - path: { - serverId: serverId, - roleId: roleId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/roles", + path: { + serverId: serverId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get roles * @returns any Success @@ -131,32 +69,55 @@ export class RolesService { }): CancelablePromise<{ roles: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/roles", - path: { - serverId: serverId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/roles", + path: { + serverId: serverId, }, - ); + }); } - /** - * Create a role + * Get a role * @returns any Success * @throws ApiError */ - public roleCreate({ + public roleRead({ serverId, + roleId, + }: { + serverId: string; + roleId: number; + }): CancelablePromise<{ + role: Role; + }> { + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/roles/{roleId}", + path: { + serverId: serverId, + roleId: roleId, + }, + }); + } + /** + * Update a role + * Note that when a `priority` is updated, there will still only be a socket event for the role that was touched directly and not for other roles that were shifted + * @returns any Success + * @throws ApiError + */ + public roleUpdate({ + serverId, + roleId, requestBody, }: { serverId: string; + roleId: number; requestBody: { /** * The role's name */ - name: string; + name?: string; /** * If set, the role will be displayed separately in the channel member list */ @@ -172,7 +133,11 @@ export class RolesService { /** * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section */ - permissions: Array; + permissions?: Array; + /** + * The priority the role will be in relation to other roles in the server. The higher the value, the more precedence the role has over lower priority roles, and the higher up it will be displayed in the UI. Values can be zero or negative! + */ + priority?: number; /** * An array of integer values corresponding to the decimal RGB representation for a color. The first color is solid, and a second color indicates a gradient */ @@ -181,19 +146,40 @@ export class RolesService { }): CancelablePromise<{ role: Role; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/servers/{serverId}/roles", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/servers/{serverId}/roles/{roleId}", + path: { + serverId: serverId, + roleId: roleId, + }, + body: requestBody, + mediaType: "application/json", + }); + } + /** + * Delete a role + * @returns any Success + * @throws ApiError + */ + public roleDelete({ + serverId, + roleId, + }: { + serverId: string; + roleId: number; + }): CancelablePromise<{ + role: Role; + }> { + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/roles/{roleId}", + path: { + serverId: serverId, + roleId: roleId, }, - ); + }); } - /** * Update a role permission * @returns any Success @@ -210,28 +196,22 @@ export class RolesService { /** * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true` or `false` values. */ - permissions: Record< - string, - any - >; + permissions: Record; }; }): CancelablePromise<{ role: Role; }> { - return this.httpRequest.request( - { - method: "PATCH", - url: "/servers/{serverId}/roles/{roleId}/permissions", - path: { - serverId: serverId, - roleId: roleId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PATCH", + url: "/servers/{serverId}/roles/{roleId}/permissions", + path: { + serverId: serverId, + roleId: roleId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Read a server member's permissions * If the user has *all* of the permissions passed, the HTTP status code will be 200; if user is missing one or more permissions passed, the HTTP status code will be [418](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/418) with a `meta` property containing `missingPermissions` of the permissions the user does not have (this is a 418 to differentiate from a 403 if the _bot_ did not have permissions to perform the request, not the _user_). Tip: Use the `HEAD` HTTP method for this route if you only care about if the user has permissions and not the response body containing what's missing. @@ -242,11 +222,11 @@ export class RolesService { serverId, userId, ids, + channelId, + categoryId, }: { serverId: string; - userId: - | string - | "@me"; + userId: string | "@me"; /** * A queryString array of `ids[]` representing [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) */ @@ -336,24 +316,26 @@ export class RolesService { | "CanUseVoiceActivityInStream" | "CanReceiveAllSocketEvents" >; + channelId?: string; + categoryId?: number; }): CancelablePromise<{ /** * A list of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) the User has in the success case */ permissions: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/members/{userId}/permissions", - path: { - serverId: serverId, - userId: userId, - }, - query: { - ids: ids, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/members/{userId}/permissions", + path: { + serverId: serverId, + userId: userId, + }, + query: { + ids: ids, + channelId: channelId, + categoryId: categoryId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/ServerSubscriptionService.ts b/packages/api/lib/generated/router/services/ServerSubscriptionService.ts index 034b200e..6aa77e87 100644 --- a/packages/api/lib/generated/router/services/ServerSubscriptionService.ts +++ b/packages/api/lib/generated/router/services/ServerSubscriptionService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { ServerSubscriptionTier } from "../models/ServerSubscriptionTier"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class ServerSubscriptionService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Get a server subscription tier * @returns any Success @@ -22,25 +17,19 @@ export class ServerSubscriptionService { serverSubscriptionTierType, }: { serverId: string; - serverSubscriptionTierType: - | "Gold" - | "Silver" - | "Copper"; + serverSubscriptionTierType: "Gold" | "Silver" | "Copper"; }): CancelablePromise<{ serverSubscriptionTier: ServerSubscriptionTier; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/subscriptions/tiers/{serverSubscriptionTierType}", - path: { - serverId: serverId, - serverSubscriptionTierType: serverSubscriptionTierType, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/subscriptions/tiers/{serverSubscriptionTierType}", + path: { + serverId: serverId, + serverSubscriptionTierType: serverSubscriptionTierType, }, - ); + }); } - /** * Get server subscription tiers * @returns any Success @@ -53,14 +42,12 @@ export class ServerSubscriptionService { }): CancelablePromise<{ serverSubscriptionTiers: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/subscriptions/tiers", - path: { - serverId: serverId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/subscriptions/tiers", + path: { + serverId: serverId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/ServerXpService.ts b/packages/api/lib/generated/router/services/ServerXpService.ts index 6a7c0d14..bc9bd265 100644 --- a/packages/api/lib/generated/router/services/ServerXpService.ts +++ b/packages/api/lib/generated/router/services/ServerXpService.ts @@ -1,15 +1,11 @@ import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; - export class ServerXpService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Award XP to a member * @returns any Success @@ -24,9 +20,7 @@ export class ServerXpService { /** * Member ID to award XP to */ - userId: - | string - | "@me"; + userId: string | "@me"; requestBody: { /** * The amount of XP to award @@ -39,20 +33,17 @@ export class ServerXpService { */ total: number; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/servers/{serverId}/members/{userId}/xp", - path: { - serverId: serverId, - userId: userId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/members/{userId}/xp", + path: { + serverId: serverId, + userId: userId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Set a member's XP * @returns any Success @@ -67,9 +58,7 @@ export class ServerXpService { /** * Member ID to set XP to */ - userId: - | string - | "@me"; + userId: string | "@me"; requestBody: { /** * The total XP to set on the user @@ -82,20 +71,17 @@ export class ServerXpService { */ total: number; }> { - return this.httpRequest.request( - { - method: "PUT", - url: "/servers/{serverId}/members/{userId}/xp", - path: { - serverId: serverId, - userId: userId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PUT", + url: "/servers/{serverId}/members/{userId}/xp", + path: { + serverId: serverId, + userId: userId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Bulk award XP to members * Take note of the max number of `userIds` that can be submitted on each request. If you require more, please batch your requests @@ -112,33 +98,24 @@ export class ServerXpService { * The amount of XP to award */ amount: number; - userIds: Array< - | string - | "@me" - >; + userIds: Array; }; }): CancelablePromise<{ /** * Each key of the object will be a user ID, and its value will be the total for that user after this operation */ - totalsByUserId: Record< - string, - number - >; + totalsByUserId: Record; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/servers/{serverId}/xp", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/xp", + path: { + serverId: serverId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Bulk set members' XP * Take note of the max number of `userIds` that can be submitted on each request. If you require more, please batch your requests @@ -154,34 +131,25 @@ export class ServerXpService { /** * The total XP to set on each user */ - total?: number; - userIds: Array< - | string - | "@me" - >; + amount: number; + userIds: Array; }; }): CancelablePromise<{ /** * Each key of the object will be a user ID, and its value will be the total for that user after this operation */ - totalsByUserId: Record< - string, - number - >; + totalsByUserId: Record; }> { - return this.httpRequest.request( - { - method: "PUT", - url: "/servers/{serverId}/xp", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PUT", + url: "/servers/{serverId}/xp", + path: { + serverId: serverId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Award XP to role * Award XP to all members with a particular role. @@ -205,17 +173,15 @@ export class ServerXpService { amount: number; }; }): CancelablePromise { - return this.httpRequest.request( - { - method: "POST", - url: "/servers/{serverId}/roles/{roleId}/xp", - path: { - serverId: serverId, - roleId: roleId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/roles/{roleId}/xp", + path: { + serverId: serverId, + roleId: roleId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } } diff --git a/packages/api/lib/generated/router/services/ServersService.ts b/packages/api/lib/generated/router/services/ServersService.ts index 1fc76d46..ce5255ab 100644 --- a/packages/api/lib/generated/router/services/ServersService.ts +++ b/packages/api/lib/generated/router/services/ServersService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Server } from "../models/Server"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class ServersService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Get a server * Fetch various information about a given server. Currently, the bot must be a member of the server in order to fetch its information. @@ -24,15 +19,17 @@ export class ServersService { serverId: string; }): CancelablePromise<{ server: Server; + /** + * Count of members in this server after this join. **Note:** at higher member counts (1000+), this value is only updated periodically and should not be used in situations that require absolute accuracy + */ + serverMemberCount: number; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}", - path: { - serverId: serverId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}", + path: { + serverId: serverId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/SocialLinksService.ts b/packages/api/lib/generated/router/services/SocialLinksService.ts index b2361563..3c03c4e0 100644 --- a/packages/api/lib/generated/router/services/SocialLinksService.ts +++ b/packages/api/lib/generated/router/services/SocialLinksService.ts @@ -1,17 +1,12 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { SocialLink } from "../models/SocialLink"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class SocialLinksService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Retrieves a member's public social links * @returns any Success @@ -23,39 +18,22 @@ export class SocialLinksService { socialLinkType, }: { serverId: string; - userId: - | string - | "@me"; + userId: string | "@me"; /** * The type of social link to retrieve */ - socialLinkType: - | "twitch" - | "bnet" - | "psn" - | "xbox" - | "steam" - | "origin" - | "youtube" - | "twitter" - | "facebook" - | "switch" - | "patreon" - | "roblox" - | "epic"; + socialLinkType: "twitch" | "bnet" | "psn" | "xbox" | "steam" | "origin" | "youtube" | "twitter" | "facebook" | "switch" | "patreon" | "roblox" | "epic"; }): CancelablePromise<{ socialLink: SocialLink; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/members/{userId}/social-links/{socialLinkType}", - path: { - serverId: serverId, - userId: userId, - socialLinkType: socialLinkType, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/members/{userId}/social-links/{socialLinkType}", + path: { + serverId: serverId, + userId: userId, + socialLinkType: socialLinkType, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/UrlSignatureService.ts b/packages/api/lib/generated/router/services/UrlSignatureService.ts new file mode 100644 index 00000000..f867efdd --- /dev/null +++ b/packages/api/lib/generated/router/services/UrlSignatureService.ts @@ -0,0 +1,38 @@ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ +/* istanbul ignore file */ +/* tslint:disable */ +/* eslint-disable */ +import type { UrlSignature } from "../models/UrlSignature"; +export class UrlSignatureService { + constructor(public readonly httpRequest: BaseHttpRequest) {} + /** + * Create URL signatures + * User-uploaded content hosted on our CDN will no longer be accessible directly after June 30th, 2024. To access the content, you will need to generate a valid signature via the `/url-signatures` endpoint, which is valid for 5 minutes, and download the content to store the data. Each asset comes with a daily request limit of one, so make sure to save the assets accordingly. + * @returns any Success + * @throws ApiError + */ + public urlSignatureCreateMany({ + requestBody, + }: { + requestBody: { + /** + * An array of guilded CDN based URLs to get a signature on. Each URL is valid for 5 minutes and limited to one request per day + */ + urls: Array; + }; + }): CancelablePromise<{ + /** + * An array of URLs with a valid signature that has a 5 minute expiration. Any item with a `retryAfter` indicates you are still within the rate limit for that particular `url` + */ + urlSignatures: Array; + }> { + return this.httpRequest.request({ + method: "POST", + url: "/url-signatures", + body: requestBody, + mediaType: "application/json", + }); + } +} diff --git a/packages/api/lib/generated/router/services/UserStatusService.ts b/packages/api/lib/generated/router/services/UserStatusService.ts index d499eac4..1a043a67 100644 --- a/packages/api/lib/generated/router/services/UserStatusService.ts +++ b/packages/api/lib/generated/router/services/UserStatusService.ts @@ -1,18 +1,14 @@ import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; - export class UserStatusService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Update your status - * This value can be a max of 24 hours into the futre. If you are wanting a longer expiration, set this value to null so that it never expires. **Note** - at this time, you can only set a status on your own user + * This value can be a max of 24 hours into the future. If you are wanting a longer expiration, set this value to null so that it never expires. **Note** - at this time, you can only set a status on your own user * @returns void * @throws ApiError */ @@ -20,9 +16,7 @@ export class UserStatusService { userId, requestBody, }: { - userId: - | string - | "@me"; + userId: string | "@me"; requestBody: { /** * The content of the user status. The supported markdown for this content only includes reactions and plaintext for now @@ -38,19 +32,16 @@ export class UserStatusService { expiresAt?: string; }; }): CancelablePromise { - return this.httpRequest.request( - { - method: "PUT", - url: "/users/{userId}/status", - path: { - userId: userId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PUT", + url: "/users/{userId}/status", + path: { + userId: userId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete your status * **Note** - at this time, you can only set a status on your own user @@ -60,18 +51,14 @@ export class UserStatusService { public userStatusDelete({ userId, }: { - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/users/{userId}/status", - path: { - userId: userId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/users/{userId}/status", + path: { + userId: userId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/UsersService.ts b/packages/api/lib/generated/router/services/UsersService.ts index 8b182118..23a3d37b 100644 --- a/packages/api/lib/generated/router/services/UsersService.ts +++ b/packages/api/lib/generated/router/services/UsersService.ts @@ -1,18 +1,13 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Server } from "../models/Server"; import type { User } from "../models/User"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class UsersService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Get a user * **Note** - at this time, you can only retrieve your own user @@ -22,23 +17,18 @@ export class UsersService { public userRead({ userId, }: { - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise<{ user: User; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/users/{userId}", - path: { - userId: userId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/users/{userId}", + path: { + userId: userId, }, - ); + }); } - /** * Get a users servers * **Note** - at this time, you can only retrieve your own servers @@ -48,20 +38,16 @@ export class UsersService { public userServerReadMany({ userId, }: { - userId: - | string - | "@me"; + userId: string | "@me"; }): CancelablePromise<{ servers: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/users/{userId}/servers", - path: { - userId: userId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/users/{userId}/servers", + path: { + userId: userId, }, - ); + }); } } diff --git a/packages/api/lib/generated/router/services/WebhookService.ts b/packages/api/lib/generated/router/services/WebhookService.ts index b9379c0c..5c0593c7 100644 --- a/packages/api/lib/generated/router/services/WebhookService.ts +++ b/packages/api/lib/generated/router/services/WebhookService.ts @@ -1,19 +1,15 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { Webhook } from "../models/Webhook"; - -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; -import type { CancelablePromise } from "../core/CancelablePromise"; - export class WebhookService { - constructor( - public readonly httpRequest: BaseHttpRequest, - ) {} - + constructor(public readonly httpRequest: BaseHttpRequest) {} /** * Create a webhook + * Note that each server can only have 200 webhooks * @returns any Success * @throws ApiError */ @@ -35,19 +31,16 @@ export class WebhookService { }): CancelablePromise<{ webhook: Webhook; }> { - return this.httpRequest.request( - { - method: "POST", - url: "/servers/{serverId}/webhooks", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "POST", + url: "/servers/{serverId}/webhooks", + path: { + serverId: serverId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Get a server's webhooks * Get a list of webhooks from a server. @@ -62,24 +55,21 @@ export class WebhookService { /** * ID of the channel you want to filter for webhooks */ - channelId: string; + channelId?: string; }): CancelablePromise<{ webhooks: Array; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/webhooks", - path: { - serverId: serverId, - }, - query: { - channelId: channelId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/webhooks", + path: { + serverId: serverId, + }, + query: { + channelId: channelId, }, - ); + }); } - /** * Get a server's webhook * @returns any Success @@ -94,18 +84,15 @@ export class WebhookService { }): CancelablePromise<{ webhook: Webhook; }> { - return this.httpRequest.request( - { - method: "GET", - url: "/servers/{serverId}/webhooks/{webhookId}", - path: { - serverId: serverId, - webhookId: webhookId, - }, + return this.httpRequest.request({ + method: "GET", + url: "/servers/{serverId}/webhooks/{webhookId}", + path: { + serverId: serverId, + webhookId: webhookId, }, - ); + }); } - /** * Update a webhook * @returns any Success @@ -131,20 +118,17 @@ export class WebhookService { }): CancelablePromise<{ webhook: Webhook; }> { - return this.httpRequest.request( - { - method: "PUT", - url: "/servers/{serverId}/webhooks/{webhookId}", - path: { - serverId: serverId, - webhookId: webhookId, - }, - body: requestBody, - mediaType: "application/json", + return this.httpRequest.request({ + method: "PUT", + url: "/servers/{serverId}/webhooks/{webhookId}", + path: { + serverId: serverId, + webhookId: webhookId, }, - ); + body: requestBody, + mediaType: "application/json", + }); } - /** * Delete a server webhook * @returns void @@ -157,15 +141,13 @@ export class WebhookService { serverId: string; webhookId: string; }): CancelablePromise { - return this.httpRequest.request( - { - method: "DELETE", - url: "/servers/{serverId}/webhooks/{webhookId}", - path: { - serverId: serverId, - webhookId: webhookId, - }, + return this.httpRequest.request({ + method: "DELETE", + url: "/servers/{serverId}/webhooks/{webhookId}", + path: { + serverId: serverId, + webhookId: webhookId, }, - ); + }); } } diff --git a/packages/api/package.json b/packages/api/package.json index b328a4ec..a7efa832 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -11,11 +11,11 @@ "build:typecheck": "tsc --noEmit", "prepublishOnly": "rimraf dist/ && rimraf types/ && pnpm run build", "release": "npm publish", - "router:preserve": "ts-node scripts/pre-gen-router.ts", - "router:restore": "ts-node scripts/post-gen-router.ts", - "generate:ws": "openapi-typescript \"https://www.guilded.gg/api/v1/socket-open-api-schema.json\" --output lib/generated/api-typings/v1/ws.ts", - "generate:long:router": "pnpx openapi-typescript-codegen --input \"https://www.guilded.gg/api/v1/open-api-schema.json\" --output lib/generated/router --name GuildedRouter --useOptions --postfixModels Payload --useUnionTypes", - "generate:router": "bun run router:preserve && bun run generate:long:router && biome check --apply-unsafe lib/generated/router/**/*.ts && pnpm router:restore" + "router:preserve": "cd scripts && bun pre-gen-router.ts", + "router:restore": "cd scripts && bun post-gen-router.ts", + "generate:ws": "bunx openapi-typescript \"https://www.guilded.gg/api/v1/socket-open-api-schema.json\" --output lib/generated/api-typings/v1/ws.ts", + "generate:long:router": "bunx openapi-typescript-codegen --input \"https://www.guilded.gg/api/v1/open-api-schema.json\" --output lib/generated/router --name GuildedRouter --useOptions --postfixModels Payload --useUnionTypes", + "generate:router": "bun run router:preserve && bun run generate:long:router && biome check --apply-unsafe lib/generated/router/**/*.ts && bun run router:restore" }, "devDependencies": { "@types/fs-extra": "^11.0.1", @@ -23,9 +23,8 @@ "@types/qs": "^6.9.7", "@types/ws": "8.5.4", "fs-extra": "^11.1.1", - "openapi-typescript": "^6.2.4", - "openapi-typescript-codegen": "^0.24.0", - "ts-node": "10.9.1", + "openapi-typescript": "6.2.4", + "openapi-typescript-codegen": "0.24.0", "typescript": "5.0.4" }, "dependencies": {