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/bun.lockb b/bun.lockb index a072fa30..70958947 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/packages/api/lib/generated/router/index.ts b/packages/api/lib/generated/router/index.ts index 5720bdbf..9649535b 100644 --- a/packages/api/lib/generated/router/index.ts +++ b/packages/api/lib/generated/router/index.ts @@ -1,81 +1,88 @@ -/* generated using openapi-typescript-codegen -- do no edit */ +/* generated using openapi-typescript-codegen -- do not edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ -export { GuildedRouter } from "./GuildedRouter"; +export { GuildedRouter } from './GuildedRouter'; -export { ApiError } from "./core/ApiError"; -export { BaseHttpRequest } from "./core/BaseHttpRequest"; -export { CancelablePromise, CancelError } from "./core/CancelablePromise"; -export { OpenAPI } from "./core/OpenAPI"; -export type { OpenAPIConfig } from "./core/OpenAPI"; +export { ApiError } from './core/ApiError'; +export { BaseHttpRequest } from './core/BaseHttpRequest'; +export { CancelablePromise, CancelError } from './core/CancelablePromise'; +export { OpenAPI } from './core/OpenAPI'; +export type { OpenAPIConfig } from './core/OpenAPI'; -export type { Announcement as AnnouncementPayload } from "./models/Announcement"; -export type { AnnouncementComment as AnnouncementCommentPayload } from "./models/AnnouncementComment"; -export type { AnnouncementCommentReaction as AnnouncementCommentReactionPayload } from "./models/AnnouncementCommentReaction"; -export type { AnnouncementReaction as AnnouncementReactionPayload } from "./models/AnnouncementReaction"; -export type { CalendarEvent as CalendarEventPayload } from "./models/CalendarEvent"; -export type { CalendarEventComment as CalendarEventCommentPayload } from "./models/CalendarEventComment"; -export type { CalendarEventCommentReaction as CalendarEventCommentReactionPayload } from "./models/CalendarEventCommentReaction"; -export type { CalendarEventReaction as CalendarEventReactionPayload } from "./models/CalendarEventReaction"; -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 { ChatEmbed as ChatEmbedPayload } from "./models/ChatEmbed"; -export type { ChatMessage as ChatMessagePayload } from "./models/ChatMessage"; -export type { ChatMessageReaction as ChatMessageReactionPayload } from "./models/ChatMessageReaction"; -export type { Doc as DocPayload } from "./models/Doc"; -export type { DocComment as DocCommentPayload } from "./models/DocComment"; -export type { DocCommentReaction as DocCommentReactionPayload } from "./models/DocCommentReaction"; -export type { DocReaction as DocReactionPayload } from "./models/DocReaction"; -export type { Emote as EmotePayload } from "./models/Emote"; -export type { ForumTopic as ForumTopicPayload } from "./models/ForumTopic"; -export type { ForumTopicComment as ForumTopicCommentPayload } from "./models/ForumTopicComment"; -export type { ForumTopicCommentReaction as ForumTopicCommentReactionPayload } from "./models/ForumTopicCommentReaction"; -export type { ForumTopicReaction as ForumTopicReactionPayload } from "./models/ForumTopicReaction"; -export type { ForumTopicSummary as ForumTopicSummaryPayload } from "./models/ForumTopicSummary"; -export type { Group as GroupPayload } from "./models/Group"; -export type { ListItem as ListItemPayload } from "./models/ListItem"; -export type { ListItemSummary as ListItemSummaryPayload } from "./models/ListItemSummary"; -export type { Mentions as MentionsPayload } from "./models/Mentions"; -export type { Role as RolePayload } from "./models/Role"; -export type { Server as ServerPayload } from "./models/Server"; -export type { ServerChannel as ServerChannelPayload } from "./models/ServerChannel"; -export type { ServerMember as ServerMemberPayload } from "./models/ServerMember"; -export type { ServerMemberBan as ServerMemberBanPayload } from "./models/ServerMemberBan"; -export type { ServerMemberPermissions as ServerMemberPermissionsPayload } from "./models/ServerMemberPermissions"; -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 { User as UserPayload } from "./models/User"; -export type { UserStatus as UserStatusPayload } from "./models/UserStatus"; -export type { UserSummary as UserSummaryPayload } from "./models/UserSummary"; -export type { Webhook as WebhookPayload } from "./models/Webhook"; +export type { Announcement as AnnouncementPayload } from './models/Announcement'; +export type { AnnouncementComment as AnnouncementCommentPayload } from './models/AnnouncementComment'; +export type { AnnouncementCommentReaction as AnnouncementCommentReactionPayload } from './models/AnnouncementCommentReaction'; +export type { AnnouncementReaction as AnnouncementReactionPayload } from './models/AnnouncementReaction'; +export type { CalendarEvent as CalendarEventPayload } from './models/CalendarEvent'; +export type { CalendarEventComment as CalendarEventCommentPayload } from './models/CalendarEventComment'; +export type { CalendarEventCommentReaction as CalendarEventCommentReactionPayload } from './models/CalendarEventCommentReaction'; +export type { CalendarEventReaction as CalendarEventReactionPayload } from './models/CalendarEventReaction'; +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'; +export type { Doc as DocPayload } from './models/Doc'; +export type { DocComment as DocCommentPayload } from './models/DocComment'; +export type { DocCommentReaction as DocCommentReactionPayload } from './models/DocCommentReaction'; +export type { DocReaction as DocReactionPayload } from './models/DocReaction'; +export type { Emote as EmotePayload } from './models/Emote'; +export type { ForumTopic as ForumTopicPayload } from './models/ForumTopic'; +export type { ForumTopicComment as ForumTopicCommentPayload } from './models/ForumTopicComment'; +export type { ForumTopicCommentReaction as ForumTopicCommentReactionPayload } from './models/ForumTopicCommentReaction'; +export type { ForumTopicReaction as ForumTopicReactionPayload } from './models/ForumTopicReaction'; +export type { ForumTopicSummary as ForumTopicSummaryPayload } from './models/ForumTopicSummary'; +export type { Group as GroupPayload } from './models/Group'; +export type { ListItem as ListItemPayload } from './models/ListItem'; +export type { ListItemSummary as ListItemSummaryPayload } from './models/ListItemSummary'; +export type { Mentions as MentionsPayload } from './models/Mentions'; +export type { Role as RolePayload } from './models/Role'; +export type { Server as ServerPayload } from './models/Server'; +export type { ServerChannel as ServerChannelPayload } from './models/ServerChannel'; +export type { ServerMember as ServerMemberPayload } from './models/ServerMember'; +export type { ServerMemberBan as ServerMemberBanPayload } from './models/ServerMemberBan'; +export type { ServerMemberPermissions as ServerMemberPermissionsPayload } from './models/ServerMemberPermissions'; +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'; +export type { Webhook as WebhookPayload } from './models/Webhook'; -export { AnnouncementCommentsService } from "./services/AnnouncementCommentsService"; -export { AnnouncementsService } from "./services/AnnouncementsService"; -export { CalendarEventCommentsService } from "./services/CalendarEventCommentsService"; -export { CalendarEventsService } from "./services/CalendarEventsService"; -export { CalendarEventSeriesService } from "./services/CalendarEventSeriesService"; -export { CategoriesService } from "./services/CategoriesService"; -export { ChannelsService } from "./services/ChannelsService"; -export { ChatService } from "./services/ChatService"; -export { DocCommentsService } from "./services/DocCommentsService"; -export { DocsService } from "./services/DocsService"; -export { ForumCommentsService } from "./services/ForumCommentsService"; -export { ForumsService } from "./services/ForumsService"; -export { GroupMembershipService } from "./services/GroupMembershipService"; -export { GroupsService } from "./services/GroupsService"; -export { ListItemsService } from "./services/ListItemsService"; -export { MemberBansService } from "./services/MemberBansService"; -export { MembersService } from "./services/MembersService"; -export { ReactionsService } from "./services/ReactionsService"; -export { RoleMembershipService } from "./services/RoleMembershipService"; -export { RolesService } from "./services/RolesService"; -export { ServersService } from "./services/ServersService"; -export { ServerSubscriptionService } from "./services/ServerSubscriptionService"; -export { ServerXpService } from "./services/ServerXpService"; -export { SocialLinksService } from "./services/SocialLinksService"; -export { UsersService } from "./services/UsersService"; -export { UserStatusService } from "./services/UserStatusService"; -export { WebhookService } from "./services/WebhookService"; +export { AnnouncementCommentsService } from './services/AnnouncementCommentsService'; +export { AnnouncementsService } from './services/AnnouncementsService'; +export { CalendarEventCommentsService } from './services/CalendarEventCommentsService'; +export { CalendarEventsService } from './services/CalendarEventsService'; +export { CalendarEventSeriesService } from './services/CalendarEventSeriesService'; +export { CategoriesService } from './services/CategoriesService'; +export { ChannelsService } from './services/ChannelsService'; +export { ChatService } from './services/ChatService'; +export { DocCommentsService } from './services/DocCommentsService'; +export { DocsService } from './services/DocsService'; +export { ForumCommentsService } from './services/ForumCommentsService'; +export { ForumsService } from './services/ForumsService'; +export { GroupMembershipService } from './services/GroupMembershipService'; +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'; +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": {