From a12cb03f13a0445f89e97118b82ccf5c904f2bdb Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 19 Jan 2024 02:42:57 -0500 Subject: [PATCH] migrate: use bun (#246) * migrate: use bun * chore: config stuff * chore: run biome * chore: another biome run * chore: separate workflows * chore: appease tsc * chore: config --- .changeset/README.md | 6 +- .config/.eslintignore | 10 - .config/.eslintrc.js | 41 - .config/.eslintrc.web.js | 27 - .config/.lintstagedrc.json | 5 - .config/.prettierignore | 11 - .config/.prettierrc.json | 9 - .github/CONTRIBUTING.md | 4 +- .github/workflows/ci.yml | 50 +- .github/workflows/deploy.yml | 23 +- .github/workflows/docs.yml | 20 +- .husky/pre-commit | 2 +- apps/docs/next.config.js | 33 +- apps/docs/package.json | 3 +- apps/docs/postcss.config.js | 8 +- apps/docs/src/components/Breadcrumb.tsx | 31 +- apps/docs/src/components/Copiable.tsx | 37 +- apps/docs/src/components/Footer.tsx | 39 +- apps/docs/src/components/LayoutWrapper.tsx | 6 +- apps/docs/src/components/Navbar.tsx | 85 +- apps/docs/src/components/PackageBadge.tsx | 5 +- apps/docs/src/components/RefLink.tsx | 6 +- .../components/customIcons/BreadCrumbSep.tsx | 12 +- apps/docs/src/lib/types.ts | 10 +- apps/docs/src/pages/_app.tsx | 22 +- apps/docs/src/pages/docs/index.tsx | 30 +- apps/docs/src/pages/index.tsx | 17 +- apps/docs/tailwind.config.js | 59 +- biome.json | 36 + bun.lockb | Bin 0 -> 264128 bytes package.json | 114 +- .../api/__tests__/file-sending/src/index.ts | 11 +- .../api/lib/generated/api-typings/index.ts | 3 +- .../lib/generated/api-typings/v1/events.ts | 104 +- .../api-typings/v1/structs/Client.ts | 4 +- .../generated/api-typings/v1/structs/Embed.ts | 76 +- .../api-typings/v1/structs/Webhook.ts | 60 +- .../lib/generated/api-typings/v1/webhook.ts | 16 +- .../api/lib/generated/api-typings/v1/ws.ts | 6701 +++++++-------- .../api/lib/generated/router/GuildedRouter.ts | 241 +- .../api/lib/generated/router/core/ApiError.ts | 40 +- .../router/core/ApiRequestOptions.ts | 47 +- .../lib/generated/router/core/ApiResult.ts | 10 +- .../generated/router/core/BaseHttpRequest.ts | 10 +- .../generated/router/core/FetchHttpRequest.ts | 30 +- .../api/lib/generated/router/core/OpenAPI.ts | 49 +- .../api/lib/generated/router/core/request.ts | 49 +- .../generated/router/models/Announcement.ts | 58 +- .../router/models/AnnouncementComment.ts | 58 +- .../models/AnnouncementCommentReaction.ts | 34 +- .../router/models/AnnouncementReaction.ts | 26 +- .../generated/router/models/CalendarEvent.ts | 176 +- .../router/models/CalendarEventComment.ts | 58 +- .../models/CalendarEventCommentReaction.ts | 34 +- .../router/models/CalendarEventReaction.ts | 26 +- .../router/models/CalendarEventRsvp.ts | 78 +- .../router/models/CalendarEventSeries.ts | 24 +- .../lib/generated/router/models/Category.ts | 48 +- .../lib/generated/router/models/ChatEmbed.ts | 170 +- .../generated/router/models/ChatMessage.ts | 112 +- .../router/models/ChatMessageReaction.ts | 26 +- .../api/lib/generated/router/models/Doc.ts | 74 +- .../lib/generated/router/models/DocComment.ts | 58 +- .../router/models/DocCommentReaction.ts | 34 +- .../generated/router/models/DocReaction.ts | 26 +- .../api/lib/generated/router/models/Emote.ts | 32 +- .../lib/generated/router/models/ForumTopic.ts | 78 +- .../router/models/ForumTopicComment.ts | 58 +- .../models/ForumTopicCommentReaction.ts | 34 +- .../router/models/ForumTopicReaction.ts | 26 +- .../router/models/ForumTopicSummary.ts | 68 +- .../api/lib/generated/router/models/Group.ts | 112 +- .../lib/generated/router/models/ListItem.ts | 144 +- .../router/models/ListItemSummary.ts | 134 +- .../lib/generated/router/models/Mentions.ts | 70 +- .../api/lib/generated/router/models/Role.ts | 112 +- .../api/lib/generated/router/models/Server.ts | 104 +- .../generated/router/models/ServerChannel.ts | 149 +- .../generated/router/models/ServerMember.ts | 16 +- .../router/models/ServerMemberBan.ts | 26 +- .../router/models/ServerMemberPermissions.ts | 8 +- .../router/models/ServerMemberSummary.ts | 4 +- .../router/models/ServerSubscriptionTier.ts | 51 +- .../lib/generated/router/models/SocialLink.ts | 53 +- .../api/lib/generated/router/models/User.ts | 52 +- .../lib/generated/router/models/UserStatus.ts | 16 +- .../generated/router/models/UserSummary.ts | 34 +- .../lib/generated/router/models/Webhook.ts | 72 +- .../services/AnnouncementCommentsService.ts | 274 +- .../router/services/AnnouncementsService.ts | 290 +- .../services/CalendarEventCommentsService.ts | 274 +- .../services/CalendarEventSeriesService.ts | 307 +- .../router/services/CalendarEventsService.ts | 832 +- .../router/services/CategoriesService.ts | 224 +- .../router/services/ChannelsService.ts | 377 +- .../generated/router/services/ChatService.ts | 563 +- .../router/services/DocCommentsService.ts | 274 +- .../generated/router/services/DocsService.ts | 285 +- .../router/services/ForumCommentsService.ts | 274 +- .../router/services/ForumsService.ts | 435 +- .../router/services/GroupMembershipService.ts | 122 +- .../router/services/GroupsService.ts | 306 +- .../router/services/ListItemsService.ts | 360 +- .../router/services/MemberBansService.ts | 230 +- .../router/services/MembersService.ts | 282 +- .../router/services/ReactionsService.ts | 1026 ++- .../router/services/RoleMembershipService.ts | 198 +- .../generated/router/services/RolesService.ts | 647 +- .../services/ServerSubscriptionService.ts | 89 +- .../router/services/ServerXpService.ts | 388 +- .../router/services/ServersService.ts | 46 +- .../router/services/SocialLinksService.ts | 81 +- .../router/services/UserStatusService.ts | 120 +- .../generated/router/services/UsersService.ts | 90 +- .../router/services/WebhookService.ts | 288 +- packages/api/lib/rest/RestManager.ts | 472 +- .../api/lib/rest/errors/GuildedAPIError.ts | 10 +- .../api/lib/rest/errors/PermissionsError.ts | 6 +- packages/api/lib/rest/typings.ts | 40 +- packages/api/lib/rest/util/color.ts | 76 +- packages/api/lib/rest/util/constants.ts | 26 +- packages/api/lib/rest/util/message.ts | 568 +- packages/api/lib/rest/util/routes.ts | 114 +- .../api/lib/rest/webhook/WebhookClient.ts | 205 +- packages/api/lib/rest/webhook/WebhookEmbed.ts | 610 +- packages/api/lib/ws/Heartbeater.ts | 27 +- packages/api/lib/ws/WebSocketManager.ts | 555 +- packages/api/package.json | 7 +- packages/api/scripts/post-gen-router.ts | 22 +- packages/api/scripts/pre-gen-router.ts | 8 +- packages/create-guilded-app/lib/cli.ts | 18 +- packages/create-guilded-app/package.json | 5 +- .../templates/bot-starter-js/src/index.js | 72 +- .../src/commands/echo.js | 12 +- .../src/commands/ping.js | 6 +- .../command-handler-starter-js/src/index.js | 50 +- packages/gil/lib/BotClient.ts | 818 +- packages/gil/lib/arguments/...string.ts | 16 +- packages/gil/lib/arguments/boolean.ts | 20 +- packages/gil/lib/arguments/command.ts | 26 +- packages/gil/lib/arguments/duration.ts | 18 +- packages/gil/lib/arguments/number.ts | 26 +- packages/gil/lib/arguments/string.ts | 26 +- packages/gil/lib/arguments/subcommand.ts | 22 +- packages/gil/lib/commands/ping.ts | 14 +- packages/gil/lib/inhibitors/allowedIn.ts | 28 +- packages/gil/lib/inhibitors/cooldown.ts | 102 +- packages/gil/lib/monitors/commands.ts | 372 +- packages/gil/lib/monitors/messageCollector.ts | 40 +- packages/gil/lib/structures/Argument.ts | 9 +- packages/gil/lib/structures/Command.ts | 157 +- packages/gil/lib/structures/Inhibitor.ts | 9 +- packages/gil/lib/structures/Monitor.ts | 53 +- packages/gil/lib/structures/Task.ts | 33 +- packages/gil/lib/utils/walk.ts | 42 +- packages/gil/package.json | 5 +- packages/gil/test/index.ts | 6 +- packages/guilded.js/lib/cache.ts | 37 +- packages/guilded.js/lib/constants.ts | 90 +- packages/guilded.js/lib/events.ts | 38 +- .../lib/gateway/ClientGatewayHandler.ts | 164 +- .../lib/gateway/handler/BotEventHandler.ts | 16 +- .../gateway/handler/CalendarEventHandler.ts | 104 +- .../lib/gateway/handler/DocEventHandler.ts | 32 +- .../lib/gateway/handler/ForumEventHandler.ts | 112 +- .../gateway/handler/GatewayEventHandler.ts | 2 +- .../lib/gateway/handler/ListEventHandler.ts | 52 +- .../gateway/handler/MessageEventHandler.ts | 72 +- .../gateway/handler/ReactionEventHandler.ts | 42 +- .../handler/ServerChannelEventHandler.ts | 42 +- .../lib/gateway/handler/ServerEventHandler.ts | 33 +- .../handler/ServerMemberEventHandler.ts | 233 +- .../handler/ServerWebhookEventHandler.ts | 34 +- .../managers/global/CacheableStructManager.ts | 2 +- .../lib/managers/global/CalendarManager.ts | 425 +- .../lib/managers/global/CategoryManager.ts | 111 +- .../lib/managers/global/ChannelManager.ts | 194 +- .../lib/managers/global/DocManager.ts | 133 +- .../lib/managers/global/ForumManager.ts | 270 +- .../lib/managers/global/GlobalManager.ts | 2 +- .../lib/managers/global/GroupManager.ts | 213 +- .../lib/managers/global/GuildBanManager.ts | 170 +- .../lib/managers/global/ListManager.ts | 190 +- .../lib/managers/global/MemberManager.ts | 334 +- .../lib/managers/global/MessageManager.ts | 292 +- .../lib/managers/global/ReactionManager.ts | 104 +- .../lib/managers/global/RoleManager.ts | 299 +- .../lib/managers/global/ServerManager.ts | 50 +- .../managers/global/SubscriptionManager.ts | 57 +- .../lib/managers/global/UserManager.ts | 70 +- .../lib/managers/global/WebhookManager.ts | 192 +- packages/guilded.js/lib/structures/Base.ts | 35 +- .../lib/structures/CalendarEvent.ts | 410 +- .../guilded.js/lib/structures/Category.ts | 110 +- packages/guilded.js/lib/structures/Client.ts | 767 +- packages/guilded.js/lib/structures/Embed.ts | 409 +- packages/guilded.js/lib/structures/Forum.ts | 478 +- packages/guilded.js/lib/structures/Group.ts | 164 +- packages/guilded.js/lib/structures/Member.ts | 506 +- packages/guilded.js/lib/structures/Message.ts | 595 +- packages/guilded.js/lib/structures/Role.ts | 216 +- packages/guilded.js/lib/structures/Server.ts | 180 +- .../guilded.js/lib/structures/Subscription.ts | 73 +- packages/guilded.js/lib/structures/User.ts | 107 +- packages/guilded.js/lib/structures/Webhook.ts | 172 +- .../lib/structures/channels/Channel.ts | 419 +- .../lib/structures/channels/ChatChannel.ts | 18 +- .../lib/structures/channels/DocChannel.ts | 98 +- .../lib/structures/channels/ForumChannel.ts | 45 +- .../lib/structures/channels/ListChannel.ts | 120 +- .../lib/structures/channels/ThreadChannel.ts | 36 +- .../lib/structures/collectors/Collector.ts | 240 +- .../structures/collectors/MessageCollector.ts | 28 +- .../collectors/ReactionCollector.ts | 28 +- packages/guilded.js/lib/typings.ts | 147 +- packages/guilded.js/lib/util.ts | 158 +- packages/guilded.js/package.json | 5 +- pnpm-lock.yaml | 7364 ----------------- pnpm-workspace.yaml | 5 - services/proxy/package.json | 3 +- services/proxy/src/index.ts | 106 +- tsconfig.eslint.json | 5 - turbo.json | 49 + 223 files changed, 17860 insertions(+), 23665 deletions(-) delete mode 100644 .config/.eslintignore delete mode 100644 .config/.eslintrc.js delete mode 100644 .config/.eslintrc.web.js delete mode 100644 .config/.lintstagedrc.json delete mode 100644 .config/.prettierignore delete mode 100644 .config/.prettierrc.json create mode 100644 biome.json create mode 100755 bun.lockb delete mode 100644 pnpm-lock.yaml delete mode 100644 pnpm-workspace.yaml delete mode 100644 tsconfig.eslint.json create mode 100644 turbo.json diff --git a/.changeset/README.md b/.changeset/README.md index cb151e63..3e2b26f7 100644 --- a/.changeset/README.md +++ b/.changeset/README.md @@ -11,6 +11,6 @@ We have a quick list of common questions to get you started engaging with this p The release steps follows this: -- "pnpm run prerelease" -- "pnpm i -r" -- "pnpm recursive publish" +- "bun run prerelease" +- "bun install -r" +- "bun run publish" diff --git a/.config/.eslintignore b/.config/.eslintignore deleted file mode 100644 index a7c328ab..00000000 --- a/.config/.eslintignore +++ /dev/null @@ -1,10 +0,0 @@ -**/node_modules/** -**/dist/** -**/types/** -**/.next/** - -.eslintrc.js -**/*.d.ts - -**/*.js -lib/generated/** \ No newline at end of file diff --git a/.config/.eslintrc.js b/.config/.eslintrc.js deleted file mode 100644 index 126094bd..00000000 --- a/.config/.eslintrc.js +++ /dev/null @@ -1,41 +0,0 @@ -module.exports = { - root: true, - extends: ["neon/common", "neon/node", "neon/typescript", "neon/prettier"], - parserOptions: { - project: "../../tsconfig.eslint.json", - }, - rules: { - "unicorn/no-abusive-eslint-disable": "off", - "@typescript-eslint/unbound-method": "off", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/explicit-function-return-type": "error", - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/no-invalid-this": "off", - "@typescript-eslint/no-use-before-define": "off", - "@typescript-eslint/promise-function-async": "off", - "jsdoc/multiline-blocks": "off", - "jsdoc/newline-after-description": "off", - "typescript-sort-keys/interface": "off", - "@typescript-eslint/lines-between-class-members": [ - "warn", - "always", - { - exceptAfterOverload: true, - }, - ], - "@typescript-eslint/switch-exhaustiveness-check": "off", - "array-callback-return": "off", - "import/extensions": "off", - "no-param-reassign": "off", - "promise/prefer-await-to-then": "error", - "tsdoc/syntax": "off", - "sonarjs/no-nested-switch": "off", - "id-length": "off", - "no-restricted-globals": "off", - "n/prefer-global/process": "off", - "no-promise-executor-return": "off", - "jsdoc/no-undefined-types": "off", - "prettier/prettier": "off", - "n/shebang": "off" - } -}; diff --git a/.config/.eslintrc.web.js b/.config/.eslintrc.web.js deleted file mode 100644 index 923461b1..00000000 --- a/.config/.eslintrc.web.js +++ /dev/null @@ -1,27 +0,0 @@ -const path = require("path"); - -module.exports = { - extends: ["neon/common", "neon/browser", "neon/node", "neon/typescript", "neon/react", "neon/next", "neon/edge", "neon/prettier"], - settings: { - react: { - version: "detect", - }, - }, - parserOptions: { - project: "../../tsconfig.eslint.json", - ecmaFeatures: { - jsx: true, - }, - }, - rules: { - "react/react-in-jsx-scope": 0, - "react/jsx-filename-extension": [ - 1, - { - extensions: [".tsx"], - }, - ], - "react/prop-types": 0, - "@next/next/no-html-link-for-pages": [2, path.join(__dirname, "apps", "docs")], - }, -}; diff --git a/.config/.lintstagedrc.json b/.config/.lintstagedrc.json deleted file mode 100644 index 3c0d7e02..00000000 --- a/.config/.lintstagedrc.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/lintstagedrc.schema.json", - "*.{js,ts,tsx,jsx}": ["pnpm prettier"], - "*.{json,md,html,js,jsx,ts,tsx}": ["pnpm prettier"] -} diff --git a/.config/.prettierignore b/.config/.prettierignore deleted file mode 100644 index d3871169..00000000 --- a/.config/.prettierignore +++ /dev/null @@ -1,11 +0,0 @@ -**/node_modules/** -**/dist/** -**/types/** -**/.next/** - -pnpm-lock.yaml -.eslintrc.js -*.d.ts - -packages/**/*.js -apps/**/*.js diff --git a/.config/.prettierrc.json b/.config/.prettierrc.json deleted file mode 100644 index 7c7de399..00000000 --- a/.config/.prettierrc.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/prettierrc.json", - "endOfLine": "auto", - "printWidth": 200, - "semi": true, - "tabWidth": 4, - "trailingComma": "all", - "quoteProps": "consistent" -} diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 36f992fb..6b599330 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -9,9 +9,9 @@ If you wish to contribute to the codebase or documentation, feel free to fork th To get ready to work on the codebase, please do the following: - Fork & clone the repository, and make sure you're on the main branch -- Run pnpm install -r +- Run bun install -r - Code your heart out! -- Run pnpm run test to run ESLint and ensure any JSDoc changes are valid +- Run bun run test to run Biome and ensure any JSDoc changes are valid - Submit a pull request (Make sure you follow the conventional commit format) > Adapted from https://github.com/discordjs/discord.js/blob/master/.github/CONTRIBUTING.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 74a7883e..6545b42c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,49 +11,29 @@ on: pull_request: jobs: - ci-workflow: + lint: runs-on: ubuntu-latest steps: - name: Clone repo uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v1 - - uses: pnpm/action-setup@v2 - name: Install pnpm - id: pnpm-install - with: - version: 8.6.3 - run_install: false - - - name: Get pnpm store directory - id: pnpm-cache - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- + - name: Install dependencies + run: bun install - - name: Set up Node v16 - uses: actions/setup-node@v3 - with: - node-version: "16" + - name: Run linter + run: bun run check + build: + runs-on: ubuntu-latest + steps: + - name: Clone repo + uses: actions/checkout@v3 + - uses: oven-sh/setup-bun@v1 - name: Install dependencies - run: pnpm install -r + run: bun install - name: Run TypeScript Compiler - run: pnpm run build - - - name: Run linter - run: pnpm run lint - - - name: Run Prettier - run: pnpm run prettier:check + run: bun run build - # - name: Run tests - # run: pnpm run test + \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 55a353ef..66b68faa 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,27 +11,16 @@ jobs: uses: actions/checkout@v3 with: token: ${{ secrets.API_TOKEN_GITHUB }} - - - name: Install PNPM - uses: pnpm/action-setup@6e1964dde3397a825e79e4607ad57f3f7ca2c7cb - with: - version: 8.6.3 - - - name: Set up Node v16 - uses: actions/setup-node@v3 - with: - node-version: "16" - cache: "pnpm" - registry-url: " https://registry.npmjs.org" + - uses: oven-sh/setup-bun@v1 - name: Install dependencies - run: pnpm install -r + run: bun install - - name: Build Package - run: pnpm run build + - name: Build packages + run: bun run build - name: Apply version changes to packages - run: pnpm run changeset:version + run: bun run changeset:version - name: Commit package.json changes uses: EndBug/add-and-commit@v9 @@ -42,7 +31,7 @@ jobs: push: true - name: Release - run: pnpm recursive publish + run: bun recursive publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 82586325..926730d4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,26 +14,16 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 - - - name: Install PNPM - uses: pnpm/action-setup@6e1964dde3397a825e79e4607ad57f3f7ca2c7cb - with: - version: 8.6.3 - - - name: Install Node v14 - uses: actions/setup-node@v3 - with: - node-version: "16" - cache: "pnpm" + - uses: oven-sh/setup-bun@v1 - name: Install dependencies - run: pnpm install -r - + run: bun install + - name: Build project - run: pnpm run build + run: bun run build - name: Build the docs - run: pnpm run docs + run: bun run docs - name: Commit the Docs uses: cpina/github-action-push-to-another-repository@main diff --git a/.husky/pre-commit b/.husky/pre-commit index edae953c..86625e2c 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" -npx lint-staged --config .config/.lintstagedrc.json +bun run check:fix \ No newline at end of file diff --git a/apps/docs/next.config.js b/apps/docs/next.config.js index 05f7336f..22fd0d3c 100644 --- a/apps/docs/next.config.js +++ b/apps/docs/next.config.js @@ -1,20 +1,23 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - reactStrictMode: true, - swcMinify: true, - images: { - domains: ["raw.githubusercontent.com"], - }, - eslint: { - ignoreDuringBuilds: true, - }, - webpack: (config) => { - // this will override the experiments - config.experiments = { ...config.experiments, topLevelAwait: true }; - // this will just update topLevelAwait property of config.experiments - // config.experiments.topLevelAwait = true - return config; - }, + reactStrictMode: true, + swcMinify: true, + images: { + domains: ["raw.githubusercontent.com"], + }, + eslint: { + ignoreDuringBuilds: true, + }, + webpack: (config) => { + // this will override the experiments + config.experiments = { + ...config.experiments, + topLevelAwait: true, + }; + // this will just update topLevelAwait property of config.experiments + // config.experiments.topLevelAwait = true + return config; + }, }; module.exports = nextConfig; diff --git a/apps/docs/package.json b/apps/docs/package.json index 4bd84f55..8c65f58a 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -3,7 +3,6 @@ "version": "0.1.0", "private": true, "scripts": { - "lint": "eslint --ignore-path ../../.config/.eslintignore --config ../../.config/.eslintrc.web.js src", "dev": "next dev", "build": "next build", "start": "next start" @@ -28,4 +27,4 @@ "react-code-blocks": "0.0.9-0", "react-dom": "18.2.0" } -} +} \ No newline at end of file diff --git a/apps/docs/postcss.config.js b/apps/docs/postcss.config.js index 67cdf1a5..e873f1a4 100644 --- a/apps/docs/postcss.config.js +++ b/apps/docs/postcss.config.js @@ -1,6 +1,6 @@ module.exports = { - plugins: { - tailwindcss: {}, - autoprefixer: {}, - }, + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, }; diff --git a/apps/docs/src/components/Breadcrumb.tsx b/apps/docs/src/components/Breadcrumb.tsx index b4b94e3c..75d78fd0 100644 --- a/apps/docs/src/components/Breadcrumb.tsx +++ b/apps/docs/src/components/Breadcrumb.tsx @@ -1,5 +1,5 @@ import type { IconDefinition } from "@fortawesome/free-solid-svg-icons"; -import { faBox, faBook, faHome } from "@fortawesome/free-solid-svg-icons"; +import { faBook, faBox, faHome } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Link from "next/link"; import { useRouter } from "next/router"; @@ -13,15 +13,30 @@ export const Breadcrumb = () => { if (typeof lib !== "string") return null; const defaultPaths: Path[] = [ - { name: "Home", icon: faHome, path: "/" }, - { name: "Docs", icon: faBook, path: "/docs" }, - { name: lib, icon: faBox, path: `/docs/${lib}` }, + { + name: "Home", + icon: faHome, + path: "/", + }, + { + name: "Docs", + icon: faBook, + path: "/docs", + }, + { + name: lib, + icon: faBox, + path: `/docs/${lib}`, + }, ]; const splittedPaths: Path[] = asPath .split("/") .slice(3) - .map((x) => ({ name: capitalize(x), path: `/docs/${lib}/${x}` })); + .map((x) => ({ + name: capitalize(x), + path: `/docs/${lib}/${x}`, + })); const combinedPaths = [...defaultPaths, ...splittedPaths]; const activePath = combinedPaths.find((x) => x.path === asPath); if (activePath) activePath.isActive = true; @@ -32,11 +47,7 @@ export const Breadcrumb = () => { {combinedPaths.map((path, index, arr) => { const res = (
  • - + {path.icon && } {path.name} diff --git a/apps/docs/src/components/Copiable.tsx b/apps/docs/src/components/Copiable.tsx index 434b20d3..92c1f565 100644 --- a/apps/docs/src/components/Copiable.tsx +++ b/apps/docs/src/components/Copiable.tsx @@ -1,22 +1,23 @@ import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons"; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import { useState } from "react" +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { useState } from "react"; export const Copiable = ({ text }: { text: string }) => { const [recentlyCopied, setRecentlyCopied] = useState(false); - return
    { - await navigator.clipboard.writeText(text); - setRecentlyCopied(true); - setTimeout(() => setRecentlyCopied(false), 750); - }}> -

    - {text} - {recentlyCopied ? - - : - } -

    -
    -} \ No newline at end of file + return ( + + ); +}; diff --git a/apps/docs/src/components/Footer.tsx b/apps/docs/src/components/Footer.tsx index 327e4326..b6ab85af 100644 --- a/apps/docs/src/components/Footer.tsx +++ b/apps/docs/src/components/Footer.tsx @@ -1,28 +1,19 @@ -const HoverableLink = ({ link, children }: { children: any; link: string }) => ( - - {children} - +import React from "react"; + +const HoverableLink = ({ link, children }: { children: React.ReactNode[] | React.ReactNode; link: string }) => ( + + {children} + ); export const Footer = ({ buildDate }: { buildDate?: number }) => { - return ( -
    - - - Guilded.JS - - , docs site built with{" "} - Next.js and{" "} - - TailwindCSS - - .{" "} - - Jetbrains Mono - {" "} - is the font.{" "} - {buildDate && `Last built at ${new Date(buildDate).toISOString()}`} - -
    - ); + return ( +
    + + Guilded.JS, docs site built with Next.js and{" "} + TailwindCSS. Jetbrains Mono is the font.{" "} + {buildDate && `Last built at ${new Date(buildDate).toISOString()}`} + +
    + ); }; diff --git a/apps/docs/src/components/LayoutWrapper.tsx b/apps/docs/src/components/LayoutWrapper.tsx index 0cd85318..4d0e5c18 100644 --- a/apps/docs/src/components/LayoutWrapper.tsx +++ b/apps/docs/src/components/LayoutWrapper.tsx @@ -1,11 +1,13 @@ +import React from "react"; import { Breadcrumb } from "./Breadcrumb"; import { Footer } from "./Footer"; import { Navbar } from "./Navbar"; -export const LayoutWrapper = ({ buildDate, children }: { buildDate?: number, children: any }) => +export const LayoutWrapper = ({ buildDate, children }: { buildDate?: number; children: React.ReactNode[] | React.ReactNode }) => (
    {children}
    -
    \ No newline at end of file + +); diff --git a/apps/docs/src/components/Navbar.tsx b/apps/docs/src/components/Navbar.tsx index fd8cd709..72739b7b 100644 --- a/apps/docs/src/components/Navbar.tsx +++ b/apps/docs/src/components/Navbar.tsx @@ -2,58 +2,43 @@ import Link from "next/link"; import { useState } from "react"; const topBars = { - Docs: "/docs", - Guide: "/guide", - Github: "https://github.com/zaida04/guilded.js", - "Support Server": "https://guilded.gg/guildedjs", - "Legacy Docs": "https://guildedjs.github.io/", + Docs: "/docs", + Guide: "/guide", + Github: "https://github.com/zaida04/guilded.js", + "Support Server": "https://guilded.gg/guildedjs", + "Legacy Docs": "https://guildedjs.github.io/", }; export const Navbar = () => { - const [expanded, setExpanded] = useState(false); + const [expanded, setExpanded] = useState(false); - return ( -
    - -
    - ); + return ( +
    + +
    + ); }; diff --git a/apps/docs/src/components/PackageBadge.tsx b/apps/docs/src/components/PackageBadge.tsx index d1d90fb5..6bbc4716 100644 --- a/apps/docs/src/components/PackageBadge.tsx +++ b/apps/docs/src/components/PackageBadge.tsx @@ -3,10 +3,11 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import Link from "next/link"; import { getUnscopedPackageName } from "../lib/util"; -export const PackageBadge = ({ text }: { text: string }) => +export const PackageBadge = ({ text }: { text: string }) => (

    {text}

    - \ No newline at end of file + +); diff --git a/apps/docs/src/components/RefLink.tsx b/apps/docs/src/components/RefLink.tsx index 67c22c97..ee7bc24d 100644 --- a/apps/docs/src/components/RefLink.tsx +++ b/apps/docs/src/components/RefLink.tsx @@ -1,3 +1,7 @@ import Link from "next/link"; -export const RefLink = ({ lib, name }: { lib: string, name: string }) => {name} +export const RefLink = ({ lib, name }: { lib: string; name: string }) => ( + + {name} + +); diff --git a/apps/docs/src/components/customIcons/BreadCrumbSep.tsx b/apps/docs/src/components/customIcons/BreadCrumbSep.tsx index 23df3364..2eee1358 100644 --- a/apps/docs/src/components/customIcons/BreadCrumbSep.tsx +++ b/apps/docs/src/components/customIcons/BreadCrumbSep.tsx @@ -1,7 +1,9 @@ -import { memo } from "react" +import { memo } from "react"; export const BreadCrumbSep = memo(() => { - return -}) \ No newline at end of file + return ( + + ); +}); diff --git a/apps/docs/src/lib/types.ts b/apps/docs/src/lib/types.ts index d4fe4b54..38872690 100644 --- a/apps/docs/src/lib/types.ts +++ b/apps/docs/src/lib/types.ts @@ -2,9 +2,9 @@ import type { DeclarationReflection } from "typedoc/dist/lib/models/reflections/ export type EntityType = { comment?: { summary: { kind: string; text: string }[] }; name: string }; export type Entity = { - accessors: DeclarationReflection[]; - constructors: DeclarationReflection[]; - methods: DeclarationReflection[]; - name: string; - properties: DeclarationReflection[]; + accessors: DeclarationReflection[]; + constructors: DeclarationReflection[]; + methods: DeclarationReflection[]; + name: string; + properties: DeclarationReflection[]; }; diff --git a/apps/docs/src/pages/_app.tsx b/apps/docs/src/pages/_app.tsx index 8aa6800f..94846a88 100644 --- a/apps/docs/src/pages/_app.tsx +++ b/apps/docs/src/pages/_app.tsx @@ -1,11 +1,17 @@ -import '../styles/globals.css' -import '@fortawesome/fontawesome-svg-core/styles.css'; -import localFont from '@next/font/local' -import type { AppProps } from 'next/app' +import "@fortawesome/fontawesome-svg-core/styles.css"; +import localFont from "@next/font/local"; +import type { AppProps } from "next/app"; +import "../styles/globals.css"; -const Mono = localFont({ src: '../styles/fonts/webfonts/JetBrainsMono-Regular.woff2', variable: '--font-mono', display: "swap" }) +const Mono = localFont({ + src: "../styles/fonts/webfonts/JetBrainsMono-Regular.woff2", + variable: "--font-mono", + display: "swap", +}); export default function App({ Component, pageProps }: AppProps) { - return
    - -
    + return ( +
    + +
    + ); } diff --git a/apps/docs/src/pages/docs/index.tsx b/apps/docs/src/pages/docs/index.tsx index 5add96ba..2473785c 100644 --- a/apps/docs/src/pages/docs/index.tsx +++ b/apps/docs/src/pages/docs/index.tsx @@ -11,9 +11,9 @@ type Props = { packages: string[] }; // }; const Docs: NextPage = ({ packages }) => { - return ( - - {/*
    + return ( + + {/*
    = ({ packages }) => {
    */} -
    -

    Packages:

    - -
    -

    - Click here for stable docs -

    -
    -
    - {/* {packages +
    +

    Packages:

    + +
    +

    Click here for stable docs

    +
    +
    + {/* {packages .sort((a, b) => a.length - b.length) .map((x) => ( ))} */} -
    - - ); +
    +
    + ); }; export default Docs; diff --git a/apps/docs/src/pages/index.tsx b/apps/docs/src/pages/index.tsx index 656697ca..134ceeb6 100644 --- a/apps/docs/src/pages/index.tsx +++ b/apps/docs/src/pages/index.tsx @@ -24,12 +24,13 @@ export const getStaticProps = (): GetStaticPropsResult<{ buildDate: number }> => const buildDate = Date.now(); return { props: { - buildDate - } - } -} + buildDate, + }, + }; +}; -const description = "Guilded.js is a library written in TypeScript usable in either TypeScript or JavaScript projects. It provides structures, abstractions, and utilities for interaction with the Guilded API."; +const description = + "Guilded.js is a library written in TypeScript usable in either TypeScript or JavaScript projects. It provides structures, abstractions, and utilities for interaction with the Guilded API."; export default function Home({ buildDate }: InferGetStaticPropsType) { return ( @@ -54,7 +55,9 @@ export default function Home({ buildDate }: InferGetStaticPropsType
    - {["npm install guilded.js", "yarn add guilded.js", "pnpm add guilded.js"].map(click => )} + {["npm install guilded.js", "yarn add guilded.js", "pnpm add guilded.js"].map((click) => ( + + ))}
    @@ -74,5 +77,5 @@ export default function Home({ buildDate }: InferGetStaticPropsType - ) + ); } diff --git a/apps/docs/tailwind.config.js b/apps/docs/tailwind.config.js index 0b34a9fb..98643746 100644 --- a/apps/docs/tailwind.config.js +++ b/apps/docs/tailwind.config.js @@ -1,37 +1,34 @@ const colors = require("tailwindcss/colors"); const { fontFamily } = require("tailwindcss/defaultTheme"); -delete colors["lightBlue"]; -delete colors["warmGray"]; -delete colors["trueGray"]; -delete colors["coolGray"]; -delete colors["blueGray"]; +colors.lightBlue = undefined; +colors.warmGray = undefined; +colors.trueGray = undefined; +colors.coolGray = undefined; +colors.blueGray = undefined; /** @type {import('tailwindcss').Config} */ module.exports = { - content: ["./src/**/*.{js,ts,jsx,tsx}"], - theme: { - extend: { - fontFamily: { - sans: ["var(--font-mono)", ...fontFamily.sans], - }, - colors: { - ...colors, - }, - borderWidth: { - ".5": ".5px", - }, - borderColor: { - guilded: "#F5C400", - slate: "#292B32", - }, - colors: { - gray: "#191B1F", - guilded: "#F5C400", - black: "#111820", - slate: "#292B32", - white: "#ececee", - }, - }, - }, - plugins: [], + content: ["./src/**/*.{js,ts,jsx,tsx}"], + theme: { + extend: { + fontFamily: { + sans: ["var(--font-mono)", ...fontFamily.sans], + }, + borderWidth: { + ".5": ".5px", + }, + borderColor: { + guilded: "#F5C400", + slate: "#292B32", + }, + colors: { + gray: "#191B1F", + guilded: "#F5C400", + black: "#111820", + slate: "#292B32", + white: "#ececee", + }, + }, + }, + plugins: [], }; diff --git a/biome.json b/biome.json new file mode 100644 index 00000000..88627a6a --- /dev/null +++ b/biome.json @@ -0,0 +1,36 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.4.1/schema.json", + "organizeImports": { + "enabled": true + }, + "files": { + "ignore": [ + "dist", + "node_modules", + "types", + ".next", + "generated", + "*.json" + ] + }, + "formatter": { + "enabled": true, + "lineEnding": "lf", + "indentWidth": 2, + "indentStyle": "tab", + "lineWidth": 200 + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "style": { + "noNonNullAssertion": "off", + "noParameterAssign": "off" + }, + "suspicious": { + "noArrayIndexKey": "off" + } + } + } +} \ No newline at end of file diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..8f7b1c9659555aa3cb99bc6581239040f64eaf3f GIT binary patch literal 264128 zcmeF4cU({Z`~P2&8A2LTR%Szp$V?)Vs8B}Hc(t^&h>%TW&+JXf&fbwNd+(hsd;hLS z=UgAJcQ@}|=j8kQ@BO^JPuJ`Dd|vnKx}Nhq&v})%Nj1xus7OnnpfF2i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t2)2!ARp2|kRpTzRvp3+F|%G_0RXoPV~f%Wyrf2P z6l|byA`~ui7zIco`d`bDnIp1C#SVVBLkIcto&N2(Z@zl){{4pZ%fi(-UB4$n*q>=g zrRzH~-?S}{o$>n_w_Kl24Ih5^o{xOcI{4CEfB9v?LD6Hjf4JRgZ)|k>Zd=UQtK!W+ zx9|1S9FgmJEA$ioqJBH>o6XdgB~oyAPbSNhi)z_1a2Ek9?%!{4P_aVdM)=!a zLZ$s_S6VhZ7b)yw$HD`|&HpzI&t|8tFD(Sz3jc3nV+aqNqucjhyPZS3F=F+f)t^?s zS^a7CpVhCCO;rDt>tEk~9EUS#sRlRm4Dv7!s!)ypH;Y7O_r-4~{9cIPZSXr<$M45) Rcf=>*cMJUD=l`pJ{|i`#pw$2X literal 0 HcmV?d00001 diff --git a/package.json b/package.json index 32f198dc..03b5055b 100644 --- a/package.json +++ b/package.json @@ -1,63 +1,59 @@ { - "name": "@guildedjs/main", - "private": true, - "version": "0.0.0", - "description": "Overarching repository for the Guilded.JS repository", - "author": "Zaid \"Nico\" ", - "scripts": { - "build": "pnpm --filter=!docs recursive run build", - "build:typecheck": "pnpm --filter=!docs recursive run build:typecheck", - "lint": "pnpm recursive --no-bail run lint", - "lint:fix": "pnpm run lint --fix", - "prettier": "prettier --ignore-path .config/.prettierignore --config .config/.prettierrc.json --write **/*.{ts,js,json,yml,yaml,md}", - "prettier:check": "prettier --ignore-path .config/.prettierignore --config .config/.prettierrc.json --check **/*.{ts,js,json,yml,yaml,md}", - "changeset": "changeset", - "changeset:version": "changeset version", - "docs": "typedoc && cd docs && find . -type f -name \"*.html\" -exec sed -i'' -e 's/__namedParameters/options/g' {} +", - "prepublishOnly": "pnpm run lint && pnpm recursive run prepublishOnly", - "prepare": "husky install" + "name": "@guildedjs/main", + "private": true, + "version": "0.0.0", + "description": "Overarching repository for the Guilded.JS repository", + "author": "Zaid \"Nico\" ", + "scripts": { + "build": "turbo run build", + "build:typecheck": "turbo run build:typecheck", + "check": "biome check apps packages services", + "check:fix": "biome check --apply-unsafe apps packages services", + "changeset": "changeset", + "changeset:version": "changeset version", + "docs": "typedoc && cd docs && find . -type f -name \"*.html\" -exec sed -i'' -e 's/__namedParameters/options/g' {} +", + "prepublishOnly": "turbo run prepublishOnly", + "prepare": "husky install" + }, + "devDependencies": { + "@biomejs/biome": "1.5.2", + "@changesets/cli": "^2.26.1", + "@types/node": "18.16.12", + "dotenv": "16.0.3", + "gen-esm-wrapper": "1.1.3", + "husky": "7.0.4", + "lint-staged": "13.2.2", + "nodemon": "^2.0.22", + "rimraf": "5.0.1", + "turbo": "^1.11.2", + "typedoc": "0.24.7", + "typescript": "5.0.4" + }, + "contributors": [ + { + "name": "Zaid \"Nico\"", + "email": "contact@nico.engineer", + "url": "https://github.com/zaida04" }, - "devDependencies": { - "@changesets/cli": "^2.26.1", - "@types/node": "18.16.12", - "dotenv": "16.0.3", - "eslint": "8.40.0", - "eslint-config-neon": "0.1.47", - "gen-esm-wrapper": "1.1.3", - "husky": "7.0.4", - "lint-staged": "13.2.2", - "nodemon": "^2.0.22", - "pnpm": "8.5.1", - "prettier": "2.8.8", - "rimraf": "5.0.1", - "ts-node": "10.9.1", - "typedoc": "0.24.7", - "typescript": "5.0.4" + { + "name": "Skillz4Killz", + "email": "guildedjs@drskillz.33mail.com", + "url": "https://github.com/Skillz4Killz" }, - "contributors": [ - { - "name": "Zaid \"Nico\"", - "email": "contact@nico.engineer", - "url": "https://github.com/zaida04" - }, - { - "name": "Skillz4Killz", - "email": "guildedjs@drskillz.33mail.com", - "url": "https://github.com/Skillz4Killz" - }, - { - "name": "Uhuh \"Dylan\"", - "email": "dylan@panku.io", - "url": "https://github.com/uhuh" - }, - { - "name": "DaStormer", - "email": "dastormer@stormdevelopmentz.xyz", - "url": "https://github.com/DaStormer" - } - ], - "engines": { - "npm": "only-allow pnpm", - "node": ">= 16.0.0" + { + "name": "Uhuh \"Dylan\"", + "email": "dylan@panku.io", + "url": "https://github.com/uhuh" + }, + { + "name": "DaStormer", + "email": "dastormer@stormdevelopmentz.xyz", + "url": "https://github.com/DaStormer" } -} + ], + "workspaces": [ + "packages/*", + "services/*", + "apps/*" + ] +} \ No newline at end of file diff --git a/packages/api/__tests__/file-sending/src/index.ts b/packages/api/__tests__/file-sending/src/index.ts index abc74120..0b9474dc 100644 --- a/packages/api/__tests__/file-sending/src/index.ts +++ b/packages/api/__tests__/file-sending/src/index.ts @@ -4,7 +4,12 @@ import { WebhookClient } from "../../../lib/webhook/WebhookClient"; const client = new WebhookClient(""); void (async (): Promise => { - return client.send({ - files: [{ name: "bbb.png", content: readFileSync("./bbb.png") }], - }); + return client.send({ + files: [ + { + name: "bbb.png", + content: readFileSync("./bbb.png"), + }, + ], + }); })(); diff --git a/packages/api/lib/generated/api-typings/index.ts b/packages/api/lib/generated/api-typings/index.ts index 789dc649..fb0d5430 100644 --- a/packages/api/lib/generated/api-typings/index.ts +++ b/packages/api/lib/generated/api-typings/index.ts @@ -7,5 +7,6 @@ export type JSON = T["application/json"]; export type WSSchema = components["schemas"][T]; export type WSContent = { content: JSONContent }; -export type WSPayload = components["responses"][T]["content"]["application/json"]; +export type WSPayload = + components["responses"][T]["content"]["application/json"]; export type WSPacket = SkeletonWSPayload & { d: WSPayload }; diff --git a/packages/api/lib/generated/api-typings/v1/events.ts b/packages/api/lib/generated/api-typings/v1/events.ts index 9eebd5aa..58c400fb 100644 --- a/packages/api/lib/generated/api-typings/v1/events.ts +++ b/packages/api/lib/generated/api-typings/v1/events.ts @@ -1,62 +1,62 @@ export enum WSOpCodes { - SUCCESS, - WELCOME, - RESUME, - ERROR = 8, - PING, - PONG, + SUCCESS = 0, + WELCOME = 1, + RESUME = 2, + ERROR = 8, + PING = 9, + PONG = 10, } export const WebSocketEvents = { - CalendarEventCreated: "CalendarEventCreated", - CalendarEventUpdated: "CalendarEventUpdated", - CalendarEventDeleted: "CalendarEventDeleted", - CalendarEventRsvpUpdated: "CalendarEventRsvpUpdated", - CalendarEventRsvpManyUpdated: "CalendarEventRsvpManyUpdated", - CalendarEventRsvpDeleted: "CalendarEventRsvpDeleted", - ChatMessageCreated: "ChatMessageCreated", - ChatMessageUpdated: "ChatMessageUpdated", - ChatMessageDeleted: "ChatMessageDeleted", - ServerMemberJoined: "ServerMemberJoined", - ServerMemberRemoved: "ServerMemberRemoved", - ServerMemberUpdated: "ServerMemberUpdated", - ServerMemberBanned: "ServerMemberBanned", - ServerMemberUnbanned: "ServerMemberUnbanned", - ServerMemberSocialLinkCreated: "ServerMemberSocialLinkCreated", - ServerMemberSocialLinkUpdated: "ServerMemberSocialLinkUpdated", - ServerMemberSocialLinkDeleted: "ServerMemberSocialLinkDeleted", - BotServerMembershipCreated: "BotServerMembershipCreated", - BotServerMembershipDeleted: "BotServerMembershipDeleted", - ServerRolesUpdated: "ServerRolesUpdated", - ServerWebhookCreated: "ServerWebhookCreated", - ServerWebhookUpdated: "ServerWebhookUpdated", - ListItemCompleted: "ListItemCompleted", - ListItemUncompleted: "ListItemUncompleted", - ListItemCreated: "ListItemCreated", - ListItemUpdated: "ListItemUpdated", - ListItemDeleted: "ListItemDeleted", - ServerChannelCreated: "ServerChannelCreated", - ServerChannelUpdated: "ServerChannelUpdated", - ServerChannelDeleted: "ServerChannelDeleted", - DocCreated: "DocCreated", - DocUpdated: "DocUpdated", - DocDeleted: "DocDeleted", - ChannelMessageReactionCreated: "ChannelMessageReactionCreated", - ChannelMessageReactionDeleted: "ChannelMessageReactionDeleted", - ForumTopicCreated: "ForumTopicCreated", - ForumTopicUpdated: "ForumTopicUpdated", - ForumTopicDeleted: "ForumTopicDeleted", - ForumTopicPinned: "ForumTopicPinned", - ForumTopicUnpinned: "ForumTopicUnpinned", - ForumTopicLocked: "ForumTopicLocked", - ForumTopicUnlocked: "ForumTopicUnlocked", + CalendarEventCreated: "CalendarEventCreated", + CalendarEventUpdated: "CalendarEventUpdated", + CalendarEventDeleted: "CalendarEventDeleted", + CalendarEventRsvpUpdated: "CalendarEventRsvpUpdated", + CalendarEventRsvpManyUpdated: "CalendarEventRsvpManyUpdated", + CalendarEventRsvpDeleted: "CalendarEventRsvpDeleted", + ChatMessageCreated: "ChatMessageCreated", + ChatMessageUpdated: "ChatMessageUpdated", + ChatMessageDeleted: "ChatMessageDeleted", + ServerMemberJoined: "ServerMemberJoined", + ServerMemberRemoved: "ServerMemberRemoved", + ServerMemberUpdated: "ServerMemberUpdated", + ServerMemberBanned: "ServerMemberBanned", + ServerMemberUnbanned: "ServerMemberUnbanned", + ServerMemberSocialLinkCreated: "ServerMemberSocialLinkCreated", + ServerMemberSocialLinkUpdated: "ServerMemberSocialLinkUpdated", + ServerMemberSocialLinkDeleted: "ServerMemberSocialLinkDeleted", + BotServerMembershipCreated: "BotServerMembershipCreated", + BotServerMembershipDeleted: "BotServerMembershipDeleted", + ServerRolesUpdated: "ServerRolesUpdated", + ServerWebhookCreated: "ServerWebhookCreated", + ServerWebhookUpdated: "ServerWebhookUpdated", + ListItemCompleted: "ListItemCompleted", + ListItemUncompleted: "ListItemUncompleted", + ListItemCreated: "ListItemCreated", + ListItemUpdated: "ListItemUpdated", + ListItemDeleted: "ListItemDeleted", + ServerChannelCreated: "ServerChannelCreated", + ServerChannelUpdated: "ServerChannelUpdated", + ServerChannelDeleted: "ServerChannelDeleted", + DocCreated: "DocCreated", + DocUpdated: "DocUpdated", + DocDeleted: "DocDeleted", + ChannelMessageReactionCreated: "ChannelMessageReactionCreated", + ChannelMessageReactionDeleted: "ChannelMessageReactionDeleted", + ForumTopicCreated: "ForumTopicCreated", + ForumTopicUpdated: "ForumTopicUpdated", + ForumTopicDeleted: "ForumTopicDeleted", + ForumTopicPinned: "ForumTopicPinned", + ForumTopicUnpinned: "ForumTopicUnpinned", + ForumTopicLocked: "ForumTopicLocked", + ForumTopicUnlocked: "ForumTopicUnlocked", } as const; export type WSEvent = typeof WebSocketEvents; export type WSEventNames = keyof WSEvent; export type SkeletonWSPayload = { - d: unknown; - op: WSOpCodes; - s?: string; - t: keyof WSEvent; + d: unknown; + op: WSOpCodes; + s?: string; + t: keyof WSEvent; }; diff --git a/packages/api/lib/generated/api-typings/v1/structs/Client.ts b/packages/api/lib/generated/api-typings/v1/structs/Client.ts index 3f20c430..982f84b9 100644 --- a/packages/api/lib/generated/api-typings/v1/structs/Client.ts +++ b/packages/api/lib/generated/api-typings/v1/structs/Client.ts @@ -1,6 +1,6 @@ import type { WSPayload } from "../.."; export type ClientUserData = WSPayload<"_WelcomeMessage">["user"] & { - createdBy: string; - botId: string; + createdBy: string; + botId: string; }; diff --git a/packages/api/lib/generated/api-typings/v1/structs/Embed.ts b/packages/api/lib/generated/api-typings/v1/structs/Embed.ts index 3ab45efe..fa41b9b7 100644 --- a/packages/api/lib/generated/api-typings/v1/structs/Embed.ts +++ b/packages/api/lib/generated/api-typings/v1/structs/Embed.ts @@ -1,70 +1,70 @@ export type EmbedPayload = { - author?: EmbedAuthor; - color?: number; - description?: string; - fields?: EmbedField[]; - footer?: EmbedFooter; - image?: EmbedImage; - thumbnail?: EmbedImage; - timestamp?: string; - title?: string; - url?: string; + author?: EmbedAuthor; + color?: number; + description?: string; + fields?: EmbedField[]; + footer?: EmbedFooter; + image?: EmbedImage; + thumbnail?: EmbedImage; + timestamp?: string; + title?: string; + url?: string; }; export type EmbedFooter = { - icon_url?: string; - text: string; + icon_url?: string; + text: string; }; export type EmbedImage = { - url: string; + url: string; }; export type EmbedAuthor = { - icon_url?: string; - name: string; - url?: string; + icon_url?: string; + name: string; + url?: string; }; export type EmbedField = { - inline?: boolean; - name: string; - value: string; + inline?: boolean; + name: string; + value: string; }; // embed struct for the client API, webhooks mainly export type APIEmbed = EmbedPayload & { - author?: APIEmbedAuthor; - footer?: APIEmbedFooter; - image?: APIEmbedImage; - provider?: APIEmbedProvider; - thumbnail?: APIEmbedThumbnail; - video?: APIEmbedVideo; + author?: APIEmbedAuthor; + footer?: APIEmbedFooter; + image?: APIEmbedImage; + provider?: APIEmbedProvider; + thumbnail?: APIEmbedThumbnail; + video?: APIEmbedVideo; }; export type APIEmbedFooter = { - icon_url?: string; - proxy_icon_url?: string; - text: string; + icon_url?: string; + proxy_icon_url?: string; + text: string; }; export type APIEmbedImage = { - height?: string; - proxy_url?: string; - url: string; - width?: string; + height?: string; + proxy_url?: string; + url: string; + width?: string; }; export type APIEmbedThumbnail = APIEmbedImage; export type APIEmbedVideo = APIEmbedImage; export type APIEmbedProvider = { - name?: string; - url?: string; + name?: string; + url?: string; }; export type APIEmbedAuthor = { - icon_url?: string; - name: string; - proxy_icon_url?: string; - url?: string; + icon_url?: string; + name: string; + proxy_icon_url?: string; + url?: string; }; diff --git a/packages/api/lib/generated/api-typings/v1/structs/Webhook.ts b/packages/api/lib/generated/api-typings/v1/structs/Webhook.ts index 2d36aa43..3af631ac 100644 --- a/packages/api/lib/generated/api-typings/v1/structs/Webhook.ts +++ b/packages/api/lib/generated/api-typings/v1/structs/Webhook.ts @@ -1,48 +1,52 @@ export type WebhookContentPayload = { - botId: string | null; - channelId: string; - content: APIContent; - createdAt: string; - createdBy: string; - id: string; - type: string; - webhookId: string; + botId: + | string + | null; + channelId: string; + content: APIContent; + createdAt: string; + createdBy: string; + id: string; + type: string; + webhookId: string; }; export type APIContent = { - document: APIDocument; - object: string; + document: APIDocument; + object: string; }; type APILeaf = { - marks: APIMark[]; - object: string | "leaf"; - text: string; + marks: APIMark[]; + object: + | string + | "leaf"; + text: string; }; type APIMark = { - data: unknown; - object: string; - type: string; + data: unknown; + object: string; + type: string; }; type APIDocument = { - data: unknown; - nodes: APIDocumentNode[]; - object: string; + data: unknown; + nodes: APIDocumentNode[]; + object: string; }; type APIDocumentNode = { - data: unknown; - nodes: APINestedNode[]; - object: string; - type: string; + data: unknown; + nodes: APINestedNode[]; + object: string; + type: string; }; type APINestedNode = { - data?: unknown; - leaves?: APILeaf[]; - nodes?: APINestedNode[]; - object: string; - type?: string; + data?: unknown; + leaves?: APILeaf[]; + nodes?: APINestedNode[]; + object: string; + type?: string; }; diff --git a/packages/api/lib/generated/api-typings/v1/webhook.ts b/packages/api/lib/generated/api-typings/v1/webhook.ts index 139fa617..97a0be79 100644 --- a/packages/api/lib/generated/api-typings/v1/webhook.ts +++ b/packages/api/lib/generated/api-typings/v1/webhook.ts @@ -6,11 +6,17 @@ import type { WebhookContentPayload } from "./structs/Webhook"; * /webhooks/:webhookId/:webhookToken */ export type RESTPostWebhookBody = { - avatar_url?: string; - content?: string; - embeds?: APIEmbed[]; - payload_json?: Pick; - username?: string; + avatar_url?: string; + content?: string; + embeds?: APIEmbed[]; + payload_json?: Pick< + RESTPostWebhookBody, + | "avatar_url" + | "content" + | "embeds" + | "username" + >; + username?: string; }; export type RESTPostWebhookResult = WebhookContentPayload; diff --git a/packages/api/lib/generated/api-typings/v1/ws.ts b/packages/api/lib/generated/api-typings/v1/ws.ts index 94482029..81be3f06 100644 --- a/packages/api/lib/generated/api-typings/v1/ws.ts +++ b/packages/api/lib/generated/api-typings/v1/ws.ts @@ -8,3330 +8,3383 @@ export type paths = Record; export type webhooks = Record; export type components = { - schemas: { - _SocketEventEnvelope: { - /** - * Opcode - * - * @description An operation code corresponding to the nature of the sent message (for example, success, failure, etc.) - * @enum {integer} - */ - op: 0 | 1 | 2 | 8 | 9; - /** - * Data - * - * @description Data of any form depending on the underlying event - */ - d?: Record; - /** - * Message ID - * - * @description Message ID used for replaying events after a disconnect - */ - s?: string; - /** - * Event name - * - * @description Event name for the given message - */ - t?: string; - }; - /** - * @example { - * "id": "00000000-0000-0000-0000-000000000000", - * "type": "default", - * "serverId": "wlVr3Ggl", - * "groupId": "ZVzBo83p", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "content": "Hello **world**!", - * "embeds": [ - * { - * "title": "embed title", - * "description": "embeds support a **different** __subset__ *of* markdown than other markdown fields. <@Ann6LewA>\n\n [links](https://www.guilded.gg) ```\ncheck this code out```\n\n:pizza: time!! ttyl", - * "url": "https://www.guilded.gg", - * "color": 6118369, - * "timestamp": "2022-04-12T22:14:36.737Z", - * "footer": { - * "icon_url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png", - * "text": "footer text" - * }, - * "thumbnail": { - * "url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png" - * }, - * "image": { - * "url": "https://www.guilded.gg/asset/Logos/logomark_wordmark/Color/Guilded_Logomark_Wordmark_Color.png" - * }, - * "author": { - * "name": "Gil", - * "url": "https://www.guilded.gg", - * "icon_url": "https://www.guilded.gg/asset/Default/Gil-md.png" - * }, - * "fields": [ - * { - * "name": "hello", - * "value": "these are fields" - * }, - * { - * "name": "~~help i have been crossed out~~", - * "value": "~~oh noes~~", - * "inline": true - * }, - * { - * "name": "another inline", - * "value": "field", - * "inline": true - * } - * ] - * } - * ], - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA" - * } - */ - ChatMessage: { - /** - * Message ID - * Format: uuid - * - * @description The ID of the message - */ - id: string; - /** - * Type - * - * @description The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. - * @enum {string} - */ - type: "default" | "system"; - /** - * Server ID - * - * @description The ID of the server - */ - serverId?: string; - /** - * Group ID - * - * @description The ID of the group - */ - groupId?: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Content - * Format: markdown - * - * @description The content of the message - */ - content?: string; - embeds?: components["schemas"]["ChatEmbed"][]; - /** @description Message IDs that were replied to */ - replyMessageIds?: string[]; - /** - * Is private - * - * @description If set, this message will only be seen by those mentioned or replied to - */ - isPrivate?: boolean; - /** - * Is silent - * - * @description If set, this message did not notify mention or reply recipients - * @default false - */ - isSilent?: boolean; - mentions?: components["schemas"]["Mentions"]; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the message was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this message (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * Created by Webhook ID - * - * @description The ID of the webhook who created this message, if it was created by a webhook - */ - createdByWebhookId?: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the message was updated at, if relevant - */ - updatedAt?: string; - }; - /** - * @example { - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdBy": "Ann6LewA", - * "emote": { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * }, - * "messageId": "00000000-0000-0000-0000-000000000000" - * } - */ - ChatMessageReaction: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * User ID - * - * @description The ID of the user who added the reaction - */ - createdBy: string; - emote: components["schemas"]["Emote"]; - /** - * Message ID - * Format: uuid - * - * @description The ID of the message - */ - messageId: string; - }; - /** - * @description Rich content sections optionally associated with chat messages. Properties with "webhook-markdown" support allow for the following: link, italic, bold, strikethrough, underline, inline code, block code, reaction, and mention. - * @example { - * "title": "embed title", - * "description": "embeds support a **different** __subset__ *of* markdown than other markdown fields. <@Ann6LewA>\n\n [links](https://www.guilded.gg) ```\ncheck this code out```\n\n:pizza: time!! ttyl", - * "url": "https://www.guilded.gg", - * "color": 6118369, - * "timestamp": "2022-04-12T22:14:36.737Z", - * "footer": { - * "icon_url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png", - * "text": "footer text" - * }, - * "thumbnail": { - * "url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png" - * }, - * "image": { - * "url": "https://www.guilded.gg/asset/Logos/logomark_wordmark/Color/Guilded_Logomark_Wordmark_Color.png" - * }, - * "author": { - * "name": "Gil", - * "url": "https://www.guilded.gg", - * "icon_url": "https://www.guilded.gg/asset/Default/Gil-md.png" - * }, - * "fields": [ - * { - * "name": "hello", - * "value": "these are fields" - * }, - * { - * "name": "~~help i have been crossed out~~", - * "value": "~~oh noes~~", - * "inline": true - * }, - * { - * "name": "another inline", - * "value": "field", - * "inline": true - * } - * ] - * } - */ - ChatEmbed: { - /** - * Format: webhook-markdown - * - * @description Main header of the embed - */ - title?: string; - /** - * Format: webhook-markdown - * - * @description Subtext of the embed - */ - description?: string; - /** - * Format: uri - * - * @description URL to linkify the `title` field with - */ - url?: string; - /** @description Decimal value of the color that the left border should be */ - color?: number; - /** @description A small section at the bottom of the embed */ - footer?: { - /** - * Format: media-uri - * - * @description URL of a small image to put in the footer - */ - icon_url?: string; - /** @description Text of the footer */ - text: string; - }; - /** - * Format: date-time - * - * @description A timestamp to put in the footer - */ - timestamp?: string; - /** @description An image to the right of the embed's content */ - thumbnail?: { - /** - * Format: media-uri - * - * @description URL of the image - */ - url?: string; - }; - /** @description The main picture to associate with the embed */ - image?: { - /** - * Format: media-uri - * - * @description URL of the image - */ - url?: string; - }; - /** @description A small section above the title of the embed */ - author?: { - /** @description Name of the author */ - name?: string; - /** - * Format: uri - * - * @description URL to linkify the author's `name` field - */ - url?: string; - /** - * Format: media-uri - * - * @description URL of a small image to display to the left of the author's `name` - */ - icon_url?: string; - }; - /** @description Table-like cells to add to the embed */ - fields?: { - /** - * Format: webhook-markdown - * - * @description Header of the table-like cell - */ - name: string; - /** - * Format: webhook-markdown - * - * @description Subtext of the table-like cell - */ - value: string; - /** - * @description If the field should wrap or not - * @default false - */ - inline?: boolean; - }[]; - }; - /** - * @example { - * "type": "roblox", - * "userId": "Ann6LewA", - * "handle": "builderman", - * "serviceId": "156", - * "createdAt": "2006-03-08T20:15:00.706Z" - * } - */ - SocialLink: { - /** - * Social link type - * - * @description The type of social link that Guilded supports. Depending on this value, `handle` or `serviceId` may or may not be present - * @enum {string} - */ - type: "bnet" | "epic" | "facebook" | "origin" | "patreon" | "psn" | "roblox" | "steam" | "switch" | "twitch" | "twitter" | "xbox" | "youtube"; - /** - * User ID - * - * @description The ID of the user that the social link is associated with - */ - userId: string; - /** @description The handle of the user within the external service */ - handle?: string; - /** @description The unique ID that represents this member's social link within the external service */ - serviceId?: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the social link was created at - */ - createdAt: string; - }; - /** - * @description Metadata of who or what is mentioned in content - * @example { - * "users": [ - * { - * "id": "Ann6LewA" - * } - * ], - * "channels": [ - * { - * "id": "00000000-0000-0000-0000-000000000000" - * } - * ], - * "roles": [ - * { - * "id": 591232 - * } - * ], - * "everyone": true, - * "here": true - * } - */ - Mentions: { - /** - * Users - * - * @description Info on mentioned users - */ - users?: { - /** - * User ID - * - * @description The ID of the user - */ - id: string; - }[]; - /** - * Channels - * - * @description Info on mentioned channels - */ - channels?: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - id: string; - }[]; - /** - * Roles - * - * @description Info on mentioned roles - */ - roles?: { - /** - * Role ID - * - * @description The ID of the role - */ - id: number; - }[]; - /** - * Everyone - * - * @description If @everyone was mentioned - */ - everyone?: boolean; - /** - * Here - * - * @description If @here was mentioned - */ - here?: boolean; - }; - /** - * @example { - * "id": 1234567890, - * "content": "Great idea!", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "forumTopicId": 2036274747, - * "createdBy": "Ann6LewA" - * } - */ - ForumTopicComment: { - /** @description The ID of the forum topic comment */ - id: number; - /** - * Content - * Format: markdown - * - * @description The content of the forum topic comment - */ - content: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the forum topic comment was created at - */ - createdAt: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the forum topic comment was updated at, if relevant - */ - updatedAt?: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** @description The ID of the forum topic */ - forumTopicId: number; - /** - * Created by - * - * @description The ID of the user who created this forum topic comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - mentions?: components["schemas"]["Mentions"]; - }; - /** - * @example { - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdBy": "Ann6LewA", - * "emote": { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * }, - * "forumTopicId": 123456 - * } - */ - ForumTopicReaction: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * User ID - * - * @description The ID of the user who added the reaction - */ - createdBy: string; - emote: components["schemas"]["Emote"]; - /** @description The ID of the forum topic */ - forumTopicId: number; - }; - /** - * @example { - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdBy": "Ann6LewA", - * "emote": { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * }, - * "forumTopicId": 123456, - * "forumTopicCommentId": 1234567890 - * } - */ - ForumTopicCommentReaction: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * User ID - * - * @description The ID of the user who added the reaction - */ - createdBy: string; - emote: components["schemas"]["Emote"]; - /** @description The ID of the forum topic */ - forumTopicId: number; - /** @description The ID of the forum topic comment */ - forumTopicCommentId: number; - }; - /** - * @example { - * "id": 123456, - * "serverId": "wlVr3Ggl", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "title": "Welcome new members!!", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA", - * "content": "Please introduce yourself in this topic!!!" - * } - */ - ForumTopic: { - /** @description The ID of the forum topic */ - id: number; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Title - * - * @description The title of the forum topic - */ - title: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the forum topic was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the forum topic was updated at, if relevant - */ - updatedAt?: string; - /** - * Bumped at - * Format: date-time - * - * @description The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. - */ - bumpedAt?: string; - /** - * Is pinned - * - * @default false - */ - isPinned?: boolean; - /** - * Is locked - * - * @default false - */ - isLocked?: boolean; - /** - * Content - * Format: markdown - * - * @description The content of the forum topic - */ - content: string; - mentions?: components["schemas"]["Mentions"]; - }; - /** - * @example { - * "id": 123456, - * "serverId": "wlVr3Ggl", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "title": "Welcome new members!!", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA" - * } - */ - ForumTopicSummary: { - /** @description The ID of the forum topic */ - id: number; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Title - * - * @description The title of the forum topic - */ - title: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the forum topic was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the forum topic was updated at, if relevant - */ - updatedAt?: string; - /** - * Bumped at - * Format: date-time - * - * @description The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. - */ - bumpedAt?: string; - /** - * Is pinned - * - * @default false - */ - isPinned?: boolean; - /** - * Is locked - * - * @default false - */ - isLocked?: boolean; - }; - /** - * @example { - * "id": "00000000-0000-0000-0000-000000000000", - * "serverId": "wlVr3Ggl", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "message": "Remember to say hello **world**!", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA", - * "note": { - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA", - * "content": "Duly noted" - * } - * } - */ - ListItem: { - /** - * Format: uuid - * - * @description The ID of the list item - */ - id: string; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Message - * Format: markdown - * - * @description The message of the list item - */ - message: string; - mentions?: components["schemas"]["Mentions"]; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the list item was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * Created by Webhook ID - * - * @description The ID of the webhook who created this list item, if it was created by a webhook - */ - createdByWebhookId?: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the list item was updated at, if relevant - */ - updatedAt?: string; - /** - * Updated by - * - * @description The ID of the user who updated this list item - */ - updatedBy?: string; - /** - * Format: uuid - * - * @description The ID of the parent list item if this list item is nested - */ - parentListItemId?: string; - /** - * Completed at - * Format: date-time - * - * @description The ISO 8601 timestamp that the list item was completed at - */ - completedAt?: string; - /** - * Completed by - * - * @description The ID of the user who completed this list item - */ - completedBy?: string; - note?: { - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this note - */ - createdBy: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the note was updated at, if relevant - */ - updatedAt?: string; - /** - * Updated by - * - * @description The ID of the user who updated this note - */ - updatedBy?: string; - mentions?: components["schemas"]["Mentions"]; - /** - * Note - * Format: markdown - * - * @description The note of the list item - */ - content: string; - }; - }; - /** - * @example { - * "id": "00000000-0000-0000-0000-000000000000", - * "serverId": "wlVr3Ggl", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "message": "Remember to say hello **world**!", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA", - * "note": { - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA" - * } - * } - */ - ListItemSummary: { - /** - * Format: uuid - * - * @description The ID of the list item - */ - id: string; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Message - * Format: markdown - * - * @description The message of the list item - */ - message: string; - mentions?: components["schemas"]["Mentions"]; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the list item was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * Created by Webhook ID - * - * @description The ID of the webhook who created this list item, if it was created by a webhook - */ - createdByWebhookId?: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the list item was updated at, if relevant - */ - updatedAt?: string; - /** - * Updated by - * - * @description The ID of the user who updated this list item - */ - updatedBy?: string; - /** - * Format: uuid - * - * @description The ID of the parent list item if this list item is nested - */ - parentListItemId?: string; - /** - * Completed at - * Format: date-time - * - * @description The ISO 8601 timestamp that the list item was completed at - */ - completedAt?: string; - /** - * Completed by - * - * @description The ID of the user who completed this list item - */ - completedBy?: string; - note?: { - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this note - */ - createdBy: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the note was updated at, if relevant - */ - updatedAt?: string; - /** - * Updated by - * - * @description The ID of the user who updated this note - */ - updatedBy?: string; - }; - }; - /** - * @example { - * "id": 0, - * "serverId": "wlVr3Ggl", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "title": "HOW-TO: Smoke These Meats with Sweet Baby Ray's", - * "content": "Spicy jalapeno bacon ipsum dolor amet sirloin ground round short loin, meatball brisket capicola tri-tip ham pork belly biltong corned beef chuck. Chicken ham brisket shank rump buffalo t-bone. Short loin sausage buffalo porchetta pork belly rump tri-tip frankfurter tail pork chop cow sirloin. Pancetta porchetta tail ball tip chislic beef ribs. Buffalo andouille leberkas jerky. Fatback shankle andouille beef. Cow kielbasa buffalo pork loin chislic meatloaf short loin rump meatball prosciutto.", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA", - * "updatedAt": "2021-07-15T22:20:00.706Z", - * "updatedBy": "Ann6LewA" - * } - */ - Doc: { - /** - * Doc ID - * - * @description The ID of the doc - */ - id: number; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Title - * - * @description The title of the doc - */ - title: string; - /** - * Content - * Format: markdown - * - * @description The content of the doc - */ - content: string; - mentions?: components["schemas"]["Mentions"]; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the doc was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this doc - */ - createdBy: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the doc was updated at, if relevant - */ - updatedAt?: string; - /** - * Updated by - * - * @description The ID of the user who updated this doc - */ - updatedBy?: string; - }; - /** - * @example { - * "id": 123456, - * "content": "Wow, cool document!!!", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "docId": 0, - * "createdBy": "Ann6LewA" - * } - */ - DocComment: { - /** - * Doc comment ID - * - * @description The ID of the doc comment - */ - id: number; - /** - * Content - * Format: markdown - * - * @description The content of the doc comment - */ - content: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the doc comment was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this doc comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the doc comment was updated at, if relevant - */ - updatedAt?: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Doc ID - * - * @description The ID of the doc - */ - docId: number; - mentions?: components["schemas"]["Mentions"]; - }; - /** - * @example { - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdBy": "Ann6LewA", - * "emote": { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * }, - * "docId": 0 - * } - */ - DocReaction: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * User ID - * - * @description The ID of the user who added the reaction - */ - createdBy: string; - emote: components["schemas"]["Emote"]; - /** - * Doc ID - * - * @description The ID of the doc - */ - docId: number; - }; - /** - * @example { - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdBy": "Ann6LewA", - * "emote": { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * }, - * "docId": 0, - * "docCommentId": 123456 - * } - */ - DocCommentReaction: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * User ID - * - * @description The ID of the user who added the reaction - */ - createdBy: string; - emote: components["schemas"]["Emote"]; - /** - * Doc ID - * - * @description The ID of the doc - */ - docId: number; - /** - * Doc comment ID - * - * @description The ID of the doc comment - */ - docCommentId: number; - }; - /** - * @example { - * "user": { - * "id": "Ann6LewA", - * "type": "user", - * "name": "Leopold Stotch", - * "createdAt": "2021-06-15T20:15:00.706Z" - * }, - * "roleIds": [], - * "nickname": "Professor Chaos", - * "joinedAt": "2021-07-15T20:15:00.706Z" - * } - */ - ServerMember: { - user: components["schemas"]["User"]; - /** Role IDs */ - roleIds: number[]; - /** Nickname */ - nickname?: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the member was created at - */ - joinedAt: string; - /** - * Is owner - * - * @default false - */ - isOwner?: boolean; - }; - /** - * @example { - * "user": { - * "id": "Ann6LewA", - * "type": "user", - * "name": "Leopold Stotch" - * }, - * "roleIds": [] - * } - */ - ServerMemberSummary: { - user: components["schemas"]["UserSummary"]; - /** Role IDs */ - roleIds: number[]; - }; - /** - * @example { - * "id": "Ann6LewA", - * "type": "user", - * "name": "Leopold Stotch", - * "createdAt": "2021-06-15T20:15:00.706Z" - * } - */ - User: { - /** - * User ID - * - * @description The ID of the user - */ - id: string; - /** - * User type - * - * @description The type of user. If this property is absent, it can assumed to be of type `user` - * @enum {string} - */ - type?: "bot" | "user"; - /** - * User name - * - * @description The user's name - */ - name: string; - /** - * Avatar - * Format: media-uri - * - * @description The avatar image associated with the user - */ - avatar?: string; - /** - * Banner - * Format: media-uri - * - * @description The banner image associated with the user - */ - banner?: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the user was created at - */ - createdAt: string; - }; - /** - * @example { - * "id": "Ann6LewA", - * "type": "user", - * "name": "Leopold Stotch" - * } - */ - UserSummary: { - /** - * User ID - * - * @description The ID of the user - */ - id: string; - /** - * User type - * - * @description The type of user. If this property is absent, it can assumed to be of type `user` - * @enum {string} - */ - type?: "bot" | "user"; - /** - * User name - * - * @description The user's name - */ - name: string; - /** - * Avatar - * Format: media-uri - * - * @description The avatar image associated with the user - */ - avatar?: string; - }; - /** - * @example { - * "user": { - * "id": "Ann6LewA", - * "type": "user", - * "name": "Leopold Stotch" - * }, - * "reason": "More toxic than a poison Pokémon", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA" - * } - */ - ServerMemberBan: { - user: components["schemas"]["UserSummary"]; - /** - * Reason - * - * @description The reason for the ban as submitted by the banner - */ - reason?: string; - /** - * Created by - * - * @description The ID of the user who created this server member ban - */ - createdBy: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the server member ban was created at - */ - createdAt: string; - }; - /** - * @example { - * "id": "00000000-0000-0000-0000-000000000000", - * "type": "chat", - * "name": "The Dank Cellar", - * "topic": "Dank memes ONLY", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA", - * "serverId": "wlVr3Ggl", - * "groupId": "ZVzBo83p" - * } - */ - ServerChannel: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - id: string; - /** - * @description The type of channel. This will determine what routes to use for creating content in a channel. For example, if this "chat", then one must use the routes for creating channel messages - * @enum {string} - */ - type: "announcements" | "calendar" | "chat" | "docs" | "forums" | "list" | "media" | "scheduling" | "stream" | "voice"; - /** @description The name of the channel */ - name: string; - /** @description The topic of the channel */ - topic?: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the channel was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this channel - */ - createdBy: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the channel was updated at, if relevant - */ - updatedAt?: string; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description ID of the parent channel or parent thread, if present. Only relevant for server channels - */ - parentId?: string; - /** @description Only relevant for server channels */ - categoryId?: number; - /** - * Group ID - * - * @description The ID of the group - */ - groupId: string; - /** - * Is public - * - * @description Whether the channel can be accessed from users who are not member of the server - * @default false - */ - isPublic?: boolean; - /** - * Archived by - * - * @description The ID of the user who archived this channel - */ - archivedBy?: string; - /** - * Archived at - * Format: date-time - * - * @description The ISO 8601 timestamp that the channel was archived at, if relevant - */ - archivedAt?: string; - }; - /** - * @example { - * "id": "wlVr3Ggl", - * "type": "community", - * "name": "Guilded", - * "url": "Guilded-Official", - * "about": "The Official Guilded Server! For devs, friends, and fans alike!", - * "ownerId": "Ann6LewA", - * "createdAt": "2018-10-05T20:15:00.706Z", - * "isVerified": true, - * "timezone": "America/Los Angeles (PST/PDT)" - * } - */ - Server: { - /** - * Server ID - * - * @description The ID of the server - */ - id: string; - /** - * Created by - * - * @description The ID of the user who created this server - */ - ownerId: string; - /** - * Server type - * - * @description The type of server designated from the server's settings page - * @enum {string} - */ - type?: "clan" | "community" | "friends" | "guild" | "organization" | "other" | "streaming" | "team"; - /** - * Server name - * - * @description The name given to the server - */ - name: string; - /** - * Server URL - * - * @description The URL that the server can be accessible from. For example, a value of "Guilded-Official" means the server can be accessible from https://www.guilded.gg/Guilded-Official - */ - url?: string; - /** - * Description - * - * @description The description associated with the server - */ - about?: string; - /** - * Avatar - * Format: media-uri - * - * @description The avatar image associated with the server - */ - avatar?: string; - /** - * Banner - * Format: media-uri - * - * @description The banner image associated with the server - */ - banner?: string; - /** - * Timezone - * - * @description The timezone associated with the server - */ - timezone?: string; - /** - * Is verified - * - * @description The verified status of the server - */ - isVerified?: boolean; - /** - * Channel ID - * Format: uuid - * - * @description The channel ID of the default channel of the server. This channel is defined as the first chat or voice channel in the left sidebar of a server in our UI. This channel is useful for sending welcome messages, though note that a bot may not have permissions to interact with this channel depending on how the server is configured. - */ - defaultChannelId?: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the server was created at - */ - createdAt: string; - }; - /** - * @example { - * "id": "00000000-0000-0000-0000-000000000000", - * "serverId": "wlVr3Ggl", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "name": "E-102 Gamma", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA" - * } - */ - Webhook: { - /** - * Webhook ID - * Format: uuid - * - * @description The ID of the webhook - */ - id: string; - /** - * Name - * - * @description The name of the webhook - */ - name: string; - /** - * Avatar - * Format: media-uri - * - * @description The avatar image associated with the webhook - */ - avatar?: string; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the webhook was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this webhook - */ - createdBy: string; - /** - * Deleted at - * Format: date-time - * - * @description The ISO 8601 timestamp that the webhook was deleted at - */ - deletedAt?: string; - /** - * Token - * - * @description The token of the webhook - */ - token?: string; - }; - /** - * @example { - * "id": 1, - * "serverId": "wlVr3Ggl", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "name": "Surprise LAN party for my wife 🤫", - * "description": "**Don't say anything to her!** She's gonna love playing Call of Duty all night", - * "location": "My house!", - * "url": "https://www.surprisepartygame.com/", - * "duration": 60, - * "color": 16106496, - * "startsAt": "2022-06-16T00:00:00.000Z", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA" - * } - */ - CalendarEvent: { - /** - * Calendar event ID - * - * @description The ID of the calendar event - */ - id: number; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Name - * - * @description The name of the event - */ - name: string; - /** - * Description - * Format: markdown - * - * @description The description of the event - */ - description?: string; - /** - * Location - * - * @description The location of the event - */ - location?: string; - /** - * Format: uri - * - * @description A URL to associate with the event - */ - url?: string; - /** @description The color of the event when viewing in the calendar */ - color?: number; - /** @description Is this event a repeating event */ - repeats?: boolean; - /** - * Calendar event series ID - * Format: uuid - * - * @description The ID of the calendar event series. Only shows if the event is repeating - */ - seriesId?: string; - /** - * Role IDs - * - * @description The role IDs to restrict the event to - */ - roleIds?: number[]; - /** - * RSVP disabled - * - * @description When disabled, users will not be able to RSVP to the event - */ - rsvpDisabled?: boolean; - /** - * Is all day - * - * @description Does the event last all day - */ - isAllDay?: boolean; - /** @description The number of RSVPs to allow before waitlisting RSVPs */ - rsvpLimit?: number; - /** @description When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event */ - autofillWaitlist?: boolean; - /** - * Starts at - * Format: date-time - * - * @description The ISO 8601 timestamp that the event starts at - */ - startsAt: string; - /** - * Duration - * - * @description The duration of the event _**in minutes**_ - */ - duration?: number; - /** Is private */ - isPrivate?: boolean; - mentions?: components["schemas"]["Mentions"]; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the event was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this event - */ - createdBy: string; - cancellation?: { - /** - * Description - * Format: markdown - * - * @description The description of event cancellation - */ - description?: string; - /** - * Created by - * - * @description The ID of the user who created this event cancellation - */ - createdBy: string; - }; - }; - /** - * @example { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * } - */ - Emote: { - /** - * Emote ID - * - * @description The ID of the emote - */ - id: number; - /** - * Name - * - * @description The name of the emote - */ - name: string; - /** - * Emote URL - * Format: media-uri - * - * @description The URL of the emote image - */ - url: string; - /** - * Server ID - * - * @description The ID of the server the emote was created on - */ - serverId?: string; - }; - /** - * @example { - * "calendarEventId": 1, - * "channelId": "00000000-0000-0000-0000-000000000000", - * "serverId": "wlVr3Ggl", - * "userId": "Ann6LewA", - * "status": "going", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA" - * } - */ - CalendarEventRsvp: { - /** - * Calendar event ID - * - * @description The ID of the calendar event - */ - calendarEventId: number; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * User ID - * - * @description The ID of the user - */ - userId: string; - /** - * Status - * - * @description The status of the RSVP - * @enum {string} - */ - status: "declined" | "going" | "invited" | "maybe" | "not responded" | "waitlisted"; - /** - * Created by - * - * @description The ID of the user who created this RSVP - */ - createdBy: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the RSVP was created at - */ - createdAt: string; - /** - * Updated by - * - * @description The ID of the user who updated this RSVP - */ - updatedBy?: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the RSVP was updated at, if relevant - */ - updatedAt?: string; - }; - /** - * @example { - * "id": 1234567890, - * "content": "I will be there!!", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdAt": "2022-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA", - * "calendarEventId": 987654321 - * } - */ - CalendarEventComment: { - /** - * Calendar event comment ID - * - * @description The ID of the calendar event comment - */ - id: number; - /** - * Content - * Format: markdown - * - * @description The content of the calendar event comment - */ - content: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the calendar event comment was created at - */ - createdAt: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the calendar event comment was updated at, if relevant - */ - updatedAt?: string; - /** - * Calendar event ID - * - * @description The ID of the calendar event - */ - calendarEventId: number; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Created by - * - * @description The ID of the user who created this calendar event comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - mentions?: components["schemas"]["Mentions"]; - }; - /** - * @example { - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdBy": "Ann6LewA", - * "emote": { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * }, - * "calendarEventId": 1 - * } - */ - CalendarEventReaction: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * User ID - * - * @description The ID of the user who added the reaction - */ - createdBy: string; - emote: components["schemas"]["Emote"]; - /** - * Calendar event ID - * - * @description The ID of the calendar event - */ - calendarEventId: number; - }; - /** - * @example { - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdBy": "Ann6LewA", - * "emote": { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * }, - * "calendarEventId": 1, - * "calendarEventCommentId": 1234567890 - * } - */ - CalendarEventCommentReaction: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * User ID - * - * @description The ID of the user who added the reaction - */ - createdBy: string; - emote: components["schemas"]["Emote"]; - /** - * Calendar event ID - * - * @description The ID of the calendar event - */ - calendarEventId: number; - /** - * Calendar event comment ID - * - * @description The ID of the calendar event comment - */ - calendarEventCommentId: number; - }; - /** - * @example { - * "id": "00000000-0000-0000-0000-000000000000", - * "serverId": "wlVr3Ggl", - * "channelId": "00000000-0000-0000-0000-000000000000" - * } - */ - CalendarEventSeries: { - /** - * Calendar event series ID - * Format: uuid - * - * @description The ID of the calendar event series - */ - id: string; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - }; - /** - * @example { - * "id": "9RVMoDZy", - * "serverId": "wlVr3Ggl", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdAt": "2021-06-15T20:15:00.706Z", - * "createdBy": "Ann6LewA", - * "title": "Pizza Party, don't be tardy!", - * "content": "Grab a slice, don't be slow, At our pizza party, it's the way to go! Toppings galore, cheesy delight, Come join us, it'll be out of sight!" - * } - */ - Announcement: { - /** - * Announcement ID - * - * @description The ID of the announcement - */ - id: string; - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the announcement was created at - */ - createdAt: string; - /** - * Created by - * - * @description The ID of the user who created this announcement - */ - createdBy: string; - /** - * Content - * Format: markdown - * - * @description The content of the announcement - */ - content: string; - mentions?: components["schemas"]["Mentions"]; - /** - * Title - * - * @description The title of the announcement - */ - title: string; - }; - /** - * @example { - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdBy": "Ann6LewA", - * "emote": { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * }, - * "announcementId": "9RVMoDZy" - * } - */ - AnnouncementReaction: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * User ID - * - * @description The ID of the user who added the reaction - */ - createdBy: string; - emote: components["schemas"]["Emote"]; - /** - * Announcement ID - * - * @description The ID of the announcement - */ - announcementId: string; - }; - /** - * @example { - * "id": 123456, - * "content": "Now THAT is one awesome announcement!!!", - * "createdAt": "2023-04-07T16:19:00.000Z", - * "channelId": "00000000-0000-0000-0000-000000000000", - * "announcementId": "9RVMoDZy", - * "createdBy": "Ann6LewA" - * } - */ - AnnouncementComment: { - /** - * Announcement comment ID - * - * @description The ID of the announcement comment - */ - id: number; - /** - * Content - * Format: markdown - * - * @description The content of the announcement comment - */ - content: string; - /** - * Created at - * Format: date-time - * - * @description The ISO 8601 timestamp that the announcement comment was created at - */ - createdAt: string; - /** - * Updated at - * Format: date-time - * - * @description The ISO 8601 timestamp that the announcement comment was updated at, if relevant - */ - updatedAt?: string; - /** - * Created by - * - * @description The ID of the user who created this announcement comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Announcement ID - * - * @description The ID of the announcement - */ - announcementId: string; - mentions?: components["schemas"]["Mentions"]; - }; - /** - * @example { - * "channelId": "00000000-0000-0000-0000-000000000000", - * "createdBy": "Ann6LewA", - * "emote": { - * "id": 90000000, - * "name": "grinning", - * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" - * }, - * "announcementId": "9RVMoDZy", - * "announcementCommentId": 123456 - * } - */ - AnnouncementCommentReaction: { - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * User ID - * - * @description The ID of the user who added the reaction - */ - createdBy: string; - emote: components["schemas"]["Emote"]; - /** - * Announcement ID - * - * @description The ID of the announcement - */ - announcementId: string; - /** - * Announcement comment ID - * - * @description The ID of the announcement comment - */ - announcementCommentId: number; - }; - }; - responses: { - _WelcomeMessage: { - content: { - "application/json": { - /** @description The interval in milliseconds that your bot should be configured to send ping frames for the bot's [heartbeat](/docs/api/heartbeat) to be considered valid. */ - heartbeatIntervalMs: number; - /** @description The last message's ID that was sent to this bot. See [event replay](/docs/api/replay) for more details */ - lastMessageId: string; - /** - * Bot ID - * Format: uuid - * - * @description The ID of the bot - */ - botId: string; - user: components["schemas"]["User"]; - }; - }; - }; - /** @description Emitted when a bot is added to a server */ - BotServerMembershipCreated: { - content: { - "application/json": { - server: components["schemas"]["Server"]; - /** - * Created by - * - * @description The ID of the user who created this server membership - */ - createdBy: string; - }; - }; - }; - /** @description Emitted when a bot is removed from a server */ - BotServerMembershipDeleted: { - content: { - "application/json": { - server: components["schemas"]["Server"]; - /** - * Deleted by - * - * @description The ID of the user who deleted this server membership - */ - deletedBy: string; - }; - }; - }; - ChatMessageCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - message: components["schemas"]["ChatMessage"]; - }; - }; - }; - ChatMessageUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - message: components["schemas"]["ChatMessage"]; - }; - }; - }; - ChatMessageDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - message: { - /** - * Message ID - * Format: uuid - * - * @description The ID of the message - */ - id: string; - /** - * Server ID - * - * @description The ID of the server - */ - serverId?: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Deleted at - * Format: date-time - * - * @description The ISO 8601 timestamp that the message was deleted at - */ - deletedAt: string; - /** Is private */ - isPrivate?: boolean; - }; - }; - }; - }; - ServerMemberJoined: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - member: components["schemas"]["ServerMember"]; - }; - }; - }; - ServerMemberRemoved: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * User ID - * - * @description The ID of the user - */ - userId: string; - /** - * Is kick? - * - * @description If this member leaving was the result of a kick - */ - isKick?: boolean; - /** - * Is ban? - * - * @description If this member leaving was the result of a ban - */ - isBan?: boolean; - }; - }; - }; - ServerMemberBanned: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - serverMemberBan: components["schemas"]["ServerMemberBan"]; - }; - }; - }; - ServerMemberUnbanned: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - serverMemberBan: components["schemas"]["ServerMemberBan"]; - }; - }; - }; - ServerMemberUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - userInfo: { - /** - * User ID - * - * @description The ID of the user - */ - id: string; - /** - * Nickname - * - * @description The nickname that was just updated for the user - */ - nickname?: string | null; - }; - }; - }; - }; - ServerRolesUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - memberRoleIds: { - /** - * User ID - * - * @description The ID of the member that had roles updated - */ - userId: string; - /** - * Role IDs - * - * @description The IDs of the roles that the member currently has _after_ this operation - */ - roleIds: number[]; - }[]; - }; - }; - }; - ServerChannelCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - channel: components["schemas"]["ServerChannel"]; - }; - }; - }; - ServerChannelUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - channel: components["schemas"]["ServerChannel"]; - }; - }; - }; - ServerChannelDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - channel: components["schemas"]["ServerChannel"]; - }; - }; - }; - ServerMemberSocialLinkCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - socialLink: components["schemas"]["SocialLink"]; - }; - }; - }; - ServerMemberSocialLinkUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - socialLink: components["schemas"]["SocialLink"]; - }; - }; - }; - ServerMemberSocialLinkDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - socialLink: components["schemas"]["SocialLink"]; - }; - }; - }; - ServerWebhookCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - webhook: components["schemas"]["Webhook"]; - }; - }; - }; - ServerWebhookUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - webhook: components["schemas"]["Webhook"]; - }; - }; - }; - DocCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - doc: components["schemas"]["Doc"]; - }; - }; - }; - DocUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - doc: components["schemas"]["Doc"]; - }; - }; - }; - DocDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - doc: components["schemas"]["Doc"]; - }; - }; - }; - DocCommentCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - docComment: components["schemas"]["DocComment"]; - }; - }; - }; - DocCommentDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - docComment: components["schemas"]["DocComment"]; - }; - }; - }; - DocCommentUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - docComment: components["schemas"]["DocComment"]; - }; - }; - }; - CalendarEventCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEvent: components["schemas"]["CalendarEvent"]; - }; - }; - }; - CalendarEventUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEvent: components["schemas"]["CalendarEvent"]; - }; - }; - }; - CalendarEventDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEvent: components["schemas"]["CalendarEvent"]; - }; - }; - }; - ForumTopicCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopic: components["schemas"]["ForumTopic"]; - }; - }; - }; - ForumTopicUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopic: components["schemas"]["ForumTopic"]; - }; - }; - }; - ForumTopicDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopic: components["schemas"]["ForumTopic"]; - }; - }; - }; - ForumTopicPinned: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopic: components["schemas"]["ForumTopic"]; - }; - }; - }; - ForumTopicUnpinned: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopic: components["schemas"]["ForumTopic"]; - }; - }; - }; - ForumTopicReactionCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["ForumTopicReaction"]; - }; - }; - }; - ForumTopicReactionDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["ForumTopicReaction"]; - }; - }; - }; - ForumTopicLocked: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopic: components["schemas"]["ForumTopic"]; - }; - }; - }; - ForumTopicUnlocked: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopic: components["schemas"]["ForumTopic"]; - }; - }; - }; - ForumTopicCommentCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopicComment: components["schemas"]["ForumTopicComment"]; - }; - }; - }; - ForumTopicCommentUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopicComment: components["schemas"]["ForumTopicComment"]; - }; - }; - }; - ForumTopicCommentDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - forumTopicComment: components["schemas"]["ForumTopicComment"]; - }; - }; - }; - CalendarEventRsvpUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEventRsvp: components["schemas"]["CalendarEventRsvp"]; - }; - }; - }; - CalendarEventRsvpManyUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEventRsvps: components["schemas"]["CalendarEventRsvp"][]; - }; - }; - }; - CalendarEventRsvpDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEventRsvp: components["schemas"]["CalendarEventRsvp"]; - }; - }; - }; - ListItemCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - listItem: components["schemas"]["ListItem"]; - }; - }; - }; - ListItemUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - listItem: components["schemas"]["ListItem"]; - }; - }; - }; - ListItemDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - listItem: components["schemas"]["ListItem"]; - }; - }; - }; - ListItemCompleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - listItem: components["schemas"]["ListItem"]; - }; - }; - }; - ListItemUncompleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - listItem: components["schemas"]["ListItem"]; - }; - }; - }; - ChannelMessageReactionCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["ChatMessageReaction"]; - }; - }; - }; - ChannelMessageReactionDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Deleted by - * - * @description The ID of the user who deleted this reaction - */ - deletedBy: string; - reaction: components["schemas"]["ChatMessageReaction"]; - }; - }; - }; - ChannelMessageReactionManyDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - /** - * Channel ID - * Format: uuid - * - * @description The ID of the channel - */ - channelId: string; - /** - * Message ID - * Format: uuid - * - * @description The ID of the message - */ - messageId: string; - /** - * Deleted by - * - * @description The ID of the user who deleted this reaction - */ - deletedBy: string; - /** @description The count of reactions that were removed */ - count: number; - /** @description If present, only reactions of this emote were bulk removed from the message */ - emote?: components["schemas"]["Emote"]; - }; - }; - }; - ForumTopicCommentReactionCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["ForumTopicCommentReaction"]; - }; - }; - }; - ForumTopicCommentReactionDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["ForumTopicCommentReaction"]; - }; - }; - }; - CalendarEventCommentCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEventComment: components["schemas"]["CalendarEventComment"]; - }; - }; - }; - CalendarEventCommentDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEventComment: components["schemas"]["CalendarEventComment"]; - }; - }; - }; - CalendarEventCommentUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEventComment: components["schemas"]["CalendarEventComment"]; - }; - }; - }; - CalendarEventReactionCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["CalendarEventReaction"]; - }; - }; - }; - CalendarEventReactionDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["CalendarEventReaction"]; - }; - }; - }; - CalendarEventCommentReactionCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["CalendarEventCommentReaction"]; - }; - }; - }; - CalendarEventCommentReactionDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["CalendarEventCommentReaction"]; - }; - }; - }; - DocReactionCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["DocReaction"]; - }; - }; - }; - DocReactionDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["DocReaction"]; - }; - }; - }; - DocCommentReactionCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["DocCommentReaction"]; - }; - }; - }; - DocCommentReactionDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["DocCommentReaction"]; - }; - }; - }; - CalendarEventSeriesUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEventSeries: components["schemas"]["CalendarEventSeries"]; - /** - * Calendar event ID - * - * @description The calendar event updates started at - */ - calendarEventId?: number; - }; - }; - }; - CalendarEventSeriesDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - calendarEventSeries: components["schemas"]["CalendarEventSeries"]; - /** - * Calendar event ID - * - * @description The calendar event deletions started at - */ - calendarEventId?: number; - }; - }; - }; - AnnouncementCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - announcement: components["schemas"]["Announcement"]; - }; - }; - }; - AnnouncementUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - announcement: components["schemas"]["Announcement"]; - }; - }; - }; - AnnouncementDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - announcement: components["schemas"]["Announcement"]; - }; - }; - }; - AnnouncementReactionCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["AnnouncementReaction"]; - }; - }; - }; - AnnouncementReactionDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["AnnouncementReaction"]; - }; - }; - }; - AnnouncementCommentCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - announcementComment: components["schemas"]["AnnouncementComment"]; - }; - }; - }; - AnnouncementCommentUpdated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - announcementComment: components["schemas"]["AnnouncementComment"]; - }; - }; - }; - AnnouncementCommentDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - announcementComment: components["schemas"]["AnnouncementComment"]; - }; - }; - }; - AnnouncementCommentReactionCreated: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["AnnouncementCommentReaction"]; - }; - }; - }; - AnnouncementCommentReactionDeleted: { - content: { - "application/json": { - /** - * Server ID - * - * @description The ID of the server - */ - serverId: string; - reaction: components["schemas"]["AnnouncementCommentReaction"]; - }; - }; - }; - }; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + _SocketEventEnvelope: { + /** + * Opcode + * + * @description An operation code corresponding to the nature of the sent message (for example, success, failure, etc.) + * @enum {integer} + */ + op: + | 0 + | 1 + | 2 + | 8 + | 9; + /** + * Data + * + * @description Data of any form depending on the underlying event + */ + d?: Record< + string, + never + >; + /** + * Message ID + * + * @description Message ID used for replaying events after a disconnect + */ + s?: string; + /** + * Event name + * + * @description Event name for the given message + */ + t?: string; + }; + /** + * @example { + * "id": "00000000-0000-0000-0000-000000000000", + * "type": "default", + * "serverId": "wlVr3Ggl", + * "groupId": "ZVzBo83p", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "content": "Hello **world**!", + * "embeds": [ + * { + * "title": "embed title", + * "description": "embeds support a **different** __subset__ *of* markdown than other markdown fields. <@Ann6LewA>\n\n [links](https://www.guilded.gg) ```\ncheck this code out```\n\n:pizza: time!! ttyl", + * "url": "https://www.guilded.gg", + * "color": 6118369, + * "timestamp": "2022-04-12T22:14:36.737Z", + * "footer": { + * "icon_url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png", + * "text": "footer text" + * }, + * "thumbnail": { + * "url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png" + * }, + * "image": { + * "url": "https://www.guilded.gg/asset/Logos/logomark_wordmark/Color/Guilded_Logomark_Wordmark_Color.png" + * }, + * "author": { + * "name": "Gil", + * "url": "https://www.guilded.gg", + * "icon_url": "https://www.guilded.gg/asset/Default/Gil-md.png" + * }, + * "fields": [ + * { + * "name": "hello", + * "value": "these are fields" + * }, + * { + * "name": "~~help i have been crossed out~~", + * "value": "~~oh noes~~", + * "inline": true + * }, + * { + * "name": "another inline", + * "value": "field", + * "inline": true + * } + * ] + * } + * ], + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA" + * } + */ + ChatMessage: { + /** + * Message ID + * Format: uuid + * + * @description The ID of the message + */ + id: string; + /** + * Type + * + * @description The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. + * @enum {string} + */ + type: + | "default" + | "system"; + /** + * Server ID + * + * @description The ID of the server + */ + serverId?: string; + /** + * Group ID + * + * @description The ID of the group + */ + groupId?: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Content + * Format: markdown + * + * @description The content of the message + */ + content?: string; + embeds?: components["schemas"]["ChatEmbed"][]; + /** @description Message IDs that were replied to */ + replyMessageIds?: string[]; + /** + * Is private + * + * @description If set, this message will only be seen by those mentioned or replied to + */ + isPrivate?: boolean; + /** + * Is silent + * + * @description If set, this message did not notify mention or reply recipients + * @default false + */ + isSilent?: boolean; + mentions?: components["schemas"]["Mentions"]; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the message was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this message (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * Created by Webhook ID + * + * @description The ID of the webhook who created this message, if it was created by a webhook + */ + createdByWebhookId?: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the message was updated at, if relevant + */ + updatedAt?: string; + }; + /** + * @example { + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdBy": "Ann6LewA", + * "emote": { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * }, + * "messageId": "00000000-0000-0000-0000-000000000000" + * } + */ + ChatMessageReaction: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * User ID + * + * @description The ID of the user who added the reaction + */ + createdBy: string; + emote: components["schemas"]["Emote"]; + /** + * Message ID + * Format: uuid + * + * @description The ID of the message + */ + messageId: string; + }; + /** + * @description Rich content sections optionally associated with chat messages. Properties with "webhook-markdown" support allow for the following: link, italic, bold, strikethrough, underline, inline code, block code, reaction, and mention. + * @example { + * "title": "embed title", + * "description": "embeds support a **different** __subset__ *of* markdown than other markdown fields. <@Ann6LewA>\n\n [links](https://www.guilded.gg) ```\ncheck this code out```\n\n:pizza: time!! ttyl", + * "url": "https://www.guilded.gg", + * "color": 6118369, + * "timestamp": "2022-04-12T22:14:36.737Z", + * "footer": { + * "icon_url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png", + * "text": "footer text" + * }, + * "thumbnail": { + * "url": "https://www.guilded.gg/asset/Logos/logomark/Color/Guilded_Logomark_Color.png" + * }, + * "image": { + * "url": "https://www.guilded.gg/asset/Logos/logomark_wordmark/Color/Guilded_Logomark_Wordmark_Color.png" + * }, + * "author": { + * "name": "Gil", + * "url": "https://www.guilded.gg", + * "icon_url": "https://www.guilded.gg/asset/Default/Gil-md.png" + * }, + * "fields": [ + * { + * "name": "hello", + * "value": "these are fields" + * }, + * { + * "name": "~~help i have been crossed out~~", + * "value": "~~oh noes~~", + * "inline": true + * }, + * { + * "name": "another inline", + * "value": "field", + * "inline": true + * } + * ] + * } + */ + ChatEmbed: { + /** + * Format: webhook-markdown + * + * @description Main header of the embed + */ + title?: string; + /** + * Format: webhook-markdown + * + * @description Subtext of the embed + */ + description?: string; + /** + * Format: uri + * + * @description URL to linkify the `title` field with + */ + url?: string; + /** @description Decimal value of the color that the left border should be */ + color?: number; + /** @description A small section at the bottom of the embed */ + footer?: { + /** + * Format: media-uri + * + * @description URL of a small image to put in the footer + */ + icon_url?: string; + /** @description Text of the footer */ + text: string; + }; + /** + * Format: date-time + * + * @description A timestamp to put in the footer + */ + timestamp?: string; + /** @description An image to the right of the embed's content */ + thumbnail?: { + /** + * Format: media-uri + * + * @description URL of the image + */ + url?: string; + }; + /** @description The main picture to associate with the embed */ + image?: { + /** + * Format: media-uri + * + * @description URL of the image + */ + url?: string; + }; + /** @description A small section above the title of the embed */ + author?: { + /** @description Name of the author */ + name?: string; + /** + * Format: uri + * + * @description URL to linkify the author's `name` field + */ + url?: string; + /** + * Format: media-uri + * + * @description URL of a small image to display to the left of the author's `name` + */ + icon_url?: string; + }; + /** @description Table-like cells to add to the embed */ + fields?: { + /** + * Format: webhook-markdown + * + * @description Header of the table-like cell + */ + name: string; + /** + * Format: webhook-markdown + * + * @description Subtext of the table-like cell + */ + value: string; + /** + * @description If the field should wrap or not + * @default false + */ + inline?: boolean; + }[]; + }; + /** + * @example { + * "type": "roblox", + * "userId": "Ann6LewA", + * "handle": "builderman", + * "serviceId": "156", + * "createdAt": "2006-03-08T20:15:00.706Z" + * } + */ + SocialLink: { + /** + * Social link type + * + * @description The type of social link that Guilded supports. Depending on this value, `handle` or `serviceId` may or may not be present + * @enum {string} + */ + type: + | "bnet" + | "epic" + | "facebook" + | "origin" + | "patreon" + | "psn" + | "roblox" + | "steam" + | "switch" + | "twitch" + | "twitter" + | "xbox" + | "youtube"; + /** + * User ID + * + * @description The ID of the user that the social link is associated with + */ + userId: string; + /** @description The handle of the user within the external service */ + handle?: string; + /** @description The unique ID that represents this member's social link within the external service */ + serviceId?: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the social link was created at + */ + createdAt: string; + }; + /** + * @description Metadata of who or what is mentioned in content + * @example { + * "users": [ + * { + * "id": "Ann6LewA" + * } + * ], + * "channels": [ + * { + * "id": "00000000-0000-0000-0000-000000000000" + * } + * ], + * "roles": [ + * { + * "id": 591232 + * } + * ], + * "everyone": true, + * "here": true + * } + */ + Mentions: { + /** + * Users + * + * @description Info on mentioned users + */ + users?: { + /** + * User ID + * + * @description The ID of the user + */ + id: string; + }[]; + /** + * Channels + * + * @description Info on mentioned channels + */ + channels?: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + id: string; + }[]; + /** + * Roles + * + * @description Info on mentioned roles + */ + roles?: { + /** + * Role ID + * + * @description The ID of the role + */ + id: number; + }[]; + /** + * Everyone + * + * @description If @everyone was mentioned + */ + everyone?: boolean; + /** + * Here + * + * @description If @here was mentioned + */ + here?: boolean; + }; + /** + * @example { + * "id": 1234567890, + * "content": "Great idea!", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "forumTopicId": 2036274747, + * "createdBy": "Ann6LewA" + * } + */ + ForumTopicComment: { + /** @description The ID of the forum topic comment */ + id: number; + /** + * Content + * Format: markdown + * + * @description The content of the forum topic comment + */ + content: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the forum topic comment was created at + */ + createdAt: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the forum topic comment was updated at, if relevant + */ + updatedAt?: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** @description The ID of the forum topic */ + forumTopicId: number; + /** + * Created by + * + * @description The ID of the user who created this forum topic comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + mentions?: components["schemas"]["Mentions"]; + }; + /** + * @example { + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdBy": "Ann6LewA", + * "emote": { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * }, + * "forumTopicId": 123456 + * } + */ + ForumTopicReaction: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * User ID + * + * @description The ID of the user who added the reaction + */ + createdBy: string; + emote: components["schemas"]["Emote"]; + /** @description The ID of the forum topic */ + forumTopicId: number; + }; + /** + * @example { + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdBy": "Ann6LewA", + * "emote": { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * }, + * "forumTopicId": 123456, + * "forumTopicCommentId": 1234567890 + * } + */ + ForumTopicCommentReaction: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * User ID + * + * @description The ID of the user who added the reaction + */ + createdBy: string; + emote: components["schemas"]["Emote"]; + /** @description The ID of the forum topic */ + forumTopicId: number; + /** @description The ID of the forum topic comment */ + forumTopicCommentId: number; + }; + /** + * @example { + * "id": 123456, + * "serverId": "wlVr3Ggl", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "title": "Welcome new members!!", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA", + * "content": "Please introduce yourself in this topic!!!" + * } + */ + ForumTopic: { + /** @description The ID of the forum topic */ + id: number; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Title + * + * @description The title of the forum topic + */ + title: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the forum topic was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the forum topic was updated at, if relevant + */ + updatedAt?: string; + /** + * Bumped at + * Format: date-time + * + * @description The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. + */ + bumpedAt?: string; + /** + * Is pinned + * + * @default false + */ + isPinned?: boolean; + /** + * Is locked + * + * @default false + */ + isLocked?: boolean; + /** + * Content + * Format: markdown + * + * @description The content of the forum topic + */ + content: string; + mentions?: components["schemas"]["Mentions"]; + }; + /** + * @example { + * "id": 123456, + * "serverId": "wlVr3Ggl", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "title": "Welcome new members!!", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA" + * } + */ + ForumTopicSummary: { + /** @description The ID of the forum topic */ + id: number; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Title + * + * @description The title of the forum topic + */ + title: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the forum topic was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the forum topic was updated at, if relevant + */ + updatedAt?: string; + /** + * Bumped at + * Format: date-time + * + * @description The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. + */ + bumpedAt?: string; + /** + * Is pinned + * + * @default false + */ + isPinned?: boolean; + /** + * Is locked + * + * @default false + */ + isLocked?: boolean; + }; + /** + * @example { + * "id": "00000000-0000-0000-0000-000000000000", + * "serverId": "wlVr3Ggl", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "message": "Remember to say hello **world**!", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA", + * "note": { + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA", + * "content": "Duly noted" + * } + * } + */ + ListItem: { + /** + * Format: uuid + * + * @description The ID of the list item + */ + id: string; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Message + * Format: markdown + * + * @description The message of the list item + */ + message: string; + mentions?: components["schemas"]["Mentions"]; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the list item was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * Created by Webhook ID + * + * @description The ID of the webhook who created this list item, if it was created by a webhook + */ + createdByWebhookId?: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the list item was updated at, if relevant + */ + updatedAt?: string; + /** + * Updated by + * + * @description The ID of the user who updated this list item + */ + updatedBy?: string; + /** + * Format: uuid + * + * @description The ID of the parent list item if this list item is nested + */ + parentListItemId?: string; + /** + * Completed at + * Format: date-time + * + * @description The ISO 8601 timestamp that the list item was completed at + */ + completedAt?: string; + /** + * Completed by + * + * @description The ID of the user who completed this list item + */ + completedBy?: string; + note?: { + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this note + */ + createdBy: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the note was updated at, if relevant + */ + updatedAt?: string; + /** + * Updated by + * + * @description The ID of the user who updated this note + */ + updatedBy?: string; + mentions?: components["schemas"]["Mentions"]; + /** + * Note + * Format: markdown + * + * @description The note of the list item + */ + content: string; + }; + }; + /** + * @example { + * "id": "00000000-0000-0000-0000-000000000000", + * "serverId": "wlVr3Ggl", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "message": "Remember to say hello **world**!", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA", + * "note": { + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA" + * } + * } + */ + ListItemSummary: { + /** + * Format: uuid + * + * @description The ID of the list item + */ + id: string; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Message + * Format: markdown + * + * @description The message of the list item + */ + message: string; + mentions?: components["schemas"]["Mentions"]; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the list item was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * Created by Webhook ID + * + * @description The ID of the webhook who created this list item, if it was created by a webhook + */ + createdByWebhookId?: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the list item was updated at, if relevant + */ + updatedAt?: string; + /** + * Updated by + * + * @description The ID of the user who updated this list item + */ + updatedBy?: string; + /** + * Format: uuid + * + * @description The ID of the parent list item if this list item is nested + */ + parentListItemId?: string; + /** + * Completed at + * Format: date-time + * + * @description The ISO 8601 timestamp that the list item was completed at + */ + completedAt?: string; + /** + * Completed by + * + * @description The ID of the user who completed this list item + */ + completedBy?: string; + note?: { + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this note + */ + createdBy: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the note was updated at, if relevant + */ + updatedAt?: string; + /** + * Updated by + * + * @description The ID of the user who updated this note + */ + updatedBy?: string; + }; + }; + /** + * @example { + * "id": 0, + * "serverId": "wlVr3Ggl", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "title": "HOW-TO: Smoke These Meats with Sweet Baby Ray's", + * "content": "Spicy jalapeno bacon ipsum dolor amet sirloin ground round short loin, meatball brisket capicola tri-tip ham pork belly biltong corned beef chuck. Chicken ham brisket shank rump buffalo t-bone. Short loin sausage buffalo porchetta pork belly rump tri-tip frankfurter tail pork chop cow sirloin. Pancetta porchetta tail ball tip chislic beef ribs. Buffalo andouille leberkas jerky. Fatback shankle andouille beef. Cow kielbasa buffalo pork loin chislic meatloaf short loin rump meatball prosciutto.", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA", + * "updatedAt": "2021-07-15T22:20:00.706Z", + * "updatedBy": "Ann6LewA" + * } + */ + Doc: { + /** + * Doc ID + * + * @description The ID of the doc + */ + id: number; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Title + * + * @description The title of the doc + */ + title: string; + /** + * Content + * Format: markdown + * + * @description The content of the doc + */ + content: string; + mentions?: components["schemas"]["Mentions"]; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the doc was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this doc + */ + createdBy: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the doc was updated at, if relevant + */ + updatedAt?: string; + /** + * Updated by + * + * @description The ID of the user who updated this doc + */ + updatedBy?: string; + }; + /** + * @example { + * "id": 123456, + * "content": "Wow, cool document!!!", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "docId": 0, + * "createdBy": "Ann6LewA" + * } + */ + DocComment: { + /** + * Doc comment ID + * + * @description The ID of the doc comment + */ + id: number; + /** + * Content + * Format: markdown + * + * @description The content of the doc comment + */ + content: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the doc comment was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this doc comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the doc comment was updated at, if relevant + */ + updatedAt?: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Doc ID + * + * @description The ID of the doc + */ + docId: number; + mentions?: components["schemas"]["Mentions"]; + }; + /** + * @example { + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdBy": "Ann6LewA", + * "emote": { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * }, + * "docId": 0 + * } + */ + DocReaction: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * User ID + * + * @description The ID of the user who added the reaction + */ + createdBy: string; + emote: components["schemas"]["Emote"]; + /** + * Doc ID + * + * @description The ID of the doc + */ + docId: number; + }; + /** + * @example { + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdBy": "Ann6LewA", + * "emote": { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * }, + * "docId": 0, + * "docCommentId": 123456 + * } + */ + DocCommentReaction: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * User ID + * + * @description The ID of the user who added the reaction + */ + createdBy: string; + emote: components["schemas"]["Emote"]; + /** + * Doc ID + * + * @description The ID of the doc + */ + docId: number; + /** + * Doc comment ID + * + * @description The ID of the doc comment + */ + docCommentId: number; + }; + /** + * @example { + * "user": { + * "id": "Ann6LewA", + * "type": "user", + * "name": "Leopold Stotch", + * "createdAt": "2021-06-15T20:15:00.706Z" + * }, + * "roleIds": [], + * "nickname": "Professor Chaos", + * "joinedAt": "2021-07-15T20:15:00.706Z" + * } + */ + ServerMember: { + user: components["schemas"]["User"]; + /** Role IDs */ + roleIds: number[]; + /** Nickname */ + nickname?: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the member was created at + */ + joinedAt: string; + /** + * Is owner + * + * @default false + */ + isOwner?: boolean; + }; + /** + * @example { + * "user": { + * "id": "Ann6LewA", + * "type": "user", + * "name": "Leopold Stotch" + * }, + * "roleIds": [] + * } + */ + ServerMemberSummary: { + user: components["schemas"]["UserSummary"]; + /** Role IDs */ + roleIds: number[]; + }; + /** + * @example { + * "id": "Ann6LewA", + * "type": "user", + * "name": "Leopold Stotch", + * "createdAt": "2021-06-15T20:15:00.706Z" + * } + */ + User: { + /** + * User ID + * + * @description The ID of the user + */ + id: string; + /** + * User type + * + * @description The type of user. If this property is absent, it can assumed to be of type `user` + * @enum {string} + */ + type?: + | "bot" + | "user"; + /** + * User name + * + * @description The user's name + */ + name: string; + /** + * Avatar + * Format: media-uri + * + * @description The avatar image associated with the user + */ + avatar?: string; + /** + * Banner + * Format: media-uri + * + * @description The banner image associated with the user + */ + banner?: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the user was created at + */ + createdAt: string; + }; + /** + * @example { + * "id": "Ann6LewA", + * "type": "user", + * "name": "Leopold Stotch" + * } + */ + UserSummary: { + /** + * User ID + * + * @description The ID of the user + */ + id: string; + /** + * User type + * + * @description The type of user. If this property is absent, it can assumed to be of type `user` + * @enum {string} + */ + type?: + | "bot" + | "user"; + /** + * User name + * + * @description The user's name + */ + name: string; + /** + * Avatar + * Format: media-uri + * + * @description The avatar image associated with the user + */ + avatar?: string; + }; + /** + * @example { + * "user": { + * "id": "Ann6LewA", + * "type": "user", + * "name": "Leopold Stotch" + * }, + * "reason": "More toxic than a poison Pokémon", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA" + * } + */ + ServerMemberBan: { + user: components["schemas"]["UserSummary"]; + /** + * Reason + * + * @description The reason for the ban as submitted by the banner + */ + reason?: string; + /** + * Created by + * + * @description The ID of the user who created this server member ban + */ + createdBy: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the server member ban was created at + */ + createdAt: string; + }; + /** + * @example { + * "id": "00000000-0000-0000-0000-000000000000", + * "type": "chat", + * "name": "The Dank Cellar", + * "topic": "Dank memes ONLY", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA", + * "serverId": "wlVr3Ggl", + * "groupId": "ZVzBo83p" + * } + */ + ServerChannel: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + id: string; + /** + * @description The type of channel. This will determine what routes to use for creating content in a channel. For example, if this "chat", then one must use the routes for creating channel messages + * @enum {string} + */ + type: + | "announcements" + | "calendar" + | "chat" + | "docs" + | "forums" + | "list" + | "media" + | "scheduling" + | "stream" + | "voice"; + /** @description The name of the channel */ + name: string; + /** @description The topic of the channel */ + topic?: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the channel was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this channel + */ + createdBy: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the channel was updated at, if relevant + */ + updatedAt?: string; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description ID of the parent channel or parent thread, if present. Only relevant for server channels + */ + parentId?: string; + /** @description Only relevant for server channels */ + categoryId?: number; + /** + * Group ID + * + * @description The ID of the group + */ + groupId: string; + /** + * Is public + * + * @description Whether the channel can be accessed from users who are not member of the server + * @default false + */ + isPublic?: boolean; + /** + * Archived by + * + * @description The ID of the user who archived this channel + */ + archivedBy?: string; + /** + * Archived at + * Format: date-time + * + * @description The ISO 8601 timestamp that the channel was archived at, if relevant + */ + archivedAt?: string; + }; + /** + * @example { + * "id": "wlVr3Ggl", + * "type": "community", + * "name": "Guilded", + * "url": "Guilded-Official", + * "about": "The Official Guilded Server! For devs, friends, and fans alike!", + * "ownerId": "Ann6LewA", + * "createdAt": "2018-10-05T20:15:00.706Z", + * "isVerified": true, + * "timezone": "America/Los Angeles (PST/PDT)" + * } + */ + Server: { + /** + * Server ID + * + * @description The ID of the server + */ + id: string; + /** + * Created by + * + * @description The ID of the user who created this server + */ + ownerId: string; + /** + * Server type + * + * @description The type of server designated from the server's settings page + * @enum {string} + */ + type?: + | "clan" + | "community" + | "friends" + | "guild" + | "organization" + | "other" + | "streaming" + | "team"; + /** + * Server name + * + * @description The name given to the server + */ + name: string; + /** + * Server URL + * + * @description The URL that the server can be accessible from. For example, a value of "Guilded-Official" means the server can be accessible from https://www.guilded.gg/Guilded-Official + */ + url?: string; + /** + * Description + * + * @description The description associated with the server + */ + about?: string; + /** + * Avatar + * Format: media-uri + * + * @description The avatar image associated with the server + */ + avatar?: string; + /** + * Banner + * Format: media-uri + * + * @description The banner image associated with the server + */ + banner?: string; + /** + * Timezone + * + * @description The timezone associated with the server + */ + timezone?: string; + /** + * Is verified + * + * @description The verified status of the server + */ + isVerified?: boolean; + /** + * Channel ID + * Format: uuid + * + * @description The channel ID of the default channel of the server. This channel is defined as the first chat or voice channel in the left sidebar of a server in our UI. This channel is useful for sending welcome messages, though note that a bot may not have permissions to interact with this channel depending on how the server is configured. + */ + defaultChannelId?: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the server was created at + */ + createdAt: string; + }; + /** + * @example { + * "id": "00000000-0000-0000-0000-000000000000", + * "serverId": "wlVr3Ggl", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "name": "E-102 Gamma", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA" + * } + */ + Webhook: { + /** + * Webhook ID + * Format: uuid + * + * @description The ID of the webhook + */ + id: string; + /** + * Name + * + * @description The name of the webhook + */ + name: string; + /** + * Avatar + * Format: media-uri + * + * @description The avatar image associated with the webhook + */ + avatar?: string; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the webhook was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this webhook + */ + createdBy: string; + /** + * Deleted at + * Format: date-time + * + * @description The ISO 8601 timestamp that the webhook was deleted at + */ + deletedAt?: string; + /** + * Token + * + * @description The token of the webhook + */ + token?: string; + }; + /** + * @example { + * "id": 1, + * "serverId": "wlVr3Ggl", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "name": "Surprise LAN party for my wife 🤫", + * "description": "**Don't say anything to her!** She's gonna love playing Call of Duty all night", + * "location": "My house!", + * "url": "https://www.surprisepartygame.com/", + * "duration": 60, + * "color": 16106496, + * "startsAt": "2022-06-16T00:00:00.000Z", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA" + * } + */ + CalendarEvent: { + /** + * Calendar event ID + * + * @description The ID of the calendar event + */ + id: number; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Name + * + * @description The name of the event + */ + name: string; + /** + * Description + * Format: markdown + * + * @description The description of the event + */ + description?: string; + /** + * Location + * + * @description The location of the event + */ + location?: string; + /** + * Format: uri + * + * @description A URL to associate with the event + */ + url?: string; + /** @description The color of the event when viewing in the calendar */ + color?: number; + /** @description Is this event a repeating event */ + repeats?: boolean; + /** + * Calendar event series ID + * Format: uuid + * + * @description The ID of the calendar event series. Only shows if the event is repeating + */ + seriesId?: string; + /** + * Role IDs + * + * @description The role IDs to restrict the event to + */ + roleIds?: number[]; + /** + * RSVP disabled + * + * @description When disabled, users will not be able to RSVP to the event + */ + rsvpDisabled?: boolean; + /** + * Is all day + * + * @description Does the event last all day + */ + isAllDay?: boolean; + /** @description The number of RSVPs to allow before waitlisting RSVPs */ + rsvpLimit?: number; + /** @description When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event */ + autofillWaitlist?: boolean; + /** + * Starts at + * Format: date-time + * + * @description The ISO 8601 timestamp that the event starts at + */ + startsAt: string; + /** + * Duration + * + * @description The duration of the event _**in minutes**_ + */ + duration?: number; + /** Is private */ + isPrivate?: boolean; + mentions?: components["schemas"]["Mentions"]; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the event was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this event + */ + createdBy: string; + cancellation?: { + /** + * Description + * Format: markdown + * + * @description The description of event cancellation + */ + description?: string; + /** + * Created by + * + * @description The ID of the user who created this event cancellation + */ + createdBy: string; + }; + }; + /** + * @example { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * } + */ + Emote: { + /** + * Emote ID + * + * @description The ID of the emote + */ + id: number; + /** + * Name + * + * @description The name of the emote + */ + name: string; + /** + * Emote URL + * Format: media-uri + * + * @description The URL of the emote image + */ + url: string; + /** + * Server ID + * + * @description The ID of the server the emote was created on + */ + serverId?: string; + }; + /** + * @example { + * "calendarEventId": 1, + * "channelId": "00000000-0000-0000-0000-000000000000", + * "serverId": "wlVr3Ggl", + * "userId": "Ann6LewA", + * "status": "going", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA" + * } + */ + CalendarEventRsvp: { + /** + * Calendar event ID + * + * @description The ID of the calendar event + */ + calendarEventId: number; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * User ID + * + * @description The ID of the user + */ + userId: string; + /** + * Status + * + * @description The status of the RSVP + * @enum {string} + */ + status: + | "declined" + | "going" + | "invited" + | "maybe" + | "not responded" + | "waitlisted"; + /** + * Created by + * + * @description The ID of the user who created this RSVP + */ + createdBy: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the RSVP was created at + */ + createdAt: string; + /** + * Updated by + * + * @description The ID of the user who updated this RSVP + */ + updatedBy?: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the RSVP was updated at, if relevant + */ + updatedAt?: string; + }; + /** + * @example { + * "id": 1234567890, + * "content": "I will be there!!", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdAt": "2022-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA", + * "calendarEventId": 987654321 + * } + */ + CalendarEventComment: { + /** + * Calendar event comment ID + * + * @description The ID of the calendar event comment + */ + id: number; + /** + * Content + * Format: markdown + * + * @description The content of the calendar event comment + */ + content: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the calendar event comment was created at + */ + createdAt: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the calendar event comment was updated at, if relevant + */ + updatedAt?: string; + /** + * Calendar event ID + * + * @description The ID of the calendar event + */ + calendarEventId: number; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Created by + * + * @description The ID of the user who created this calendar event comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + mentions?: components["schemas"]["Mentions"]; + }; + /** + * @example { + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdBy": "Ann6LewA", + * "emote": { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * }, + * "calendarEventId": 1 + * } + */ + CalendarEventReaction: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * User ID + * + * @description The ID of the user who added the reaction + */ + createdBy: string; + emote: components["schemas"]["Emote"]; + /** + * Calendar event ID + * + * @description The ID of the calendar event + */ + calendarEventId: number; + }; + /** + * @example { + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdBy": "Ann6LewA", + * "emote": { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * }, + * "calendarEventId": 1, + * "calendarEventCommentId": 1234567890 + * } + */ + CalendarEventCommentReaction: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * User ID + * + * @description The ID of the user who added the reaction + */ + createdBy: string; + emote: components["schemas"]["Emote"]; + /** + * Calendar event ID + * + * @description The ID of the calendar event + */ + calendarEventId: number; + /** + * Calendar event comment ID + * + * @description The ID of the calendar event comment + */ + calendarEventCommentId: number; + }; + /** + * @example { + * "id": "00000000-0000-0000-0000-000000000000", + * "serverId": "wlVr3Ggl", + * "channelId": "00000000-0000-0000-0000-000000000000" + * } + */ + CalendarEventSeries: { + /** + * Calendar event series ID + * Format: uuid + * + * @description The ID of the calendar event series + */ + id: string; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + }; + /** + * @example { + * "id": "9RVMoDZy", + * "serverId": "wlVr3Ggl", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdAt": "2021-06-15T20:15:00.706Z", + * "createdBy": "Ann6LewA", + * "title": "Pizza Party, don't be tardy!", + * "content": "Grab a slice, don't be slow, At our pizza party, it's the way to go! Toppings galore, cheesy delight, Come join us, it'll be out of sight!" + * } + */ + Announcement: { + /** + * Announcement ID + * + * @description The ID of the announcement + */ + id: string; + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the announcement was created at + */ + createdAt: string; + /** + * Created by + * + * @description The ID of the user who created this announcement + */ + createdBy: string; + /** + * Content + * Format: markdown + * + * @description The content of the announcement + */ + content: string; + mentions?: components["schemas"]["Mentions"]; + /** + * Title + * + * @description The title of the announcement + */ + title: string; + }; + /** + * @example { + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdBy": "Ann6LewA", + * "emote": { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * }, + * "announcementId": "9RVMoDZy" + * } + */ + AnnouncementReaction: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * User ID + * + * @description The ID of the user who added the reaction + */ + createdBy: string; + emote: components["schemas"]["Emote"]; + /** + * Announcement ID + * + * @description The ID of the announcement + */ + announcementId: string; + }; + /** + * @example { + * "id": 123456, + * "content": "Now THAT is one awesome announcement!!!", + * "createdAt": "2023-04-07T16:19:00.000Z", + * "channelId": "00000000-0000-0000-0000-000000000000", + * "announcementId": "9RVMoDZy", + * "createdBy": "Ann6LewA" + * } + */ + AnnouncementComment: { + /** + * Announcement comment ID + * + * @description The ID of the announcement comment + */ + id: number; + /** + * Content + * Format: markdown + * + * @description The content of the announcement comment + */ + content: string; + /** + * Created at + * Format: date-time + * + * @description The ISO 8601 timestamp that the announcement comment was created at + */ + createdAt: string; + /** + * Updated at + * Format: date-time + * + * @description The ISO 8601 timestamp that the announcement comment was updated at, if relevant + */ + updatedAt?: string; + /** + * Created by + * + * @description The ID of the user who created this announcement comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Announcement ID + * + * @description The ID of the announcement + */ + announcementId: string; + mentions?: components["schemas"]["Mentions"]; + }; + /** + * @example { + * "channelId": "00000000-0000-0000-0000-000000000000", + * "createdBy": "Ann6LewA", + * "emote": { + * "id": 90000000, + * "name": "grinning", + * "url": "https://img.guildedcdn.com/asset/Emojis/grinning.webp" + * }, + * "announcementId": "9RVMoDZy", + * "announcementCommentId": 123456 + * } + */ + AnnouncementCommentReaction: { + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * User ID + * + * @description The ID of the user who added the reaction + */ + createdBy: string; + emote: components["schemas"]["Emote"]; + /** + * Announcement ID + * + * @description The ID of the announcement + */ + announcementId: string; + /** + * Announcement comment ID + * + * @description The ID of the announcement comment + */ + announcementCommentId: number; + }; + }; + responses: { + _WelcomeMessage: { + content: { + "application/json": { + /** @description The interval in milliseconds that your bot should be configured to send ping frames for the bot's [heartbeat](/docs/api/heartbeat) to be considered valid. */ + heartbeatIntervalMs: number; + /** @description The last message's ID that was sent to this bot. See [event replay](/docs/api/replay) for more details */ + lastMessageId: string; + /** + * Bot ID + * Format: uuid + * + * @description The ID of the bot + */ + botId: string; + user: components["schemas"]["User"]; + }; + }; + }; + /** @description Emitted when a bot is added to a server */ + BotServerMembershipCreated: { + content: { + "application/json": { + server: components["schemas"]["Server"]; + /** + * Created by + * + * @description The ID of the user who created this server membership + */ + createdBy: string; + }; + }; + }; + /** @description Emitted when a bot is removed from a server */ + BotServerMembershipDeleted: { + content: { + "application/json": { + server: components["schemas"]["Server"]; + /** + * Deleted by + * + * @description The ID of the user who deleted this server membership + */ + deletedBy: string; + }; + }; + }; + ChatMessageCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + message: components["schemas"]["ChatMessage"]; + }; + }; + }; + ChatMessageUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + message: components["schemas"]["ChatMessage"]; + }; + }; + }; + ChatMessageDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + message: { + /** + * Message ID + * Format: uuid + * + * @description The ID of the message + */ + id: string; + /** + * Server ID + * + * @description The ID of the server + */ + serverId?: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Deleted at + * Format: date-time + * + * @description The ISO 8601 timestamp that the message was deleted at + */ + deletedAt: string; + /** Is private */ + isPrivate?: boolean; + }; + }; + }; + }; + ServerMemberJoined: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + member: components["schemas"]["ServerMember"]; + }; + }; + }; + ServerMemberRemoved: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * User ID + * + * @description The ID of the user + */ + userId: string; + /** + * Is kick? + * + * @description If this member leaving was the result of a kick + */ + isKick?: boolean; + /** + * Is ban? + * + * @description If this member leaving was the result of a ban + */ + isBan?: boolean; + }; + }; + }; + ServerMemberBanned: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + serverMemberBan: components["schemas"]["ServerMemberBan"]; + }; + }; + }; + ServerMemberUnbanned: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + serverMemberBan: components["schemas"]["ServerMemberBan"]; + }; + }; + }; + ServerMemberUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + userInfo: { + /** + * User ID + * + * @description The ID of the user + */ + id: string; + /** + * Nickname + * + * @description The nickname that was just updated for the user + */ + nickname?: + | string + | null; + }; + }; + }; + }; + ServerRolesUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + memberRoleIds: { + /** + * User ID + * + * @description The ID of the member that had roles updated + */ + userId: string; + /** + * Role IDs + * + * @description The IDs of the roles that the member currently has _after_ this operation + */ + roleIds: number[]; + }[]; + }; + }; + }; + ServerChannelCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + channel: components["schemas"]["ServerChannel"]; + }; + }; + }; + ServerChannelUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + channel: components["schemas"]["ServerChannel"]; + }; + }; + }; + ServerChannelDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + channel: components["schemas"]["ServerChannel"]; + }; + }; + }; + ServerMemberSocialLinkCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + socialLink: components["schemas"]["SocialLink"]; + }; + }; + }; + ServerMemberSocialLinkUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + socialLink: components["schemas"]["SocialLink"]; + }; + }; + }; + ServerMemberSocialLinkDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + socialLink: components["schemas"]["SocialLink"]; + }; + }; + }; + ServerWebhookCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + webhook: components["schemas"]["Webhook"]; + }; + }; + }; + ServerWebhookUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + webhook: components["schemas"]["Webhook"]; + }; + }; + }; + DocCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + doc: components["schemas"]["Doc"]; + }; + }; + }; + DocUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + doc: components["schemas"]["Doc"]; + }; + }; + }; + DocDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + doc: components["schemas"]["Doc"]; + }; + }; + }; + DocCommentCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + docComment: components["schemas"]["DocComment"]; + }; + }; + }; + DocCommentDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + docComment: components["schemas"]["DocComment"]; + }; + }; + }; + DocCommentUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + docComment: components["schemas"]["DocComment"]; + }; + }; + }; + CalendarEventCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEvent: components["schemas"]["CalendarEvent"]; + }; + }; + }; + CalendarEventUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEvent: components["schemas"]["CalendarEvent"]; + }; + }; + }; + CalendarEventDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEvent: components["schemas"]["CalendarEvent"]; + }; + }; + }; + ForumTopicCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopic: components["schemas"]["ForumTopic"]; + }; + }; + }; + ForumTopicUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopic: components["schemas"]["ForumTopic"]; + }; + }; + }; + ForumTopicDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopic: components["schemas"]["ForumTopic"]; + }; + }; + }; + ForumTopicPinned: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopic: components["schemas"]["ForumTopic"]; + }; + }; + }; + ForumTopicUnpinned: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopic: components["schemas"]["ForumTopic"]; + }; + }; + }; + ForumTopicReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["ForumTopicReaction"]; + }; + }; + }; + ForumTopicReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["ForumTopicReaction"]; + }; + }; + }; + ForumTopicLocked: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopic: components["schemas"]["ForumTopic"]; + }; + }; + }; + ForumTopicUnlocked: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopic: components["schemas"]["ForumTopic"]; + }; + }; + }; + ForumTopicCommentCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopicComment: components["schemas"]["ForumTopicComment"]; + }; + }; + }; + ForumTopicCommentUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopicComment: components["schemas"]["ForumTopicComment"]; + }; + }; + }; + ForumTopicCommentDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + forumTopicComment: components["schemas"]["ForumTopicComment"]; + }; + }; + }; + CalendarEventRsvpUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEventRsvp: components["schemas"]["CalendarEventRsvp"]; + }; + }; + }; + CalendarEventRsvpManyUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEventRsvps: components["schemas"]["CalendarEventRsvp"][]; + }; + }; + }; + CalendarEventRsvpDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEventRsvp: components["schemas"]["CalendarEventRsvp"]; + }; + }; + }; + ListItemCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + listItem: components["schemas"]["ListItem"]; + }; + }; + }; + ListItemUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + listItem: components["schemas"]["ListItem"]; + }; + }; + }; + ListItemDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + listItem: components["schemas"]["ListItem"]; + }; + }; + }; + ListItemCompleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + listItem: components["schemas"]["ListItem"]; + }; + }; + }; + ListItemUncompleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + listItem: components["schemas"]["ListItem"]; + }; + }; + }; + ChannelMessageReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["ChatMessageReaction"]; + }; + }; + }; + ChannelMessageReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Deleted by + * + * @description The ID of the user who deleted this reaction + */ + deletedBy: string; + reaction: components["schemas"]["ChatMessageReaction"]; + }; + }; + }; + ChannelMessageReactionManyDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + /** + * Channel ID + * Format: uuid + * + * @description The ID of the channel + */ + channelId: string; + /** + * Message ID + * Format: uuid + * + * @description The ID of the message + */ + messageId: string; + /** + * Deleted by + * + * @description The ID of the user who deleted this reaction + */ + deletedBy: string; + /** @description The count of reactions that were removed */ + count: number; + /** @description If present, only reactions of this emote were bulk removed from the message */ + emote?: components["schemas"]["Emote"]; + }; + }; + }; + ForumTopicCommentReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["ForumTopicCommentReaction"]; + }; + }; + }; + ForumTopicCommentReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["ForumTopicCommentReaction"]; + }; + }; + }; + CalendarEventCommentCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEventComment: components["schemas"]["CalendarEventComment"]; + }; + }; + }; + CalendarEventCommentDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEventComment: components["schemas"]["CalendarEventComment"]; + }; + }; + }; + CalendarEventCommentUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEventComment: components["schemas"]["CalendarEventComment"]; + }; + }; + }; + CalendarEventReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["CalendarEventReaction"]; + }; + }; + }; + CalendarEventReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["CalendarEventReaction"]; + }; + }; + }; + CalendarEventCommentReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["CalendarEventCommentReaction"]; + }; + }; + }; + CalendarEventCommentReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["CalendarEventCommentReaction"]; + }; + }; + }; + DocReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["DocReaction"]; + }; + }; + }; + DocReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["DocReaction"]; + }; + }; + }; + DocCommentReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["DocCommentReaction"]; + }; + }; + }; + DocCommentReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["DocCommentReaction"]; + }; + }; + }; + CalendarEventSeriesUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEventSeries: components["schemas"]["CalendarEventSeries"]; + /** + * Calendar event ID + * + * @description The calendar event updates started at + */ + calendarEventId?: number; + }; + }; + }; + CalendarEventSeriesDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + calendarEventSeries: components["schemas"]["CalendarEventSeries"]; + /** + * Calendar event ID + * + * @description The calendar event deletions started at + */ + calendarEventId?: number; + }; + }; + }; + AnnouncementCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + announcement: components["schemas"]["Announcement"]; + }; + }; + }; + AnnouncementUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + announcement: components["schemas"]["Announcement"]; + }; + }; + }; + AnnouncementDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + announcement: components["schemas"]["Announcement"]; + }; + }; + }; + AnnouncementReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["AnnouncementReaction"]; + }; + }; + }; + AnnouncementReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["AnnouncementReaction"]; + }; + }; + }; + AnnouncementCommentCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + announcementComment: components["schemas"]["AnnouncementComment"]; + }; + }; + }; + AnnouncementCommentUpdated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + announcementComment: components["schemas"]["AnnouncementComment"]; + }; + }; + }; + AnnouncementCommentDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + announcementComment: components["schemas"]["AnnouncementComment"]; + }; + }; + }; + AnnouncementCommentReactionCreated: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["AnnouncementCommentReaction"]; + }; + }; + }; + AnnouncementCommentReactionDeleted: { + content: { + "application/json": { + /** + * Server ID + * + * @description The ID of the server + */ + serverId: string; + reaction: components["schemas"]["AnnouncementCommentReaction"]; + }; + }; + }; + }; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; }; export type external = Record; diff --git a/packages/api/lib/generated/router/GuildedRouter.ts b/packages/api/lib/generated/router/GuildedRouter.ts index cbbe40f4..bda0f9bc 100644 --- a/packages/api/lib/generated/router/GuildedRouter.ts +++ b/packages/api/lib/generated/router/GuildedRouter.ts @@ -3,11 +3,13 @@ import type { BaseHttpRequest } from "./core/BaseHttpRequest"; import { FetchHttpRequest } from "./core/FetchHttpRequest"; +import { RestManager } from "../../rest/RestManager"; import { AnnouncementCommentsService } from "./services/AnnouncementCommentsService"; import { AnnouncementsService } from "./services/AnnouncementsService"; import { CalendarEventCommentsService } from "./services/CalendarEventCommentsService"; -import { CalendarEventsService } from "./services/CalendarEventsService"; import { CalendarEventSeriesService } from "./services/CalendarEventSeriesService"; +import { CalendarEventsService } from "./services/CalendarEventsService"; +import { CategoriesService } from "./services/CategoriesService"; import { ChannelsService } from "./services/ChannelsService"; import { ChatService } from "./services/ChatService"; import { DocCommentsService } from "./services/DocCommentsService"; @@ -22,76 +24,187 @@ import { MembersService } from "./services/MembersService"; import { ReactionsService } from "./services/ReactionsService"; import { RoleMembershipService } from "./services/RoleMembershipService"; import { RolesService } from "./services/RolesService"; -import { ServersService } from "./services/ServersService"; +import { ServerSubscriptionService } from "./services/ServerSubscriptionService"; import { ServerXpService } from "./services/ServerXpService"; +import { ServersService } from "./services/ServersService"; import { SocialLinksService } from "./services/SocialLinksService"; -import { UsersService } from "./services/UsersService"; import { UserStatusService } from "./services/UserStatusService"; +import { UsersService } from "./services/UsersService"; import { WebhookService } from "./services/WebhookService"; -import { RestManager } from "../../rest/RestManager"; -import { ServerSubscriptionService } from "./services/ServerSubscriptionService"; -import { CategoriesService } from "./services/CategoriesService"; export class GuildedRouter { - public readonly announcementComments: AnnouncementCommentsService; - public readonly announcements: AnnouncementsService; - public readonly calendarEventComments: CalendarEventCommentsService; - public readonly calendarEvents: CalendarEventsService; - public readonly calendarEventSeries: CalendarEventSeriesService; - public readonly categories: CategoriesService; - public readonly channels: ChannelsService; - public readonly chat: ChatService; - public readonly docComments: DocCommentsService; - public readonly docs: DocsService; - public readonly forumComments: ForumCommentsService; - public readonly forums: ForumsService; - public readonly groupMembership: GroupMembershipService; - public readonly groups: GroupsService; - public readonly listItems: ListItemsService; - public readonly memberBans: MemberBansService; - public readonly members: MembersService; - public readonly reactions: ReactionsService; - public readonly roleMembership: RoleMembershipService; - public readonly roles: RolesService; - public readonly servers: ServersService; - public readonly serverXp: ServerXpService; - public readonly socialLinks: SocialLinksService; - public readonly users: UsersService; - public readonly userStatus: UserStatusService; - public readonly webhook: WebhookService; - public readonly serverSubscriptions: ServerSubscriptionService; + public readonly announcementComments: AnnouncementCommentsService; + public readonly announcements: AnnouncementsService; + public readonly calendarEventComments: CalendarEventCommentsService; + public readonly calendarEvents: CalendarEventsService; + public readonly calendarEventSeries: CalendarEventSeriesService; + public readonly categories: CategoriesService; + public readonly channels: ChannelsService; + public readonly chat: ChatService; + public readonly docComments: DocCommentsService; + public readonly docs: DocsService; + public readonly forumComments: ForumCommentsService; + public readonly forums: ForumsService; + public readonly groupMembership: GroupMembershipService; + public readonly groups: GroupsService; + public readonly listItems: ListItemsService; + public readonly memberBans: MemberBansService; + public readonly members: MembersService; + public readonly reactions: ReactionsService; + public readonly roleMembership: RoleMembershipService; + public readonly roles: RolesService; + public readonly servers: ServersService; + public readonly serverXp: ServerXpService; + public readonly socialLinks: SocialLinksService; + public readonly users: UsersService; + public readonly userStatus: UserStatusService; + public readonly webhook: WebhookService; + public readonly serverSubscriptions: ServerSubscriptionService; - public readonly request: BaseHttpRequest; + public readonly request: BaseHttpRequest; - constructor(rest: RestManager) { - this.request = new FetchHttpRequest(rest); + constructor( + rest: RestManager, + ) { + this.request = + new FetchHttpRequest( + rest, + ); - this.announcementComments = new AnnouncementCommentsService(this.request); - this.announcements = new AnnouncementsService(this.request); - this.calendarEventComments = new CalendarEventCommentsService(this.request); - this.calendarEvents = new CalendarEventsService(this.request); - this.calendarEventSeries = new CalendarEventSeriesService(this.request); - this.categories = new CategoriesService(this.request); - this.channels = new ChannelsService(this.request); - this.chat = new ChatService(this.request); - this.docComments = new DocCommentsService(this.request); - this.docs = new DocsService(this.request); - this.forumComments = new ForumCommentsService(this.request); - this.forums = new ForumsService(this.request); - this.groupMembership = new GroupMembershipService(this.request); - this.groups = new GroupsService(this.request); - this.listItems = new ListItemsService(this.request); - this.memberBans = new MemberBansService(this.request); - this.members = new MembersService(this.request); - this.reactions = new ReactionsService(this.request); - this.roleMembership = new RoleMembershipService(this.request); - this.roles = new RolesService(this.request); - this.servers = new ServersService(this.request); - this.serverXp = new ServerXpService(this.request); - this.socialLinks = new SocialLinksService(this.request); - this.users = new UsersService(this.request); - this.userStatus = new UserStatusService(this.request); - this.webhook = new WebhookService(this.request); - this.serverSubscriptions = new ServerSubscriptionService(this.request); - } + this.announcementComments = + new AnnouncementCommentsService( + this + .request, + ); + this.announcements = + new AnnouncementsService( + this + .request, + ); + this.calendarEventComments = + new CalendarEventCommentsService( + this + .request, + ); + this.calendarEvents = + new CalendarEventsService( + this + .request, + ); + this.calendarEventSeries = + new CalendarEventSeriesService( + this + .request, + ); + this.categories = + new CategoriesService( + this + .request, + ); + this.channels = + new ChannelsService( + this + .request, + ); + this.chat = + new ChatService( + this + .request, + ); + this.docComments = + new DocCommentsService( + this + .request, + ); + this.docs = + new DocsService( + this + .request, + ); + this.forumComments = + new ForumCommentsService( + this + .request, + ); + this.forums = + new ForumsService( + this + .request, + ); + this.groupMembership = + new GroupMembershipService( + this + .request, + ); + this.groups = + new GroupsService( + this + .request, + ); + this.listItems = + new ListItemsService( + this + .request, + ); + this.memberBans = + new MemberBansService( + this + .request, + ); + this.members = + new MembersService( + this + .request, + ); + this.reactions = + new ReactionsService( + this + .request, + ); + this.roleMembership = + new RoleMembershipService( + this + .request, + ); + this.roles = + new RolesService( + this + .request, + ); + this.servers = + new ServersService( + this + .request, + ); + this.serverXp = + new ServerXpService( + this + .request, + ); + this.socialLinks = + new SocialLinksService( + this + .request, + ); + this.users = + new UsersService( + this + .request, + ); + this.userStatus = + new UserStatusService( + this + .request, + ); + this.webhook = + new WebhookService( + this + .request, + ); + this.serverSubscriptions = + new ServerSubscriptionService( + this + .request, + ); + } } diff --git a/packages/api/lib/generated/router/core/ApiError.ts b/packages/api/lib/generated/router/core/ApiError.ts index 7eca264d..5e0d5cdd 100644 --- a/packages/api/lib/generated/router/core/ApiError.ts +++ b/packages/api/lib/generated/router/core/ApiError.ts @@ -4,20 +4,32 @@ import type { ApiRequestOptions } from "./ApiRequestOptions"; import type { ApiResult } from "./ApiResult"; export class ApiError extends Error { - public readonly url: string; - public readonly status: number; - public readonly statusText: string; - public readonly body: any; - public readonly request: ApiRequestOptions; + public readonly url: string; + public readonly status: number; + public readonly statusText: string; + public readonly body: any; + public readonly request: ApiRequestOptions; - constructor(request: ApiRequestOptions, response: ApiResult, message: string) { - super(message); + constructor( + request: ApiRequestOptions, + response: ApiResult, + message: string, + ) { + super( + message, + ); - this.name = "ApiError"; - this.url = response.url; - this.status = response.status; - this.statusText = response.statusText; - this.body = response.body; - this.request = request; - } + this.name = + "ApiError"; + this.url = + response.url; + this.status = + response.status; + this.statusText = + response.statusText; + this.body = + response.body; + this.request = + request; + } } diff --git a/packages/api/lib/generated/router/core/ApiRequestOptions.ts b/packages/api/lib/generated/router/core/ApiRequestOptions.ts index bc33184d..e2e11e4b 100644 --- a/packages/api/lib/generated/router/core/ApiRequestOptions.ts +++ b/packages/api/lib/generated/router/core/ApiRequestOptions.ts @@ -1,15 +1,40 @@ /* istanbul ignore file */ /* eslint-disable */ export type ApiRequestOptions = { - readonly method: "GET" | "PUT" | "POST" | "DELETE" | "OPTIONS" | "HEAD" | "PATCH"; - readonly url: string; - readonly path?: Record; - readonly cookies?: Record; - readonly headers?: Record; - readonly query?: Record; - readonly formData?: Record; - readonly body?: any; - readonly mediaType?: string; - readonly responseHeader?: string; - readonly errors?: Record; + readonly method: + | "GET" + | "PUT" + | "POST" + | "DELETE" + | "OPTIONS" + | "HEAD" + | "PATCH"; + readonly url: string; + readonly path?: Record< + string, + any + >; + readonly cookies?: Record< + string, + any + >; + readonly headers?: Record< + string, + any + >; + readonly query?: Record< + string, + any + >; + readonly formData?: Record< + string, + any + >; + readonly body?: any; + readonly mediaType?: string; + readonly responseHeader?: string; + readonly errors?: Record< + number, + string + >; }; diff --git a/packages/api/lib/generated/router/core/ApiResult.ts b/packages/api/lib/generated/router/core/ApiResult.ts index 20b0bef7..227b831a 100644 --- a/packages/api/lib/generated/router/core/ApiResult.ts +++ b/packages/api/lib/generated/router/core/ApiResult.ts @@ -1,9 +1,9 @@ /* istanbul ignore file */ /* eslint-disable */ export type ApiResult = { - readonly url: string; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly body: any; + readonly url: string; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly body: any; }; diff --git a/packages/api/lib/generated/router/core/BaseHttpRequest.ts b/packages/api/lib/generated/router/core/BaseHttpRequest.ts index dba5b03d..d5a2243d 100644 --- a/packages/api/lib/generated/router/core/BaseHttpRequest.ts +++ b/packages/api/lib/generated/router/core/BaseHttpRequest.ts @@ -5,7 +5,13 @@ import type { ApiRequestOptions } from "./ApiRequestOptions"; import type { CancelablePromise } from "./CancelablePromise"; export abstract class BaseHttpRequest { - constructor(public readonly rest: RestManager) {} + constructor( + public readonly rest: RestManager, + ) {} - public abstract request(options: ApiRequestOptions): CancelablePromise; + public abstract request< + T, + >( + options: ApiRequestOptions, + ): CancelablePromise; } diff --git a/packages/api/lib/generated/router/core/FetchHttpRequest.ts b/packages/api/lib/generated/router/core/FetchHttpRequest.ts index a0a999de..e21e8a58 100644 --- a/packages/api/lib/generated/router/core/FetchHttpRequest.ts +++ b/packages/api/lib/generated/router/core/FetchHttpRequest.ts @@ -7,17 +7,21 @@ import type { CancelablePromise } from "./CancelablePromise"; import { request as __request } from "./request"; export class FetchHttpRequest extends BaseHttpRequest { - constructor(rest: RestManager) { - super(rest); - } - - /** - * Request method - * @param options The request options from the service - * @returns CancelablePromise - * @throws ApiError - */ - public override request(options: ApiRequestOptions): CancelablePromise { - return __request(this.rest, options); - } + /** + * Request method + * @param options The request options from the service + * @returns CancelablePromise + * @throws ApiError + */ + public override request< + T, + >( + options: ApiRequestOptions, + ): CancelablePromise { + return __request( + this + .rest, + options, + ); + } } diff --git a/packages/api/lib/generated/router/core/OpenAPI.ts b/packages/api/lib/generated/router/core/OpenAPI.ts index d8e03c96..481cde80 100644 --- a/packages/api/lib/generated/router/core/OpenAPI.ts +++ b/packages/api/lib/generated/router/core/OpenAPI.ts @@ -6,25 +6,38 @@ type Resolver = (options: ApiRequestOptions) => Promise; type Headers = Record; export type OpenAPIConfig = { - BASE: string; - VERSION: string; - WITH_CREDENTIALS: boolean; - CREDENTIALS: "include" | "omit" | "same-origin"; - TOKEN?: string | Resolver; - USERNAME?: string | Resolver; - PASSWORD?: string | Resolver; - HEADERS?: Headers | Resolver; - ENCODE_PATH?: (path: string) => string; + BASE: string; + VERSION: string; + WITH_CREDENTIALS: boolean; + CREDENTIALS: + | "include" + | "omit" + | "same-origin"; + TOKEN?: + | string + | Resolver; + USERNAME?: + | string + | Resolver; + PASSWORD?: + | string + | Resolver; + HEADERS?: + | Headers + | Resolver; + ENCODE_PATH?: ( + path: string, + ) => string; }; export const OpenAPI: OpenAPIConfig = { - BASE: "https://www.guilded.gg/api/v1", - VERSION: "0.0.1", - WITH_CREDENTIALS: false, - CREDENTIALS: "include", - TOKEN: undefined, - USERNAME: undefined, - PASSWORD: undefined, - HEADERS: undefined, - ENCODE_PATH: undefined, + BASE: "https://www.guilded.gg/api/v1", + VERSION: "0.0.1", + WITH_CREDENTIALS: false, + CREDENTIALS: "include", + TOKEN: undefined, + USERNAME: undefined, + PASSWORD: undefined, + HEADERS: undefined, + ENCODE_PATH: undefined, }; diff --git a/packages/api/lib/generated/router/core/request.ts b/packages/api/lib/generated/router/core/request.ts index 3265dde2..35a60b41 100644 --- a/packages/api/lib/generated/router/core/request.ts +++ b/packages/api/lib/generated/router/core/request.ts @@ -4,21 +4,38 @@ import { RestManager } from "../../../rest/RestManager"; import type { ApiRequestOptions } from "./ApiRequestOptions"; export function request(rest: RestManager, options: ApiRequestOptions) { - let formattedPath = options.url; - if (options.path) { - for (const key in options.path) { - formattedPath = formattedPath.replace(`{${key}}`, options.path[key]); - } - } + let formattedPath = + options.url; + if ( + options.path + ) { + for (const key in options.path) { + formattedPath = + formattedPath.replace( + `{${key}}`, + options + .path[ + key + ], + ); + } + } - return rest - .make({ - method: options.method, - headers: options.headers, - isFormData: false, - path: formattedPath, - query: options.query, - body: options.body, - }) - .then((x) => x[1] as T); + return rest + .make( + { + method: options.method, + headers: options.headers, + isFormData: false, + path: formattedPath, + query: options.query, + body: options.body, + }, + ) + .then( + ( + x, + ) => + x[1] as T, + ); } diff --git a/packages/api/lib/generated/router/models/Announcement.ts b/packages/api/lib/generated/router/models/Announcement.ts index d9b31a58..fcff3c93 100644 --- a/packages/api/lib/generated/router/models/Announcement.ts +++ b/packages/api/lib/generated/router/models/Announcement.ts @@ -6,33 +6,33 @@ import type { Mentions } from "./Mentions"; export type Announcement = { - /** - * The ID of the announcement - */ - id: string; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The ISO 8601 timestamp that the announcement was created at - */ - createdAt: string; - /** - * The ID of the user who created this announcement - */ - createdBy: string; - /** - * The content of the announcement - */ - content: string; - mentions?: Mentions; - /** - * The title of the announcement - */ - title: string; + /** + * The ID of the announcement + */ + id: string; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ISO 8601 timestamp that the announcement was created at + */ + createdAt: string; + /** + * The ID of the user who created this announcement + */ + createdBy: string; + /** + * The content of the announcement + */ + content: string; + mentions?: Mentions; + /** + * The title of the announcement + */ + title: string; }; diff --git a/packages/api/lib/generated/router/models/AnnouncementComment.ts b/packages/api/lib/generated/router/models/AnnouncementComment.ts index a1fe0abe..6a1dc50c 100644 --- a/packages/api/lib/generated/router/models/AnnouncementComment.ts +++ b/packages/api/lib/generated/router/models/AnnouncementComment.ts @@ -6,33 +6,33 @@ import type { Mentions } from "./Mentions"; export type AnnouncementComment = { - /** - * The ID of the announcement comment - */ - id: number; - /** - * The content of the announcement comment - */ - content: string; - /** - * The ISO 8601 timestamp that the announcement comment was created at - */ - createdAt: string; - /** - * The ISO 8601 timestamp that the announcement comment was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the user who created this announcement comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the announcement - */ - announcementId: string; - mentions?: Mentions; + /** + * The ID of the announcement comment + */ + id: number; + /** + * The content of the announcement comment + */ + content: string; + /** + * The ISO 8601 timestamp that the announcement comment was created at + */ + createdAt: string; + /** + * The ISO 8601 timestamp that the announcement comment was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the user who created this announcement comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the announcement + */ + announcementId: string; + mentions?: Mentions; }; diff --git a/packages/api/lib/generated/router/models/AnnouncementCommentReaction.ts b/packages/api/lib/generated/router/models/AnnouncementCommentReaction.ts index ac1af930..cc87bd46 100644 --- a/packages/api/lib/generated/router/models/AnnouncementCommentReaction.ts +++ b/packages/api/lib/generated/router/models/AnnouncementCommentReaction.ts @@ -6,21 +6,21 @@ import type { Emote } from "./Emote"; export type AnnouncementCommentReaction = { - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who added the reaction - */ - createdBy: string; - emote: Emote; - /** - * The ID of the announcement - */ - announcementId: string; - /** - * The ID of the announcement comment - */ - announcementCommentId: number; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who added the reaction + */ + createdBy: string; + emote: Emote; + /** + * The ID of the announcement + */ + announcementId: string; + /** + * The ID of the announcement comment + */ + announcementCommentId: number; }; diff --git a/packages/api/lib/generated/router/models/AnnouncementReaction.ts b/packages/api/lib/generated/router/models/AnnouncementReaction.ts index e3f35bed..0eb5e752 100644 --- a/packages/api/lib/generated/router/models/AnnouncementReaction.ts +++ b/packages/api/lib/generated/router/models/AnnouncementReaction.ts @@ -6,17 +6,17 @@ import type { Emote } from "./Emote"; export type AnnouncementReaction = { - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who added the reaction - */ - createdBy: string; - emote: Emote; - /** - * The ID of the announcement - */ - announcementId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who added the reaction + */ + createdBy: string; + emote: Emote; + /** + * The ID of the announcement + */ + announcementId: string; }; diff --git a/packages/api/lib/generated/router/models/CalendarEvent.ts b/packages/api/lib/generated/router/models/CalendarEvent.ts index 91daa186..6097e7b3 100644 --- a/packages/api/lib/generated/router/models/CalendarEvent.ts +++ b/packages/api/lib/generated/router/models/CalendarEvent.ts @@ -6,92 +6,92 @@ import type { Mentions } from "./Mentions"; export type CalendarEvent = { - /** - * The ID of the calendar event - */ - id: number; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The name of the event - */ - name: string; - /** - * The description of the event - */ - description?: string; - /** - * The location of the event - */ - location?: string; - /** - * A URL to associate with the event - */ - url?: string; - /** - * The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar - */ - color?: number; - /** - * Is this event a repeating event - */ - repeats?: boolean; - /** - * The ID of the calendar event series. Only shows if the event is repeating - */ - seriesId?: string; - /** - * The role IDs to restrict the event to - */ - roleIds?: Array; - /** - * When disabled, users will not be able to RSVP to the event - */ - rsvpDisabled?: boolean; - /** - * Does the event last all day - */ - isAllDay?: boolean; - /** - * The number of RSVPs to allow before waitlisting RSVPs - */ - rsvpLimit?: number; - /** - * When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event - */ - autofillWaitlist?: boolean; - /** - * The ISO 8601 timestamp that the event starts at - */ - startsAt: string; - /** - * The duration of the event _**in minutes**_ - */ - duration?: number; - isPrivate?: boolean; - mentions?: Mentions; - /** - * The ISO 8601 timestamp that the event was created at - */ - createdAt: string; - /** - * The ID of the user who created this event - */ - createdBy: string; - cancellation?: { - /** - * The description of event cancellation - */ - description?: string; - /** - * The ID of the user who created this event cancellation - */ - createdBy: string; - }; + /** + * The ID of the calendar event + */ + id: number; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The name of the event + */ + name: string; + /** + * The description of the event + */ + description?: string; + /** + * The location of the event + */ + location?: string; + /** + * A URL to associate with the event + */ + url?: string; + /** + * The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar + */ + color?: number; + /** + * Is this event a repeating event + */ + repeats?: boolean; + /** + * The ID of the calendar event series. Only shows if the event is repeating + */ + seriesId?: string; + /** + * The role IDs to restrict the event to + */ + roleIds?: Array; + /** + * When disabled, users will not be able to RSVP to the event + */ + rsvpDisabled?: boolean; + /** + * Does the event last all day + */ + isAllDay?: boolean; + /** + * The number of RSVPs to allow before waitlisting RSVPs + */ + rsvpLimit?: number; + /** + * When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event + */ + autofillWaitlist?: boolean; + /** + * The ISO 8601 timestamp that the event starts at + */ + startsAt: string; + /** + * The duration of the event _**in minutes**_ + */ + duration?: number; + isPrivate?: boolean; + mentions?: Mentions; + /** + * The ISO 8601 timestamp that the event was created at + */ + createdAt: string; + /** + * The ID of the user who created this event + */ + createdBy: string; + cancellation?: { + /** + * The description of event cancellation + */ + description?: string; + /** + * The ID of the user who created this event cancellation + */ + createdBy: string; + }; }; diff --git a/packages/api/lib/generated/router/models/CalendarEventComment.ts b/packages/api/lib/generated/router/models/CalendarEventComment.ts index 54ebce72..588ebdf6 100644 --- a/packages/api/lib/generated/router/models/CalendarEventComment.ts +++ b/packages/api/lib/generated/router/models/CalendarEventComment.ts @@ -6,33 +6,33 @@ import type { Mentions } from "./Mentions"; export type CalendarEventComment = { - /** - * The ID of the calendar event comment - */ - id: number; - /** - * The content of the calendar event comment - */ - content: string; - /** - * The ISO 8601 timestamp that the calendar event comment was created at - */ - createdAt: string; - /** - * The ISO 8601 timestamp that the calendar event comment was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the calendar event - */ - calendarEventId: number; - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who created this calendar event comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - mentions?: Mentions; + /** + * The ID of the calendar event comment + */ + id: number; + /** + * The content of the calendar event comment + */ + content: string; + /** + * The ISO 8601 timestamp that the calendar event comment was created at + */ + createdAt: string; + /** + * The ISO 8601 timestamp that the calendar event comment was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the calendar event + */ + calendarEventId: number; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who created this calendar event comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + mentions?: Mentions; }; diff --git a/packages/api/lib/generated/router/models/CalendarEventCommentReaction.ts b/packages/api/lib/generated/router/models/CalendarEventCommentReaction.ts index 4214f605..6f04f1a5 100644 --- a/packages/api/lib/generated/router/models/CalendarEventCommentReaction.ts +++ b/packages/api/lib/generated/router/models/CalendarEventCommentReaction.ts @@ -6,21 +6,21 @@ import type { Emote } from "./Emote"; export type CalendarEventCommentReaction = { - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who added the reaction - */ - createdBy: string; - emote: Emote; - /** - * The ID of the calendar event - */ - calendarEventId: number; - /** - * The ID of the calendar event comment - */ - calendarEventCommentId: number; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who added the reaction + */ + createdBy: string; + emote: Emote; + /** + * The ID of the calendar event + */ + calendarEventId: number; + /** + * The ID of the calendar event comment + */ + calendarEventCommentId: number; }; diff --git a/packages/api/lib/generated/router/models/CalendarEventReaction.ts b/packages/api/lib/generated/router/models/CalendarEventReaction.ts index ea80c95b..55a241f0 100644 --- a/packages/api/lib/generated/router/models/CalendarEventReaction.ts +++ b/packages/api/lib/generated/router/models/CalendarEventReaction.ts @@ -6,17 +6,17 @@ import type { Emote } from "./Emote"; export type CalendarEventReaction = { - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who added the reaction - */ - createdBy: string; - emote: Emote; - /** - * The ID of the calendar event - */ - calendarEventId: number; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who added the reaction + */ + createdBy: string; + emote: Emote; + /** + * The ID of the calendar event + */ + calendarEventId: number; }; diff --git a/packages/api/lib/generated/router/models/CalendarEventRsvp.ts b/packages/api/lib/generated/router/models/CalendarEventRsvp.ts index d799fcd1..4790654f 100644 --- a/packages/api/lib/generated/router/models/CalendarEventRsvp.ts +++ b/packages/api/lib/generated/router/models/CalendarEventRsvp.ts @@ -4,40 +4,46 @@ /* eslint-disable */ export type CalendarEventRsvp = { - /** - * The ID of the calendar event - */ - calendarEventId: number; - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the user - */ - userId: string; - /** - * The status of the RSVP - */ - status: "going" | "maybe" | "declined" | "invited" | "waitlisted" | "not responded"; - /** - * The ID of the user who created this RSVP - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the RSVP was created at - */ - createdAt: string; - /** - * The ID of the user who updated this RSVP - */ - updatedBy?: string; - /** - * The ISO 8601 timestamp that the RSVP was updated at, if relevant - */ - updatedAt?: string; + /** + * The ID of the calendar event + */ + calendarEventId: number; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the user + */ + userId: string; + /** + * The status of the RSVP + */ + status: + | "going" + | "maybe" + | "declined" + | "invited" + | "waitlisted" + | "not responded"; + /** + * The ID of the user who created this RSVP + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the RSVP was created at + */ + createdAt: string; + /** + * The ID of the user who updated this RSVP + */ + updatedBy?: string; + /** + * The ISO 8601 timestamp that the RSVP was updated at, if relevant + */ + updatedAt?: string; }; diff --git a/packages/api/lib/generated/router/models/CalendarEventSeries.ts b/packages/api/lib/generated/router/models/CalendarEventSeries.ts index 7440a3b8..88ff6e0f 100644 --- a/packages/api/lib/generated/router/models/CalendarEventSeries.ts +++ b/packages/api/lib/generated/router/models/CalendarEventSeries.ts @@ -4,16 +4,16 @@ /* eslint-disable */ export type CalendarEventSeries = { - /** - * The ID of the calendar event series - */ - id: string; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the channel - */ - channelId: string; + /** + * The ID of the calendar event series + */ + id: string; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the channel + */ + channelId: string; }; diff --git a/packages/api/lib/generated/router/models/Category.ts b/packages/api/lib/generated/router/models/Category.ts index aaf1e1d1..83b66ef5 100644 --- a/packages/api/lib/generated/router/models/Category.ts +++ b/packages/api/lib/generated/router/models/Category.ts @@ -4,28 +4,28 @@ /* eslint-disable */ export type Category = { - /** - * The ID of the category - */ - id: number; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the group - */ - groupId: string; - /** - * The ISO 8601 timestamp that the category was created at - */ - createdAt: string; - /** - * The ISO 8601 timestamp that the category was updated at, if relevant - */ - updatedAt?: string; - /** - * Name of the category - */ - name: string; + /** + * The ID of the category + */ + id: number; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the group + */ + groupId: string; + /** + * The ISO 8601 timestamp that the category was created at + */ + createdAt: string; + /** + * The ISO 8601 timestamp that the category was updated at, if relevant + */ + updatedAt?: string; + /** + * Name of the category + */ + name: string; }; diff --git a/packages/api/lib/generated/router/models/ChatEmbed.ts b/packages/api/lib/generated/router/models/ChatEmbed.ts index 4dbc82c6..cb6dc61f 100644 --- a/packages/api/lib/generated/router/models/ChatEmbed.ts +++ b/packages/api/lib/generated/router/models/ChatEmbed.ts @@ -7,89 +7,89 @@ * 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. */ export type ChatEmbed = { - /** - * Main header of the embed - */ - title?: string; - /** - * Subtext of the embed - */ - description?: string; - /** - * URL to linkify the `title` field with - */ - url?: string; - /** - * The integer value corresponds to the decimal RGB representation for the color. The color that the left border should be - */ - color?: number; - /** - * A small section at the bottom of the embed - */ - footer?: { - /** - * URL of a small image to put in the footer - */ - icon_url?: string; - /** - * Text of the footer - */ - text: string; - }; - /** - * A timestamp to put in the footer - */ - timestamp?: string; - /** - * An image to the right of the embed's content - */ - thumbnail?: { - /** - * URL of the image - */ - url?: string; - }; - /** - * The main picture to associate with the embed - */ - image?: { - /** - * URL of the image - */ - url?: string; - }; - /** - * A small section above the title of the embed - */ - author?: { - /** - * Name of the author - */ - name?: string; - /** - * URL to linkify the author's `name` field - */ - url?: string; - /** - * URL of a small image to display to the left of the author's `name` - */ - icon_url?: string; - }; - /** - * Table-like cells to add to the embed - */ - fields?: Array<{ - /** - * Header of the table-like cell - */ - name: string; - /** - * Subtext of the table-like cell - */ - value: string; - /** - * If the field should wrap or not - */ - inline?: boolean; - }>; + /** + * Main header of the embed + */ + title?: string; + /** + * Subtext of the embed + */ + description?: string; + /** + * URL to linkify the `title` field with + */ + url?: string; + /** + * The integer value corresponds to the decimal RGB representation for the color. The color that the left border should be + */ + color?: number; + /** + * A small section at the bottom of the embed + */ + footer?: { + /** + * URL of a small image to put in the footer + */ + icon_url?: string; + /** + * Text of the footer + */ + text: string; + }; + /** + * A timestamp to put in the footer + */ + timestamp?: string; + /** + * An image to the right of the embed's content + */ + thumbnail?: { + /** + * URL of the image + */ + url?: string; + }; + /** + * The main picture to associate with the embed + */ + image?: { + /** + * URL of the image + */ + url?: string; + }; + /** + * A small section above the title of the embed + */ + author?: { + /** + * Name of the author + */ + name?: string; + /** + * URL to linkify the author's `name` field + */ + url?: string; + /** + * URL of a small image to display to the left of the author's `name` + */ + icon_url?: string; + }; + /** + * Table-like cells to add to the embed + */ + fields?: Array<{ + /** + * Header of the table-like cell + */ + name: string; + /** + * Subtext of the table-like cell + */ + value: string; + /** + * If the field should wrap or not + */ + inline?: boolean; + }>; }; diff --git a/packages/api/lib/generated/router/models/ChatMessage.ts b/packages/api/lib/generated/router/models/ChatMessage.ts index 0b3d9a97..06effdd7 100644 --- a/packages/api/lib/generated/router/models/ChatMessage.ts +++ b/packages/api/lib/generated/router/models/ChatMessage.ts @@ -7,59 +7,61 @@ import type { ChatEmbed } from "./ChatEmbed"; import type { Mentions } from "./Mentions"; export type ChatMessage = { - /** - * The ID of the message - */ - id: string; - /** - * The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. - */ - type: "default" | "system"; - /** - * The ID of the server - */ - serverId?: string; - /** - * The ID of the group - */ - groupId?: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The content of the message - */ - content?: string; - embeds?: Array; - /** - * Message IDs that were replied to - */ - replyMessageIds?: Array; - /** - * If set, this message will only be seen by those mentioned or replied to - */ - isPrivate?: boolean; - /** - * If set, this message did not notify mention or reply recipients - */ - isSilent?: boolean; - isPinned?: boolean; - mentions?: Mentions; - /** - * The ISO 8601 timestamp that the message was created at - */ - createdAt: string; - /** - * The ID of the user who created this message (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * The ID of the webhook who created this message, if it was created by a webhook - */ - createdByWebhookId?: string; - /** - * The ISO 8601 timestamp that the message was updated at, if relevant - */ - updatedAt?: string; + /** + * The ID of the message + */ + id: string; + /** + * The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. + */ + type: + | "default" + | "system"; + /** + * The ID of the server + */ + serverId?: string; + /** + * The ID of the group + */ + groupId?: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The content of the message + */ + content?: string; + embeds?: Array; + /** + * Message IDs that were replied to + */ + replyMessageIds?: Array; + /** + * If set, this message will only be seen by those mentioned or replied to + */ + isPrivate?: boolean; + /** + * If set, this message did not notify mention or reply recipients + */ + isSilent?: boolean; + isPinned?: boolean; + mentions?: Mentions; + /** + * The ISO 8601 timestamp that the message was created at + */ + createdAt: string; + /** + * The ID of the user who created this message (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * The ID of the webhook who created this message, if it was created by a webhook + */ + createdByWebhookId?: string; + /** + * The ISO 8601 timestamp that the message was updated at, if relevant + */ + updatedAt?: string; }; diff --git a/packages/api/lib/generated/router/models/ChatMessageReaction.ts b/packages/api/lib/generated/router/models/ChatMessageReaction.ts index 3b2db99b..5a82d582 100644 --- a/packages/api/lib/generated/router/models/ChatMessageReaction.ts +++ b/packages/api/lib/generated/router/models/ChatMessageReaction.ts @@ -6,17 +6,17 @@ import type { Emote } from "./Emote"; export type ChatMessageReaction = { - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who added the reaction - */ - createdBy: string; - emote: Emote; - /** - * The ID of the message - */ - messageId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who added the reaction + */ + createdBy: string; + emote: Emote; + /** + * The ID of the message + */ + messageId: string; }; diff --git a/packages/api/lib/generated/router/models/Doc.ts b/packages/api/lib/generated/router/models/Doc.ts index 6c21b2ac..e72719dd 100644 --- a/packages/api/lib/generated/router/models/Doc.ts +++ b/packages/api/lib/generated/router/models/Doc.ts @@ -6,41 +6,41 @@ import type { Mentions } from "./Mentions"; export type Doc = { - /** - * The ID of the doc - */ - id: number; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The title of the doc - */ - title: string; - /** - * The content of the doc - */ - content: string; - mentions?: Mentions; - /** - * The ISO 8601 timestamp that the doc was created at - */ - createdAt: string; - /** - * The ID of the user who created this doc - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the doc was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the user who updated this doc - */ - updatedBy?: string; + /** + * The ID of the doc + */ + id: number; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The title of the doc + */ + title: string; + /** + * The content of the doc + */ + content: string; + mentions?: Mentions; + /** + * The ISO 8601 timestamp that the doc was created at + */ + createdAt: string; + /** + * The ID of the user who created this doc + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the doc was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the user who updated this doc + */ + updatedBy?: string; }; diff --git a/packages/api/lib/generated/router/models/DocComment.ts b/packages/api/lib/generated/router/models/DocComment.ts index 9991ef20..9b0eaa24 100644 --- a/packages/api/lib/generated/router/models/DocComment.ts +++ b/packages/api/lib/generated/router/models/DocComment.ts @@ -6,33 +6,33 @@ import type { Mentions } from "./Mentions"; export type DocComment = { - /** - * The ID of the doc comment - */ - id: number; - /** - * The content of the doc comment - */ - content: string; - /** - * The ISO 8601 timestamp that the doc comment was created at - */ - createdAt: string; - /** - * The ID of the user who created this doc comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the doc comment was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the doc - */ - docId: number; - mentions?: Mentions; + /** + * The ID of the doc comment + */ + id: number; + /** + * The content of the doc comment + */ + content: string; + /** + * The ISO 8601 timestamp that the doc comment was created at + */ + createdAt: string; + /** + * The ID of the user who created this doc comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the doc comment was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the doc + */ + docId: number; + mentions?: Mentions; }; diff --git a/packages/api/lib/generated/router/models/DocCommentReaction.ts b/packages/api/lib/generated/router/models/DocCommentReaction.ts index 7a4b6ab5..19cfa7e8 100644 --- a/packages/api/lib/generated/router/models/DocCommentReaction.ts +++ b/packages/api/lib/generated/router/models/DocCommentReaction.ts @@ -6,21 +6,21 @@ import type { Emote } from "./Emote"; export type DocCommentReaction = { - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who added the reaction - */ - createdBy: string; - emote: Emote; - /** - * The ID of the doc - */ - docId: number; - /** - * The ID of the doc comment - */ - docCommentId: number; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who added the reaction + */ + createdBy: string; + emote: Emote; + /** + * The ID of the doc + */ + docId: number; + /** + * The ID of the doc comment + */ + docCommentId: number; }; diff --git a/packages/api/lib/generated/router/models/DocReaction.ts b/packages/api/lib/generated/router/models/DocReaction.ts index b9d2ec96..ba20fcf3 100644 --- a/packages/api/lib/generated/router/models/DocReaction.ts +++ b/packages/api/lib/generated/router/models/DocReaction.ts @@ -6,17 +6,17 @@ import type { Emote } from "./Emote"; export type DocReaction = { - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who added the reaction - */ - createdBy: string; - emote: Emote; - /** - * The ID of the doc - */ - docId: number; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who added the reaction + */ + createdBy: string; + emote: Emote; + /** + * The ID of the doc + */ + docId: number; }; diff --git a/packages/api/lib/generated/router/models/Emote.ts b/packages/api/lib/generated/router/models/Emote.ts index c008394b..9fbdf056 100644 --- a/packages/api/lib/generated/router/models/Emote.ts +++ b/packages/api/lib/generated/router/models/Emote.ts @@ -4,20 +4,20 @@ /* eslint-disable */ export type Emote = { - /** - * The ID of the emote - */ - id: number; - /** - * The name of the emote - */ - name: string; - /** - * The URL of the emote image - */ - url: string; - /** - * The ID of the server the emote was created on - */ - serverId?: string; + /** + * The ID of the emote + */ + id: number; + /** + * The name of the emote + */ + name: string; + /** + * The URL of the emote image + */ + url: string; + /** + * The ID of the server the emote was created on + */ + serverId?: string; }; diff --git a/packages/api/lib/generated/router/models/ForumTopic.ts b/packages/api/lib/generated/router/models/ForumTopic.ts index 246b7a2d..ef009af7 100644 --- a/packages/api/lib/generated/router/models/ForumTopic.ts +++ b/packages/api/lib/generated/router/models/ForumTopic.ts @@ -6,43 +6,43 @@ import type { Mentions } from "./Mentions"; export type ForumTopic = { - /** - * The ID of the forum topic - */ - id: number; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The title of the forum topic - */ - title: string; - /** - * The ISO 8601 timestamp that the forum topic was created at - */ - createdAt: string; - /** - * The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the forum topic was updated at, if relevant - */ - updatedAt?: string; - /** - * The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. - */ - bumpedAt?: string; - isPinned?: boolean; - isLocked?: boolean; - /** - * The content of the forum topic - */ - content: string; - mentions?: Mentions; + /** + * The ID of the forum topic + */ + id: number; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The title of the forum topic + */ + title: string; + /** + * The ISO 8601 timestamp that the forum topic was created at + */ + createdAt: string; + /** + * The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the forum topic was updated at, if relevant + */ + updatedAt?: string; + /** + * The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. + */ + bumpedAt?: string; + isPinned?: boolean; + isLocked?: boolean; + /** + * The content of the forum topic + */ + content: string; + mentions?: Mentions; }; diff --git a/packages/api/lib/generated/router/models/ForumTopicComment.ts b/packages/api/lib/generated/router/models/ForumTopicComment.ts index ec96fc9c..a05d3def 100644 --- a/packages/api/lib/generated/router/models/ForumTopicComment.ts +++ b/packages/api/lib/generated/router/models/ForumTopicComment.ts @@ -6,33 +6,33 @@ import type { Mentions } from "./Mentions"; export type ForumTopicComment = { - /** - * The ID of the forum topic comment - */ - id: number; - /** - * The content of the forum topic comment - */ - content: string; - /** - * The ISO 8601 timestamp that the forum topic comment was created at - */ - createdAt: string; - /** - * The ISO 8601 timestamp that the forum topic comment was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the forum topic - */ - forumTopicId: number; - /** - * The ID of the user who created this forum topic comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - mentions?: Mentions; + /** + * The ID of the forum topic comment + */ + id: number; + /** + * The content of the forum topic comment + */ + content: string; + /** + * The ISO 8601 timestamp that the forum topic comment was created at + */ + createdAt: string; + /** + * The ISO 8601 timestamp that the forum topic comment was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the forum topic + */ + forumTopicId: number; + /** + * The ID of the user who created this forum topic comment (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + mentions?: Mentions; }; diff --git a/packages/api/lib/generated/router/models/ForumTopicCommentReaction.ts b/packages/api/lib/generated/router/models/ForumTopicCommentReaction.ts index de7d0e6d..6c8db78e 100644 --- a/packages/api/lib/generated/router/models/ForumTopicCommentReaction.ts +++ b/packages/api/lib/generated/router/models/ForumTopicCommentReaction.ts @@ -6,21 +6,21 @@ import type { Emote } from "./Emote"; export type ForumTopicCommentReaction = { - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who added the reaction - */ - createdBy: string; - emote: Emote; - /** - * The ID of the forum topic - */ - forumTopicId: number; - /** - * The ID of the forum topic comment - */ - forumTopicCommentId: number; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who added the reaction + */ + createdBy: string; + emote: Emote; + /** + * The ID of the forum topic + */ + forumTopicId: number; + /** + * The ID of the forum topic comment + */ + forumTopicCommentId: number; }; diff --git a/packages/api/lib/generated/router/models/ForumTopicReaction.ts b/packages/api/lib/generated/router/models/ForumTopicReaction.ts index 08b55224..572a1744 100644 --- a/packages/api/lib/generated/router/models/ForumTopicReaction.ts +++ b/packages/api/lib/generated/router/models/ForumTopicReaction.ts @@ -6,17 +6,17 @@ import type { Emote } from "./Emote"; export type ForumTopicReaction = { - /** - * The ID of the channel - */ - channelId: string; - /** - * The ID of the user who added the reaction - */ - createdBy: string; - emote: Emote; - /** - * The ID of the forum topic - */ - forumTopicId: number; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ID of the user who added the reaction + */ + createdBy: string; + emote: Emote; + /** + * The ID of the forum topic + */ + forumTopicId: number; }; diff --git a/packages/api/lib/generated/router/models/ForumTopicSummary.ts b/packages/api/lib/generated/router/models/ForumTopicSummary.ts index 58a30309..9059069a 100644 --- a/packages/api/lib/generated/router/models/ForumTopicSummary.ts +++ b/packages/api/lib/generated/router/models/ForumTopicSummary.ts @@ -4,38 +4,38 @@ /* eslint-disable */ export type ForumTopicSummary = { - /** - * The ID of the forum topic - */ - id: number; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The title of the forum topic - */ - title: string; - /** - * The ISO 8601 timestamp that the forum topic was created at - */ - createdAt: string; - /** - * The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the forum topic was updated at, if relevant - */ - updatedAt?: string; - /** - * The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. - */ - bumpedAt?: string; - isPinned?: boolean; - isLocked?: boolean; + /** + * The ID of the forum topic + */ + id: number; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The title of the forum topic + */ + title: string; + /** + * The ISO 8601 timestamp that the forum topic was created at + */ + createdAt: string; + /** + * The ID of the user who created this forum topic (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the forum topic was updated at, if relevant + */ + updatedAt?: string; + /** + * The ISO 8601 timestamp that the forum topic was bumped at. This timestamp is updated whenever there is any activity on the posts within the forum topic. + */ + bumpedAt?: string; + isPinned?: boolean; + isLocked?: boolean; }; diff --git a/packages/api/lib/generated/router/models/Group.ts b/packages/api/lib/generated/router/models/Group.ts index 1254e3eb..bb5a9c17 100644 --- a/packages/api/lib/generated/router/models/Group.ts +++ b/packages/api/lib/generated/router/models/Group.ts @@ -4,60 +4,60 @@ /* eslint-disable */ export type Group = { - /** - * The ID of the group - */ - id: string; - /** - * The ID of the server - */ - serverId: string; - /** - * The name of the group - */ - name: string; - /** - * The description associated with the group - */ - description?: string; - /** - * The avatar image associated with the group - */ - avatar?: string; - /** - * If `true`, this is the server's home group - */ - isHome?: boolean; - /** - * The emote to associate with the group - */ - emoteId?: number; - /** - * Is this group open for anyone to join? - */ - isPublic?: boolean; - /** - * The ISO 8601 timestamp that the group was created at - */ - createdAt: string; - /** - * The ID of the user who created this group - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the group was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the user who updated this group - */ - updatedBy?: string; - /** - * The ISO 8601 timestamp that the group was archived at, if relevant - */ - archivedAt?: string; - /** - * The ID of the user who archived this group - */ - archivedBy?: string; + /** + * The ID of the group + */ + id: string; + /** + * The ID of the server + */ + serverId: string; + /** + * The name of the group + */ + name: string; + /** + * The description associated with the group + */ + description?: string; + /** + * The avatar image associated with the group + */ + avatar?: string; + /** + * If `true`, this is the server's home group + */ + isHome?: boolean; + /** + * The emote to associate with the group + */ + emoteId?: number; + /** + * Is this group open for anyone to join? + */ + isPublic?: boolean; + /** + * The ISO 8601 timestamp that the group was created at + */ + createdAt: string; + /** + * The ID of the user who created this group + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the group was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the user who updated this group + */ + updatedBy?: string; + /** + * The ISO 8601 timestamp that the group was archived at, if relevant + */ + archivedAt?: string; + /** + * The ID of the user who archived this group + */ + archivedBy?: string; }; diff --git a/packages/api/lib/generated/router/models/ListItem.ts b/packages/api/lib/generated/router/models/ListItem.ts index 7cd07d7d..226aa8a7 100644 --- a/packages/api/lib/generated/router/models/ListItem.ts +++ b/packages/api/lib/generated/router/models/ListItem.ts @@ -6,76 +6,76 @@ import type { Mentions } from "./Mentions"; export type ListItem = { - /** - * The ID of the list item - */ - id: string; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The message of the list item - */ - message: string; - mentions?: Mentions; - /** - * The ISO 8601 timestamp that the list item was created at - */ - createdAt: string; - /** - * The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * The ID of the webhook who created this list item, if it was created by a webhook - */ - createdByWebhookId?: string; - /** - * The ISO 8601 timestamp that the list item was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the user who updated this list item - */ - updatedBy?: string; - /** - * The ID of the parent list item if this list item is nested - */ - parentListItemId?: string; - /** - * The ISO 8601 timestamp that the list item was completed at - */ - completedAt?: string; - /** - * The ID of the user who completed this list item - */ - completedBy?: string; - note?: { - /** - * The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item - */ - createdAt: string; - /** - * The ID of the user who created this note - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the note was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the user who updated this note - */ - updatedBy?: string; - mentions?: Mentions; - /** - * The note of the list item - */ - content: string; - }; + /** + * The ID of the list item + */ + id: string; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The message of the list item + */ + message: string; + mentions?: Mentions; + /** + * The ISO 8601 timestamp that the list item was created at + */ + createdAt: string; + /** + * The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * The ID of the webhook who created this list item, if it was created by a webhook + */ + createdByWebhookId?: string; + /** + * The ISO 8601 timestamp that the list item was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the user who updated this list item + */ + updatedBy?: string; + /** + * The ID of the parent list item if this list item is nested + */ + parentListItemId?: string; + /** + * The ISO 8601 timestamp that the list item was completed at + */ + completedAt?: string; + /** + * The ID of the user who completed this list item + */ + completedBy?: string; + note?: { + /** + * The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item + */ + createdAt: string; + /** + * The ID of the user who created this note + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the note was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the user who updated this note + */ + updatedBy?: string; + mentions?: Mentions; + /** + * The note of the list item + */ + content: string; + }; }; diff --git a/packages/api/lib/generated/router/models/ListItemSummary.ts b/packages/api/lib/generated/router/models/ListItemSummary.ts index 15867755..14a36d38 100644 --- a/packages/api/lib/generated/router/models/ListItemSummary.ts +++ b/packages/api/lib/generated/router/models/ListItemSummary.ts @@ -6,71 +6,71 @@ import type { Mentions } from "./Mentions"; export type ListItemSummary = { - /** - * The ID of the list item - */ - id: string; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The message of the list item - */ - message: string; - mentions?: Mentions; - /** - * The ISO 8601 timestamp that the list item was created at - */ - createdAt: string; - /** - * The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy: string; - /** - * The ID of the webhook who created this list item, if it was created by a webhook - */ - createdByWebhookId?: string; - /** - * The ISO 8601 timestamp that the list item was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the user who updated this list item - */ - updatedBy?: string; - /** - * The ID of the parent list item if this list item is nested - */ - parentListItemId?: string; - /** - * The ISO 8601 timestamp that the list item was completed at - */ - completedAt?: string; - /** - * The ID of the user who completed this list item - */ - completedBy?: string; - note?: { - /** - * The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item - */ - createdAt: string; - /** - * The ID of the user who created this note - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the note was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the user who updated this note - */ - updatedBy?: string; - }; + /** + * The ID of the list item + */ + id: string; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The message of the list item + */ + message: string; + mentions?: Mentions; + /** + * The ISO 8601 timestamp that the list item was created at + */ + createdAt: string; + /** + * The ID of the user who created this list item (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy: string; + /** + * The ID of the webhook who created this list item, if it was created by a webhook + */ + createdByWebhookId?: string; + /** + * The ISO 8601 timestamp that the list item was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the user who updated this list item + */ + updatedBy?: string; + /** + * The ID of the parent list item if this list item is nested + */ + parentListItemId?: string; + /** + * The ISO 8601 timestamp that the list item was completed at + */ + completedAt?: string; + /** + * The ID of the user who completed this list item + */ + completedBy?: string; + note?: { + /** + * The ISO 8601 timestamp that the note was created at. If this field is populated, then there's a note associated with the list item + */ + createdAt: string; + /** + * The ID of the user who created this note + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the note was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the user who updated this note + */ + updatedBy?: string; + }; }; diff --git a/packages/api/lib/generated/router/models/Mentions.ts b/packages/api/lib/generated/router/models/Mentions.ts index 3968a3aa..957678d0 100644 --- a/packages/api/lib/generated/router/models/Mentions.ts +++ b/packages/api/lib/generated/router/models/Mentions.ts @@ -7,39 +7,39 @@ * Metadata of who or what is mentioned in content */ export type Mentions = { - /** - * Info on mentioned users - */ - users?: Array<{ - /** - * The ID of the user - */ - id: string; - }>; - /** - * Info on mentioned channels - */ - channels?: Array<{ - /** - * The ID of the channel - */ - id: string; - }>; - /** - * Info on mentioned roles - */ - roles?: Array<{ - /** - * The ID of the role - */ - id: number; - }>; - /** - * If @everyone was mentioned - */ - everyone?: boolean; - /** - * If @here was mentioned - */ - here?: boolean; + /** + * Info on mentioned users + */ + users?: Array<{ + /** + * The ID of the user + */ + id: string; + }>; + /** + * Info on mentioned channels + */ + channels?: Array<{ + /** + * The ID of the channel + */ + id: string; + }>; + /** + * Info on mentioned roles + */ + roles?: Array<{ + /** + * The ID of the role + */ + id: number; + }>; + /** + * If @everyone was mentioned + */ + everyone?: boolean; + /** + * If @here was mentioned + */ + here?: boolean; }; diff --git a/packages/api/lib/generated/router/models/Role.ts b/packages/api/lib/generated/router/models/Role.ts index 78bbd9f9..71f9f6cc 100644 --- a/packages/api/lib/generated/router/models/Role.ts +++ b/packages/api/lib/generated/router/models/Role.ts @@ -4,60 +4,60 @@ /* eslint-disable */ export type Role = { - /** - * The ID of the role - */ - id: number; - /** - * The ID of the server - */ - serverId: string; - /** - * The ISO 8601 timestamp that the role was created at - */ - createdAt: string; - /** - * The ISO 8601 timestamp that the role was updated at, if relevant - */ - updatedAt?: string; - /** - * The role's name - */ - name: string; - /** - * If set, the role will be displayed separately in the channel member list - */ - isDisplayedSeparately?: boolean; - /** - * If set, this roll will be self assigned - */ - isSelfAssignable?: boolean; - /** - * If set, this role can be mentioned - */ - isMentionable?: boolean; - /** - * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section - */ - 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 - */ - colors?: Array; - /** - * The URL of the role icon - */ - icon?: string; - /** - * The position the role will be in relation to the roles in the server - */ - position: 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 - */ - isBase?: boolean; - /** - * The bot user ID this role has been defined for. Roles with this populated can only be deleted by kicking the bot - */ - botUserId?: string; + /** + * The ID of the role + */ + id: number; + /** + * The ID of the server + */ + serverId: string; + /** + * The ISO 8601 timestamp that the role was created at + */ + createdAt: string; + /** + * The ISO 8601 timestamp that the role was updated at, if relevant + */ + updatedAt?: string; + /** + * The role's name + */ + name: string; + /** + * If set, the role will be displayed separately in the channel member list + */ + isDisplayedSeparately?: boolean; + /** + * If set, this roll will be self assigned + */ + isSelfAssignable?: boolean; + /** + * If set, this role can be mentioned + */ + isMentionable?: boolean; + /** + * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section + */ + 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 + */ + colors?: Array; + /** + * The URL of the role icon + */ + icon?: string; + /** + * The position the role will be in relation to the roles in the server + */ + position: 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 + */ + isBase?: boolean; + /** + * The bot user ID this role has been defined for. Roles with this populated can only be deleted by kicking the bot + */ + botUserId?: string; }; diff --git a/packages/api/lib/generated/router/models/Server.ts b/packages/api/lib/generated/router/models/Server.ts index 17853fd4..15fe96a5 100644 --- a/packages/api/lib/generated/router/models/Server.ts +++ b/packages/api/lib/generated/router/models/Server.ts @@ -4,52 +4,60 @@ /* eslint-disable */ export type Server = { - /** - * The ID of the server - */ - id: string; - /** - * The ID of the user who created this server - */ - ownerId: string; - /** - * The type of server designated from the server's settings page - */ - type?: "team" | "organization" | "community" | "clan" | "guild" | "friends" | "streaming" | "other"; - /** - * The name given to the server - */ - name: string; - /** - * The URL that the server can be accessible from. For example, a value of "Guilded-Official" means the server can be accessible from https://www.guilded.gg/Guilded-Official - */ - url?: string; - /** - * The description associated with the server - */ - about?: string; - /** - * The avatar image associated with the server - */ - avatar?: string; - /** - * The banner image associated with the server - */ - banner?: string; - /** - * The timezone associated with the server - */ - timezone?: string; - /** - * The verified status of the server - */ - isVerified?: boolean; - /** - * The channel ID of the default channel of the server. This channel is defined as the first chat or voice channel in the left sidebar of a server in our UI. This channel is useful for sending welcome messages, though note that a bot may not have permissions to interact with this channel depending on how the server is configured. - */ - defaultChannelId?: string; - /** - * The ISO 8601 timestamp that the server was created at - */ - createdAt: string; + /** + * The ID of the server + */ + id: string; + /** + * The ID of the user who created this server + */ + ownerId: string; + /** + * The type of server designated from the server's settings page + */ + type?: + | "team" + | "organization" + | "community" + | "clan" + | "guild" + | "friends" + | "streaming" + | "other"; + /** + * The name given to the server + */ + name: string; + /** + * The URL that the server can be accessible from. For example, a value of "Guilded-Official" means the server can be accessible from https://www.guilded.gg/Guilded-Official + */ + url?: string; + /** + * The description associated with the server + */ + about?: string; + /** + * The avatar image associated with the server + */ + avatar?: string; + /** + * The banner image associated with the server + */ + banner?: string; + /** + * The timezone associated with the server + */ + timezone?: string; + /** + * The verified status of the server + */ + isVerified?: boolean; + /** + * The channel ID of the default channel of the server. This channel is defined as the first chat or voice channel in the left sidebar of a server in our UI. This channel is useful for sending welcome messages, though note that a bot may not have permissions to interact with this channel depending on how the server is configured. + */ + defaultChannelId?: string; + /** + * The ISO 8601 timestamp that the server was created at + */ + createdAt: string; }; diff --git a/packages/api/lib/generated/router/models/ServerChannel.ts b/packages/api/lib/generated/router/models/ServerChannel.ts index 1751d68d..1d10e8c7 100644 --- a/packages/api/lib/generated/router/models/ServerChannel.ts +++ b/packages/api/lib/generated/router/models/ServerChannel.ts @@ -4,72 +4,85 @@ /* eslint-disable */ export type ServerChannel = { - /** - * The ID of the channel - */ - id: string; - /** - * 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"; - /** - * The name of the channel - */ - name: string; - /** - * The topic of the channel. Not applicable to threads - */ - topic?: string; - /** - * The ISO 8601 timestamp that the channel was created at - */ - createdAt: string; - /** - * The ID of the user who created this channel - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the channel was updated at, if relevant - */ - updatedAt?: string; - /** - * The ID of the server - */ - serverId: string; - /** - * ID of the **root** channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present - */ - rootId?: string; - /** - * ID of the **immediate** parent channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present - */ - parentId?: string; - /** - * The ID of the message that this channel was created off of. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present - */ - messageId?: string; - /** - * The category that the channel exists in. Only relevant for server channels - */ - categoryId?: number; - /** - * The ID of the group - */ - groupId: string; - /** - * 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; - /** - * The ID of the user who archived this channel - */ - archivedBy?: string; - /** - * The ISO 8601 timestamp that the channel was archived at, if relevant - */ - archivedAt?: string; + /** + * The ID of the channel + */ + id: string; + /** + * 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"; + /** + * The name of the channel + */ + name: string; + /** + * The topic of the channel. Not applicable to threads + */ + topic?: string; + /** + * The ISO 8601 timestamp that the channel was created at + */ + createdAt: string; + /** + * The ID of the user who created this channel + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the channel was updated at, if relevant + */ + updatedAt?: string; + /** + * The ID of the server + */ + serverId: string; + /** + * ID of the **root** channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present + */ + rootId?: string; + /** + * ID of the **immediate** parent channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present + */ + parentId?: string; + /** + * The ID of the message that this channel was created off of. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present + */ + messageId?: string; + /** + * The category that the channel exists in. Only relevant for server channels + */ + categoryId?: number; + /** + * The ID of the group + */ + groupId: string; + /** + * 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; + /** + * The ID of the user who archived this channel + */ + archivedBy?: string; + /** + * The ISO 8601 timestamp that the channel was archived at, if relevant + */ + archivedAt?: string; }; diff --git a/packages/api/lib/generated/router/models/ServerMember.ts b/packages/api/lib/generated/router/models/ServerMember.ts index a48655f4..a4d28c05 100644 --- a/packages/api/lib/generated/router/models/ServerMember.ts +++ b/packages/api/lib/generated/router/models/ServerMember.ts @@ -6,12 +6,12 @@ import type { User } from "./User"; export type ServerMember = { - user: User; - roleIds: Array; - nickname?: string; - /** - * The ISO 8601 timestamp that the member was created at - */ - joinedAt: string; - isOwner?: boolean; + user: User; + roleIds: Array; + nickname?: string; + /** + * The ISO 8601 timestamp that the member was created at + */ + joinedAt: string; + isOwner?: boolean; }; diff --git a/packages/api/lib/generated/router/models/ServerMemberBan.ts b/packages/api/lib/generated/router/models/ServerMemberBan.ts index d30d8972..38da162b 100644 --- a/packages/api/lib/generated/router/models/ServerMemberBan.ts +++ b/packages/api/lib/generated/router/models/ServerMemberBan.ts @@ -6,17 +6,17 @@ import type { UserSummary } from "./UserSummary"; export type ServerMemberBan = { - user: UserSummary; - /** - * The reason for the ban as submitted by the banner - */ - reason?: string; - /** - * The ID of the user who created this server member ban - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the server member ban was created at - */ - createdAt: string; + user: UserSummary; + /** + * The reason for the ban as submitted by the banner + */ + reason?: string; + /** + * The ID of the user who created this server member ban + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the server member ban was created at + */ + createdAt: string; }; diff --git a/packages/api/lib/generated/router/models/ServerMemberPermissions.ts b/packages/api/lib/generated/router/models/ServerMemberPermissions.ts index 8ad8072e..52be42fe 100644 --- a/packages/api/lib/generated/router/models/ServerMemberPermissions.ts +++ b/packages/api/lib/generated/router/models/ServerMemberPermissions.ts @@ -4,8 +4,8 @@ /* 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 - */ - permissions: Array; + /** + * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section + */ + permissions: Array; }; diff --git a/packages/api/lib/generated/router/models/ServerMemberSummary.ts b/packages/api/lib/generated/router/models/ServerMemberSummary.ts index 6aa086ce..b2ba99a7 100644 --- a/packages/api/lib/generated/router/models/ServerMemberSummary.ts +++ b/packages/api/lib/generated/router/models/ServerMemberSummary.ts @@ -6,6 +6,6 @@ import type { UserSummary } from "./UserSummary"; export type ServerMemberSummary = { - user: UserSummary; - roleIds: Array; + 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 39eb3293..5a8f73c5 100644 --- a/packages/api/lib/generated/router/models/ServerSubscriptionTier.ts +++ b/packages/api/lib/generated/router/models/ServerSubscriptionTier.ts @@ -4,28 +4,31 @@ /* eslint-disable */ export type ServerSubscriptionTier = { - /** - * The type of the server subscription tier. This field is case sensitive!! - */ - type: "Gold" | "Silver" | "Copper"; - /** - * The ID of the server - */ - serverId: string; - /** - * The description associated with the server subscription tier - */ - description?: string; - /** - * The ID of the role - */ - roleId?: number; - /** - * The cost of the tier in cents USD per month - */ - cost: number; - /** - * The ISO 8601 timestamp that the server subscription tier was created at - */ - createdAt: string; + /** + * The type of the server subscription tier. This field is case sensitive!! + */ + type: + | "Gold" + | "Silver" + | "Copper"; + /** + * The ID of the server + */ + serverId: string; + /** + * The description associated with the server subscription tier + */ + description?: string; + /** + * The ID of the role + */ + roleId?: number; + /** + * The cost of the tier in cents USD per month + */ + cost: number; + /** + * The ISO 8601 timestamp that the server subscription tier was created at + */ + createdAt: string; }; diff --git a/packages/api/lib/generated/router/models/SocialLink.ts b/packages/api/lib/generated/router/models/SocialLink.ts index 81dc4a1f..e0a5c0b3 100644 --- a/packages/api/lib/generated/router/models/SocialLink.ts +++ b/packages/api/lib/generated/router/models/SocialLink.ts @@ -4,24 +4,37 @@ /* 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"; - /** - * The ID of the user that the social link is associated with - */ - userId: string; - /** - * The handle of the user within the external service - */ - handle?: string; - /** - * The unique ID that represents this member's social link within the external service - */ - serviceId?: string; - /** - * The ISO 8601 timestamp that the social link was created at - */ - createdAt: string; + /** + * 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"; + /** + * The ID of the user that the social link is associated with + */ + userId: string; + /** + * The handle of the user within the external service + */ + handle?: string; + /** + * The unique ID that represents this member's social link within the external service + */ + serviceId?: string; + /** + * The ISO 8601 timestamp that the social link was created at + */ + createdAt: string; }; diff --git a/packages/api/lib/generated/router/models/User.ts b/packages/api/lib/generated/router/models/User.ts index da5e1b1a..602a0daa 100644 --- a/packages/api/lib/generated/router/models/User.ts +++ b/packages/api/lib/generated/router/models/User.ts @@ -6,29 +6,31 @@ import type { UserStatus } from "./UserStatus"; export type User = { - /** - * The ID of the user - */ - id: string; - /** - * The type of user. If this property is absent, it can assumed to be of type `user` - */ - type?: "bot" | "user"; - /** - * The user's name - */ - name: string; - /** - * The avatar image associated with the user - */ - avatar?: string; - /** - * The banner image associated with the user - */ - banner?: string; - /** - * The ISO 8601 timestamp that the user was created at - */ - createdAt: string; - status?: UserStatus; + /** + * The ID of the user + */ + id: string; + /** + * The type of user. If this property is absent, it can assumed to be of type `user` + */ + type?: + | "bot" + | "user"; + /** + * The user's name + */ + name: string; + /** + * The avatar image associated with the user + */ + avatar?: string; + /** + * The banner image associated with the user + */ + banner?: string; + /** + * The ISO 8601 timestamp that the user was created at + */ + createdAt: string; + status?: UserStatus; }; diff --git a/packages/api/lib/generated/router/models/UserStatus.ts b/packages/api/lib/generated/router/models/UserStatus.ts index 15a39f2c..262167bc 100644 --- a/packages/api/lib/generated/router/models/UserStatus.ts +++ b/packages/api/lib/generated/router/models/UserStatus.ts @@ -4,12 +4,12 @@ /* eslint-disable */ export type UserStatus = { - /** - * The content of the user status. The supported markdown for this content only includes reactions and plaintext for now - */ - content?: string; - /** - * Emote ID - */ - emoteId: number; + /** + * The content of the user status. The supported markdown for this content only includes reactions and plaintext for now + */ + content?: string; + /** + * Emote ID + */ + emoteId: number; }; diff --git a/packages/api/lib/generated/router/models/UserSummary.ts b/packages/api/lib/generated/router/models/UserSummary.ts index 064d927e..2bebb335 100644 --- a/packages/api/lib/generated/router/models/UserSummary.ts +++ b/packages/api/lib/generated/router/models/UserSummary.ts @@ -4,20 +4,22 @@ /* eslint-disable */ export type UserSummary = { - /** - * The ID of the user - */ - id: string; - /** - * The type of user. If this property is absent, it can assumed to be of type `user` - */ - type?: "bot" | "user"; - /** - * The user's name - */ - name: string; - /** - * The avatar image associated with the user - */ - avatar?: string; + /** + * The ID of the user + */ + id: string; + /** + * The type of user. If this property is absent, it can assumed to be of type `user` + */ + type?: + | "bot" + | "user"; + /** + * The user's name + */ + name: string; + /** + * The avatar image associated with the user + */ + avatar?: string; }; diff --git a/packages/api/lib/generated/router/models/Webhook.ts b/packages/api/lib/generated/router/models/Webhook.ts index 577c2bbc..0df1b144 100644 --- a/packages/api/lib/generated/router/models/Webhook.ts +++ b/packages/api/lib/generated/router/models/Webhook.ts @@ -4,40 +4,40 @@ /* eslint-disable */ export type Webhook = { - /** - * The ID of the webhook - */ - id: string; - /** - * The name of the webhook - */ - name: string; - /** - * The avatar image associated with the webhook - */ - avatar?: string; - /** - * The ID of the server - */ - serverId: string; - /** - * The ID of the channel - */ - channelId: string; - /** - * The ISO 8601 timestamp that the webhook was created at - */ - createdAt: string; - /** - * The ID of the user who created this webhook - */ - createdBy: string; - /** - * The ISO 8601 timestamp that the webhook was deleted at - */ - deletedAt?: string; - /** - * The token of the webhook - */ - token?: string; + /** + * The ID of the webhook + */ + id: string; + /** + * The name of the webhook + */ + name: string; + /** + * The avatar image associated with the webhook + */ + avatar?: string; + /** + * The ID of the server + */ + serverId: string; + /** + * The ID of the channel + */ + channelId: string; + /** + * The ISO 8601 timestamp that the webhook was created at + */ + createdAt: string; + /** + * The ID of the user who created this webhook + */ + createdBy: string; + /** + * The ISO 8601 timestamp that the webhook was deleted at + */ + deletedAt?: string; + /** + * The token of the webhook + */ + token?: string; }; diff --git a/packages/api/lib/generated/router/services/AnnouncementCommentsService.ts b/packages/api/lib/generated/router/services/AnnouncementCommentsService.ts index 5e557be4..5a421914 100644 --- a/packages/api/lib/generated/router/services/AnnouncementCommentsService.ts +++ b/packages/api/lib/generated/router/services/AnnouncementCommentsService.ts @@ -4,132 +4,166 @@ /* eslint-disable */ import type { AnnouncementComment } from "../models/AnnouncementComment"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public announcementCommentCreate({ - channelId, - announcementId, - requestBody, - }: { - channelId: string; - announcementId: string; - requestBody: { - /** - * The content of the announcement comment - */ - content: string; - }; - }): 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", - }); - } + /** + * Create a comment on an announcement + * @returns any Success + * @throws ApiError + */ + public announcementCommentCreate({ + channelId, + announcementId, + requestBody, + }: { + channelId: string; + announcementId: string; + requestBody: { + /** + * The content of the announcement comment + */ + content: string; + }; + }): 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", + }, + ); + } - /** - * Get an announcement's comments - * @returns any Success - * @throws ApiError - */ - public announcementCommentReadMany({ channelId, announcementId }: { channelId: string; announcementId: string }): CancelablePromise<{ - announcementComments: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/announcements/{announcementId}/comments", - path: { - channelId: channelId, - announcementId: announcementId, - }, - }); - } + /** + * Get an announcement's comments + * @returns any Success + * @throws ApiError + */ + public announcementCommentReadMany({ + channelId, + announcementId, + }: { + channelId: string; + announcementId: string; + }): CancelablePromise<{ + announcementComments: Array; + }> { + 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 - * @throws ApiError - */ - public announcementCommentRead({ channelId, announcementId, announcementCommentId }: { channelId: string; announcementId: string; announcementCommentId: number }): CancelablePromise<{ - announcementComment: AnnouncementComment; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/announcements/{announcementId}/comments/{announcementCommentId}", - path: { - channelId: channelId, - announcementId: announcementId, - announcementCommentId: announcementCommentId, - }, - }); - } + /** + * Get a comment on the announcement + * @returns any Success + * @throws ApiError + */ + public announcementCommentRead({ + channelId, + announcementId, + announcementCommentId, + }: { + channelId: string; + announcementId: string; + announcementCommentId: number; + }): CancelablePromise<{ + announcementComment: AnnouncementComment; + }> { + 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 - * @throws ApiError - */ - public announcementCommentUpdate({ - channelId, - announcementId, - announcementCommentId, - requestBody, - }: { - channelId: string; - announcementId: string; - announcementCommentId: number; - requestBody: { - /** - * The content of the announcement comment - */ - content: string; - }; - }): 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", - }); - } + /** + * Update an announcement comment + * @returns any Success + * @throws ApiError + */ + public announcementCommentUpdate({ + channelId, + announcementId, + announcementCommentId, + requestBody, + }: { + channelId: string; + announcementId: string; + announcementCommentId: number; + requestBody: { + /** + * The content of the announcement comment + */ + content: string; + }; + }): 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", + }, + ); + } - /** - * Delete an announcement comment - * @returns void - * @throws ApiError - */ - public announcementCommentDelete({ channelId, announcementId, announcementCommentId }: { channelId: string; 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, - }, - }); - } + /** + * Delete an announcement comment + * @returns void + * @throws ApiError + */ + public announcementCommentDelete({ + channelId, + announcementId, + announcementCommentId, + }: { + channelId: string; + 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, + }, + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/AnnouncementsService.ts b/packages/api/lib/generated/router/services/AnnouncementsService.ts index faf3c9b1..714b0ba1 100644 --- a/packages/api/lib/generated/router/services/AnnouncementsService.ts +++ b/packages/api/lib/generated/router/services/AnnouncementsService.ts @@ -4,136 +4,178 @@ /* eslint-disable */ import type { Announcement } from "../models/Announcement"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public announcementCreate({ - channelId, - requestBody, - }: { - channelId: string; - requestBody: { - /** - * The title of the announcement - */ - title: string; - /** - * The content of the announcement - */ - content: Record | string; - }; - }): CancelablePromise<{ - announcement: Announcement; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/channels/{channelId}/announcements", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create an announcement + * @returns any Success + * @throws ApiError + */ + public announcementCreate({ + channelId, + requestBody, + }: { + channelId: string; + requestBody: { + /** + * The title of the announcement + */ + title: string; + /** + * The content of the announcement + */ + content: + | Record< + string, + any + > + | string; + }; + }): CancelablePromise<{ + announcement: Announcement; + }> { + 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` - * @returns any Success - * @throws ApiError - */ - public announcementReadMany({ channelId, before, limit = 25 }: { channelId: string; before?: string; limit?: number }): CancelablePromise<{ - announcements: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/announcements", - path: { - channelId: channelId, - }, - query: { - before: before, - limit: limit, - }, - }); - } + /** + * Get announcements + * Results returned will be ordered ascending by the announcement's `createdAt`. `before` will filter based on the announcement's `createdAt` + * @returns any Success + * @throws ApiError + */ + public announcementReadMany({ + channelId, + before, + limit = 25, + }: { + channelId: string; + before?: string; + limit?: number; + }): CancelablePromise<{ + announcements: Array; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/channels/{channelId}/announcements", + path: { + channelId: channelId, + }, + query: { + before: before, + limit: limit, + }, + }, + ); + } - /** - * Read an announcement - * @returns any Success - * @throws ApiError - */ - public announcementRead({ channelId, announcementId }: { channelId: string; announcementId: string }): CancelablePromise<{ - announcement: Announcement; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/announcements/{announcementId}", - path: { - channelId: channelId, - announcementId: announcementId, - }, - }); - } + /** + * Read an announcement + * @returns any Success + * @throws ApiError + */ + public announcementRead({ + channelId, + announcementId, + }: { + channelId: string; + announcementId: string; + }): CancelablePromise<{ + announcement: Announcement; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/channels/{channelId}/announcements/{announcementId}", + path: { + channelId: channelId, + announcementId: announcementId, + }, + }, + ); + } - /** - * Update an announcement - * @returns any Success - * @throws ApiError - */ - public announcementUpdate({ - channelId, - announcementId, - requestBody, - }: { - channelId: string; - announcementId: string; - requestBody: { - /** - * The title of the announcement - */ - title?: string; - /** - * The content of the announcement - */ - 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", - }); - } + /** + * Update an announcement + * @returns any Success + * @throws ApiError + */ + public announcementUpdate({ + channelId, + announcementId, + requestBody, + }: { + channelId: string; + announcementId: string; + requestBody: { + /** + * The title of the announcement + */ + title?: string; + /** + * The content of the announcement + */ + content?: + | Record< + string, + any + > + | 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", + }, + ); + } - /** - * Delete an announcement - * @returns void - * @throws ApiError - */ - public announcementDelete({ channelId, announcementId }: { channelId: string; announcementId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/announcements/{announcementId}", - path: { - channelId: channelId, - announcementId: announcementId, - }, - }); - } + /** + * Delete an announcement + * @returns void + * @throws ApiError + */ + public announcementDelete({ + channelId, + announcementId, + }: { + channelId: string; + announcementId: string; + }): CancelablePromise { + 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 1476dbe9..19a39861 100644 --- a/packages/api/lib/generated/router/services/CalendarEventCommentsService.ts +++ b/packages/api/lib/generated/router/services/CalendarEventCommentsService.ts @@ -4,132 +4,166 @@ /* eslint-disable */ import type { CalendarEventComment } from "../models/CalendarEventComment"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @returns any Success - * @throws ApiError - */ - public calendarEventCommentCreate({ - channelId, - calendarEventId, - requestBody, - }: { - channelId: string; - calendarEventId: number; - requestBody: { - /** - * The content of the calendar event comment - */ - content: string; - }; - }): 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", - }); - } + /** + * Create a comment on an event + * @returns any Success + * @throws ApiError + */ + public calendarEventCommentCreate({ + channelId, + calendarEventId, + requestBody, + }: { + channelId: string; + calendarEventId: number; + requestBody: { + /** + * The content of the calendar event comment + */ + content: string; + }; + }): 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", + }, + ); + } - /** - * Get a calendar event's comments - * @returns any Success - * @throws ApiError - */ - public calendarEventCommentReadMany({ channelId, calendarEventId }: { channelId: string; calendarEventId: number }): CancelablePromise<{ - calendarEventComments: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/events/{calendarEventId}/comments", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, - }); - } + /** + * Get a calendar event's comments + * @returns any Success + * @throws ApiError + */ + public calendarEventCommentReadMany({ + channelId, + calendarEventId, + }: { + channelId: string; + calendarEventId: number; + }): CancelablePromise<{ + calendarEventComments: Array; + }> { + 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 - * @throws ApiError - */ - public calendarEventCommentRead({ channelId, calendarEventId, calendarEventCommentId }: { channelId: string; calendarEventId: number; calendarEventCommentId: number }): CancelablePromise<{ - calendarEventComment: CalendarEventComment; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/events/{calendarEventId}/comments/{calendarEventCommentId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - calendarEventCommentId: calendarEventCommentId, - }, - }); - } + /** + * Get a comment on the calendar event + * @returns any Success + * @throws ApiError + */ + public calendarEventCommentRead({ + channelId, + calendarEventId, + calendarEventCommentId, + }: { + channelId: string; + calendarEventId: number; + calendarEventCommentId: number; + }): CancelablePromise<{ + calendarEventComment: CalendarEventComment; + }> { + 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 - * @throws ApiError - */ - public calendarEventCommentUpdate({ - channelId, - calendarEventId, - calendarEventCommentId, - requestBody, - }: { - channelId: string; - calendarEventId: number; - calendarEventCommentId: number; - requestBody: { - /** - * The content of the calendar event comment - */ - content: string; - }; - }): 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", - }); - } + /** + * Update a calendar event comment + * @returns any Success + * @throws ApiError + */ + public calendarEventCommentUpdate({ + channelId, + calendarEventId, + calendarEventCommentId, + requestBody, + }: { + channelId: string; + calendarEventId: number; + calendarEventCommentId: number; + requestBody: { + /** + * The content of the calendar event comment + */ + content: string; + }; + }): 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", + }, + ); + } - /** - * Delete a calendar event comment - * @returns void - * @throws ApiError - */ - public calendarEventCommentDelete({ channelId, calendarEventId, calendarEventCommentId }: { channelId: string; 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, - }, - }); - } + /** + * Delete a calendar event comment + * @returns void + * @throws ApiError + */ + public calendarEventCommentDelete({ + channelId, + calendarEventId, + calendarEventCommentId, + }: { + channelId: string; + 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, + }, + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/CalendarEventSeriesService.ts b/packages/api/lib/generated/router/services/CalendarEventSeriesService.ts index ceb46165..43e7c0a9 100644 --- a/packages/api/lib/generated/router/services/CalendarEventSeriesService.ts +++ b/packages/api/lib/generated/router/services/CalendarEventSeriesService.ts @@ -1,152 +1,175 @@ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; /* generated using openapi-typescript-codegen -- do no edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class CalendarEventSeriesService { - constructor(public readonly httpRequest: BaseHttpRequest) {} + constructor( + public readonly httpRequest: BaseHttpRequest, + ) {} - /** - * Update a calendar event series - * @returns void - * @throws ApiError - */ - public calendarEventSeriesUpdate({ - channelId, - calendarEventSeriesId, - requestBody, - }: { - channelId: string; - calendarEventSeriesId: string; - requestBody: { - /** - * The name of the event - */ - name?: string; - /** - * The description of the event - */ - description?: string; - /** - * The location of the event - */ - location?: string; - /** - * The ISO 8601 timestamp that the event starts at - */ - startsAt?: string; - /** - * A URL to associate with the event - */ - url?: string; - /** - * The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar - */ - color?: number; - /** - * Does the event last all day? If passed with `duration`, `duration` will only be applied if it is an interval of minutes represented in days (e.g., `duration: 2880`) - */ - isAllDay?: boolean; - /** - * When disabled, users will not be able to RSVP to the event - */ - rsvpDisabled?: boolean; - /** - * The number of RSVPs to allow before waitlisting RSVPs - */ - rsvpLimit?: number; - /** - * When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event - */ - autofillWaitlist?: boolean; - /** - * The duration of the event _**in minutes**_ - */ - duration?: number; - isPrivate?: boolean; - /** - * The role IDs to restrict the event to. Passing an empty array will clear the role IDs on the event - */ - 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) - */ - type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom"; - /** - * Apply further clarification to your events. This **must** have `type` set to `custom` - */ - every?: { - /** - * How often between your interval the event should repeat. For example, 1 would be every interval, 2 would be every second occurrence of the interval - */ - count: number; - /** - * Coupled with `count`, this indicates the time range you are repeating your event over - */ - 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) - */ - endsAfterOccurrences?: number; - /** - * The ISO 8601 timestamp that the event ends at. Used to control the end date of the event repeat (only used when `type` is `custom`; if used with `endsAfterOccurrences`, the earliest resultant date of the two will be used) - */ - endDate?: string; - /** - * 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">; - }; - /** - * Control the updating of the series from the `calendarEventId` forward. If not defined, it will edit all events - */ - 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", - }); - } + /** + * Update a calendar event series + * @returns void + * @throws ApiError + */ + public calendarEventSeriesUpdate({ + channelId, + calendarEventSeriesId, + requestBody, + }: { + channelId: string; + calendarEventSeriesId: string; + requestBody: { + /** + * The name of the event + */ + name?: string; + /** + * The description of the event + */ + description?: string; + /** + * The location of the event + */ + location?: string; + /** + * The ISO 8601 timestamp that the event starts at + */ + startsAt?: string; + /** + * A URL to associate with the event + */ + url?: string; + /** + * The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar + */ + color?: number; + /** + * Does the event last all day? If passed with `duration`, `duration` will only be applied if it is an interval of minutes represented in days (e.g., `duration: 2880`) + */ + isAllDay?: boolean; + /** + * When disabled, users will not be able to RSVP to the event + */ + rsvpDisabled?: boolean; + /** + * The number of RSVPs to allow before waitlisting RSVPs + */ + rsvpLimit?: number; + /** + * When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event + */ + autofillWaitlist?: boolean; + /** + * The duration of the event _**in minutes**_ + */ + duration?: number; + isPrivate?: boolean; + /** + * The role IDs to restrict the event to. Passing an empty array will clear the role IDs on the event + */ + 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) + */ + type: + | "once" + | "everyDay" + | "everyWeek" + | "everyMonth" + | "custom"; + /** + * Apply further clarification to your events. This **must** have `type` set to `custom` + */ + every?: { + /** + * How often between your interval the event should repeat. For example, 1 would be every interval, 2 would be every second occurrence of the interval + */ + count: number; + /** + * Coupled with `count`, this indicates the time range you are repeating your event over + */ + 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) + */ + endsAfterOccurrences?: number; + /** + * The ISO 8601 timestamp that the event ends at. Used to control the end date of the event repeat (only used when `type` is `custom`; if used with `endsAfterOccurrences`, the earliest resultant date of the two will be used) + */ + endDate?: string; + /** + * 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" + >; + }; + /** + * Control the updating of the series from the `calendarEventId` forward. If not defined, it will edit all events + */ + 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", + }, + ); + } - /** - * Delete a calendar event series - * @returns void - * @throws ApiError - */ - public calendarEventSeriesDelete({ - channelId, - calendarEventSeriesId, - requestBody, - }: { - channelId: string; - calendarEventSeriesId: string; - requestBody?: { - /** - * Control the deletion of the series from the `calendarEventId` forward. If not defined, it will delete all events - */ - 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", - }); - } + /** + * Delete a calendar event series + * @returns void + * @throws ApiError + */ + public calendarEventSeriesDelete({ + channelId, + calendarEventSeriesId, + requestBody, + }: { + channelId: string; + calendarEventSeriesId: string; + requestBody?: { + /** + * Control the deletion of the series from the `calendarEventId` forward. If not defined, it will delete all events + */ + 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", + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/CalendarEventsService.ts b/packages/api/lib/generated/router/services/CalendarEventsService.ts index f6827431..1fb8233d 100644 --- a/packages/api/lib/generated/router/services/CalendarEventsService.ts +++ b/packages/api/lib/generated/router/services/CalendarEventsService.ts @@ -5,383 +5,483 @@ import type { CalendarEvent } from "../models/CalendarEvent"; import type { CalendarEventRsvp } from "../models/CalendarEventRsvp"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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! - * @returns any Success - * @throws ApiError - */ - public calendarEventCreate({ - channelId, - requestBody, - }: { - /** - * The calendar to create the event in - */ - channelId: string; - requestBody: { - /** - * The name of the event - */ - name: string; - /** - * The description of the event - */ - description?: string; - /** - * The location of the event - */ - location?: string; - /** - * The ISO 8601 timestamp that the event starts at - */ - startsAt?: string; - /** - * A URL to associate with the event - */ - url?: string; - /** - * The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar - */ - color?: number; - /** - * Does the event last all day? If passed with `duration`, `duration` will only be applied if it is an interval of minutes represented in days (e.g., `duration: 2880`) - */ - isAllDay?: boolean; - /** - * When disabled, users will not be able to RSVP to the event - */ - rsvpDisabled?: boolean; - /** - * The number of RSVPs to allow before waitlisting RSVPs - */ - rsvpLimit?: number; - /** - * When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event - */ - autofillWaitlist?: boolean; - /** - * The duration of the event _**in minutes**_ - */ - duration?: number; - isPrivate?: boolean; - /** - * The role IDs to restrict the event to - */ - 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) - */ - type: "once" | "everyDay" | "everyWeek" | "everyMonth" | "custom"; - /** - * Apply further clarification to your events. This **must** have `type` set to `custom` - */ - every?: { - /** - * How often between your interval the event should repeat. For example, 1 would be every interval, 2 would be every second occurrence of the interval - */ - count: number; - /** - * Coupled with `count`, this indicates the time range you are repeating your event over - */ - 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) - */ - endsAfterOccurrences?: number; - /** - * The ISO 8601 timestamp that the event ends at. Used to control the end date of the event repeat (only used when `type` is `custom`; if used with `endsAfterOccurrences`, the earliest resultant date of the two will be used) - */ - endDate?: string; - /** - * 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">; - }; - }; - }): CancelablePromise<{ - calendarEvent: CalendarEvent; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/channels/{channelId}/events", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a calendar event + * We currently do not have a way to surface the `repeatInfo` after event series are updated. Stay tuned! + * @returns any Success + * @throws ApiError + */ + public calendarEventCreate({ + channelId, + requestBody, + }: { + /** + * The calendar to create the event in + */ + channelId: string; + requestBody: { + /** + * The name of the event + */ + name: string; + /** + * The description of the event + */ + description?: string; + /** + * The location of the event + */ + location?: string; + /** + * The ISO 8601 timestamp that the event starts at + */ + startsAt?: string; + /** + * A URL to associate with the event + */ + url?: string; + /** + * The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar + */ + color?: number; + /** + * Does the event last all day? If passed with `duration`, `duration` will only be applied if it is an interval of minutes represented in days (e.g., `duration: 2880`) + */ + isAllDay?: boolean; + /** + * When disabled, users will not be able to RSVP to the event + */ + rsvpDisabled?: boolean; + /** + * The number of RSVPs to allow before waitlisting RSVPs + */ + rsvpLimit?: number; + /** + * When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event + */ + autofillWaitlist?: boolean; + /** + * The duration of the event _**in minutes**_ + */ + duration?: number; + isPrivate?: boolean; + /** + * The role IDs to restrict the event to + */ + 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) + */ + type: + | "once" + | "everyDay" + | "everyWeek" + | "everyMonth" + | "custom"; + /** + * Apply further clarification to your events. This **must** have `type` set to `custom` + */ + every?: { + /** + * How often between your interval the event should repeat. For example, 1 would be every interval, 2 would be every second occurrence of the interval + */ + count: number; + /** + * Coupled with `count`, this indicates the time range you are repeating your event over + */ + 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) + */ + endsAfterOccurrences?: number; + /** + * The ISO 8601 timestamp that the event ends at. Used to control the end date of the event repeat (only used when `type` is `custom`; if used with `endsAfterOccurrences`, the earliest resultant date of the two will be used) + */ + endDate?: string; + /** + * 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" + >; + }; + }; + }): CancelablePromise<{ + calendarEvent: CalendarEvent; + }> { + 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` - * @returns any Success - * @throws ApiError - */ - public calendarEventReadMany({ channelId, before, after, limit = 25 }: { channelId: string; before?: string; after?: string; limit?: number }): CancelablePromise<{ - calendarEvents: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/events", - path: { - channelId: channelId, - }, - query: { - before: before, - after: after, - limit: limit, - }, - }); - } + /** + * 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` + * @returns any Success + * @throws ApiError + */ + public calendarEventReadMany({ + channelId, + before, + after, + limit = 25, + }: { + channelId: string; + before?: string; + after?: string; + limit?: number; + }): CancelablePromise<{ + calendarEvents: Array; + }> { + 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 - * @throws ApiError - */ - public calendarEventRead({ channelId, calendarEventId }: { channelId: string; calendarEventId: number }): CancelablePromise<{ - calendarEvent: CalendarEvent; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/events/{calendarEventId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, - }); - } + /** + * Get a calendar event + * @returns any Success + * @throws ApiError + */ + public calendarEventRead({ + channelId, + calendarEventId, + }: { + channelId: string; + calendarEventId: number; + }): CancelablePromise<{ + calendarEvent: CalendarEvent; + }> { + 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! - * @returns any Success - * @throws ApiError - */ - public calendarEventUpdate({ - channelId, - calendarEventId, - requestBody, - }: { - channelId: string; - calendarEventId: number; - requestBody: { - /** - * The name of the event - */ - name?: string; - /** - * The description of the event - */ - description?: string; - /** - * The location of the event - */ - location?: string; - /** - * The ISO 8601 timestamp that the event starts at - */ - startsAt?: string; - /** - * A URL to associate with the event - */ - url?: string; - /** - * The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar - */ - color?: number; - /** - * Does the event last all day? If passed with `duration`, `duration` will only be applied if it is an interval of minutes represented in days (e.g., `duration: 2880`) - */ - isAllDay?: boolean; - /** - * When disabled, users will not be able to RSVP to the event - */ - rsvpDisabled?: boolean; - /** - * The number of RSVPs to allow before waitlisting RSVPs - */ - rsvpLimit?: number; - /** - * When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event - */ - autofillWaitlist?: boolean; - /** - * The duration of the event _**in minutes**_ - */ - duration?: number; - isPrivate?: boolean; - /** - * The role IDs to restrict the event to. Passing an empty array will clear the role IDs on the event - */ - roleIds?: Array; - cancellation?: { - /** - * The description of event cancellation - */ - description?: string; - }; - }; - }): CancelablePromise<{ - calendarEvent: CalendarEvent; - }> { - return this.httpRequest.request({ - method: "PATCH", - url: "/channels/{channelId}/events/{calendarEventId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a calendar event + * We currently do not have a way to surface the `repeatInfo` after event series are updated. Stay tuned! + * @returns any Success + * @throws ApiError + */ + public calendarEventUpdate({ + channelId, + calendarEventId, + requestBody, + }: { + channelId: string; + calendarEventId: number; + requestBody: { + /** + * The name of the event + */ + name?: string; + /** + * The description of the event + */ + description?: string; + /** + * The location of the event + */ + location?: string; + /** + * The ISO 8601 timestamp that the event starts at + */ + startsAt?: string; + /** + * A URL to associate with the event + */ + url?: string; + /** + * The integer value corresponds to the decimal RGB representation for the color. The color of the event when viewing in the calendar + */ + color?: number; + /** + * Does the event last all day? If passed with `duration`, `duration` will only be applied if it is an interval of minutes represented in days (e.g., `duration: 2880`) + */ + isAllDay?: boolean; + /** + * When disabled, users will not be able to RSVP to the event + */ + rsvpDisabled?: boolean; + /** + * The number of RSVPs to allow before waitlisting RSVPs + */ + rsvpLimit?: number; + /** + * When `rsvpLimit` is set, users from the waitlist will be added as space becomes available in the event + */ + autofillWaitlist?: boolean; + /** + * The duration of the event _**in minutes**_ + */ + duration?: number; + isPrivate?: boolean; + /** + * The role IDs to restrict the event to. Passing an empty array will clear the role IDs on the event + */ + roleIds?: Array; + cancellation?: { + /** + * The description of event cancellation + */ + description?: string; + }; + }; + }): CancelablePromise<{ + calendarEvent: CalendarEvent; + }> { + 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 - * @throws ApiError - */ - public calendarEventDelete({ channelId, calendarEventId }: { channelId: string; calendarEventId: number }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/events/{calendarEventId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, - }); - } + /** + * Delete a calendar event + * @returns void + * @throws ApiError + */ + public calendarEventDelete({ + channelId, + calendarEventId, + }: { + channelId: string; + calendarEventId: number; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "DELETE", + url: "/channels/{channelId}/events/{calendarEventId}", + path: { + channelId: channelId, + calendarEventId: calendarEventId, + }, + }, + ); + } - /** - * Get a calendar event RSVP - * @returns any Success - * @throws ApiError - */ - public calendarEventRsvpRead({ channelId, calendarEventId, userId }: { channelId: string; calendarEventId: number; 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, - }, - }); - } + /** + * Get a calendar event RSVP + * @returns any Success + * @throws ApiError + */ + public calendarEventRsvpRead({ + channelId, + calendarEventId, + userId, + }: { + channelId: string; + calendarEventId: number; + 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, + }, + }, + ); + } - /** - * Create or update a calendar event RSVP - * @returns any Success - * @throws ApiError - */ - public calendarEventRsvpUpdate({ - channelId, - calendarEventId, - userId, - requestBody, - }: { - channelId: string; - calendarEventId: number; - userId: string | "@me"; - requestBody: { - /** - * The status of the RSVP - */ - 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", - }); - } + /** + * Create or update a calendar event RSVP + * @returns any Success + * @throws ApiError + */ + public calendarEventRsvpUpdate({ + channelId, + calendarEventId, + userId, + requestBody, + }: { + channelId: string; + calendarEventId: number; + userId: + | string + | "@me"; + requestBody: { + /** + * The status of the RSVP + */ + 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", + }, + ); + } - /** - * Delete a calendar event RSVP - * @returns void - * @throws ApiError - */ - public calendarEventRsvpDelete({ channelId, calendarEventId, userId }: { channelId: string; calendarEventId: number; userId: string | "@me" }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/events/{calendarEventId}/rsvps/{userId}", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - userId: userId, - }, - }); - } + /** + * Delete a calendar event RSVP + * @returns void + * @throws ApiError + */ + public calendarEventRsvpDelete({ + channelId, + calendarEventId, + userId, + }: { + channelId: string; + calendarEventId: number; + userId: + | string + | "@me"; + }): CancelablePromise { + 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 - * @throws ApiError - */ - public calendarEventRsvpReadMany({ channelId, calendarEventId }: { channelId: string; calendarEventId: number }): CancelablePromise<{ - calendarEventRsvps: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/events/{calendarEventId}/rsvps", - path: { - channelId: channelId, - calendarEventId: calendarEventId, - }, - }); - } + /** + * Get calendar event RSVPs + * @returns any Success + * @throws ApiError + */ + public calendarEventRsvpReadMany({ + channelId, + calendarEventId, + }: { + channelId: string; + calendarEventId: number; + }): CancelablePromise<{ + calendarEventRsvps: Array; + }> { + 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 - * @throws ApiError - */ - public calendarEventRsvpUpdateMany({ - channelId, - calendarEventId, - requestBody, - }: { - channelId: string; - calendarEventId: number; - requestBody: { - userIds: Array; - /** - * The status of the RSVP - */ - 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", - }); - } + /** + * Create or update a calendar event RSVP for multiple users + * @returns void + * @throws ApiError + */ + public calendarEventRsvpUpdateMany({ + channelId, + calendarEventId, + requestBody, + }: { + channelId: string; + calendarEventId: number; + requestBody: { + userIds: Array< + | string + | "@me" + >; + /** + * The status of the RSVP + */ + 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", + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/CategoriesService.ts b/packages/api/lib/generated/router/services/CategoriesService.ts index 8ded0c59..ff43283a 100644 --- a/packages/api/lib/generated/router/services/CategoriesService.ts +++ b/packages/api/lib/generated/router/services/CategoriesService.ts @@ -4,112 +4,134 @@ /* eslint-disable */ import type { Category } from "../models/Category"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public categoryCreate({ - serverId, - requestBody, - }: { - serverId: string; - requestBody: { - /** - * Name of the category - */ - name: string; - /** - * The ID of the group. If not provided, the category will be created in the "Server home" group from `serverId`. - */ - groupId?: string; - }; - }): CancelablePromise<{ - category: Category; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/servers/{serverId}/categories", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a category + * @returns any Success + * @throws ApiError + */ + public categoryCreate({ + serverId, + requestBody, + }: { + serverId: string; + requestBody: { + /** + * Name of the category + */ + name: string; + /** + * The ID of the group. If not provided, the category will be created in the "Server home" group from `serverId`. + */ + groupId?: string; + }; + }): CancelablePromise<{ + category: Category; + }> { + return this.httpRequest.request( + { + method: "POST", + url: "/servers/{serverId}/categories", + path: { + serverId: serverId, + }, + body: requestBody, + mediaType: "application/json", + }, + ); + } - /** - * Read a category - * @returns any Success - * @throws ApiError - */ - public categoryRead({ serverId, categoryId }: { serverId: string; categoryId: number }): CancelablePromise<{ - category: Category; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/categories/{categoryId}", - path: { - serverId: serverId, - categoryId: categoryId, - }, - }); - } + /** + * Read a category + * @returns any Success + * @throws ApiError + */ + public categoryRead({ + serverId, + categoryId, + }: { + serverId: string; + categoryId: number; + }): CancelablePromise<{ + category: Category; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/servers/{serverId}/categories/{categoryId}", + path: { + serverId: serverId, + categoryId: categoryId, + }, + }, + ); + } - /** - * Update a category - * @returns any Success - * @throws ApiError - */ - public categoryUpdate({ - serverId, - categoryId, - requestBody, - }: { - serverId: string; - categoryId: number; - requestBody: { - /** - * Name of the category - */ - name: string; - }; - }): CancelablePromise<{ - category: Category; - }> { - return this.httpRequest.request({ - method: "PATCH", - url: "/servers/{serverId}/categories/{categoryId}", - path: { - serverId: serverId, - categoryId: categoryId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a category + * @returns any Success + * @throws ApiError + */ + public categoryUpdate({ + serverId, + categoryId, + requestBody, + }: { + serverId: string; + categoryId: number; + requestBody: { + /** + * Name of the category + */ + name: string; + }; + }): CancelablePromise<{ + category: Category; + }> { + 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 - * @throws ApiError - */ - public categoryDelete({ serverId, categoryId }: { serverId: string; categoryId: number }): CancelablePromise<{ - category: Category; - }> { - return this.httpRequest.request({ - method: "DELETE", - url: "/servers/{serverId}/categories/{categoryId}", - path: { - serverId: serverId, - categoryId: categoryId, - }, - }); - } + /** + * Delete a category + * @returns any Success + * @throws ApiError + */ + public categoryDelete({ + serverId, + categoryId, + }: { + serverId: string; + categoryId: number; + }): CancelablePromise<{ + category: Category; + }> { + 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 7807505b..908e8551 100644 --- a/packages/api/lib/generated/router/services/ChannelsService.ts +++ b/packages/api/lib/generated/router/services/ChannelsService.ts @@ -4,178 +4,225 @@ /* eslint-disable */ import type { ServerChannel } from "../models/ServerChannel"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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!) - * @returns any Success - * @throws ApiError - */ - public channelCreate({ - requestBody, - }: { - requestBody: { - /** - * The name of the channel - */ - name: string; - /** - * 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; - /** - * 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"; - /** - * The ID of the server. Optional if providing a `groupId`, `categoryId`, `parentId` or `messageId` - */ - serverId?: string; - /** - * The ID of the group. If not provided, channel will be created in the "Server home" group from `serverId` _or_ in the group that corresponds to the `categoryId` parameter. Optional if providing a `groupId`, `categoryId`, `parentId` or `messageId` - */ - groupId?: string; - /** - * The category that the channel exists in. Only relevant for server channels. If not provided, channel will be a top-level channel. Optional if providing a `parentId` or `messageId` - */ - categoryId?: number; - /** - * ID of the **immediate** parent channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present. Optional if providing a `messageId` - */ - parentId?: string; - /** - * The ID of the message that this channel was created off of. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present - */ - messageId?: string; - }; - }): CancelablePromise<{ - channel: ServerChannel; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/channels", - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a channel + * Only server channels are supported at this time (coming soon™: DM Channels!) + * @returns any Success + * @throws ApiError + */ + public channelCreate({ + requestBody, + }: { + requestBody: { + /** + * The name of the channel + */ + name: string; + /** + * 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; + /** + * 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"; + /** + * The ID of the server. Optional if providing a `groupId`, `categoryId`, `parentId` or `messageId` + */ + serverId?: string; + /** + * The ID of the group. If not provided, channel will be created in the "Server home" group from `serverId` _or_ in the group that corresponds to the `categoryId` parameter. Optional if providing a `groupId`, `categoryId`, `parentId` or `messageId` + */ + groupId?: string; + /** + * The category that the channel exists in. Only relevant for server channels. If not provided, channel will be a top-level channel. Optional if providing a `parentId` or `messageId` + */ + categoryId?: number; + /** + * ID of the **immediate** parent channel or thread in the channel hierarchy. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present. Optional if providing a `messageId` + */ + parentId?: string; + /** + * The ID of the message that this channel was created off of. Only applicable to "chat", "voice", and "stream" channels and indicates that this channel is a thread, if present + */ + messageId?: string; + }; + }): CancelablePromise<{ + channel: ServerChannel; + }> { + 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!) - * @returns any Success - * @throws ApiError - */ - public channelRead({ channelId }: { channelId: string }): CancelablePromise<{ - channel: ServerChannel; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}", - path: { - channelId: channelId, - }, - }); - } + /** + * 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!) + * @returns any Success + * @throws ApiError + */ + public channelRead({ + channelId, + }: { + channelId: string; + }): CancelablePromise<{ + channel: ServerChannel; + }> { + 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!) - * @returns any Success - * @throws ApiError - */ - public channelUpdate({ - channelId, - requestBody, - }: { - channelId: string; - requestBody: { - /** - * The name of the channel or thread - */ - name?: string; - /** - * The topic of the channel. Not applicable to threads - */ - 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 - */ - 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. At this time, you cannot update the visibility on a channel to `private`; this must be set at creation - */ - visibility?: "public" | null; - }; - }): CancelablePromise<{ - channel: ServerChannel; - }> { - return this.httpRequest.request({ - method: "PATCH", - url: "/channels/{channelId}", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a channel + * Only server channels are supported at this time (coming soon™: DM Channels!) + * @returns any Success + * @throws ApiError + */ + public channelUpdate({ + channelId, + requestBody, + }: { + channelId: string; + requestBody: { + /** + * The name of the channel or thread + */ + name?: string; + /** + * The topic of the channel. Not applicable to threads + */ + 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 + */ + 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. At this time, you cannot update the visibility on a channel to `private`; this must be set at creation + */ + visibility?: + | "public" + | null; + }; + }): CancelablePromise<{ + channel: ServerChannel; + }> { + 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!) - * @returns void - * @throws ApiError - */ - public channelDelete({ channelId }: { channelId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}", - path: { - channelId: channelId, - }, - }); - } + /** + * Delete a channel + * Only server channels are supported at this time (coming soon™: DM Channels!) + * @returns void + * @throws ApiError + */ + public channelDelete({ + channelId, + }: { + channelId: string; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "DELETE", + url: "/channels/{channelId}", + path: { + channelId: channelId, + }, + }, + ); + } - /** - * Archive a channel - * @returns void - * @throws ApiError - */ - public channelArchiveCreate({ channelId }: { channelId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/channels/{channelId}/archive", - path: { - channelId: channelId, - }, - }); - } + /** + * Archive a channel + * @returns void + * @throws ApiError + */ + public channelArchiveCreate({ + channelId, + }: { + channelId: string; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "PUT", + url: "/channels/{channelId}/archive", + path: { + channelId: channelId, + }, + }, + ); + } - /** - * Restore an archived channel - * @returns void - * @throws ApiError - */ - public channelArchiveDelete({ channelId }: { channelId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/archive", - path: { - channelId: channelId, - }, - }); - } + /** + * Restore an archived channel + * @returns void + * @throws ApiError + */ + public channelArchiveDelete({ + channelId, + }: { + channelId: string; + }): CancelablePromise { + 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 8e15d3db..9c69966f 100644 --- a/packages/api/lib/generated/router/services/ChatService.ts +++ b/packages/api/lib/generated/router/services/ChatService.ts @@ -6,275 +6,316 @@ import type { ChatEmbed } from "../models/ChatEmbed"; import type { ChatMessage } from "../models/ChatMessage"; import type { Mentions } from "../models/Mentions"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public channelMessageCreate({ - channelId, - requestBody, - }: { - /** - * Channel ID to create the message in - */ - channelId: string; - requestBody: { - /** - * If set, this message will only be seen by those mentioned or replied to - */ - isPrivate?: boolean; - /** - * If set, this message will not notify any mentioned users or roles - */ - isSilent?: boolean; - /** - * Message IDs to reply to - */ - replyMessageIds?: Array; - /** - * The content of the message - */ - content?: string; - /** - * 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. - */ - embeds?: Array; - }; - }): CancelablePromise<{ - message: ChatMessage; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/channels/{channelId}/messages", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a channel message + * @returns any Success + * @throws ApiError + */ + public channelMessageCreate({ + channelId, + requestBody, + }: { + /** + * Channel ID to create the message in + */ + channelId: string; + requestBody: { + /** + * If set, this message will only be seen by those mentioned or replied to + */ + isPrivate?: boolean; + /** + * If set, this message will not notify any mentioned users or roles + */ + isSilent?: boolean; + /** + * Message IDs to reply to + */ + replyMessageIds?: Array; + /** + * The content of the message + */ + content?: string; + /** + * 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. + */ + embeds?: Array; + }; + }): CancelablePromise<{ + message: ChatMessage; + }> { + 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` - * @returns any Success - * @throws ApiError - */ - public channelMessageReadMany({ - channelId, - before, - after, - limit = 50, - includePrivate = false, - }: { - /** - * ID of the channel that the messages exist in - */ - channelId: string; - before?: string; - /** - * An ISO 8601 timestamp that will be used to filter out results for the current page. Order will be reversed when compared to `before` or when omitting this parameter altogether - */ - after?: string; - limit?: number; - /** - * Whether to include private messages between all users in response - */ - includePrivate?: boolean; - }): 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, - }, - }); - } + /** + * 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` + * @returns any Success + * @throws ApiError + */ + public channelMessageReadMany({ + channelId, + before, + after, + limit = 50, + includePrivate = false, + }: { + /** + * ID of the channel that the messages exist in + */ + channelId: string; + before?: string; + /** + * An ISO 8601 timestamp that will be used to filter out results for the current page. Order will be reversed when compared to `before` or when omitting this parameter altogether + */ + after?: string; + limit?: number; + /** + * Whether to include private messages between all users in response + */ + includePrivate?: boolean; + }): 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, + }, + }, + ); + } - /** - * Get a channel message - * Get details for a specific chat message from a chat channel. - * @returns any Success - * @throws ApiError - */ - public channelMessageRead({ - channelId, - messageId, - }: { - /** - * ID of the channel that the message exists in - */ - channelId: string; - messageId: string; - }): CancelablePromise<{ - message: ChatMessage; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/messages/{messageId}", - path: { - channelId: channelId, - messageId: messageId, - }, - }); - } + /** + * Get a channel message + * Get details for a specific chat message from a chat channel. + * @returns any Success + * @throws ApiError + */ + public channelMessageRead({ + channelId, + messageId, + }: { + /** + * ID of the channel that the message exists in + */ + channelId: string; + messageId: string; + }): CancelablePromise<{ + message: ChatMessage; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/channels/{channelId}/messages/{messageId}", + path: { + channelId: channelId, + messageId: messageId, + }, + }, + ); + } - /** - * Update a channel message - * @returns any Success - * @throws ApiError - */ - public channelMessageUpdate({ - channelId, - messageId, - requestBody, - }: { - /** - * ID of the channel that the message to be updated exists in - */ - channelId: string; - messageId: string; - requestBody: { - /** - * The content of the message - */ - content?: Record | string; - /** - * 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. - */ - embeds?: Array; - }; - }): CancelablePromise<{ - message: ChatMessage & { - /** - * The ID of the message - */ - id?: string; - /** - * The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. - */ - type?: "default" | "system"; - /** - * The ID of the server - */ - serverId?: string; - /** - * The ID of the group - */ - groupId?: string; - /** - * The ID of the channel - */ - channelId?: string; - /** - * The content of the message - */ - content?: string; - embeds?: Array; - /** - * Message IDs that were replied to - */ - replyMessageIds?: Array; - /** - * If set, this message will only be seen by those mentioned or replied to - */ - isPrivate?: boolean; - /** - * If set, this message did not notify mention or reply recipients - */ - isSilent?: boolean; - isPinned?: boolean; - mentions?: Mentions; - /** - * The ISO 8601 timestamp that the message was created at - */ - createdAt?: string; - /** - * The ID of the user who created this message (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) - */ - createdBy?: string; - /** - * The ID of the webhook who created this message, if it was created by a webhook - */ - createdByWebhookId?: string; - /** - * The ISO 8601 timestamp that the message was updated at, if relevant - */ - updatedAt: string; - }; - }> { - return this.httpRequest.request({ - method: "PUT", - url: "/channels/{channelId}/messages/{messageId}", - path: { - channelId: channelId, - messageId: messageId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a channel message + * @returns any Success + * @throws ApiError + */ + public channelMessageUpdate({ + channelId, + messageId, + requestBody, + }: { + /** + * ID of the channel that the message to be updated exists in + */ + channelId: string; + messageId: string; + requestBody: { + /** + * The content of the message + */ + content?: + | Record< + string, + any + > + | string; + /** + * 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. + */ + embeds?: Array; + }; + }): CancelablePromise<{ + message: ChatMessage & { + /** + * The ID of the message + */ + id?: string; + /** + * The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. + */ + type?: + | "default" + | "system"; + /** + * The ID of the server + */ + serverId?: string; + /** + * The ID of the group + */ + groupId?: string; + /** + * The ID of the channel + */ + channelId?: string; + /** + * The content of the message + */ + content?: string; + embeds?: Array; + /** + * Message IDs that were replied to + */ + replyMessageIds?: Array; + /** + * If set, this message will only be seen by those mentioned or replied to + */ + isPrivate?: boolean; + /** + * If set, this message did not notify mention or reply recipients + */ + isSilent?: boolean; + isPinned?: boolean; + mentions?: Mentions; + /** + * The ISO 8601 timestamp that the message was created at + */ + createdAt?: string; + /** + * The ID of the user who created this message (Note: If this event has `createdByWebhookId` present, this field will still be populated, but can be ignored. In this case, the value of this field will always be Ann6LewA) + */ + createdBy?: string; + /** + * The ID of the webhook who created this message, if it was created by a webhook + */ + createdByWebhookId?: string; + /** + * The ISO 8601 timestamp that the message was updated at, if relevant + */ + updatedAt: string; + }; + }> { + 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 - * @throws ApiError - */ - public channelMessageDelete({ channelId, messageId }: { channelId: string; messageId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/messages/{messageId}", - path: { - channelId: channelId, - messageId: messageId, - }, - }); - } + /** + * Delete a channel message + * @returns void + * @throws ApiError + */ + public channelMessageDelete({ + channelId, + messageId, + }: { + channelId: string; + messageId: string; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "DELETE", + url: "/channels/{channelId}/messages/{messageId}", + path: { + channelId: channelId, + messageId: messageId, + }, + }, + ); + } - /** - * Pin a message - * @returns void - * @throws ApiError - */ - public channelMessagePinCreate({ channelId, messageId }: { channelId: string; messageId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/channels/{channelId}/messages/{messageId}/pin", - path: { - channelId: channelId, - messageId: messageId, - }, - }); - } + /** + * Pin a message + * @returns void + * @throws ApiError + */ + public channelMessagePinCreate({ + channelId, + messageId, + }: { + channelId: string; + messageId: string; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "POST", + url: "/channels/{channelId}/messages/{messageId}/pin", + path: { + channelId: channelId, + messageId: messageId, + }, + }, + ); + } - /** - * Unpin a message - * @returns void - * @throws ApiError - */ - public channelMessagePinDelete({ channelId, messageId }: { channelId: string; messageId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/messages/{messageId}/pin", - path: { - channelId: channelId, - messageId: messageId, - }, - }); - } + /** + * Unpin a message + * @returns void + * @throws ApiError + */ + public channelMessagePinDelete({ + channelId, + messageId, + }: { + channelId: string; + messageId: string; + }): CancelablePromise { + 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 919ab510..762e770e 100644 --- a/packages/api/lib/generated/router/services/DocCommentsService.ts +++ b/packages/api/lib/generated/router/services/DocCommentsService.ts @@ -4,132 +4,166 @@ /* eslint-disable */ import type { DocComment } from "../models/DocComment"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public docCommentCreate({ - channelId, - docId, - requestBody, - }: { - channelId: string; - docId: number; - requestBody: { - /** - * The content of the doc comment - */ - content: string; - }; - }): 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", - }); - } + /** + * Create a comment on a doc + * @returns any Success + * @throws ApiError + */ + public docCommentCreate({ + channelId, + docId, + requestBody, + }: { + channelId: string; + docId: number; + requestBody: { + /** + * The content of the doc comment + */ + content: string; + }; + }): 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", + }, + ); + } - /** - * Get a doc's comments - * @returns any Success - * @throws ApiError - */ - public docCommentReadMany({ channelId, docId }: { channelId: string; docId: number }): CancelablePromise<{ - docComments: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/docs/{docId}/comments", - path: { - channelId: channelId, - docId: docId, - }, - }); - } + /** + * Get a doc's comments + * @returns any Success + * @throws ApiError + */ + public docCommentReadMany({ + channelId, + docId, + }: { + channelId: string; + docId: number; + }): CancelablePromise<{ + docComments: Array; + }> { + 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 - * @throws ApiError - */ - public docCommentRead({ channelId, docId, docCommentId }: { channelId: string; docId: number; docCommentId: number }): CancelablePromise<{ - docComment: DocComment; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/docs/{docId}/comments/{docCommentId}", - path: { - channelId: channelId, - docId: docId, - docCommentId: docCommentId, - }, - }); - } + /** + * Get a comment on a doc + * @returns any Success + * @throws ApiError + */ + public docCommentRead({ + channelId, + docId, + docCommentId, + }: { + channelId: string; + docId: number; + docCommentId: number; + }): CancelablePromise<{ + docComment: DocComment; + }> { + 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 - * @throws ApiError - */ - public docCommentUpdate({ - channelId, - docId, - docCommentId, - requestBody, - }: { - channelId: string; - docId: number; - docCommentId: number; - requestBody: { - /** - * The content of the doc comment - */ - content: string; - }; - }): 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", - }); - } + /** + * Update a doc comment + * @returns any Success + * @throws ApiError + */ + public docCommentUpdate({ + channelId, + docId, + docCommentId, + requestBody, + }: { + channelId: string; + docId: number; + docCommentId: number; + requestBody: { + /** + * The content of the doc comment + */ + content: string; + }; + }): 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", + }, + ); + } - /** - * Delete a doc comment - * @returns void - * @throws ApiError - */ - public docCommentDelete({ channelId, docId, docCommentId }: { channelId: string; 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, - }, - }); - } + /** + * Delete a doc comment + * @returns void + * @throws ApiError + */ + public docCommentDelete({ + channelId, + docId, + docCommentId, + }: { + channelId: string; + 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, + }, + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/DocsService.ts b/packages/api/lib/generated/router/services/DocsService.ts index f9839393..9fb3749b 100644 --- a/packages/api/lib/generated/router/services/DocsService.ts +++ b/packages/api/lib/generated/router/services/DocsService.ts @@ -4,136 +4,173 @@ /* eslint-disable */ import type { Doc } from "../models/Doc"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public docCreate({ - channelId, - requestBody, - }: { - channelId: string; - requestBody: { - /** - * The title of the doc - */ - title: string; - /** - * The content of the doc - */ - content: Record | string; - }; - }): CancelablePromise<{ - doc: Doc; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/channels/{channelId}/docs", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a doc + * @returns any Success + * @throws ApiError + */ + public docCreate({ + channelId, + requestBody, + }: { + channelId: string; + requestBody: { + /** + * The title of the doc + */ + title: string; + /** + * The content of the doc + */ + content: + | Record< + string, + any + > + | string; + }; + }): CancelablePromise<{ + doc: Doc; + }> { + 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` - * @returns any Success - * @throws ApiError - */ - public docReadMany({ channelId, before, limit = 25 }: { channelId: string; before?: string; limit?: number }): CancelablePromise<{ - docs: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/docs", - path: { - channelId: channelId, - }, - query: { - before: before, - limit: limit, - }, - }); - } + /** + * Get docs + * Results returned will be ordered descending by the doc's `updatedAt`. `before` will filter based on the doc's `updatedAt` + * @returns any Success + * @throws ApiError + */ + public docReadMany({ + channelId, + before, + limit = 25, + }: { + channelId: string; + before?: string; + limit?: number; + }): CancelablePromise<{ + docs: Array; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/channels/{channelId}/docs", + path: { + channelId: channelId, + }, + query: { + before: before, + limit: limit, + }, + }, + ); + } - /** - * Get a doc - * @returns any Success - * @throws ApiError - */ - public docRead({ channelId, docId }: { channelId: string; docId: number }): CancelablePromise<{ - doc: Doc; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/docs/{docId}", - path: { - channelId: channelId, - docId: docId, - }, - }); - } + /** + * Get a doc + * @returns any Success + * @throws ApiError + */ + public docRead({ + channelId, + docId, + }: { + channelId: string; + docId: number; + }): CancelablePromise<{ + doc: Doc; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/channels/{channelId}/docs/{docId}", + path: { + channelId: channelId, + docId: docId, + }, + }, + ); + } - /** - * Update a doc - * @returns any Success - * @throws ApiError - */ - public docUpdate({ - channelId, - docId, - requestBody, - }: { - channelId: string; - docId: number; - requestBody: { - /** - * The title of the doc - */ - title: string; - /** - * The content of the doc - */ - content: string; - }; - }): CancelablePromise<{ - doc: Doc; - }> { - return this.httpRequest.request({ - method: "PUT", - url: "/channels/{channelId}/docs/{docId}", - path: { - channelId: channelId, - docId: docId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a doc + * @returns any Success + * @throws ApiError + */ + public docUpdate({ + channelId, + docId, + requestBody, + }: { + channelId: string; + docId: number; + requestBody: { + /** + * The title of the doc + */ + title: string; + /** + * The content of the doc + */ + content: string; + }; + }): CancelablePromise<{ + doc: Doc; + }> { + 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 - * @throws ApiError - */ - public docDelete({ channelId, docId }: { channelId: string; docId: number }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/docs/{docId}", - path: { - channelId: channelId, - docId: docId, - }, - }); - } + /** + * Delete a doc + * @returns void + * @throws ApiError + */ + public docDelete({ + channelId, + docId, + }: { + channelId: string; + docId: number; + }): CancelablePromise { + 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 481df100..5c5c5eb7 100644 --- a/packages/api/lib/generated/router/services/ForumCommentsService.ts +++ b/packages/api/lib/generated/router/services/ForumCommentsService.ts @@ -4,132 +4,166 @@ /* eslint-disable */ import type { ForumTopicComment } from "../models/ForumTopicComment"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public forumTopicCommentCreate({ - channelId, - forumTopicId, - requestBody, - }: { - channelId: string; - forumTopicId: number; - requestBody: { - /** - * The content of the forum topic comment - */ - content: string; - }; - }): 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", - }); - } + /** + * Create a forum topic comment + * @returns any Success + * @throws ApiError + */ + public forumTopicCommentCreate({ + channelId, + forumTopicId, + requestBody, + }: { + channelId: string; + forumTopicId: number; + requestBody: { + /** + * The content of the forum topic comment + */ + content: string; + }; + }): 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", + }, + ); + } - /** - * Get a forum topic's comments - * @returns any Success - * @throws ApiError - */ - public forumTopicCommentReadMany({ channelId, forumTopicId }: { channelId: string; forumTopicId: number }): CancelablePromise<{ - forumTopicComments: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/topics/{forumTopicId}/comments", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - }); - } + /** + * Get a forum topic's comments + * @returns any Success + * @throws ApiError + */ + public forumTopicCommentReadMany({ + channelId, + forumTopicId, + }: { + channelId: string; + forumTopicId: number; + }): CancelablePromise<{ + forumTopicComments: Array; + }> { + 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 - * @throws ApiError - */ - public forumTopicCommentRead({ channelId, forumTopicId, forumTopicCommentId }: { channelId: string; forumTopicId: number; forumTopicCommentId: number }): CancelablePromise<{ - forumTopicComment: ForumTopicComment; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/topics/{forumTopicId}/comments/{forumTopicCommentId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - forumTopicCommentId: forumTopicCommentId, - }, - }); - } + /** + * Get a comment on a forum topic + * @returns any Success + * @throws ApiError + */ + public forumTopicCommentRead({ + channelId, + forumTopicId, + forumTopicCommentId, + }: { + channelId: string; + forumTopicId: number; + forumTopicCommentId: number; + }): CancelablePromise<{ + forumTopicComment: ForumTopicComment; + }> { + 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 - * @throws ApiError - */ - public forumTopicCommentUpdate({ - channelId, - forumTopicId, - forumTopicCommentId, - requestBody, - }: { - channelId: string; - forumTopicId: number; - forumTopicCommentId: number; - requestBody: { - /** - * The content of the forum topic - */ - content?: string; - }; - }): 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", - }); - } + /** + * Update a forum topic comment + * @returns any Success + * @throws ApiError + */ + public forumTopicCommentUpdate({ + channelId, + forumTopicId, + forumTopicCommentId, + requestBody, + }: { + channelId: string; + forumTopicId: number; + forumTopicCommentId: number; + requestBody: { + /** + * The content of the forum topic + */ + content?: string; + }; + }): 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", + }, + ); + } - /** - * Delete a forum topic comment - * @returns void - * @throws ApiError - */ - public forumTopicCommentDelete({ channelId, forumTopicId, forumTopicCommentId }: { channelId: string; 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, - }, - }); - } + /** + * Delete a forum topic comment + * @returns void + * @throws ApiError + */ + public forumTopicCommentDelete({ + channelId, + forumTopicId, + forumTopicCommentId, + }: { + channelId: string; + 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, + }, + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/ForumsService.ts b/packages/api/lib/generated/router/services/ForumsService.ts index ddcdafa3..69d4b092 100644 --- a/packages/api/lib/generated/router/services/ForumsService.ts +++ b/packages/api/lib/generated/router/services/ForumsService.ts @@ -5,199 +5,268 @@ import type { ForumTopic } from "../models/ForumTopic"; import type { ForumTopicSummary } from "../models/ForumTopicSummary"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public forumTopicCreate({ - channelId, - requestBody, - }: { - channelId: string; - requestBody: { - /** - * The title of the forum topic - */ - title: string; - /** - * The content of the forum topic - */ - content: Record | string; - }; - }): CancelablePromise<{ - forumTopic: ForumTopic; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/channels/{channelId}/topics", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a topic in a forum + * @returns any Success + * @throws ApiError + */ + public forumTopicCreate({ + channelId, + requestBody, + }: { + channelId: string; + requestBody: { + /** + * The title of the forum topic + */ + title: string; + /** + * The content of the forum topic + */ + content: + | Record< + string, + any + > + | string; + }; + }): CancelablePromise<{ + forumTopic: ForumTopic; + }> { + return this.httpRequest.request( + { + method: "POST", + url: "/channels/{channelId}/topics", + path: { + channelId: channelId, + }, + body: requestBody, + mediaType: "application/json", + }, + ); + } - /** - * Get forum topics - * @returns any Success - * @throws ApiError - */ - public forumTopicReadMany({ channelId, before, limit = 25 }: { channelId: string; before?: string; limit?: number }): CancelablePromise<{ - forumTopics: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/topics", - path: { - channelId: channelId, - }, - query: { - before: before, - limit: limit, - }, - }); - } + /** + * Get forum topics + * @returns any Success + * @throws ApiError + */ + public forumTopicReadMany({ + channelId, + before, + limit = 25, + }: { + channelId: string; + before?: string; + limit?: number; + }): CancelablePromise<{ + forumTopics: Array; + }> { + 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 - * @throws ApiError - */ - public forumTopicRead({ channelId, forumTopicId }: { channelId: string; forumTopicId: number }): CancelablePromise<{ - forumTopic: ForumTopic; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/topics/{forumTopicId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - }); - } + /** + * Get a forum topic + * @returns any Success + * @throws ApiError + */ + public forumTopicRead({ + channelId, + forumTopicId, + }: { + channelId: string; + forumTopicId: number; + }): CancelablePromise<{ + forumTopic: ForumTopic; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/channels/{channelId}/topics/{forumTopicId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + }, + }, + ); + } - /** - * Update a forum topic - * @returns any Success - * @throws ApiError - */ - public forumTopicUpdate({ - channelId, - forumTopicId, - requestBody, - }: { - channelId: string; - forumTopicId: number; - requestBody: { - /** - * The title of the forum topic - */ - title?: string; - /** - * The content of the forum topic - */ - content?: string; - }; - }): CancelablePromise<{ - forumTopic: ForumTopic; - }> { - return this.httpRequest.request({ - method: "PATCH", - url: "/channels/{channelId}/topics/{forumTopicId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a forum topic + * @returns any Success + * @throws ApiError + */ + public forumTopicUpdate({ + channelId, + forumTopicId, + requestBody, + }: { + channelId: string; + forumTopicId: number; + requestBody: { + /** + * The title of the forum topic + */ + title?: string; + /** + * The content of the forum topic + */ + content?: string; + }; + }): CancelablePromise<{ + forumTopic: ForumTopic; + }> { + 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 - * @throws ApiError - */ - public forumTopicDelete({ channelId, forumTopicId }: { channelId: string; forumTopicId: number }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - }); - } + /** + * Delete a forum topic + * @returns void + * @throws ApiError + */ + public forumTopicDelete({ + channelId, + forumTopicId, + }: { + channelId: string; + forumTopicId: number; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "DELETE", + url: "/channels/{channelId}/topics/{forumTopicId}", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + }, + }, + ); + } - /** - * Pin a forum topic - * @returns void - * @throws ApiError - */ - public forumTopicPin({ channelId, forumTopicId }: { channelId: string; forumTopicId: number }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/channels/{channelId}/topics/{forumTopicId}/pin", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - }); - } + /** + * Pin a forum topic + * @returns void + * @throws ApiError + */ + public forumTopicPin({ + channelId, + forumTopicId, + }: { + channelId: string; + forumTopicId: number; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "PUT", + url: "/channels/{channelId}/topics/{forumTopicId}/pin", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + }, + }, + ); + } - /** - * Unpin a forum topic - * @returns void - * @throws ApiError - */ - public forumTopicUnpin({ channelId, forumTopicId }: { channelId: string; forumTopicId: number }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}/pin", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - }); - } + /** + * Unpin a forum topic + * @returns void + * @throws ApiError + */ + public forumTopicUnpin({ + channelId, + forumTopicId, + }: { + channelId: string; + forumTopicId: number; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "DELETE", + url: "/channels/{channelId}/topics/{forumTopicId}/pin", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + }, + }, + ); + } - /** - * Lock a forum topic - * @returns void - * @throws ApiError - */ - public forumTopicLock({ channelId, forumTopicId }: { channelId: string; forumTopicId: number }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/channels/{channelId}/topics/{forumTopicId}/lock", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - }); - } + /** + * Lock a forum topic + * @returns void + * @throws ApiError + */ + public forumTopicLock({ + channelId, + forumTopicId, + }: { + channelId: string; + forumTopicId: number; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "PUT", + url: "/channels/{channelId}/topics/{forumTopicId}/lock", + path: { + channelId: channelId, + forumTopicId: forumTopicId, + }, + }, + ); + } - /** - * Unlock a forum topic - * @returns void - * @throws ApiError - */ - public forumTopicUnlock({ channelId, forumTopicId }: { channelId: string; forumTopicId: number }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}/lock", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - }, - }); - } + /** + * Unlock a forum topic + * @returns void + * @throws ApiError + */ + public forumTopicUnlock({ + channelId, + forumTopicId, + }: { + channelId: string; + forumTopicId: number; + }): CancelablePromise { + 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 9776e48e..bfd86861 100644 --- a/packages/api/lib/generated/router/services/GroupMembershipService.ts +++ b/packages/api/lib/generated/router/services/GroupMembershipService.ts @@ -1,66 +1,76 @@ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; /* generated using openapi-typescript-codegen -- do no edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class GroupMembershipService { - constructor(public readonly httpRequest: BaseHttpRequest) {} + constructor( + public readonly httpRequest: BaseHttpRequest, + ) {} - /** - * Add member to group - * @returns void - * @throws ApiError - */ - public groupMembershipCreate({ - groupId, - userId, - }: { - /** - * Group ID to add the member to - */ - groupId: string; - /** - * Member ID to add to the group - */ - userId: string | "@me"; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/groups/{groupId}/members/{userId}", - path: { - groupId: groupId, - userId: userId, - }, - }); - } + /** + * Add member to group + * @returns void + * @throws ApiError + */ + public groupMembershipCreate({ + groupId, + userId, + }: { + /** + * Group ID to add the member to + */ + groupId: string; + /** + * Member ID to add to the group + */ + userId: + | string + | "@me"; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "PUT", + url: "/groups/{groupId}/members/{userId}", + path: { + groupId: groupId, + userId: userId, + }, + }, + ); + } - /** - * Remove member from group - * @returns void - * @throws ApiError - */ - public groupMembershipDelete({ - groupId, - userId, - }: { - /** - * Group ID to remove the member from - */ - groupId: string; - /** - * Member ID to remove from the group - */ - userId: string | "@me"; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/groups/{groupId}/members/{userId}", - path: { - groupId: groupId, - userId: userId, - }, - }); - } + /** + * Remove member from group + * @returns void + * @throws ApiError + */ + public groupMembershipDelete({ + groupId, + userId, + }: { + /** + * Group ID to remove the member from + */ + groupId: string; + /** + * Member ID to remove from the group + */ + userId: + | string + | "@me"; + }): CancelablePromise { + 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 92217389..bda03b9a 100644 --- a/packages/api/lib/generated/router/services/GroupsService.ts +++ b/packages/api/lib/generated/router/services/GroupsService.ts @@ -4,151 +4,179 @@ /* eslint-disable */ import type { Group } from "../models/Group"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @returns any Success - * @throws ApiError - */ - public groupCreate({ - serverId, - requestBody, - }: { - serverId: string; - requestBody: { - /** - * The name of the group - */ - name: string; - /** - * The description associated with the group - */ - description?: string; - /** - * The emote to associate with the group - */ - emoteId?: number; - /** - * Is this group open for anyone to join? - */ - isPublic?: boolean; - }; - }): CancelablePromise<{ - group: Group; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/servers/{serverId}/groups", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a group + * Note: only 100 unarchived groups can exist on a server at any time + * @returns any Success + * @throws ApiError + */ + public groupCreate({ + serverId, + requestBody, + }: { + serverId: string; + requestBody: { + /** + * The name of the group + */ + name: string; + /** + * The description associated with the group + */ + description?: string; + /** + * The emote to associate with the group + */ + emoteId?: number; + /** + * Is this group open for anyone to join? + */ + isPublic?: boolean; + }; + }): CancelablePromise<{ + group: Group; + }> { + return this.httpRequest.request( + { + method: "POST", + url: "/servers/{serverId}/groups", + path: { + serverId: serverId, + }, + body: requestBody, + mediaType: "application/json", + }, + ); + } - /** - * Get groups - * @returns any Success - * @throws ApiError - */ - public groupReadMany({ serverId }: { serverId: string }): CancelablePromise<{ - groups: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/groups", - path: { - serverId: serverId, - }, - }); - } + /** + * Get groups + * @returns any Success + * @throws ApiError + */ + public groupReadMany({ + serverId, + }: { + serverId: string; + }): CancelablePromise<{ + groups: Array; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/servers/{serverId}/groups", + path: { + serverId: serverId, + }, + }, + ); + } - /** - * Get a group - * @returns any Success - * @throws ApiError - */ - public groupRead({ serverId, groupId }: { serverId: string; groupId: string }): CancelablePromise<{ - group: Group; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/groups/{groupId}", - path: { - serverId: serverId, - groupId: groupId, - }, - }); - } + /** + * Get a group + * @returns any Success + * @throws ApiError + */ + public groupRead({ + serverId, + groupId, + }: { + serverId: string; + groupId: string; + }): CancelablePromise<{ + group: Group; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/servers/{serverId}/groups/{groupId}", + path: { + serverId: serverId, + groupId: groupId, + }, + }, + ); + } - /** - * Update a group - * @returns any Success - * @throws ApiError - */ - public groupUpdate({ - serverId, - groupId, - requestBody, - }: { - serverId: string; - groupId: string; - requestBody: { - /** - * The name of the group - */ - name?: string; - /** - * The description associated with the group - * **Note** - this property cannot be modified on a home group - */ - description?: string; - /** - * The emote to associate with the group - */ - emoteId?: number; - /** - * Is this group open for anyone to join? - * **Note** - this property cannot be modified on a home group - */ - isPublic?: boolean; - }; - }): CancelablePromise<{ - group: Group; - }> { - return this.httpRequest.request({ - method: "PATCH", - url: "/servers/{serverId}/groups/{groupId}", - path: { - serverId: serverId, - groupId: groupId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a group + * @returns any Success + * @throws ApiError + */ + public groupUpdate({ + serverId, + groupId, + requestBody, + }: { + serverId: string; + groupId: string; + requestBody: { + /** + * The name of the group + */ + name?: string; + /** + * The description associated with the group + * **Note** - this property cannot be modified on a home group + */ + description?: string; + /** + * The emote to associate with the group + */ + emoteId?: number; + /** + * Is this group open for anyone to join? + * **Note** - this property cannot be modified on a home group + */ + isPublic?: boolean; + }; + }): CancelablePromise<{ + group: Group; + }> { + 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 - * @returns void - * @throws ApiError - */ - public groupDelete({ serverId, groupId }: { serverId: string; groupId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/servers/{serverId}/groups/{groupId}", - path: { - serverId: serverId, - groupId: groupId, - }, - }); - } + /** + * Delete a group + * Note: you cannot delete the home group + * @returns void + * @throws ApiError + */ + public groupDelete({ + serverId, + groupId, + }: { + serverId: string; + groupId: string; + }): CancelablePromise { + 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 2e2cc687..5975b092 100644 --- a/packages/api/lib/generated/router/services/ListItemsService.ts +++ b/packages/api/lib/generated/router/services/ListItemsService.ts @@ -5,167 +5,221 @@ import type { ListItem } from "../models/ListItem"; import type { ListItemSummary } from "../models/ListItemSummary"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public listItemCreate({ - channelId, - requestBody, - }: { - channelId: string; - requestBody: { - /** - * The message of the list item - */ - message: Record | string; - note?: { - /** - * The note of the list item - */ - content: Record | string; - }; - }; - }): CancelablePromise<{ - listItem: ListItem; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/channels/{channelId}/items", - path: { - channelId: channelId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a list item + * @returns any Success + * @throws ApiError + */ + public listItemCreate({ + channelId, + requestBody, + }: { + channelId: string; + requestBody: { + /** + * The message of the list item + */ + message: + | Record< + string, + any + > + | string; + note?: { + /** + * The note of the list item + */ + content: + | Record< + string, + any + > + | string; + }; + }; + }): CancelablePromise<{ + listItem: ListItem; + }> { + 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 - * @throws ApiError - */ - public listItemReadMany({ channelId }: { channelId: string }): CancelablePromise<{ - listItems: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/items", - path: { - channelId: channelId, - }, - }); - } + /** + * Get list items within a channel + * @returns any Success + * @throws ApiError + */ + public listItemReadMany({ + channelId, + }: { + channelId: string; + }): CancelablePromise<{ + listItems: Array; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/channels/{channelId}/items", + path: { + channelId: channelId, + }, + }, + ); + } - /** - * Get a list item - * @returns any Success - * @throws ApiError - */ - public listItemRead({ channelId, listItemId }: { channelId: string; listItemId: string }): CancelablePromise<{ - listItem: ListItem; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/channels/{channelId}/items/{listItemId}", - path: { - channelId: channelId, - listItemId: listItemId, - }, - }); - } + /** + * Get a list item + * @returns any Success + * @throws ApiError + */ + public listItemRead({ + channelId, + listItemId, + }: { + channelId: string; + listItemId: string; + }): CancelablePromise<{ + listItem: ListItem; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/channels/{channelId}/items/{listItemId}", + path: { + channelId: channelId, + listItemId: listItemId, + }, + }, + ); + } - /** - * Update a list item - * @returns any Success - * @throws ApiError - */ - public listItemUpdate({ - channelId, - listItemId, - requestBody, - }: { - channelId: string; - listItemId: string; - requestBody: { - /** - * The message of the list item - */ - message?: string; - note?: { - /** - * The note of the list item - */ - content: string; - } | null; - }; - }): CancelablePromise<{ - listItem: ListItem; - }> { - return this.httpRequest.request({ - method: "PATCH", - url: "/channels/{channelId}/items/{listItemId}", - path: { - channelId: channelId, - listItemId: listItemId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a list item + * @returns any Success + * @throws ApiError + */ + public listItemUpdate({ + channelId, + listItemId, + requestBody, + }: { + channelId: string; + listItemId: string; + requestBody: { + /** + * The message of the list item + */ + message?: string; + note?: { + /** + * The note of the list item + */ + content: string; + } | null; + }; + }): CancelablePromise<{ + listItem: ListItem; + }> { + 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 - * @throws ApiError - */ - public listItemDelete({ channelId, listItemId }: { channelId: string; listItemId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/items/{listItemId}", - path: { - channelId: channelId, - listItemId: listItemId, - }, - }); - } + /** + * Delete a list item + * @returns void + * @throws ApiError + */ + public listItemDelete({ + channelId, + listItemId, + }: { + channelId: string; + listItemId: string; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "DELETE", + url: "/channels/{channelId}/items/{listItemId}", + path: { + channelId: channelId, + listItemId: listItemId, + }, + }, + ); + } - /** - * Complete a list item - * @returns void - * @throws ApiError - */ - public listItemCompleteCreate({ channelId, listItemId }: { channelId: string; listItemId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "POST", - url: "/channels/{channelId}/items/{listItemId}/complete", - path: { - channelId: channelId, - listItemId: listItemId, - }, - }); - } + /** + * Complete a list item + * @returns void + * @throws ApiError + */ + public listItemCompleteCreate({ + channelId, + listItemId, + }: { + channelId: string; + listItemId: string; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "POST", + url: "/channels/{channelId}/items/{listItemId}/complete", + path: { + channelId: channelId, + listItemId: listItemId, + }, + }, + ); + } - /** - * Uncomplete a list item - * @returns void - * @throws ApiError - */ - public listItemCompleteDelete({ channelId, listItemId }: { channelId: string; listItemId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/items/{listItemId}/complete", - path: { - channelId: channelId, - listItemId: listItemId, - }, - }); - } + /** + * Uncomplete a list item + * @returns void + * @throws ApiError + */ + public listItemCompleteDelete({ + channelId, + listItemId, + }: { + channelId: string; + listItemId: string; + }): CancelablePromise { + 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 003d8c1b..f0d24702 100644 --- a/packages/api/lib/generated/router/services/MemberBansService.ts +++ b/packages/api/lib/generated/router/services/MemberBansService.ts @@ -4,116 +4,136 @@ /* eslint-disable */ import type { ServerMemberBan } from "../models/ServerMemberBan"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @returns any Success - * @throws ApiError - */ - public serverMemberBanCreate({ - serverId, - userId, - requestBody, - }: { - serverId: string; - /** - * The ID of the user to ban from this server - */ - userId: string | "@me"; - requestBody?: { - /** - * The reason for the ban - */ - reason?: string; - }; - }): CancelablePromise<{ - serverMemberBan: ServerMemberBan; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/servers/{serverId}/bans/{userId}", - path: { - serverId: serverId, - userId: userId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a server ban + * Also known as banning a server member + * @returns any Success + * @throws ApiError + */ + public serverMemberBanCreate({ + serverId, + userId, + requestBody, + }: { + serverId: string; + /** + * The ID of the user to ban from this server + */ + userId: + | string + | "@me"; + requestBody?: { + /** + * The reason for the ban + */ + reason?: string; + }; + }): CancelablePromise<{ + serverMemberBan: ServerMemberBan; + }> { + 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 - * @throws ApiError - */ - public serverMemberBanRead({ - serverId, - userId, - }: { - serverId: string; - /** - * The ID of the user to get a server ban for - */ - userId: string | "@me"; - }): CancelablePromise<{ - serverMemberBan: ServerMemberBan; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/bans/{userId}", - path: { - serverId: serverId, - userId: userId, - }, - }); - } + /** + * Get a server ban + * @returns any Success + * @throws ApiError + */ + public serverMemberBanRead({ + serverId, + userId, + }: { + serverId: string; + /** + * The ID of the user to get a server ban for + */ + userId: + | string + | "@me"; + }): CancelablePromise<{ + serverMemberBan: ServerMemberBan; + }> { + 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 - * @returns void - * @throws ApiError - */ - public serverMemberBanDelete({ - serverId, - userId, - }: { - serverId: string; - /** - * The ID of the user to unban from this server - */ - userId: string | "@me"; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/servers/{serverId}/bans/{userId}", - path: { - serverId: serverId, - userId: userId, - }, - }); - } + /** + * Delete a server ban + * Also known as unbanning a server member + * @returns void + * @throws ApiError + */ + public serverMemberBanDelete({ + serverId, + userId, + }: { + serverId: string; + /** + * The ID of the user to unban from this server + */ + userId: + | string + | "@me"; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "DELETE", + url: "/servers/{serverId}/bans/{userId}", + path: { + serverId: serverId, + userId: userId, + }, + }, + ); + } - /** - * Get server bans - * @returns any Success - * @throws ApiError - */ - public serverMemberBanReadMany({ serverId }: { serverId: string }): CancelablePromise<{ - serverMemberBans: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/bans", - path: { - serverId: serverId, - }, - }); - } + /** + * Get server bans + * @returns any Success + * @throws ApiError + */ + public serverMemberBanReadMany({ + serverId, + }: { + serverId: string; + }): CancelablePromise<{ + serverMemberBans: Array; + }> { + 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 32189b5a..e301d43c 100644 --- a/packages/api/lib/generated/router/services/MembersService.ts +++ b/packages/api/lib/generated/router/services/MembersService.ts @@ -5,138 +5,168 @@ import type { ServerMember } from "../models/ServerMember"; import type { ServerMemberSummary } from "../models/ServerMemberSummary"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public memberNicknameUpdate({ - serverId, - userId, - requestBody, - }: { - serverId: string; - /** - * The ID of the user to update nickname for - */ - userId: string | "@me"; - requestBody: { - /** - * The nickname to assign to the member - */ - nickname: string; - }; - }): CancelablePromise<{ - /** - * The nickname that was assigned to the member - */ - nickname: string; - }> { - return this.httpRequest.request({ - method: "PUT", - url: "/servers/{serverId}/members/{userId}/nickname", - path: { - serverId: serverId, - userId: userId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a member's nickname + * @returns any Success + * @throws ApiError + */ + public memberNicknameUpdate({ + serverId, + userId, + requestBody, + }: { + serverId: string; + /** + * The ID of the user to update nickname for + */ + userId: + | string + | "@me"; + requestBody: { + /** + * The nickname to assign to the member + */ + nickname: string; + }; + }): CancelablePromise<{ + /** + * The nickname that was assigned to the member + */ + nickname: string; + }> { + 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 - * @throws ApiError - */ - public memberNicknameDelete({ - serverId, - userId, - }: { - serverId: string; - /** - * The ID of the user to remove nickname from - */ - userId: string | "@me"; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/servers/{serverId}/members/{userId}/nickname", - path: { - serverId: serverId, - userId: userId, - }, - }); - } + /** + * Delete a member's nickname + * @returns void + * @throws ApiError + */ + public memberNicknameDelete({ + serverId, + userId, + }: { + serverId: string; + /** + * The ID of the user to remove nickname from + */ + userId: + | string + | "@me"; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "DELETE", + url: "/servers/{serverId}/members/{userId}/nickname", + path: { + serverId: serverId, + userId: userId, + }, + }, + ); + } - /** - * Get a server member - * @returns any Success - * @throws ApiError - */ - public serverMemberRead({ serverId, userId }: { serverId: string; userId: string | "@me" }): CancelablePromise<{ - member: ServerMember; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/members/{userId}", - path: { - serverId: serverId, - userId: userId, - }, - }); - } + /** + * Get a server member + * @returns any Success + * @throws ApiError + */ + public serverMemberRead({ + serverId, + userId, + }: { + serverId: string; + userId: + | string + | "@me"; + }): CancelablePromise<{ + member: ServerMember; + }> { + 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` - * @returns void - * @throws ApiError - */ - public serverMemberDelete({ - serverId, - userId, - }: { - /** - * The ID of the server to kick the user from - */ - serverId: string; - /** - * 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"; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - 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` + * @returns void + * @throws ApiError + */ + public serverMemberDelete({ + serverId, + userId, + }: { + /** + * The ID of the server to kick the user from + */ + serverId: string; + /** + * 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"; + }): CancelablePromise { + 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` - * @returns any Success - * @throws ApiError - */ - public serverMemberReadMany({ serverId }: { serverId: string }): CancelablePromise<{ - members: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/members", - path: { - serverId: serverId, - }, - }); - } + /** + * Get members of a server + * Results returned will be ordered ascending by the member's `joinedAt` + * @returns any Success + * @throws ApiError + */ + public serverMemberReadMany({ + serverId, + }: { + serverId: string; + }): CancelablePromise<{ + members: Array; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/servers/{serverId}/members", + path: { + serverId: serverId, + }, + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/ReactionsService.ts b/packages/api/lib/generated/router/services/ReactionsService.ts index 3651b8f8..96af8afc 100644 --- a/packages/api/lib/generated/router/services/ReactionsService.ts +++ b/packages/api/lib/generated/router/services/ReactionsService.ts @@ -1,480 +1,600 @@ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; /* generated using openapi-typescript-codegen -- do no edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class ReactionsService { - constructor(public readonly httpRequest: BaseHttpRequest) {} + constructor( + public readonly httpRequest: BaseHttpRequest, + ) {} - /** - * Create forum topic reaction - * @returns void - * @throws ApiError - */ - public forumTopicReactionCreate({ - channelId, - forumTopicId, - emoteId, - }: { - /** - * Channel ID where the forum topic exists - */ - channelId: string; - /** - * Forum Topic ID - */ - forumTopicId: number; - /** - * Emote ID to apply - */ - emoteId: number; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/channels/{channelId}/topics/{forumTopicId}/emotes/{emoteId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - emoteId: emoteId, - }, - }); - } + /** + * Create forum topic reaction + * @returns void + * @throws ApiError + */ + public forumTopicReactionCreate({ + channelId, + forumTopicId, + emoteId, + }: { + /** + * Channel ID where the forum topic exists + */ + channelId: string; + /** + * Forum Topic ID + */ + forumTopicId: number; + /** + * Emote ID to apply + */ + emoteId: number; + }): CancelablePromise { + 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 - * @throws ApiError - */ - public forumTopicReactionDelete({ - channelId, - forumTopicId, - emoteId, - }: { - /** - * Channel ID where the forum topic exists - */ - channelId: string; - /** - * Forum Topic ID - */ - forumTopicId: number; - /** - * Emote ID to remove - */ - emoteId: number; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/topics/{forumTopicId}/emotes/{emoteId}", - path: { - channelId: channelId, - forumTopicId: forumTopicId, - emoteId: emoteId, - }, - }); - } + /** + * Delete forum topic reaction + * @returns void + * @throws ApiError + */ + public forumTopicReactionDelete({ + channelId, + forumTopicId, + emoteId, + }: { + /** + * Channel ID where the forum topic exists + */ + channelId: string; + /** + * Forum Topic ID + */ + forumTopicId: number; + /** + * Emote ID to remove + */ + emoteId: number; + }): CancelablePromise { + 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 - * @throws ApiError - */ - public forumTopicCommentReactionCreate({ - channelId, - forumTopicId, - forumTopicCommentId, - emoteId, - }: { - /** - * Channel ID where the forum topic exists - */ - channelId: string; - forumTopicId: number; - 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, - }, - }); - } + /** + * Create forum topic comment reaction + * @returns void + * @throws ApiError + */ + public forumTopicCommentReactionCreate({ + channelId, + forumTopicId, + forumTopicCommentId, + emoteId, + }: { + /** + * Channel ID where the forum topic exists + */ + channelId: string; + forumTopicId: number; + 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, + }, + }, + ); + } - /** - * Delete forum topic comment reaction - * @returns void - * @throws ApiError - */ - public forumTopicCommentReactionDelete({ - channelId, - forumTopicId, - forumTopicCommentId, - emoteId, - }: { - /** - * Channel ID where the forum topic exists - */ - channelId: string; - forumTopicId: number; - 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, - }, - }); - } + /** + * Delete forum topic comment reaction + * @returns void + * @throws ApiError + */ + public forumTopicCommentReactionDelete({ + channelId, + forumTopicId, + forumTopicCommentId, + emoteId, + }: { + /** + * Channel ID where the forum topic exists + */ + channelId: string; + forumTopicId: number; + 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, + }, + }, + ); + } - /** - * Create calendar event reaction - * @returns void - * @throws ApiError - */ - public calendarEventReactionCreate({ channelId, calendarEventId, emoteId }: { channelId: string; 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, - }, - }); - } + /** + * Create calendar event reaction + * @returns void + * @throws ApiError + */ + public calendarEventReactionCreate({ + channelId, + calendarEventId, + emoteId, + }: { + channelId: string; + 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, + }, + }, + ); + } - /** - * Delete calendar event reaction - * @returns void - * @throws ApiError - */ - public calendarEventReactionDelete({ channelId, calendarEventId, emoteId }: { channelId: string; 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, - }, - }); - } + /** + * Delete calendar event reaction + * @returns void + * @throws ApiError + */ + public calendarEventReactionDelete({ + channelId, + calendarEventId, + emoteId, + }: { + channelId: string; + 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, + }, + }, + ); + } - /** - * Create calendar event comment reaction - * @returns void - * @throws ApiError - */ - public calendarEventCommentReactionCreate({ - channelId, - calendarEventId, - calendarEventCommentId, - emoteId, - }: { - channelId: string; - calendarEventId: number; - 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, - }, - }); - } + /** + * Create calendar event comment reaction + * @returns void + * @throws ApiError + */ + public calendarEventCommentReactionCreate({ + channelId, + calendarEventId, + calendarEventCommentId, + emoteId, + }: { + channelId: string; + calendarEventId: number; + 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, + }, + }, + ); + } - /** - * Delete calendar event comment reaction - * @returns void - * @throws ApiError - */ - public calendarEventCommentReactionDelete({ - channelId, - calendarEventId, - calendarEventCommentId, - emoteId, - }: { - channelId: string; - calendarEventId: number; - 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, - }, - }); - } + /** + * Delete calendar event comment reaction + * @returns void + * @throws ApiError + */ + public calendarEventCommentReactionDelete({ + channelId, + calendarEventId, + calendarEventCommentId, + emoteId, + }: { + channelId: string; + calendarEventId: number; + 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, + }, + }, + ); + } - /** - * Create doc reaction - * @returns void - * @throws ApiError - */ - public docReactionCreate({ channelId, docId, emoteId }: { channelId: string; 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, - }, - }); - } + /** + * Create doc reaction + * @returns void + * @throws ApiError + */ + public docReactionCreate({ + channelId, + docId, + emoteId, + }: { + channelId: string; + 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, + }, + }, + ); + } - /** - * Delete doc reaction - * @returns void - * @throws ApiError - */ - public docReactionDelete({ channelId, docId, emoteId }: { channelId: string; 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, - }, - }); - } + /** + * Delete doc reaction + * @returns void + * @throws ApiError + */ + public docReactionDelete({ + channelId, + docId, + emoteId, + }: { + channelId: string; + 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, + }, + }, + ); + } - /** - * Create doc comment reaction - * @returns void - * @throws ApiError - */ - public docCommentReactionCreate({ channelId, docId, docCommentId, emoteId }: { channelId: string; docId: number; 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, - }, - }); - } + /** + * Create doc comment reaction + * @returns void + * @throws ApiError + */ + public docCommentReactionCreate({ + channelId, + docId, + docCommentId, + emoteId, + }: { + channelId: string; + docId: number; + 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, + }, + }, + ); + } - /** - * Delete doc comment reaction - * @returns void - * @throws ApiError - */ - public docCommentReactionDelete({ channelId, docId, docCommentId, emoteId }: { channelId: string; docId: number; 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, - }, - }); - } + /** + * Delete doc comment reaction + * @returns void + * @throws ApiError + */ + public docCommentReactionDelete({ + channelId, + docId, + docCommentId, + emoteId, + }: { + channelId: string; + docId: number; + 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, + }, + }, + ); + } - /** - * Create announcement reaction - * @returns void - * @throws ApiError - */ - public announcementReactionCreate({ - channelId, - announcementId, - emoteId, - }: { - channelId: string; - announcementId: string; - /** - * Emote ID to apply - */ - emoteId: number; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/channels/{channelId}/announcements/{announcementId}/emotes/{emoteId}", - path: { - channelId: channelId, - announcementId: announcementId, - emoteId: emoteId, - }, - }); - } + /** + * Create announcement reaction + * @returns void + * @throws ApiError + */ + public announcementReactionCreate({ + channelId, + announcementId, + emoteId, + }: { + channelId: string; + announcementId: string; + /** + * Emote ID to apply + */ + emoteId: number; + }): CancelablePromise { + 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 - * @throws ApiError - */ - public announcementReactionDelete({ - channelId, - announcementId, - emoteId, - }: { - channelId: string; - announcementId: string; - /** - * Emote ID to apply - */ - emoteId: number; - }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/channels/{channelId}/announcements/{announcementId}/emotes/{emoteId}", - path: { - channelId: channelId, - announcementId: announcementId, - emoteId: emoteId, - }, - }); - } + /** + * Delete announcement reaction + * @returns void + * @throws ApiError + */ + public announcementReactionDelete({ + channelId, + announcementId, + emoteId, + }: { + channelId: string; + announcementId: string; + /** + * Emote ID to apply + */ + emoteId: number; + }): CancelablePromise { + 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 - * @throws ApiError - */ - public announcementCommentReactionCreate({ - channelId, - announcementId, - announcementCommentId, - emoteId, - }: { - /** - * Channel ID where the announcement comment exists - */ - channelId: string; - announcementId: string; - announcementCommentId: number; - /** - * Emote ID to apply - */ - 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, - }, - }); - } + /** + * Create an announcement comment reaction + * @returns void + * @throws ApiError + */ + public announcementCommentReactionCreate({ + channelId, + announcementId, + announcementCommentId, + emoteId, + }: { + /** + * Channel ID where the announcement comment exists + */ + channelId: string; + announcementId: string; + announcementCommentId: number; + /** + * Emote ID to apply + */ + 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, + }, + }, + ); + } - /** - * Delete an announcement comment reaction - * @returns void - * @throws ApiError - */ - public announcementCommentReactionDelete({ - channelId, - announcementId, - announcementCommentId, - emoteId, - }: { - /** - * Channel ID where the announcement comment exists - */ - channelId: string; - announcementId: string; - announcementCommentId: number; - /** - * Emote ID to apply - */ - 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, - }, - }); - } + /** + * Delete an announcement comment reaction + * @returns void + * @throws ApiError + */ + public announcementCommentReactionDelete({ + channelId, + announcementId, + announcementCommentId, + emoteId, + }: { + /** + * Channel ID where the announcement comment exists + */ + channelId: string; + announcementId: string; + announcementCommentId: number; + /** + * Emote ID to apply + */ + 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, + }, + }, + ); + } - /** - * Create a message reaction - * @returns void - * @throws ApiError - */ - public channelMessageReactionCreate({ channelId, messageId, emoteId }: { channelId: string; 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, - }, - }); - } + /** + * Create a message reaction + * @returns void + * @throws ApiError + */ + public channelMessageReactionCreate({ + channelId, + messageId, + emoteId, + }: { + channelId: string; + 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, + }, + }, + ); + } - /** - * Delete a message reaction - * @returns void - * @throws ApiError - */ - public channelMessageReactionDelete({ channelId, messageId, emoteId, userId }: { channelId: string; messageId: string; emoteId: number; 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, - }, - }); - } + /** + * Delete a message reaction + * @returns void + * @throws ApiError + */ + public channelMessageReactionDelete({ + channelId, + messageId, + emoteId, + userId, + }: { + channelId: string; + messageId: string; + emoteId: number; + 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, + }, + }, + ); + } - /** - * Bulk delete a message's reactions - * @returns void - * @throws ApiError - */ - public channelMessageReactionDeleteMany({ channelId, messageId, emoteId }: { channelId: string; 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, - }, - }); - } + /** + * Bulk delete a message's reactions + * @returns void + * @throws ApiError + */ + public channelMessageReactionDeleteMany({ + channelId, + messageId, + emoteId, + }: { + channelId: string; + 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, + }, + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/RoleMembershipService.ts b/packages/api/lib/generated/router/services/RoleMembershipService.ts index 3be02a9a..4c7728ce 100644 --- a/packages/api/lib/generated/router/services/RoleMembershipService.ts +++ b/packages/api/lib/generated/router/services/RoleMembershipService.ts @@ -1,103 +1,117 @@ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; /* generated using openapi-typescript-codegen -- do no edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class RoleMembershipService { - constructor(public readonly httpRequest: BaseHttpRequest) {} + constructor( + public readonly httpRequest: BaseHttpRequest, + ) {} - /** - * Assign role to member - * @returns void - * @throws ApiError - */ - public roleMembershipCreate({ - serverId, - userId, - roleId, - }: { - serverId: string; - /** - * The ID of the member that the role should be assigned to - */ - 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, - }, - }); - } + /** + * Assign role to member + * @returns void + * @throws ApiError + */ + public roleMembershipCreate({ + serverId, + userId, + roleId, + }: { + serverId: string; + /** + * The ID of the member that the role should be assigned to + */ + 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, + }, + }, + ); + } - /** - * Remove role from member - * @returns void - * @throws ApiError - */ - public roleMembershipDelete({ - serverId, - userId, - roleId, - }: { - serverId: string; - /** - * The ID of the member that the role should be removed from - */ - 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, - }, - }); - } + /** + * Remove role from member + * @returns void + * @throws ApiError + */ + public roleMembershipDelete({ + serverId, + userId, + roleId, + }: { + serverId: string; + /** + * The ID of the member that the role should be removed from + */ + 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, + }, + }, + ); + } - /** - * Get member roles - * Get a list of the roles assigned to a member - * @returns any Success - * @throws ApiError - */ - public roleMembershipReadMany({ - serverId, - userId, - }: { - serverId: string; - /** - * The ID of the member to obtain roles from - */ - 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, - }, - }); - } + /** + * Get member roles + * Get a list of the roles assigned to a member + * @returns any Success + * @throws ApiError + */ + public roleMembershipReadMany({ + serverId, + userId, + }: { + serverId: string; + /** + * The ID of the member to obtain roles from + */ + 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, + }, + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/RolesService.ts b/packages/api/lib/generated/router/services/RolesService.ts index a15e5cb1..c6b31419 100644 --- a/packages/api/lib/generated/router/services/RolesService.ts +++ b/packages/api/lib/generated/router/services/RolesService.ts @@ -4,319 +4,356 @@ /* eslint-disable */ import type { Role } from "../models/Role"; -import type { CancelablePromise } from "../core/CancelablePromise"; import type { BaseHttpRequest } from "../core/BaseHttpRequest"; +import type { CancelablePromise } from "../core/CancelablePromise"; export class RolesService { - constructor(public readonly httpRequest: BaseHttpRequest) {} + 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, - }, - }); - } + /** + * 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, - }, - }); - } + /** + * 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 - * @returns any Success - * @throws ApiError - */ - public roleUpdate({ - serverId, - roleId, - requestBody, - }: { - serverId: string; - roleId: number; - requestBody: { - /** - * The role's name - */ - name?: string; - /** - * If set, the role will be displayed separately in the channel member list - */ - isDisplayedSeparately?: boolean; - /** - * If set, this roll will be self assigned - */ - isSelfAssignable?: boolean; - /** - * If set, this role can be mentioned - */ - isMentionable?: boolean; - /** - * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section - */ - 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 - */ - colors?: Array; - }; - }): CancelablePromise<{ - role: Role; - }> { - return this.httpRequest.request({ - method: "PATCH", - url: "/servers/{serverId}/roles/{roleId}", - path: { - serverId: serverId, - roleId: roleId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a role + * @returns any Success + * @throws ApiError + */ + public roleUpdate({ + serverId, + roleId, + requestBody, + }: { + serverId: string; + roleId: number; + requestBody: { + /** + * The role's name + */ + name?: string; + /** + * If set, the role will be displayed separately in the channel member list + */ + isDisplayedSeparately?: boolean; + /** + * If set, this roll will be self assigned + */ + isSelfAssignable?: boolean; + /** + * If set, this role can be mentioned + */ + isMentionable?: boolean; + /** + * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section + */ + 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 + */ + colors?: Array; + }; + }): CancelablePromise<{ + role: Role; + }> { + return this.httpRequest.request( + { + method: "PATCH", + url: "/servers/{serverId}/roles/{roleId}", + path: { + serverId: serverId, + roleId: roleId, + }, + body: requestBody, + mediaType: "application/json", + }, + ); + } - /** - * Get roles - * @returns any Success - * @throws ApiError - */ - public roleReadMany({ serverId }: { serverId: string }): CancelablePromise<{ - roles: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/roles", - path: { - serverId: serverId, - }, - }); - } + /** + * Get roles + * @returns any Success + * @throws ApiError + */ + public roleReadMany({ + serverId, + }: { + serverId: string; + }): CancelablePromise<{ + roles: Array; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/servers/{serverId}/roles", + path: { + serverId: serverId, + }, + }, + ); + } - /** - * Create a role - * @returns any Success - * @throws ApiError - */ - public roleCreate({ - serverId, - requestBody, - }: { - serverId: string; - requestBody: { - /** - * The role's name - */ - name: string; - /** - * If set, the role will be displayed separately in the channel member list - */ - isDisplayedSeparately?: boolean; - /** - * If set, this roll will be self assigned - */ - isSelfAssignable?: boolean; - /** - * If set, this role can be mentioned - */ - isMentionable?: boolean; - /** - * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section - */ - 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 - */ - colors?: Array; - }; - }): CancelablePromise<{ - role: Role; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/servers/{serverId}/roles", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a role + * @returns any Success + * @throws ApiError + */ + public roleCreate({ + serverId, + requestBody, + }: { + serverId: string; + requestBody: { + /** + * The role's name + */ + name: string; + /** + * If set, the role will be displayed separately in the channel member list + */ + isDisplayedSeparately?: boolean; + /** + * If set, this roll will be self assigned + */ + isSelfAssignable?: boolean; + /** + * If set, this role can be mentioned + */ + isMentionable?: boolean; + /** + * Permissions must be a collection of valid permissions as defined in the [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) section + */ + 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 + */ + colors?: Array; + }; + }): CancelablePromise<{ + role: Role; + }> { + return this.httpRequest.request( + { + method: "POST", + url: "/servers/{serverId}/roles", + path: { + serverId: serverId, + }, + body: requestBody, + mediaType: "application/json", + }, + ); + } - /** - * Update a role permission - * @returns any Success - * @throws ApiError - */ - public rolePermissionUpdate({ - serverId, - roleId, - requestBody, - }: { - serverId: string; - roleId: number; - requestBody: { - /** - * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true` or `false` values. - */ - 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", - }); - } + /** + * Update a role permission + * @returns any Success + * @throws ApiError + */ + public rolePermissionUpdate({ + serverId, + roleId, + requestBody, + }: { + serverId: string; + roleId: number; + requestBody: { + /** + * A JSON object of [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) with `true` or `false` values. + */ + permissions: Record< + string, + any + >; + }; + }): 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", + }, + ); + } - /** - * 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. - * @returns any Success - * @throws ApiError - */ - public serverMemberPermissionsRead({ - serverId, - userId, - ids, - }: { - serverId: string; - userId: string | "@me"; - /** - * A queryString array of `ids[]` representing [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) - */ - ids?: Array< - | "CanCreateTopics" - | "CanCreateTopicReplies" - | "CanDeleteTopics" - | "CanStickyTopics" - | "CanLockTopics" - | "CanManageEmotes" - | "CanViewFormResponses" - | "CanUpdateListItems" - | "CanManageServerXp" - | "CanCreateThreads" - | "CanCreateThreadMessages" - | "CanManageThreads" - | "CanCreateAnnouncements" - | "CanUpdateServer" - | "CanManageRoles" - | "CanInviteMembers" - | "CanKickMembers" - | "CanManageGroups" - | "CanManageChannels" - | "CanManageWebhooks" - | "CanMentionEveryone" - | "CanModerateChannels" - | "CanBypassSlowMode" - | "CanReadApplications" - | "CanApproveApplications" - | "CanEditApplicationForm" - | "CanIndicateLfmInterest" - | "CanModifyLfmStatus" - | "CanReadAnnouncements" - | "CanManageAnnouncements" - | "CanReadChats" - | "CanCreateChats" - | "CanUploadChatMedia" - | "CanCreatePrivateMessages" - | "CanManageChats" - | "CanReadEvents" - | "CanCreateEvents" - | "CanEditEvents" - | "CanDeleteEvents" - | "CanEditEventRsvps" - | "CanReadForums" - | "CanReadDocs" - | "CanCreateDocs" - | "CanEditDocs" - | "CanDeleteDocs" - | "CanReadMedia" - | "CanAddMedia" - | "CanEditMedia" - | "CanDeleteMedia" - | "CanListenVoice" - | "CanAddVoice" - | "CanManageVoiceGroups" - | "CanAssignVoiceGroup" - | "CanBroadcastVoice" - | "CanDirectVoice" - | "CanPrioritizeVoice" - | "CanUseVoiceActivity" - | "CanMuteMembers" - | "CanDeafenMembers" - | "CanSendVoiceMessages" - | "CanCreateScrims" - | "CanManageTournaments" - | "CanRegisterForTournaments" - | "CanChangeNickname" - | "CanManageNicknames" - | "CanViewPollResponses" - | "CanReadListItems" - | "CanCreateListItems" - | "CanDeleteListItems" - | "CanCompleteListItems" - | "CanReorderListItems" - | "CanViewBracket" - | "CanReportScores" - | "CanReadSchedules" - | "CanCreateSchedule" - | "CanDeleteSchedule" - | "CanManageBots" - | "CanReadStreams" - | "CanJoinStreamVoice" - | "CanCreateStreams" - | "CanSendStreamMessages" - | "CanAddStreamVoice" - | "CanUseVoiceActivityInStream" - | "CanReceiveAllSocketEvents" - >; - }): 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, - }, - }); - } + /** + * 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. + * @returns any Success + * @throws ApiError + */ + public serverMemberPermissionsRead({ + serverId, + userId, + ids, + }: { + serverId: string; + userId: + | string + | "@me"; + /** + * A queryString array of `ids[]` representing [Enums/Permissions](https://www.guilded.gg/docs/api/Permissions) + */ + ids?: Array< + | "CanCreateTopics" + | "CanCreateTopicReplies" + | "CanDeleteTopics" + | "CanStickyTopics" + | "CanLockTopics" + | "CanManageEmotes" + | "CanViewFormResponses" + | "CanUpdateListItems" + | "CanManageServerXp" + | "CanCreateThreads" + | "CanCreateThreadMessages" + | "CanManageThreads" + | "CanCreateAnnouncements" + | "CanUpdateServer" + | "CanManageRoles" + | "CanInviteMembers" + | "CanKickMembers" + | "CanManageGroups" + | "CanManageChannels" + | "CanManageWebhooks" + | "CanMentionEveryone" + | "CanModerateChannels" + | "CanBypassSlowMode" + | "CanReadApplications" + | "CanApproveApplications" + | "CanEditApplicationForm" + | "CanIndicateLfmInterest" + | "CanModifyLfmStatus" + | "CanReadAnnouncements" + | "CanManageAnnouncements" + | "CanReadChats" + | "CanCreateChats" + | "CanUploadChatMedia" + | "CanCreatePrivateMessages" + | "CanManageChats" + | "CanReadEvents" + | "CanCreateEvents" + | "CanEditEvents" + | "CanDeleteEvents" + | "CanEditEventRsvps" + | "CanReadForums" + | "CanReadDocs" + | "CanCreateDocs" + | "CanEditDocs" + | "CanDeleteDocs" + | "CanReadMedia" + | "CanAddMedia" + | "CanEditMedia" + | "CanDeleteMedia" + | "CanListenVoice" + | "CanAddVoice" + | "CanManageVoiceGroups" + | "CanAssignVoiceGroup" + | "CanBroadcastVoice" + | "CanDirectVoice" + | "CanPrioritizeVoice" + | "CanUseVoiceActivity" + | "CanMuteMembers" + | "CanDeafenMembers" + | "CanSendVoiceMessages" + | "CanCreateScrims" + | "CanManageTournaments" + | "CanRegisterForTournaments" + | "CanChangeNickname" + | "CanManageNicknames" + | "CanViewPollResponses" + | "CanReadListItems" + | "CanCreateListItems" + | "CanDeleteListItems" + | "CanCompleteListItems" + | "CanReorderListItems" + | "CanViewBracket" + | "CanReportScores" + | "CanReadSchedules" + | "CanCreateSchedule" + | "CanDeleteSchedule" + | "CanManageBots" + | "CanReadStreams" + | "CanJoinStreamVoice" + | "CanCreateStreams" + | "CanSendStreamMessages" + | "CanAddStreamVoice" + | "CanUseVoiceActivityInStream" + | "CanReceiveAllSocketEvents" + >; + }): 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, + }, + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/ServerSubscriptionService.ts b/packages/api/lib/generated/router/services/ServerSubscriptionService.ts index 909084f7..034b200e 100644 --- a/packages/api/lib/generated/router/services/ServerSubscriptionService.ts +++ b/packages/api/lib/generated/router/services/ServerSubscriptionService.ts @@ -4,44 +4,63 @@ /* eslint-disable */ import type { ServerSubscriptionTier } from "../models/ServerSubscriptionTier"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public serverSubscriptionTierRead({ serverId, serverSubscriptionTierType }: { serverId: string; serverSubscriptionTierType: "Gold" | "Silver" | "Copper" }): CancelablePromise<{ - serverSubscriptionTier: ServerSubscriptionTier; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/subscriptions/tiers/{serverSubscriptionTierType}", - path: { - serverId: serverId, - serverSubscriptionTierType: serverSubscriptionTierType, - }, - }); - } + /** + * Get a server subscription tier + * @returns any Success + * @throws ApiError + */ + public serverSubscriptionTierRead({ + serverId, + serverSubscriptionTierType, + }: { + serverId: string; + serverSubscriptionTierType: + | "Gold" + | "Silver" + | "Copper"; + }): CancelablePromise<{ + serverSubscriptionTier: ServerSubscriptionTier; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/servers/{serverId}/subscriptions/tiers/{serverSubscriptionTierType}", + path: { + serverId: serverId, + serverSubscriptionTierType: serverSubscriptionTierType, + }, + }, + ); + } - /** - * Get server subscription tiers - * @returns any Success - * @throws ApiError - */ - public serverSubscriptionTierReadMany({ serverId }: { serverId: string }): CancelablePromise<{ - serverSubscriptionTiers: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/subscriptions/tiers", - path: { - serverId: serverId, - }, - }); - } + /** + * Get server subscription tiers + * @returns any Success + * @throws ApiError + */ + public serverSubscriptionTierReadMany({ + serverId, + }: { + serverId: string; + }): CancelablePromise<{ + serverSubscriptionTiers: Array; + }> { + 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 5cb1a9e9..6a7c0d14 100644 --- a/packages/api/lib/generated/router/services/ServerXpService.ts +++ b/packages/api/lib/generated/router/services/ServerXpService.ts @@ -1,193 +1,221 @@ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; /* generated using openapi-typescript-codegen -- do no edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; export class ServerXpService { - constructor(public readonly httpRequest: BaseHttpRequest) {} + constructor( + public readonly httpRequest: BaseHttpRequest, + ) {} - /** - * Award XP to a member - * @returns any Success - * @throws ApiError - */ - public serverXpForUserCreate({ - serverId, - userId, - requestBody, - }: { - serverId: string; - /** - * Member ID to award XP to - */ - userId: string | "@me"; - requestBody: { - /** - * The amount of XP to award - */ - amount: number; - }; - }): CancelablePromise<{ - /** - * The total XP after this operation - */ - total: number; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/servers/{serverId}/members/{userId}/xp", - path: { - serverId: serverId, - userId: userId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Award XP to a member + * @returns any Success + * @throws ApiError + */ + public serverXpForUserCreate({ + serverId, + userId, + requestBody, + }: { + serverId: string; + /** + * Member ID to award XP to + */ + userId: + | string + | "@me"; + requestBody: { + /** + * The amount of XP to award + */ + amount: number; + }; + }): CancelablePromise<{ + /** + * The total XP after this operation + */ + total: number; + }> { + 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 - * @throws ApiError - */ - public serverXpForUserUpdate({ - serverId, - userId, - requestBody, - }: { - serverId: string; - /** - * Member ID to set XP to - */ - userId: string | "@me"; - requestBody: { - /** - * The total XP to set on the user - */ - total: number; - }; - }): CancelablePromise<{ - /** - * The total XP after this operation - */ - total: number; - }> { - return this.httpRequest.request({ - method: "PUT", - url: "/servers/{serverId}/members/{userId}/xp", - path: { - serverId: serverId, - userId: userId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Set a member's XP + * @returns any Success + * @throws ApiError + */ + public serverXpForUserUpdate({ + serverId, + userId, + requestBody, + }: { + serverId: string; + /** + * Member ID to set XP to + */ + userId: + | string + | "@me"; + requestBody: { + /** + * The total XP to set on the user + */ + total: number; + }; + }): CancelablePromise<{ + /** + * The total XP after this operation + */ + total: number; + }> { + 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 - * @returns any Success - * @throws ApiError - */ - public serverXpForUserCreateMany({ - serverId, - requestBody, - }: { - serverId: string; - requestBody: { - /** - * The amount of XP to award - */ - 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; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/servers/{serverId}/xp", - path: { - serverId: serverId, - }, - 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 + * @returns any Success + * @throws ApiError + */ + public serverXpForUserCreateMany({ + serverId, + requestBody, + }: { + serverId: string; + requestBody: { + /** + * The amount of XP to award + */ + amount: number; + userIds: Array< + | string + | "@me" + >; + }; + }): 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 + >; + }> { + 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 - * @returns any Success - * @throws ApiError - */ - public serverXpForUserUpdateMany({ - serverId, - requestBody, - }: { - serverId: string; - requestBody: { - /** - * The total XP to set on each user - */ - total?: 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; - }> { - return this.httpRequest.request({ - method: "PUT", - 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 + * @returns any Success + * @throws ApiError + */ + public serverXpForUserUpdateMany({ + serverId, + requestBody, + }: { + serverId: string; + requestBody: { + /** + * The total XP to set on each user + */ + total?: number; + userIds: Array< + | string + | "@me" + >; + }; + }): 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 + >; + }> { + 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. - * @returns void - * @throws ApiError - */ - public serverXpForRoleCreate({ - serverId, - roleId, - requestBody, - }: { - serverId: string; - /** - * Role ID to award XP to - */ - roleId: number; - requestBody: { - /** - * The amount of XP to award - */ - 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", - }); - } + /** + * Award XP to role + * Award XP to all members with a particular role. + * @returns void + * @throws ApiError + */ + public serverXpForRoleCreate({ + serverId, + roleId, + requestBody, + }: { + serverId: string; + /** + * Role ID to award XP to + */ + roleId: number; + requestBody: { + /** + * The amount of XP to award + */ + 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", + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/ServersService.ts b/packages/api/lib/generated/router/services/ServersService.ts index 66e0ca99..1fc76d46 100644 --- a/packages/api/lib/generated/router/services/ServersService.ts +++ b/packages/api/lib/generated/router/services/ServersService.ts @@ -4,27 +4,35 @@ /* eslint-disable */ import type { Server } from "../models/Server"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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. - * @returns any Success - * @throws ApiError - */ - public serverRead({ serverId }: { serverId: string }): CancelablePromise<{ - server: Server; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}", - path: { - serverId: serverId, - }, - }); - } + /** + * 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. + * @returns any Success + * @throws ApiError + */ + public serverRead({ + serverId, + }: { + serverId: string; + }): CancelablePromise<{ + server: Server; + }> { + 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 59c50a5e..b2361563 100644 --- a/packages/api/lib/generated/router/services/SocialLinksService.ts +++ b/packages/api/lib/generated/router/services/SocialLinksService.ts @@ -4,39 +4,58 @@ /* eslint-disable */ import type { SocialLink } from "../models/SocialLink"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @throws ApiError - */ - public memberSocialLinkRead({ - serverId, - userId, - socialLinkType, - }: { - serverId: string; - userId: string | "@me"; - /** - * The type of social link to retrieve - */ - 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, - }, - }); - } + /** + * Retrieves a member's public social links + * @returns any Success + * @throws ApiError + */ + public memberSocialLinkRead({ + serverId, + userId, + socialLinkType, + }: { + serverId: string; + userId: + | string + | "@me"; + /** + * The type of social link to retrieve + */ + 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, + }, + }, + ); + } } diff --git a/packages/api/lib/generated/router/services/UserStatusService.ts b/packages/api/lib/generated/router/services/UserStatusService.ts index 68417e77..d499eac4 100644 --- a/packages/api/lib/generated/router/services/UserStatusService.ts +++ b/packages/api/lib/generated/router/services/UserStatusService.ts @@ -1,63 +1,77 @@ +import type { BaseHttpRequest } from "../core/BaseHttpRequest"; /* generated using openapi-typescript-codegen -- do no edit */ /* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from "../core/CancelablePromise"; -import type { BaseHttpRequest } from "../core/BaseHttpRequest"; 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 - * @returns void - * @throws ApiError - */ - public userStatusCreate({ - userId, - requestBody, - }: { - userId: string | "@me"; - requestBody: { - /** - * The content of the user status. The supported markdown for this content only includes reactions and plaintext for now - */ - content?: string; - /** - * Emote ID to apply - */ - emoteId: number; - /** - * An ISO 8601 timestamp that will be used to indicate when an expiration occurs. Expiration usually will not occur exactly at this time. Bot logic should not expect a guarantee of timing as a result, but can expect that it'll happen very shortly afterwards - */ - expiresAt?: string; - }; - }): CancelablePromise { - return this.httpRequest.request({ - method: "PUT", - url: "/users/{userId}/status", - path: { - userId: userId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * 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 + * @returns void + * @throws ApiError + */ + public userStatusCreate({ + userId, + requestBody, + }: { + userId: + | string + | "@me"; + requestBody: { + /** + * The content of the user status. The supported markdown for this content only includes reactions and plaintext for now + */ + content?: string; + /** + * Emote ID to apply + */ + emoteId: number; + /** + * An ISO 8601 timestamp that will be used to indicate when an expiration occurs. Expiration usually will not occur exactly at this time. Bot logic should not expect a guarantee of timing as a result, but can expect that it'll happen very shortly afterwards + */ + expiresAt?: string; + }; + }): CancelablePromise { + 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 - * @returns void - * @throws ApiError - */ - public userStatusDelete({ userId }: { userId: string | "@me" }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/users/{userId}/status", - path: { - userId: userId, - }, - }); - } + /** + * Delete your status + * **Note** - at this time, you can only set a status on your own user + * @returns void + * @throws ApiError + */ + public userStatusDelete({ + userId, + }: { + userId: + | string + | "@me"; + }): CancelablePromise { + 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 997fab0a..8b182118 100644 --- a/packages/api/lib/generated/router/services/UsersService.ts +++ b/packages/api/lib/generated/router/services/UsersService.ts @@ -5,45 +5,63 @@ import type { Server } from "../models/Server"; import type { User } from "../models/User"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @returns any Success - * @throws ApiError - */ - public userRead({ userId }: { userId: string | "@me" }): CancelablePromise<{ - user: User; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/users/{userId}", - path: { - userId: userId, - }, - }); - } + /** + * Get a user + * **Note** - at this time, you can only retrieve your own user + * @returns any Success + * @throws ApiError + */ + public userRead({ + userId, + }: { + userId: + | string + | "@me"; + }): CancelablePromise<{ + user: User; + }> { + 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 - * @returns any Success - * @throws ApiError - */ - public userServerReadMany({ userId }: { userId: string | "@me" }): CancelablePromise<{ - servers: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/users/{userId}/servers", - path: { - userId: userId, - }, - }); - } + /** + * Get a users servers + * **Note** - at this time, you can only retrieve your own servers + * @returns any Success + * @throws ApiError + */ + public userServerReadMany({ + userId, + }: { + userId: + | string + | "@me"; + }): CancelablePromise<{ + servers: Array; + }> { + 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 7bd92f8b..b9379c0c 100644 --- a/packages/api/lib/generated/router/services/WebhookService.ts +++ b/packages/api/lib/generated/router/services/WebhookService.ts @@ -4,144 +4,168 @@ /* eslint-disable */ import type { Webhook } from "../models/Webhook"; -import type { CancelablePromise } from "../core/CancelablePromise"; 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 - * @returns any Success - * @throws ApiError - */ - public webhookCreate({ - serverId, - requestBody, - }: { - serverId: string; - requestBody: { - /** - * The name of the webhook - */ - name: string; - /** - * Channel ID to create the webhook in - */ - channelId: string; - }; - }): CancelablePromise<{ - webhook: Webhook; - }> { - return this.httpRequest.request({ - method: "POST", - url: "/servers/{serverId}/webhooks", - path: { - serverId: serverId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Create a webhook + * @returns any Success + * @throws ApiError + */ + public webhookCreate({ + serverId, + requestBody, + }: { + serverId: string; + requestBody: { + /** + * The name of the webhook + */ + name: string; + /** + * Channel ID to create the webhook in + */ + channelId: string; + }; + }): CancelablePromise<{ + webhook: Webhook; + }> { + 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. - * @returns any Success - * @throws ApiError - */ - public webhookReadMany({ - serverId, - channelId, - }: { - serverId: string; - /** - * ID of the channel you want to filter for webhooks - */ - channelId: string; - }): CancelablePromise<{ - webhooks: Array; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/webhooks", - path: { - serverId: serverId, - }, - query: { - channelId: channelId, - }, - }); - } + /** + * Get a server's webhooks + * Get a list of webhooks from a server. + * @returns any Success + * @throws ApiError + */ + public webhookReadMany({ + serverId, + channelId, + }: { + serverId: string; + /** + * ID of the channel you want to filter for webhooks + */ + channelId: string; + }): CancelablePromise<{ + webhooks: Array; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/servers/{serverId}/webhooks", + path: { + serverId: serverId, + }, + query: { + channelId: channelId, + }, + }, + ); + } - /** - * Get a server's webhook - * @returns any Success - * @throws ApiError - */ - public webhookRead({ serverId, webhookId }: { serverId: string; webhookId: string }): CancelablePromise<{ - webhook: Webhook; - }> { - return this.httpRequest.request({ - method: "GET", - url: "/servers/{serverId}/webhooks/{webhookId}", - path: { - serverId: serverId, - webhookId: webhookId, - }, - }); - } + /** + * Get a server's webhook + * @returns any Success + * @throws ApiError + */ + public webhookRead({ + serverId, + webhookId, + }: { + serverId: string; + webhookId: string; + }): CancelablePromise<{ + webhook: Webhook; + }> { + return this.httpRequest.request( + { + method: "GET", + url: "/servers/{serverId}/webhooks/{webhookId}", + path: { + serverId: serverId, + webhookId: webhookId, + }, + }, + ); + } - /** - * Update a webhook - * @returns any Success - * @throws ApiError - */ - public webhookUpdate({ - serverId, - webhookId, - requestBody, - }: { - serverId: string; - webhookId: string; - requestBody: { - /** - * The name of the webhook - */ - name: string; - /** - * The ID of the channel - */ - channelId?: string; - }; - }): CancelablePromise<{ - webhook: Webhook; - }> { - return this.httpRequest.request({ - method: "PUT", - url: "/servers/{serverId}/webhooks/{webhookId}", - path: { - serverId: serverId, - webhookId: webhookId, - }, - body: requestBody, - mediaType: "application/json", - }); - } + /** + * Update a webhook + * @returns any Success + * @throws ApiError + */ + public webhookUpdate({ + serverId, + webhookId, + requestBody, + }: { + serverId: string; + webhookId: string; + requestBody: { + /** + * The name of the webhook + */ + name: string; + /** + * The ID of the channel + */ + channelId?: string; + }; + }): CancelablePromise<{ + webhook: Webhook; + }> { + 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 - * @throws ApiError - */ - public webhookDelete({ serverId, webhookId }: { serverId: string; webhookId: string }): CancelablePromise { - return this.httpRequest.request({ - method: "DELETE", - url: "/servers/{serverId}/webhooks/{webhookId}", - path: { - serverId: serverId, - webhookId: webhookId, - }, - }); - } + /** + * Delete a server webhook + * @returns void + * @throws ApiError + */ + public webhookDelete({ + serverId, + webhookId, + }: { + serverId: string; + webhookId: string; + }): CancelablePromise { + return this.httpRequest.request( + { + method: "DELETE", + url: "/servers/{serverId}/webhooks/{webhookId}", + path: { + serverId: serverId, + webhookId: webhookId, + }, + }, + ); + } } diff --git a/packages/api/lib/rest/RestManager.ts b/packages/api/lib/rest/RestManager.ts index a56c110f..08d07a5a 100644 --- a/packages/api/lib/rest/RestManager.ts +++ b/packages/api/lib/rest/RestManager.ts @@ -13,7 +13,7 @@ import type { RestOptions } from "./typings"; let HTTPFetch = globalThis.fetch; if (!HTTPFetch) { - HTTPFetch = require("node-fetch"); + HTTPFetch = require("node-fetch"); } const packageDetails = require("../../package.json"); @@ -21,248 +21,260 @@ const packageDetails = require("../../package.json"); const sleep = async (ms: number): Promise => new Promise((resolve) => setTimeout(resolve, ms)); export type RequestOptions = { - body?: BodyInit | Buffer; - headers: Record; - method: HTTPMethods; - url: string; + body?: BodyInit | Buffer; + headers: Record; + method: HTTPMethods; + url: string; }; export type ResponseDetails = { - body: JSONB | string; - headers: Record; - status: number; + body: JSONB | string; + headers: Record; + status: number; }; export type RestManagerEvents = { - request(request: RequestOptions): void; - error(req: RequestOptions, res: ResponseDetails): void; - ratelimit(ratelimit: RequestOptions & { responseHeaders: Record }): void; + request(request: RequestOptions): void; + error(req: RequestOptions, res: ResponseDetails): void; + ratelimit( + ratelimit: RequestOptions & { + responseHeaders: Record; + }, + ): void; }; export class RestManager { - /** - * The bot token to be used for making requests. - */ - token = this.options.token; - - /** - * The version of the API to be used for making requests. By default, this will use the latest version that the library supports. - */ - version = this.options.version ?? 1; - - /** - * The proxy url if it was set. - */ - proxyURL = this.options.proxyURL; - - /** - * Logging emitter - */ - readonly emitter = new EventEmitter() as TypedEmitter; - - /** - * Utility router - */ - readonly router = new GuildedRouter(this); - - constructor(public readonly options: RestOptions) {} - - /** - * The base url to send the request to. - */ - get baseURL(): string { - return this.proxyURL ?? `https://www.guilded.gg/api/v${this.version}`; - } - - /** - * Generate obfuscated token. It replaces every char in a non-even index with X. I'm not very creative. - */ - get obfuscatedToken(): string { - return this.token - .split("") - .map(() => "X") - .join(""); - } - - public async make( - data: MakeOptions, - authenticated = true, - retryCount = 0, - { returnAsText = false, bodyIsJSON = true }: { bodyIsJSON?: boolean; returnAsText?: boolean } = {}, - ): Promise<[Response, Promise]> { - const headers: HeadersInit = {}; - // If this request requires authentication, add the Bearer token as a header. - if (authenticated) headers.Authorization = `Bearer ${this.token}`; - - // Append stringified query params to the URL. This doesn't append the base URL yet. - const queryAppendedURL = data.query ? `${data.path}?${stringify(data.query)}` : data.path; - - // All options to be sent with the request - const requestOptions: RequestOptions = { - url: this.baseURL + queryAppendedURL, - headers: { - // This gets changed later on if the request is formdata. - "content-type": "application/json", - // Used for logging on Guilded end. - "User-Agent": `@guildedjs-rest/${packageDetails.version} Node.js ${process.version}`, - // Spread the other headers like authentication. - ...headers, - // Spread any additional headers passed from the method. - ...data.headers, - }, - method: data.method, - }; - - // This mostly only applies to Webhook routes that allow you to attach files. - if (data.body instanceof FormData) { - // Turn the formdata into a buffer. - requestOptions.body = data.body.getBuffer(); - // Merge the formdata generated boundary headers with the request headers. This will replace things like content-type and other conflicting headers. - Object.assign(requestOptions.headers, { ...data.body.getHeaders() }); - } else if (bodyIsJSON) { - // Turn JSON data into string. - requestOptions.body = JSON.stringify(data.body); - } - - this.emitter.emit("request", requestOptions); - // The reason we're hoisting the variable like this is so that we can have error handling for the underlying fetch request. - let response; - try { - response = await HTTPFetch(requestOptions.url, requestOptions); - } catch (error: any) { - throw new Error(`Error while making API call, ${error.message.toString()}`); - } - - if (!response.ok) { - const mapHeadersToObj: Record = {}; - // This is done because Headers isn't stringifiable or iterable without the use of the forEach method. - // eslint-disable-next-line unicorn/no-array-for-each - response.headers.forEach((v, k) => { - mapHeadersToObj[k] = v; - }); - - // Occurs when ratelimited. - if (response.status === 429) { - const retryAfterTime = Number(response.headers.get("Retry-After") ?? 35); - - // Check if request has failed 3+ times. - if (retryCount >= (this.options?.maxRatelimitRetryLimit ?? 3)) { - throw new Error("MAX REQUEST RATELIMIT RETRY LIMIT REACHED."); - } - - this.emitter.emit("ratelimit", { - ...requestOptions, - responseHeaders: mapHeadersToObj, - }); - // Make the thread wait the amount of time specified in the Retry-After before retrying request. - await sleep(retryAfterTime * 1_000); - return this.make(data, authenticated, ++retryCount); - } - - // Parse error response as text. The reason this isn't in the try/catch statement is because of the HEAD method not returning json. - const rawResponse: string = await response.text().catch(() => "Could not read underlying response body buffer"); // this shouldn't happen - let parsedResponse: any | string = rawResponse; - let errorMessage: string = parsedResponse; - - if (requestOptions.method !== "HEAD" && response.status !== 204) { - // json body won't be returned in these cases, so don't attempt to parse as json - try { - parsedResponse = JSON.parse(rawResponse); - errorMessage = parsedResponse.message; - } catch { - // response was still malformed somehow; just allow it to be reported as text - } - } - - // Details response object for error reporting. - const responseDetails: ResponseDetails = { - status: response.status, - headers: mapHeadersToObj, - body: parsedResponse, - }; - - // obfuscate token in requestOptions for logging purposes. - requestOptions.headers.Authorization = "[OBFUSCATED]"; - - // parse stringified JSON bodies back to JSON (added bonus of being able to check here if anything went wrong during the stringifying with any toJSON overrides) - if (bodyIsJSON && typeof requestOptions.body === "string") requestOptions.body = JSON.parse(requestOptions.body); - - // this.emitter.emit("error", requestOptions, responseDetails); - // Occurs when bot has a permission missing - if (responseDetails.status === 403) { - throw new PermissionsError(errorMessage, requestOptions, responseDetails); - } - - throw new GuildedAPIError(errorMessage, requestOptions, responseDetails); - } - - return [response, returnAsText ? response.text() : (response.json().catch(() => ({})) as Promise)]; - } - - public async get(path: string, query?: Q, authenticated = true): Promise { - return this.make( - { - method: "GET", - path, - query, - }, - authenticated, - ).then(async (x) => x[1] as Promise); - } - - public async post(path: string, body?: B, authenticated = true): Promise { - return this.make( - { - body, - method: "POST", - path, - }, - authenticated, - ).then(async (x) => x[1] as Promise); - } - - public async delete(path: string, body?: B, authenticated = true): Promise { - return this.make( - { - body, - method: "DELETE", - path, - }, - authenticated, - ).then(async (x) => x[1] as Promise); - } - - public async patch(path: string, body: B, authenticated = true): Promise { - return this.make( - { - body, - method: "PATCH", - path, - }, - authenticated, - ).then(async (x) => x[1] as Promise); - } - - public async put(path: string, body?: B, authenticated = true): Promise { - return this.make( - { - body, - method: "PUT", - path, - }, - authenticated, - ).then(async (x) => x[1] as Promise); - } + /** + * The bot token to be used for making requests. + */ + token = this.options.token; + + /** + * The version of the API to be used for making requests. By default, this will use the latest version that the library supports. + */ + version = this.options.version ?? 1; + + /** + * The proxy url if it was set. + */ + proxyURL = this.options.proxyURL; + + /** + * Logging emitter + */ + readonly emitter = new EventEmitter() as TypedEmitter; + + /** + * Utility router + */ + readonly router = new GuildedRouter(this); + + constructor(public readonly options: RestOptions) {} + + /** + * The base url to send the request to. + */ + get baseURL(): string { + return this.proxyURL ?? `https://www.guilded.gg/api/v${this.version}`; + } + + /** + * Generate obfuscated token. It replaces every char in a non-even index with X. I'm not very creative. + */ + get obfuscatedToken(): string { + return this.token + .split("") + .map(() => "X") + .join(""); + } + + public async make( + data: MakeOptions, + authenticated = true, + retryCount = 0, + { + returnAsText = false, + bodyIsJSON = true, + }: { + bodyIsJSON?: boolean; + returnAsText?: boolean; + } = {}, + ): Promise<[Response, Promise]> { + const headers: HeadersInit = {}; + // If this request requires authentication, add the Bearer token as a header. + if (authenticated) headers.Authorization = `Bearer ${this.token}`; + + // Append stringified query params to the URL. This doesn't append the base URL yet. + const queryAppendedURL = data.query ? `${data.path}?${stringify(data.query)}` : data.path; + + // All options to be sent with the request + const requestOptions: RequestOptions = { + url: this.baseURL + queryAppendedURL, + headers: { + // This gets changed later on if the request is formdata. + "content-type": "application/json", + // Used for logging on Guilded end. + "User-Agent": `@guildedjs-rest/${packageDetails.version} Node.js ${process.version}`, + // Spread the other headers like authentication. + ...headers, + // Spread any additional headers passed from the method. + ...data.headers, + }, + method: data.method, + }; + + // This mostly only applies to Webhook routes that allow you to attach files. + if (data.body instanceof FormData) { + // Turn the formdata into a buffer. + requestOptions.body = data.body.getBuffer(); + // Merge the formdata generated boundary headers with the request headers. This will replace things like content-type and other conflicting headers. + Object.assign(requestOptions.headers, { + ...data.body.getHeaders(), + }); + } else if (bodyIsJSON) { + // Turn JSON data into string. + requestOptions.body = JSON.stringify(data.body); + } + + this.emitter.emit("request", requestOptions); + // The reason we're hoisting the variable like this is so that we can have error handling for the underlying fetch request. + let response: Response; + try { + response = await HTTPFetch(requestOptions.url, requestOptions); + } catch (error) { + throw new Error(`Error while making API call, ${(error as Error).message.toString()}`); + } + + if (!response.ok) { + const mapHeadersToObj: Record = {}; + // This is done because Headers isn't stringifiable or iterable without the use of the forEach method. + // eslint-disable-next-line unicorn/no-array-for-each + response.headers.forEach((v, k) => { + mapHeadersToObj[k] = v; + }); + + // Occurs when ratelimited. + if (response.status === 429) { + const retryAfterTime = Number(response.headers.get("Retry-After") ?? 35); + + // Check if request has failed 3+ times. + if (retryCount >= (this.options?.maxRatelimitRetryLimit ?? 3)) { + throw new Error("MAX REQUEST RATELIMIT RETRY LIMIT REACHED."); + } + + this.emitter.emit("ratelimit", { + ...requestOptions, + responseHeaders: mapHeadersToObj, + }); + // Make the thread wait the amount of time specified in the Retry-After before retrying request. + await sleep(retryAfterTime * 1_000); + return this.make(data, authenticated, ++retryCount); + } + + // Parse error response as text. The reason this isn't in the try/catch statement is because of the HEAD method not returning json. + const rawResponse: string = await response.text().catch(() => "Could not read underlying response body buffer"); // this shouldn't happen + const parsedResponse: string = rawResponse; + let errorMessage: string = parsedResponse; + + if (requestOptions.method !== "HEAD" && response.status !== 204) { + // json body won't be returned in these cases, so don't attempt to parse as json + try { + errorMessage = JSON.parse(rawResponse).message; + } catch { + // response was still malformed somehow; just allow it to be reported as text + } + } + + // Details response object for error reporting. + const responseDetails: ResponseDetails = { + status: response.status, + headers: mapHeadersToObj, + body: parsedResponse, + }; + + // obfuscate token in requestOptions for logging purposes. + requestOptions.headers.Authorization = "[OBFUSCATED]"; + + // parse stringified JSON bodies back to JSON (added bonus of being able to check here if anything went wrong during the stringifying with any toJSON overrides) + if (bodyIsJSON && typeof requestOptions.body === "string") requestOptions.body = JSON.parse(requestOptions.body); + + // this.emitter.emit("error", requestOptions, responseDetails); + // Occurs when bot has a permission missing + if (responseDetails.status === 403) { + throw new PermissionsError(errorMessage, requestOptions, responseDetails); + } + + throw new GuildedAPIError(errorMessage, requestOptions, responseDetails); + } + + return [response, returnAsText ? response.text() : (response.json().catch(() => ({})) as Promise)]; + } + + public async get(path: string, query?: Q, authenticated = true): Promise { + return this.make( + { + method: "GET", + path, + query, + }, + authenticated, + ).then(async (x) => x[1] as Promise); + } + + public async post(path: string, body?: B, authenticated = true): Promise { + return this.make( + { + body, + method: "POST", + path, + }, + authenticated, + ).then(async (x) => x[1] as Promise); + } + + public async delete(path: string, body?: B, authenticated = true): Promise { + return this.make( + { + body, + method: "DELETE", + path, + }, + authenticated, + ).then(async (x) => x[1] as Promise); + } + + public async patch(path: string, body: B, authenticated = true): Promise { + return this.make( + { + body, + method: "PATCH", + path, + }, + authenticated, + ).then(async (x) => x[1] as Promise); + } + + public async put(path: string, body?: B, authenticated = true): Promise { + return this.make( + { + body, + method: "PUT", + path, + }, + authenticated, + ).then(async (x) => x[1] as Promise); + } } export type MakeOptions = { - body?: B | FormData; - headers?: Record; - isFormData?: boolean; - method: HTTPMethods; - path: string; - query?: Q; + body?: B | FormData; + headers?: Record; + isFormData?: boolean; + method: HTTPMethods; + path: string; + query?: Q; }; +// biome-ignore lint/suspicious/noExplicitAny: export type JSONB = Record; export type HTTPMethods = "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT"; export type RequestBodyObject = JSONB | undefined; diff --git a/packages/api/lib/rest/errors/GuildedAPIError.ts b/packages/api/lib/rest/errors/GuildedAPIError.ts index 78ec1661..e100061a 100644 --- a/packages/api/lib/rest/errors/GuildedAPIError.ts +++ b/packages/api/lib/rest/errors/GuildedAPIError.ts @@ -3,7 +3,11 @@ import type { RequestOptions, ResponseDetails } from "../RestManager"; export class GuildedAPIError extends Error { - public constructor(msg: string, public readonly request: RequestOptions, public readonly response: ResponseDetails) { - super(`[GuildedAPIError:${response.status}:${request.method.toUpperCase()}] ${request.url} - ${msg}`); - } + public constructor( + msg: string, + public readonly request: RequestOptions, + public readonly response: ResponseDetails, + ) { + super(`[GuildedAPIError:${response.status}:${request.method.toUpperCase()}] ${request.url} - ${msg}`); + } } diff --git a/packages/api/lib/rest/errors/PermissionsError.ts b/packages/api/lib/rest/errors/PermissionsError.ts index 8732e1ba..ad63e09a 100644 --- a/packages/api/lib/rest/errors/PermissionsError.ts +++ b/packages/api/lib/rest/errors/PermissionsError.ts @@ -1,8 +1,4 @@ import type { RequestOptions, ResponseDetails } from "../RestManager"; import { GuildedAPIError } from "./GuildedAPIError"; -export class PermissionsError extends GuildedAPIError { - public constructor(msg: string, request: RequestOptions, response: ResponseDetails) { - super(msg, request, response); - } -} +export class PermissionsError extends GuildedAPIError {} diff --git a/packages/api/lib/rest/typings.ts b/packages/api/lib/rest/typings.ts index ade20cbf..73a2bd04 100644 --- a/packages/api/lib/rest/typings.ts +++ b/packages/api/lib/rest/typings.ts @@ -1,22 +1,22 @@ export type RestOptions = { - /** - * How many times to retry a request that's been ratelimited before failing - */ - maxRatelimitRetryLimit?: number; - /** - * The base url of the API you want to send requests to. By default, this will send it to guilded's rest API. This is meant for big bot developers who want to use a proxy rest system. - */ - proxyURL?: string; - /** - * How long to delay each request by. - */ - restOffset?: number; - /** - * The bot token to be used for making requests. - */ - token: string; - /** - * The version of the API to be used for making requests. By default, this will use the latest version that the library supports. - */ - version?: 1; + /** + * How many times to retry a request that's been ratelimited before failing + */ + maxRatelimitRetryLimit?: number; + /** + * The base url of the API you want to send requests to. By default, this will send it to guilded's rest API. This is meant for big bot developers who want to use a proxy rest system. + */ + proxyURL?: string; + /** + * How long to delay each request by. + */ + restOffset?: number; + /** + * The bot token to be used for making requests. + */ + token: string; + /** + * The version of the API to be used for making requests. By default, this will use the latest version that the library supports. + */ + version?: 1; }; diff --git a/packages/api/lib/rest/util/color.ts b/packages/api/lib/rest/util/color.ts index 07c9ba5c..021000f5 100644 --- a/packages/api/lib/rest/util/color.ts +++ b/packages/api/lib/rest/util/color.ts @@ -4,35 +4,35 @@ * Taken from https://github.com/discordjs/discord.js/blob/stable/src/util/Constants.js */ export const COLORS: { [key: string]: number } = { - AQUA: 0x1abc9c, - BLUE: 0x3498db, - DARKER_GREY: 0x7f8c8d, - DARK_AQUA: 0x11806a, - DARK_BLUE: 0x206694, - DARK_BUT_NOT_BLACK: 0x2c2f33, - DARK_GOLD: 0xc27c0e, - DARK_GREEN: 0x1f8b4c, - DARK_GREY: 0x979c9f, - DARK_NAVY: 0x2c3e50, - DARK_ORANGE: 0xa84300, - DARK_PURPLE: 0x71368a, - DARK_RED: 0x992d22, - DARK_VIVID_PINK: 0xad1457, - DEFAULT: 0x000000, - GOLD: 0xf1c40f, - GREEN: 0x2ecc71, - GREY: 0x95a5a6, - GREYPLE: 0x99aab5, - GUILDED: 0xf5c400, - LIGHT_GREY: 0xbcc0c0, - LUMINOUS_VIVID_PINK: 0xe91e63, - NAVY: 0x34495e, - NOT_QUITE_BLACK: 0x23272a, - ORANGE: 0xe67e22, - PURPLE: 0x9b59b6, - RED: 0xe74c3c, - WHITE: 0xffffff, - YELLOW: 0xffff00, + AQUA: 0x1abc9c, + BLUE: 0x3498db, + DARKER_GREY: 0x7f8c8d, + DARK_AQUA: 0x11806a, + DARK_BLUE: 0x206694, + DARK_BUT_NOT_BLACK: 0x2c2f33, + DARK_GOLD: 0xc27c0e, + DARK_GREEN: 0x1f8b4c, + DARK_GREY: 0x979c9f, + DARK_NAVY: 0x2c3e50, + DARK_ORANGE: 0xa84300, + DARK_PURPLE: 0x71368a, + DARK_RED: 0x992d22, + DARK_VIVID_PINK: 0xad1457, + DEFAULT: 0x000000, + GOLD: 0xf1c40f, + GREEN: 0x2ecc71, + GREY: 0x95a5a6, + GREYPLE: 0x99aab5, + GUILDED: 0xf5c400, + LIGHT_GREY: 0xbcc0c0, + LUMINOUS_VIVID_PINK: 0xe91e63, + NAVY: 0x34495e, + NOT_QUITE_BLACK: 0x23272a, + ORANGE: 0xe67e22, + PURPLE: 0x9b59b6, + RED: 0xe74c3c, + WHITE: 0xffffff, + YELLOW: 0xffff00, } as const; /** @@ -41,15 +41,15 @@ export const COLORS: { [key: string]: number } = { * Taken from https://github.com/discordjs/discord.js/blob/stable/src/util/Util.js#L436 */ export function resolveColor(color: number | string | [number, number, number]): number { - if (typeof color === "string") { - if (color === "RANDOM") return Math.floor(Math.random() * (0xffffff + 1)); - color = COLORS[color.toUpperCase()] ?? Number.parseInt(color.replace("#", ""), 16); - } else if (Array.isArray(color)) { - color = (color[0] << 16) + (color[1] << 8) + color[2]; - } + if (typeof color === "string") { + if (color === "RANDOM") return Math.floor(Math.random() * (0xffffff + 1)); + color = COLORS[color.toUpperCase()] ?? Number.parseInt(color.replace("#", ""), 16); + } else if (Array.isArray(color)) { + color = (color[0] << 16) + (color[1] << 8) + color[2]; + } - if (color < 0 || color > 0xffffff) throw new RangeError("COLOR_RANGE"); - else if (Number.isNaN(color)) throw new TypeError("COLOR_CONVERT"); + if (color < 0 || color > 0xffffff) throw new RangeError("COLOR_RANGE"); + if (Number.isNaN(color)) throw new TypeError("COLOR_CONVERT"); - return color; + return color; } diff --git a/packages/api/lib/rest/util/constants.ts b/packages/api/lib/rest/util/constants.ts index 9eaeaf78..4a6a4ee2 100644 --- a/packages/api/lib/rest/util/constants.ts +++ b/packages/api/lib/rest/util/constants.ts @@ -2,17 +2,17 @@ * The meanings of each of the known guilded api response status codes. */ export const GUILDED_STATUS_CODES = { - 200: "The request was successful" as const, - 201: "The content was created" as const, - 204: "No content returned" as const, - 400: "The request was unacceptable, often due to missing parameters" as const, - 401: "The access token is missing or invalid" as const, - 403: "The bot does not have the necessary permissions" as const, - 404: "The requested resource does not exist" as const, - 409: "The request conflicted with another request" as const, - 500: "Something went wrong on our end" as const, - 501: "Something went wrong on our end" as const, - 502: "Something went wrong on our end" as const, - 503: "Something went wrong on our end" as const, - 504: "Something went wrong on our end" as const, + 200: "The request was successful" as const, + 201: "The content was created" as const, + 204: "No content returned" as const, + 400: "The request was unacceptable, often due to missing parameters" as const, + 401: "The access token is missing or invalid" as const, + 403: "The bot does not have the necessary permissions" as const, + 404: "The requested resource does not exist" as const, + 409: "The request conflicted with another request" as const, + 500: "Something went wrong on our end" as const, + 501: "Something went wrong on our end" as const, + 502: "Something went wrong on our end" as const, + 503: "Something went wrong on our end" as const, + 504: "Something went wrong on our end" as const, }; diff --git a/packages/api/lib/rest/util/message.ts b/packages/api/lib/rest/util/message.ts index ba3a2e99..f6b12a74 100644 --- a/packages/api/lib/rest/util/message.ts +++ b/packages/api/lib/rest/util/message.ts @@ -3,53 +3,53 @@ import type { APIContent, APIEmbed, RESTPostWebhookBody } from "../../generated/ import { WebhookEmbed } from "../webhook/WebhookEmbed"; export type MessageAttachment = { - content?: Buffer; - name: string; - path?: string; + content?: Buffer; + name: string; + path?: string; }; export type WebhookMessageContent = - | string - | (RESTPostWebhookBody & { - embeds?: (APIEmbed | WebhookEmbed)[]; - files?: MessageAttachment[]; - }); + | string + | (RESTPostWebhookBody & { + embeds?: (APIEmbed | WebhookEmbed)[]; + files?: MessageAttachment[]; + }); export const transformEmbedToAPIEmbed = (embeds: (APIEmbed | WebhookEmbed)[]): APIEmbed[] => embeds.map((x) => (x instanceof WebhookEmbed ? x.toJSON() : x)); export function parseToMessage(input: EmbedStructure | string = "", embed?: EmbedStructure): APIContent { - return { - document: { - data: {}, - nodes: [ - { - data: {}, - nodes: [ - { - leaves: [ - { - marks: [], - object: "leaf", - text: typeof input === "string" ? input : "", - }, - ], - object: "text", - }, - ], - object: "block", - type: "markdown-plain-text", - }, - { - data: { - embeds: embed ? (embed instanceof WebhookEmbed ? [embed?.toJSON()] : [embed]) : typeof input === "string" ? [] : input instanceof WebhookEmbed ? [input?.toJSON()] : [input], - }, - nodes: [], - object: "block", - type: "webhookMessage", - }, - ], - object: "document", - }, - object: "value", - }; + return { + document: { + data: {}, + nodes: [ + { + data: {}, + nodes: [ + { + leaves: [ + { + marks: [], + object: "leaf", + text: typeof input === "string" ? input : "", + }, + ], + object: "text", + }, + ], + object: "block", + type: "markdown-plain-text", + }, + { + data: { + embeds: embed ? (embed instanceof WebhookEmbed ? [embed?.toJSON()] : [embed]) : typeof input === "string" ? [] : input instanceof WebhookEmbed ? [input?.toJSON()] : [input], + }, + nodes: [], + object: "block", + type: "webhookMessage", + }, + ], + object: "document", + }, + object: "value", + }; } /** @@ -58,207 +58,223 @@ export function parseToMessage(input: EmbedStructure | string = "", embed?: Embe * @internal */ export function parseMessage(data: APIContent): parsedMessage { - const parsedMessageArray: parsedTextResponse[] = []; - let parsedMessageTextContent = ""; - const mentions: { - channels: string[]; - reactions: string[]; - roles: string[]; - users: string[]; - } = { - channels: [], - reactions: [], - roles: [], - users: [], - }; - const embeds: APIEmbed[] = []; - const messageLinesWithoutEmpty = data.document.nodes.filter((x) => (x.type === "webhookMessage" ? (x.data as { embeds: APIEmbed[] }).embeds.length > 0 : true)); - - for (let index = 0; index < messageLinesWithoutEmpty.length; index++) { - const messageLine = data.document.nodes[index]; - if (index) parsedMessageTextContent += "\n"; - switch (messageLine.type) { - case "paragraph": { - for (const node of messageLine.nodes) { - switch (node.object) { - case "text": { - for (const leaf of node.leaves!) { - if (leaf.text) { - parsedMessageArray.push({ - content: leaf.text, - type: "text", - }); - } - - parsedMessageTextContent += leaf.text; - } - - break; - } - - case "inline": { - const castedDataNode = node.data as MessageDataNode; - const leaf = node.nodes![0].leaves![0]; - switch (node.type) { - case "mention": { - switch (castedDataNode.mention!.type) { - case "person": { - mentions.users.push(castedDataNode.mention!.id as string); - parsedMessageArray.push({ - content: leaf.text, - mention: castedDataNode.mention, - type: "user", - }); - break; - } - - case "role": { - parsedMessageArray.push({ - content: leaf.text, - mention: castedDataNode.mention, - type: "role", - }); - mentions.roles.push(castedDataNode.mention!.id.toString()); - break; - } - } - - break; - } - - /* istanbul ignore next */ - case "reaction": { - mentions.reactions.push(castedDataNode.reaction!.id); - parsedMessageArray.push({ - content: leaf.text, - reaction: castedDataNode.reaction, - type: "reaction", - }); - break; - } - - case "channel": { - mentions.channels.push(castedDataNode.channel!.id); - parsedMessageArray.push({ - channel: castedDataNode.channel, - content: leaf.text, - type: "channel", - }); - break; - } - } - - parsedMessageTextContent += leaf.text; - break; - } - } - } - - break; - } - - /* istanbul ignore next */ - case "block-quote-container": { - for (const messageNodes of messageLine.nodes) { - for (const node of messageNodes.nodes!) { - switch (node.object) { - case "text": { - if (node.leaves![0].text) { - parsedMessageArray.push({ - content: node.leaves![0].text, - type: "text", - }); - } - - parsedMessageTextContent += node.leaves![0].text; - break; - } - - case "inline": { - const castedDataNode = node.data as MessageDataNode; - switch (node.type) { - case "mention": { - switch (castedDataNode.mention!.type) { - case "person": { - mentions.users.push(castedDataNode.mention!.id as string); - parsedMessageArray.push({ - content: node.nodes![0].leaves![0].text, - mention: castedDataNode.mention, - type: "user", - }); - break; - } - - case "role": { - parsedMessageArray.push({ - content: node.nodes![0].leaves![0].text, - mention: castedDataNode.mention, - type: "role", - }); - mentions.roles.push(castedDataNode.mention!.id.toString()); - break; - } - } - - break; - } - - case "reaction": { - mentions.reactions.push(castedDataNode.reaction!.id); - parsedMessageArray.push({ - content: node.nodes![0].leaves![0].text, - reaction: castedDataNode.reaction, - type: "reaction", - }); - break; - } - - case "channel": { - mentions.channels.push(castedDataNode.channel!.id); - parsedMessageArray.push({ - channel: castedDataNode.channel, - content: node.nodes![0].leaves![0].text, - type: "channel", - }); - break; - } - } - - parsedMessageTextContent += node.nodes![0].leaves![0].text; - break; - } - } - } - } - - break; - } - - case "markdown-plain-text": { - if (messageLine.nodes![0].leaves![0].text) { - parsedMessageArray.push({ - content: messageLine.nodes![0].leaves![0].text, - type: "text", - }); - } - - parsedMessageTextContent += messageLine.nodes![0].leaves![0].text; - break; - } - - case "webhookMessage": { - embeds.push(...(messageLine.data as { embeds: APIEmbed[] }).embeds); - break; - } - } - } - - return { - embeds, - mentions, - parsedArr: parsedMessageArray, - parsedText: parsedMessageTextContent.trim(), - }; + const parsedMessageArray: parsedTextResponse[] = []; + let parsedMessageTextContent = ""; + const mentions: { + channels: string[]; + reactions: string[]; + roles: string[]; + users: string[]; + } = { + channels: [], + reactions: [], + roles: [], + users: [], + }; + const embeds: APIEmbed[] = []; + const messageLinesWithoutEmpty = data.document.nodes.filter((x) => + x.type === "webhookMessage" + ? ( + x.data as { + embeds: APIEmbed[]; + } + ).embeds.length > 0 + : true, + ); + + for (let index = 0; index < messageLinesWithoutEmpty.length; index++) { + const messageLine = data.document.nodes[index]; + if (index) parsedMessageTextContent += "\n"; + switch (messageLine.type) { + case "paragraph": { + for (const node of messageLine.nodes) { + switch (node.object) { + case "text": { + for (const leaf of node.leaves!) { + if (leaf.text) { + parsedMessageArray.push({ + content: leaf.text, + type: "text", + }); + } + + parsedMessageTextContent += leaf.text; + } + + break; + } + + case "inline": { + const castedDataNode = node.data as MessageDataNode; + const leaf = node.nodes?.[0].leaves?.[0]; + if (!leaf) break; + + switch (node.type) { + case "mention": { + switch (castedDataNode.mention?.type) { + case "person": { + mentions.users.push(castedDataNode.mention?.id as string); + parsedMessageArray.push({ + content: leaf.text, + mention: castedDataNode.mention, + type: "user", + }); + break; + } + + case "role": { + parsedMessageArray.push({ + content: leaf.text, + mention: castedDataNode.mention, + type: "role", + }); + mentions.roles.push(castedDataNode.mention?.id.toString()); + break; + } + } + + break; + } + + /* istanbul ignore next */ + case "reaction": { + mentions.reactions.push(castedDataNode.reaction?.id!); + parsedMessageArray.push({ + content: leaf.text, + reaction: castedDataNode.reaction, + type: "reaction", + }); + break; + } + + case "channel": { + mentions.channels.push(castedDataNode.channel?.id!); + parsedMessageArray.push({ + channel: castedDataNode.channel, + content: leaf.text, + type: "channel", + }); + break; + } + } + + parsedMessageTextContent += leaf.text; + break; + } + } + } + + break; + } + + /* istanbul ignore next */ + case "block-quote-container": { + for (const messageNodes of messageLine.nodes) { + for (const node of messageNodes.nodes!) { + switch (node.object) { + case "text": { + if (node.leaves?.[0].text) { + parsedMessageArray.push({ + content: node.leaves?.[0].text, + type: "text", + }); + } + + parsedMessageTextContent += node.leaves?.[0].text; + break; + } + + case "inline": { + const castedDataNode = node.data as MessageDataNode; + switch (node.type) { + case "mention": { + switch (castedDataNode.mention?.type) { + case "person": { + mentions.users.push(castedDataNode.mention?.id as string); + parsedMessageArray.push({ + content: node.nodes?.[0].leaves?.[0].text!, + mention: castedDataNode.mention, + type: "user", + }); + break; + } + + case "role": { + parsedMessageArray.push({ + content: node.nodes?.[0].leaves?.[0].text!, + mention: castedDataNode.mention, + type: "role", + }); + mentions.roles.push(castedDataNode.mention?.id.toString()); + break; + } + } + + break; + } + + case "reaction": { + mentions.reactions.push(castedDataNode.reaction?.id!); + parsedMessageArray.push({ + content: node.nodes?.[0].leaves?.[0].text!, + reaction: castedDataNode.reaction, + type: "reaction", + }); + break; + } + + case "channel": { + mentions.channels.push(castedDataNode.channel?.id!); + parsedMessageArray.push({ + channel: castedDataNode.channel, + content: node.nodes?.[0].leaves?.[0].text!, + type: "channel", + }); + break; + } + } + + parsedMessageTextContent += node.nodes?.[0].leaves?.[0].text; + break; + } + } + } + } + + break; + } + + case "markdown-plain-text": { + if (messageLine.nodes?.[0].leaves?.[0].text) { + parsedMessageArray.push({ + content: messageLine.nodes?.[0].leaves?.[0].text, + type: "text", + }); + } + + parsedMessageTextContent += messageLine.nodes?.[0].leaves?.[0].text; + break; + } + + case "webhookMessage": { + embeds.push( + ...( + messageLine.data as { + embeds: APIEmbed[]; + } + ).embeds, + ); + break; + } + } + } + + return { + embeds, + mentions, + parsedArr: parsedMessageArray, + parsedText: parsedMessageTextContent.trim(), + }; } /** @@ -267,15 +283,15 @@ export function parseMessage(data: APIContent): parsedMessage { * @internal */ export type parsedMessage = { - embeds: APIEmbed[]; - mentions: { - channels: string[]; - reactions: string[]; - roles: string[]; - users: string[]; - }; - parsedArr: parsedTextResponse[]; - parsedText: string; + embeds: APIEmbed[]; + mentions: { + channels: string[]; + reactions: string[]; + roles: string[]; + users: string[]; + }; + parsedArr: parsedTextResponse[]; + parsedText: string; }; /** @@ -284,23 +300,23 @@ export type parsedMessage = { * @internal */ export type MessageDataNode = { - channel?: { - id: string; - matcher: string; - name: string; - }; - mention?: { - avatar?: string; - color: string; - id: number | string; - matcher: string; - name: string; - nickname?: boolean; - type: string; - }; - reaction?: { - id: string; - }; + channel?: { + id: string; + matcher: string; + name: string; + }; + mention?: { + avatar?: string; + color: string; + id: number | string; + matcher: string; + name: string; + nickname?: boolean; + type: string; + }; + reaction?: { + id: string; + }; }; export type EmbedStructure = APIEmbed | WebhookEmbed; @@ -311,17 +327,17 @@ export type EmbedStructure = APIEmbed | WebhookEmbed; * @internal */ export type parsedTextResponse = { - channel?: unknown; - content: string; - mention?: unknown; - reaction?: unknown; - type: string; + channel?: unknown; + content: string; + mention?: unknown; + reaction?: unknown; + type: string; }; /** * The message structure of a string -> message object suitable to send to guilded */ export type enforcedMessageStructure = { - content: APIContent; - messageId: string; + content: APIContent; + messageId: string; }; diff --git a/packages/api/lib/rest/util/routes.ts b/packages/api/lib/rest/util/routes.ts index 09e3ce79..d965a3b6 100644 --- a/packages/api/lib/rest/util/routes.ts +++ b/packages/api/lib/rest/util/routes.ts @@ -2,80 +2,80 @@ import { WSPayload, WSSchema } from "../../generated/api-typings"; import type { SocialLinkPayload } from "../../generated/router"; export const ROUTES = { - // Channel Endpoints - channels: () => `/channels` as string, - channel: (channelId: string) => `/channels/${channelId}` as const, + // Channel Endpoints + channels: () => "/channels" as string, + channel: (channelId: string) => `/channels/${channelId}` as const, - // Channel Endpoints - channelMessages: (channelId: string) => `/channels/${channelId}/messages` as const, - channelMessage: (channelId: string, messageId: string) => `/channels/${channelId}/messages/${messageId}` as const, + // Channel Endpoints + channelMessages: (channelId: string) => `/channels/${channelId}/messages` as const, + channelMessage: (channelId: string, messageId: string) => `/channels/${channelId}/messages/${messageId}` as const, - // CalendarEvent Endpoints - calendarEvents: (channelId: string) => `/channels/${channelId}/events` as const, - calendarEvent: (channelId: string, calendarEventId: number) => `/channels/${channelId}/events/${calendarEventId}` as const, + // CalendarEvent Endpoints + calendarEvents: (channelId: string) => `/channels/${channelId}/events` as const, + calendarEvent: (channelId: string, calendarEventId: number) => `/channels/${channelId}/events/${calendarEventId}` as const, - // CalendarRsvp Endpoints - calendarEventRsvps: (channelId: string, calendarEventId: number) => `/channels/${channelId}/events/${calendarEventId}/rsvps` as const, - calendarEventRsvp: (channelId: string, calendarEventId: number, userId: string) => `/channels/${channelId}/events/${calendarEventId}/rsvps/${userId}` as const, + // CalendarRsvp Endpoints + calendarEventRsvps: (channelId: string, calendarEventId: number) => `/channels/${channelId}/events/${calendarEventId}/rsvps` as const, + calendarEventRsvp: (channelId: string, calendarEventId: number, userId: string) => `/channels/${channelId}/events/${calendarEventId}/rsvps/${userId}` as const, - calendarEventRsvpsMany: (channelId: string, calendarEventId: number) => `/channels/${channelId}/events/${calendarEventId}/rsvps` as const, + calendarEventRsvpsMany: (channelId: string, calendarEventId: number) => `/channels/${channelId}/events/${calendarEventId}/rsvps` as const, - // Server Endpoints - server: (serverId: string) => `/servers/${serverId}` as const, + // Server Endpoints + server: (serverId: string) => `/servers/${serverId}` as const, - // Member Endpoints - memberNickname: (serverId: string, userId: string) => `/servers/${serverId}/members/${userId}/nickname` as const, - memberRoles: (serverId: string, userId: string) => `/servers/${serverId}/members/${userId}/roles` as const, - member: (serverId: string, userId: string) => `/servers/${serverId}/members/${userId}` as const, - members: (serverId: string) => `/servers/${serverId}/members` as const, - memberBan: (serverId: string, userId: string) => `/servers/${serverId}/bans/${userId}` as const, - memberBans: (serverId: string) => `/servers/${serverId}/bans` as const, + // Member Endpoints + memberNickname: (serverId: string, userId: string) => `/servers/${serverId}/members/${userId}/nickname` as const, + memberRoles: (serverId: string, userId: string) => `/servers/${serverId}/members/${userId}/roles` as const, + member: (serverId: string, userId: string) => `/servers/${serverId}/members/${userId}` as const, + members: (serverId: string) => `/servers/${serverId}/members` as const, + memberBan: (serverId: string, userId: string) => `/servers/${serverId}/bans/${userId}` as const, + memberBans: (serverId: string) => `/servers/${serverId}/bans` as const, - // User Endpoints - user: (userId: string) => `/users/${userId}` as const, - me: () => `/users/@me` as const, + // User Endpoints + user: (userId: string) => `/users/${userId}` as const, + me: () => "/users/@me" as const, - // Forum Endpoints - forumTopics: (channelId: string) => `/channels/${channelId}/topics` as const, - forumTopic: (channelId: string, forumTopicId: string) => `/channels/${channelId}/topics/${forumTopicId}` as const, - forumTopicPin: (channelId: string, forumTopicId: string) => `/channels/${channelId}/topics/${forumTopicId}/pin` as const, - forumTopicLock: (channelId: string, forumTopicId: string) => `/channels/${channelId}/topics/${forumTopicId}/lock` as const, + // Forum Endpoints + forumTopics: (channelId: string) => `/channels/${channelId}/topics` as const, + forumTopic: (channelId: string, forumTopicId: string) => `/channels/${channelId}/topics/${forumTopicId}` as const, + forumTopicPin: (channelId: string, forumTopicId: string) => `/channels/${channelId}/topics/${forumTopicId}/pin` as const, + forumTopicLock: (channelId: string, forumTopicId: string) => `/channels/${channelId}/topics/${forumTopicId}/lock` as const, - // List Endpoints - listItems: (channelId: string) => `/channels/${channelId}/items` as const, - listItem: (channelId: string, itemId: string) => `/channels/${channelId}/items/${itemId}` as const, - listItemComplete: (channelId: string, itemId: string) => `/channels/${channelId}/items/${itemId}/complete` as const, + // List Endpoints + listItems: (channelId: string) => `/channels/${channelId}/items` as const, + listItem: (channelId: string, itemId: string) => `/channels/${channelId}/items/${itemId}` as const, + listItemComplete: (channelId: string, itemId: string) => `/channels/${channelId}/items/${itemId}/complete` as const, - // Docs Endpoints - channelDocs: (channelId: string) => `/channels/${channelId}/docs` as const, - channelDoc: (channelId: string, docId: number) => `/channels/${channelId}/docs/${docId}` as const, + // Docs Endpoints + channelDocs: (channelId: string) => `/channels/${channelId}/docs` as const, + channelDoc: (channelId: string, docId: number) => `/channels/${channelId}/docs/${docId}` as const, - // Reactions Endpoints - channelReaction: (channelId: string, contentId: string, emoteId: number) => `/channels/${channelId}/content/${contentId}/emotes/${emoteId}` as const, + // Reactions Endpoints + channelReaction: (channelId: string, contentId: string, emoteId: number) => `/channels/${channelId}/content/${contentId}/emotes/${emoteId}` as const, - // Server XP Endpoints - memberXP: (serverId: string, userId: string) => `/servers/${serverId}/members/${userId}/xp` as const, - roleXP: (serverId: string, roleId: string) => `/servers/${serverId}/roles/${roleId}/xp` as const, + // Server XP Endpoints + memberXP: (serverId: string, userId: string) => `/servers/${serverId}/members/${userId}/xp` as const, + roleXP: (serverId: string, roleId: string) => `/servers/${serverId}/roles/${roleId}/xp` as const, - // Social Links Endpoints - memberSocialLinks: (serverId: string, userId: string, type: SocialLinkPayload["type"]) => `/servers/${serverId}/members/${userId}/social-links/${type}` as const, + // Social Links Endpoints + memberSocialLinks: (serverId: string, userId: string, type: SocialLinkPayload["type"]) => `/servers/${serverId}/members/${userId}/social-links/${type}` as const, - // Group Memberships Endpoints - groupMember: (groupId: string, userId: string) => `/groups/${groupId}/members/${userId}` as const, + // Group Memberships Endpoints + groupMember: (groupId: string, userId: string) => `/groups/${groupId}/members/${userId}` as const, - // Role Memberships Endpoints - memberRole: (serverId: string, memberId: string, roleId: number) => `/servers/${serverId}/members/${memberId}/roles/${roleId}` as const, + // Role Memberships Endpoints + memberRole: (serverId: string, memberId: string, roleId: number) => `/servers/${serverId}/members/${memberId}/roles/${roleId}` as const, - // Webhook Endpoints - serverWebhooks: (serverId: string) => `/servers/${serverId}/webhooks`, - serverWebhook: (serverId: string, webhookId: string) => `/servers/${serverId}/webhooks/${webhookId}`, + // Webhook Endpoints + serverWebhooks: (serverId: string) => `/servers/${serverId}/webhooks`, + serverWebhook: (serverId: string, webhookId: string) => `/servers/${serverId}/webhooks/${webhookId}`, } as const; export const DOMAINS = { - AWS_CDN: "https://s3-us-west-2.amazonaws.com/www.guilded.gg/", - BASE_DOMAIN: "www.guilded.gg", - API_DOMAIN: "api.guilded.gg", - CDN: "img.guildedcdn.com", - IMAGE_CDN_DOMAIN: "img.guildedcdn.com", - MEDIA_DOMAIN: "media.guilded.gg", + AWS_CDN: "https://s3-us-west-2.amazonaws.com/www.guilded.gg/", + BASE_DOMAIN: "www.guilded.gg", + API_DOMAIN: "api.guilded.gg", + CDN: "img.guildedcdn.com", + IMAGE_CDN_DOMAIN: "img.guildedcdn.com", + MEDIA_DOMAIN: "media.guilded.gg", } as const; diff --git a/packages/api/lib/rest/webhook/WebhookClient.ts b/packages/api/lib/rest/webhook/WebhookClient.ts index 83275658..416af898 100644 --- a/packages/api/lib/rest/webhook/WebhookClient.ts +++ b/packages/api/lib/rest/webhook/WebhookClient.ts @@ -1,104 +1,121 @@ import FormData from "form-data"; import type { APIContent, APIEmbed, RESTPostWebhookBody, RESTPostWebhookResult } from "../../generated/api-typings"; import { RestManager } from "../RestManager"; -import { type parsedMessage, type MessageAttachment, type WebhookMessageContent, parseMessage, transformEmbedToAPIEmbed } from "../util/message"; +import { type MessageAttachment, type WebhookMessageContent, parseMessage, type parsedMessage, transformEmbedToAPIEmbed } from "../util/message"; import type { WebhookEmbed } from "./WebhookEmbed"; export class WebhookClient { - public URL: string; - - public id: string; - - public token: string; - - public username: string | null; - - public avatarURL: string | null; - - private readonly rest: RestManager; - - public constructor(webhookConnection: string | { id: string; token: string }, { username, avatarURL }: { avatarURL?: string; username?: string } = {}) { - if (!webhookConnection) { - throw new TypeError(`Must provide Webhook connection info in either string or object. Received ${webhookConnection}.`); - } - - if (typeof webhookConnection === "string") { - const destructuredWebhookURL = /guilded.gg\/webhooks\/(?[^/]+)\/(?[^/]+)/.exec(webhookConnection); - if (!destructuredWebhookURL?.length) { - throw new Error("Not a proper guilded webhook URL! Alternatively, you can provide an ID/token"); - } - - const [_, id, token] = destructuredWebhookURL; - this.id = id; - this.token = token; - } else if (webhookConnection.id && webhookConnection.token) { - this.id = webhookConnection.id; - this.token = webhookConnection.token; - } else { - throw new TypeError("You must provide either a webhook URL or a webhook ID & token in an object when constructing the Webhook Client"); - } - - this.URL = `https://media.guilded.gg/webhooks/${this.id}/${this.token}`; - this.rest = new RestManager({ proxyURL: this.URL, token: this.token }); - this.username = username ?? null; - this.avatarURL = avatarURL ?? null; - } - - public async send( - content: WebhookMessageContent, - embeds?: (APIEmbed | WebhookEmbed)[], - options?: { - avatarURL?: string; - files?: MessageAttachment[]; - username?: string; - }, - ): Promise { - const contentIsObject = typeof content === "object"; - const resEmbeds = transformEmbedToAPIEmbed((contentIsObject ? content.embeds : embeds) ?? []); - const resFiles = contentIsObject ? content.files : options?.files; - - const baseBody: RESTPostWebhookBody = contentIsObject - ? { - ...content, - embeds: resEmbeds, - } - : { - content, - embeds: resEmbeds, - username: options?.username ?? this.username ?? undefined, - avatar_url: options?.avatarURL ?? this.avatarURL ?? undefined, - }; - - let body: FormData | RESTPostWebhookBody = baseBody; - const formData = new FormData(); - if (resFiles?.length) { - for (const [index, value] of resFiles.entries()) { - formData.append(`files[${index}]`, value.content, { - filename: value.name, - filepath: value.path, - }); - } - - formData.append("payload_json", JSON.stringify(baseBody), { - contentType: "application/json", - }); - body = formData; - } - - const data = await this.rest.post("", body); - const parsedContent = parseMessage(data.content); - - return { - ...data, - content: parsedContent.parsedText, - parsedContent, - rawContent: data.content, - } as WebhookExecuteResponse; - } + public URL: string; + + public id: string; + + public token: string; + + public username: string | null; + + public avatarURL: string | null; + + private readonly rest: RestManager; + + public constructor( + webhookConnection: + | string + | { + id: string; + token: string; + }, + { + username, + avatarURL, + }: { + avatarURL?: string; + username?: string; + } = {}, + ) { + if (!webhookConnection) { + throw new TypeError(`Must provide Webhook connection info in either string or object. Received ${webhookConnection}.`); + } + + if (typeof webhookConnection === "string") { + const destructuredWebhookURL = /guilded.gg\/webhooks\/(?[^/]+)\/(?[^/]+)/.exec(webhookConnection); + if (!destructuredWebhookURL?.length) { + throw new Error("Not a proper guilded webhook URL! Alternatively, you can provide an ID/token"); + } + + const [_, id, token] = destructuredWebhookURL; + this.id = id; + this.token = token; + } else if (webhookConnection.id && webhookConnection.token) { + this.id = webhookConnection.id; + this.token = webhookConnection.token; + } else { + throw new TypeError("You must provide either a webhook URL or a webhook ID & token in an object when constructing the Webhook Client"); + } + + this.URL = `https://media.guilded.gg/webhooks/${this.id}/${this.token}`; + this.rest = new RestManager({ + proxyURL: this.URL, + token: this.token, + }); + this.username = username ?? null; + this.avatarURL = avatarURL ?? null; + } + + public async send( + content: WebhookMessageContent, + embeds?: (APIEmbed | WebhookEmbed)[], + options?: { + avatarURL?: string; + files?: MessageAttachment[]; + username?: string; + }, + ): Promise { + const contentIsObject = typeof content === "object"; + const resEmbeds = transformEmbedToAPIEmbed((contentIsObject ? content.embeds : embeds) ?? []); + const resFiles = contentIsObject ? content.files : options?.files; + + const baseBody: RESTPostWebhookBody = contentIsObject + ? { + ...content, + embeds: resEmbeds, + } + : { + content, + embeds: resEmbeds, + username: options?.username ?? this.username ?? undefined, + avatar_url: options?.avatarURL ?? this.avatarURL ?? undefined, + }; + + let body: FormData | RESTPostWebhookBody = baseBody; + const formData = new FormData(); + if (resFiles?.length) { + for (const [index, value] of resFiles.entries()) { + formData.append(`files[${index}]`, value.content, { + filename: value.name, + filepath: value.path, + }); + } + + formData.append("payload_json", JSON.stringify(baseBody), { + contentType: "application/json", + }); + body = formData; + } + + const data = await this.rest.post("", body); + const parsedContent = parseMessage(data.content); + + return { + ...data, + content: parsedContent.parsedText, + parsedContent, + rawContent: data.content, + } as WebhookExecuteResponse; + } } export type WebhookExecuteResponse = Omit & { - content: string; - parsedContent: parsedMessage; - rawContent: APIContent; + content: string; + parsedContent: parsedMessage; + rawContent: APIContent; }; diff --git a/packages/api/lib/rest/webhook/WebhookEmbed.ts b/packages/api/lib/rest/webhook/WebhookEmbed.ts index c137b736..6365d49e 100644 --- a/packages/api/lib/rest/webhook/WebhookEmbed.ts +++ b/packages/api/lib/rest/webhook/WebhookEmbed.ts @@ -2,302 +2,326 @@ import type { APIEmbed } from "../../generated/api-typings"; import { resolveColor } from "../util/color"; export class WebhookEmbed { - public title: string | null; + public title: string | null; - public description: string | null; - - public url: string | null; + public description: string | null; + + public url: string | null; - public timestamp: number | null; - - public timestampString: string | null; - - public color: number | null; - - public footer: { - iconURL: string | null; - proxyIconURL: string | null; - text: string; - } | null; - - public image: APIWebhookEmbedMediaData | null; - - public thumbnail: APIWebhookEmbedMediaData | null; - - public video: APIWebhookEmbedMediaData | null; - - public provider: { - name: string | null; - url: string | null; - } | null; - - public author: { - iconURL: string | null; - name: string | null; - proxyIconURL: string | null; - url: string | null; - } | null; - - public fields: { - inline: boolean | null; - name: string; - value: string; - }[]; - - public constructor(data?: Partial) { - this.footer = null; - this.image = null; - this.thumbnail = null; - this.author = null; - this.fields = []; - this.video = null; - this.provider = null; - this.color = null; - this.timestamp = null; - this.timestampString = null; - this.description = null; - this.url = null; - this.title = null; - - if (data) this.update(data); - } - - /* istanbul ignore next */ - public update(data: Partial): void { - if ("color" in data && data.color !== undefined) { - this.setColor(data.color); - } - - if ("timestamp" in data && data.timestamp !== undefined) { - this.setTimestamp(data.timestamp); - } - - if ("title" in data && data.title !== undefined) { - this.setTitle(data.title); - } - - if ("description" in data && data.description !== undefined) { - this.setDescription(data.description); - } - - if ("url" in data && data.url !== undefined) { - this.setURL(data.url); - } - - if ("provider" in data && data.provider !== undefined) { - this.setProvider(data.provider.name, data.provider.url); - } - - if ("footer" in data && data.footer !== undefined) { - this.setFooter(data.footer.text, data.footer.icon_url, data.footer.proxy_icon_url); - } - - if ("image" in data && data.image !== undefined) { - this.setImage(data.image.url, data.image.height, data.image.width, data.image.proxy_url); - } - - if ("thumbnail" in data && data.thumbnail !== undefined) { - this.setThumbnail(data.thumbnail.url, data.thumbnail.height, data.thumbnail.width, data.thumbnail.proxy_url); - } - - if ("author" in data && data.author !== undefined) { - this.setAuthor(data.author.name, data.author.icon_url, data.author.url, data.author.proxy_icon_url); - } - - if ("fields" in data && data.fields !== undefined) { - this.addFields(data.fields); - } - - if ("video" in data && data.video !== undefined) { - this.setVideo(data.video.url, data.video.height, data.video.width, data.video.proxy_url); - } - } - - public setTitle(title?: string | null): this { - this.title = title ?? null; - return this; - } - - public setDescription(description?: string | null): this { - this.description = description ?? null; - return this; - } - - public setURL(url?: string | null): this { - this.url = url ?? null; - return this; - } - - public setTimestamp(timestamp?: Date | number | string | null): this { - if (timestamp === null) { - this.timestamp = null; - this.timestampString = null; - return this; - } - - if (!timestamp) { - return this.setTimestamp(new Date()); - } - - const parsedTimestamp = timestamp instanceof Date ? timestamp : Number.isInteger(timestamp) || typeof timestamp === "string" ? new Date(timestamp) : null; - if (!parsedTimestamp || (parsedTimestamp instanceof Date && Number.isNaN(parsedTimestamp.getTime()))) { - throw new TypeError("Invalid DateResolvable passed into setTimestamp."); - } - - this.timestamp = parsedTimestamp.getTime(); - this.timestampString = parsedTimestamp.toISOString(); - return this; - } - - public setColor(color?: number | string | [number, number, number] | null): this { - this.color = color ? resolveColor(color) : null; - return this; - } - - public setFooter(text?: string, iconURL?: string | null, proxyIconURL?: string | null): this { - this.footer = text ? { iconURL: iconURL ?? null, proxyIconURL: proxyIconURL ?? null, text } : null; - return this; - } - - public setImage(url?: string, height?: string | null, width?: string | null, proxyURL?: string | null): this { - this.image = url - ? { - height: height ?? null, - proxyURL: proxyURL ?? null, - url, - width: width ?? null, - } - : null; - return this; - } - - public setThumbnail(url?: string, height?: string | null, width?: string | null, proxyURL?: string | null): this { - this.thumbnail = url - ? { - height: height ?? null, - proxyURL: proxyURL ?? null, - url, - width: width ?? null, - } - : null; - return this; - } - - public setVideo(url?: string, height?: string | null, width?: string | null, proxyURL?: string | null): this { - this.video = url - ? { - height: height ?? null, - proxyURL: proxyURL ?? null, - url, - width: width ?? null, - } - : null; - return this; - } - - public setProvider(name?: string | null, url?: string | null): this { - this.provider = name && url ? { name: name ?? null, url: url ?? null } : null; - return this; - } - - public setAuthor(name?: string, iconURL?: string | null, url?: string | null, proxyIconURL?: string | null): this { - this.author = name - ? { - iconURL: iconURL ?? null, - name: name ?? null, - proxyIconURL: proxyIconURL ?? null, - url: url ?? null, - } - : null; - return this; - } - - public addFields(fields: { inline?: boolean; name: string; value: string }[]): this { - this.fields.push( - ...fields.map((field) => ({ - inline: field.inline ?? false, - name: field.name, - value: field.value, - })), - ); - return this; - } - - public addField(name: string, value: string, inline?: boolean): this { - this.addFields([{ inline, name, value }]); - return this; - } - - public clearFields(): this { - this.fields.length = 0; - return this; - } - - public toJSON(): APIEmbed { - return { - author: this.author?.name - ? { - icon_url: this.author.iconURL ?? undefined, - name: this.author.name, - proxy_icon_url: this.author.proxyIconURL ?? undefined, - url: this.author.url ?? undefined, - } - : undefined, - color: this.color ?? undefined, - description: this.description ?? undefined, - fields: - this.fields.map((field) => ({ - inline: field.inline ?? false, - name: field.name, - value: field.value, - })) ?? undefined, - footer: this.footer - ? { - icon_url: this.footer.iconURL ?? undefined, - proxy_icon_url: this.footer.proxyIconURL ?? undefined, - text: this.footer.text ?? undefined, - } - : undefined, - image: this.image - ? { - height: this.image.height ?? undefined, - proxy_url: this.image.proxyURL ?? undefined, - url: this.image.url ?? undefined, - width: this.image.width ?? undefined, - } - : undefined, - provider: this.provider - ? { - name: this.provider.name ?? undefined, - url: this.provider.url ?? undefined, - } - : undefined, - thumbnail: this.thumbnail - ? { - height: this.thumbnail.height ?? undefined, - proxy_url: this.thumbnail.proxyURL ?? undefined, - url: this.thumbnail.url ?? undefined, - width: this.thumbnail.width ?? undefined, - } - : undefined, - timestamp: this.timestampString ?? undefined, - title: this.title ?? undefined, - url: this.url ?? undefined, - video: this.video - ? { - height: this.video.height ?? undefined, - proxy_url: this.video.proxyURL ?? undefined, - url: this.video.url ?? undefined, - width: this.video.width ?? undefined, - } - : undefined, - }; - } + public timestamp: number | null; + + public timestampString: string | null; + + public color: number | null; + + public footer: { + iconURL: string | null; + proxyIconURL: string | null; + text: string; + } | null; + + public image: APIWebhookEmbedMediaData | null; + + public thumbnail: APIWebhookEmbedMediaData | null; + + public video: APIWebhookEmbedMediaData | null; + + public provider: { + name: string | null; + url: string | null; + } | null; + + public author: { + iconURL: string | null; + name: string | null; + proxyIconURL: string | null; + url: string | null; + } | null; + + public fields: { + inline: boolean | null; + name: string; + value: string; + }[]; + + public constructor(data?: Partial) { + this.footer = null; + this.image = null; + this.thumbnail = null; + this.author = null; + this.fields = []; + this.video = null; + this.provider = null; + this.color = null; + this.timestamp = null; + this.timestampString = null; + this.description = null; + this.url = null; + this.title = null; + + if (data) this.update(data); + } + + /* istanbul ignore next */ + public update(data: Partial): void { + if ("color" in data && data.color !== undefined) { + this.setColor(data.color); + } + + if ("timestamp" in data && data.timestamp !== undefined) { + this.setTimestamp(data.timestamp); + } + + if ("title" in data && data.title !== undefined) { + this.setTitle(data.title); + } + + if ("description" in data && data.description !== undefined) { + this.setDescription(data.description); + } + + if ("url" in data && data.url !== undefined) { + this.setURL(data.url); + } + + if ("provider" in data && data.provider !== undefined) { + this.setProvider(data.provider.name, data.provider.url); + } + + if ("footer" in data && data.footer !== undefined) { + this.setFooter(data.footer.text, data.footer.icon_url, data.footer.proxy_icon_url); + } + + if ("image" in data && data.image !== undefined) { + this.setImage(data.image.url, data.image.height, data.image.width, data.image.proxy_url); + } + + if ("thumbnail" in data && data.thumbnail !== undefined) { + this.setThumbnail(data.thumbnail.url, data.thumbnail.height, data.thumbnail.width, data.thumbnail.proxy_url); + } + + if ("author" in data && data.author !== undefined) { + this.setAuthor(data.author.name, data.author.icon_url, data.author.url, data.author.proxy_icon_url); + } + + if ("fields" in data && data.fields !== undefined) { + this.addFields(data.fields); + } + + if ("video" in data && data.video !== undefined) { + this.setVideo(data.video.url, data.video.height, data.video.width, data.video.proxy_url); + } + } + + public setTitle(title?: string | null): this { + this.title = title ?? null; + return this; + } + + public setDescription(description?: string | null): this { + this.description = description ?? null; + return this; + } + + public setURL(url?: string | null): this { + this.url = url ?? null; + return this; + } + + public setTimestamp(timestamp?: Date | number | string | null): this { + if (timestamp === null) { + this.timestamp = null; + this.timestampString = null; + return this; + } + + if (!timestamp) { + return this.setTimestamp(new Date()); + } + + const parsedTimestamp = timestamp instanceof Date ? timestamp : Number.isInteger(timestamp) || typeof timestamp === "string" ? new Date(timestamp) : null; + if (!parsedTimestamp || (parsedTimestamp instanceof Date && Number.isNaN(parsedTimestamp.getTime()))) { + throw new TypeError("Invalid DateResolvable passed into setTimestamp."); + } + + this.timestamp = parsedTimestamp.getTime(); + this.timestampString = parsedTimestamp.toISOString(); + return this; + } + + public setColor(color?: number | string | [number, number, number] | null): this { + this.color = color ? resolveColor(color) : null; + return this; + } + + public setFooter(text?: string, iconURL?: string | null, proxyIconURL?: string | null): this { + this.footer = text + ? { + iconURL: iconURL ?? null, + proxyIconURL: proxyIconURL ?? null, + text, + } + : null; + return this; + } + + public setImage(url?: string, height?: string | null, width?: string | null, proxyURL?: string | null): this { + this.image = url + ? { + height: height ?? null, + proxyURL: proxyURL ?? null, + url, + width: width ?? null, + } + : null; + return this; + } + + public setThumbnail(url?: string, height?: string | null, width?: string | null, proxyURL?: string | null): this { + this.thumbnail = url + ? { + height: height ?? null, + proxyURL: proxyURL ?? null, + url, + width: width ?? null, + } + : null; + return this; + } + + public setVideo(url?: string, height?: string | null, width?: string | null, proxyURL?: string | null): this { + this.video = url + ? { + height: height ?? null, + proxyURL: proxyURL ?? null, + url, + width: width ?? null, + } + : null; + return this; + } + + public setProvider(name?: string | null, url?: string | null): this { + this.provider = + name && url + ? { + name: name ?? null, + url: url ?? null, + } + : null; + return this; + } + + public setAuthor(name?: string, iconURL?: string | null, url?: string | null, proxyIconURL?: string | null): this { + this.author = name + ? { + iconURL: iconURL ?? null, + name: name ?? null, + proxyIconURL: proxyIconURL ?? null, + url: url ?? null, + } + : null; + return this; + } + + public addFields( + fields: { + inline?: boolean; + name: string; + value: string; + }[], + ): this { + this.fields.push( + ...fields.map((field) => ({ + inline: field.inline ?? false, + name: field.name, + value: field.value, + })), + ); + return this; + } + + public addField(name: string, value: string, inline?: boolean): this { + this.addFields([ + { + inline, + name, + value, + }, + ]); + return this; + } + + public clearFields(): this { + this.fields.length = 0; + return this; + } + + public toJSON(): APIEmbed { + return { + author: this.author?.name + ? { + icon_url: this.author.iconURL ?? undefined, + name: this.author.name, + proxy_icon_url: this.author.proxyIconURL ?? undefined, + url: this.author.url ?? undefined, + } + : undefined, + color: this.color ?? undefined, + description: this.description ?? undefined, + fields: + this.fields.map((field) => ({ + inline: field.inline ?? false, + name: field.name, + value: field.value, + })) ?? undefined, + footer: this.footer + ? { + icon_url: this.footer.iconURL ?? undefined, + proxy_icon_url: this.footer.proxyIconURL ?? undefined, + text: this.footer.text ?? undefined, + } + : undefined, + image: this.image + ? { + height: this.image.height ?? undefined, + proxy_url: this.image.proxyURL ?? undefined, + url: this.image.url ?? undefined, + width: this.image.width ?? undefined, + } + : undefined, + provider: this.provider + ? { + name: this.provider.name ?? undefined, + url: this.provider.url ?? undefined, + } + : undefined, + thumbnail: this.thumbnail + ? { + height: this.thumbnail.height ?? undefined, + proxy_url: this.thumbnail.proxyURL ?? undefined, + url: this.thumbnail.url ?? undefined, + width: this.thumbnail.width ?? undefined, + } + : undefined, + timestamp: this.timestampString ?? undefined, + title: this.title ?? undefined, + url: this.url ?? undefined, + video: this.video + ? { + height: this.video.height ?? undefined, + proxy_url: this.video.proxyURL ?? undefined, + url: this.video.url ?? undefined, + width: this.video.width ?? undefined, + } + : undefined, + }; + } } export type APIWebhookEmbedMediaData = { - height: string | null; - proxyURL: string | null; - url: string; - width: string | null; + height: string | null; + proxyURL: string | null; + url: string; + width: string | null; }; diff --git a/packages/api/lib/ws/Heartbeater.ts b/packages/api/lib/ws/Heartbeater.ts index d0274bed..abdbf6c3 100644 --- a/packages/api/lib/ws/Heartbeater.ts +++ b/packages/api/lib/ws/Heartbeater.ts @@ -1,18 +1,21 @@ import type { WebSocketManager } from "./WebSocketManager"; export default class Heartbeater { - public heartbeatInterval: NodeJS.Timeout; + public heartbeatInterval: NodeJS.Timeout; - public constructor(public readonly ws: WebSocketManager, public heartbeatIntervalMs: number) { - this.heartbeatInterval = setInterval(() => { - this.ws._debug("Sending heartbeat to Guilded."); - this.ws.lastPingedAt = Date.now(); - this.ws.socket?.ping(); - }, this.heartbeatIntervalMs); - } + public constructor( + public readonly ws: WebSocketManager, + public heartbeatIntervalMs: number, + ) { + this.heartbeatInterval = setInterval(() => { + this.ws._debug("Sending heartbeat to Guilded."); + this.ws.lastPingedAt = Date.now(); + this.ws.socket?.ping(); + }, this.heartbeatIntervalMs); + } - public destroy(): void { - clearInterval(this.heartbeatInterval); - this.ws.lastPingedAt = -1; - } + public destroy(): void { + clearInterval(this.heartbeatInterval); + this.ws.lastPingedAt = -1; + } } diff --git a/packages/api/lib/ws/WebSocketManager.ts b/packages/api/lib/ws/WebSocketManager.ts index c5d4097c..1fe69e99 100644 --- a/packages/api/lib/ws/WebSocketManager.ts +++ b/packages/api/lib/ws/WebSocketManager.ts @@ -7,282 +7,301 @@ import { WSOpCodes } from "../generated/api-typings"; import Heartbeater from "./Heartbeater"; export class WebSocketManager { - /** - * The version of the websocket to connect to. - */ - version = this.options.version ?? 1; - - /** - * Token used to authenticate requests. - */ - token = this.options.token; - - /** - * The websocket connected to guilded. - */ - socket: WebSocket | null = null; - - /** - * Whether or not this connection is connected and heartbeating. - */ - isAlive = false; - - /** - * The amount of milliseconds the websocket took to respond to the last ping request. This will be zero before the first heartbeat - */ - ping = 0; - - /** - * The timestamp in milliseconds of the last ping request. - */ - lastPingedAt = 0; - - /** - * The last message id received. Used in the event of resuming connections. - */ - lastMessageId: string | null = null; - - /** - * The date since the last initial connection was established. - */ - connectedAt: Date | null = null; - - /** - * Emitter in charge of emitting ws gateway related events - */ - emitter = new EventEmitter() as TypedEmitter; - - /** - * Count of how many times a reconnect has been attempted - */ - reconnectAttemptAmount = 0; - - /** - * Heartbeating helper - */ - heartbeater: Heartbeater | null = null; - - constructor(public readonly options: WebSocketOptions) {} - - /** - * The url that will be used to connect. Prioritizes proxy url and if not available uses the default base url for guidled. - */ - get wsURL(): string { - return this.options.proxyURL ?? `wss://www.guilded.gg/websocket/v${this.version}`; - } - - get reconnectAttemptExceeded(): boolean { - return this.reconnectAttemptAmount >= (this.options.reconnectAttemptLimit ?? Number.POSITIVE_INFINITY); - } - - get shouldReplayMissedEvents(): boolean { - return this.options.replayMissedEvents !== false; - } - - get shouldRequestMissedEvents(): boolean { - return this.shouldReplayMissedEvents && this.lastMessageId !== null; - } - - connect(): void { - this._debug(`Connecting to Guilded WS Gateway at url ${this.wsURL}.`); - const headers: Record = { - Authorization: `Bearer ${this.token}`, - }; - - if (this.shouldRequestMissedEvents) { - this._debug(`Requesting missed events from last message ${this.lastMessageId}.`); - if (this.lastMessageId) { - headers["guilded-last-message-id"] = this.lastMessageId; - } - } - - try { - this.socket = new WebSocket(this.wsURL, { - headers, - }); - this._debug("Socket created."); - } catch (error) { - this._debug(`Error creating socket ${(error as Error).message}.`); - if (!this.shouldRequestMissedEvents && this.lastMessageId) throw error; - - this.lastMessageId = null; - if (error instanceof Error) { - this.emitter.emit("error", "Error connecting to socket", error); - } - - this._handleDisconnect({ blockReconnects: false }); - return; - } - - this.socket.on("open", this.onSocketOpen.bind(this)); - this.socket.on("ping", this.onSocketPing.bind(this)); - this.socket.on("pong", this.onSocketPong.bind(this)); - this.socket.on("message", (data) => { - this.emitter.emit("raw", data); - this.onSocketMessage(data.toString()); - }); - - this.socket.on("error", (err) => { - this._debug(`Error received from WS. ${err.message}`); - this.emitter.emit("exit", "Gateway connection closed due to error."); - this._handleDisconnect({ blockReconnects: true }); - }); - - this.socket.on("close", (code, reason) => { - this.emitter.emit("exit", "Gateway connection closed."); - this._handleDisconnect({ blockReconnects: false }); - }); - } - - destroy(): void { - this._debug("Destroying websocket connection."); - if (!this.socket) { - throw new Error("There is no active connection to destroy."); - } - - this.heartbeater?.destroy(); - this.heartbeater = null; - - this.socket.removeAllListeners(); - if (!this.socket.CLOSED && !this.socket.CLOSING) this.socket.close(); - - this.socket = null; - this.isAlive = false; - } - - _handleDisconnect(opts: { blockReconnects: boolean }): void { - this._debug(`Received request to disconnect.`); - this.destroy(); - this._debug( - `Checking if should reconnect. + /** + * The version of the websocket to connect to. + */ + version = this.options.version ?? 1; + + /** + * Token used to authenticate requests. + */ + token = this.options.token; + + /** + * The websocket connected to guilded. + */ + socket: WebSocket | null = null; + + /** + * Whether or not this connection is connected and heartbeating. + */ + isAlive = false; + + /** + * The amount of milliseconds the websocket took to respond to the last ping request. This will be zero before the first heartbeat + */ + ping = 0; + + /** + * The timestamp in milliseconds of the last ping request. + */ + lastPingedAt = 0; + + /** + * The last message id received. Used in the event of resuming connections. + */ + lastMessageId: string | null = null; + + /** + * The date since the last initial connection was established. + */ + connectedAt: Date | null = null; + + /** + * Emitter in charge of emitting ws gateway related events + */ + emitter = new EventEmitter() as TypedEmitter; + + /** + * Count of how many times a reconnect has been attempted + */ + reconnectAttemptAmount = 0; + + /** + * Heartbeating helper + */ + heartbeater: Heartbeater | null = null; + + constructor(public readonly options: WebSocketOptions) {} + + /** + * The url that will be used to connect. Prioritizes proxy url and if not available uses the default base url for guidled. + */ + get wsURL(): string { + return this.options.proxyURL ?? `wss://www.guilded.gg/websocket/v${this.version}`; + } + + get reconnectAttemptExceeded(): boolean { + return this.reconnectAttemptAmount >= (this.options.reconnectAttemptLimit ?? Number.POSITIVE_INFINITY); + } + + get shouldReplayMissedEvents(): boolean { + return this.options.replayMissedEvents !== false; + } + + get shouldRequestMissedEvents(): boolean { + return this.shouldReplayMissedEvents && this.lastMessageId !== null; + } + + connect(): void { + this._debug(`Connecting to Guilded WS Gateway at url ${this.wsURL}.`); + const headers: Record = { + Authorization: `Bearer ${this.token}`, + }; + + if (this.shouldRequestMissedEvents) { + this._debug(`Requesting missed events from last message ${this.lastMessageId}.`); + if (this.lastMessageId) { + headers["guilded-last-message-id"] = this.lastMessageId; + } + } + + try { + this.socket = new WebSocket(this.wsURL, { + headers, + }); + this._debug("Socket created."); + } catch (error) { + this._debug(`Error creating socket ${(error as Error).message}.`); + if (!this.shouldRequestMissedEvents && this.lastMessageId) throw error; + + this.lastMessageId = null; + if (error instanceof Error) { + this.emitter.emit("error", "Error connecting to socket", error); + } + + this._handleDisconnect({ + blockReconnects: false, + }); + return; + } + + this.socket.on("open", this.onSocketOpen.bind(this)); + this.socket.on("ping", this.onSocketPing.bind(this)); + this.socket.on("pong", this.onSocketPong.bind(this)); + this.socket.on("message", (data) => { + this.emitter.emit("raw", data); + this.onSocketMessage(data.toString()); + }); + + this.socket.on("error", (err) => { + this._debug(`Error received from WS. ${err.message}`); + this.emitter.emit("exit", "Gateway connection closed due to error."); + this._handleDisconnect({ + blockReconnects: true, + }); + }); + + this.socket.on("close", (code, reason) => { + this.emitter.emit("exit", "Gateway connection closed."); + this._handleDisconnect({ + blockReconnects: false, + }); + }); + } + + destroy(): void { + this._debug("Destroying websocket connection."); + if (!this.socket) { + throw new Error("There is no active connection to destroy."); + } + + this.heartbeater?.destroy(); + this.heartbeater = null; + + this.socket.removeAllListeners(); + if (!this.socket.CLOSED && !this.socket.CLOSING) this.socket.close(); + + this.socket = null; + this.isAlive = false; + } + + _handleDisconnect(opts: { + blockReconnects: boolean; + }): void { + this._debug("Received request to disconnect."); + this.destroy(); + this._debug( + `Checking if should reconnect. Reconnect allowed: ${this.options.autoConnectOnErr}. Reconnect attempt ${this.reconnectAttemptAmount}. Reconnect attempt limit ${this.options.reconnectAttemptLimit}.`, - ); - if ((!opts.blockReconnects && (this.options.autoConnectOnErr ?? true)) || !this.reconnectAttemptExceeded) { - this._debug("Reconnecting."); - this.reconnectAttemptAmount++; - this.connect(); - } - } - - _debug(str: any): boolean { - return this.emitter.emit("debug", `[DEBUG] ${str}`); - } - - private onSocketMessage(packet: string): void { - let EVENT_NAME; - let EVENT_DATA; - - try { - const data = JSON.parse(packet) as SkeletonWSPayload; - EVENT_NAME = data.t; - EVENT_DATA = data; - } catch (error) { - this.emitter.emit("error", "ERROR PARSING WS EVENT", error as Error, packet); - return void 0; - } - - this._debug(`Received event ${EVENT_NAME}. ${packet}}`); - // SAVE THE ID IF AVAILABLE. USED FOR RESUMING CONNECTIONS. - if (EVENT_DATA.s) this.lastMessageId = EVENT_DATA.s; - - switch (EVENT_DATA.op) { - // Normal event based packets - case WSOpCodes.SUCCESS: { - this.emitter.emit("gatewayEvent", EVENT_NAME as WSEventNames, EVENT_DATA); - break; - } - - // Auto handled by ws lib - case WSOpCodes.WELCOME: { - this._debug("Received welcome packet. Setting up heartbeat."); - this.heartbeater = new Heartbeater(this, (EVENT_DATA.d as WSPayload<"_WelcomeMessage">).heartbeatIntervalMs); - this.emitter.emit("ready", (EVENT_DATA.d as WSPayload<"_WelcomeMessage">).user as ClientUserData); - break; - } - - case WSOpCodes.RESUME: { - this._debug("Received resume packet."); - this.lastMessageId = null; - break; - } - - case WSOpCodes.ERROR: { - this._debug("Received error packet."); - this.emitter.emit("error", "Error received from WS", new Error((EVENT_DATA.d as { message: string }).message)); - this.lastMessageId = null; - this._handleDisconnect({ - blockReconnects: false, - }); - break; - } - - default: { - this._debug("Received unknown opcode."); - this.emitter.emit("unknown", "unknown opcode", packet); - break; - } - } - } - - private onSocketOpen(): void { - this._debug("Socket has been successfully opened and is ready to receive data."); - this.isAlive = true; - this.connectedAt = new Date(); - } - - private onSocketPing(): void { - this._debug(`Ping request from Guilded received. Responding with a pong.`); - this.socket!.pong(); - } - - private onSocketPong(): void { - this.ping = Date.now() - this.lastPingedAt; - this._debug(`Pong response from Guilded received. Latency: ${this.ping}ms.`); - } + ); + if ((!opts.blockReconnects && (this.options.autoConnectOnErr ?? true)) || !this.reconnectAttemptExceeded) { + this._debug("Reconnecting."); + this.reconnectAttemptAmount++; + this.connect(); + } + } + + _debug(str: unknown): boolean { + return this.emitter.emit("debug", `[DEBUG] ${str}`); + } + + private onSocketMessage(packet: string): void { + let EVENT_NAME: string; + // biome-ignore lint/suspicious/noExplicitAny: Data can be anything json parseable + let EVENT_DATA: any; + + try { + const data = JSON.parse(packet) as SkeletonWSPayload; + EVENT_NAME = data.t; + EVENT_DATA = data; + } catch (error) { + this.emitter.emit("error", "ERROR PARSING WS EVENT", error as Error, packet); + return; + } + + this._debug(`Received event ${EVENT_NAME}. ${packet}}`); + // SAVE THE ID IF AVAILABLE. USED FOR RESUMING CONNECTIONS. + if (EVENT_DATA.s) this.lastMessageId = EVENT_DATA.s; + + switch (EVENT_DATA.op) { + // Normal event based packets + case WSOpCodes.SUCCESS: { + this.emitter.emit("gatewayEvent", EVENT_NAME as WSEventNames, EVENT_DATA); + break; + } + + // Auto handled by ws lib + case WSOpCodes.WELCOME: { + this._debug("Received welcome packet. Setting up heartbeat."); + this.heartbeater = new Heartbeater(this, (EVENT_DATA.d as WSPayload<"_WelcomeMessage">).heartbeatIntervalMs); + this.emitter.emit("ready", (EVENT_DATA.d as WSPayload<"_WelcomeMessage">).user as ClientUserData); + break; + } + + case WSOpCodes.RESUME: { + this._debug("Received resume packet."); + this.lastMessageId = null; + break; + } + + case WSOpCodes.ERROR: { + this._debug("Received error packet."); + this.emitter.emit( + "error", + "Error received from WS", + new Error( + ( + EVENT_DATA.d as { + message: string; + } + ).message, + ), + ); + this.lastMessageId = null; + this._handleDisconnect({ + blockReconnects: false, + }); + break; + } + + default: { + this._debug("Received unknown opcode."); + this.emitter.emit("unknown", "unknown opcode", packet); + break; + } + } + } + + private onSocketOpen(): void { + this._debug("Socket has been successfully opened and is ready to receive data."); + this.isAlive = true; + this.connectedAt = new Date(); + } + + private onSocketPing(): void { + this._debug("Ping request from Guilded received. Responding with a pong."); + this.socket?.pong(); + } + + private onSocketPong(): void { + this.ping = Date.now() - this.lastPingedAt; + this._debug(`Pong response from Guilded received. Latency: ${this.ping}ms.`); + } } export type WebSocketOptions = { - /** - * Whether to try to re-establish connection on error - */ - autoConnectOnErr?: boolean; - /** - * The base url that the websocket will connect to. - */ - proxyURL?: string; - /** - * Limit of how many times a reconnection should be attempted - */ - reconnectAttemptLimit?: number; - /** - * Whether the manager should request missed events on reconnect - */ - replayMissedEvents?: boolean; - /** - * The bot's token. - */ - token: string; - /** - * The version of the websocket to connect to. - */ - version?: 1; + /** + * Whether to try to re-establish connection on error + */ + autoConnectOnErr?: boolean; + /** + * The base url that the websocket will connect to. + */ + proxyURL?: string; + /** + * Limit of how many times a reconnection should be attempted + */ + reconnectAttemptLimit?: number; + /** + * Whether the manager should request missed events on reconnect + */ + replayMissedEvents?: boolean; + /** + * The bot's token. + */ + token: string; + /** + * The version of the websocket to connect to. + */ + version?: 1; }; // eslint-disable-next-line @typescript-eslint/consistent-type-definitions export type WebsocketManagerEvents = { - debug(data: any): unknown; - error(reason: string, err: Error | null, data?: any): unknown; - exit(info: string): unknown; - gatewayEvent(event: keyof WSEvent, data: SkeletonWSPayload): unknown; - raw(data: any): unknown; - ready( - user: WSPayload<"_WelcomeMessage">["user"] & { - createdBy: string; - botId: string; - }, - ): unknown; - reconnect(): unknown; - unknown(reason: string, data: any): unknown; + debug(data: unknown): unknown; + error(reason: string, err: Error | null, data?: unknown): unknown; + exit(info: string): unknown; + gatewayEvent(event: keyof WSEvent, data: SkeletonWSPayload): unknown; + raw(data: unknown): unknown; + ready( + user: WSPayload<"_WelcomeMessage">["user"] & { + createdBy: string; + botId: string; + }, + ): unknown; + reconnect(): unknown; + unknown(reason: string, data: unknown): unknown; }; diff --git a/packages/api/package.json b/packages/api/package.json index 175ce587..0241bad1 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -7,15 +7,14 @@ "main": "dist/index.js", "types": "types/index.d.ts", "scripts": { - "lint": "eslint --ignore-path ../../.config/.eslintignore --config ../../.config/.eslintrc.js lib", "build": "tsc && gen-esm-wrapper . ./dist/index.mjs", "build:typecheck": "tsc --noEmit", - "prepublishOnly": "rimraf dist/ && rimraf types/ && pnpm run build", + "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build", "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": "pnpm router:preserve && pnpm generate:long:router && prettier -w lib/generated/router/**/*.ts && pnpm router:restore" + "generate:router": "bun run router:preserve && bun run generate:long:router && biome check --apply-unsafe lib/generated/router/**/*.ts && pnpm router:restore" }, "devDependencies": { "@types/fs-extra": "^11.0.1", @@ -84,4 +83,4 @@ "url": "https://github.com/zaida04/guilded.js/issues" }, "gitHead": "eee38a19e0bfa812d7136cc78a6bc99e0b402b0c" -} +} \ No newline at end of file diff --git a/packages/api/scripts/post-gen-router.ts b/packages/api/scripts/post-gen-router.ts index 707d8539..33a5b25e 100644 --- a/packages/api/scripts/post-gen-router.ts +++ b/packages/api/scripts/post-gen-router.ts @@ -5,20 +5,22 @@ import { move } from "fs-extra"; const pathsToPreserve = ["lib/generated/router/core/", "lib/generated/router/GuildedRouter.ts"]; const pathsToReplace = { - "lib/generated/router/services/ChatService.ts": ["Record | string;", "string;"], + "lib/generated/router/services/ChatService.ts": ["Record | string;", "string;"], }; const main = async (): Promise => { - for (const path of pathsToPreserve) { - await move(join(__dirname, "..", "preserve", path), join(__dirname, "..", path), { overwrite: true }); - } + for (const path of pathsToPreserve) { + await move(join(__dirname, "..", "preserve", path), join(__dirname, "..", path), { + overwrite: true, + }); + } - for (const path of Object.keys(pathsToReplace)) { - const [old, replace] = pathsToReplace[path as keyof typeof pathsToReplace]; - const concatPath = join(__dirname, "..", path); - const file = await readFile(concatPath, "utf8"); - await writeFile(concatPath, file.replace(old, replace)); - } + for (const path of Object.keys(pathsToReplace)) { + const [old, replace] = pathsToReplace[path as keyof typeof pathsToReplace]; + const concatPath = join(__dirname, "..", path); + const file = await readFile(concatPath, "utf8"); + await writeFile(concatPath, file.replace(old, replace)); + } }; void main(); diff --git a/packages/api/scripts/pre-gen-router.ts b/packages/api/scripts/pre-gen-router.ts index 656101d5..c26e01a1 100644 --- a/packages/api/scripts/pre-gen-router.ts +++ b/packages/api/scripts/pre-gen-router.ts @@ -4,9 +4,11 @@ import { move } from "fs-extra"; export const pathsToPreserve = ["lib/generated/router/core", "lib/generated/router/GuildedRouter.ts"]; const main = async (): Promise => { - for (const path of pathsToPreserve) { - await move(join(__dirname, "..", path), join(__dirname, "..", "preserve", path), { overwrite: true }); - } + for (const path of pathsToPreserve) { + await move(join(__dirname, "..", path), join(__dirname, "..", "preserve", path), { + overwrite: true, + }); + } }; void main(); diff --git a/packages/create-guilded-app/lib/cli.ts b/packages/create-guilded-app/lib/cli.ts index 1e68340b..abdf4c1c 100644 --- a/packages/create-guilded-app/lib/cli.ts +++ b/packages/create-guilded-app/lib/cli.ts @@ -15,13 +15,13 @@ Happy coding! `; void create("create-guilded-app", { - templateRoot, - caveat, - defaultTemplate: "command-handler-starter-js", - promptForAuthor: false, - promptForEmail: false, - promptForTemplate: true, - promptForDescription: false, - promptForLicense: true, - promptForPackageManager: true, + templateRoot, + caveat, + defaultTemplate: "command-handler-starter-js", + promptForAuthor: false, + promptForEmail: false, + promptForTemplate: true, + promptForDescription: false, + promptForLicense: true, + promptForPackageManager: true, }); diff --git a/packages/create-guilded-app/package.json b/packages/create-guilded-app/package.json index d5976f18..05a1c135 100644 --- a/packages/create-guilded-app/package.json +++ b/packages/create-guilded-app/package.json @@ -10,10 +10,9 @@ "create-guilded-app": "./dist/cli.js" }, "scripts": { - "lint": "eslint --ignore-path ../../.config/.eslintignore --config ../../.config/.eslintrc.js lib", "build": "tsc", "build:typecheck": "tsc --noEmit", - "prepublishOnly": "rimraf dist/ && rimraf types/ && pnpm run build" + "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build" }, "devDependencies": { "@types/node": "18.16.12", @@ -43,4 +42,4 @@ "bugs": { "url": "https://github.com/zaida04/guilded.js/issues" } -} +} \ No newline at end of file diff --git a/packages/create-guilded-app/templates/bot-starter-js/src/index.js b/packages/create-guilded-app/templates/bot-starter-js/src/index.js index 0ac06770..9cd09bd7 100644 --- a/packages/create-guilded-app/templates/bot-starter-js/src/index.js +++ b/packages/create-guilded-app/templates/bot-starter-js/src/index.js @@ -6,36 +6,48 @@ const client = new Client({ token: process.env.TOKEN }); const prefix = process.env.PREFIX; client.on("messageCreated", async (m) => { - if (m.createdByBotId || !m.content.startsWith(prefix)) return; - const [commandName, ...args] = m.content.slice(prefix.length).split(" "); - switch (commandName) { - case "test": { - await m.send("TESTING!"); - break; - } - case "embed": { - await m.send( - new Embed() - .setTitle("This is a test title!") - .setDescription("This is a test description") - .setColor("GREEN") - .setFooter("This is a test footer", "https://google.com/") - .setTimestamp() - .setURL("https://google.com") - .setAuthor("Test author") - .addFields([ - { name: "Test field 1", value: "This is a test field", inline: true }, - { name: "Test field 2", value: "This is a test field", inline: true }, - { name: "Test field 3", value: "This is a test field", inline: false }, - ]), - ); - break; - } - case "echo": { - await m.send(args.join(" ")); - break; - } - } + if (m.createdByBotId || !m.content.startsWith(prefix)) return; + const [commandName, ...args] = m.content.slice(prefix.length).split(" "); + switch (commandName) { + case "test": { + await m.send("TESTING!"); + break; + } + case "embed": { + await m.send( + new Embed() + .setTitle("This is a test title!") + .setDescription("This is a test description") + .setColor("GREEN") + .setFooter("This is a test footer", "https://google.com/") + .setTimestamp() + .setURL("https://google.com") + .setAuthor("Test author") + .addFields([ + { + name: "Test field 1", + value: "This is a test field", + inline: true, + }, + { + name: "Test field 2", + value: "This is a test field", + inline: true, + }, + { + name: "Test field 3", + value: "This is a test field", + inline: false, + }, + ]), + ); + break; + } + case "echo": { + await m.send(args.join(" ")); + break; + } + } }); // client.on("debug", console.log); diff --git a/packages/create-guilded-app/templates/command-handler-starter-js/src/commands/echo.js b/packages/create-guilded-app/templates/command-handler-starter-js/src/commands/echo.js index 68813285..4d1a667e 100644 --- a/packages/create-guilded-app/templates/command-handler-starter-js/src/commands/echo.js +++ b/packages/create-guilded-app/templates/command-handler-starter-js/src/commands/echo.js @@ -1,8 +1,8 @@ module.exports = { - name: "echo", - aliases: ["speak", "talk"], - execute: (msg, args) => { - if (!args.length) return msg.send("You must give me something to echo!"); - msg.send(args.join(" ")); - }, + name: "echo", + aliases: ["speak", "talk"], + execute: (msg, args) => { + if (!args.length) return msg.send("You must give me something to echo!"); + msg.send(args.join(" ")); + }, }; diff --git a/packages/create-guilded-app/templates/command-handler-starter-js/src/commands/ping.js b/packages/create-guilded-app/templates/command-handler-starter-js/src/commands/ping.js index 4f5b200f..18167be3 100644 --- a/packages/create-guilded-app/templates/command-handler-starter-js/src/commands/ping.js +++ b/packages/create-guilded-app/templates/command-handler-starter-js/src/commands/ping.js @@ -1,5 +1,5 @@ module.exports = { - aliases: ["ping"], - execute: (msg) => msg.send("pong!"), - name: "ping", + aliases: ["ping"], + execute: (msg) => msg.send("pong!"), + name: "ping", }; diff --git a/packages/create-guilded-app/templates/command-handler-starter-js/src/index.js b/packages/create-guilded-app/templates/command-handler-starter-js/src/index.js index 08436617..e848e1d6 100644 --- a/packages/create-guilded-app/templates/command-handler-starter-js/src/index.js +++ b/packages/create-guilded-app/templates/command-handler-starter-js/src/index.js @@ -11,19 +11,19 @@ const prefix = process.env.PREFIX; const commands = new Collection(); client.on("messageCreated", async (msg) => { - if (!msg.content.startsWith(prefix)) return; - let [commandName, ...args] = msg.content.slice(prefix.length).trim().split(/ +/); - commandName = commandName.toLowerCase(); - - const command = commands.get(commandName) ?? commands.find((x) => x.aliases?.includes(commandName)); - if (!command) return; - - try { - await command.execute(msg, args); - } catch (e) { - void client.messages.send(msg.channelId, "There was an error executing that command!"); - void console.error(e); - } + if (!msg.content.startsWith(prefix)) return; + let [commandName, ...args] = msg.content.slice(prefix.length).trim().split(/ +/); + commandName = commandName.toLowerCase(); + + const command = commands.get(commandName) ?? commands.find((x) => x.aliases?.includes(commandName)); + if (!command) return; + + try { + await command.execute(msg, args); + } catch (e) { + void client.messages.send(msg.channelId, "There was an error executing that command!"); + void console.error(e); + } }); // client.on("debug", console.log); @@ -32,15 +32,17 @@ client.on("ready", () => console.log("Guilded bot is ready!")); client.on("exit", () => console.log("Disconnected!")); void (async () => { - // read the commands dir and have the file extensions. - const commandDir = await readdir(join(__dirname, "commands"), { withFileTypes: true }); - - // go through all the files/dirs scanned from the readdir, and make sure we only have js files - for (const file of commandDir.filter((x) => x.name.endsWith(".js"))) { - console.log(file.name); - const command = require(join(__dirname, "commands", file.name)); - commands.set(command.name, command); - } - - client.login(); + // read the commands dir and have the file extensions. + const commandDir = await readdir(join(__dirname, "commands"), { + withFileTypes: true, + }); + + // go through all the files/dirs scanned from the readdir, and make sure we only have js files + for (const file of commandDir.filter((x) => x.name.endsWith(".js"))) { + console.log(file.name); + const command = require(join(__dirname, "commands", file.name)); + commands.set(command.name, command); + } + + client.login(); })(); diff --git a/packages/gil/lib/BotClient.ts b/packages/gil/lib/BotClient.ts index a352a927..58770c74 100644 --- a/packages/gil/lib/BotClient.ts +++ b/packages/gil/lib/BotClient.ts @@ -12,423 +12,439 @@ import type Task from "./structures/Task"; import { walk } from "./utils/walk"; export class BotClient extends Client { - /** - * All your bot's monitors will be available here - */ - monitors = new Collection(); - - /** - * All your bot's commands will be available here - */ - commands = new Collection(); - - /** - * All your bot's arguments will be available here - */ - arguments = new Collection(); - - /** - * All your bot's inhibitors will be available here - */ - inhibitors = new Collection(); - - /** - * All your bot's tasks will be available here - */ - tasks = new Collection(); - - /** - * The bot's prefixes per server. - */ - prefixes = new Map(); - - /** - * The message collectors that are pending. - */ - messageCollectors = new Collection(); - - /** - * The path that the end users commands,monitors, inhibitors and others will be located. - */ - sourceFolderPath = this.options.sourceFolderPath ?? path.join(process.cwd(), "src/"); - - constructor(public options: BotClientOptions, autoInit = true) { - super(options); - if (autoInit) void this.init(); - } - - /** - * Get the default client prefix. - */ - get prefix(): string { - return this.options.prefix; - } - - /** - * Get the bot's mention. Guilded api does not provide a way to dynamically detect this so for now its manual. - */ - get botMention(): string | undefined { - return this.options.botMention; - } - - async loadFile(result: any, dir: string, collection: Collection): Promise { - const [filename, file] = result; - const { name } = path.parse(filename); - const piece = file.default ? new file.default(this, name) : new file(this, name); - - let cmd: Command | undefined; - if (dir === "commands" && piece.parentCommand) { - const subcommandNames = piece.parentCommand.split("-"); - for (const subname of subcommandNames) { - // LOOK FOR MAIN COMMAND - if (!cmd) { - const mainCmd = collection.get(subname); - if (mainCmd) { - cmd = mainCmd as Command; - continue; - } else { - throw new Error(`You tried to create a subcommand named ${piece.name}. However, the parent command, ${subname}, was not found.`); - } - } - - const subcmd = cmd?.subcommands?.get(subname) as Command; - if (subcmd) { - cmd = subcmd; - } else { - throw new Error(`You tried to create a subcommand named ${piece.name} inside the main command ${cmd.name}. However, the parent command, ${subname}, was not found.`); - } - } - } - - if (cmd) { - if (!cmd.subcommands) cmd.subcommands = new Collection(); - cmd.subcommands.set(piece.name ?? name, piece); - } else { - collection.set(piece.name ?? name, piece); - } - - if (piece.init) await piece.init(); - } - - /** - * Prepares the bot to run. Ideally used for loading files to the bot. - */ - async init(): Promise { - await Promise.allSettled( - [ - ["monitors", this.monitors] as const, - ["commands", this.commands] as const, - ["arguments", this.arguments] as const, - ["inhibitors", this.inhibitors] as const, - ["tasks", this.tasks] as const, - ].map(async ([dir, collection]) => { - try { - for await (const result of walk(path.join(__dirname, dir))) { - await this.loadFile(result, dir, collection); - } - } catch (error) { - console.log(error); - } - }), - ).catch(() => null); - - // Load all end user files - await Promise.allSettled( - [ - ["monitors", this.monitors] as const, - ["commands", this.commands] as const, - ["arguments", this.arguments] as const, - ["inhibitors", this.inhibitors] as const, - ["tasks", this.tasks] as const, - ].map(async ([dir, collection]) => { - try { - for await (const result of walk(this.options.monitorDirPath ?? path.join(this.sourceFolderPath, dir))) { - await this.loadFile(result, dir, collection); - } - } catch (error) { - console.log(error); - } - }), - ).catch(() => null); - - this.initializeMessageListener(); - this.initializeTasks(); - } - - /** - * Allows users to override and customize the addition of a event listener - */ - initializeMessageListener(): void { - this.on("messageCreated", (message) => this.processMonitors(message)); - } - - /** - * Allows users to override and customize the initialization of scheduled task intervals. - */ - initializeTasks(): void { - this.tasks.forEach(async (task) => { - // TASKS THAT NEED TO RUN IMMEDIATELY ARE EXECUTED FIRST - if (task.runOnStartup) await this.executeTask(task); - - // SET TIMEOUT WILL DETERMINE THE RIGHT TIME TO RUN THE TASK FIRST TIME AFTER STARTUP - setTimeout(async () => { - await this.executeTask(task); - - setInterval(async () => { - await this.executeTask(task); - }, task.millisecondsInterval); - }, Date.now() % task.millisecondsInterval); - }); - } - - /** - * Handler to execute a task when it is time. - */ - async executeTask(task: Task): Promise { - // IF TASK REQUIRES BOT BEING FULLY READY EXIT OUT IF BOT ISN'T READY - if (task.requireReady && !this.readyTimestamp) return; - - console.log(`${bgBlue(`[${this.getTime()}]`)} [TASK: ${bgYellow(black(task.name))}] started.`); - const started = Date.now(); - try { - await task.execute(); - console.log(`${bgBlue(`[${this.getTime()}]`)} [TASK: ${bgGreen(black(task.name))}] executed in ${this.humanizeMilliseconds(Date.now() - started)}.`); - } catch (error) { - console.log(error); - } - } - - /** - * Handler that is run on messages and can - */ - processMonitors(message: Message): void { - for (const [id, monitor] of this.monitors) { - if (monitor.ignoreBots && message.createdByWebhookId) continue; - if (monitor.ignoreOthers && message.authorId !== this.user?.botId) continue; - if (monitor.ignoreEdits && message.updatedAt && message.updatedAt !== message.createdAt) continue; - // TODO: When the api supports using dm channels - // if (monitor.ignoreDM && !message.serverId) return; - void monitor.execute(message); - } - } - - /** - * Converts a number of milliseconds to a easy to read format(1d2h3m). - */ - humanizeMilliseconds(milliseconds: number): string { - // Gets ms into seconds - const time = milliseconds / 1_000; - if (time < 1) return "1s"; - - const days = Math.floor(time / 86_400); - const hours = Math.floor((time % 86_400) / 3_600); - const minutes = Math.floor(((time % 86_400) % 3_600) / 60); - const seconds = Math.floor(((time % 86_400) % 3_600) % 60); - - const dayString = days ? `${days}d ` : ""; - const hourString = hours ? `${hours}h ` : ""; - const minuteString = minutes ? `${minutes}m ` : ""; - const secondString = seconds ? `${seconds}s ` : ""; - - return `${dayString}${hourString}${minuteString}${secondString}`; - } - - /** - * Converts a text form(1d2h3m) of time to a number in milliseconds. - */ - stringToMilliseconds(text: string): number | undefined { - const matches = text.match(/(\d+[dhmsw|])/g); - if (!matches) return; - - let total = 0; - - for (const match of matches) { - // Finds the first of these letters - const validMatch = /([dhmsw])/.exec(match); - // if none of them were found cancel - if (!validMatch) return; - // Get the number which should be before the index of that match - const number = match.slice(0, Math.max(0, validMatch.index)); - // Get the letter that was found - const [letter] = validMatch; - if (!number ?? !letter) return; - - let multiplier = 1_000; - switch (letter.toLowerCase()) { - case `w`: - multiplier = 1_000 * 60 * 60 * 24 * 7; - break; - case `d`: - multiplier = 1_000 * 60 * 60 * 24; - break; - case `h`: - multiplier = 1_000 * 60 * 60; - break; - case `m`: - multiplier = 1_000 * 60; - break; - } - - const amount = number ? Number.parseInt(number, 10) : undefined; - if (!amount && amount !== 0) return; - - total += amount * multiplier; - } - - return total; - } - - /** - * Request some message(s) from a user in a channel. - */ - async needMessage(userId: string, channelId: string, options?: MessageCollectorOptions & { amount?: 1 }): Promise; - async needMessage(userId: string, channelId: string, options: MessageCollectorOptions & { amount?: number }): Promise; - async needMessage(userId: string, channelId: string, options?: MessageCollectorOptions): Promise { - const messages = await this.collectMessages({ - key: userId, - channelId, - createdAt: Date.now(), - filter: options?.filter ?? ((msg): boolean => userId === msg.createdById), - amount: options?.amount ?? 1, - // DEFAULTS TO 5 MINUTES - duration: options?.duration ?? 300_000, - }); - - return (options?.amount ?? 1) > 1 ? messages : messages[0]; - } - - /** - * Handler that will create a collecetor internally. Users should be using needMessage. - */ - async collectMessages(options: CollectMessagesOptions): Promise { - return new Promise((resolve, reject) => { - this.messageCollectors.get(options.key)?.reject("A new collector began before the user responded to the previous one."); - - this.messageCollectors.set(options.key, { - ...options, - messages: [], - resolve, - reject, - }); - }); - } - - /** - * Get a clean string form of the current time. For example: 12:00PM - */ - getTime(): string { - const now = new Date(); - const hours = now.getHours(); - const minute = now.getMinutes(); - - let hour = hours; - let amOrPm = `AM`; - if (hour > 12) { - amOrPm = `PM`; - hour -= 12; - } - - return `${hour >= 10 ? hour : `0${hour}`}:${minute >= 10 ? minute : `0${minute}`} ${amOrPm}`; - } - - /** - * Handler that is executed when a user is using a command too fast and goes into cooldown. Override this to customize the behavior. - */ - async cooldownReached(message: Message, command: Command, options: RespondToCooldownOption): Promise { - return message.reply(`You must wait **${this.humanizeMilliseconds(options.cooldown.timestamp - options.now)}** before using the *${command.fullName}* command again.`); - } + /** + * All your bot's monitors will be available here + */ + monitors = new Collection(); + + /** + * All your bot's commands will be available here + */ + commands = new Collection(); + + /** + * All your bot's arguments will be available here + */ + arguments = new Collection(); + + /** + * All your bot's inhibitors will be available here + */ + inhibitors = new Collection(); + + /** + * All your bot's tasks will be available here + */ + tasks = new Collection(); + + /** + * The bot's prefixes per server. + */ + prefixes = new Map(); + + /** + * The message collectors that are pending. + */ + messageCollectors = new Collection(); + + /** + * The path that the end users commands,monitors, inhibitors and others will be located. + */ + sourceFolderPath = this.options.sourceFolderPath ?? path.join(process.cwd(), "src/"); + + constructor( + public options: BotClientOptions, + autoInit = true, + ) { + super(options); + if (autoInit) void this.init(); + } + + /** + * Get the default client prefix. + */ + get prefix(): string { + return this.options.prefix; + } + + /** + * Get the bot's mention. Guilded api does not provide a way to dynamically detect this so for now its manual. + */ + get botMention(): string | undefined { + return this.options.botMention; + } + + // biome-ignore lint/suspicious/noExplicitAny: + async loadFile(result: any, dir: string, collection: Collection): Promise { + const [filename, file] = result; + const { name } = path.parse(filename); + const piece = file.default ? new file.default(this, name) : new file(this, name); + + let cmd: Command | undefined; + if (dir === "commands" && piece.parentCommand) { + const subcommandNames = piece.parentCommand.split("-"); + for (const subname of subcommandNames) { + // LOOK FOR MAIN COMMAND + if (!cmd) { + const mainCmd = collection.get(subname); + if (mainCmd) { + cmd = mainCmd as Command; + continue; + } + throw new Error(`You tried to create a subcommand named ${piece.name}. However, the parent command, ${subname}, was not found.`); + } + + const subcmd = cmd?.subcommands?.get(subname) as Command; + if (subcmd) { + cmd = subcmd; + } else { + throw new Error(`You tried to create a subcommand named ${piece.name} inside the main command ${cmd.name}. However, the parent command, ${subname}, was not found.`); + } + } + } + + if (cmd) { + if (!cmd.subcommands) cmd.subcommands = new Collection(); + cmd.subcommands.set(piece.name ?? name, piece); + } else { + collection.set(piece.name ?? name, piece); + } + + if (piece.init) await piece.init(); + } + + /** + * Prepares the bot to run. Ideally used for loading files to the bot. + */ + async init(): Promise { + await Promise.allSettled( + [ + ["monitors", this.monitors] as const, + ["commands", this.commands] as const, + ["arguments", this.arguments] as const, + ["inhibitors", this.inhibitors] as const, + ["tasks", this.tasks] as const, + ].map(async ([dir, collection]) => { + try { + for await (const result of walk(path.join(__dirname, dir))) { + await this.loadFile(result, dir, collection); + } + } catch (error) { + console.log(error); + } + }), + ).catch(() => null); + + // Load all end user files + await Promise.allSettled( + [ + ["monitors", this.monitors] as const, + ["commands", this.commands] as const, + ["arguments", this.arguments] as const, + ["inhibitors", this.inhibitors] as const, + ["tasks", this.tasks] as const, + ].map(async ([dir, collection]) => { + try { + for await (const result of walk(this.options.monitorDirPath ?? path.join(this.sourceFolderPath, dir))) { + await this.loadFile(result, dir, collection); + } + } catch (error) { + console.log(error); + } + }), + ).catch(() => null); + + this.initializeMessageListener(); + this.initializeTasks(); + } + + /** + * Allows users to override and customize the addition of a event listener + */ + initializeMessageListener(): void { + this.on("messageCreated", (message) => this.processMonitors(message)); + } + + /** + * Allows users to override and customize the initialization of scheduled task intervals. + */ + initializeTasks(): void { + // biome-ignore lint/complexity/noForEach: Legacy code + this.tasks.forEach(async (task) => { + // TASKS THAT NEED TO RUN IMMEDIATELY ARE EXECUTED FIRST + if (task.runOnStartup) await this.executeTask(task); + + // SET TIMEOUT WILL DETERMINE THE RIGHT TIME TO RUN THE TASK FIRST TIME AFTER STARTUP + setTimeout(async () => { + await this.executeTask(task); + + setInterval(async () => { + await this.executeTask(task); + }, task.millisecondsInterval); + }, Date.now() % task.millisecondsInterval); + }); + } + + /** + * Handler to execute a task when it is time. + */ + async executeTask(task: Task): Promise { + // IF TASK REQUIRES BOT BEING FULLY READY EXIT OUT IF BOT ISN'T READY + if (task.requireReady && !this.readyTimestamp) return; + + console.log(`${bgBlue(`[${this.getTime()}]`)} [TASK: ${bgYellow(black(task.name))}] started.`); + const started = Date.now(); + try { + await task.execute(); + console.log(`${bgBlue(`[${this.getTime()}]`)} [TASK: ${bgGreen(black(task.name))}] executed in ${this.humanizeMilliseconds(Date.now() - started)}.`); + } catch (error) { + console.log(error); + } + } + + /** + * Handler that is run on messages and can + */ + processMonitors(message: Message): void { + for (const [id, monitor] of this.monitors) { + if (monitor.ignoreBots && message.createdByWebhookId) continue; + if (monitor.ignoreOthers && message.authorId !== this.user?.botId) continue; + if (monitor.ignoreEdits && message.updatedAt && message.updatedAt !== message.createdAt) continue; + // TODO: When the api supports using dm channels + // if (monitor.ignoreDM && !message.serverId) return; + void monitor.execute(message); + } + } + + /** + * Converts a number of milliseconds to a easy to read format(1d2h3m). + */ + humanizeMilliseconds(milliseconds: number): string { + // Gets ms into seconds + const time = milliseconds / 1_000; + if (time < 1) return "1s"; + + const days = Math.floor(time / 86_400); + const hours = Math.floor((time % 86_400) / 3_600); + const minutes = Math.floor(((time % 86_400) % 3_600) / 60); + const seconds = Math.floor(((time % 86_400) % 3_600) % 60); + + const dayString = days ? `${days}d ` : ""; + const hourString = hours ? `${hours}h ` : ""; + const minuteString = minutes ? `${minutes}m ` : ""; + const secondString = seconds ? `${seconds}s ` : ""; + + return `${dayString}${hourString}${minuteString}${secondString}`; + } + + /** + * Converts a text form(1d2h3m) of time to a number in milliseconds. + */ + stringToMilliseconds(text: string): number | undefined { + const matches = text.match(/(\d+[dhmsw|])/g); + if (!matches) return; + + let total = 0; + + for (const match of matches) { + // Finds the first of these letters + const validMatch = /([dhmsw])/.exec(match); + // if none of them were found cancel + if (!validMatch) return; + // Get the number which should be before the index of that match + const number = match.slice(0, Math.max(0, validMatch.index)); + // Get the letter that was found + const [letter] = validMatch; + if (!number ?? !letter) return; + + let multiplier = 1_000; + switch (letter.toLowerCase()) { + case "w": + multiplier = 1_000 * 60 * 60 * 24 * 7; + break; + case "d": + multiplier = 1_000 * 60 * 60 * 24; + break; + case "h": + multiplier = 1_000 * 60 * 60; + break; + case "m": + multiplier = 1_000 * 60; + break; + } + + const amount = number ? Number.parseInt(number, 10) : undefined; + if (!amount && amount !== 0) return; + + total += amount * multiplier; + } + + return total; + } + + /** + * Request some message(s) from a user in a channel. + */ + async needMessage( + userId: string, + channelId: string, + options?: MessageCollectorOptions & { + amount?: 1; + }, + ): Promise; + async needMessage( + userId: string, + channelId: string, + options: MessageCollectorOptions & { + amount?: number; + }, + ): Promise; + async needMessage(userId: string, channelId: string, options?: MessageCollectorOptions): Promise { + const messages = await this.collectMessages({ + key: userId, + channelId, + createdAt: Date.now(), + filter: options?.filter ?? ((msg): boolean => userId === msg.createdById), + amount: options?.amount ?? 1, + // DEFAULTS TO 5 MINUTES + duration: options?.duration ?? 300_000, + }); + + return (options?.amount ?? 1) > 1 ? messages : messages[0]; + } + + /** + * Handler that will create a collecetor internally. Users should be using needMessage. + */ + async collectMessages(options: CollectMessagesOptions): Promise { + return new Promise((resolve, reject) => { + this.messageCollectors.get(options.key)?.reject("A new collector began before the user responded to the previous one."); + + this.messageCollectors.set(options.key, { + ...options, + messages: [], + resolve, + reject, + }); + }); + } + + /** + * Get a clean string form of the current time. For example: 12:00PM + */ + getTime(): string { + const now = new Date(); + const hours = now.getHours(); + const minute = now.getMinutes(); + + let hour = hours; + let amOrPm = "AM"; + if (hour > 12) { + amOrPm = "PM"; + hour -= 12; + } + + return `${hour >= 10 ? hour : `0${hour}`}:${minute >= 10 ? minute : `0${minute}`} ${amOrPm}`; + } + + /** + * Handler that is executed when a user is using a command too fast and goes into cooldown. Override this to customize the behavior. + */ + async cooldownReached(message: Message, command: Command, options: RespondToCooldownOption): Promise { + return message.reply(`You must wait **${this.humanizeMilliseconds(options.cooldown.timestamp - options.now)}** before using the *${command.fullName}* command again.`); + } } // export interface BotClientOptions extends ClientOptions { export type BotClientOptions = { - /** - * The bot mention. Most likely @botname This is required as Guilded does not currently give any way to dynamically detect the mention. - */ - botMention?: string; - /** - * The path to a custom dir where commands are located. - */ - commandDirPath?: string; - /** - * The path to a custom dir where the inhibitors are located - */ - inhibitorDirPath?: string; - /** - * The path to a custom dir where the monitors are located - */ - monitorDirPath?: string; - /** - * The prefix that will be used to determine if a message is executing a command. - */ - prefix: string; - /** - * The path that the end users commands, monitors, inhibitors and others will be located. - */ - sourceFolderPath?: string; - // TODO: THESE ARE REMOVED WHEN EXTENDS IS fixed - token: string; + /** + * The bot mention. Most likely @botname This is required as Guilded does not currently give any way to dynamically detect the mention. + */ + botMention?: string; + /** + * The path to a custom dir where commands are located. + */ + commandDirPath?: string; + /** + * The path to a custom dir where the inhibitors are located + */ + inhibitorDirPath?: string; + /** + * The path to a custom dir where the monitors are located + */ + monitorDirPath?: string; + /** + * The prefix that will be used to determine if a message is executing a command. + */ + prefix: string; + /** + * The path that the end users commands, monitors, inhibitors and others will be located. + */ + sourceFolderPath?: string; + // TODO: THESE ARE REMOVED WHEN EXTENDS IS fixed + token: string; }; export type MessageCollectorOptions = { - /** - * The amount of messages to collect before resolving. Defaults to 1 - */ - amount?: number; - /** - * The amount of milliseconds this should collect for before expiring. Defaults to 5 minutes. - */ - duration?: number; - /** - * Function that will filter messages to determine whether to collect this message. Defaults to making sure the message is sent by the same member. - */ - filter?(message: Message): boolean; + /** + * The amount of messages to collect before resolving. Defaults to 1 + */ + amount?: number; + /** + * The amount of milliseconds this should collect for before expiring. Defaults to 5 minutes. + */ + duration?: number; + /** + * Function that will filter messages to determine whether to collect this message. Defaults to making sure the message is sent by the same member. + */ + filter?(message: Message): boolean; }; export type CollectMessagesOptions = { - /** - * The amount of messages to collect before resolving. - */ - amount: number; - /** - * The channel Id where this is listening to - */ - channelId: string; - /** - * The timestamp when this collector was created - */ - createdAt: number; - /** - * The duration in milliseconds how long this collector should last. - */ - duration: number; - /** - * Function that will filter messages to determine whether to collect this message - */ - filter(message: Message): boolean; - /** - * The unique key that will be used to get responses for this. Ideally, meant to be for member id. - */ - key: string; + /** + * The amount of messages to collect before resolving. + */ + amount: number; + /** + * The channel Id where this is listening to + */ + channelId: string; + /** + * The timestamp when this collector was created + */ + createdAt: number; + /** + * The duration in milliseconds how long this collector should last. + */ + duration: number; + /** + * Function that will filter messages to determine whether to collect this message + */ + filter(message: Message): boolean; + /** + * The unique key that will be used to get responses for this. Ideally, meant to be for member id. + */ + key: string; }; export type GilMessageCollector = CollectMessagesOptions & { - /** - * Where the messages are stored if the amount to collect is more than 1. - */ - messages: Message[]; - reject(reason?: any): void; - resolve(value: Message[] | PromiseLike): void; + /** + * Where the messages are stored if the amount to collect is more than 1. + */ + messages: Message[]; + reject(reason?: unknown): void; + resolve(value: Message[] | PromiseLike): void; }; export default BotClient; export type RespondToCooldownOption = { - /** - * The cooldown details - */ - cooldown: Cooldown; - /** - * The timestamp right when the user used the command. - */ - now: number; + /** + * The cooldown details + */ + cooldown: Cooldown; + /** + * The timestamp right when the user used the command. + */ + now: number; }; diff --git a/packages/gil/lib/arguments/...string.ts b/packages/gil/lib/arguments/...string.ts index 4328fe45..dc958c92 100644 --- a/packages/gil/lib/arguments/...string.ts +++ b/packages/gil/lib/arguments/...string.ts @@ -2,17 +2,17 @@ import { Argument } from "../structures/Argument"; import type { CommandArgument } from "../structures/Command"; export class RemainingStringArgument extends Argument { - name = "...string"; + name = "...string"; - execute(argument: CommandArgument, parameters: string[]): string | undefined { - if (!parameters.length) return; + execute(argument: CommandArgument, parameters: string[]): string | undefined { + if (!parameters.length) return; - return argument.lowercase ? parameters.join(" ").toLowerCase() : parameters.join(" "); - } + return argument.lowercase ? parameters.join(" ").toLowerCase() : parameters.join(" "); + } - init(): void { - // shut up eslint - } + init(): void { + // shut up eslint + } } export default RemainingStringArgument; diff --git a/packages/gil/lib/arguments/boolean.ts b/packages/gil/lib/arguments/boolean.ts index 87997f37..7ddf8741 100644 --- a/packages/gil/lib/arguments/boolean.ts +++ b/packages/gil/lib/arguments/boolean.ts @@ -2,19 +2,19 @@ import { Argument } from "../structures/Argument"; import type { CommandArgument } from "../structures/Command"; export class BooleanArgument extends Argument { - name = "boolean"; + name = "boolean"; - execute(argument: CommandArgument, parameters: string[]): boolean | undefined { - const [boolean] = parameters; + execute(argument: CommandArgument, parameters: string[]): boolean | undefined { + const [boolean] = parameters; - if (["true", "false", "on", "off", "enable", "disable"].includes(boolean)) { - return ["true", "on", "enable"].includes(boolean); - } - } + if (["true", "false", "on", "off", "enable", "disable"].includes(boolean)) { + return ["true", "on", "enable"].includes(boolean); + } + } - init(): void { - // shut up eslint - } + init(): void { + // shut up eslint + } } export default BooleanArgument; diff --git a/packages/gil/lib/arguments/command.ts b/packages/gil/lib/arguments/command.ts index 2285ea4a..78812f3f 100644 --- a/packages/gil/lib/arguments/command.ts +++ b/packages/gil/lib/arguments/command.ts @@ -2,23 +2,23 @@ import { Argument } from "../structures/Argument"; import type { Command, CommandArgument } from "../structures/Command"; export class CommandTypeArgument extends Argument { - name = "command"; + name = "command"; - execute(argument: CommandArgument, parameters: string[]): Command | undefined { - const [name] = parameters; - if (!name) return; + execute(argument: CommandArgument, parameters: string[]): Command | undefined { + const [name] = parameters; + if (!name) return; - const commandName = name.toLowerCase(); - const command = this.client.commands.get(commandName); - if (command) return command; + const commandName = name.toLowerCase(); + const command = this.client.commands.get(commandName); + if (command) return command; - // Check if its an alias - return this.client.commands.find((cmd) => Boolean(cmd.aliases?.includes(commandName))); - } + // Check if its an alias + return this.client.commands.find((cmd) => Boolean(cmd.aliases?.includes(commandName))); + } - init(): void { - // shut up eslint - } + init(): void { + // shut up eslint + } } export default CommandTypeArgument; diff --git a/packages/gil/lib/arguments/duration.ts b/packages/gil/lib/arguments/duration.ts index 1d3bf783..cf7498b8 100644 --- a/packages/gil/lib/arguments/duration.ts +++ b/packages/gil/lib/arguments/duration.ts @@ -2,18 +2,18 @@ import { Argument } from "../structures/Argument"; import type { CommandArgument } from "../structures/Command"; export class DurationArgument extends Argument { - name = "duration"; + name = "duration"; - execute(argument: CommandArgument, parameters: string[]): number | undefined { - const [time] = parameters; - if (!time) return; + execute(argument: CommandArgument, parameters: string[]): number | undefined { + const [time] = parameters; + if (!time) return; - return this.client.stringToMilliseconds(time); - } + return this.client.stringToMilliseconds(time); + } - init(): void { - // shut up eslint - } + init(): void { + // shut up eslint + } } export default DurationArgument; diff --git a/packages/gil/lib/arguments/number.ts b/packages/gil/lib/arguments/number.ts index ef23dc14..c2bb831e 100644 --- a/packages/gil/lib/arguments/number.ts +++ b/packages/gil/lib/arguments/number.ts @@ -2,24 +2,24 @@ import { Argument } from "../structures/Argument"; import type { CommandArgument } from "../structures/Command"; export class NumberArgument extends Argument { - name = "number"; + name = "number"; - execute(argument: CommandArgument, parameters: string[]): number | undefined { - const [number] = parameters; + execute(argument: CommandArgument, parameters: string[]): number | undefined { + const [number] = parameters; - const valid = Number(number); - if (!valid) return; + const valid = Number(number); + if (!valid) return; - if (valid < (argument.minimum || 0)) return; - if (argument.maximum && valid > argument.maximum) return; - if (!argument.allowDecimals) return Math.floor(valid); + if (valid < (argument.minimum || 0)) return; + if (argument.maximum && valid > argument.maximum) return; + if (!argument.allowDecimals) return Math.floor(valid); - if (valid) return valid; - } + if (valid) return valid; + } - init(): void { - // shut up eslint - } + init(): void { + // shut up eslint + } } export default NumberArgument; diff --git a/packages/gil/lib/arguments/string.ts b/packages/gil/lib/arguments/string.ts index 49766766..ea70a204 100644 --- a/packages/gil/lib/arguments/string.ts +++ b/packages/gil/lib/arguments/string.ts @@ -2,23 +2,23 @@ import { Argument } from "../structures/Argument"; import type { CommandArgument } from "../structures/Command"; export class StringArgument extends Argument { - name = "string"; + name = "string"; - execute(argument: CommandArgument, parameters: string[]): string | undefined { - const [text] = parameters; + execute(argument: CommandArgument, parameters: string[]): string | undefined { + const [text] = parameters; - const valid = - // If the argument required literals and some string was provided by user - argument.literals?.length && text ? (argument.literals.includes(text.toLowerCase()) ? text : undefined) : text; + const valid = + // If the argument required literals and some string was provided by user + argument.literals?.length && text ? (argument.literals.includes(text.toLowerCase()) ? text : undefined) : text; - if (valid) { - return argument.lowercase ? valid.toLowerCase() : valid; - } - } + if (valid) { + return argument.lowercase ? valid.toLowerCase() : valid; + } + } - init(): void { - // shut up eslint - } + init(): void { + // shut up eslint + } } export default StringArgument; diff --git a/packages/gil/lib/arguments/subcommand.ts b/packages/gil/lib/arguments/subcommand.ts index 3beacbb8..545a8ec7 100644 --- a/packages/gil/lib/arguments/subcommand.ts +++ b/packages/gil/lib/arguments/subcommand.ts @@ -3,21 +3,21 @@ import { Argument } from "../structures/Argument"; import type { Command, CommandArgument } from "../structures/Command"; export class SubcommandArgument extends Argument { - name = "subcommand"; + name = "subcommand"; - execute(argument: CommandArgument, parameters: string[], message: Message, command: Command): Command | undefined { - const subcommandName = parameters[0]?.toLowerCase(); - if (!subcommandName) return; + execute(argument: CommandArgument, parameters: string[], message: Message, command: Command): Command | undefined { + const subcommandName = parameters[0]?.toLowerCase(); + if (!subcommandName) return; - const sub = command.subcommands?.find((sub) => sub.name === subcommandName || Boolean(sub.aliases?.includes(subcommandName))); - if (sub) return sub; + const sub = command.subcommands?.find((sub) => sub.name === subcommandName || Boolean(sub.aliases?.includes(subcommandName))); + if (sub) return sub; - return typeof argument.defaultValue === "string" ? command.subcommands?.get(argument.defaultValue) : undefined; - } + return typeof argument.defaultValue === "string" ? command.subcommands?.get(argument.defaultValue) : undefined; + } - init(): void { - // shut up eslint - } + init(): void { + // shut up eslint + } } export default SubcommandArgument; diff --git a/packages/gil/lib/commands/ping.ts b/packages/gil/lib/commands/ping.ts index f2b5f308..f8d6bc43 100644 --- a/packages/gil/lib/commands/ping.ts +++ b/packages/gil/lib/commands/ping.ts @@ -2,15 +2,15 @@ import type { Message } from "guilded.js"; import { Command } from "../structures/Command"; export class PingCommand extends Command { - name = "ping"; + name = "ping"; - execute(message: Message): any { - return this.client.messages.send(message.channelId, "Pong"); - } + execute(message: Message) { + return this.client.messages.send(message.channelId, "Pong"); + } - init(): void { - // comment to shut up eslint error - } + init(): void { + // comment to shut up eslint error + } } export default PingCommand; diff --git a/packages/gil/lib/inhibitors/allowedIn.ts b/packages/gil/lib/inhibitors/allowedIn.ts index 15aaf9c1..b7fb79d6 100644 --- a/packages/gil/lib/inhibitors/allowedIn.ts +++ b/packages/gil/lib/inhibitors/allowedIn.ts @@ -3,24 +3,24 @@ import type { Command } from "../structures/Command"; import { Inhibitor } from "../structures/Inhibitor"; export class AllowedInInhibitor extends Inhibitor { - name = "allowedIn"; + name = "allowedIn"; - execute(message: Message, command: Command): boolean { - // The command should be allowed to run because it meets the requirements - // allowedIn defaults to ["server"] - if ((!command.allowedIn || command.allowedIn.includes("server")) && message.serverId) return false; + execute(message: Message, command: Command): boolean { + // The command should be allowed to run because it meets the requirements + // allowedIn defaults to ["server"] + if ((!command.allowedIn || command.allowedIn.includes("server")) && message.serverId) return false; - // If the command is allowed in dms - if (command.allowedIn?.includes("dm") && !message.serverId) return false; + // If the command is allowed in dms + if (command.allowedIn?.includes("dm") && !message.serverId) return false; - // THE COMMANDS NEEDS TO BE INHIBITED. - console.log(`${command.name} Inhibited: ALLOWED IN`); - return true; - } + // THE COMMANDS NEEDS TO BE INHIBITED. + console.log(`${command.name} Inhibited: ALLOWED IN`); + return true; + } - init(): void { - // shut up eslint - } + init(): void { + // shut up eslint + } } export default AllowedInInhibitor; diff --git a/packages/gil/lib/inhibitors/cooldown.ts b/packages/gil/lib/inhibitors/cooldown.ts index 0344b8f5..480e53b7 100644 --- a/packages/gil/lib/inhibitors/cooldown.ts +++ b/packages/gil/lib/inhibitors/cooldown.ts @@ -4,60 +4,60 @@ import type { Command } from "../structures/Command"; import { Inhibitor } from "../structures/Inhibitor"; export class CooldownInhibitor extends Inhibitor { - name = "cooldown"; - - /** - * The collection of users that are in cooldown - */ - membersInCooldown = new Collection(); - - async execute(message: Message, command: Command): Promise { - if (!command.cooldown) return false; - - const key = `${message.createdById}-${command.name}`; - const cooldown = this.membersInCooldown.get(key); - if (cooldown) { - if (cooldown.used >= (command.cooldown.allowedUses || 1)) { - const now = Date.now(); - if (cooldown.timestamp > now) { - await this.client.cooldownReached(message, command, { - now, - cooldown, - }); - return true; - } - - cooldown.used = 0; - } - - this.membersInCooldown.set(key, { - used: cooldown.used + 1, - timestamp: Date.now() + command.cooldown.seconds * 1_000, - }); - return false; - } - - this.membersInCooldown.set(key, { - used: 1, - timestamp: Date.now() + command.cooldown.seconds * 1_000, - }); - return false; - } - - init(): void { - // shut up eslint - } + name = "cooldown"; + + /** + * The collection of users that are in cooldown + */ + membersInCooldown = new Collection(); + + async execute(message: Message, command: Command): Promise { + if (!command.cooldown) return false; + + const key = `${message.createdById}-${command.name}`; + const cooldown = this.membersInCooldown.get(key); + if (cooldown) { + if (cooldown.used >= (command.cooldown.allowedUses || 1)) { + const now = Date.now(); + if (cooldown.timestamp > now) { + await this.client.cooldownReached(message, command, { + now, + cooldown, + }); + return true; + } + + cooldown.used = 0; + } + + this.membersInCooldown.set(key, { + used: cooldown.used + 1, + timestamp: Date.now() + command.cooldown.seconds * 1_000, + }); + return false; + } + + this.membersInCooldown.set(key, { + used: 1, + timestamp: Date.now() + command.cooldown.seconds * 1_000, + }); + return false; + } + + init(): void { + // shut up eslint + } } export type Cooldown = { - /** - * The timestamp when this command should be available to use again. - */ - timestamp: number; - /** - * The amount of times a command was used. - */ - used: number; + /** + * The timestamp when this command should be available to use again. + */ + timestamp: number; + /** + * The amount of times a command was used. + */ + used: number; }; export default CooldownInhibitor; diff --git a/packages/gil/lib/monitors/commands.ts b/packages/gil/lib/monitors/commands.ts index db094524..9a85aae4 100644 --- a/packages/gil/lib/monitors/commands.ts +++ b/packages/gil/lib/monitors/commands.ts @@ -4,189 +4,195 @@ import type { Command } from "../structures/Command"; import { Monitor } from "../structures/Monitor"; export class CommandsMonitor extends Monitor { - // Commands should not ignore dms. - ignoreDM = false; - - execute(message: Message): unknown { - let prefix = this.parsePrefix(message.serverId); - - // If the message is not using the valid prefix or bot mention cancel the command - // IF THE MESSAGE IS ONLY BOT MENTION, SEND THE PREFIX - if (this.client.botMention) { - if (this.client.botMention === message.content) return this.client.messages.send(message.channelId, { content: this.parsePrefix(message.serverId), replyMessageIds: [message.id] }); - // IF THE MESSAGE STARTS WITH BOT MENTION, USE MENTION AS PREFIX - else if (message.content.startsWith(this.client.botMention)) prefix = this.client.botMention; - } - - // IF NO PREFIX IS USED, CANCEL - if (!message.content.startsWith(prefix)) return; - - // `!ping testing` becomes `ping` - const [commandName, ...parameters] = message.content.slice(prefix.length).split(" "); - - // Check if this is a valid command - const command = this.parseCommand(commandName); - if (!command) return; - - this.logCommand(message, "Trigger", commandName); - - // TODO: implement a global user cooldown system - - void this.executeCommand(message, command, parameters); - } - - parsePrefix(serverId?: string | null): string { - const prefix = serverId ? this.client.prefixes.get(serverId) : this.client.prefix; - return prefix ?? this.client.prefix; - } - - parseCommand(commandName: string): Command | undefined { - commandName = commandName.toLowerCase(); - const command = this.client.commands.get(commandName); - if (command) return command; - - // Check aliases if the command wasn't found - return this.client.commands.find((cmd) => Boolean(cmd.aliases?.includes(commandName))); - } - - logCommand(message: Message, type: "Failure" | "Inhibit" | "Missing" | "Slowmode" | "Success" | "Trigger", commandName: string): void { - // TODO: use server name when available in api - const serverName = message.serverId ?? "DM"; - - const command = `[COMMAND: ${bgYellow(black(commandName ?? "Unknown"))} - ${bgBlack( - ["Failure", "Slowmode", "Missing"].includes(type) ? red(type) : type === "Success" ? green(type) : white(type), - )}]`; - - // TODO: use message author tag or name here - const user = bgGreen(black(`${""}(${message.createdById})`)); - const guild = bgMagenta(black(`${serverName}${message.serverId ? `(${message.serverId})` : ""}`)); - - console.log(`${bgBlue(`[${this.client.getTime()}]`)} ${command} by ${user} in ${guild} with Message ID: ${message.id}`); - } - - async executeCommand(message: Message, command: Command, parameters: string[]): Promise { - try { - // bot.slowmode.set(message.author.id, message.timestamp); - - // Parsed args and validated - const args = await this.parseArguments(message, command, parameters); - // Some arg that was required was missing and handled already - if (!args) { - this.logCommand(message, "Missing", command.name); - return; - } - - // If no subcommand execute the command - const [argument] = command.arguments ?? []; - const subcommand = argument ? (args[argument.name] as Command) : undefined; - - if (!argument || argument.type !== "subcommand" || !subcommand) { - // Check subcommand permissions and options - if (!(await this.commandAllowed(message, command))) return; - - await command.execute?.(message, args); - this.logCommand(message, "Success", command.parentCommand ? `${command.parentCommand}-${command.name}` : command.name); - return; - } - - // A subcommand was asked for in this command - if ([subcommand.name, ...(subcommand.aliases ?? [])].includes(parameters[0])) { - const subParameters = parameters.slice(1); - void this.executeCommand(message, subcommand, subParameters); - } else { - void this.executeCommand(message, subcommand, parameters); - } - } catch (error) { - console.error(error); - this.logCommand(message, "Failure", command.name); - } - } - - async parseArguments(message: Message, command: Command, parameters: string[]): Promise | false> { - const args: { [key: string]: unknown } = {}; - if (!command.arguments) return args; - - let missingRequiredArg = false; - - // Clone the parameters so we can modify it without editing original array - const params = [...parameters]; - - // Loop over each argument and validate - for (const argument of command.arguments) { - const resolver = this.client.arguments.get(argument.type ?? "string"); - if (!resolver) continue; - - const result = await resolver.execute(argument, params, message, command); - if (result !== undefined) { - // Assign the valid argument - args[argument.name] = result; - // This will use up all args so immediately exist the loop. - if (argument.type && ["subcommands", "...strings", "...roles", "...emojis", "...snowflakes"].includes(argument.type)) { - break; - } - - // Remove a param for the next argument - params.shift(); - continue; - } - - // Invalid arg provided. - if (Object.hasOwn(argument, "defaultValue")) { - args[argument.name] = argument.defaultValue; - } else if (argument.required !== false) { - if (argument.missing) { - missingRequiredArg = true; - argument.missing?.(message); - break; - } - - // A REQUIRED ARG WAS MISSING TRY TO COLLECT IT - // TODO: perm check before sending - const question = await this.client.messages.send(message.channelId, { - content: `You were missing the **${argument.name}** argument which is required in that command. Please provide the **${ - argument.type === "subcommand" ? command.subcommands?.map((sub) => sub.name).join(", ") ?? "subcommand" : argument.type - }** now.`, - replyMessageIds: [message.id], - }); - if (question) { - const response = await this.client.needMessage(message.createdById, message.channelId); - if (response) { - const responseArg = await resolver.execute(argument, [response.content], message, command); - if (responseArg) { - args[argument.name] = responseArg; - params.shift(); - // TODO: perm checks to delete message - await Promise.all([this.client.messages.delete(message.channelId, message.id), this.client.messages.delete(message.channelId, response.id)]); - continue; - } - } - } - - missingRequiredArg = true; - // @ts-expect-error fix this dumb error. TODO: idk why this is erroring - argument.missing?.(message); - break; - } - } - - // If an arg was missing then return false so we can error out as an object {} will always be truthy - return missingRequiredArg ? false : args; - } - - async commandAllowed(message: Message, command: Command): Promise { - const inhibitorResults = await Promise.all([...this.client.inhibitors.values()].map((inhibitor) => inhibitor.execute(message, command))); - - if (inhibitorResults.includes(true)) { - this.logCommand(message, "Inhibit", command.name); - return false; - } - - return true; - } - - init(): unknown { - return void 0; - } + // Commands should not ignore dms. + ignoreDM = false; + + execute(message: Message): unknown { + let prefix = this.parsePrefix(message.serverId); + + // If the message is not using the valid prefix or bot mention cancel the command + // IF THE MESSAGE IS ONLY BOT MENTION, SEND THE PREFIX + if (this.client.botMention) { + if (this.client.botMention === message.content) + return this.client.messages.send(message.channelId, { + content: this.parsePrefix(message.serverId), + replyMessageIds: [message.id], + }); + // IF THE MESSAGE STARTS WITH BOT MENTION, USE MENTION AS PREFIX + if (message.content.startsWith(this.client.botMention)) prefix = this.client.botMention; + } + + // IF NO PREFIX IS USED, CANCEL + if (!message.content.startsWith(prefix)) return; + + // `!ping testing` becomes `ping` + const [commandName, ...parameters] = message.content.slice(prefix.length).split(" "); + + // Check if this is a valid command + const command = this.parseCommand(commandName); + if (!command) return; + + this.logCommand(message, "Trigger", commandName); + + // TODO: implement a global user cooldown system + + void this.executeCommand(message, command, parameters); + } + + parsePrefix(serverId?: string | null): string { + const prefix = serverId ? this.client.prefixes.get(serverId) : this.client.prefix; + return prefix ?? this.client.prefix; + } + + parseCommand(commandName: string): Command | undefined { + commandName = commandName.toLowerCase(); + const command = this.client.commands.get(commandName); + if (command) return command; + + // Check aliases if the command wasn't found + return this.client.commands.find((cmd) => Boolean(cmd.aliases?.includes(commandName))); + } + + logCommand(message: Message, type: "Failure" | "Inhibit" | "Missing" | "Slowmode" | "Success" | "Trigger", commandName: string): void { + // TODO: use server name when available in api + const serverName = message.serverId ?? "DM"; + + const command = `[COMMAND: ${bgYellow(black(commandName ?? "Unknown"))} - ${bgBlack( + ["Failure", "Slowmode", "Missing"].includes(type) ? red(type) : type === "Success" ? green(type) : white(type), + )}]`; + + // TODO: use message author tag or name here + const user = bgGreen(black(`${""}(${message.createdById})`)); + const guild = bgMagenta(black(`${serverName}${message.serverId ? `(${message.serverId})` : ""}`)); + + console.log(`${bgBlue(`[${this.client.getTime()}]`)} ${command} by ${user} in ${guild} with Message ID: ${message.id}`); + } + + async executeCommand(message: Message, command: Command, parameters: string[]): Promise { + try { + // bot.slowmode.set(message.author.id, message.timestamp); + + // Parsed args and validated + const args = await this.parseArguments(message, command, parameters); + // Some arg that was required was missing and handled already + if (!args) { + this.logCommand(message, "Missing", command.name); + return; + } + + // If no subcommand execute the command + const [argument] = command.arguments ?? []; + const subcommand = argument ? (args[argument.name] as Command) : undefined; + + if (!argument || argument.type !== "subcommand" || !subcommand) { + // Check subcommand permissions and options + if (!(await this.commandAllowed(message, command))) return; + + await command.execute?.(message, args); + this.logCommand(message, "Success", command.parentCommand ? `${command.parentCommand}-${command.name}` : command.name); + return; + } + + // A subcommand was asked for in this command + if ([subcommand.name, ...(subcommand.aliases ?? [])].includes(parameters[0])) { + const subParameters = parameters.slice(1); + void this.executeCommand(message, subcommand, subParameters); + } else { + void this.executeCommand(message, subcommand, parameters); + } + } catch (error) { + console.error(error); + this.logCommand(message, "Failure", command.name); + } + } + + async parseArguments(message: Message, command: Command, parameters: string[]): Promise | false> { + const args: { + [key: string]: unknown; + } = {}; + if (!command.arguments) return args; + + let missingRequiredArg = false; + + // Clone the parameters so we can modify it without editing original array + const params = [...parameters]; + + // Loop over each argument and validate + for (const argument of command.arguments) { + const resolver = this.client.arguments.get(argument.type ?? "string"); + if (!resolver) continue; + + const result = await resolver.execute(argument, params, message, command); + if (result !== undefined) { + // Assign the valid argument + args[argument.name] = result; + // This will use up all args so immediately exist the loop. + if (argument.type && ["subcommands", "...strings", "...roles", "...emojis", "...snowflakes"].includes(argument.type)) { + break; + } + + // Remove a param for the next argument + params.shift(); + continue; + } + + // Invalid arg provided. + if (Object.hasOwn(argument, "defaultValue")) { + args[argument.name] = argument.defaultValue; + } else if (argument.required !== false) { + if (argument.missing) { + missingRequiredArg = true; + argument.missing?.(message); + break; + } + + // A REQUIRED ARG WAS MISSING TRY TO COLLECT IT + // TODO: perm check before sending + const question = await this.client.messages.send(message.channelId, { + content: `You were missing the **${argument.name}** argument which is required in that command. Please provide the **${ + argument.type === "subcommand" ? command.subcommands?.map((sub) => sub.name).join(", ") ?? "subcommand" : argument.type + }** now.`, + replyMessageIds: [message.id], + }); + if (question) { + const response = await this.client.needMessage(message.createdById, message.channelId); + if (response) { + const responseArg = await resolver.execute(argument, [response.content], message, command); + if (responseArg) { + args[argument.name] = responseArg; + params.shift(); + // TODO: perm checks to delete message + await Promise.all([this.client.messages.delete(message.channelId, message.id), this.client.messages.delete(message.channelId, response.id)]); + continue; + } + } + } + + missingRequiredArg = true; + // @ts-expect-error fix this dumb error. TODO: idk why this is erroring + argument.missing?.(message); + break; + } + } + + // If an arg was missing then return false so we can error out as an object {} will always be truthy + return missingRequiredArg ? false : args; + } + + async commandAllowed(message: Message, command: Command): Promise { + const inhibitorResults = await Promise.all([...this.client.inhibitors.values()].map((inhibitor) => inhibitor.execute(message, command))); + + if (inhibitorResults.includes(true)) { + this.logCommand(message, "Inhibit", command.name); + return false; + } + + return true; + } + + init(): unknown { + return; + } } export default CommandsMonitor; diff --git a/packages/gil/lib/monitors/messageCollector.ts b/packages/gil/lib/monitors/messageCollector.ts index 354ced46..98df6a56 100644 --- a/packages/gil/lib/monitors/messageCollector.ts +++ b/packages/gil/lib/monitors/messageCollector.ts @@ -2,29 +2,29 @@ import type { Message } from "guilded.js"; import { Monitor } from "../structures/Monitor"; export class MessageCollectorMonitor extends Monitor { - execute(message: Message): void { - const collector = this.client.messageCollectors.get(message.createdById); - // This user has no collectors pending or the message is in a different channel - if (!collector || message.channelId !== collector.channelId) return; - // This message is a response to a collector. Now running the filter function. - if (!collector.filter(message)) return; + execute(message: Message): void { + const collector = this.client.messageCollectors.get(message.createdById); + // This user has no collectors pending or the message is in a different channel + if (!collector || message.channelId !== collector.channelId) return; + // This message is a response to a collector. Now running the filter function. + if (!collector.filter(message)) return; - // If the necessary amount has been collected - if (collector.amount === 1 || collector.amount === collector.messages.length + 1) { - // Remove the collector - this.client.messageCollectors.delete(message.createdById); - // Resolve the collector - collector.resolve([...collector.messages, message]); - return; - } + // If the necessary amount has been collected + if (collector.amount === 1 || collector.amount === collector.messages.length + 1) { + // Remove the collector + this.client.messageCollectors.delete(message.createdById); + // Resolve the collector + collector.resolve([...collector.messages, message]); + return; + } - // More messages still need to be collected - collector.messages.push(message); - } + // More messages still need to be collected + collector.messages.push(message); + } - init(): void { - // shut up eslint - } + init(): void { + // shut up eslint + } } export default MessageCollectorMonitor; diff --git a/packages/gil/lib/structures/Argument.ts b/packages/gil/lib/structures/Argument.ts index 738a1160..5322eaaf 100644 --- a/packages/gil/lib/structures/Argument.ts +++ b/packages/gil/lib/structures/Argument.ts @@ -3,11 +3,14 @@ import type { BotClient } from "../BotClient"; import type { Command, CommandArgument } from "./Command"; export abstract class Argument { - constructor(public readonly client: BotClient, public name: string) {} + constructor( + public readonly client: BotClient, + public name: string, + ) {} - abstract execute(argument: CommandArgument, parameters: string[], message: Message, command: Command): Promise | unknown; + abstract execute(argument: CommandArgument, parameters: string[], message: Message, command: Command): Promise | unknown; - abstract init(): Promise | unknown; + abstract init(): Promise | unknown; } export default Argument; diff --git a/packages/gil/lib/structures/Command.ts b/packages/gil/lib/structures/Command.ts index 118f607a..8659b16e 100644 --- a/packages/gil/lib/structures/Command.ts +++ b/packages/gil/lib/structures/Command.ts @@ -3,96 +3,99 @@ import type { Message } from "guilded.js"; import type { BotClient } from "../BotClient"; export abstract class Command { - /** - * The command aliases are stored here. - */ - aliases?: string[]; + /** + * The command aliases are stored here. + */ + aliases?: string[]; - /** - * The arguments you wish to request from the user. - */ - arguments?: readonly CommandArgument[]; + /** + * The arguments you wish to request from the user. + */ + arguments?: readonly CommandArgument[]; - /** - * Where is this command allowed to run in? By default, it is allowed to run in a server only! - */ - allowedIn?: ("dm" | "server")[] = ["server"]; + /** + * Where is this command allowed to run in? By default, it is allowed to run in a server only! + */ + allowedIn?: ("dm" | "server")[] = ["server"]; - /** - * The description of the command - */ - description?: string; + /** + * The description of the command + */ + description?: string; - /** - * The cooldown settings for this command. - */ - cooldown?: { - allowedUses?: number; - seconds: number; - }; + /** + * The cooldown settings for this command. + */ + cooldown?: { + allowedUses?: number; + seconds: number; + }; - /** - * The subcommands for this command. - */ - subcommands?: Collection; + /** + * The subcommands for this command. + */ + subcommands?: Collection; - /** - * The name of the parent command. If nested subcommands, use `-` to separate the names. For example: `.settings staff modrole` would be parentCommand: "settings-staff" - */ - parentCommand?: string; + /** + * The name of the parent command. If nested subcommands, use `-` to separate the names. For example: `.settings staff modrole` would be parentCommand: "settings-staff" + */ + parentCommand?: string; - constructor(public readonly client: BotClient, public name: string) {} + constructor( + public readonly client: BotClient, + public name: string, + ) {} - abstract execute(message: Message, args: Record): Promise | unknown; + abstract execute(message: Message, args: Record): Promise | unknown; - abstract init(): Promise | unknown; + abstract init(): Promise | unknown; - get fullName(): string { - return `${this.parentCommand ? `${this.parentCommand.split("-").join(" ")} ` : ""}${this.name}`; - } + get fullName(): string { + return `${this.parentCommand ? `${this.parentCommand.split("-").join(" ")} ` : ""}${this.name}`; + } } export type CommandArgument = { - /** - * If the type is a number, you can use this to allow/disable non-integers. By default this is false. - */ - allowDecimals?: boolean; - /** - * The default value for this argument/subcommand. - */ - defaultValue?: boolean | number | string; - /** - * If the type is string or subcommand you can provide literals. The argument MUST be exactly the same as the literals to be accepted. For example, you can list the subcommands here to make sure it matches. - */ - literals?: string[]; - /** - * If the type is string, this will force this argument to be lowercase. - */ - lowercase?: boolean; - /** - * If the type is a number set the maximum amount. By default this is disabled. - */ - maximum?: number; - /** - * If the type is number set the minimum amount. By default the minimum is 0 - */ - minimum?: number; - /** - * The function that runs if this argument is required and is missing. - */ - missing?(message: Message): unknown; - /** - * The name of the argument. Useful for when you need to alert the user X arg is missing. - */ - name: string; - /** - * Whether or not this argument is required. Defaults to true. - */ - required?: boolean; - /** - * The type of the argument you would like. Defaults to string. - */ - type?: "...string" | "boolean" | "duration" | "number" | "string" | "subcommand"; + /** + * If the type is a number, you can use this to allow/disable non-integers. By default this is false. + */ + allowDecimals?: boolean; + /** + * The default value for this argument/subcommand. + */ + defaultValue?: boolean | number | string; + /** + * If the type is string or subcommand you can provide literals. The argument MUST be exactly the same as the literals to be accepted. For example, you can list the subcommands here to make sure it matches. + */ + literals?: string[]; + /** + * If the type is string, this will force this argument to be lowercase. + */ + lowercase?: boolean; + /** + * If the type is a number set the maximum amount. By default this is disabled. + */ + maximum?: number; + /** + * If the type is number set the minimum amount. By default the minimum is 0 + */ + minimum?: number; + /** + * The function that runs if this argument is required and is missing. + */ + missing?(message: Message): unknown; + /** + * The name of the argument. Useful for when you need to alert the user X arg is missing. + */ + name: string; + /** + * Whether or not this argument is required. Defaults to true. + */ + required?: boolean; + /** + * The type of the argument you would like. Defaults to string. + */ + type?: "...string" | "boolean" | "duration" | "number" | "string" | "subcommand"; }; export default Command; diff --git a/packages/gil/lib/structures/Inhibitor.ts b/packages/gil/lib/structures/Inhibitor.ts index 71334dd9..bceb124f 100644 --- a/packages/gil/lib/structures/Inhibitor.ts +++ b/packages/gil/lib/structures/Inhibitor.ts @@ -3,11 +3,14 @@ import type { BotClient } from "../BotClient"; import type { Command } from "./Command"; export abstract class Inhibitor { - constructor(public readonly client: BotClient, public name: string) {} + constructor( + public readonly client: BotClient, + public name: string, + ) {} - abstract execute(message: Message, command: Command): Promise | boolean; + abstract execute(message: Message, command: Command): Promise | boolean; - abstract init(): Promise | unknown; + abstract init(): Promise | unknown; } export default Inhibitor; diff --git a/packages/gil/lib/structures/Monitor.ts b/packages/gil/lib/structures/Monitor.ts index f693fbd7..e5bb56a2 100644 --- a/packages/gil/lib/structures/Monitor.ts +++ b/packages/gil/lib/structures/Monitor.ts @@ -2,31 +2,34 @@ import type { Message } from "guilded.js"; import type { BotClient } from "../BotClient"; export abstract class Monitor { - /** - * Whether this monitor should ignore messages that are sent by bots. By default this is true. - */ - ignoreBots = true; - - /** - * Whether this monitor should ignore messages that are sent by others. By default this is false. - */ - ignoreOthers = false; - - /** - * Whether this monitor should ignore messages that are edited. By default this is false. - */ - ignoreEdits = false; - - /** - * Whether this monitor should ignore messages that are sent in DM. By default this is true. - */ - ignoreDM = true; - - constructor(public readonly client: BotClient, public name: string) {} - - abstract execute(message: Message): Promise | unknown; - - abstract init(): Promise | unknown; + /** + * Whether this monitor should ignore messages that are sent by bots. By default this is true. + */ + ignoreBots = true; + + /** + * Whether this monitor should ignore messages that are sent by others. By default this is false. + */ + ignoreOthers = false; + + /** + * Whether this monitor should ignore messages that are edited. By default this is false. + */ + ignoreEdits = false; + + /** + * Whether this monitor should ignore messages that are sent in DM. By default this is true. + */ + ignoreDM = true; + + constructor( + public readonly client: BotClient, + public name: string, + ) {} + + abstract execute(message: Message): Promise | unknown; + + abstract init(): Promise | unknown; } export default Monitor; diff --git a/packages/gil/lib/structures/Task.ts b/packages/gil/lib/structures/Task.ts index ee629a5c..f0a94d7a 100644 --- a/packages/gil/lib/structures/Task.ts +++ b/packages/gil/lib/structures/Task.ts @@ -1,26 +1,29 @@ import type { BotClient } from "../BotClient"; export abstract class Task { - /** - * The amount of time this task should take to run. Defaults to 1 hour(3,600,000 ms) - */ - millisecondsInterval = 60 * 60 * 1_000; + /** + * The amount of time this task should take to run. Defaults to 1 hour(3,600,000 ms) + */ + millisecondsInterval = 60 * 60 * 1_000; - /** - * Whether or not this task should run immediately on startup. Default to false. - */ - runOnStartup = false; + /** + * Whether or not this task should run immediately on startup. Default to false. + */ + runOnStartup = false; - /** - * Whether this task requires the bot to be fully ready before running. Default to false. - */ - requireReady = false; + /** + * Whether this task requires the bot to be fully ready before running. Default to false. + */ + requireReady = false; - constructor(public readonly client: BotClient, public name: string) {} + constructor( + public readonly client: BotClient, + public name: string, + ) {} - abstract execute(): Promise | unknown; + abstract execute(): Promise | unknown; - abstract init(): Promise | unknown; + abstract init(): Promise | unknown; } export default Task; diff --git a/packages/gil/lib/utils/walk.ts b/packages/gil/lib/utils/walk.ts index 3de33470..817bd1b5 100644 --- a/packages/gil/lib/utils/walk.ts +++ b/packages/gil/lib/utils/walk.ts @@ -5,31 +5,31 @@ import { yellowBright } from "colorette"; /** * Walks through a directory allowing you to process it with a for await loop */ -export async function* walk(dir: string): AsyncGenerator { - const folder = await opendir(dir).catch((error) => { - if (error.message.startsWith("ENOENT: no such file or directory")) { - console.log(yellowBright(`[WARN] Missing folder: ${dir.slice(Math.max(0, dir.lastIndexOf("/")))}. To make this warning go away, simply create the folder in your src folder.`)); - } else console.log(error); - }); - if (!folder) return; +export async function* walk(dir: string): AsyncGenerator { + const folder = await opendir(dir).catch((error) => { + if (error.message.startsWith("ENOENT: no such file or directory")) { + console.log(yellowBright(`[WARN] Missing folder: ${dir.slice(Math.max(0, dir.lastIndexOf("/")))}. To make this warning go away, simply create the folder in your src folder.`)); + } else console.log(error); + }); + if (!folder) return; - const directories: string[] = []; + const directories: string[] = []; - for await (const d of folder) { - const entry = path.join(dir, d.name); - // if (d.isDirectory()) yield* walk(entry); - if (d.isDirectory()) directories.push(entry); + for await (const d of folder) { + const entry = path.join(dir, d.name); + // if (d.isDirectory()) yield* walk(entry); + if (d.isDirectory()) directories.push(entry); - // Skip any non-js/ts file - if (![".js", ".ts"].some((suffix) => entry.endsWith(suffix))) continue; - // since declaration files end with ts they need to be ignored as well - else if (entry.endsWith(".d.ts")) continue; - // eslint-disable-next-line @typescript-eslint/no-require-imports - else if (d.isFile()) yield [d.name, require(entry)]; - } + // Skip any non-js/ts file + if (![".js", ".ts"].some((suffix) => entry.endsWith(suffix))) continue; + // since declaration files end with ts they need to be ignored as well + if (entry.endsWith(".d.ts")) continue; + // eslint-disable-next-line @typescript-eslint/no-require-imports + if (d.isFile()) yield [d.name, require(entry)]; + } - // LOAD DIRECTORIES AFTER FILES TO ALLOW SUBCOMMANDS TO HAVE COMMAND FILES MADE FIRST! - for (const directory of directories) yield* walk(directory); + // LOAD DIRECTORIES AFTER FILES TO ALLOW SUBCOMMANDS TO HAVE COMMAND FILES MADE FIRST! + for (const directory of directories) yield* walk(directory); } export default walk; diff --git a/packages/gil/package.json b/packages/gil/package.json index 1eac1773..55fee699 100644 --- a/packages/gil/package.json +++ b/packages/gil/package.json @@ -7,11 +7,10 @@ "main": "dist/index.js", "types": "types/index.d.ts", "scripts": { - "lint": "eslint --ignore-path ../../.config/.eslintignore --config ../../.config/.eslintrc.js lib", "test": "ts-node test/index.ts", "build": "tsc && gen-esm-wrapper . ./dist/index.mjs", "build:typecheck": "tsc --noEmit", - "prepublishOnly": "rimraf dist/ && rimraf types/ && pnpm run build" + "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build" }, "devDependencies": { "dotenv": "^16.0.3", @@ -70,4 +69,4 @@ "url": "https://github.com/zaida04/guilded.js/issues" }, "gitHead": "eee38a19e0bfa812d7136cc78a6bc99e0b402b0c" -} +} \ No newline at end of file diff --git a/packages/gil/test/index.ts b/packages/gil/test/index.ts index b105fe63..6e2fe335 100644 --- a/packages/gil/test/index.ts +++ b/packages/gil/test/index.ts @@ -5,9 +5,9 @@ import { BotClient } from "../lib"; config({ path: join(__dirname, "..", ".env") }); const bot = new BotClient({ - token: process.env.TOKEN!, - prefix: ".", - sourceFolderPath: __dirname, + token: process.env.TOKEN!, + prefix: ".", + sourceFolderPath: __dirname, }); bot.login(); diff --git a/packages/guilded.js/lib/cache.ts b/packages/guilded.js/lib/cache.ts index 3f1acee5..97645298 100644 --- a/packages/guilded.js/lib/cache.ts +++ b/packages/guilded.js/lib/cache.ts @@ -1,32 +1,37 @@ import { Collection } from "@discordjs/collection"; export type CacheStructure = { - get(key: K): Promise | V; - set(key: K, value: V): Promise | void; - delete(key: K): Promise | void; + get(key: K): Promise | V; + set(key: K, value: V): Promise | void; + delete(key: K): Promise | void; }; /** * A collection with a max cap size, which will remove a random element */ export class CacheCollection extends Collection { - public maxSize: number; + public maxSize: number; - public constructor(options?: { maxSize?: number }, entries?: readonly (readonly [K, V])[] | null | undefined) { - super(entries); - if (options?.maxSize !== undefined && options.maxSize < 1) { - throw new TypeError("Cannot pass 0 or negative value as maxSize."); - } + public constructor( + options?: { + maxSize?: number; + }, + entries?: readonly (readonly [K, V])[] | null | undefined, + ) { + super(entries); + if (options?.maxSize !== undefined && options.maxSize < 1) { + throw new TypeError("Cannot pass 0 or negative value as maxSize."); + } - this.maxSize = options?.maxSize ?? Number.POSITIVE_INFINITY; - } + this.maxSize = options?.maxSize ?? Number.POSITIVE_INFINITY; + } - public set(...args: Parameters<(typeof Collection.prototype)["set"]>): this { - if (this.size >= this.maxSize) this.delete(this.firstKey()!); - return super.set(...args); - } + public set(...args: Parameters<(typeof Collection.prototype)["set"]>): this { + if (this.size >= this.maxSize) this.delete(this.firstKey()!); + return super.set(...args); + } } export function inMemoryCacheBuilder(_structName: string, _struct: T): CacheCollection { - return new CacheCollection(); + return new CacheCollection(); } diff --git a/packages/guilded.js/lib/constants.ts b/packages/guilded.js/lib/constants.ts index 3bd43f91..6122bf06 100644 --- a/packages/guilded.js/lib/constants.ts +++ b/packages/guilded.js/lib/constants.ts @@ -1,48 +1,48 @@ export const constants = { - clientEvents: { - CALENDAR_EVENT_CREATED: "calendarEventCreated", - CALENDAR_EVENT_UPDATED: "calendarEventUpdated", - CALENDAR_EVENT_DELETED: "calendarEventDeleted", - CALENDAR_EVENT_RSVP_UPDATED: "calendarRsvpUpdated", - CALENDAR_EVENT_RSVP_MANY_UPDATED: "calendarRsvpManyUpdated", - CALENDAR_EVENT_RSVP_DELETED: "calendarRsvpDeleted", - MESSAGE_CREATED: "messageCreated", - MESSAGE_UPDATED: "messageUpdated", - MESSAGE_DELETED: "messageDeleted", - MEMBER_UPDATED: "memberUpdated", - ROLES_UPATED: "rolesUpdated", - MEMBER_JOINED: "memberJoined", - MEMBER_REMOVED: "memberRemoved", - MEMBER_BANNED: "memberBanned", - MEMBER_UNBANNED: "memberUnbanned", - MEMBER_SOCIAL_LINK_CREATED: "memberSocialLinkCreated", - MEMBER_SOCIAL_LINK_UPDATED: "memberSocialLinkUpdated", - MEMBER_SOCIAL_LINK_DELETED: "memberSocialLinkDeleted", - WEBHOOK_CREATED: "webhookCreated", - WEBHOOK_UPDATED: "webhookUpdated", - LIST_ITEM_COMPLETED: "listItemCompleted", - LIST_ITEM_UNCOMPLETED: "listItemUncompleted", - LIST_ITEM_CREATED: "listItemCreated", - LIST_ITEM_UPDATED: "listItemUpdated", - LIST_ITEM_DELETED: "listItemDeleted", - CHANNEL_CREATED: "channelCreated", - CHANNEL_UPDATED: "channelUpdated", - CHANNEL_DELETED: "channelDeleted", - DOC_CREATED: "docCreated", - DOC_UPDATED: "docUpdated", - DOC_DELETED: "docDeleted", - SERVER_CREATED: "serverCreated", - BOT_SERVER_CREATED: "botServerCreated", - BOT_SERVER_DELETED: "botServerDeleted", - MESSAGE_REACTION_CREATED: "messageReactionCreated", - MESSAGE_REACTION_DELETED: "messageReactionDeleted", - FORUM_TOPIC_CREATED: "forumTopicCreated", - FORUM_TOPIC_DELETED: "forumTopicDeleted", - FORUM_TOPIC_UPDATED: "forumTopicUpdated", - FORUM_TOPIC_PINNED: "forumTopicPinned", - FORUM_TOPIC_UNPINNED: "forumTopicUnpinned", - FORUM_TOPIC_LOCKED: "forumTopicLocked", - FORUM_TOPIC_UNLOCKED: "forumTopicUnlocked", - }, + clientEvents: { + CALENDAR_EVENT_CREATED: "calendarEventCreated", + CALENDAR_EVENT_UPDATED: "calendarEventUpdated", + CALENDAR_EVENT_DELETED: "calendarEventDeleted", + CALENDAR_EVENT_RSVP_UPDATED: "calendarRsvpUpdated", + CALENDAR_EVENT_RSVP_MANY_UPDATED: "calendarRsvpManyUpdated", + CALENDAR_EVENT_RSVP_DELETED: "calendarRsvpDeleted", + MESSAGE_CREATED: "messageCreated", + MESSAGE_UPDATED: "messageUpdated", + MESSAGE_DELETED: "messageDeleted", + MEMBER_UPDATED: "memberUpdated", + ROLES_UPATED: "rolesUpdated", + MEMBER_JOINED: "memberJoined", + MEMBER_REMOVED: "memberRemoved", + MEMBER_BANNED: "memberBanned", + MEMBER_UNBANNED: "memberUnbanned", + MEMBER_SOCIAL_LINK_CREATED: "memberSocialLinkCreated", + MEMBER_SOCIAL_LINK_UPDATED: "memberSocialLinkUpdated", + MEMBER_SOCIAL_LINK_DELETED: "memberSocialLinkDeleted", + WEBHOOK_CREATED: "webhookCreated", + WEBHOOK_UPDATED: "webhookUpdated", + LIST_ITEM_COMPLETED: "listItemCompleted", + LIST_ITEM_UNCOMPLETED: "listItemUncompleted", + LIST_ITEM_CREATED: "listItemCreated", + LIST_ITEM_UPDATED: "listItemUpdated", + LIST_ITEM_DELETED: "listItemDeleted", + CHANNEL_CREATED: "channelCreated", + CHANNEL_UPDATED: "channelUpdated", + CHANNEL_DELETED: "channelDeleted", + DOC_CREATED: "docCreated", + DOC_UPDATED: "docUpdated", + DOC_DELETED: "docDeleted", + SERVER_CREATED: "serverCreated", + BOT_SERVER_CREATED: "botServerCreated", + BOT_SERVER_DELETED: "botServerDeleted", + MESSAGE_REACTION_CREATED: "messageReactionCreated", + MESSAGE_REACTION_DELETED: "messageReactionDeleted", + FORUM_TOPIC_CREATED: "forumTopicCreated", + FORUM_TOPIC_DELETED: "forumTopicDeleted", + FORUM_TOPIC_UPDATED: "forumTopicUpdated", + FORUM_TOPIC_PINNED: "forumTopicPinned", + FORUM_TOPIC_UNPINNED: "forumTopicUnpinned", + FORUM_TOPIC_LOCKED: "forumTopicLocked", + FORUM_TOPIC_UNLOCKED: "forumTopicUnlocked", + }, } as const; export type ClientEvent = typeof constants.clientEvents; diff --git a/packages/guilded.js/lib/events.ts b/packages/guilded.js/lib/events.ts index 0e11f1b3..41fe2a4b 100644 --- a/packages/guilded.js/lib/events.ts +++ b/packages/guilded.js/lib/events.ts @@ -2,38 +2,38 @@ import type { EmotePayload, UserSummaryPayload } from "@guildedjs/api"; import type { Member } from "./structures"; export type ServerEvent = { - serverId: string; + serverId: string; }; export type MemberUnbannedEvent = ServerEvent & { - createdAt: string; - createdBy: string; - reason?: string; - user: UserSummaryPayload; + createdAt: string; + createdBy: string; + reason?: string; + user: UserSummaryPayload; }; export type MemberRemovedEvent = ServerEvent & { - isBan?: boolean; - isKick?: boolean; - userId: string; + isBan?: boolean; + isKick?: boolean; + userId: string; }; export type MemberUpdatedEvent = ServerEvent & { - userId: string; - nickname: string | null; - oldMember: Member | null; + userId: string; + nickname: string | null; + oldMember: Member | null; }; export type MessageReactionDeletedEvent = ServerEvent & { - channelId: string; - createdBy: string; - emote: EmotePayload; - messageId: string; + channelId: string; + createdBy: string; + emote: EmotePayload; + messageId: string; }; export type MessageDeletedEvent = ServerEvent & { - channelId: string; - deletedAt: string; - id: string; - isPrivate?: boolean; + channelId: string; + deletedAt: string; + id: string; + isPrivate?: boolean; }; diff --git a/packages/guilded.js/lib/gateway/ClientGatewayHandler.ts b/packages/guilded.js/lib/gateway/ClientGatewayHandler.ts index eb4645cf..b759ca93 100644 --- a/packages/guilded.js/lib/gateway/ClientGatewayHandler.ts +++ b/packages/guilded.js/lib/gateway/ClientGatewayHandler.ts @@ -14,86 +14,86 @@ import { ServerMemberEventHandler } from "./handler/ServerMemberEventHandler"; import { ServerWebhookEventHandler } from "./handler/ServerWebhookEventHandler"; export class ClientGatewayHandler { - calendarEventHandler = new CalendarEventHandler(this.client); - - calendarEventRsvpHandler = new CalendarEventRsvpHandler(this.client); - - messageHandler = new MessageEventHandler(this.client); - - ServerHandler = new ServerEventHandler(this.client); - - ServerMemberHandler = new ServerMemberEventHandler(this.client); - - ServerWebhookHandler = new ServerWebhookEventHandler(this.client); - - listHandler = new ListEventHandler(this.client); - - ServerChannelHandler = new ServerChannelEventHandler(this.client); - - docHandler = new DocEventHandler(this.client); - - reactionHandler = new ReactionEventHandler(this.client); - - forumHandler = new ForumEventHandler(this.client); - - botHandler = new BotEventHandler(this.client); - - readonly eventToHandlerMap: Record Promise | boolean> = { - [WebSocketEvents.CalendarEventCreated]: (data) => this.calendarEventHandler.calendarEventCreated(data as WSPacket<"CalendarEventCreated">), - [WebSocketEvents.CalendarEventDeleted]: (data) => this.calendarEventHandler.calendarEventDeleted(data as WSPacket<"CalendarEventDeleted">), - [WebSocketEvents.CalendarEventUpdated]: (data) => this.calendarEventHandler.calendarEventUpdated(data as WSPacket<"CalendarEventUpdated">), - [WebSocketEvents.CalendarEventRsvpUpdated]: (data) => this.calendarEventRsvpHandler.calendarEventRsvpUpdated(data as WSPacket<"CalendarEventRsvpUpdated">), - [WebSocketEvents.CalendarEventRsvpManyUpdated]: (data) => this.calendarEventRsvpHandler.calendarEventRsvpManyUpdated(data as WSPacket<"CalendarEventRsvpManyUpdated">), - [WebSocketEvents.CalendarEventRsvpDeleted]: (data) => this.calendarEventRsvpHandler.calendarEventRsvpDeleted(data as WSPacket<"CalendarEventRsvpDeleted">), - [WebSocketEvents.ChatMessageCreated]: (data) => this.messageHandler.messageCreated(data as WSPacket<"ChatMessageCreated">), - [WebSocketEvents.ChatMessageDeleted]: (data) => this.messageHandler.messageDeleted(data as WSPacket<"ChatMessageDeleted">), - [WebSocketEvents.ChatMessageUpdated]: (data) => this.messageHandler.messageUpdated(data as WSPacket<"ChatMessageUpdated">), - [WebSocketEvents.ServerMemberJoined]: (data) => this.ServerMemberHandler.serverMemberJoined(data as WSPacket<"ServerMemberJoined">), - [WebSocketEvents.ServerMemberRemoved]: (data) => this.ServerMemberHandler.serverMemberRemoved(data as WSPacket<"ServerMemberRemoved">), - [WebSocketEvents.ServerMemberUpdated]: (data) => this.ServerMemberHandler.serverMemberUpdated(data as WSPacket<"ServerMemberUpdated">), - [WebSocketEvents.ServerRolesUpdated]: (data) => this.ServerHandler.serverRolesUpdated(data as WSPacket<"ServerRolesUpdated">), - [WebSocketEvents.ServerMemberBanned]: (data) => this.ServerMemberHandler.serverMemberBanned(data as WSPacket<"ServerMemberBanned">), - [WebSocketEvents.ServerMemberUnbanned]: (data) => this.ServerMemberHandler.serverMemberUnbanned(data as WSPacket<"ServerMemberUnbanned">), - [WebSocketEvents.ServerMemberSocialLinkCreated]: (data) => this.ServerMemberHandler.serverMemberSocialLinkCreated(data as WSPacket<"ServerMemberSocialLinkCreated">), - [WebSocketEvents.ServerMemberSocialLinkUpdated]: (data) => this.ServerMemberHandler.serverMemberSocialLinkUpdated(data as WSPacket<"ServerMemberSocialLinkUpdated">), - [WebSocketEvents.ServerMemberSocialLinkDeleted]: (data) => this.ServerMemberHandler.serverMemberSocialLinkDeleted(data as WSPacket<"ServerMemberSocialLinkDeleted">), - [WebSocketEvents.ServerWebhookCreated]: (data) => this.ServerWebhookHandler.serverWebhookCreated(data as WSPacket<"ServerWebhookCreated">), - [WebSocketEvents.ServerWebhookUpdated]: (data) => this.ServerWebhookHandler.serverWebhookUpdated(data as WSPacket<"ServerWebhookUpdated">), - [WebSocketEvents.BotServerMembershipCreated]: (data) => this.botHandler.botServerMembershipCreated(data as WSPacket<"BotServerMembershipCreated">), - [WebSocketEvents.BotServerMembershipDeleted]: (data) => this.botHandler.botServerMembershipDeleted(data as WSPacket<"BotServerMembershipDeleted">), - [WebSocketEvents.ListItemCompleted]: (data) => this.listHandler.listItemCompleted(data as WSPacket<"ListItemCompleted">), - [WebSocketEvents.ListItemUncompleted]: (data) => this.listHandler.listItemUncompleted(data as WSPacket<"ListItemUncompleted">), - [WebSocketEvents.ListItemCreated]: (data) => this.listHandler.listItemCreated(data as WSPacket<"ListItemCreated">), - [WebSocketEvents.ListItemUpdated]: (data) => this.listHandler.listItemUpdated(data as WSPacket<"ListItemUpdated">), - [WebSocketEvents.ListItemDeleted]: (data) => this.listHandler.listItemDeleted(data as WSPacket<"ListItemDeleted">), - [WebSocketEvents.DocCreated]: (data) => this.docHandler.docCreated(data as WSPacket<"DocCreated">), - [WebSocketEvents.DocDeleted]: (data) => this.docHandler.docDeleted(data as WSPacket<"DocDeleted">), - [WebSocketEvents.DocUpdated]: (data) => this.docHandler.docUpdated(data as WSPacket<"DocUpdated">), - [WebSocketEvents.ServerChannelCreated]: (data) => this.ServerChannelHandler.serverChannelCreated(data as WSPacket<"ServerChannelCreated">), - [WebSocketEvents.ServerChannelDeleted]: (data) => this.ServerChannelHandler.serverChannelDeleted(data as WSPacket<"ServerChannelDeleted">), - [WebSocketEvents.ServerChannelUpdated]: (data) => this.ServerChannelHandler.serverChannelUpdated(data as WSPacket<"ServerChannelUpdated">), - [WebSocketEvents.ChannelMessageReactionCreated]: (data) => this.reactionHandler.messageReactionCreated(data as WSPacket<"ChannelMessageReactionCreated">), - [WebSocketEvents.ChannelMessageReactionDeleted]: (data) => this.reactionHandler.messageReactionDeleted(data as WSPacket<"ChannelMessageReactionDeleted">), - [WebSocketEvents.ForumTopicCreated]: (data) => this.forumHandler.forumTopicCreated(data as WSPacket<"ForumTopicCreated">), - [WebSocketEvents.ForumTopicDeleted]: (data) => this.forumHandler.forumTopicDeleted(data as WSPacket<"ForumTopicDeleted">), - [WebSocketEvents.ForumTopicUpdated]: (data) => this.forumHandler.forumTopicUpdated(data as WSPacket<"ForumTopicUpdated">), - [WebSocketEvents.ForumTopicPinned]: (data) => this.forumHandler.forumTopicPinned(data as WSPacket<"ForumTopicPinned">), - [WebSocketEvents.ForumTopicUnpinned]: (data) => this.forumHandler.forumTopicUnpinned(data as WSPacket<"ForumTopicUnpinned">), - [WebSocketEvents.ForumTopicLocked]: (data) => this.forumHandler.forumTopicLocked(data as WSPacket<"ForumTopicLocked">), - [WebSocketEvents.ForumTopicUnlocked]: (data) => this.forumHandler.forumTopicUnlocked(data as WSPacket<"ForumTopicUnlocked">), - }; - - constructor(public readonly client: Client) {} - - handleWSMessage(event: keyof WSEvent, data: SkeletonWSPayload): void { - const discardEventOption = this.client.options.gateway?.discardEvent; - if (discardEventOption?.(event, data)) return; - - const existingEvent = this.eventToHandlerMap[event]; - if (existingEvent) { - void existingEvent(data); - } else { - this.client.emit("unknownGatewayEvent", data); - } - } + calendarEventHandler = new CalendarEventHandler(this.client); + + calendarEventRsvpHandler = new CalendarEventRsvpHandler(this.client); + + messageHandler = new MessageEventHandler(this.client); + + ServerHandler = new ServerEventHandler(this.client); + + ServerMemberHandler = new ServerMemberEventHandler(this.client); + + ServerWebhookHandler = new ServerWebhookEventHandler(this.client); + + listHandler = new ListEventHandler(this.client); + + ServerChannelHandler = new ServerChannelEventHandler(this.client); + + docHandler = new DocEventHandler(this.client); + + reactionHandler = new ReactionEventHandler(this.client); + + forumHandler = new ForumEventHandler(this.client); + + botHandler = new BotEventHandler(this.client); + + readonly eventToHandlerMap: Record Promise | boolean> = { + [WebSocketEvents.CalendarEventCreated]: (data) => this.calendarEventHandler.calendarEventCreated(data as WSPacket<"CalendarEventCreated">), + [WebSocketEvents.CalendarEventDeleted]: (data) => this.calendarEventHandler.calendarEventDeleted(data as WSPacket<"CalendarEventDeleted">), + [WebSocketEvents.CalendarEventUpdated]: (data) => this.calendarEventHandler.calendarEventUpdated(data as WSPacket<"CalendarEventUpdated">), + [WebSocketEvents.CalendarEventRsvpUpdated]: (data) => this.calendarEventRsvpHandler.calendarEventRsvpUpdated(data as WSPacket<"CalendarEventRsvpUpdated">), + [WebSocketEvents.CalendarEventRsvpManyUpdated]: (data) => this.calendarEventRsvpHandler.calendarEventRsvpManyUpdated(data as WSPacket<"CalendarEventRsvpManyUpdated">), + [WebSocketEvents.CalendarEventRsvpDeleted]: (data) => this.calendarEventRsvpHandler.calendarEventRsvpDeleted(data as WSPacket<"CalendarEventRsvpDeleted">), + [WebSocketEvents.ChatMessageCreated]: (data) => this.messageHandler.messageCreated(data as WSPacket<"ChatMessageCreated">), + [WebSocketEvents.ChatMessageDeleted]: (data) => this.messageHandler.messageDeleted(data as WSPacket<"ChatMessageDeleted">), + [WebSocketEvents.ChatMessageUpdated]: (data) => this.messageHandler.messageUpdated(data as WSPacket<"ChatMessageUpdated">), + [WebSocketEvents.ServerMemberJoined]: (data) => this.ServerMemberHandler.serverMemberJoined(data as WSPacket<"ServerMemberJoined">), + [WebSocketEvents.ServerMemberRemoved]: (data) => this.ServerMemberHandler.serverMemberRemoved(data as WSPacket<"ServerMemberRemoved">), + [WebSocketEvents.ServerMemberUpdated]: (data) => this.ServerMemberHandler.serverMemberUpdated(data as WSPacket<"ServerMemberUpdated">), + [WebSocketEvents.ServerRolesUpdated]: (data) => this.ServerHandler.serverRolesUpdated(data as WSPacket<"ServerRolesUpdated">), + [WebSocketEvents.ServerMemberBanned]: (data) => this.ServerMemberHandler.serverMemberBanned(data as WSPacket<"ServerMemberBanned">), + [WebSocketEvents.ServerMemberUnbanned]: (data) => this.ServerMemberHandler.serverMemberUnbanned(data as WSPacket<"ServerMemberUnbanned">), + [WebSocketEvents.ServerMemberSocialLinkCreated]: (data) => this.ServerMemberHandler.serverMemberSocialLinkCreated(data as WSPacket<"ServerMemberSocialLinkCreated">), + [WebSocketEvents.ServerMemberSocialLinkUpdated]: (data) => this.ServerMemberHandler.serverMemberSocialLinkUpdated(data as WSPacket<"ServerMemberSocialLinkUpdated">), + [WebSocketEvents.ServerMemberSocialLinkDeleted]: (data) => this.ServerMemberHandler.serverMemberSocialLinkDeleted(data as WSPacket<"ServerMemberSocialLinkDeleted">), + [WebSocketEvents.ServerWebhookCreated]: (data) => this.ServerWebhookHandler.serverWebhookCreated(data as WSPacket<"ServerWebhookCreated">), + [WebSocketEvents.ServerWebhookUpdated]: (data) => this.ServerWebhookHandler.serverWebhookUpdated(data as WSPacket<"ServerWebhookUpdated">), + [WebSocketEvents.BotServerMembershipCreated]: (data) => this.botHandler.botServerMembershipCreated(data as WSPacket<"BotServerMembershipCreated">), + [WebSocketEvents.BotServerMembershipDeleted]: (data) => this.botHandler.botServerMembershipDeleted(data as WSPacket<"BotServerMembershipDeleted">), + [WebSocketEvents.ListItemCompleted]: (data) => this.listHandler.listItemCompleted(data as WSPacket<"ListItemCompleted">), + [WebSocketEvents.ListItemUncompleted]: (data) => this.listHandler.listItemUncompleted(data as WSPacket<"ListItemUncompleted">), + [WebSocketEvents.ListItemCreated]: (data) => this.listHandler.listItemCreated(data as WSPacket<"ListItemCreated">), + [WebSocketEvents.ListItemUpdated]: (data) => this.listHandler.listItemUpdated(data as WSPacket<"ListItemUpdated">), + [WebSocketEvents.ListItemDeleted]: (data) => this.listHandler.listItemDeleted(data as WSPacket<"ListItemDeleted">), + [WebSocketEvents.DocCreated]: (data) => this.docHandler.docCreated(data as WSPacket<"DocCreated">), + [WebSocketEvents.DocDeleted]: (data) => this.docHandler.docDeleted(data as WSPacket<"DocDeleted">), + [WebSocketEvents.DocUpdated]: (data) => this.docHandler.docUpdated(data as WSPacket<"DocUpdated">), + [WebSocketEvents.ServerChannelCreated]: (data) => this.ServerChannelHandler.serverChannelCreated(data as WSPacket<"ServerChannelCreated">), + [WebSocketEvents.ServerChannelDeleted]: (data) => this.ServerChannelHandler.serverChannelDeleted(data as WSPacket<"ServerChannelDeleted">), + [WebSocketEvents.ServerChannelUpdated]: (data) => this.ServerChannelHandler.serverChannelUpdated(data as WSPacket<"ServerChannelUpdated">), + [WebSocketEvents.ChannelMessageReactionCreated]: (data) => this.reactionHandler.messageReactionCreated(data as WSPacket<"ChannelMessageReactionCreated">), + [WebSocketEvents.ChannelMessageReactionDeleted]: (data) => this.reactionHandler.messageReactionDeleted(data as WSPacket<"ChannelMessageReactionDeleted">), + [WebSocketEvents.ForumTopicCreated]: (data) => this.forumHandler.forumTopicCreated(data as WSPacket<"ForumTopicCreated">), + [WebSocketEvents.ForumTopicDeleted]: (data) => this.forumHandler.forumTopicDeleted(data as WSPacket<"ForumTopicDeleted">), + [WebSocketEvents.ForumTopicUpdated]: (data) => this.forumHandler.forumTopicUpdated(data as WSPacket<"ForumTopicUpdated">), + [WebSocketEvents.ForumTopicPinned]: (data) => this.forumHandler.forumTopicPinned(data as WSPacket<"ForumTopicPinned">), + [WebSocketEvents.ForumTopicUnpinned]: (data) => this.forumHandler.forumTopicUnpinned(data as WSPacket<"ForumTopicUnpinned">), + [WebSocketEvents.ForumTopicLocked]: (data) => this.forumHandler.forumTopicLocked(data as WSPacket<"ForumTopicLocked">), + [WebSocketEvents.ForumTopicUnlocked]: (data) => this.forumHandler.forumTopicUnlocked(data as WSPacket<"ForumTopicUnlocked">), + }; + + constructor(public readonly client: Client) {} + + handleWSMessage(event: keyof WSEvent, data: SkeletonWSPayload): void { + const discardEventOption = this.client.options.gateway?.discardEvent; + if (discardEventOption?.(event, data)) return; + + const existingEvent = this.eventToHandlerMap[event]; + if (existingEvent) { + void existingEvent(data); + } else { + this.client.emit("unknownGatewayEvent", data); + } + } } diff --git a/packages/guilded.js/lib/gateway/handler/BotEventHandler.ts b/packages/guilded.js/lib/gateway/handler/BotEventHandler.ts index 2d914241..c967fd50 100644 --- a/packages/guilded.js/lib/gateway/handler/BotEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/BotEventHandler.ts @@ -5,15 +5,15 @@ import { Server } from "../../structures/Server"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class BotEventHandler extends GatewayEventHandler { - botServerMembershipCreated(data: WSPacket<"BotServerMembershipCreated">): boolean { - const server = this.client.servers.cache.get(data.d.server.id)?._update(data.d.server) ?? new Server(this.client, data.d.server); + botServerMembershipCreated(data: WSPacket<"BotServerMembershipCreated">): boolean { + const server = this.client.servers.cache.get(data.d.server.id)?._update(data.d.server) ?? new Server(this.client, data.d.server); - return this.client.emit(constants.clientEvents.BOT_SERVER_CREATED, server, data.d.createdBy); - } + return this.client.emit(constants.clientEvents.BOT_SERVER_CREATED, server, data.d.createdBy); + } - botServerMembershipDeleted(data: WSPacket<"BotServerMembershipDeleted">): boolean { - const server = this.client.servers.cache.get(data.d.server.id)?._update(data.d.server) ?? new Server(this.client, data.d.server); + botServerMembershipDeleted(data: WSPacket<"BotServerMembershipDeleted">): boolean { + const server = this.client.servers.cache.get(data.d.server.id)?._update(data.d.server) ?? new Server(this.client, data.d.server); - return this.client.emit(constants.clientEvents.BOT_SERVER_DELETED, server, data.d.deletedBy); - } + return this.client.emit(constants.clientEvents.BOT_SERVER_DELETED, server, data.d.deletedBy); + } } diff --git a/packages/guilded.js/lib/gateway/handler/CalendarEventHandler.ts b/packages/guilded.js/lib/gateway/handler/CalendarEventHandler.ts index 93333601..c6c60eea 100644 --- a/packages/guilded.js/lib/gateway/handler/CalendarEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/CalendarEventHandler.ts @@ -5,68 +5,68 @@ import { CalendarEvent, CalendarEventRsvp } from "../../structures/CalendarEvent import { GatewayEventHandler } from "./GatewayEventHandler"; export class CalendarEventHandler extends GatewayEventHandler { - calendarEventCreated(data: WSPacket<"CalendarEventCreated">): boolean { - const existingCalendar = this.client.calendars.cache.get(data.d.calendarEvent.id); - if (existingCalendar) return this.client.emit(constants.clientEvents.CALENDAR_EVENT_CREATED, existingCalendar); + calendarEventCreated(data: WSPacket<"CalendarEventCreated">): boolean { + const existingCalendar = this.client.calendars.cache.get(data.d.calendarEvent.id); + if (existingCalendar) return this.client.emit(constants.clientEvents.CALENDAR_EVENT_CREATED, existingCalendar); - const newCalendarEvent = new CalendarEvent(this.client, data.d.calendarEvent); - if (this.client.calendars.shouldCacheCalendar) this.client.calendars.cache.set(newCalendarEvent.id, newCalendarEvent); - return this.client.emit(constants.clientEvents.CALENDAR_EVENT_CREATED, newCalendarEvent); - } + const newCalendarEvent = new CalendarEvent(this.client, data.d.calendarEvent); + if (this.client.calendars.shouldCacheCalendar) this.client.calendars.cache.set(newCalendarEvent.id, newCalendarEvent); + return this.client.emit(constants.clientEvents.CALENDAR_EVENT_CREATED, newCalendarEvent); + } - calendarEventUpdated(data: WSPacket<"CalendarEventUpdated">): boolean { - const existingCalendar = this.client.calendars.cache.get(data.d.calendarEvent.id); - const oldCalendar = existingCalendar?._clone(); - const updatedCalendar = existingCalendar?._update(data.d.calendarEvent) ?? new CalendarEvent(this.client, data.d.calendarEvent); - if (this.client.calendars.shouldCacheCalendar && !existingCalendar) this.client.calendars.cache.set(updatedCalendar.id, updatedCalendar); - return this.client.emit(constants.clientEvents.CALENDAR_EVENT_UPDATED, updatedCalendar, oldCalendar ?? null); - } + calendarEventUpdated(data: WSPacket<"CalendarEventUpdated">): boolean { + const existingCalendar = this.client.calendars.cache.get(data.d.calendarEvent.id); + const oldCalendar = existingCalendar?._clone(); + const updatedCalendar = existingCalendar?._update(data.d.calendarEvent) ?? new CalendarEvent(this.client, data.d.calendarEvent); + if (this.client.calendars.shouldCacheCalendar && !existingCalendar) this.client.calendars.cache.set(updatedCalendar.id, updatedCalendar); + return this.client.emit(constants.clientEvents.CALENDAR_EVENT_UPDATED, updatedCalendar, oldCalendar ?? null); + } - calendarEventDeleted(data: WSPacket<"CalendarEventDeleted">): boolean { - const existingCalendar = this.client.calendars.cache.get(data.d.calendarEvent.id); - const deletedCalendar = existingCalendar?._update(data.d.calendarEvent) ?? new CalendarEvent(this.client, data.d.calendarEvent); - if (this.client.options.cache?.removeCalendarsOnDelete) this.client.calendars.cache.delete(deletedCalendar.id); - return this.client.emit(constants.clientEvents.CALENDAR_EVENT_DELETED, deletedCalendar); - } + calendarEventDeleted(data: WSPacket<"CalendarEventDeleted">): boolean { + const existingCalendar = this.client.calendars.cache.get(data.d.calendarEvent.id); + const deletedCalendar = existingCalendar?._update(data.d.calendarEvent) ?? new CalendarEvent(this.client, data.d.calendarEvent); + if (this.client.options.cache?.removeCalendarsOnDelete) this.client.calendars.cache.delete(deletedCalendar.id); + return this.client.emit(constants.clientEvents.CALENDAR_EVENT_DELETED, deletedCalendar); + } } export class CalendarEventRsvpHandler extends GatewayEventHandler { - calendarEventRsvpUpdated(data: WSPacket<"CalendarEventRsvpUpdated">): boolean { - const existingCalendar = this.client.calendars.cache.get(data.d.calendarEventRsvp.calendarEventId); - const existingCalendarRsvp = existingCalendar?.rsvps?.get(data.d.calendarEventRsvp.userId); + calendarEventRsvpUpdated(data: WSPacket<"CalendarEventRsvpUpdated">): boolean { + const existingCalendar = this.client.calendars.cache.get(data.d.calendarEventRsvp.calendarEventId); + const existingCalendarRsvp = existingCalendar?.rsvps?.get(data.d.calendarEventRsvp.userId); - const oldCalendarRsvp = existingCalendarRsvp?._clone(); - const updatedCalendarRsvp = existingCalendarRsvp?._update(data.d.calendarEventRsvp) ?? new CalendarEventRsvp(this.client, data.d.calendarEventRsvp); + const oldCalendarRsvp = existingCalendarRsvp?._clone(); + const updatedCalendarRsvp = existingCalendarRsvp?._update(data.d.calendarEventRsvp) ?? new CalendarEventRsvp(this.client, data.d.calendarEventRsvp); - if (this.client.calendars.shouldCacheCalendar && this.client.calendars.shouldCacheCalendarRsvps && !existingCalendarRsvp) - existingCalendar?.rsvps?.set(updatedCalendarRsvp.userId, updatedCalendarRsvp); - return this.client.emit(constants.clientEvents.CALENDAR_EVENT_RSVP_UPDATED, updatedCalendarRsvp, oldCalendarRsvp ?? null); - } + if (this.client.calendars.shouldCacheCalendar && this.client.calendars.shouldCacheCalendarRsvps && !existingCalendarRsvp) + existingCalendar?.rsvps?.set(updatedCalendarRsvp.userId, updatedCalendarRsvp); + return this.client.emit(constants.clientEvents.CALENDAR_EVENT_RSVP_UPDATED, updatedCalendarRsvp, oldCalendarRsvp ?? null); + } - calendarEventRsvpManyUpdated(data: WSPacket<"CalendarEventRsvpManyUpdated">): boolean { - const rsvpCollection = new Collection(); - for (const rsvp of data.d.calendarEventRsvps) { - const existingCalendar = this.client.calendars.cache.get(rsvp.calendarEventId); - const existingCalendarRsvp = existingCalendar?.rsvps?.get(rsvp.userId); - const newCalendarRsvp = existingCalendarRsvp?._update(rsvp) ?? new CalendarEventRsvp(this.client, rsvp); - rsvpCollection.set(rsvp.userId, newCalendarRsvp); - if (this.client.calendars.shouldCacheCalendar && this.client.calendars.shouldCacheCalendarRsvps && !existingCalendarRsvp) { - existingCalendar?.rsvps?.set(rsvp.userId, newCalendarRsvp); - } - } + calendarEventRsvpManyUpdated(data: WSPacket<"CalendarEventRsvpManyUpdated">): boolean { + const rsvpCollection = new Collection(); + for (const rsvp of data.d.calendarEventRsvps) { + const existingCalendar = this.client.calendars.cache.get(rsvp.calendarEventId); + const existingCalendarRsvp = existingCalendar?.rsvps?.get(rsvp.userId); + const newCalendarRsvp = existingCalendarRsvp?._update(rsvp) ?? new CalendarEventRsvp(this.client, rsvp); + rsvpCollection.set(rsvp.userId, newCalendarRsvp); + if (this.client.calendars.shouldCacheCalendar && this.client.calendars.shouldCacheCalendarRsvps && !existingCalendarRsvp) { + existingCalendar?.rsvps?.set(rsvp.userId, newCalendarRsvp); + } + } - return this.client.emit(constants.clientEvents.CALENDAR_EVENT_RSVP_MANY_UPDATED, rsvpCollection); - } + return this.client.emit(constants.clientEvents.CALENDAR_EVENT_RSVP_MANY_UPDATED, rsvpCollection); + } - calendarEventRsvpDeleted(data: WSPacket<"CalendarEventRsvpDeleted">): boolean { - const existingCalendar = this.client.calendars.cache.get(data.d.calendarEventRsvp.calendarEventId); - const existingCalendarRsvp = existingCalendar?.rsvps?.get(data.d.calendarEventRsvp.userId); - const deletedCalendarRsvp = existingCalendarRsvp?._update(data.d.calendarEventRsvp) ?? new CalendarEventRsvp(this.client, data.d.calendarEventRsvp); - if (this.client.options.cache?.removeCalendarRsvpOnDelete) { - const currentCalendar = this.client.calendars.cache.get(data.d.calendarEventRsvp.calendarEventId); - currentCalendar?.rsvps?.delete(data.d.calendarEventRsvp.userId); - } + calendarEventRsvpDeleted(data: WSPacket<"CalendarEventRsvpDeleted">): boolean { + const existingCalendar = this.client.calendars.cache.get(data.d.calendarEventRsvp.calendarEventId); + const existingCalendarRsvp = existingCalendar?.rsvps?.get(data.d.calendarEventRsvp.userId); + const deletedCalendarRsvp = existingCalendarRsvp?._update(data.d.calendarEventRsvp) ?? new CalendarEventRsvp(this.client, data.d.calendarEventRsvp); + if (this.client.options.cache?.removeCalendarRsvpOnDelete) { + const currentCalendar = this.client.calendars.cache.get(data.d.calendarEventRsvp.calendarEventId); + currentCalendar?.rsvps?.delete(data.d.calendarEventRsvp.userId); + } - return this.client.emit(constants.clientEvents.CALENDAR_EVENT_RSVP_DELETED, deletedCalendarRsvp); - } + return this.client.emit(constants.clientEvents.CALENDAR_EVENT_RSVP_DELETED, deletedCalendarRsvp); + } } diff --git a/packages/guilded.js/lib/gateway/handler/DocEventHandler.ts b/packages/guilded.js/lib/gateway/handler/DocEventHandler.ts index 13004e8b..b7a8ebb8 100644 --- a/packages/guilded.js/lib/gateway/handler/DocEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/DocEventHandler.ts @@ -4,22 +4,22 @@ import type { DocChannel } from "../../structures"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class DocEventHandler extends GatewayEventHandler { - docCreated(data: WSPacket<"DocCreated">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.doc.channelId) as DocChannel | undefined; - if (existingChannel) existingChannel.docs.set(data.d.doc.id, data.d.doc); - return this.client.emit(constants.clientEvents.DOC_CREATED, data.d.doc); - } + docCreated(data: WSPacket<"DocCreated">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.doc.channelId) as DocChannel | undefined; + if (existingChannel) existingChannel.docs.set(data.d.doc.id, data.d.doc); + return this.client.emit(constants.clientEvents.DOC_CREATED, data.d.doc); + } - docUpdated(data: WSPacket<"DocUpdated">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.doc.channelId) as DocChannel | undefined; - const existingDoc = existingChannel?.docs.get(data.d.doc.id); - if (existingChannel) existingChannel.docs.set(data.d.doc.id, data.d.doc); - return this.client.emit(constants.clientEvents.DOC_UPDATED, data.d.doc, existingDoc ?? null); - } + docUpdated(data: WSPacket<"DocUpdated">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.doc.channelId) as DocChannel | undefined; + const existingDoc = existingChannel?.docs.get(data.d.doc.id); + if (existingChannel) existingChannel.docs.set(data.d.doc.id, data.d.doc); + return this.client.emit(constants.clientEvents.DOC_UPDATED, data.d.doc, existingDoc ?? null); + } - docDeleted(data: WSPacket<"DocDeleted">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.doc.channelId) as DocChannel | undefined; - if (existingChannel) existingChannel.docs.set(data.d.doc.id, data.d.doc); - return this.client.emit(constants.clientEvents.DOC_DELETED, data.d.doc); - } + docDeleted(data: WSPacket<"DocDeleted">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.doc.channelId) as DocChannel | undefined; + if (existingChannel) existingChannel.docs.set(data.d.doc.id, data.d.doc); + return this.client.emit(constants.clientEvents.DOC_DELETED, data.d.doc); + } } diff --git a/packages/guilded.js/lib/gateway/handler/ForumEventHandler.ts b/packages/guilded.js/lib/gateway/handler/ForumEventHandler.ts index df960b96..634c235d 100644 --- a/packages/guilded.js/lib/gateway/handler/ForumEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/ForumEventHandler.ts @@ -4,55 +4,65 @@ import { ForumTopic } from "../../structures/Forum"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class ForumEventHandler extends GatewayEventHandler { - forumTopicCreated(data: WSPacket<"ForumTopicCreated">): boolean { - // This is in the case that a REST request beats us to adding the topic in the cache. - const existingTopic = this.client.topics.cache.get(data.d.forumTopic.id); - if (existingTopic) return this.client.emit(constants.clientEvents.FORUM_TOPIC_CREATED, existingTopic); - - const newTopic = new ForumTopic(this.client, data.d.forumTopic); - if (this.client.topics.shouldCacheForumTopic) this.client.topics.cache.set(newTopic.id, newTopic); - return this.client.emit(constants.clientEvents.FORUM_TOPIC_CREATED, newTopic); - } - - forumTopicUpdated(data: WSPacket<"ForumTopicUpdated">): boolean { - const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); - if (!getCachedTopic) { - const newTopic = new ForumTopic(this.client, data.d.forumTopic); - return this.client.emit(constants.clientEvents.FORUM_TOPIC_UPDATED, newTopic, null); - } - - const frozenOldTopic = Object.freeze(getCachedTopic._clone()); - getCachedTopic._update(data.d.forumTopic); - return this.client.emit(constants.clientEvents.FORUM_TOPIC_UPDATED, getCachedTopic, frozenOldTopic); - } - - forumTopicDeleted(data: WSPacket<"ForumTopicDeleted">): boolean { - const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); - getCachedTopic?._update({ _deletedAt: new Date() }); - return this.client.emit(constants.clientEvents.FORUM_TOPIC_DELETED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); - } - - forumTopicPinned(data: WSPacket<"ForumTopicPinned">): boolean { - const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); - getCachedTopic?._update({ isPinned: true }); - return this.client.emit(constants.clientEvents.FORUM_TOPIC_PINNED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); - } - - forumTopicUnpinned(data: WSPacket<"ForumTopicUnpinned">): boolean { - const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); - getCachedTopic?._update({ isPinned: false }); - return this.client.emit(constants.clientEvents.FORUM_TOPIC_UNPINNED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); - } - - forumTopicLocked(data: WSPacket<"ForumTopicLocked">): boolean { - const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); - getCachedTopic?._update({ isLocked: true }); - return this.client.emit(constants.clientEvents.FORUM_TOPIC_LOCKED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); - } - - forumTopicUnlocked(data: WSPacket<"ForumTopicUnlocked">): boolean { - const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); - getCachedTopic?._update({ isLocked: false }); - return this.client.emit(constants.clientEvents.FORUM_TOPIC_UNLOCKED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); - } + forumTopicCreated(data: WSPacket<"ForumTopicCreated">): boolean { + // This is in the case that a REST request beats us to adding the topic in the cache. + const existingTopic = this.client.topics.cache.get(data.d.forumTopic.id); + if (existingTopic) return this.client.emit(constants.clientEvents.FORUM_TOPIC_CREATED, existingTopic); + + const newTopic = new ForumTopic(this.client, data.d.forumTopic); + if (this.client.topics.shouldCacheForumTopic) this.client.topics.cache.set(newTopic.id, newTopic); + return this.client.emit(constants.clientEvents.FORUM_TOPIC_CREATED, newTopic); + } + + forumTopicUpdated(data: WSPacket<"ForumTopicUpdated">): boolean { + const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); + if (!getCachedTopic) { + const newTopic = new ForumTopic(this.client, data.d.forumTopic); + return this.client.emit(constants.clientEvents.FORUM_TOPIC_UPDATED, newTopic, null); + } + + const frozenOldTopic = Object.freeze(getCachedTopic._clone()); + getCachedTopic._update(data.d.forumTopic); + return this.client.emit(constants.clientEvents.FORUM_TOPIC_UPDATED, getCachedTopic, frozenOldTopic); + } + + forumTopicDeleted(data: WSPacket<"ForumTopicDeleted">): boolean { + const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); + getCachedTopic?._update({ + _deletedAt: new Date(), + }); + return this.client.emit(constants.clientEvents.FORUM_TOPIC_DELETED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); + } + + forumTopicPinned(data: WSPacket<"ForumTopicPinned">): boolean { + const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); + getCachedTopic?._update({ + isPinned: true, + }); + return this.client.emit(constants.clientEvents.FORUM_TOPIC_PINNED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); + } + + forumTopicUnpinned(data: WSPacket<"ForumTopicUnpinned">): boolean { + const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); + getCachedTopic?._update({ + isPinned: false, + }); + return this.client.emit(constants.clientEvents.FORUM_TOPIC_UNPINNED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); + } + + forumTopicLocked(data: WSPacket<"ForumTopicLocked">): boolean { + const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); + getCachedTopic?._update({ + isLocked: true, + }); + return this.client.emit(constants.clientEvents.FORUM_TOPIC_LOCKED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); + } + + forumTopicUnlocked(data: WSPacket<"ForumTopicUnlocked">): boolean { + const getCachedTopic = this.client.topics.cache.get(data.d.forumTopic.id); + getCachedTopic?._update({ + isLocked: false, + }); + return this.client.emit(constants.clientEvents.FORUM_TOPIC_UNLOCKED, getCachedTopic ?? new ForumTopic(this.client, data.d.forumTopic)); + } } diff --git a/packages/guilded.js/lib/gateway/handler/GatewayEventHandler.ts b/packages/guilded.js/lib/gateway/handler/GatewayEventHandler.ts index 483598e6..ed8a2710 100644 --- a/packages/guilded.js/lib/gateway/handler/GatewayEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/GatewayEventHandler.ts @@ -1,5 +1,5 @@ import type { Client } from "../../structures/Client"; export abstract class GatewayEventHandler { - constructor(public readonly client: Client) {} + constructor(public readonly client: Client) {} } diff --git a/packages/guilded.js/lib/gateway/handler/ListEventHandler.ts b/packages/guilded.js/lib/gateway/handler/ListEventHandler.ts index cc646a86..557ae3fd 100644 --- a/packages/guilded.js/lib/gateway/handler/ListEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/ListEventHandler.ts @@ -4,34 +4,34 @@ import type { ListChannel } from "../../structures"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class ListEventHandler extends GatewayEventHandler { - listItemCompleted(data: WSPacket<"ListItemCompleted">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; - if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); - return this.client.emit(constants.clientEvents.LIST_ITEM_COMPLETED, data.d.listItem); - } + listItemCompleted(data: WSPacket<"ListItemCompleted">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; + if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); + return this.client.emit(constants.clientEvents.LIST_ITEM_COMPLETED, data.d.listItem); + } - listItemUncompleted(data: WSPacket<"ListItemUncompleted">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; - if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); - return this.client.emit(constants.clientEvents.LIST_ITEM_UNCOMPLETED, data.d.listItem); - } + listItemUncompleted(data: WSPacket<"ListItemUncompleted">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; + if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); + return this.client.emit(constants.clientEvents.LIST_ITEM_UNCOMPLETED, data.d.listItem); + } - listItemCreated(data: WSPacket<"ListItemCreated">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; - if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); - return this.client.emit(constants.clientEvents.LIST_ITEM_CREATED, data.d.listItem); - } + listItemCreated(data: WSPacket<"ListItemCreated">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; + if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); + return this.client.emit(constants.clientEvents.LIST_ITEM_CREATED, data.d.listItem); + } - listItemUpdated(data: WSPacket<"ListItemUpdated">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; - const existingItem = existingChannel?.items.get(data.d.listItem.id); - if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); - return this.client.emit(constants.clientEvents.LIST_ITEM_UPDATED, data.d.listItem, existingItem ?? null); - } + listItemUpdated(data: WSPacket<"ListItemUpdated">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; + const existingItem = existingChannel?.items.get(data.d.listItem.id); + if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); + return this.client.emit(constants.clientEvents.LIST_ITEM_UPDATED, data.d.listItem, existingItem ?? null); + } - listItemDeleted(data: WSPacket<"ListItemDeleted">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; - if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); - return this.client.emit(constants.clientEvents.LIST_ITEM_DELETED, data.d.listItem); - } + listItemDeleted(data: WSPacket<"ListItemDeleted">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.listItem.channelId) as ListChannel | undefined; + if (existingChannel) existingChannel.items.set(data.d.listItem.id, data.d.listItem); + return this.client.emit(constants.clientEvents.LIST_ITEM_DELETED, data.d.listItem); + } } diff --git a/packages/guilded.js/lib/gateway/handler/MessageEventHandler.ts b/packages/guilded.js/lib/gateway/handler/MessageEventHandler.ts index 807b210a..414aa9c6 100644 --- a/packages/guilded.js/lib/gateway/handler/MessageEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/MessageEventHandler.ts @@ -4,39 +4,41 @@ import { Message } from "../../structures/Message"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class MessageEventHandler extends GatewayEventHandler { - async messageCreated(data: WSPacket<"ChatMessageCreated">): Promise { - // This is in the case that a REST request beats us to adding the message in the cache. - const existingMessage = this.client.messages.cache.get(data.d.message.id); - if (existingMessage) return this.client.emit(constants.clientEvents.MESSAGE_CREATED, existingMessage); - - if ((this.client.options.cache?.fetchMessageAuthorOnCreate ?? true) && data.d.serverId && data.d.message.createdBy && data.d.message.createdBy !== "Ann6LewA") - await this.client.members.fetch(data.d.serverId, data.d.message.createdBy).catch(() => null); - - const newMessage = new Message(this.client, data.d.message); - if (this.client.messages.shouldCacheMessage) this.client.messages.cache.set(newMessage.id, newMessage); - - return this.client.emit(constants.clientEvents.MESSAGE_CREATED, newMessage); - } - - messageUpdated(data: WSPacket<"ChatMessageUpdated">): boolean { - const getCachedMessage = this.client.messages.cache.get(data.d.message.id); - if (!getCachedMessage) { - const newMessage = new Message(this.client, data.d.message); - return this.client.emit(constants.clientEvents.MESSAGE_UPDATED, newMessage, null); - } - - const frozenOldMessage = Object.freeze(getCachedMessage._clone()); - getCachedMessage._update(data.d.message); - - return this.client.emit(constants.clientEvents.MESSAGE_UPDATED, getCachedMessage, frozenOldMessage); - } - - messageDeleted(data: WSPacket<"ChatMessageDeleted">): boolean { - this.client.messages.cache.get(data.d.message.id)?._update({ deletedAt: data.d.message.deletedAt }); - - return this.client.emit(constants.clientEvents.MESSAGE_DELETED, { - ...data.d.message, - serverId: data.d.serverId, - }); - } + async messageCreated(data: WSPacket<"ChatMessageCreated">): Promise { + // This is in the case that a REST request beats us to adding the message in the cache. + const existingMessage = this.client.messages.cache.get(data.d.message.id); + if (existingMessage) return this.client.emit(constants.clientEvents.MESSAGE_CREATED, existingMessage); + + if ((this.client.options.cache?.fetchMessageAuthorOnCreate ?? true) && data.d.serverId && data.d.message.createdBy && data.d.message.createdBy !== "Ann6LewA") + await this.client.members.fetch(data.d.serverId, data.d.message.createdBy).catch(() => null); + + const newMessage = new Message(this.client, data.d.message); + if (this.client.messages.shouldCacheMessage) this.client.messages.cache.set(newMessage.id, newMessage); + + return this.client.emit(constants.clientEvents.MESSAGE_CREATED, newMessage); + } + + messageUpdated(data: WSPacket<"ChatMessageUpdated">): boolean { + const getCachedMessage = this.client.messages.cache.get(data.d.message.id); + if (!getCachedMessage) { + const newMessage = new Message(this.client, data.d.message); + return this.client.emit(constants.clientEvents.MESSAGE_UPDATED, newMessage, null); + } + + const frozenOldMessage = Object.freeze(getCachedMessage._clone()); + getCachedMessage._update(data.d.message); + + return this.client.emit(constants.clientEvents.MESSAGE_UPDATED, getCachedMessage, frozenOldMessage); + } + + messageDeleted(data: WSPacket<"ChatMessageDeleted">): boolean { + this.client.messages.cache.get(data.d.message.id)?._update({ + deletedAt: data.d.message.deletedAt, + }); + + return this.client.emit(constants.clientEvents.MESSAGE_DELETED, { + ...data.d.message, + serverId: data.d.serverId, + }); + } } diff --git a/packages/guilded.js/lib/gateway/handler/ReactionEventHandler.ts b/packages/guilded.js/lib/gateway/handler/ReactionEventHandler.ts index f738fe1a..9c6c5868 100644 --- a/packages/guilded.js/lib/gateway/handler/ReactionEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/ReactionEventHandler.ts @@ -5,28 +5,28 @@ import { buildMessageReactionKey } from "../../util"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class ReactionEventHandler extends GatewayEventHandler { - messageReactionCreated(data: WSPacket<"ChannelMessageReactionCreated">): boolean { - const { - d: { reaction, serverId }, - } = data; + messageReactionCreated(data: WSPacket<"ChannelMessageReactionCreated">): boolean { + const { + d: { reaction, serverId }, + } = data; - const newReaction = new MessageReaction(this.client, { - ...reaction, - serverId, - }); - if (this.client.reactions.shouldCacheReaction) this.client.reactions.cache.set(buildMessageReactionKey(reaction.messageId, reaction.createdBy, reaction.emote.id), newReaction); - return this.client.emit(constants.clientEvents.MESSAGE_REACTION_CREATED, newReaction); - } + const newReaction = new MessageReaction(this.client, { + ...reaction, + serverId, + }); + if (this.client.reactions.shouldCacheReaction) this.client.reactions.cache.set(buildMessageReactionKey(reaction.messageId, reaction.createdBy, reaction.emote.id), newReaction); + return this.client.emit(constants.clientEvents.MESSAGE_REACTION_CREATED, newReaction); + } - messageReactionDeleted(data: WSPacket<"ChannelMessageReactionDeleted">): boolean { - const { - d: { reaction, serverId }, - } = data; + messageReactionDeleted(data: WSPacket<"ChannelMessageReactionDeleted">): boolean { + const { + d: { reaction, serverId }, + } = data; - if (this.client.reactions.shouldCacheReaction) this.client.reactions.cache.delete(buildMessageReactionKey(reaction.messageId, reaction.createdBy, reaction.emote.id)); - return this.client.emit(constants.clientEvents.MESSAGE_REACTION_DELETED, { - ...reaction, - serverId, - }); - } + if (this.client.reactions.shouldCacheReaction) this.client.reactions.cache.delete(buildMessageReactionKey(reaction.messageId, reaction.createdBy, reaction.emote.id)); + return this.client.emit(constants.clientEvents.MESSAGE_REACTION_DELETED, { + ...reaction, + serverId, + }); + } } diff --git a/packages/guilded.js/lib/gateway/handler/ServerChannelEventHandler.ts b/packages/guilded.js/lib/gateway/handler/ServerChannelEventHandler.ts index ef59eb18..ff26df6e 100644 --- a/packages/guilded.js/lib/gateway/handler/ServerChannelEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/ServerChannelEventHandler.ts @@ -4,26 +4,30 @@ import { transformTypeToChannel } from "../../managers/global/ChannelManager"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class ServerChannelEventHandler extends GatewayEventHandler { - serverChannelCreated(data: WSPacket<"ServerChannelCreated">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.channel.id); - if (existingChannel) return this.client.emit(constants.clientEvents.CHANNEL_CREATED, existingChannel); + serverChannelCreated(data: WSPacket<"ServerChannelCreated">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.channel.id); + if (existingChannel) return this.client.emit(constants.clientEvents.CHANNEL_CREATED, existingChannel); - const newChannel = new (transformTypeToChannel(data.d.channel.type))(this.client, data.d.channel); - if (this.client.channels.shouldCacheChannel) this.client.channels.cache.set(newChannel.id, newChannel); - return this.client.emit(constants.clientEvents.CHANNEL_CREATED, newChannel); - } + const newChannel = new (transformTypeToChannel(data.d.channel.type))(this.client, data.d.channel); + if (this.client.channels.shouldCacheChannel) this.client.channels.cache.set(newChannel.id, newChannel); + return this.client.emit(constants.clientEvents.CHANNEL_CREATED, newChannel); + } - serverChannelUpdated(data: WSPacket<"ServerChannelUpdated">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.channel.id); - const oldChannel = existingChannel?._clone(); - const updatedChannel = existingChannel?._update(data.d.channel) ?? new (transformTypeToChannel(data.d.channel.type))(this.client, data.d.channel); - return this.client.emit(constants.clientEvents.CHANNEL_UPDATED, updatedChannel, oldChannel ?? null); - } + serverChannelUpdated(data: WSPacket<"ServerChannelUpdated">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.channel.id); + const oldChannel = existingChannel?._clone(); + const updatedChannel = existingChannel?._update(data.d.channel) ?? new (transformTypeToChannel(data.d.channel.type))(this.client, data.d.channel); + return this.client.emit(constants.clientEvents.CHANNEL_UPDATED, updatedChannel, oldChannel ?? null); + } - serverChannelDeleted(data: WSPacket<"ServerChannelDeleted">): boolean { - const existingChannel = this.client.channels.cache.get(data.d.channel.id); - const deletedChannel = existingChannel?._update({ ...data.d.channel, deleted: true }) ?? new (transformTypeToChannel(data.d.channel.type))(this.client, data.d.channel); - if (this.client.options.cache?.removeChannelOnDelete) this.client.channels.cache.delete(deletedChannel.id); - return this.client.emit(constants.clientEvents.CHANNEL_DELETED, deletedChannel); - } + serverChannelDeleted(data: WSPacket<"ServerChannelDeleted">): boolean { + const existingChannel = this.client.channels.cache.get(data.d.channel.id); + const deletedChannel = + existingChannel?._update({ + ...data.d.channel, + deleted: true, + }) ?? new (transformTypeToChannel(data.d.channel.type))(this.client, data.d.channel); + if (this.client.options.cache?.removeChannelOnDelete) this.client.channels.cache.delete(deletedChannel.id); + return this.client.emit(constants.clientEvents.CHANNEL_DELETED, deletedChannel); + } } diff --git a/packages/guilded.js/lib/gateway/handler/ServerEventHandler.ts b/packages/guilded.js/lib/gateway/handler/ServerEventHandler.ts index 8cc34a03..44bf190c 100644 --- a/packages/guilded.js/lib/gateway/handler/ServerEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/ServerEventHandler.ts @@ -4,17 +4,26 @@ import { buildMemberKey } from "../../util"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class ServerEventHandler extends GatewayEventHandler { - serverRolesUpdated(data: WSPacket<"ServerRolesUpdated">): boolean { - const oldMembers = []; - // update members cache - for (const m of data.d.memberRoleIds) { - const member = this.client.members.cache.get(buildMemberKey(data.d.serverId, m.userId)); - if (member) { - oldMembers.push(member._clone()); - member._update({ roleIds: m.roleIds }); - } - } + serverRolesUpdated(data: WSPacket<"ServerRolesUpdated">): boolean { + const oldMembers = []; + // update members cache + for (const m of data.d.memberRoleIds) { + const member = this.client.members.cache.get(buildMemberKey(data.d.serverId, m.userId)); + if (member) { + oldMembers.push(member._clone()); + member._update({ + roleIds: m.roleIds, + }); + } + } - return this.client.emit(constants.clientEvents.ROLES_UPATED, { serverId: data.d.serverId, members: data.d.memberRoleIds }, oldMembers); - } + return this.client.emit( + constants.clientEvents.ROLES_UPATED, + { + serverId: data.d.serverId, + members: data.d.memberRoleIds, + }, + oldMembers, + ); + } } diff --git a/packages/guilded.js/lib/gateway/handler/ServerMemberEventHandler.ts b/packages/guilded.js/lib/gateway/handler/ServerMemberEventHandler.ts index d16f8815..fea43cd1 100644 --- a/packages/guilded.js/lib/gateway/handler/ServerMemberEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/ServerMemberEventHandler.ts @@ -5,118 +5,123 @@ import { buildMemberKey } from "../../util"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class ServerMemberEventHandler extends GatewayEventHandler { - serverMemberUpdated(data: WSPacket<"ServerMemberUpdated">): boolean { - const { - d: { - userInfo: { id, nickname }, - serverId, - }, - } = data; - - const member = this.client.members.cache.get(buildMemberKey(serverId, id)); - - const oldMember = member?._clone(); - member?._update({ nickname: data.d.userInfo.nickname ?? undefined }); - - return this.client.emit(constants.clientEvents.MEMBER_UPDATED, { - serverId, - userId: id, - nickname: nickname ?? null, - oldMember: oldMember ?? null, - }); - } - - serverMemberJoined(data: WSPacket<"ServerMemberJoined">): boolean { - const newMember = new Member(this.client, { - ...data.d.member, - serverId: data.d.serverId, - id: data.d.member.user.id, - }); - const newUser = new User(this.client, data.d.member.user); - - this.client.members.cache.set(buildMemberKey(data.d.serverId, data.d.member.user.id), newMember); - this.client.users.cache.set(newUser.id, newUser); - if (data.d.member.user.id === this.client.user!.id) - this.client.emit(constants.clientEvents.SERVER_CREATED, { - serverId: data.d.serverId, - }); - return this.client.emit(constants.clientEvents.MEMBER_JOINED, newMember); - } - - serverMemberRemoved(data: WSPacket<"ServerMemberRemoved">): boolean { - const memberKey = buildMemberKey(data.d.serverId, data.d.userId); - const existingMember = this.client.members.cache.get(memberKey); - if (this.client.options.cache?.removeMemberOnLeave) this.client.members.cache.delete(memberKey); - - existingMember?._update({ - kicked: data.d.isKick, - banned: data.d.isBan, - }); - return this.client.emit(constants.clientEvents.MEMBER_REMOVED, data.d); - } - - serverMemberBanned(data: WSPacket<"ServerMemberBanned">): boolean { - const newMemberBan = new MemberBan(this.client, { - serverId: data.d.serverId, - ...data.d.serverMemberBan, - }); - if (this.client.options.cache?.cacheMemberBans !== false) this.client.bans.cache.set(buildMemberKey(newMemberBan.serverId, newMemberBan.target.id), newMemberBan); - return this.client.emit(constants.clientEvents.MEMBER_BANNED, newMemberBan); - } - - serverMemberUnbanned(data: WSPacket<"ServerMemberUnbanned">): boolean { - const { - d: { - serverId, - serverMemberBan: { createdAt, createdBy, reason, user }, - }, - } = data; - - const memberKey = buildMemberKey(serverId, user.id); - const existingMemberBan = this.client.bans.cache.get(memberKey); - if (existingMemberBan && this.client.options.cache?.removeMemberBanOnUnban) this.client.bans.cache.delete(existingMemberBan.id); - const existingMember = this.client.members.cache.get(memberKey); - if (existingMember) existingMember._update({ banned: false }); - - return this.client.emit(constants.clientEvents.MEMBER_UNBANNED, { - createdAt, - createdBy, - reason, - user, - serverId, - }); - } - - serverMemberSocialLinkCreated(data: WSPacket<"ServerMemberSocialLinkCreated">): boolean { - const { - d: { serverId, socialLink }, - } = data; - - const existingMember = this.client.members.cache.get(buildMemberKey(serverId, socialLink.userId)); - if (this.client.members.shouldCacheSocialLinks) existingMember?.socialLinks.set(socialLink.type, socialLink); - - return this.client.emit(constants.clientEvents.MEMBER_SOCIAL_LINK_CREATED, serverId, socialLink); - } - - serverMemberSocialLinkUpdated(data: WSPacket<"ServerMemberSocialLinkUpdated">): boolean { - const { - d: { serverId, socialLink }, - } = data; - - const existingMember = this.client.members.cache.get(buildMemberKey(serverId, socialLink.userId)); - if (this.client.members.shouldCacheSocialLinks) existingMember?.socialLinks.set(socialLink.type, socialLink); - - return this.client.emit(constants.clientEvents.MEMBER_SOCIAL_LINK_UPDATED, serverId, socialLink); - } - - serverMemberSocialLinkDeleted(data: WSPacket<"ServerMemberSocialLinkDeleted">): boolean { - const { - d: { serverId, socialLink }, - } = data; - - const existingMember = this.client.members.cache.get(buildMemberKey(serverId, socialLink.userId)); - if (this.client.members.shouldCacheSocialLinks) existingMember?.socialLinks.delete(socialLink.type); - - return this.client.emit(constants.clientEvents.MEMBER_SOCIAL_LINK_DELETED, serverId, socialLink); - } + serverMemberUpdated(data: WSPacket<"ServerMemberUpdated">): boolean { + const { + d: { + userInfo: { id, nickname }, + serverId, + }, + } = data; + + const member = this.client.members.cache.get(buildMemberKey(serverId, id)); + + const oldMember = member?._clone(); + member?._update({ + nickname: data.d.userInfo.nickname ?? undefined, + }); + + return this.client.emit(constants.clientEvents.MEMBER_UPDATED, { + serverId, + userId: id, + nickname: nickname ?? null, + oldMember: oldMember ?? null, + }); + } + + serverMemberJoined(data: WSPacket<"ServerMemberJoined">): boolean { + const newMember = new Member(this.client, { + ...data.d.member, + serverId: data.d.serverId, + id: data.d.member.user.id, + }); + const newUser = new User(this.client, data.d.member.user); + + this.client.members.cache.set(buildMemberKey(data.d.serverId, data.d.member.user.id), newMember); + this.client.users.cache.set(newUser.id, newUser); + if (data.d.member.user.id === this.client.user?.id) + this.client.emit(constants.clientEvents.SERVER_CREATED, { + serverId: data.d.serverId, + }); + return this.client.emit(constants.clientEvents.MEMBER_JOINED, newMember); + } + + serverMemberRemoved(data: WSPacket<"ServerMemberRemoved">): boolean { + const memberKey = buildMemberKey(data.d.serverId, data.d.userId); + const existingMember = this.client.members.cache.get(memberKey); + if (this.client.options.cache?.removeMemberOnLeave) this.client.members.cache.delete(memberKey); + + existingMember?._update({ + kicked: data.d.isKick, + banned: data.d.isBan, + }); + return this.client.emit(constants.clientEvents.MEMBER_REMOVED, data.d); + } + + serverMemberBanned(data: WSPacket<"ServerMemberBanned">): boolean { + const newMemberBan = new MemberBan(this.client, { + serverId: data.d.serverId, + ...data.d.serverMemberBan, + }); + if (this.client.options.cache?.cacheMemberBans !== false) this.client.bans.cache.set(buildMemberKey(newMemberBan.serverId, newMemberBan.target.id), newMemberBan); + return this.client.emit(constants.clientEvents.MEMBER_BANNED, newMemberBan); + } + + serverMemberUnbanned(data: WSPacket<"ServerMemberUnbanned">): boolean { + const { + d: { + serverId, + serverMemberBan: { createdAt, createdBy, reason, user }, + }, + } = data; + + const memberKey = buildMemberKey(serverId, user.id); + const existingMemberBan = this.client.bans.cache.get(memberKey); + if (existingMemberBan && this.client.options.cache?.removeMemberBanOnUnban) this.client.bans.cache.delete(existingMemberBan.id); + const existingMember = this.client.members.cache.get(memberKey); + if (existingMember) + existingMember._update({ + banned: false, + }); + + return this.client.emit(constants.clientEvents.MEMBER_UNBANNED, { + createdAt, + createdBy, + reason, + user, + serverId, + }); + } + + serverMemberSocialLinkCreated(data: WSPacket<"ServerMemberSocialLinkCreated">): boolean { + const { + d: { serverId, socialLink }, + } = data; + + const existingMember = this.client.members.cache.get(buildMemberKey(serverId, socialLink.userId)); + if (this.client.members.shouldCacheSocialLinks) existingMember?.socialLinks.set(socialLink.type, socialLink); + + return this.client.emit(constants.clientEvents.MEMBER_SOCIAL_LINK_CREATED, serverId, socialLink); + } + + serverMemberSocialLinkUpdated(data: WSPacket<"ServerMemberSocialLinkUpdated">): boolean { + const { + d: { serverId, socialLink }, + } = data; + + const existingMember = this.client.members.cache.get(buildMemberKey(serverId, socialLink.userId)); + if (this.client.members.shouldCacheSocialLinks) existingMember?.socialLinks.set(socialLink.type, socialLink); + + return this.client.emit(constants.clientEvents.MEMBER_SOCIAL_LINK_UPDATED, serverId, socialLink); + } + + serverMemberSocialLinkDeleted(data: WSPacket<"ServerMemberSocialLinkDeleted">): boolean { + const { + d: { serverId, socialLink }, + } = data; + + const existingMember = this.client.members.cache.get(buildMemberKey(serverId, socialLink.userId)); + if (this.client.members.shouldCacheSocialLinks) existingMember?.socialLinks.delete(socialLink.type); + + return this.client.emit(constants.clientEvents.MEMBER_SOCIAL_LINK_DELETED, serverId, socialLink); + } } diff --git a/packages/guilded.js/lib/gateway/handler/ServerWebhookEventHandler.ts b/packages/guilded.js/lib/gateway/handler/ServerWebhookEventHandler.ts index d49fa8cc..77b15ed7 100644 --- a/packages/guilded.js/lib/gateway/handler/ServerWebhookEventHandler.ts +++ b/packages/guilded.js/lib/gateway/handler/ServerWebhookEventHandler.ts @@ -4,24 +4,24 @@ import { Webhook } from "../../structures/Webhook"; import { GatewayEventHandler } from "./GatewayEventHandler"; export class ServerWebhookEventHandler extends GatewayEventHandler { - serverWebhookCreated(data: WSPacket<"ServerWebhookCreated">): boolean { - const existingWebhook = this.client.webhooks.cache.get(data.d.webhook.id); - if (existingWebhook) return this.client.emit(constants.clientEvents.WEBHOOK_CREATED, existingWebhook); + serverWebhookCreated(data: WSPacket<"ServerWebhookCreated">): boolean { + const existingWebhook = this.client.webhooks.cache.get(data.d.webhook.id); + if (existingWebhook) return this.client.emit(constants.clientEvents.WEBHOOK_CREATED, existingWebhook); - const newWebhook = new Webhook(this.client, data.d.webhook); - this.client.webhooks.cache.set(newWebhook.id, newWebhook); - return this.client.emit(constants.clientEvents.WEBHOOK_CREATED, newWebhook); - } + const newWebhook = new Webhook(this.client, data.d.webhook); + this.client.webhooks.cache.set(newWebhook.id, newWebhook); + return this.client.emit(constants.clientEvents.WEBHOOK_CREATED, newWebhook); + } - serverWebhookUpdated(data: WSPacket<"ServerWebhookUpdated">): boolean { - const getCachedWebhook = this.client.webhooks.cache.get(data.d.webhook.id); - if (!getCachedWebhook) { - const newWebhook = new Webhook(this.client, data.d.webhook); - return this.client.emit(constants.clientEvents.WEBHOOK_UPDATED, newWebhook, null); - } + serverWebhookUpdated(data: WSPacket<"ServerWebhookUpdated">): boolean { + const getCachedWebhook = this.client.webhooks.cache.get(data.d.webhook.id); + if (!getCachedWebhook) { + const newWebhook = new Webhook(this.client, data.d.webhook); + return this.client.emit(constants.clientEvents.WEBHOOK_UPDATED, newWebhook, null); + } - const frozenOldWebhook = Object.freeze(getCachedWebhook._clone()); - getCachedWebhook._update(data.d.webhook); - return this.client.emit(constants.clientEvents.WEBHOOK_UPDATED, getCachedWebhook, frozenOldWebhook); - } + const frozenOldWebhook = Object.freeze(getCachedWebhook._clone()); + getCachedWebhook._update(data.d.webhook); + return this.client.emit(constants.clientEvents.WEBHOOK_UPDATED, getCachedWebhook, frozenOldWebhook); + } } diff --git a/packages/guilded.js/lib/managers/global/CacheableStructManager.ts b/packages/guilded.js/lib/managers/global/CacheableStructManager.ts index e5b0de28..070e7b3e 100644 --- a/packages/guilded.js/lib/managers/global/CacheableStructManager.ts +++ b/packages/guilded.js/lib/managers/global/CacheableStructManager.ts @@ -11,5 +11,5 @@ import { GlobalManager } from "./GlobalManager"; * @extends GlobalManager */ export class CacheableStructManager extends GlobalManager { - cache = new Collection(); + cache = new Collection(); } diff --git a/packages/guilded.js/lib/managers/global/CalendarManager.ts b/packages/guilded.js/lib/managers/global/CalendarManager.ts index 3be5f1e9..f81b1b41 100644 --- a/packages/guilded.js/lib/managers/global/CalendarManager.ts +++ b/packages/guilded.js/lib/managers/global/CalendarManager.ts @@ -8,215 +8,218 @@ import { CacheableStructManager } from "./CacheableStructManager"; * The manager is used to interact with calendars on a server. */ export class GlobalCalendarManager extends CacheableStructManager { - get shouldCacheCalendar(): boolean { - return this.client.options?.cache?.cacheCalendars !== false; - } - - get shouldCacheCalendarRsvps(): boolean { - return this.client.options?.cache?.cacheCalendarsRsvps !== false; - } - - /** - * Creates a calendar event. - * - * @param channelId The ID of the channel in which to create the event. - * @param options The options for the event. - * @returns A promise that resolves with the created calendar event. - */ - async create(channelId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.calendarEvents.calendarEventCreate({ - channelId, - requestBody: options, - }); - return new CalendarEvent(this.client, data.calendarEvent); - } - - /** - * Fetches a single calendar event. - * - * @param channelId The ID of the channel in which to fetch the event. - * @param calendarEventId The ID of the event to fetch. - * @param force Whether or not to force a fetch instead of using a cached version. - * @returns A promise that resolves with the fetched calendar event. - */ - async fetch(channelId: string, calendarEventId: number, force?: boolean): Promise { - if (!force) { - const existingCalendar = this.client.calendars.cache.get(calendarEventId); - if (existingCalendar) return existingCalendar; - } - - const data = await this.client.rest.router.calendarEvents.calendarEventRead({ channelId, calendarEventId }); - const newCalendar = new CalendarEvent(this.client, data.calendarEvent); - if (this.shouldCacheCalendar) this.client.calendars.cache.set(newCalendar.id, newCalendar); - return newCalendar; - } - - /** - * Fetches multiple calendar events. - * - * @param channelId The ID of the channel in which to fetch the events. - * @param options The options for the fetch. - * @returns A promise that resolves with a collection of the fetched calendar events. - */ - async fetchMany(channelId: string, options: Omit, "channelId">): Promise> { - const data = await this.client.rest.router.calendarEvents.calendarEventReadMany({ - channelId, - ...options, - }); - const calendarEvents = new Collection(); - for (const calendarEvent of data.calendarEvents) { - const newCalendar = new CalendarEvent(this.client, calendarEvent); - calendarEvents.set(newCalendar.id, newCalendar); - if (this.shouldCacheCalendar) this.client.calendars.cache.set(newCalendar.id, newCalendar); - } - - return calendarEvents; - } - - /** - * Updates a calendar event. - * - * @param channelId The ID of the channel in which the event exists. - * @param calendarEventId The ID of the event to update. - * @param options The options for the update. - * @returns A promise that resolves with the updated calendar event. - */ - async update(channelId: string, calendarEventId: number, options: OptionBody): Promise { - const data = await this.client.rest.router.calendarEvents.calendarEventUpdate({ - channelId, - calendarEventId, - requestBody: options, - }); - const existingCalendar = this.cache.get(calendarEventId); - if (existingCalendar) return existingCalendar._update(data.calendarEvent); - const newCalendar = new CalendarEvent(this.client, data.calendarEvent); - if (this.shouldCacheCalendar) this.cache.set(newCalendar.id, newCalendar); - return newCalendar; - } - - /** - * Delete a calendar event. - * - * @param channelId - The ID of the channel where the calendar event is located. - * @param calendarEventId - The ID of the calendar event to delete. - * @returns A Promise that resolves with the deleted calendar event or `undefined` if the event was not cached. - */ - async delete(channelId: string, calendarEventId: number): Promise { - await this.client.rest.router.calendarEvents.calendarEventDelete({ - channelId, - calendarEventId, - }); - const cachedCalendar = this.cache.get(calendarEventId); - return cachedCalendar ?? null; - } - - /** - * Get a single RSVP from a calendar event. - * - * @param channelId - The ID of the channel where the calendar event is located. - * @param calendarEventId - The ID of the calendar event to get the RSVP from. - * @param userId - The ID of the user who made the RSVP. - * @param force - Whether to force a request to the API instead of returning the cached RSVP. - * @returns A Promise that resolves with the requested RSVP. - */ - async fetchRsvp(channelId: string, calendarEventId: number, userId: string, force?: boolean): Promise { - if (!force) { - const existingRsvp = this.client.calendars.cache.get(calendarEventId)?.rsvps?.get(userId); - if (existingRsvp) return existingRsvp; - } - - const data = await this.client.rest.router.calendarEvents.calendarEventRsvpRead({ - channelId, - calendarEventId, - userId, - }); - const newRsvp = new CalendarEventRsvp(this.client, data.calendarEventRsvp); - if (this.shouldCacheCalendar && this.shouldCacheCalendarRsvps) this.cache.get(newRsvp.calendarEventId)?.rsvps?.set(newRsvp.userId, newRsvp); - return newRsvp; - } - - /** - * Fetch RSVPs for a calendar event. - * - * @param channelId - The ID of the channel where the calendar event is located. - * @param calendarEventId - The ID of the calendar event to fetch RSVPs for. - * @returns A Promise that resolves with a collection of RSVPs. - */ - async fetchManyRsvps(channelId: string, calendarEventId: number): Promise> { - const data = await this.client.rest.router.calendarEvents.calendarEventRsvpReadMany({ - channelId, - calendarEventId, - }); - const rsvpEvents = new Collection(); - for (const rsvpEvent of data.calendarEventRsvps) { - if (this.shouldCacheCalendar && this.shouldCacheCalendarRsvps) { - const cachedCalendar = this.cache.get(calendarEventId); - cachedCalendar?.rsvps?.set(rsvpEvent.userId, new CalendarEventRsvp(this.client, rsvpEvent)); - } - - rsvpEvents.set(rsvpEvent.userId, new CalendarEventRsvp(this.client, rsvpEvent)); - } - - return rsvpEvents; - } - - /** - * Creates or updates an RSVP for a calendar event. - * - * @param channelId The ID of the channel. - * @param calendarEventId The ID of the calendar event. - * @param userId The ID of the user. - * @param options The options for updating the RSVP. - * @returns A promise that resolves with the updated or created RSVP. - */ - async updateRsvp(channelId: string, calendarEventId: number, userId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.calendarEvents.calendarEventRsvpUpdate({ - channelId, - calendarEventId, - userId, - requestBody: options, - }); - - const existingRsvp = this.cache.get(calendarEventId)?.rsvps?.get(userId); - if (existingRsvp) return existingRsvp._update(data.calendarEventRsvp); - - const newRsvp = new CalendarEventRsvp(this.client, data.calendarEventRsvp); - if (this.shouldCacheCalendar && this.shouldCacheCalendarRsvps) this.cache.get(calendarEventId)?.rsvps?.set(userId, newRsvp); - return newRsvp; - } - - /** - * Creates or updates multiple RSVPs for a calendar event. - * - * @param channelId The ID of the channel. - * @param calendarEventId The ID of the calendar event. - * @param options The options for updating many RSVP. - */ - async updateManyRsvp(channelId: string, calendarEventId: number, options: OptionBody): Promise { - await this.client.rest.router.calendarEvents.calendarEventRsvpUpdateMany({ - channelId, - calendarEventId, - requestBody: options, - }); - } - - /** - * Deletes an RSVP for a calendar event. - * - * @param channelId The ID of the channel. - * @param calendarEventId The ID of the calendar event. - * @param userId The ID of the user. - * @returns A promise that resolves with the deleted RSVP or void if it was not cached. - */ - async deleteRsvp(channelId: string, calendarEventId: number, userId: string): Promise { - await this.client.rest.router.calendarEvents.calendarEventRsvpDelete({ - channelId, - calendarEventId, - userId, - }); - if (this.shouldCacheCalendar && this.shouldCacheCalendarRsvps) { - const cachedCalendar = this.cache.get(calendarEventId); - cachedCalendar?.rsvps?.delete(userId); - } - } + get shouldCacheCalendar(): boolean { + return this.client.options?.cache?.cacheCalendars !== false; + } + + get shouldCacheCalendarRsvps(): boolean { + return this.client.options?.cache?.cacheCalendarsRsvps !== false; + } + + /** + * Creates a calendar event. + * + * @param channelId The ID of the channel in which to create the event. + * @param options The options for the event. + * @returns A promise that resolves with the created calendar event. + */ + async create(channelId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.calendarEvents.calendarEventCreate({ + channelId, + requestBody: options, + }); + return new CalendarEvent(this.client, data.calendarEvent); + } + + /** + * Fetches a single calendar event. + * + * @param channelId The ID of the channel in which to fetch the event. + * @param calendarEventId The ID of the event to fetch. + * @param force Whether or not to force a fetch instead of using a cached version. + * @returns A promise that resolves with the fetched calendar event. + */ + async fetch(channelId: string, calendarEventId: number, force?: boolean): Promise { + if (!force) { + const existingCalendar = this.client.calendars.cache.get(calendarEventId); + if (existingCalendar) return existingCalendar; + } + + const data = await this.client.rest.router.calendarEvents.calendarEventRead({ + channelId, + calendarEventId, + }); + const newCalendar = new CalendarEvent(this.client, data.calendarEvent); + if (this.shouldCacheCalendar) this.client.calendars.cache.set(newCalendar.id, newCalendar); + return newCalendar; + } + + /** + * Fetches multiple calendar events. + * + * @param channelId The ID of the channel in which to fetch the events. + * @param options The options for the fetch. + * @returns A promise that resolves with a collection of the fetched calendar events. + */ + async fetchMany(channelId: string, options: Omit, "channelId">): Promise> { + const data = await this.client.rest.router.calendarEvents.calendarEventReadMany({ + channelId, + ...options, + }); + const calendarEvents = new Collection(); + for (const calendarEvent of data.calendarEvents) { + const newCalendar = new CalendarEvent(this.client, calendarEvent); + calendarEvents.set(newCalendar.id, newCalendar); + if (this.shouldCacheCalendar) this.client.calendars.cache.set(newCalendar.id, newCalendar); + } + + return calendarEvents; + } + + /** + * Updates a calendar event. + * + * @param channelId The ID of the channel in which the event exists. + * @param calendarEventId The ID of the event to update. + * @param options The options for the update. + * @returns A promise that resolves with the updated calendar event. + */ + async update(channelId: string, calendarEventId: number, options: OptionBody): Promise { + const data = await this.client.rest.router.calendarEvents.calendarEventUpdate({ + channelId, + calendarEventId, + requestBody: options, + }); + const existingCalendar = this.cache.get(calendarEventId); + if (existingCalendar) return existingCalendar._update(data.calendarEvent); + const newCalendar = new CalendarEvent(this.client, data.calendarEvent); + if (this.shouldCacheCalendar) this.cache.set(newCalendar.id, newCalendar); + return newCalendar; + } + + /** + * Delete a calendar event. + * + * @param channelId - The ID of the channel where the calendar event is located. + * @param calendarEventId - The ID of the calendar event to delete. + * @returns A Promise that resolves with the deleted calendar event or `undefined` if the event was not cached. + */ + async delete(channelId: string, calendarEventId: number): Promise { + await this.client.rest.router.calendarEvents.calendarEventDelete({ + channelId, + calendarEventId, + }); + const cachedCalendar = this.cache.get(calendarEventId); + return cachedCalendar ?? null; + } + + /** + * Get a single RSVP from a calendar event. + * + * @param channelId - The ID of the channel where the calendar event is located. + * @param calendarEventId - The ID of the calendar event to get the RSVP from. + * @param userId - The ID of the user who made the RSVP. + * @param force - Whether to force a request to the API instead of returning the cached RSVP. + * @returns A Promise that resolves with the requested RSVP. + */ + async fetchRsvp(channelId: string, calendarEventId: number, userId: string, force?: boolean): Promise { + if (!force) { + const existingRsvp = this.client.calendars.cache.get(calendarEventId)?.rsvps?.get(userId); + if (existingRsvp) return existingRsvp; + } + + const data = await this.client.rest.router.calendarEvents.calendarEventRsvpRead({ + channelId, + calendarEventId, + userId, + }); + const newRsvp = new CalendarEventRsvp(this.client, data.calendarEventRsvp); + if (this.shouldCacheCalendar && this.shouldCacheCalendarRsvps) this.cache.get(newRsvp.calendarEventId)?.rsvps?.set(newRsvp.userId, newRsvp); + return newRsvp; + } + + /** + * Fetch RSVPs for a calendar event. + * + * @param channelId - The ID of the channel where the calendar event is located. + * @param calendarEventId - The ID of the calendar event to fetch RSVPs for. + * @returns A Promise that resolves with a collection of RSVPs. + */ + async fetchManyRsvps(channelId: string, calendarEventId: number): Promise> { + const data = await this.client.rest.router.calendarEvents.calendarEventRsvpReadMany({ + channelId, + calendarEventId, + }); + const rsvpEvents = new Collection(); + for (const rsvpEvent of data.calendarEventRsvps) { + if (this.shouldCacheCalendar && this.shouldCacheCalendarRsvps) { + const cachedCalendar = this.cache.get(calendarEventId); + cachedCalendar?.rsvps?.set(rsvpEvent.userId, new CalendarEventRsvp(this.client, rsvpEvent)); + } + + rsvpEvents.set(rsvpEvent.userId, new CalendarEventRsvp(this.client, rsvpEvent)); + } + + return rsvpEvents; + } + + /** + * Creates or updates an RSVP for a calendar event. + * + * @param channelId The ID of the channel. + * @param calendarEventId The ID of the calendar event. + * @param userId The ID of the user. + * @param options The options for updating the RSVP. + * @returns A promise that resolves with the updated or created RSVP. + */ + async updateRsvp(channelId: string, calendarEventId: number, userId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.calendarEvents.calendarEventRsvpUpdate({ + channelId, + calendarEventId, + userId, + requestBody: options, + }); + + const existingRsvp = this.cache.get(calendarEventId)?.rsvps?.get(userId); + if (existingRsvp) return existingRsvp._update(data.calendarEventRsvp); + + const newRsvp = new CalendarEventRsvp(this.client, data.calendarEventRsvp); + if (this.shouldCacheCalendar && this.shouldCacheCalendarRsvps) this.cache.get(calendarEventId)?.rsvps?.set(userId, newRsvp); + return newRsvp; + } + + /** + * Creates or updates multiple RSVPs for a calendar event. + * + * @param channelId The ID of the channel. + * @param calendarEventId The ID of the calendar event. + * @param options The options for updating many RSVP. + */ + async updateManyRsvp(channelId: string, calendarEventId: number, options: OptionBody): Promise { + await this.client.rest.router.calendarEvents.calendarEventRsvpUpdateMany({ + channelId, + calendarEventId, + requestBody: options, + }); + } + + /** + * Deletes an RSVP for a calendar event. + * + * @param channelId The ID of the channel. + * @param calendarEventId The ID of the calendar event. + * @param userId The ID of the user. + * @returns A promise that resolves with the deleted RSVP or void if it was not cached. + */ + async deleteRsvp(channelId: string, calendarEventId: number, userId: string): Promise { + await this.client.rest.router.calendarEvents.calendarEventRsvpDelete({ + channelId, + calendarEventId, + userId, + }); + if (this.shouldCacheCalendar && this.shouldCacheCalendarRsvps) { + const cachedCalendar = this.cache.get(calendarEventId); + cachedCalendar?.rsvps?.delete(userId); + } + } } diff --git a/packages/guilded.js/lib/managers/global/CategoryManager.ts b/packages/guilded.js/lib/managers/global/CategoryManager.ts index 6d06b5fd..d9871fd8 100644 --- a/packages/guilded.js/lib/managers/global/CategoryManager.ts +++ b/packages/guilded.js/lib/managers/global/CategoryManager.ts @@ -7,62 +7,65 @@ import { CacheableStructManager } from "./CacheableStructManager"; * Manager for interacting with Catregories on Guilded. */ export class GlobalCategoryManager extends CacheableStructManager { - /** - * Create a new category - * - * @param serverId The ID of the server to create the category in. - * @param options Category creation options - * @returns Promise that resolves with the newly created category - */ - async create(serverId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.categories.categoryCreate({ - serverId, - requestBody: options, - }); - const createdCategory = new Category(this.client, data.category); - this.cache.set(createdCategory.id, createdCategory); - return createdCategory; - } + /** + * Create a new category + * + * @param serverId The ID of the server to create the category in. + * @param options Category creation options + * @returns Promise that resolves with the newly created category + */ + async create(serverId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.categories.categoryCreate({ + serverId, + requestBody: options, + }); + const createdCategory = new Category(this.client, data.category); + this.cache.set(createdCategory.id, createdCategory); + return createdCategory; + } - async fetch(serverId: string, categoryId: number): Promise { - const data = await this.client.rest.router.categories.categoryRead({ - serverId, - categoryId, - }); - const fetchedCategory = new Category(this.client, data.category); - this.cache.set(fetchedCategory.id, fetchedCategory); - return fetchedCategory; - } + async fetch(serverId: string, categoryId: number): Promise { + const data = await this.client.rest.router.categories.categoryRead({ + serverId, + categoryId, + }); + const fetchedCategory = new Category(this.client, data.category); + this.cache.set(fetchedCategory.id, fetchedCategory); + return fetchedCategory; + } - /** - * Update a category - * - * @param serverId The ID of the server to update the category in. - * @param categoryId The ID of the category to update. - * @param options The options to update the category with. - * @returns A Promise that resolves with the updated category. - */ - async update(serverId: string, categoryId: number, options: OptionBody): Promise { - const data = await this.client.rest.router.categories.categoryUpdate({ - serverId, - categoryId, - requestBody: options, - }); + /** + * Update a category + * + * @param serverId The ID of the server to update the category in. + * @param categoryId The ID of the category to update. + * @param options The options to update the category with. + * @returns A Promise that resolves with the updated category. + */ + async update(serverId: string, categoryId: number, options: OptionBody): Promise { + const data = await this.client.rest.router.categories.categoryUpdate({ + serverId, + categoryId, + requestBody: options, + }); - let category = this.cache.get(data.category.id)?._update(data.category); - category ??= new Category(this.client, data.category); - return category; - } + let category = this.cache.get(data.category.id)?._update(data.category); + category ??= new Category(this.client, data.category); + return category; + } - /** - * Delete a category - * - * @param serverId The ID of the server to delete the category from. - * @param categoryId The ID of the category to delete. - * @returns A Promise that resolves when the operation is complete. - */ - async delete(serverId: string, categoryId: number): Promise { - await this.client.rest.router.categories.categoryDelete({ serverId, categoryId }); - if (this.cache.has(categoryId)) this.cache.delete(categoryId); - } + /** + * Delete a category + * + * @param serverId The ID of the server to delete the category from. + * @param categoryId The ID of the category to delete. + * @returns A Promise that resolves when the operation is complete. + */ + async delete(serverId: string, categoryId: number): Promise { + await this.client.rest.router.categories.categoryDelete({ + serverId, + categoryId, + }); + if (this.cache.has(categoryId)) this.cache.delete(categoryId); + } } diff --git a/packages/guilded.js/lib/managers/global/ChannelManager.ts b/packages/guilded.js/lib/managers/global/ChannelManager.ts index c57aed13..8fdc8fbc 100644 --- a/packages/guilded.js/lib/managers/global/ChannelManager.ts +++ b/packages/guilded.js/lib/managers/global/ChannelManager.ts @@ -11,106 +11,112 @@ import { CacheableStructManager } from "./CacheableStructManager"; * @extends CacheableStructManager */ export class GlobalChannelManager extends CacheableStructManager { - /** Determine whether a channel should be cached or not */ - get shouldCacheChannel(): boolean { - return this.client.options?.cache?.cacheChannels !== false; - } + /** Determine whether a channel should be cached or not */ + get shouldCacheChannel(): boolean { + return this.client.options?.cache?.cacheChannels !== false; + } - /** - * Create a new channel - * - * @param options Channel creation options - * @returns Promise that resolves with the newly created channel - */ - async create(options: OptionBody): Promise { - const data = await this.client.rest.router.channels.channelCreate({ - requestBody: options, - }); - if (data.channel.messageId && data.channel.rootId && data.channel.parentId) { - return new ThreadChannel(this.client, data.channel); - } + /** + * Create a new channel + * + * @param options Channel creation options + * @returns Promise that resolves with the newly created channel + */ + async create(options: OptionBody): Promise { + const data = await this.client.rest.router.channels.channelCreate({ + requestBody: options, + }); + if (data.channel.messageId && data.channel.rootId && data.channel.parentId) { + return new ThreadChannel(this.client, data.channel); + } - return new (transformTypeToChannel(data.channel.type))(this.client, data.channel); - } + return new (transformTypeToChannel(data.channel.type))(this.client, data.channel); + } - /** - * Fetch a channel by ID - * Notice: if you're using TypeScript, you will need to upcast to your desired channel type. - * - * @param channelId ID of the channel to fetch - * @param force Whether to force a fetch from the API - * @returns Promise that resolves with the fetched channel - */ - async fetch(channelId: string, force?: boolean): Promise { - if (!force) { - const existingChannel = this.client.channels.cache.get(channelId); - if (existingChannel) return existingChannel; - } + /** + * Fetch a channel by ID + * Notice: if you're using TypeScript, you will need to upcast to your desired channel type. + * + * @param channelId ID of the channel to fetch + * @param force Whether to force a fetch from the API + * @returns Promise that resolves with the fetched channel + */ + async fetch(channelId: string, force?: boolean): Promise { + if (!force) { + const existingChannel = this.client.channels.cache.get(channelId); + if (existingChannel) return existingChannel; + } - const data = await this.client.rest.router.channels.channelRead({ - channelId, - }); - const fetchedChannel = new (transformTypeToChannel(data.channel.type))(this.client, data.channel); - if (this.shouldCacheChannel) this.cache.set(fetchedChannel.id, fetchedChannel); - return fetchedChannel; - } + const data = await this.client.rest.router.channels.channelRead({ + channelId, + }); + const fetchedChannel = new (transformTypeToChannel(data.channel.type))(this.client, data.channel); + if (this.shouldCacheChannel) this.cache.set(fetchedChannel.id, fetchedChannel); + return fetchedChannel; + } - /** - * Update a channel by ID - * - * @param channelId ID of the channel to update - * @param options Channel update options - * @returns Promise that resolves with the updated channel - */ - async update(channelId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.channels.channelUpdate({ - channelId, - requestBody: options, - }); + /** + * Update a channel by ID + * + * @param channelId ID of the channel to update + * @param options Channel update options + * @returns Promise that resolves with the updated channel + */ + async update(channelId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.channels.channelUpdate({ + channelId, + requestBody: options, + }); - const existingChannel = this.cache.get(channelId); - if (existingChannel) return existingChannel._update(data.channel); + const existingChannel = this.cache.get(channelId); + if (existingChannel) return existingChannel._update(data.channel); - const newChannel = new (transformTypeToChannel(data.channel.type))(this.client, data.channel); - if (this.shouldCacheChannel) this.cache.set(newChannel.id, newChannel); - return newChannel; - } + const newChannel = new (transformTypeToChannel(data.channel.type))(this.client, data.channel); + if (this.shouldCacheChannel) this.cache.set(newChannel.id, newChannel); + return newChannel; + } - /** - * Delete a channel by ID - * - * @param channelId ID of the channel to delete - * @returns Promise that resolves with the deleted channel, or null if not cached. - */ - async delete(channelId: string): Promise { - await this.client.rest.router.channels.channelDelete({ channelId }); - const cachedChannel = this.cache.get(channelId); - return cachedChannel ?? null; - } + /** + * Delete a channel by ID + * + * @param channelId ID of the channel to delete + * @returns Promise that resolves with the deleted channel, or null if not cached. + */ + async delete(channelId: string): Promise { + await this.client.rest.router.channels.channelDelete({ + channelId, + }); + const cachedChannel = this.cache.get(channelId); + return cachedChannel ?? null; + } - /** - * Archive a channel by ID - * - * @param channelId ID of the channel to archive - * @returns Promise that resolves with the archived channel or null if not cached - */ - async archive(channelId: string): Promise { - await this.client.rest.router.channels.channelArchiveCreate({ channelId }); - const existingChannel = this.cache.get(channelId); - return existingChannel ?? null; - } + /** + * Archive a channel by ID + * + * @param channelId ID of the channel to archive + * @returns Promise that resolves with the archived channel or null if not cached + */ + async archive(channelId: string): Promise { + await this.client.rest.router.channels.channelArchiveCreate({ + channelId, + }); + const existingChannel = this.cache.get(channelId); + return existingChannel ?? null; + } - /** - * Unarchive a channel by ID - * - * @param channelId ID of the channel to unarchive - * @returns Promise that resolves with the unarchived channel or null if not cached - */ - async unarchive(channelId: string): Promise { - await this.client.rest.router.channels.channelArchiveDelete({ channelId }); - const existingChannel = this.cache.get(channelId); - return existingChannel ?? null; - } + /** + * Unarchive a channel by ID + * + * @param channelId ID of the channel to unarchive + * @returns Promise that resolves with the unarchived channel or null if not cached + */ + async unarchive(channelId: string): Promise { + await this.client.rest.router.channels.channelArchiveDelete({ + channelId, + }); + const existingChannel = this.cache.get(channelId); + return existingChannel ?? null; + } } /** @@ -123,8 +129,8 @@ export const transformTypeToChannel = (str: ServerChannelPayload["type"]): (type /** Mapping between the string APIChannelType and the corresponding channel class */ export const typeToChannel = { - chat: ChatChannel, - forums: ForumChannel, - docs: DocChannel, - list: ListChannel, + chat: ChatChannel, + forums: ForumChannel, + docs: DocChannel, + list: ListChannel, }; diff --git a/packages/guilded.js/lib/managers/global/DocManager.ts b/packages/guilded.js/lib/managers/global/DocManager.ts index 955b84a8..88408a15 100644 --- a/packages/guilded.js/lib/managers/global/DocManager.ts +++ b/packages/guilded.js/lib/managers/global/DocManager.ts @@ -6,72 +6,77 @@ import { GlobalManager } from "./GlobalManager"; * A manager class for Docs */ export class GlobalDocManager extends GlobalManager { - /** - * Create a new Doc. - * - * @param channelId - The ID of the channel where the Doc should be created. - * @param options - The options for the Doc to be created. - * @returns A Promise that resolves with the Doc payload of the newly created Doc. - */ - async create(channelId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.docs.docCreate({ - channelId, - requestBody: options, - }); - return data.doc; - } + /** + * Create a new Doc. + * + * @param channelId - The ID of the channel where the Doc should be created. + * @param options - The options for the Doc to be created. + * @returns A Promise that resolves with the Doc payload of the newly created Doc. + */ + async create(channelId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.docs.docCreate({ + channelId, + requestBody: options, + }); + return data.doc; + } - /** - * Fetches multiple Docs from a channel. - * - * @param channelId - The ID of the channel where the Docs are located. - * @returns A Promise that resolves with an array of Doc payloads. - */ - async fetchMany(channelId: string): Promise { - const data = await this.client.rest.router.docs.docReadMany({ channelId }); - return data.docs; - } + /** + * Fetches multiple Docs from a channel. + * + * @param channelId - The ID of the channel where the Docs are located. + * @returns A Promise that resolves with an array of Doc payloads. + */ + async fetchMany(channelId: string): Promise { + const data = await this.client.rest.router.docs.docReadMany({ + channelId, + }); + return data.docs; + } - /** - * Fetch a Doc from a channel. - * - * @param channelId - The ID of the channel where the Doc is located. - * @param docId - The ID of the Doc to fetch. - * @returns A Promise that resolves with the Doc payload of the fetched Doc. - */ - async fetch(channelId: string, docId: number): Promise { - const data = await this.client.rest.router.docs.docRead({ - channelId, - docId, - }); - return data.doc; - } + /** + * Fetch a Doc from a channel. + * + * @param channelId - The ID of the channel where the Doc is located. + * @param docId - The ID of the Doc to fetch. + * @returns A Promise that resolves with the Doc payload of the fetched Doc. + */ + async fetch(channelId: string, docId: number): Promise { + const data = await this.client.rest.router.docs.docRead({ + channelId, + docId, + }); + return data.doc; + } - /** - * Update a Doc. - * - * @param channelId - The ID of the channel where the Doc is located. - * @param docId - The ID of the Doc to update. - * @param options - The options for the Doc update. - * @returns A Promise that resolves with the Doc payload of the updated Doc. - */ - async update(channelId: string, docId: number, options: OptionBody): Promise { - const data = await this.client.rest.router.docs.docUpdate({ - channelId, - docId, - requestBody: options, - }); - return data.doc; - } + /** + * Update a Doc. + * + * @param channelId - The ID of the channel where the Doc is located. + * @param docId - The ID of the Doc to update. + * @param options - The options for the Doc update. + * @returns A Promise that resolves with the Doc payload of the updated Doc. + */ + async update(channelId: string, docId: number, options: OptionBody): Promise { + const data = await this.client.rest.router.docs.docUpdate({ + channelId, + docId, + requestBody: options, + }); + return data.doc; + } - /** - * Delete a Doc from a channel. - * - * @param channelId - The ID of the channel where the Doc is located. - * @param docId - The ID of the Doc to delete. - * @returns A Promise that resolves with void when the Doc is successfully deleted. - */ - async delete(channelId: string, docId: number): Promise { - await this.client.rest.router.docs.docDelete({ channelId, docId }); - } + /** + * Delete a Doc from a channel. + * + * @param channelId - The ID of the channel where the Doc is located. + * @param docId - The ID of the Doc to delete. + * @returns A Promise that resolves with void when the Doc is successfully deleted. + */ + async delete(channelId: string, docId: number): Promise { + await this.client.rest.router.docs.docDelete({ + channelId, + docId, + }); + } } diff --git a/packages/guilded.js/lib/managers/global/ForumManager.ts b/packages/guilded.js/lib/managers/global/ForumManager.ts index 51d682de..aa306b50 100644 --- a/packages/guilded.js/lib/managers/global/ForumManager.ts +++ b/packages/guilded.js/lib/managers/global/ForumManager.ts @@ -8,152 +8,152 @@ import { CacheableStructManager } from "./CacheableStructManager"; * Manager for interacting with forum topics at a global level. */ export class GlobalForumTopicManager extends CacheableStructManager { - get shouldCacheForumTopic(): boolean { - return this.client.options.cache?.cacheForumTopics !== false; - } + get shouldCacheForumTopic(): boolean { + return this.client.options.cache?.cacheForumTopics !== false; + } - /** - * Create a topic in a forum. - * - * @param channelId The ID of the channel containing the forum. - * @param options The options for creating the forum topic. - * @returns A Promise that resolves with the payload of the created forum topic. - */ - async create(channelId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.forums.forumTopicCreate({ - channelId, - requestBody: options, - }); - return new ForumTopic(this.client, data.forumTopic); - } + /** + * Create a topic in a forum. + * + * @param channelId The ID of the channel containing the forum. + * @param options The options for creating the forum topic. + * @returns A Promise that resolves with the payload of the created forum topic. + */ + async create(channelId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.forums.forumTopicCreate({ + channelId, + requestBody: options, + }); + return new ForumTopic(this.client, data.forumTopic); + } - /** - * Get all topics in a forum. - * - * @param channelId The ID of the channel containing the forum. - * @param options The options for filtering the forum topics. - * @returns A Promise that resolves to a Collection of ForumTopics. - */ - async fetchMany(channelId: string, options: Omit, "channelId">): Promise> { - const data = await this.client.rest.router.forums.forumTopicReadMany({ - channelId, - ...options, - }); + /** + * Get all topics in a forum. + * + * @param channelId The ID of the channel containing the forum. + * @param options The options for filtering the forum topics. + * @returns A Promise that resolves to a Collection of ForumTopics. + */ + async fetchMany(channelId: string, options: Omit, "channelId">): Promise> { + const data = await this.client.rest.router.forums.forumTopicReadMany({ + channelId, + ...options, + }); - const topics = new Collection(); - for (const forumTopic of data.forumTopics) { - const newTopic = new PartialForumTopic(this.client, forumTopic); - topics.set(newTopic.id, newTopic); - } + const topics = new Collection(); + for (const forumTopic of data.forumTopics) { + const newTopic = new PartialForumTopic(this.client, forumTopic); + topics.set(newTopic.id, newTopic); + } - return topics; - } + return topics; + } - /** - * Get a topic in a forum. - * - * @param channelId The ID of the channel containing the forum. - * @param forumTopicId The ID of the forum topic. - * @returns a Promise that resolves to a ForumTopic. - */ - async fetch(channelId: string, forumTopicId: number): Promise { - const data = await this.client.rest.router.forums.forumTopicRead({ - channelId, - forumTopicId, - }); - return new ForumTopic(this.client, data.forumTopic); - } + /** + * Get a topic in a forum. + * + * @param channelId The ID of the channel containing the forum. + * @param forumTopicId The ID of the forum topic. + * @returns a Promise that resolves to a ForumTopic. + */ + async fetch(channelId: string, forumTopicId: number): Promise { + const data = await this.client.rest.router.forums.forumTopicRead({ + channelId, + forumTopicId, + }); + return new ForumTopic(this.client, data.forumTopic); + } - /** - * Update a topic in a forum. - * - * @param channelId The ID of the channel containing the forum. - * @param forumTopicId The ID of the forum topic. - * @param options The options for updating the forum topic. - * @returns A Promise that resolves to the updated ForumTopic. If cached locally, it will modify that object. - */ - async update(channelId: string, forumTopicId: number, options: OptionBody): Promise { - const data = await this.client.rest.router.forums.forumTopicUpdate({ - channelId, - forumTopicId, - requestBody: options, - }); + /** + * Update a topic in a forum. + * + * @param channelId The ID of the channel containing the forum. + * @param forumTopicId The ID of the forum topic. + * @param options The options for updating the forum topic. + * @returns A Promise that resolves to the updated ForumTopic. If cached locally, it will modify that object. + */ + async update(channelId: string, forumTopicId: number, options: OptionBody): Promise { + const data = await this.client.rest.router.forums.forumTopicUpdate({ + channelId, + forumTopicId, + requestBody: options, + }); - const existingTopic = this.client.topics.cache.get(data.forumTopic.id); - if (existingTopic) return existingTopic._update(data.forumTopic); + const existingTopic = this.client.topics.cache.get(data.forumTopic.id); + if (existingTopic) return existingTopic._update(data.forumTopic); - const newTopic = new ForumTopic(this.client, data.forumTopic); - this.client.topics.cache.set(newTopic.id, newTopic); - return newTopic; - } + const newTopic = new ForumTopic(this.client, data.forumTopic); + this.client.topics.cache.set(newTopic.id, newTopic); + return newTopic; + } - /** - * Delete a topic in a forum. - * - * @param channelId The ID of the channel containing the forum. - * @param forumTopicId The ID of the forum topic. - * @returns A Promise that resolves to nothing. - */ - async delete(channelId: string, forumTopicId: number): Promise { - await this.client.rest.router.forums.forumTopicDelete({ - channelId, - forumTopicId, - }); - } + /** + * Delete a topic in a forum. + * + * @param channelId The ID of the channel containing the forum. + * @param forumTopicId The ID of the forum topic. + * @returns A Promise that resolves to nothing. + */ + async delete(channelId: string, forumTopicId: number): Promise { + await this.client.rest.router.forums.forumTopicDelete({ + channelId, + forumTopicId, + }); + } - /** - * Pin a topic in a forum. - * - * @param channelId The ID of the channel containing the forum. - * @param forumTopicId The ID of the forum topic. - * @returns A Promise that resolves to nothing. - */ - async pin(channelId: string, forumTopicId: number): Promise { - await this.client.rest.router.forums.forumTopicPin({ - channelId, - forumTopicId, - }); - } + /** + * Pin a topic in a forum. + * + * @param channelId The ID of the channel containing the forum. + * @param forumTopicId The ID of the forum topic. + * @returns A Promise that resolves to nothing. + */ + async pin(channelId: string, forumTopicId: number): Promise { + await this.client.rest.router.forums.forumTopicPin({ + channelId, + forumTopicId, + }); + } - /** - * Unpin a topic in a forum. - * - * @param channelId The ID of the channel containing the forum. - * @param forumTopicId The ID of the forum topic. - * @returns A Promise that resolves to nothing. - */ - async unpin(channelId: string, forumTopicId: number): Promise { - await this.client.rest.router.forums.forumTopicUnpin({ - channelId, - forumTopicId, - }); - } + /** + * Unpin a topic in a forum. + * + * @param channelId The ID of the channel containing the forum. + * @param forumTopicId The ID of the forum topic. + * @returns A Promise that resolves to nothing. + */ + async unpin(channelId: string, forumTopicId: number): Promise { + await this.client.rest.router.forums.forumTopicUnpin({ + channelId, + forumTopicId, + }); + } - /** - * Lock a topic in a forum. - * - * @param channelId The ID of the channel containing the forum. - * @param forumTopicId The ID of the forum topic. - * @returns A Promise that resolves to nothing. - */ - async lock(channelId: string, forumTopicId: number): Promise { - await this.client.rest.router.forums.forumTopicLock({ - channelId, - forumTopicId, - }); - } + /** + * Lock a topic in a forum. + * + * @param channelId The ID of the channel containing the forum. + * @param forumTopicId The ID of the forum topic. + * @returns A Promise that resolves to nothing. + */ + async lock(channelId: string, forumTopicId: number): Promise { + await this.client.rest.router.forums.forumTopicLock({ + channelId, + forumTopicId, + }); + } - /** - * Unlock a topic in a forum. - * - * @param channelId The ID of the channel containing the forum. - * @param forumTopicId The ID - * @returns A Promise that resolves to nothing. - */ - async unlock(channelId: string, forumTopicId: number): Promise { - await this.client.rest.router.forums.forumTopicUnlock({ - channelId, - forumTopicId, - }); - } + /** + * Unlock a topic in a forum. + * + * @param channelId The ID of the channel containing the forum. + * @param forumTopicId The ID + * @returns A Promise that resolves to nothing. + */ + async unlock(channelId: string, forumTopicId: number): Promise { + await this.client.rest.router.forums.forumTopicUnlock({ + channelId, + forumTopicId, + }); + } } diff --git a/packages/guilded.js/lib/managers/global/GlobalManager.ts b/packages/guilded.js/lib/managers/global/GlobalManager.ts index 67f17dbc..3987179f 100644 --- a/packages/guilded.js/lib/managers/global/GlobalManager.ts +++ b/packages/guilded.js/lib/managers/global/GlobalManager.ts @@ -4,5 +4,5 @@ import type { Client } from "../../structures/Client"; * Represents any manager. */ export class GlobalManager { - constructor(public readonly client: Client) {} + constructor(public readonly client: Client) {} } diff --git a/packages/guilded.js/lib/managers/global/GroupManager.ts b/packages/guilded.js/lib/managers/global/GroupManager.ts index 2247ccb0..d13b79cf 100644 --- a/packages/guilded.js/lib/managers/global/GroupManager.ts +++ b/packages/guilded.js/lib/managers/global/GroupManager.ts @@ -8,117 +8,120 @@ import { CacheableStructManager } from "./CacheableStructManager"; * Manager for interacting with Groups on Guilded. */ export class GlobalGroupManager extends CacheableStructManager { - /** - * Creates a group. - * - * @param serverId The ID of the server to create the group in. - * @param options The options for the group to create. - * @returns A Promise that resolves with the created group. - */ - async create(serverId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.groups.groupCreate({ - serverId, - requestBody: options, - }); - const createdGroup = new Group(this.client, data.group); - this.cache.set(createdGroup.id, createdGroup); - return createdGroup; - } + /** + * Creates a group. + * + * @param serverId The ID of the server to create the group in. + * @param options The options for the group to create. + * @returns A Promise that resolves with the created group. + */ + async create(serverId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.groups.groupCreate({ + serverId, + requestBody: options, + }); + const createdGroup = new Group(this.client, data.group); + this.cache.set(createdGroup.id, createdGroup); + return createdGroup; + } - /** - * Fetch a group - * - * @param serverId The ID of the server to fetch the group from. - * @param groupId The ID of the group to fetch. - * @returns A Promise that resolves with the fetched group. - */ - async fetch(serverId: string, groupId: string): Promise { - const data = await this.client.rest.router.groups.groupRead({ - serverId, - groupId, - }); - const fetchedGroup = new Group(this.client, data.group); - this.cache.set(fetchedGroup.id, fetchedGroup); - return fetchedGroup; - } + /** + * Fetch a group + * + * @param serverId The ID of the server to fetch the group from. + * @param groupId The ID of the group to fetch. + * @returns A Promise that resolves with the fetched group. + */ + async fetch(serverId: string, groupId: string): Promise { + const data = await this.client.rest.router.groups.groupRead({ + serverId, + groupId, + }); + const fetchedGroup = new Group(this.client, data.group); + this.cache.set(fetchedGroup.id, fetchedGroup); + return fetchedGroup; + } - /** - * Fetch all the groups in a server - * - * @param serverId The ID of the server to fetch the groups from. - * @returns A Promise that resolves a Collection containing the fetched groups. - */ - async fetchMany(serverId: string): Promise> { - const data = await this.client.rest.router.groups.groupReadMany({ - serverId, - }); - const groups = new Collection(); + /** + * Fetch all the groups in a server + * + * @param serverId The ID of the server to fetch the groups from. + * @returns A Promise that resolves a Collection containing the fetched groups. + */ + async fetchMany(serverId: string): Promise> { + const data = await this.client.rest.router.groups.groupReadMany({ + serverId, + }); + const groups = new Collection(); - for (const group of data.groups) { - const fetchedGroup = new Group(this.client, group); - this.cache.set(fetchedGroup.id, fetchedGroup); - groups.set(fetchedGroup.id, fetchedGroup); - } + for (const group of data.groups) { + const fetchedGroup = new Group(this.client, group); + this.cache.set(fetchedGroup.id, fetchedGroup); + groups.set(fetchedGroup.id, fetchedGroup); + } - return groups; - } + return groups; + } - /** - * Update a group - * - * @param serverId The ID of the server to update the group in. - * @param groupId The ID of the group to update. - * @param options The options to update the group with. - * @returns A Promise that resolves with the updated group. - */ - async update(serverId: string, groupId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.groups.groupUpdate({ - serverId, - groupId, - requestBody: options, - }); - let group = this.cache.get(data.group.id)?._update(data.group); - group ??= new Group(this.client, data.group); - return group; - } + /** + * Update a group + * + * @param serverId The ID of the server to update the group in. + * @param groupId The ID of the group to update. + * @param options The options to update the group with. + * @returns A Promise that resolves with the updated group. + */ + async update(serverId: string, groupId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.groups.groupUpdate({ + serverId, + groupId, + requestBody: options, + }); + let group = this.cache.get(data.group.id)?._update(data.group); + group ??= new Group(this.client, data.group); + return group; + } - /** - * Delete a group - * - * @param serverId The ID of the server to delete the group from. - * @param groupId The ID of the group to delete. - * @returns A Promise that resolves when the operation is complete. - */ - async delete(serverId: string, groupId: string): Promise { - await this.client.rest.router.groups.groupDelete({ serverId, groupId }); - if (this.cache.has(groupId)) this.cache.delete(groupId); - } + /** + * Delete a group + * + * @param serverId The ID of the server to delete the group from. + * @param groupId The ID of the group to delete. + * @returns A Promise that resolves when the operation is complete. + */ + async delete(serverId: string, groupId: string): Promise { + await this.client.rest.router.groups.groupDelete({ + serverId, + groupId, + }); + if (this.cache.has(groupId)) this.cache.delete(groupId); + } - /** - * Adds a member to a group. - * - * @param groupId The ID of the group. - * @param userId The ID of the user to add. - * @returns A Promise that resolves when the operation is complete. - */ - async addMember(groupId: string, userId: string): Promise { - await this.client.rest.router.groupMembership.groupMembershipCreate({ - groupId, - userId, - }); - } + /** + * Adds a member to a group. + * + * @param groupId The ID of the group. + * @param userId The ID of the user to add. + * @returns A Promise that resolves when the operation is complete. + */ + async addMember(groupId: string, userId: string): Promise { + await this.client.rest.router.groupMembership.groupMembershipCreate({ + groupId, + userId, + }); + } - /** - * Removes a member from a group. - * - * @param groupId The ID of the group. - * @param userId The ID of the user to remove. - * @returns A Promise that resolves when the operation is complete. - */ - async removeMember(groupId: string, userId: string): Promise { - await this.client.rest.router.groupMembership.groupMembershipDelete({ - groupId, - userId, - }); - } + /** + * Removes a member from a group. + * + * @param groupId The ID of the group. + * @param userId The ID of the user to remove. + * @returns A Promise that resolves when the operation is complete. + */ + async removeMember(groupId: string, userId: string): Promise { + await this.client.rest.router.groupMembership.groupMembershipDelete({ + groupId, + userId, + }); + } } diff --git a/packages/guilded.js/lib/managers/global/GuildBanManager.ts b/packages/guilded.js/lib/managers/global/GuildBanManager.ts index a8796366..6060a65a 100644 --- a/packages/guilded.js/lib/managers/global/GuildBanManager.ts +++ b/packages/guilded.js/lib/managers/global/GuildBanManager.ts @@ -7,92 +7,98 @@ import { CacheableStructManager } from "./CacheableStructManager"; * Manages guild bans in all servers. */ export class GlobalGuildBanManager extends CacheableStructManager { - /** - * Returns whether bans should be cached. - */ - get shouldCacheBan(): boolean { - return this.client.options.cache?.cacheMemberBans !== false; - } + /** + * Returns whether bans should be cached. + */ + get shouldCacheBan(): boolean { + return this.client.options.cache?.cacheMemberBans !== false; + } - /** - * Fetches a member ban in a server. - * - * @param serverId The ID of the server. - * @param userId The ID of the user. - * @param force Whether to force fetch the ban even if it's cached. - * @returns A Promise that resolves with the fetched member ban. - */ - async fetch(serverId: string, userId: string, force?: boolean): Promise { - if (!force) { - const existingMemberBan = this.client.bans.cache.get(buildMemberKey(serverId, userId)); - if (existingMemberBan) return existingMemberBan; - } + /** + * Fetches a member ban in a server. + * + * @param serverId The ID of the server. + * @param userId The ID of the user. + * @param force Whether to force fetch the ban even if it's cached. + * @returns A Promise that resolves with the fetched member ban. + */ + async fetch(serverId: string, userId: string, force?: boolean): Promise { + if (!force) { + const existingMemberBan = this.client.bans.cache.get(buildMemberKey(serverId, userId)); + if (existingMemberBan) return existingMemberBan; + } - const data = await this.client.rest.router.memberBans.serverMemberBanRead({ - serverId, - userId, - }); - const newMemberBan = new MemberBan(this.client, { - ...data.serverMemberBan, - serverId, - }); - if (this.shouldCacheBan) this.client.bans.cache.set(newMemberBan.id, newMemberBan); - return newMemberBan; - } + const data = await this.client.rest.router.memberBans.serverMemberBanRead({ + serverId, + userId, + }); + const newMemberBan = new MemberBan(this.client, { + ...data.serverMemberBan, + serverId, + }); + if (this.shouldCacheBan) this.client.bans.cache.set(newMemberBan.id, newMemberBan); + return newMemberBan; + } - /** - * Fetches all bans in a server. - * - * @param serverId The ID of the server. - * @returns A Promise that resolves with a collection of the fetched member bans. - */ - async fetchMany(serverId: string): Promise> { - const data = await this.client.rest.router.memberBans.serverMemberBanReadMany({ - serverId, - }); - const newMemberBans = new Collection(); - for (const ban of data.serverMemberBans) { - const newMemberBan = new MemberBan(this.client, { serverId, ...ban }); - newMemberBans.set(newMemberBan.id, newMemberBan); - if (this.shouldCacheBan) this.client.bans.cache.set(newMemberBan.id, newMemberBan); - } + /** + * Fetches all bans in a server. + * + * @param serverId The ID of the server. + * @returns A Promise that resolves with a collection of the fetched member bans. + */ + async fetchMany(serverId: string): Promise> { + const data = await this.client.rest.router.memberBans.serverMemberBanReadMany({ + serverId, + }); + const newMemberBans = new Collection(); + for (const ban of data.serverMemberBans) { + const newMemberBan = new MemberBan(this.client, { + serverId, + ...ban, + }); + newMemberBans.set(newMemberBan.id, newMemberBan); + if (this.shouldCacheBan) this.client.bans.cache.set(newMemberBan.id, newMemberBan); + } - return newMemberBans; - } + return newMemberBans; + } - /** - * Bans a user from a server. - * - * @param serverId The ID of the server. - * @param userId The ID of the user. - * @returns A Promise that resolves with the newly created member ban. - */ - async ban(serverId: string, userId: string): Promise { - const data = await this.client.rest.router.memberBans.serverMemberBanCreate({ serverId, userId }); - const newMemberBan = new MemberBan(this.client, { - serverId, - ...data.serverMemberBan, - }); - if (this.shouldCacheBan) this.client.bans.cache.set(newMemberBan.id, newMemberBan); - return newMemberBan; - } + /** + * Bans a user from a server. + * + * @param serverId The ID of the server. + * @param userId The ID of the user. + * @returns A Promise that resolves with the newly created member ban. + */ + async ban(serverId: string, userId: string): Promise { + const data = await this.client.rest.router.memberBans.serverMemberBanCreate({ + serverId, + userId, + }); + const newMemberBan = new MemberBan(this.client, { + serverId, + ...data.serverMemberBan, + }); + if (this.shouldCacheBan) this.client.bans.cache.set(newMemberBan.id, newMemberBan); + return newMemberBan; + } - /** - * Unbans a user from a server. - * - * @param serverId The ID of the server. - * @param userId The ID of the user. - * @param removeBanIfCached Whether to remove the ban from the cache if it exists. - * @returns A Promise that resolves with the unbanned member ban or `null` if it isn't cached. - */ - async unban(serverId: string, userId: string, removeBanIfCached = false): Promise { - await this.client.rest.router.memberBans.serverMemberBanDelete({ - serverId, - userId, - }); - const memberKey = buildMemberKey(serverId, userId); - const existingBan = this.client.bans.cache.get(memberKey); - if (this.client.options.cache?.removeMemberBanOnUnban || removeBanIfCached) this.client.bans.cache.delete(memberKey); - return existingBan ?? null; - } + /** + * Unbans a user from a server. + * + * @param serverId The ID of the server. + * @param userId The ID of the user. + * @param removeBanIfCached Whether to remove the ban from the cache if it exists. + * @returns A Promise that resolves with the unbanned member ban or `null` if it isn't cached. + */ + async unban(serverId: string, userId: string, removeBanIfCached = false): Promise { + await this.client.rest.router.memberBans.serverMemberBanDelete({ + serverId, + userId, + }); + const memberKey = buildMemberKey(serverId, userId); + const existingBan = this.client.bans.cache.get(memberKey); + if (this.client.options.cache?.removeMemberBanOnUnban || removeBanIfCached) this.client.bans.cache.delete(memberKey); + return existingBan ?? null; + } } diff --git a/packages/guilded.js/lib/managers/global/ListManager.ts b/packages/guilded.js/lib/managers/global/ListManager.ts index bf982034..1ab60f08 100644 --- a/packages/guilded.js/lib/managers/global/ListManager.ts +++ b/packages/guilded.js/lib/managers/global/ListManager.ts @@ -6,105 +6,105 @@ import { GlobalManager } from "./GlobalManager"; * A class representing a manager for list items at a global level. */ export class GlobalListItemManager extends GlobalManager { - /** - * Creates a new list item. - * - * @param channelId The ID of the channel to create the list item in. - * @param options Additional options for the list item. - * @returns A Promise that resolves with the newly created list item. - */ - async create(channelId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.listItems.listItemCreate({ - channelId, - requestBody: options, - }); - return data.listItem; - } + /** + * Creates a new list item. + * + * @param channelId The ID of the channel to create the list item in. + * @param options Additional options for the list item. + * @returns A Promise that resolves with the newly created list item. + */ + async create(channelId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.listItems.listItemCreate({ + channelId, + requestBody: options, + }); + return data.listItem; + } - /** - * Fetches multiple list items. - * - * @param channelId The ID of the channel to fetch the list items from. - * @returns A Promise that resolves with an array of list item summaries. - */ - async fetchMany(channelId: string): Promise { - const data = await this.client.rest.router.listItems.listItemReadMany({ - channelId, - }); - return data.listItems; - } + /** + * Fetches multiple list items. + * + * @param channelId The ID of the channel to fetch the list items from. + * @returns A Promise that resolves with an array of list item summaries. + */ + async fetchMany(channelId: string): Promise { + const data = await this.client.rest.router.listItems.listItemReadMany({ + channelId, + }); + return data.listItems; + } - /** - * Fetches a single list item. - * - * @param channelId The ID of the channel that the list item belongs to. - * @param listItemId The ID of the list item to fetch. - * @returns A Promise that resolves with the requested list item. - */ - async fetch(channelId: string, listItemId: string): Promise { - const data = await this.client.rest.router.listItems.listItemRead({ - channelId, - listItemId, - }); - return data.listItem; - } + /** + * Fetches a single list item. + * + * @param channelId The ID of the channel that the list item belongs to. + * @param listItemId The ID of the list item to fetch. + * @returns A Promise that resolves with the requested list item. + */ + async fetch(channelId: string, listItemId: string): Promise { + const data = await this.client.rest.router.listItems.listItemRead({ + channelId, + listItemId, + }); + return data.listItem; + } - /** - * Updates a list item. - * - * @param channelId The ID of the channel that the list item belongs to. - * @param listItemId The ID of the list item to update. - * @param options Additional options for the updated list item. - * @returns A Promise that resolves with the updated list item. - */ - async update(channelId: string, listItemId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.listItems.listItemUpdate({ - channelId, - listItemId, - requestBody: options, - }); - return data.listItem; - } + /** + * Updates a list item. + * + * @param channelId The ID of the channel that the list item belongs to. + * @param listItemId The ID of the list item to update. + * @param options Additional options for the updated list item. + * @returns A Promise that resolves with the updated list item. + */ + async update(channelId: string, listItemId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.listItems.listItemUpdate({ + channelId, + listItemId, + requestBody: options, + }); + return data.listItem; + } - /** - * Deletes a list item. - * - * @param channelId The ID of the channel that the list item belongs to. - * @param listItemId The ID of the list item to delete. - * @returns A Promise that resolves with no value upon successful deletion. - */ - async delete(channelId: string, listItemId: string): Promise { - await this.client.rest.router.listItems.listItemDelete({ - channelId, - listItemId, - }); - } + /** + * Deletes a list item. + * + * @param channelId The ID of the channel that the list item belongs to. + * @param listItemId The ID of the list item to delete. + * @returns A Promise that resolves with no value upon successful deletion. + */ + async delete(channelId: string, listItemId: string): Promise { + await this.client.rest.router.listItems.listItemDelete({ + channelId, + listItemId, + }); + } - /** - * Marks a list item as complete. - * - * @param channelId The ID of the channel that the list item belongs to. - * @param listItemId The ID of the list item to mark as complete. - * @returns A Promise that resolves with no value upon successful completion. - */ - async complete(channelId: string, listItemId: string): Promise { - await this.client.rest.router.listItems.listItemCompleteCreate({ - channelId, - listItemId, - }); - } + /** + * Marks a list item as complete. + * + * @param channelId The ID of the channel that the list item belongs to. + * @param listItemId The ID of the list item to mark as complete. + * @returns A Promise that resolves with no value upon successful completion. + */ + async complete(channelId: string, listItemId: string): Promise { + await this.client.rest.router.listItems.listItemCompleteCreate({ + channelId, + listItemId, + }); + } - /** - * Marks a completed list item as incomplete. - * - * @param channelId The ID of the channel that the list item belongs to. - * @param listItemId The ID of the completed list item to mark as incomplete. - * @returns A Promise that resolves with no value upon successful uncompletion. - */ - async uncomplete(channelId: string, listItemId: string): Promise { - await this.client.rest.router.listItems.listItemCompleteDelete({ - channelId, - listItemId, - }); - } + /** + * Marks a completed list item as incomplete. + * + * @param channelId The ID of the channel that the list item belongs to. + * @param listItemId The ID of the completed list item to mark as incomplete. + * @returns A Promise that resolves with no value upon successful uncompletion. + */ + async uncomplete(channelId: string, listItemId: string): Promise { + await this.client.rest.router.listItems.listItemCompleteDelete({ + channelId, + listItemId, + }); + } } diff --git a/packages/guilded.js/lib/managers/global/MemberManager.ts b/packages/guilded.js/lib/managers/global/MemberManager.ts index 98b33cbd..b2b76c9e 100644 --- a/packages/guilded.js/lib/managers/global/MemberManager.ts +++ b/packages/guilded.js/lib/managers/global/MemberManager.ts @@ -11,180 +11,188 @@ import { CacheableStructManager } from "./CacheableStructManager"; * */ export class GlobalMemberManager extends CacheableStructManager { - /** - * Whether or not social links should be cached. - */ - get shouldCacheSocialLinks(): boolean { - return this.client.options.cache?.cacheSocialLinks !== false; - } + /** + * Whether or not social links should be cached. + */ + get shouldCacheSocialLinks(): boolean { + return this.client.options.cache?.cacheSocialLinks !== false; + } - /** - * Fetches a member from a server. - * - * @param serverId The ID of the server to fetch the member from. - * @param userId The ID of the member to fetch. - * @param force Whether to force a fetch from the API. - * @returns A Promise that resolves with the fetched member. - */ - async fetch(serverId: string, userId: string, force?: boolean): Promise { - if (userId === "Ann6LewA") throw new Error("You cannot fetch a webhook as a member. The provided ID (Ann6LewA) is only given to webhooks."); + /** + * Fetches a member from a server. + * + * @param serverId The ID of the server to fetch the member from. + * @param userId The ID of the member to fetch. + * @param force Whether to force a fetch from the API. + * @returns A Promise that resolves with the fetched member. + */ + async fetch(serverId: string, userId: string, force?: boolean): Promise { + if (userId === "Ann6LewA") throw new Error("You cannot fetch a webhook as a member. The provided ID (Ann6LewA) is only given to webhooks."); - const memberKey = buildMemberKey(serverId, userId); - if (!force) { - const existingMember = this.client.members.cache.get(memberKey); - if (existingMember) return existingMember; - } + const memberKey = buildMemberKey(serverId, userId); + if (!force) { + const existingMember = this.client.members.cache.get(memberKey); + if (existingMember) return existingMember; + } - const data = await this.client.rest.router.members.serverMemberRead({ - serverId, - userId, - }); - const newMember = new Member(this.client, { - ...data.member, - serverId, - id: data.member.user.id, - }); - this.client.users.cache.set(data.member.user.id, new User(this.client, data.member.user)); - this.client.members.cache.set(memberKey, newMember); - return newMember; - } + const data = await this.client.rest.router.members.serverMemberRead({ + serverId, + userId, + }); + const newMember = new Member(this.client, { + ...data.member, + serverId, + id: data.member.user.id, + }); + this.client.users.cache.set(data.member.user.id, new User(this.client, data.member.user)); + this.client.members.cache.set(memberKey, newMember); + return newMember; + } - /** - * Fetches all members from a server. Returned objects are partial members. - * - * @param serverId The ID of the server to fetch members from. - * @returns A Promise that resolves with a collection of partial members. - */ - async fetchMany(serverId: string): Promise> { - const data = await this.client.rest.router.members.serverMemberReadMany({ - serverId, - }); - const members = new Collection(); - for (const member of data.members) { - const newMember = new PartialMember(this.client, { - serverId, - id: member.user.id, - ...member, - }); - members.set(newMember.id, newMember); - } + /** + * Fetches all members from a server. Returned objects are partial members. + * + * @param serverId The ID of the server to fetch members from. + * @returns A Promise that resolves with a collection of partial members. + */ + async fetchMany(serverId: string): Promise> { + const data = await this.client.rest.router.members.serverMemberReadMany({ + serverId, + }); + const members = new Collection(); + for (const member of data.members) { + const newMember = new PartialMember(this.client, { + serverId, + id: member.user.id, + ...member, + }); + members.set(newMember.id, newMember); + } - return members; - } + return members; + } - /** - * Kicks a member from a server. - * - * @param serverId The ID of the server to kick the member from. - * @param userId The ID of the member to kick. - * @returns A Promise that resolves with the kicked member, or null if the member was not cached. - */ - async kick(serverId: string, userId: string): Promise { - await this.client.rest.router.members.serverMemberDelete({ - serverId, - userId, - }); - return this.client.members.cache.get(buildMemberKey(serverId, userId)) ?? null; - } + /** + * Kicks a member from a server. + * + * @param serverId The ID of the server to kick the member from. + * @param userId The ID of the member to kick. + * @returns A Promise that resolves with the kicked member, or null if the member was not cached. + */ + async kick(serverId: string, userId: string): Promise { + await this.client.rest.router.members.serverMemberDelete({ + serverId, + userId, + }); + return this.client.members.cache.get(buildMemberKey(serverId, userId)) ?? null; + } - /** - * Bans a member from a server. - * - * @param serverId The ID of the server to ban the member from. - * @param userId The ID of the user to ban. - * @returns A Promise that resolves with the banned member, or null if the member was not cached. - */ - async ban(serverId: string, userId: string): Promise { - return this.client.bans.ban(serverId, userId); - } + /** + * Bans a member from a server. + * + * @param serverId The ID of the server to ban the member from. + * @param userId The ID of the user to ban. + * @returns A Promise that resolves with the banned member, or null if the member was not cached. + */ + async ban(serverId: string, userId: string): Promise { + return this.client.bans.ban(serverId, userId); + } - /** - * Unbans a user from a server. - * - * @param serverId The ID of the server. - * @param userId The ID of the user. - * @param removeBanIfCached Whether to remove the ban from the cache if it exists. - * @returns A Promise that resolves with the unbanned member ban or `null` if it isn't cached. - */ - async unban(serverId: string, userId: string, removeBanIfCached = false): Promise { - return this.client.bans.unban(serverId, userId, removeBanIfCached); - } + /** + * Unbans a user from a server. + * + * @param serverId The ID of the server. + * @param userId The ID of the user. + * @param removeBanIfCached Whether to remove the ban from the cache if it exists. + * @returns A Promise that resolves with the unbanned member ban or `null` if it isn't cached. + */ + async unban(serverId: string, userId: string, removeBanIfCached = false): Promise { + return this.client.bans.unban(serverId, userId, removeBanIfCached); + } - /** - * Gets a list of the roles assigned to a member using the ID of the member. - * - * @param serverId The ID of the server to get the member roles from. - * @param userId The ID of the member to get the roles for. - * @returns A Promise that resolves with an array of role IDs. - */ - async getRoles(serverId: string, userId: string): Promise { - const data = await this.client.rest.router.roleMembership.roleMembershipReadMany({ - serverId, - userId, - }); - return data.roleIds; - } + /** + * Gets a list of the roles assigned to a member using the ID of the member. + * + * @param serverId The ID of the server to get the member roles from. + * @param userId The ID of the member to get the roles for. + * @returns A Promise that resolves with an array of role IDs. + */ + async getRoles(serverId: string, userId: string): Promise { + const data = await this.client.rest.router.roleMembership.roleMembershipReadMany({ + serverId, + userId, + }); + return data.roleIds; + } - /** - * Updates a member's nickname. Returns the new name. - * - * @param serverId The ID of the server to update the member nickname for. - * @param userId The ID of the member to update the nickname for. - * @param newNickname The new nickname for the member. - * @returns A Promise that resolves with the updated nickname. - */ - async updateNickname(serverId: string, userId: string, newNickname: string): Promise { - const data = await this.client.rest.router.members.memberNicknameUpdate({ - serverId, - userId, - requestBody: { nickname: newNickname }, - }); - return data.nickname; - } + /** + * Updates a member's nickname. Returns the new name. + * + * @param serverId The ID of the server to update the member nickname for. + * @param userId The ID of the member to update the nickname for. + * @param newNickname The new nickname for the member. + * @returns A Promise that resolves with the updated nickname. + */ + async updateNickname(serverId: string, userId: string, newNickname: string): Promise { + const data = await this.client.rest.router.members.memberNicknameUpdate({ + serverId, + userId, + requestBody: { + nickname: newNickname, + }, + }); + return data.nickname; + } - /** - * Deletes a member's nickname. - * - * @param serverId The ID of the server to delete the member nickname from. - * @param userId The ID of the member to delete the nickname for. - * @returns A Promise that resolves with no value upon completion. - */ - async resetNickname(serverId: string, userId: string): Promise { - await this.client.rest.router.members.memberNicknameDelete({ - serverId, - userId, - }); - } + /** + * Deletes a member's nickname. + * + * @param serverId The ID of the server to delete the member nickname from. + * @param userId The ID of the member to delete the nickname for. + * @returns A Promise that resolves with no value upon completion. + */ + async resetNickname(serverId: string, userId: string): Promise { + await this.client.rest.router.members.memberNicknameDelete({ + serverId, + userId, + }); + } - /** - * Awards XP to a member. - * - * @param serverId The ID of the server to award XP on. - * @param userId The ID of the member to award XP to. - * @param amount The amount of XP to award. - * @returns A Promise that resolves with the member's new total XP. - */ - async giveXP(serverId: string, userId: string, amount: number): Promise { - const data = await this.client.rest.router.serverXp.serverXpForUserCreate({ - serverId, - userId, - requestBody: { amount }, - }); - return data.total; - } + /** + * Awards XP to a member. + * + * @param serverId The ID of the server to award XP on. + * @param userId The ID of the member to award XP to. + * @param amount The amount of XP to award. + * @returns A Promise that resolves with the member's new total XP. + */ + async giveXP(serverId: string, userId: string, amount: number): Promise { + const data = await this.client.rest.router.serverXp.serverXpForUserCreate({ + serverId, + userId, + requestBody: { + amount, + }, + }); + return data.total; + } - /** - * Fetch a member's social links. - * - * @param serverId The ID of the server. - * @param userId The ID of the member. - * @param type The type of social link to fetch. - * @returns A Promise that resolves with the member's social link. - */ - async fetchSocialLinks(serverId: string, userId: string, type: SocialLinkPayload["type"]): Promise { - const data = await this.client.rest.router.socialLinks.memberSocialLinkRead({ serverId, userId, socialLinkType: type }); - const existingMember = this.cache.get(buildMemberKey(serverId, userId)); - if (this.shouldCacheSocialLinks) existingMember?.socialLinks.set(data.socialLink.type, data.socialLink); - return data.socialLink; - } + /** + * Fetch a member's social links. + * + * @param serverId The ID of the server. + * @param userId The ID of the member. + * @param type The type of social link to fetch. + * @returns A Promise that resolves with the member's social link. + */ + async fetchSocialLinks(serverId: string, userId: string, type: SocialLinkPayload["type"]): Promise { + const data = await this.client.rest.router.socialLinks.memberSocialLinkRead({ + serverId, + userId, + socialLinkType: type, + }); + const existingMember = this.cache.get(buildMemberKey(serverId, userId)); + if (this.shouldCacheSocialLinks) existingMember?.socialLinks.set(data.socialLink.type, data.socialLink); + return data.socialLink; + } } diff --git a/packages/guilded.js/lib/managers/global/MessageManager.ts b/packages/guilded.js/lib/managers/global/MessageManager.ts index d74086f1..fc2ffd85 100644 --- a/packages/guilded.js/lib/managers/global/MessageManager.ts +++ b/packages/guilded.js/lib/managers/global/MessageManager.ts @@ -11,150 +11,150 @@ import { CacheableStructManager } from "./CacheableStructManager"; * Manager for handling caching and interactions for Messages */ export class GlobalMessageManager extends CacheableStructManager { - /** - * Whether or not messages should be cached. - */ - get shouldCacheMessage(): boolean { - return this.client.options.cache?.cacheMessages !== false; - } - - /** - * Fetches multiple messages from a channel. - * - * @param channelId The ID of the channel to fetch messages from. - * @param options Additional options for the fetch. - * @returns A promise that resolves with a collection of messages. - */ - async fetchMany(channelId: string, options: Omit, "channelId">): Promise> { - const data = await this.client.rest.router.chat.channelMessageReadMany({ - channelId, - ...options, - }); - const messages = new Collection(); - - for (const message of data.messages) { - const newMessage = new Message(this.client, message); - messages.set(newMessage.id, newMessage); - } - - return messages; - } - - /** - * Fetches a message from a channel. - * - * @param channelId The ID of the channel to fetch the message from. - * @param messageId The ID of the message to fetch. - * @param force Whether or not to force the fetch. - * @returns A promise that resolves with the requested message. - */ - async fetch(channelId: string, messageId: string, force?: boolean): Promise { - if (!force) { - const existingMessage = this.client.messages.cache.get(messageId); - if (existingMessage) return existingMessage; - } - - const data = await this.client.rest.router.chat.channelMessageRead({ - channelId, - messageId, - }); - const newMessage = new Message(this.client, data.message); - this.client.messages.cache.set(newMessage.id, newMessage); - return newMessage; - } - - /** - * Sends a message to a channel. - * - * @param channelId The ID of the channel to send the message to. - * @param content The content of the message. - * @returns A promise that resolves with the created message. - * @example - * let replyObj = { - * content: 'This is text, supports **markdown**.', - * embeds: [{ - * title: 'This is an embed title!', - * description: 'A description may go here' - * }] - * }; - * await message.client.messages.send(message.channelId, replyObj) - */ - async send(channelId: string, content: MessageContent): Promise { - const data = await this.client.rest.router.chat.channelMessageCreate({ - channelId, - requestBody: resolveContentToData(content), - }); - - const existingMessage = this.client.messages.cache.get(data.message.id); - if (existingMessage) return existingMessage; - - const newMessage = new Message(this.client, data.message); - this.client.messages.cache.set(newMessage.id, newMessage); - return newMessage; - } - - /** - * Adds a reaction to a message. - * - * @param channelId The ID of the channel containing the message. - * @param contentId The ID of the message to add a reaction to. - * @param emoteId The ID of the emote to add as a reaction. - * @returns A promise that resolves to nothing when the reaction is added. - */ - async addReaction(channelId: string, contentId: string, emoteId: number): Promise { - await this.client.reactions.create(channelId, contentId, emoteId); - } - - /** - * Deletes either a whole reaction emote from a message or a specific user's if a userId is provided. - * - * @param channelId The ID of the channel containing the message. - * @param contentId The ID of the message to delete the reaction from. - * @param emoteId The ID of the emote to delete as a reaction. - * @returns A promise that resolves to nothing when the reaction is deleted. - */ - async deleteReaction(channelId: string, contentId: string, emoteId: number, userId?: string): Promise { - await this.client.reactions.delete(channelId, contentId, emoteId, userId); - } - - /** - * Updates a message in a channel. - * - * @param channelId The ID of the channel containing the message. - * @param messageId The ID of the message to update. - * @param content The new content of the message. - * @returns A promise that resolves with the updated message. - */ - async update(channelId: string, messageId: string, content: MessageContent): Promise { - const data = await this.client.rest.router.chat.channelMessageUpdate({ - channelId, - messageId, - requestBody: resolveContentToData(content), - }); - - const existingMessage = this.client.messages.cache.get(data.message.id); - if (existingMessage) return existingMessage._update(data.message); - - const newMessage = new Message(this.client, data.message); - this.client.messages.cache.set(newMessage.id, newMessage); - return newMessage; - } - - /** Delete a channel message. */ - async delete(channelId: string, messageId: string): Promise { - await this.client.rest.router.chat.channelMessageDelete({ - channelId, - messageId, - }); - } - - async awaitMessages(channelId: string, options: CollectorOptions): Promise> { - return new MessageCollector(this.client, { - ...options, - filter: (item): MaybePromise => { - if (item.channelId !== channelId) return false; - return options.filter?.(item) ?? true; - }, - }).start(); - } + /** + * Whether or not messages should be cached. + */ + get shouldCacheMessage(): boolean { + return this.client.options.cache?.cacheMessages !== false; + } + + /** + * Fetches multiple messages from a channel. + * + * @param channelId The ID of the channel to fetch messages from. + * @param options Additional options for the fetch. + * @returns A promise that resolves with a collection of messages. + */ + async fetchMany(channelId: string, options: Omit, "channelId">): Promise> { + const data = await this.client.rest.router.chat.channelMessageReadMany({ + channelId, + ...options, + }); + const messages = new Collection(); + + for (const message of data.messages) { + const newMessage = new Message(this.client, message); + messages.set(newMessage.id, newMessage); + } + + return messages; + } + + /** + * Fetches a message from a channel. + * + * @param channelId The ID of the channel to fetch the message from. + * @param messageId The ID of the message to fetch. + * @param force Whether or not to force the fetch. + * @returns A promise that resolves with the requested message. + */ + async fetch(channelId: string, messageId: string, force?: boolean): Promise { + if (!force) { + const existingMessage = this.client.messages.cache.get(messageId); + if (existingMessage) return existingMessage; + } + + const data = await this.client.rest.router.chat.channelMessageRead({ + channelId, + messageId, + }); + const newMessage = new Message(this.client, data.message); + this.client.messages.cache.set(newMessage.id, newMessage); + return newMessage; + } + + /** + * Sends a message to a channel. + * + * @param channelId The ID of the channel to send the message to. + * @param content The content of the message. + * @returns A promise that resolves with the created message. + * @example + * let replyObj = { + * content: 'This is text, supports **markdown**.', + * embeds: [{ + * title: 'This is an embed title!', + * description: 'A description may go here' + * }] + * }; + * await message.client.messages.send(message.channelId, replyObj) + */ + async send(channelId: string, content: MessageContent): Promise { + const data = await this.client.rest.router.chat.channelMessageCreate({ + channelId, + requestBody: resolveContentToData(content), + }); + + const existingMessage = this.client.messages.cache.get(data.message.id); + if (existingMessage) return existingMessage; + + const newMessage = new Message(this.client, data.message); + this.client.messages.cache.set(newMessage.id, newMessage); + return newMessage; + } + + /** + * Adds a reaction to a message. + * + * @param channelId The ID of the channel containing the message. + * @param contentId The ID of the message to add a reaction to. + * @param emoteId The ID of the emote to add as a reaction. + * @returns A promise that resolves to nothing when the reaction is added. + */ + async addReaction(channelId: string, contentId: string, emoteId: number): Promise { + await this.client.reactions.create(channelId, contentId, emoteId); + } + + /** + * Deletes either a whole reaction emote from a message or a specific user's if a userId is provided. + * + * @param channelId The ID of the channel containing the message. + * @param contentId The ID of the message to delete the reaction from. + * @param emoteId The ID of the emote to delete as a reaction. + * @returns A promise that resolves to nothing when the reaction is deleted. + */ + async deleteReaction(channelId: string, contentId: string, emoteId: number, userId?: string): Promise { + await this.client.reactions.delete(channelId, contentId, emoteId, userId); + } + + /** + * Updates a message in a channel. + * + * @param channelId The ID of the channel containing the message. + * @param messageId The ID of the message to update. + * @param content The new content of the message. + * @returns A promise that resolves with the updated message. + */ + async update(channelId: string, messageId: string, content: MessageContent): Promise { + const data = await this.client.rest.router.chat.channelMessageUpdate({ + channelId, + messageId, + requestBody: resolveContentToData(content), + }); + + const existingMessage = this.client.messages.cache.get(data.message.id); + if (existingMessage) return existingMessage._update(data.message); + + const newMessage = new Message(this.client, data.message); + this.client.messages.cache.set(newMessage.id, newMessage); + return newMessage; + } + + /** Delete a channel message. */ + async delete(channelId: string, messageId: string): Promise { + await this.client.rest.router.chat.channelMessageDelete({ + channelId, + messageId, + }); + } + + async awaitMessages(channelId: string, options: CollectorOptions): Promise> { + return new MessageCollector(this.client, { + ...options, + filter: (item): MaybePromise => { + if (item.channelId !== channelId) return false; + return options.filter?.(item) ?? true; + }, + }).start(); + } } diff --git a/packages/guilded.js/lib/managers/global/ReactionManager.ts b/packages/guilded.js/lib/managers/global/ReactionManager.ts index 8e2ed5f1..b4c1a1d9 100644 --- a/packages/guilded.js/lib/managers/global/ReactionManager.ts +++ b/packages/guilded.js/lib/managers/global/ReactionManager.ts @@ -7,59 +7,59 @@ import { CacheableStructManager } from "./CacheableStructManager"; * A class representing a global reaction manager that extends the CacheableStructManager class. */ export class GlobalReactionManager extends CacheableStructManager { - get shouldCacheReaction(): boolean { - return this.client.options.cache?.cacheMessageReactions !== false; - } + get shouldCacheReaction(): boolean { + return this.client.options.cache?.cacheMessageReactions !== false; + } - /** - * Adds a reaction emote to a message. - * - * @param channelId The ID of the channel where the message was sent. - * @param messageId The ID of the message. - * @param emoteId The ID of the emote to add. - * @returns A Promise that resolves with no value upon successful completion. - */ - async create(channelId: string, messageId: string, emoteId: number): Promise { - await this.client.rest.router.reactions.channelMessageReactionCreate({ - channelId, - messageId, - emoteId, - }); - } + /** + * Adds a reaction emote to a message. + * + * @param channelId The ID of the channel where the message was sent. + * @param messageId The ID of the message. + * @param emoteId The ID of the emote to add. + * @returns A Promise that resolves with no value upon successful completion. + */ + async create(channelId: string, messageId: string, emoteId: number): Promise { + await this.client.rest.router.reactions.channelMessageReactionCreate({ + channelId, + messageId, + emoteId, + }); + } - /** - * Deletes either a whole reaction emote from a message or a specific user's if a userId is provided. - * - * @param channelId The ID of the channel where the message was sent. - * @param messageId The ID of the message. - * @param emoteId The ID of the emote to delete. - * @returns A Promise that resolves with no value upon successful completion. - */ - async delete(channelId: string, messageId: string, emoteId: number, userId?: string): Promise { - await this.client.rest.router.reactions.channelMessageReactionDelete({ - channelId, - messageId, - emoteId, - userId, - }); - } + /** + * Deletes either a whole reaction emote from a message or a specific user's if a userId is provided. + * + * @param channelId The ID of the channel where the message was sent. + * @param messageId The ID of the message. + * @param emoteId The ID of the emote to delete. + * @returns A Promise that resolves with no value upon successful completion. + */ + async delete(channelId: string, messageId: string, emoteId: number, userId?: string): Promise { + await this.client.rest.router.reactions.channelMessageReactionDelete({ + channelId, + messageId, + emoteId, + userId, + }); + } - /** - * Wait & collect reactions on a message. - * - * @param messageId ID of the message to listen for reactions on - * @param options Configuration for the collector - * @returns A Promise that resolves with a collection of reactions collected, with the ID as the key and the reaction as the value - * @example - * const reactions = await client.reactions.awaitReactions('message-id-here', { max: 4, time: 60_000 }); - */ - awaitReactions(messageId: string, options: CollectorOptions): Promise> { - return new ReactionCollector(this.client, { - ...options, - filter: (item): MaybePromise => { - if (item.messageId !== messageId) return false; - return options.filter?.(item) ?? true; - }, - }).start(); - } + /** + * Wait & collect reactions on a message. + * + * @param messageId ID of the message to listen for reactions on + * @param options Configuration for the collector + * @returns A Promise that resolves with a collection of reactions collected, with the ID as the key and the reaction as the value + * @example + * const reactions = await client.reactions.awaitReactions('message-id-here', { max: 4, time: 60_000 }); + */ + awaitReactions(messageId: string, options: CollectorOptions): Promise> { + return new ReactionCollector(this.client, { + ...options, + filter: (item): MaybePromise => { + if (item.messageId !== messageId) return false; + return options.filter?.(item) ?? true; + }, + }).start(); + } } diff --git a/packages/guilded.js/lib/managers/global/RoleManager.ts b/packages/guilded.js/lib/managers/global/RoleManager.ts index e0fb63a1..095d8487 100644 --- a/packages/guilded.js/lib/managers/global/RoleManager.ts +++ b/packages/guilded.js/lib/managers/global/RoleManager.ts @@ -9,162 +9,169 @@ import { CacheableStructManager } from "./CacheableStructManager"; * A class representing a global role manager. At the moment, we don't cache roles in this structure. */ export class GlobalRoleManager extends CacheableStructManager { - /** - * Create a new role. - * - * @param serverId The ID of the server. - * @param options Role creation options. - * @returns Promise that resolves with the newly created role. - */ - async create(serverId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.roles.roleCreate({ - serverId, - requestBody: options, - }); - const newRole = new Role(this.client, data.role); - this.cache.set(newRole.id, newRole); - return newRole; - } + /** + * Create a new role. + * + * @param serverId The ID of the server. + * @param options Role creation options. + * @returns Promise that resolves with the newly created role. + */ + async create(serverId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.roles.roleCreate({ + serverId, + requestBody: options, + }); + const newRole = new Role(this.client, data.role); + this.cache.set(newRole.id, newRole); + return newRole; + } - /** - * Fetch a role by its ID - * - * @param serverId The ID of the server. - * @param roleId ID of the role to fetch. - * @param force Whether or not to force a fetch from the API. - * @returns Promise that resolves with the fetched role. - */ - async fetch(serverId: string, roleId: number, force?: boolean): Promise { - if (!force) { - const existingRole = this.client.roles.cache.get(roleId); - if (existingRole) return existingRole; - } + /** + * Fetch a role by its ID + * + * @param serverId The ID of the server. + * @param roleId ID of the role to fetch. + * @param force Whether or not to force a fetch from the API. + * @returns Promise that resolves with the fetched role. + */ + async fetch(serverId: string, roleId: number, force?: boolean): Promise { + if (!force) { + const existingRole = this.client.roles.cache.get(roleId); + if (existingRole) return existingRole; + } - const data = await this.client.rest.router.roles.roleRead({ - serverId, - roleId, - }); - const fetchedRole = new Role(this.client, data.role); - this.cache.set(fetchedRole.id, fetchedRole); - return fetchedRole; - } + const data = await this.client.rest.router.roles.roleRead({ + serverId, + roleId, + }); + const fetchedRole = new Role(this.client, data.role); + this.cache.set(fetchedRole.id, fetchedRole); + return fetchedRole; + } - /** - * Fetch all roles in a given server. - * - * @param serverId The ID of the server. - * @returns Promise that resolves with a Collection of fetched roles. - */ - async fetchMany(serverId: string): Promise> { - const data = await this.client.rest.router.roles.roleReadMany({ serverId }); - const roles = new Collection(); + /** + * Fetch all roles in a given server. + * + * @param serverId The ID of the server. + * @returns Promise that resolves with a Collection of fetched roles. + */ + async fetchMany(serverId: string): Promise> { + const data = await this.client.rest.router.roles.roleReadMany({ + serverId, + }); + const roles = new Collection(); - // Insert all fetched roles into cache - for (const role of data.roles) { - const fetchedRole = new Role(this.client, role); - this.cache.set(fetchedRole.id, fetchedRole); - roles.set(fetchedRole.id, fetchedRole); - } + // Insert all fetched roles into cache + for (const role of data.roles) { + const fetchedRole = new Role(this.client, role); + this.cache.set(fetchedRole.id, fetchedRole); + roles.set(fetchedRole.id, fetchedRole); + } - return roles; - } + return roles; + } - /** - * Update a role by ID. - * - * @param serverId The ID of the server. - * @param roleId ID of the role to update. - * @param options Role update options. - * @returns Promise that resolves with the updated role. - */ - async update(serverId: string, roleId: number, options: OptionBody): Promise { - const data = await this.client.rest.router.roles.roleUpdate({ - serverId, - roleId, - requestBody: options, - }); - const existingRole = this.cache.get(roleId); - if (existingRole) return existingRole._update(data.role); + /** + * Update a role by ID. + * + * @param serverId The ID of the server. + * @param roleId ID of the role to update. + * @param options Role update options. + * @returns Promise that resolves with the updated role. + */ + async update(serverId: string, roleId: number, options: OptionBody): Promise { + const data = await this.client.rest.router.roles.roleUpdate({ + serverId, + roleId, + requestBody: options, + }); + const existingRole = this.cache.get(roleId); + if (existingRole) return existingRole._update(data.role); - const newRole = new Role(this.client, data.role); - this.cache.set(newRole.id, newRole); - return newRole; - } + const newRole = new Role(this.client, data.role); + this.cache.set(newRole.id, newRole); + return newRole; + } - /** - * Delete a role by ID. - * - * @param serverId ID of the server to delete the role. - * @param roleId ID of the role to delete. - * @returns Promise that resolves with the cached deleted role, or null if the role isn't present in the cache. - */ - async delete(serverId: string, roleId: number): Promise { - await this.client.rest.router.roles.roleDelete({ serverId, roleId }); - const cachedRole = this.cache.get(roleId); - return cachedRole ?? null; - } + /** + * Delete a role by ID. + * + * @param serverId ID of the server to delete the role. + * @param roleId ID of the role to delete. + * @returns Promise that resolves with the cached deleted role, or null if the role isn't present in the cache. + */ + async delete(serverId: string, roleId: number): Promise { + await this.client.rest.router.roles.roleDelete({ + serverId, + roleId, + }); + const cachedRole = this.cache.get(roleId); + return cachedRole ?? null; + } - /** - * Updates the permissions of a role. - * - * @param serverId The ID of the server. - * @param roleId The ID of the role. - * @param options Role permission update options. - * @returns A Promise that resolves with no value upon successful completion. - */ - async updatePermissions(serverId: string, roleId: number, options: OptionBody): Promise { - await this.client.rest.router.roles.rolePermissionUpdate({ - serverId, - roleId, - requestBody: options, - }); - } + /** + * Updates the permissions of a role. + * + * @param serverId The ID of the server. + * @param roleId The ID of the role. + * @param options Role permission update options. + * @returns A Promise that resolves with no value upon successful completion. + */ + async updatePermissions(serverId: string, roleId: number, options: OptionBody): Promise { + await this.client.rest.router.roles.rolePermissionUpdate({ + serverId, + roleId, + requestBody: options, + }); + } - /** - * Awards XP to a role. - * - * @param serverId The ID of the server. - * @param roleId The ID of the role. - * @param amount The amount of XP to award. - * @returns A Promise that resolves with the total XP awarded to the role. - */ - async giveXP(serverId: string, roleId: number, amount: number): Promise { - await this.client.rest.router.serverXp.serverXpForRoleCreate({ - serverId, - roleId, - requestBody: { amount }, - }); - } + /** + * Awards XP to a role. + * + * @param serverId The ID of the server. + * @param roleId The ID of the role. + * @param amount The amount of XP to award. + * @returns A Promise that resolves with the total XP awarded to the role. + */ + async giveXP(serverId: string, roleId: number, amount: number): Promise { + await this.client.rest.router.serverXp.serverXpForRoleCreate({ + serverId, + roleId, + requestBody: { + amount, + }, + }); + } - /** - * Assigns a role to a member. - * - * @param serverId The ID of the server. - * @param userId The ID of the member. - * @param roleId The ID of the role. - * @returns A Promise that resolves with no value upon successful completion. - */ - async addRoleToMember(serverId: string, userId: string, roleId: number): Promise { - await this.client.rest.router.roleMembership.roleMembershipCreate({ - serverId, - userId, - roleId, - }); - } + /** + * Assigns a role to a member. + * + * @param serverId The ID of the server. + * @param userId The ID of the member. + * @param roleId The ID of the role. + * @returns A Promise that resolves with no value upon successful completion. + */ + async addRoleToMember(serverId: string, userId: string, roleId: number): Promise { + await this.client.rest.router.roleMembership.roleMembershipCreate({ + serverId, + userId, + roleId, + }); + } - /** - * Removes a role from a member. - * - * @param serverId The ID of the server. - * @param userId The ID of the member. - * @param roleId The ID of the role. - * @returns A Promise that resolves with no value upon successful completion. - */ - async removeRoleFromMember(serverId: string, userId: string, roleId: number): Promise { - await this.client.rest.router.roleMembership.roleMembershipDelete({ - serverId, - userId, - roleId, - }); - } + /** + * Removes a role from a member. + * + * @param serverId The ID of the server. + * @param userId The ID of the member. + * @param roleId The ID of the role. + * @returns A Promise that resolves with no value upon successful completion. + */ + async removeRoleFromMember(serverId: string, userId: string, roleId: number): Promise { + await this.client.rest.router.roleMembership.roleMembershipDelete({ + serverId, + userId, + roleId, + }); + } } diff --git a/packages/guilded.js/lib/managers/global/ServerManager.ts b/packages/guilded.js/lib/managers/global/ServerManager.ts index f0608eec..d66b32ae 100644 --- a/packages/guilded.js/lib/managers/global/ServerManager.ts +++ b/packages/guilded.js/lib/managers/global/ServerManager.ts @@ -7,30 +7,32 @@ import { CacheableStructManager } from "./CacheableStructManager"; * @extends CacheableStructManager */ export class GlobalServerManager extends CacheableStructManager { - /** - * Determines whether or not servers should be cached. - */ - get shouldCacheServer(): boolean { - return this.client.options?.cache?.cacheServers !== false; - } + /** + * Determines whether or not servers should be cached. + */ + get shouldCacheServer(): boolean { + return this.client.options?.cache?.cacheServers !== false; + } - /** - * Fetches a server. - * - * @param serverId The ID of the server to fetch. - * @param force Whether or not to force a fetch instead of using the cache. - * @returns A Promise that resolves with the fetched server. - * @example client.servers.fetch(message.serverId) - */ - async fetch(serverId: string, force?: boolean): Promise { - if (!force) { - const existingServer = this.client.servers.cache.get(serverId); - if (existingServer) return existingServer; - } + /** + * Fetches a server. + * + * @param serverId The ID of the server to fetch. + * @param force Whether or not to force a fetch instead of using the cache. + * @returns A Promise that resolves with the fetched server. + * @example client.servers.fetch(message.serverId) + */ + async fetch(serverId: string, force?: boolean): Promise { + if (!force) { + const existingServer = this.client.servers.cache.get(serverId); + if (existingServer) return existingServer; + } - const data = await this.client.rest.router.servers.serverRead({ serverId }); - const newServer = new Server(this.client, data.server); - if (this.shouldCacheServer) this.cache.set(newServer.id, newServer); - return newServer; - } + const data = await this.client.rest.router.servers.serverRead({ + serverId, + }); + const newServer = new Server(this.client, data.server); + if (this.shouldCacheServer) this.cache.set(newServer.id, newServer); + return newServer; + } } diff --git a/packages/guilded.js/lib/managers/global/SubscriptionManager.ts b/packages/guilded.js/lib/managers/global/SubscriptionManager.ts index 08acdb66..d4797539 100644 --- a/packages/guilded.js/lib/managers/global/SubscriptionManager.ts +++ b/packages/guilded.js/lib/managers/global/SubscriptionManager.ts @@ -6,33 +6,36 @@ import { GlobalManager } from "./GlobalManager"; * A class representing a global subscription tier manager. */ export class GlobalSubscriptionManager extends GlobalManager { - /** - * Fetches a subscription tier from a server. - * - * @param serverId The ID of the server to fetch the subscription tier from. - * @param tier The type of subscription tier to fetch. - * @returns A Promise that resolves with the fetched subscription tier. - */ - async fetch(serverId: string, tier: ServerSubscriptionTierType): Promise { - const data = await this.client.rest.router.serverSubscriptions.serverSubscriptionTierRead({ serverId, serverSubscriptionTierType: tier }); - return new ServerSubscriptionTier(this.client, data.serverSubscriptionTier); - } + /** + * Fetches a subscription tier from a server. + * + * @param serverId The ID of the server to fetch the subscription tier from. + * @param tier The type of subscription tier to fetch. + * @returns A Promise that resolves with the fetched subscription tier. + */ + async fetch(serverId: string, tier: ServerSubscriptionTierType): Promise { + const data = await this.client.rest.router.serverSubscriptions.serverSubscriptionTierRead({ + serverId, + serverSubscriptionTierType: tier, + }); + return new ServerSubscriptionTier(this.client, data.serverSubscriptionTier); + } - /** - * Fetches all the subscription tiers from a server. - * - * @param serverId The ID of the server to fetch subscription tiers from. - * @returns A Promise that resolves with an array of subscription tiers. - */ - async fetchMany(serverId: string): Promise { - const data = await this.client.rest.router.serverSubscriptions.serverSubscriptionTierReadMany({ - serverId, - }); - const serverSubscriptionTiers: ServerSubscriptionTier[] = []; - for (const tier of data.serverSubscriptionTiers) { - serverSubscriptionTiers.push(new ServerSubscriptionTier(this.client, tier)); - } + /** + * Fetches all the subscription tiers from a server. + * + * @param serverId The ID of the server to fetch subscription tiers from. + * @returns A Promise that resolves with an array of subscription tiers. + */ + async fetchMany(serverId: string): Promise { + const data = await this.client.rest.router.serverSubscriptions.serverSubscriptionTierReadMany({ + serverId, + }); + const serverSubscriptionTiers: ServerSubscriptionTier[] = []; + for (const tier of data.serverSubscriptionTiers) { + serverSubscriptionTiers.push(new ServerSubscriptionTier(this.client, tier)); + } - return serverSubscriptionTiers; - } + return serverSubscriptionTiers; + } } diff --git a/packages/guilded.js/lib/managers/global/UserManager.ts b/packages/guilded.js/lib/managers/global/UserManager.ts index 96fe6c90..a6b5fc9f 100644 --- a/packages/guilded.js/lib/managers/global/UserManager.ts +++ b/packages/guilded.js/lib/managers/global/UserManager.ts @@ -10,44 +10,44 @@ import { CacheableStructManager } from "./CacheableStructManager"; * @extends CacheableStructManager */ export class GlobalUserManager extends CacheableStructManager { - /** - * Fetches client user. - * - * @param force Whether to force a fetch from the API. - * @returns A Promise that resolves with the fetched user. - */ - async fetchClient(force?: boolean): Promise { - if (!force) { - const existingUser = this.client.users.cache.get(this.client.user!.id); - if (existingUser) return existingUser; - } + /** + * Fetches client user. + * + * @param force Whether to force a fetch from the API. + * @returns A Promise that resolves with the fetched user. + */ + async fetchClient(force?: boolean): Promise { + if (!force) { + const existingUser = this.client.users.cache.get(this.client.user?.id!); + if (existingUser) return existingUser; + } - const data = await this.client.rest.router.users.userRead({ - userId: "@me", - }); - return new User(this.client, data.user); - } + const data = await this.client.rest.router.users.userRead({ + userId: "@me", + }); + return new User(this.client, data.user); + } - /** - * Fetches a user's servers (atm, only the logged in client is supported) - * - * @param userId The ID of the user to fetch servers for. - * @returns A promise that resolves to a Collection with the returned servers. - */ - async fetchServers(userId: string): Promise> { - if (userId !== this.client.user!.id) throw new Error("Only the logged in client is supported at this time."); + /** + * Fetches a user's servers (atm, only the logged in client is supported) + * + * @param userId The ID of the user to fetch servers for. + * @returns A promise that resolves to a Collection with the returned servers. + */ + async fetchServers(userId: string): Promise> { + if (userId !== this.client.user?.id) throw new Error("Only the logged in client is supported at this time."); - const data = await this.client.rest.router.users.userServerReadMany({ - userId, - }); - const servers = new Collection(); + const data = await this.client.rest.router.users.userServerReadMany({ + userId, + }); + const servers = new Collection(); - for (const server of data.servers) { - const createdServer = new Server(this.client, server); - servers.set(server.id, createdServer); - this.client.servers.cache.set(server.id, createdServer); - } + for (const server of data.servers) { + const createdServer = new Server(this.client, server); + servers.set(server.id, createdServer); + this.client.servers.cache.set(server.id, createdServer); + } - return servers; - } + return servers; + } } diff --git a/packages/guilded.js/lib/managers/global/WebhookManager.ts b/packages/guilded.js/lib/managers/global/WebhookManager.ts index f1d23e5e..bcae8cce 100644 --- a/packages/guilded.js/lib/managers/global/WebhookManager.ts +++ b/packages/guilded.js/lib/managers/global/WebhookManager.ts @@ -10,108 +10,108 @@ import { CacheableStructManager } from "./CacheableStructManager"; * @extends CacheableStructManager */ export class GlobalWebhookManager extends CacheableStructManager { - get shouldCacheWebhook(): boolean { - return this.client.options.cache?.cacheWebhooks !== false; - } + get shouldCacheWebhook(): boolean { + return this.client.options.cache?.cacheWebhooks !== false; + } - /** - * Create a webhook - * - * @param serverId The ID of the server to create the webhook for - * @param options The options for creating the webhook - * @returns A Promise that resolves to the created webhook - */ - async create(serverId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.webhook.webhookCreate({ - serverId, - requestBody: options, - }); - const existingWebhook = this.client.webhooks.cache.get(data.webhook.id); - if (existingWebhook) return existingWebhook; - const newWebhook = new Webhook(this.client, data.webhook); - if (this.shouldCacheWebhook) this.cache.set(newWebhook.id, newWebhook); - return newWebhook; - } + /** + * Create a webhook + * + * @param serverId The ID of the server to create the webhook for + * @param options The options for creating the webhook + * @returns A Promise that resolves to the created webhook + */ + async create(serverId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.webhook.webhookCreate({ + serverId, + requestBody: options, + }); + const existingWebhook = this.client.webhooks.cache.get(data.webhook.id); + if (existingWebhook) return existingWebhook; + const newWebhook = new Webhook(this.client, data.webhook); + if (this.shouldCacheWebhook) this.cache.set(newWebhook.id, newWebhook); + return newWebhook; + } - /** - * Get a server's webhooks - * - * @param serverId The ID of the server to get webhooks for - * @param channelId The ID of the channel to get webhooks for - * @returns A Promise that resolves to a Collection of Webhooks - */ - async fetchMany(serverId: string, channelId: string): Promise> { - const data = await this.client.rest.router.webhook.webhookReadMany({ - serverId, - channelId, - }); - const webhooks = new Collection(); - for (const webhook of data.webhooks) { - const newWebhook = new Webhook(this.client, webhook); - webhooks.set(newWebhook.id, newWebhook); - if (this.shouldCacheWebhook) this.cache.set(newWebhook.id, newWebhook); - } + /** + * Get a server's webhooks + * + * @param serverId The ID of the server to get webhooks for + * @param channelId The ID of the channel to get webhooks for + * @returns A Promise that resolves to a Collection of Webhooks + */ + async fetchMany(serverId: string, channelId: string): Promise> { + const data = await this.client.rest.router.webhook.webhookReadMany({ + serverId, + channelId, + }); + const webhooks = new Collection(); + for (const webhook of data.webhooks) { + const newWebhook = new Webhook(this.client, webhook); + webhooks.set(newWebhook.id, newWebhook); + if (this.shouldCacheWebhook) this.cache.set(newWebhook.id, newWebhook); + } - return webhooks; - } + return webhooks; + } - /** - * Get a webhook - * - * @param serverId The ID of the server the webhook is in - * @param webhookId The ID of the webhook - * @param force Whether to skip the cache check and request the API - * @returns A Promise that resolves to the fetched webhook - */ - async fetch(serverId: string, webhookId: string, force?: boolean): Promise { - if (!force) { - const existingWebhook = this.client.webhooks.cache.get(webhookId); - if (existingWebhook) return existingWebhook; - } + /** + * Get a webhook + * + * @param serverId The ID of the server the webhook is in + * @param webhookId The ID of the webhook + * @param force Whether to skip the cache check and request the API + * @returns A Promise that resolves to the fetched webhook + */ + async fetch(serverId: string, webhookId: string, force?: boolean): Promise { + if (!force) { + const existingWebhook = this.client.webhooks.cache.get(webhookId); + if (existingWebhook) return existingWebhook; + } - const data = await this.client.rest.router.webhook.webhookRead({ - serverId, - webhookId, - }); - const newWebhook = new Webhook(this.client, data.webhook); - if (this.shouldCacheWebhook) this.cache.set(newWebhook.id, newWebhook); - return newWebhook; - } + const data = await this.client.rest.router.webhook.webhookRead({ + serverId, + webhookId, + }); + const newWebhook = new Webhook(this.client, data.webhook); + if (this.shouldCacheWebhook) this.cache.set(newWebhook.id, newWebhook); + return newWebhook; + } - /** - * Update a webhook - * - * @param serverId The ID of the server the webhook is in - * @param webhookId The ID of the webhook to update - * @param options The options for updating the webhook - * @returns A Promise that resolves to the updated Webhook - */ - async update(serverId: string, webhookId: string, options: OptionBody): Promise { - const data = await this.client.rest.router.webhook.webhookUpdate({ - serverId, - webhookId, - requestBody: options, - }); - const existingWebhook = this.cache.get(data.webhook.id); - if (existingWebhook) { - existingWebhook._update(data.webhook); - return existingWebhook; - } + /** + * Update a webhook + * + * @param serverId The ID of the server the webhook is in + * @param webhookId The ID of the webhook to update + * @param options The options for updating the webhook + * @returns A Promise that resolves to the updated Webhook + */ + async update(serverId: string, webhookId: string, options: OptionBody): Promise { + const data = await this.client.rest.router.webhook.webhookUpdate({ + serverId, + webhookId, + requestBody: options, + }); + const existingWebhook = this.cache.get(data.webhook.id); + if (existingWebhook) { + existingWebhook._update(data.webhook); + return existingWebhook; + } - return new Webhook(this.client, data.webhook); - } + return new Webhook(this.client, data.webhook); + } - /** - * Delete a webhook - * - * @param serverId The ID of the server the webhook is in - * @param webhookId The ID of the webhook to delete - * @returns A Promise that resolves with no value upon successful deletion - */ - async delete(serverId: string, webhookId: string): Promise { - await this.client.rest.router.webhook.webhookDelete({ - serverId, - webhookId, - }); - } + /** + * Delete a webhook + * + * @param serverId The ID of the server the webhook is in + * @param webhookId The ID of the webhook to delete + * @returns A Promise that resolves with no value upon successful deletion + */ + async delete(serverId: string, webhookId: string): Promise { + await this.client.rest.router.webhook.webhookDelete({ + serverId, + webhookId, + }); + } } diff --git a/packages/guilded.js/lib/structures/Base.ts b/packages/guilded.js/lib/structures/Base.ts index 64e71b4c..47e663fc 100644 --- a/packages/guilded.js/lib/structures/Base.ts +++ b/packages/guilded.js/lib/structures/Base.ts @@ -5,22 +5,27 @@ import type { Client } from "./Client"; * All structures that have an ID will extend this class. */ export class Base { - /** Identifier of this structrure */ - public id: R; + /** Identifier of this structrure */ + public id: R; - /** Bare data of this structure */ - public raw: T; + /** Bare data of this structure */ + public raw: T; - constructor(public readonly client: Client, data: T & { id: R }) { - this.id = data.id; - this.raw = data; - } + constructor( + public readonly client: Client, + data: T & { + id: R; + }, + ) { + this.id = data.id; + this.raw = data; + } - /** - * Taken from https://github.com/discordjs/discord.js/blob/8e8d9b490a71de6cabe6f16375d7549a7c5c3737/src/structures/Base.js#L20 - * Licensed under the Apache License 2.0 - */ - public _clone(): this { - return Object.assign(Object.create(this), this); - } + /** + * Taken from https://github.com/discordjs/discord.js/blob/8e8d9b490a71de6cabe6f16375d7549a7c5c3737/src/structures/Base.js#L20 + * Licensed under the Apache License 2.0 + */ + public _clone(): this { + return Object.assign(Object.create(this), this); + } } diff --git a/packages/guilded.js/lib/structures/CalendarEvent.ts b/packages/guilded.js/lib/structures/CalendarEvent.ts index c15b8c60..6a41e7d2 100644 --- a/packages/guilded.js/lib/structures/CalendarEvent.ts +++ b/packages/guilded.js/lib/structures/CalendarEvent.ts @@ -1,5 +1,5 @@ import { Collection } from "@discordjs/collection"; -import type { CalendarEventPayload, MentionsPayload, CalendarEventRsvpPayload } from "@guildedjs/api"; +import type { CalendarEventPayload, CalendarEventRsvpPayload, MentionsPayload } from "@guildedjs/api"; import { parseToStamp } from "../util"; import { Base } from "./Base"; import type { Client } from "./Client"; @@ -9,233 +9,233 @@ import type { User } from "./User"; * Represents a calendar event on Guilded */ export class CalendarEvent extends Base { - /** The ID of the calendar event (min 1) */ - readonly id: number; + /** The ID of the calendar event (min 1) */ + readonly id: number; - /** The ID of the server */ - readonly serverId: string; + /** The ID of the server */ + readonly serverId: string; - /** The ID of the channel */ - readonly channelId: string; - - /** The name of the event (min length 1; max length 60) */ - name: string; - - /** The description of the event (min length 1; max length 8000) */ - description?: string | null; - - /** The location of the event (min length 1; max length 8000) */ - location?: string | null; - - /** A URL to associate with the event */ - url?: string | null; - - /** The color of the event when viewing in the calendar (min 0; max 16777215) */ - color?: number | null; - - /** The ISO 8601 timestamp that the event starts at */ - startsAt: string; - - /** The duration of the event in minutes (min 1) */ - duration?: number | null; - - /** Whether this event is private or not */ - isPrivate?: boolean; - - /** The mentions in this calendar event */ - mentions?: MentionsPayload; - - /** The cancellations for this event */ - cancellation?: CalendarEventPayload["cancellation"]; - - /** The number of rsvps to allow before waitlisting rsvps (min 1) */ - rsvpLimit?: number | null; - - /** A collection of cached rsvps for this calendar event */ - rsvps: Collection; - - /** The role IDs to restrict the event to (min items 1; must have unique items true) */ - roleIds?: number[] | null; - - /** The ID of the calendar event series. Only shows if the event is repeating */ - seriesId?: string | null; - - /** Whether this event is repeating */ - repeats?: boolean | null; - - /** Whether this event lasts all day */ - isAllDay?: boolean | null; - - /** When rsvpLimit is set, users from the waitlist will be added as space becomes available in the event */ - autofillWaitlist?: boolean | null; - - /** The ISO 8601 timestamp that the event was created at */ - readonly _createdAt: number; - - /** The ID of the user who created this event */ - readonly createdBy: string; - - constructor(client: Client, data: CalendarEventPayload) { - super(client, data); - - this.id = data.id; - this.serverId = data.serverId; - this.channelId = data.channelId; - this.name = data.name; - this.description = data.description ?? null; - this.location = data.location ?? null; - this.url = data.url ?? null; - this.color = data.color ?? null; - this.startsAt = data.startsAt; - this.duration = data.duration ?? null; - this.isPrivate = data.isPrivate ?? false; - this._createdAt = parseToStamp(data.createdAt)!; - this.createdBy = data.createdBy; - this.rsvpLimit = data.rsvpLimit ?? null; - this.rsvps = new Collection(); - this.roleIds = data.roleIds ?? null; - this.seriesId = data.seriesId ?? null; - this.repeats = data.repeats ?? null; - this.isAllDay = data.isAllDay ?? null; - this.autofillWaitlist = data.autofillWaitlist ?? null; - - this._update(data); - } - - /** - * Get the author of this calendar event - * - * @returns The author of this calendar event or null if the author is not cached - */ - get author(): User | null { - return this.client.users.cache.get(this.createdBy) ?? null; - } - - /** - * Get the date this calendar event was created - * - * @returns The date this calendar event was created - */ - get createdAt(): Date { - return new Date(this._createdAt); - } - - _update(data: Partial): this { - if ("name" in data && typeof data.name !== "undefined") { - this.name = data.name; - } - - if ("description" in data && typeof data.description !== "undefined") { - this.description = data.description; - } - - if ("url" in data && typeof data.url !== "undefined") { - this.url = data.url; - } - - if ("color" in data && typeof data.color !== "undefined") { - this.color = data.color; - } - - if ("startsAt" in data && typeof data.startsAt !== "undefined") { - this.startsAt = data.startsAt; - } - - if ("duration" in data && typeof data.duration !== "undefined") { - this.duration = data.duration; - } - - if ("isPrivate" in data && typeof data.isPrivate !== "undefined") { - this.isPrivate = data.isPrivate; - } - - if ("mentions" in data && typeof data.mentions !== "undefined") { - this.mentions = data.mentions; - } - - if ("cancellation" in data && typeof data.cancellation !== "undefined") { - this.cancellation = data.cancellation; - } - - if ("rsvpLimit" in data && typeof data.rsvpLimit !== "undefined") { - this.rsvpLimit = data.rsvpLimit ?? null; - } - - return this; - } + /** The ID of the channel */ + readonly channelId: string; + + /** The name of the event (min length 1; max length 60) */ + name: string; + + /** The description of the event (min length 1; max length 8000) */ + description?: string | null; + + /** The location of the event (min length 1; max length 8000) */ + location?: string | null; + + /** A URL to associate with the event */ + url?: string | null; + + /** The color of the event when viewing in the calendar (min 0; max 16777215) */ + color?: number | null; + + /** The ISO 8601 timestamp that the event starts at */ + startsAt: string; + + /** The duration of the event in minutes (min 1) */ + duration?: number | null; + + /** Whether this event is private or not */ + isPrivate?: boolean; + + /** The mentions in this calendar event */ + mentions?: MentionsPayload; + + /** The cancellations for this event */ + cancellation?: CalendarEventPayload["cancellation"]; + + /** The number of rsvps to allow before waitlisting rsvps (min 1) */ + rsvpLimit?: number | null; + + /** A collection of cached rsvps for this calendar event */ + rsvps: Collection; + + /** The role IDs to restrict the event to (min items 1; must have unique items true) */ + roleIds?: number[] | null; + + /** The ID of the calendar event series. Only shows if the event is repeating */ + seriesId?: string | null; + + /** Whether this event is repeating */ + repeats?: boolean | null; + + /** Whether this event lasts all day */ + isAllDay?: boolean | null; + + /** When rsvpLimit is set, users from the waitlist will be added as space becomes available in the event */ + autofillWaitlist?: boolean | null; + + /** The ISO 8601 timestamp that the event was created at */ + readonly _createdAt: number; + + /** The ID of the user who created this event */ + readonly createdBy: string; + + constructor(client: Client, data: CalendarEventPayload) { + super(client, data); + + this.id = data.id; + this.serverId = data.serverId; + this.channelId = data.channelId; + this.name = data.name; + this.description = data.description ?? null; + this.location = data.location ?? null; + this.url = data.url ?? null; + this.color = data.color ?? null; + this.startsAt = data.startsAt; + this.duration = data.duration ?? null; + this.isPrivate = data.isPrivate ?? false; + this._createdAt = parseToStamp(data.createdAt)!; + this.createdBy = data.createdBy; + this.rsvpLimit = data.rsvpLimit ?? null; + this.rsvps = new Collection(); + this.roleIds = data.roleIds ?? null; + this.seriesId = data.seriesId ?? null; + this.repeats = data.repeats ?? null; + this.isAllDay = data.isAllDay ?? null; + this.autofillWaitlist = data.autofillWaitlist ?? null; + + this._update(data); + } + + /** + * Get the author of this calendar event + * + * @returns The author of this calendar event or null if the author is not cached + */ + get author(): User | null { + return this.client.users.cache.get(this.createdBy) ?? null; + } + + /** + * Get the date this calendar event was created + * + * @returns The date this calendar event was created + */ + get createdAt(): Date { + return new Date(this._createdAt); + } + + _update(data: Partial): this { + if ("name" in data && typeof data.name !== "undefined") { + this.name = data.name; + } + + if ("description" in data && typeof data.description !== "undefined") { + this.description = data.description; + } + + if ("url" in data && typeof data.url !== "undefined") { + this.url = data.url; + } + + if ("color" in data && typeof data.color !== "undefined") { + this.color = data.color; + } + + if ("startsAt" in data && typeof data.startsAt !== "undefined") { + this.startsAt = data.startsAt; + } + + if ("duration" in data && typeof data.duration !== "undefined") { + this.duration = data.duration; + } + + if ("isPrivate" in data && typeof data.isPrivate !== "undefined") { + this.isPrivate = data.isPrivate; + } + + if ("mentions" in data && typeof data.mentions !== "undefined") { + this.mentions = data.mentions; + } + + if ("cancellation" in data && typeof data.cancellation !== "undefined") { + this.cancellation = data.cancellation; + } + + if ("rsvpLimit" in data && typeof data.rsvpLimit !== "undefined") { + this.rsvpLimit = data.rsvpLimit ?? null; + } + + return this; + } } /** * Represents a calendar event RSVP */ export class CalendarEventRsvp extends Base { - /** The ID of the calendar event (min 1) */ - readonly calendarEventId: number; + /** The ID of the calendar event (min 1) */ + readonly calendarEventId: number; - /** The ID of the channel */ - readonly channelId: string; + /** The ID of the channel */ + readonly channelId: string; - /** The ID of the server */ - readonly serverId: string; + /** The ID of the server */ + readonly serverId: string; - /** The ID of the user */ - readonly userId: string; + /** The ID of the user */ + readonly userId: string; - /** The status of the rsvp ("going", "maybe", "declined", "invited", "waitlisted", or "not responded") */ - status: string; + /** The status of the rsvp ("going", "maybe", "declined", "invited", "waitlisted", or "not responded") */ + status: string; - /** The ID of the user who created this rsvp */ - readonly createdBy: string; + /** The ID of the user who created this rsvp */ + readonly createdBy: string; - /** The ISO 8601 timestamp that the rsvp was created at */ - readonly _createdAt: number; + /** The ISO 8601 timestamp that the rsvp was created at */ + readonly _createdAt: number; - /** The ID of the user who updated this rsvp */ - updatedBy?: string | null; + /** The ID of the user who updated this rsvp */ + updatedBy?: string | null; - /** The ISO 8601 timestamp that the rsvp was updated at, if relevant */ - updatedAt?: string | null; + /** The ISO 8601 timestamp that the rsvp was updated at, if relevant */ + updatedAt?: string | null; - constructor(client: Client, data: CalendarEventRsvpPayload) { - super(client, { - ...data, - id: data.calendarEventId.toString() + "-" + data.userId, - }); + constructor(client: Client, data: CalendarEventRsvpPayload) { + super(client, { + ...data, + id: `${data.calendarEventId.toString()}-${data.userId}`, + }); - this.calendarEventId = data.calendarEventId; - this.channelId = data.channelId; - this.serverId = data.serverId; - this.userId = data.userId; - this.status = data.status; - this.createdBy = data.createdBy; - this._createdAt = parseToStamp(data.createdAt)!; - this.updatedBy = null; - this.updatedAt = null; + this.calendarEventId = data.calendarEventId; + this.channelId = data.channelId; + this.serverId = data.serverId; + this.userId = data.userId; + this.status = data.status; + this.createdBy = data.createdBy; + this._createdAt = parseToStamp(data.createdAt)!; + this.updatedBy = null; + this.updatedAt = null; - this._update(data); - } + this._update(data); + } - get author(): User | null { - return this.client.users.cache.get(this.createdBy) ?? null; - } + get author(): User | null { + return this.client.users.cache.get(this.createdBy) ?? null; + } - get createdAt(): Date { - return new Date(this._createdAt); - } + get createdAt(): Date { + return new Date(this._createdAt); + } - _update(data: Partial): this { - if ("updatedAt" in data && typeof data.updatedAt !== "undefined") { - this.updatedAt = data.updatedAt ?? null; - } + _update(data: Partial): this { + if ("updatedAt" in data && typeof data.updatedAt !== "undefined") { + this.updatedAt = data.updatedAt ?? null; + } - if ("updatedBy" in data && typeof data.updatedBy !== "undefined") { - this.updatedBy = data.updatedBy ?? null; - } + if ("updatedBy" in data && typeof data.updatedBy !== "undefined") { + this.updatedBy = data.updatedBy ?? null; + } - if ("status" in data && typeof data.status !== "undefined") { - this.status = data.status; - } + if ("status" in data && typeof data.status !== "undefined") { + this.status = data.status; + } - return this; - } + return this; + } } diff --git a/packages/guilded.js/lib/structures/Category.ts b/packages/guilded.js/lib/structures/Category.ts index 6db04c4a..4cb7319a 100644 --- a/packages/guilded.js/lib/structures/Category.ts +++ b/packages/guilded.js/lib/structures/Category.ts @@ -5,71 +5,71 @@ import { Base } from "./Base"; import type { Client } from "./Client"; export class Category extends Base { - /** The ID of the server this category is in. */ - serverId: string; + /** The ID of the server this category is in. */ + serverId: string; - /** The name of this category. */ - name!: string; + /** The name of this category. */ + name!: string; - /** The timestamp of when this category was created. */ - _createdAt: number; + /** The timestamp of when this category was created. */ + _createdAt: number; - /** The ID of the group this category is in. */ - groupId: string; + /** The ID of the group this category is in. */ + groupId: string; - /** The timestamp of when this category was last updated. */ - _updatedAt!: number | null; + /** The timestamp of when this category was last updated. */ + _updatedAt!: number | null; - constructor(client: Client, data: CategoryPayload) { - super(client, data); - this.serverId = data.serverId; - this._createdAt = parseToStamp(data.createdAt)!; - this.groupId = data.groupId; + constructor(client: Client, data: CategoryPayload) { + super(client, data); + this.serverId = data.serverId; + this._createdAt = parseToStamp(data.createdAt)!; + this.groupId = data.groupId; - this._update(data); - } + this._update(data); + } - _update(data: CategoryPayload): this { - if (typeof data.name !== "undefined") this.name = data.name; - if (typeof data.updatedAt !== "undefined") this._updatedAt = parseToStamp(data.updatedAt); + _update(data: CategoryPayload): this { + if (typeof data.name !== "undefined") this.name = data.name; + if (typeof data.updatedAt !== "undefined") this._updatedAt = parseToStamp(data.updatedAt); - return this; - } + return this; + } - /** - * Gets the creation date of this category. - * - * @returns The creation date of this category. - */ - get createdAt(): Date { - return new Date(this._createdAt); - } + /** + * Gets the creation date of this category. + * + * @returns The creation date of this category. + */ + get createdAt(): Date { + return new Date(this._createdAt); + } - /** - * Gets the last time this category was updated. - * - * @returns The last time this category was updated. - */ - get updatedAt(): Date | null { - return this._updatedAt ? new Date(this._updatedAt) : null; - } + /** + * Gets the last time this category was updated. + * + * @returns The last time this category was updated. + */ + get updatedAt(): Date | null { + return this._updatedAt ? new Date(this._updatedAt) : null; + } - /** - * Updates this webhook with new options - * - * @param options The new options for this webhook - * @returns A promise that resolves with the updated webhook - */ - update(options: Parameters[2]): Promise { - return this.client.categories.update(this.serverId, this.id, options); - } + /** + * Updates this webhook with new options + * + * @param options The new options for this webhook + * @returns A promise that resolves with the updated webhook + */ + update(options: Parameters[2]): Promise { + return this.client.categories.update(this.serverId, this.id, options); + } - /** - * Delete this category. - * - * @returns A Promise that resolves with the updated category. - */ - async delete(): Promise { - return this.client.categories.delete(this.serverId, this.id); - } + /** + * Delete this category. + * + * @returns A Promise that resolves with the updated category. + */ + async delete(): Promise { + return this.client.categories.delete(this.serverId, this.id); + } } diff --git a/packages/guilded.js/lib/structures/Client.ts b/packages/guilded.js/lib/structures/Client.ts index 2f8dd104..4507a18f 100644 --- a/packages/guilded.js/lib/structures/Client.ts +++ b/packages/guilded.js/lib/structures/Client.ts @@ -31,387 +31,400 @@ import { ClientUser } from "./User"; * @template ClientEvents The custom events for the client. */ export class Client extends (EventEmitter as unknown as new () => TypedEmitter) { - /** - * The time in milliseconds since the Client connected. - */ - readyTimestamp: number | null = null; - - /** - * The manager for the bot to make requests to the REST api. - */ - rest = new RestManager({ - ...this.options.rest, - token: this.options.token, - }); - - /** - * The websocket connection. - */ - ws = new WebSocketManager({ token: this.options.token }); - - /** - * The gateway events will be processed by this manager. - */ - gatewayHandler = new ClientGatewayHandler(this); - - /** - * A manager for channels, used to manage and interact with channels. - */ - channels = new GlobalChannelManager(this); - - /** - * A manager for docs, used to manage and interact with docs. - */ - docs = new GlobalDocManager(this); - - /** - * A manager for forum topics, used to manage and interact with forum topics. - */ - topics = new GlobalForumTopicManager(this); - - /** - * A manager for groups, used to manage and interact with groups. - */ - groups = new GlobalGroupManager(this); - - /** - * A manager for list items, used to manage and interact with list items. - */ - lists = new GlobalListItemManager(this); - - /** - * A manager for members, used to manage and interact with members. - */ - members = new GlobalMemberManager(this); - - /** - * A manager for messages, used to manage and interact with messages. - */ - messages = new GlobalMessageManager(this); - - /** - * A manager for roles, used to manage and interact with roles. - */ - roles = new GlobalRoleManager(this); - - /** - * A manager for users, used to manage and interact with users. - */ - users = new GlobalUserManager(this); - - /** - * A manager for guild bans, used to manage and interact with bans. - */ - bans = new GlobalGuildBanManager(this); - - /** - * A manager for webhooks, used to manage and interact with webhooks. - */ - webhooks = new GlobalWebhookManager(this); - - /** - * A manager for servers, used to manage and interact with servers. - */ - servers = new GlobalServerManager(this); - - /** - * A manager for reactions, used to manage and interact with reactions. - */ - reactions = new GlobalReactionManager(this); - - /** - * A manager for calendars, used to manage and interact with calendars. - */ - calendars = new GlobalCalendarManager(this); - - /** - * A manager for categories, used to manage and interact with categories. - */ - categories = new GlobalCategoryManager(this); - - /** - * A manager for server subscriptions, used to manage and interact with server subscriptions. - */ - subscriptions = new GlobalSubscriptionManager(this); - - /** - * The user belonging to this bot. - */ - user: ClientUser | null = null; - - /** - * @param options The options for the client. - * @throws {Error} Must provide options in client constructor in the form of an object. - * @throws {Error} No token provided. - */ - constructor(public options: ClientOptions) { - // eslint-disable-next-line constructor-super - super(); - if (typeof options !== "object") throw new Error("Must provide options in client constructor in the form of an object."); - if (typeof options?.token === "undefined") throw new Error("No token provided."); - } - - /** - * The amount of time the bot has been online in milliseconds. - */ - get uptime(): number { - return this.readyTimestamp ? Date.now() - this.readyTimestamp : 0; - } - - /** - * The bot's token. - */ - get token(): string { - return this.options.token; - } - - /** - * Connects the bot to the api. - * - * @param [opts] The options for connecting to the api. - * @param [opts.fresh] Whether this should create a new WebSocketManager instance. - * @example - * let client = new Guilded.Client({ token: process.env.GUILDED_TOKEN }); - * client.on('ready', () => console.log('Logged in!')); - * client.login(); - */ - login(opts?: { fresh?: boolean }): void { - if (opts?.fresh) this.ws = new WebSocketManager({ token: this.options.token }); - this.ws.emitter - .on("error", (reason, err) => this.emit("error", `[WS] ${reason}`, err)) - .on("ready", (user) => { - this.user = new ClientUser(this, user); - this.readyTimestamp = Date.now(); - this.emit("ready"); - }) - .on("gatewayEvent", (event, data) => this.gatewayHandler.handleWSMessage(event, data)) - .on("debug", (data) => this.emit("debug", data)) - .on("exit", () => this.emit("exit")); - this.ws.connect(); - } - - /** - * Disconnects the bot. - * - * @throws {Error} There is no active connection to disconnect. - */ - disconnect(): void { - if (!this.ws.isAlive) throw new Error("There is no active connection to disconnect."); - this.ws.emitter.removeAllListeners(); - this.ws.destroy(); - this.emit("exit"); - } - - /** - * Fetches the logged in client's servers. - * - * @returns The logged in client's servers. - */ - fetchServers(): Promise> { - return this.users.fetchServers(this.user!.id); - } - - /** - * Set current logged in client's status - * - * @param options The options for setting the status. - * @param options.content The content of the status. - * @param options.emoteId The id of the emote to use for the status. - * @param options.expiresAt The time the status should expire. - */ - async setStatus(options: { content?: string; emoteId: number; expiresAt?: Date | number | string }): Promise { - let resolvedDate; - if (options.expiresAt instanceof Date) { - resolvedDate = options.expiresAt; - } else if (typeof options.expiresAt === "string") { - resolvedDate = new Date(options.expiresAt); - } else if (typeof options.expiresAt === "number") { - resolvedDate = new Date(Date.now() + options.expiresAt); - } - - await this.rest.router.userStatus.userStatusCreate({ - userId: this.user!.id, - requestBody: { - content: options.content, - emoteId: options.emoteId, - expiresAt: resolvedDate?.toISOString() ?? undefined, - }, - }); - } - - /** - * Clear current logged in client's status - */ - async clearStatus(): Promise { - await this.rest.router.userStatus.userStatusDelete({ - userId: this.user!.id, - }); - } + /** + * The time in milliseconds since the Client connected. + */ + readyTimestamp: number | null = null; + + /** + * The manager for the bot to make requests to the REST api. + */ + rest = new RestManager({ + ...this.options.rest, + token: this.options.token, + }); + + /** + * The websocket connection. + */ + ws = new WebSocketManager({ + token: this.options.token, + }); + + /** + * The gateway events will be processed by this manager. + */ + gatewayHandler = new ClientGatewayHandler(this); + + /** + * A manager for channels, used to manage and interact with channels. + */ + channels = new GlobalChannelManager(this); + + /** + * A manager for docs, used to manage and interact with docs. + */ + docs = new GlobalDocManager(this); + + /** + * A manager for forum topics, used to manage and interact with forum topics. + */ + topics = new GlobalForumTopicManager(this); + + /** + * A manager for groups, used to manage and interact with groups. + */ + groups = new GlobalGroupManager(this); + + /** + * A manager for list items, used to manage and interact with list items. + */ + lists = new GlobalListItemManager(this); + + /** + * A manager for members, used to manage and interact with members. + */ + members = new GlobalMemberManager(this); + + /** + * A manager for messages, used to manage and interact with messages. + */ + messages = new GlobalMessageManager(this); + + /** + * A manager for roles, used to manage and interact with roles. + */ + roles = new GlobalRoleManager(this); + + /** + * A manager for users, used to manage and interact with users. + */ + users = new GlobalUserManager(this); + + /** + * A manager for guild bans, used to manage and interact with bans. + */ + bans = new GlobalGuildBanManager(this); + + /** + * A manager for webhooks, used to manage and interact with webhooks. + */ + webhooks = new GlobalWebhookManager(this); + + /** + * A manager for servers, used to manage and interact with servers. + */ + servers = new GlobalServerManager(this); + + /** + * A manager for reactions, used to manage and interact with reactions. + */ + reactions = new GlobalReactionManager(this); + + /** + * A manager for calendars, used to manage and interact with calendars. + */ + calendars = new GlobalCalendarManager(this); + + /** + * A manager for categories, used to manage and interact with categories. + */ + categories = new GlobalCategoryManager(this); + + /** + * A manager for server subscriptions, used to manage and interact with server subscriptions. + */ + subscriptions = new GlobalSubscriptionManager(this); + + /** + * The user belonging to this bot. + */ + user: ClientUser | null = null; + + /** + * @param options The options for the client. + * @throws {Error} Must provide options in client constructor in the form of an object. + * @throws {Error} No token provided. + */ + constructor(public options: ClientOptions) { + // eslint-disable-next-line constructor-super + super(); + if (typeof options !== "object") throw new Error("Must provide options in client constructor in the form of an object."); + if (typeof options?.token === "undefined") throw new Error("No token provided."); + } + + /** + * The amount of time the bot has been online in milliseconds. + */ + get uptime(): number { + return this.readyTimestamp ? Date.now() - this.readyTimestamp : 0; + } + + /** + * The bot's token. + */ + get token(): string { + return this.options.token; + } + + /** + * Connects the bot to the api. + * + * @param [opts] The options for connecting to the api. + * @param [opts.fresh] Whether this should create a new WebSocketManager instance. + * @example + * let client = new Guilded.Client({ token: process.env.GUILDED_TOKEN }); + * client.on('ready', () => console.log('Logged in!')); + * client.login(); + */ + login(opts?: { + fresh?: boolean; + }): void { + if (opts?.fresh) + this.ws = new WebSocketManager({ + token: this.options.token, + }); + this.ws.emitter + .on("error", (reason, err) => this.emit("error", `[WS] ${reason}`, err)) + .on("ready", (user) => { + this.user = new ClientUser(this, user); + this.readyTimestamp = Date.now(); + this.emit("ready"); + }) + .on("gatewayEvent", (event, data) => this.gatewayHandler.handleWSMessage(event, data)) + .on("debug", (data) => this.emit("debug", data)) + .on("exit", () => this.emit("exit")); + this.ws.connect(); + } + + /** + * Disconnects the bot. + * + * @throws {Error} There is no active connection to disconnect. + */ + disconnect(): void { + if (!this.ws.isAlive) throw new Error("There is no active connection to disconnect."); + this.ws.emitter.removeAllListeners(); + this.ws.destroy(); + this.emit("exit"); + } + + /** + * Fetches the logged in client's servers. + * + * @returns The logged in client's servers. + */ + fetchServers(): Promise> { + return this.users.fetchServers(this.user?.id!); + } + + /** + * Set current logged in client's status + * + * @param options The options for setting the status. + * @param options.content The content of the status. + * @param options.emoteId The id of the emote to use for the status. + * @param options.expiresAt The time the status should expire. + */ + async setStatus(options: { + content?: string; + emoteId: number; + expiresAt?: Date | number | string; + }): Promise { + let resolvedDate: Date; + if (options.expiresAt instanceof Date) { + resolvedDate = options.expiresAt; + } else if (typeof options.expiresAt === "string") { + resolvedDate = new Date(options.expiresAt); + } else if (typeof options.expiresAt === "number") { + resolvedDate = new Date(Date.now() + options.expiresAt); + } else { + resolvedDate = new Date(Date.now()); + } + + await this.rest.router.userStatus.userStatusCreate({ + userId: this.user!.id, + requestBody: { + content: options.content, + emoteId: options.emoteId, + expiresAt: resolvedDate.toISOString() ?? undefined, + }, + }); + } + + /** + * Clear current logged in client's status + */ + async clearStatus(): Promise { + await this.rest.router.userStatus.userStatusDelete({ + userId: this.user!.id, + }); + } } /** * Options for constructing the client. */ export type ClientOptions = { - /** - * The bot's token. - * - * @remarks The token is required to authenticate with the Guilded API. - */ - token: string; - - /** - * The RestManager options. - */ - rest?: { - /** - * The version of the API to be used for making requests. By default, this will use the latest version that the library supports. - * - * @default 1 - * @remarks You can set the API version to 1 if you want to use the stable API. - */ - version?: 1; - - /** - * The base url of the API you want to send requests to. By default, this will send it to guilded's rest API. - * This is meant for big bot developers who want to use a proxy rest system. - * - * @remarks If you want to use a custom API url, you can set this property to your custom url. - */ - proxyURL?: string; - }; - - /** - * Gateway handling options - */ - gateway?: { - /** - * A boolean returning function that dictates whether an event is discarded - */ - discardEvent?(event: string, data: SkeletonWSPayload): boolean; - }; - - /** - * The cache options for the client. - */ - cache?: { - /** - * The function to create a new instance of CacheStructure. - * - * @remarks You can use this to provide your own implementation of CacheStructure, which will be used to cache data in the client in a future update. - */ - structureBuilder?(): CacheStructure; - - /** - * Whether to fetch the author of a message when it is created and cache it. - * - * @default false - */ - fetchMessageAuthorOnCreate?: boolean; - - /** - * Whether to remove a member from the cache when they leave a server. - * - * @default true - */ - removeMemberOnLeave?: boolean; - - /** - * Whether to remove a member's ban from the cache when they are unbanned. - * - * @default true - */ - removeMemberBanOnUnban?: boolean; - - /** - * Whether to remove a channel from the cache when it is deleted. - * - * @default true - */ - removeChannelOnDelete?: boolean; - - /** - * Whether to remove a calendar from the cache when it is deleted. - * - * @default true - */ - removeCalendarsOnDelete?: boolean; - - /** - * Whether to remove a calendar RSVP from the cache when it is deleted. - * - * @default true - */ - removeCalendarRsvpOnDelete?: boolean; - - /** - * Whether to cache member bans. - * - * @default true - */ - cacheMemberBans?: boolean; - - /** - * Whether to cache webhooks. - * - * @default true - */ - cacheWebhooks?: boolean; - - /** - * Whether to cache channels. - * - * @default true - */ - cacheChannels?: boolean; - - /** - * Whether to cache servers. - * - * @default true - */ - cacheServers?: boolean; - - /** - * Whether to cache messages. - * - * @default true - */ - cacheMessages?: boolean; - - /** - * Whether to cache forum topics. - * - * @default true - */ - cacheForumTopics?: boolean; - - /** - * Whether to cache message reactions. - * - * @default true - */ - cacheMessageReactions?: boolean; - - /** - * Whether to cache calendars. - * - * @default true - */ - cacheCalendars?: boolean; - - /** - * Whether to cache calendar RSVPs. - * - * @default true - */ - cacheCalendarsRsvps?: boolean; - - /** - * Whether to cache member social links. - * - * @default true - */ - cacheSocialLinks?: boolean; - }; + /** + * The bot's token. + * + * @remarks The token is required to authenticate with the Guilded API. + */ + token: string; + + /** + * The RestManager options. + */ + rest?: { + /** + * The version of the API to be used for making requests. By default, this will use the latest version that the library supports. + * + * @default 1 + * @remarks You can set the API version to 1 if you want to use the stable API. + */ + version?: 1; + + /** + * The base url of the API you want to send requests to. By default, this will send it to guilded's rest API. + * This is meant for big bot developers who want to use a proxy rest system. + * + * @remarks If you want to use a custom API url, you can set this property to your custom url. + */ + proxyURL?: string; + }; + + /** + * Gateway handling options + */ + gateway?: { + /** + * A boolean returning function that dictates whether an event is discarded + */ + discardEvent?(event: string, data: SkeletonWSPayload): boolean; + }; + + /** + * The cache options for the client. + */ + cache?: { + /** + * The function to create a new instance of CacheStructure. + * + * @remarks You can use this to provide your own implementation of CacheStructure, which will be used to cache data in the client in a future update. + */ + structureBuilder?(): CacheStructure; + + /** + * Whether to fetch the author of a message when it is created and cache it. + * + * @default false + */ + fetchMessageAuthorOnCreate?: boolean; + + /** + * Whether to remove a member from the cache when they leave a server. + * + * @default true + */ + removeMemberOnLeave?: boolean; + + /** + * Whether to remove a member's ban from the cache when they are unbanned. + * + * @default true + */ + removeMemberBanOnUnban?: boolean; + + /** + * Whether to remove a channel from the cache when it is deleted. + * + * @default true + */ + removeChannelOnDelete?: boolean; + + /** + * Whether to remove a calendar from the cache when it is deleted. + * + * @default true + */ + removeCalendarsOnDelete?: boolean; + + /** + * Whether to remove a calendar RSVP from the cache when it is deleted. + * + * @default true + */ + removeCalendarRsvpOnDelete?: boolean; + + /** + * Whether to cache member bans. + * + * @default true + */ + cacheMemberBans?: boolean; + + /** + * Whether to cache webhooks. + * + * @default true + */ + cacheWebhooks?: boolean; + + /** + * Whether to cache channels. + * + * @default true + */ + cacheChannels?: boolean; + + /** + * Whether to cache servers. + * + * @default true + */ + cacheServers?: boolean; + + /** + * Whether to cache messages. + * + * @default true + */ + cacheMessages?: boolean; + + /** + * Whether to cache forum topics. + * + * @default true + */ + cacheForumTopics?: boolean; + + /** + * Whether to cache message reactions. + * + * @default true + */ + cacheMessageReactions?: boolean; + + /** + * Whether to cache calendars. + * + * @default true + */ + cacheCalendars?: boolean; + + /** + * Whether to cache calendar RSVPs. + * + * @default true + */ + cacheCalendarsRsvps?: boolean; + + /** + * Whether to cache member social links. + * + * @default true + */ + cacheSocialLinks?: boolean; + }; }; diff --git a/packages/guilded.js/lib/structures/Embed.ts b/packages/guilded.js/lib/structures/Embed.ts index f443d220..230faf9e 100644 --- a/packages/guilded.js/lib/structures/Embed.ts +++ b/packages/guilded.js/lib/structures/Embed.ts @@ -2,199 +2,224 @@ import type { ChatEmbedPayload, EmbedPayload } from "@guildedjs/api"; import { resolveColor } from "@guildedjs/api"; export class Embed { - title: string | null; - - description: string | null; - - url: string | null; - - timestamp: number | null; - - color: number | null; - - image: APIEmbedMediaData | null; - - thumbnail: APIEmbedMediaData | null; - - video: APIEmbedMediaData | null; - - author: { - name: string | null; - iconURL: string | null; - url: string | null; - } | null; - - fields: { - inline: boolean | null; - name: string; - value: string; - }[]; - - footer: { - text: string; - iconURL: string | null; - } | null; - - private timestampString: string | null; - - constructor(data?: Partial) { - this.footer = null; - this.image = null; - this.thumbnail = null; - this.author = null; - this.fields = []; - this.video = null; - this.color = null; - this.timestamp = null; - this.timestampString = null; - this.description = null; - this.url = null; - this.title = null; - - if (data) this._update(data); - } - - _update(data: Partial): void { - if ("color" in data) this.setColor(data.color); - if ("timestamp" in data) this.setTimestamp(data.timestamp); - if ("title" in data) this.setTitle(data.title); - if ("description" in data) this.setDescription(data.description); - if ("url" in data) this.setURL(data.url); - if ("footer" in data) this.setFooter(data.footer?.text, data.footer?.icon_url ?? null); - if ("image" in data) this.setImage(data.image?.url); - if ("thumbnail" in data) this.setThumbnail(data.thumbnail?.url); - if ("author" in data) this.setAuthor(data.author?.name, data.author?.icon_url, data.author?.url); - if ("fields" in data) this.addFields(data.fields ?? []); - } - - setTitle(title?: string | null): this { - this.title = title ?? null; - return this; - } - - setDescription(description?: string | null): this { - this.description = description ?? null; - return this; - } - - setURL(url?: string | null): this { - this.url = url ?? null; - return this; - } - - setTimestamp(timestamp?: Date | number | string | null): this { - if (timestamp === null) { - this.timestamp = null; - this.timestampString = null; - return this; - } - - if (!timestamp) { - return this.setTimestamp(new Date()); - } - - const parsedTimestamp = timestamp instanceof Date ? timestamp : Number.isInteger(timestamp) || typeof timestamp === "string" ? new Date(timestamp) : null; - if (!parsedTimestamp || (parsedTimestamp instanceof Date && Number.isNaN(parsedTimestamp.getTime()))) { - throw new TypeError("Invalid DateResolvable passed into setTimestamp."); - } - - this.timestamp = parsedTimestamp.getTime(); - this.timestampString = parsedTimestamp.toISOString(); - return this; - } - - setColor(color?: number | string | [number, number, number] | null): this { - this.color = color ? resolveColor(color) : null; - return this; - } - - setFooter(text?: string, iconURL?: string | null): this { - this.footer = text ? { iconURL: iconURL ?? null, text } : null; - return this; - } - - setImage(url?: string): this { - this.image = url ? { url } : null; - return this; - } - - setThumbnail(url?: string): this { - this.thumbnail = url ? { url } : null; - return this; - } - - setAuthor(name?: string, iconURL?: string | null, url?: string | null): this { - this.author = name - ? { - iconURL: iconURL ?? null, - name: name ?? null, - url: url ?? null, - } - : null; - return this; - } - - addFields(fields: { name: string; value: string; inline?: boolean }[]): this { - this.fields.push( - ...fields.map((field) => ({ - inline: field.inline ?? false, - name: field.name, - value: field.value, - })), - ); - return this; - } - - addField(name: string, value: string, inline?: boolean): this { - this.addFields([{ inline, name, value }]); - return this; - } - - clearFields(): this { - this.fields.length = 0; - return this; - } - - toJSON(): EmbedPayload { - return { - author: this.author?.name - ? { - icon_url: this.author.iconURL ?? undefined, - name: this.author.name, - url: this.author.url ?? undefined, - } - : undefined, - color: this.color ?? undefined, - description: this.description ?? undefined, - fields: - this.fields.map((field) => ({ - inline: field.inline ?? false, - name: field.name, - value: field.value, - })) ?? undefined, - footer: this.footer - ? { - icon_url: this.footer.iconURL ?? undefined, - text: this.footer.text ?? undefined, - } - : undefined, - image: this.image - ? { - url: this.image.url ?? undefined, - } - : undefined, - thumbnail: this.thumbnail - ? { - url: this.thumbnail.url ?? undefined, - } - : undefined, - timestamp: this.timestampString ?? undefined, - title: this.title ?? undefined, - url: this.url ?? undefined, - }; - } + title: string | null; + + description: string | null; + + url: string | null; + + timestamp: number | null; + + color: number | null; + + image: APIEmbedMediaData | null; + + thumbnail: APIEmbedMediaData | null; + + video: APIEmbedMediaData | null; + + author: { + name: string | null; + iconURL: string | null; + url: string | null; + } | null; + + fields: { + inline: boolean | null; + name: string; + value: string; + }[]; + + footer: { + text: string; + iconURL: string | null; + } | null; + + private timestampString: string | null; + + constructor(data?: Partial) { + this.footer = null; + this.image = null; + this.thumbnail = null; + this.author = null; + this.fields = []; + this.video = null; + this.color = null; + this.timestamp = null; + this.timestampString = null; + this.description = null; + this.url = null; + this.title = null; + + if (data) this._update(data); + } + + _update(data: Partial): void { + if ("color" in data) this.setColor(data.color); + if ("timestamp" in data) this.setTimestamp(data.timestamp); + if ("title" in data) this.setTitle(data.title); + if ("description" in data) this.setDescription(data.description); + if ("url" in data) this.setURL(data.url); + if ("footer" in data) this.setFooter(data.footer?.text, data.footer?.icon_url ?? null); + if ("image" in data) this.setImage(data.image?.url); + if ("thumbnail" in data) this.setThumbnail(data.thumbnail?.url); + if ("author" in data) this.setAuthor(data.author?.name, data.author?.icon_url, data.author?.url); + if ("fields" in data) this.addFields(data.fields ?? []); + } + + setTitle(title?: string | null): this { + this.title = title ?? null; + return this; + } + + setDescription(description?: string | null): this { + this.description = description ?? null; + return this; + } + + setURL(url?: string | null): this { + this.url = url ?? null; + return this; + } + + setTimestamp(timestamp?: Date | number | string | null): this { + if (timestamp === null) { + this.timestamp = null; + this.timestampString = null; + return this; + } + + if (!timestamp) { + return this.setTimestamp(new Date()); + } + + const parsedTimestamp = timestamp instanceof Date ? timestamp : Number.isInteger(timestamp) || typeof timestamp === "string" ? new Date(timestamp) : null; + if (!parsedTimestamp || (parsedTimestamp instanceof Date && Number.isNaN(parsedTimestamp.getTime()))) { + throw new TypeError("Invalid DateResolvable passed into setTimestamp."); + } + + this.timestamp = parsedTimestamp.getTime(); + this.timestampString = parsedTimestamp.toISOString(); + return this; + } + + setColor(color?: number | string | [number, number, number] | null): this { + this.color = color ? resolveColor(color) : null; + return this; + } + + setFooter(text?: string, iconURL?: string | null): this { + this.footer = text + ? { + iconURL: iconURL ?? null, + text, + } + : null; + return this; + } + + setImage(url?: string): this { + this.image = url + ? { + url, + } + : null; + return this; + } + + setThumbnail(url?: string): this { + this.thumbnail = url + ? { + url, + } + : null; + return this; + } + + setAuthor(name?: string, iconURL?: string | null, url?: string | null): this { + this.author = name + ? { + iconURL: iconURL ?? null, + name: name ?? null, + url: url ?? null, + } + : null; + return this; + } + + addFields( + fields: { + name: string; + value: string; + inline?: boolean; + }[], + ): this { + this.fields.push( + ...fields.map((field) => ({ + inline: field.inline ?? false, + name: field.name, + value: field.value, + })), + ); + return this; + } + + addField(name: string, value: string, inline?: boolean): this { + this.addFields([ + { + inline, + name, + value, + }, + ]); + return this; + } + + clearFields(): this { + this.fields.length = 0; + return this; + } + + toJSON(): EmbedPayload { + return { + author: this.author?.name + ? { + icon_url: this.author.iconURL ?? undefined, + name: this.author.name, + url: this.author.url ?? undefined, + } + : undefined, + color: this.color ?? undefined, + description: this.description ?? undefined, + fields: + this.fields.map((field) => ({ + inline: field.inline ?? false, + name: field.name, + value: field.value, + })) ?? undefined, + footer: this.footer + ? { + icon_url: this.footer.iconURL ?? undefined, + text: this.footer.text ?? undefined, + } + : undefined, + image: this.image + ? { + url: this.image.url ?? undefined, + } + : undefined, + thumbnail: this.thumbnail + ? { + url: this.thumbnail.url ?? undefined, + } + : undefined, + timestamp: this.timestampString ?? undefined, + title: this.title ?? undefined, + url: this.url ?? undefined, + }; + } } export type APIEmbedMediaData = { - url: string; + url: string; }; diff --git a/packages/guilded.js/lib/structures/Forum.ts b/packages/guilded.js/lib/structures/Forum.ts index 454b66f4..90b7f977 100644 --- a/packages/guilded.js/lib/structures/Forum.ts +++ b/packages/guilded.js/lib/structures/Forum.ts @@ -1,4 +1,4 @@ -import type { ForumTopicPayload, MentionsPayload, ForumTopicSummaryPayload } from "@guildedjs/api"; +import type { ForumTopicPayload, ForumTopicSummaryPayload, MentionsPayload } from "@guildedjs/api"; import { parseToStamp } from "../util"; import { Base } from "./Base"; import type { Client } from "./Client"; @@ -7,240 +7,252 @@ import type { Client } from "./Client"; * Represents a forum topic in Guilded. */ export class ForumTopic extends Base { - /** - * The server ID of the forum topic. - */ - readonly serverId: string; - - /** - * The channel ID of the forum topic. - */ - readonly channelId: string; - - /** - * The title of the forum topic. - */ - title!: string; - - /** - * The creation date of the forum topic. - */ - readonly _createdAt: number; - - /** - * The user ID of the user who created the forum topic. - */ - readonly createdBy: string; - - /** - * The date time the forum topic was last updated, or null if it hasn't been updated. - */ - _updatedAt!: number | null; - - /** - * The date time the forum topic was last bumped, or null if it hasn't been bumped. - */ - _bumpedAt!: number | null; - - /** - * The date time the forum topic was deleted, or null if it hasn't been deleted. - */ - _deletedAt: number | null; - - /** - * Whether the forum topic is pinned. - */ - isPinned: boolean; - - /** - * Whether the forum topic is locked. - */ - isLocked: boolean; - - /** - * The content of the forum topic. - */ - content!: string; - - /** - * The mentions in the forum topic. - */ - mentions!: MentionsPayload; - - constructor(client: Client, data: ForumTopicPayload) { - super(client, data); - this.serverId = data.serverId; - this.channelId = data.channelId; - this._createdAt = parseToStamp(data.createdAt)!; - this.createdBy = data.createdBy; - this.isPinned = false; - this.isLocked = false; - this._deletedAt = null; - - this._update(data); - } - - /** - * Gets the creation date of the forum topic. - * - * @returns A Date object - */ - get createdAt(): Date { - return new Date(this._createdAt); - } - - /** - * Gets the date the forum topic was deleted, or null if it hasn't been deleted. - * - * @returns A Date object - */ - get deletedAt(): Date | null { - return this._deletedAt ? new Date(this._deletedAt) : null; - } - - /** - * Gets the date the forum topic was last updated, or null if it hasn't been updated. - * - * @returns A Date object - */ - get updatedAt(): Date | null { - return this._updatedAt ? new Date(this._updatedAt) : null; - } - - _update(data: Partial): this { - if ("updatedAt" in data && typeof data.updatedAt !== "undefined") { - this._updatedAt = data.updatedAt ? parseToStamp(data.updatedAt) : null; - } - - if ("_deletedAt" in data && typeof data._deletedAt !== "undefined") { - this._deletedAt = data._deletedAt.getTime(); - } - - if ("bumpedAt" in data && typeof data.bumpedAt !== "undefined") { - this._bumpedAt = data.bumpedAt ? parseToStamp(data.bumpedAt) : null; - } - - if ("isPinned" in data && typeof data.isPinned !== "undefined") { - this.isPinned = data.isPinned; - } - - if ("isLocked" in data && typeof data.isLocked !== "undefined") { - this.isLocked = data.isLocked; - } - - if ("title" in data && typeof data.title !== "undefined") { - this.title = data.title; - } - - if ("content" in data && typeof data.content !== "undefined") { - this.content = data.content; - } - - if ("mentions" in data && typeof data.mentions !== "undefined") { - this.mentions = data.mentions; - } - - return this; - } + /** + * The server ID of the forum topic. + */ + readonly serverId: string; + + /** + * The channel ID of the forum topic. + */ + readonly channelId: string; + + /** + * The title of the forum topic. + */ + title!: string; + + /** + * The creation date of the forum topic. + */ + readonly _createdAt: number; + + /** + * The user ID of the user who created the forum topic. + */ + readonly createdBy: string; + + /** + * The date time the forum topic was last updated, or null if it hasn't been updated. + */ + _updatedAt!: number | null; + + /** + * The date time the forum topic was last bumped, or null if it hasn't been bumped. + */ + _bumpedAt!: number | null; + + /** + * The date time the forum topic was deleted, or null if it hasn't been deleted. + */ + _deletedAt: number | null; + + /** + * Whether the forum topic is pinned. + */ + isPinned: boolean; + + /** + * Whether the forum topic is locked. + */ + isLocked: boolean; + + /** + * The content of the forum topic. + */ + content!: string; + + /** + * The mentions in the forum topic. + */ + mentions!: MentionsPayload; + + constructor(client: Client, data: ForumTopicPayload) { + super(client, data); + this.serverId = data.serverId; + this.channelId = data.channelId; + this._createdAt = parseToStamp(data.createdAt)!; + this.createdBy = data.createdBy; + this.isPinned = false; + this.isLocked = false; + this._deletedAt = null; + + this._update(data); + } + + /** + * Gets the creation date of the forum topic. + * + * @returns A Date object + */ + get createdAt(): Date { + return new Date(this._createdAt); + } + + /** + * Gets the date the forum topic was deleted, or null if it hasn't been deleted. + * + * @returns A Date object + */ + get deletedAt(): Date | null { + return this._deletedAt ? new Date(this._deletedAt) : null; + } + + /** + * Gets the date the forum topic was last updated, or null if it hasn't been updated. + * + * @returns A Date object + */ + get updatedAt(): Date | null { + return this._updatedAt ? new Date(this._updatedAt) : null; + } + + _update( + data: Partial< + ForumTopicPayload & { + _deletedAt?: Date; + } + >, + ): this { + if ("updatedAt" in data && typeof data.updatedAt !== "undefined") { + this._updatedAt = data.updatedAt ? parseToStamp(data.updatedAt) : null; + } + + if ("_deletedAt" in data && typeof data._deletedAt !== "undefined") { + this._deletedAt = data._deletedAt.getTime(); + } + + if ("bumpedAt" in data && typeof data.bumpedAt !== "undefined") { + this._bumpedAt = data.bumpedAt ? parseToStamp(data.bumpedAt) : null; + } + + if ("isPinned" in data && typeof data.isPinned !== "undefined") { + this.isPinned = data.isPinned; + } + + if ("isLocked" in data && typeof data.isLocked !== "undefined") { + this.isLocked = data.isLocked; + } + + if ("title" in data && typeof data.title !== "undefined") { + this.title = data.title; + } + + if ("content" in data && typeof data.content !== "undefined") { + this.content = data.content; + } + + if ("mentions" in data && typeof data.mentions !== "undefined") { + this.mentions = data.mentions; + } + + return this; + } } /** A partial summary representation of a forum topic. Can fetch this topic to get full data */ export class PartialForumTopic extends Base { - /** - * The ID of the server this role belongs to - */ - readonly serverId: string; - - /** - * The date time the forum topic was last updated, or null if it hasn't been updated. - */ - _updatedAt!: number | null; - - /** - * The date time the forum topic was last bumped, or null if it hasn't been bumped. - */ - _bumpedAt!: number | null; - - /** - * The title of the forum topic. - */ - title!: string; - - /** - * Whether the forum topic is pinned. - */ - isPinned: boolean; - - /** - * The creation date of the forum topic. - */ - readonly _createdAt: number; - - /** - * The user ID of the user who created the forum topic. - */ - readonly createdBy: string; - - /** - * The channel ID of the forum topic. - */ - readonly channelId: string; - - constructor(client: Client, data: ForumTopicSummaryPayload) { - super(client, data); - this.serverId = data.serverId; - this.channelId = data.channelId; - this._createdAt = parseToStamp(data.createdAt)!; - this.createdBy = data.createdBy; - this.isPinned = false; - - this._update(data); - } - - _update(data: Partial): this { - if ("updatedAt" in data && typeof data.updatedAt !== "undefined") { - this._updatedAt = data.updatedAt ? parseToStamp(data.updatedAt) : null; - } - - if ("bumpedAt" in data && typeof data.bumpedAt !== "undefined") { - this._bumpedAt = data.bumpedAt ? parseToStamp(data.bumpedAt) : null; - } - - if ("isPinned" in data && typeof data.isPinned !== "undefined") { - this.isPinned = data.isPinned; - } - - if ("title" in data && typeof data.title !== "undefined") { - this.title = data.title; - } - - return this; - } - - /** - * Gets the creation date of the forum topic. - * - * @returns A Date object - */ - get createdAt(): Date { - return new Date(this._createdAt); - } - - /** - * Gets the date the forum topic was last updated, or null if it hasn't been updated. - * - * @returns A Date object - */ - get updatedAt(): Date | null { - return this._updatedAt ? new Date(this._updatedAt) : null; - } - - /** - * Fetch the full member object of this partial member - * - * @returns A promise containing the resolved full member. - */ - fetch(): Promise { - return this.client.topics.fetch(this.serverId, this.id); - } + /** + * The ID of the server this role belongs to + */ + readonly serverId: string; + + /** + * The date time the forum topic was last updated, or null if it hasn't been updated. + */ + _updatedAt!: number | null; + + /** + * The date time the forum topic was last bumped, or null if it hasn't been bumped. + */ + _bumpedAt!: number | null; + + /** + * The title of the forum topic. + */ + title!: string; + + /** + * Whether the forum topic is pinned. + */ + isPinned: boolean; + + /** + * The creation date of the forum topic. + */ + readonly _createdAt: number; + + /** + * The user ID of the user who created the forum topic. + */ + readonly createdBy: string; + + /** + * The channel ID of the forum topic. + */ + readonly channelId: string; + + constructor(client: Client, data: ForumTopicSummaryPayload) { + super(client, data); + this.serverId = data.serverId; + this.channelId = data.channelId; + this._createdAt = parseToStamp(data.createdAt)!; + this.createdBy = data.createdBy; + this.isPinned = false; + + this._update(data); + } + + _update( + data: Partial< + ForumTopicPayload & { + _deletedAt?: Date; + } + >, + ): this { + if ("updatedAt" in data && typeof data.updatedAt !== "undefined") { + this._updatedAt = data.updatedAt ? parseToStamp(data.updatedAt) : null; + } + + if ("bumpedAt" in data && typeof data.bumpedAt !== "undefined") { + this._bumpedAt = data.bumpedAt ? parseToStamp(data.bumpedAt) : null; + } + + if ("isPinned" in data && typeof data.isPinned !== "undefined") { + this.isPinned = data.isPinned; + } + + if ("title" in data && typeof data.title !== "undefined") { + this.title = data.title; + } + + return this; + } + + /** + * Gets the creation date of the forum topic. + * + * @returns A Date object + */ + get createdAt(): Date { + return new Date(this._createdAt); + } + + /** + * Gets the date the forum topic was last updated, or null if it hasn't been updated. + * + * @returns A Date object + */ + get updatedAt(): Date | null { + return this._updatedAt ? new Date(this._updatedAt) : null; + } + + /** + * Fetch the full member object of this partial member + * + * @returns A promise containing the resolved full member. + */ + fetch(): Promise { + return this.client.topics.fetch(this.serverId, this.id); + } } diff --git a/packages/guilded.js/lib/structures/Group.ts b/packages/guilded.js/lib/structures/Group.ts index 50c9dbe1..7cb9228a 100644 --- a/packages/guilded.js/lib/structures/Group.ts +++ b/packages/guilded.js/lib/structures/Group.ts @@ -6,86 +6,86 @@ import type { Client } from "./Client"; * A group in a server in Guilded */ export class Group extends Base { - /** The name of the group */ - public name!: string; - - /** The description of the group */ - public description!: string; - - /** The ID of the server this group is in */ - public serverId: string; - - /** The ID of the user who created this group */ - public createdBy: string; - - /** The date this group was created at */ - public createdAt: Date; - - /** The date this group was last updated at */ - public updatedAt!: Date; - - // Avatar of this group - public avatar!: string; - - // Whether this is the main group in a server - public isHome!: boolean; - - // ID of the emote for this group - public emoteId!: number; - - // Whether this group is public - public isPublic!: boolean; - - // ID of the user who last updated this group - public updatedBy!: string; - - // Date this group was archived if it was archived - public archivedAt!: Date | null; - - // ID of the user who archived this group if it was archived - public archivedBy!: string | null; - - constructor(client: Client, data: GroupPayload) { - super(client, data); - this.serverId = data.serverId; - this.createdAt = new Date(Date.parse(data.createdAt)); - this.createdBy = data.createdBy; - - this._update(data); - } - - _update(data: GroupPayload): this { - if (typeof data.name !== "undefined") this.name = data.name; - if (typeof data.description !== "undefined") this.description = data.description; - if (typeof data.updatedAt !== "undefined") this.updatedAt = new Date(Date.parse(data.updatedAt)); - if (typeof data.avatar !== "undefined") this.avatar = data.avatar; - if (typeof data.isHome !== "undefined") this.isHome = data.isHome; - if (typeof data.emoteId !== "undefined") this.emoteId = data.emoteId; - if (typeof data.isPublic !== "undefined") this.isPublic = data.isPublic; - if (typeof data.updatedBy !== "undefined") this.updatedBy = data.updatedBy; - if (typeof data.archivedAt !== "undefined") this.archivedAt = data.archivedAt ? new Date(Date.parse(data.archivedAt)) : null; - if (typeof data.archivedBy !== "undefined") this.archivedBy = data.archivedBy; - - return this; - } - - /** - * Adds a member to the group. - * - * @param memberId The ID of the member to add. - * @returns A Promise that resolves with no result on success. - */ - addMember(memberId: string): Promise { - return this.client.groups.addMember(this.id, memberId); - } - - /** - * Removes a member from the group. - * - * @param memberId The ID of the member to remove. - * @returns A Promise that resolves with no result on success. - */ - removeMember(memberId: string): Promise { - return this.client.groups.removeMember(this.id, memberId); - } + /** The name of the group */ + public name!: string; + + /** The description of the group */ + public description!: string; + + /** The ID of the server this group is in */ + public serverId: string; + + /** The ID of the user who created this group */ + public createdBy: string; + + /** The date this group was created at */ + public createdAt: Date; + + /** The date this group was last updated at */ + public updatedAt!: Date; + + // Avatar of this group + public avatar!: string; + + // Whether this is the main group in a server + public isHome!: boolean; + + // ID of the emote for this group + public emoteId!: number; + + // Whether this group is public + public isPublic!: boolean; + + // ID of the user who last updated this group + public updatedBy!: string; + + // Date this group was archived if it was archived + public archivedAt!: Date | null; + + // ID of the user who archived this group if it was archived + public archivedBy!: string | null; + + constructor(client: Client, data: GroupPayload) { + super(client, data); + this.serverId = data.serverId; + this.createdAt = new Date(Date.parse(data.createdAt)); + this.createdBy = data.createdBy; + + this._update(data); + } + + _update(data: GroupPayload): this { + if (typeof data.name !== "undefined") this.name = data.name; + if (typeof data.description !== "undefined") this.description = data.description; + if (typeof data.updatedAt !== "undefined") this.updatedAt = new Date(Date.parse(data.updatedAt)); + if (typeof data.avatar !== "undefined") this.avatar = data.avatar; + if (typeof data.isHome !== "undefined") this.isHome = data.isHome; + if (typeof data.emoteId !== "undefined") this.emoteId = data.emoteId; + if (typeof data.isPublic !== "undefined") this.isPublic = data.isPublic; + if (typeof data.updatedBy !== "undefined") this.updatedBy = data.updatedBy; + if (typeof data.archivedAt !== "undefined") this.archivedAt = data.archivedAt ? new Date(Date.parse(data.archivedAt)) : null; + if (typeof data.archivedBy !== "undefined") this.archivedBy = data.archivedBy; + + return this; + } + + /** + * Adds a member to the group. + * + * @param memberId The ID of the member to add. + * @returns A Promise that resolves with no result on success. + */ + addMember(memberId: string): Promise { + return this.client.groups.addMember(this.id, memberId); + } + + /** + * Removes a member from the group. + * + * @param memberId The ID of the member to remove. + * @returns A Promise that resolves with no result on success. + */ + removeMember(memberId: string): Promise { + return this.client.groups.removeMember(this.id, memberId); + } } diff --git a/packages/guilded.js/lib/structures/Member.ts b/packages/guilded.js/lib/structures/Member.ts index 4c60b67d..962f8c94 100644 --- a/packages/guilded.js/lib/structures/Member.ts +++ b/packages/guilded.js/lib/structures/Member.ts @@ -7,262 +7,272 @@ import type { Client } from "./Client"; import type { User } from "./User"; export class Member extends Base { - /** The ID of the server this role belongs to */ - readonly serverId: string; - - /** The nickname for this member */ - nickname: string | null = null; - - /** Date this member joined */ - _joinedAt: number | null; - - /** Roles this member has by ID (TODO: role object when Guilded API has one) */ - roleIds: number[] = []; - - /** Whether this member has been kicked */ - kicked: boolean; - - /** Whether this member has been banned */ - banned: boolean; - - /** Whether this member owns the server */ - isOwner: boolean; - - /** Cached social links of this member */ - socialLinks: Collection; - - constructor(client: Client, data: UpgradedServerMemberPayload) { - super(client, data); - this.serverId = data.serverId; - this._joinedAt = parseToStamp(data.joinedAt); - this.kicked = false; - this.banned = false; - this.isOwner = false; - this.socialLinks = new Collection(); - - this._update(data); - } - - get joinedAt(): Date | null { - return this._joinedAt ? new Date(this._joinedAt) : null; - } - - _update(data: Partial): this { - if ("nickname" in data) { - this.nickname = data.nickname ?? null; - } - - if ("roleIds" in data && typeof data.roleIds !== "undefined") { - this.roleIds = data.roleIds; - } - - if ("kicked" in data && typeof data.kicked !== "undefined") { - this.kicked = data.kicked; - } - - if ("banned" in data && typeof data.banned !== "undefined") { - this.banned = data.banned; - } - - if ("isOwner" in data && typeof data.isOwner !== "undefined") { - this.isOwner = data.isOwner; - } - - return this; - } - - /** - * Get the user associated with this member. - * - * @returns The user associated with this member or null if the user is not cached. - */ - get user(): User | null { - return this.client.users.cache.get(this.id) ?? null; - } - - /** - * The username of this member. - * - * @returns The username of this member or null if the user is not cached. - */ - get username(): string | null { - return this.user?.name ?? null; - } - - /** - * Either the nickname or the username associated with this member. - * - * @returns The nickname of this member or their username if they have no nickname, or null if the user does not exist. - */ - get displayName(): string | null { - return this.nickname ?? this.username; - } - - /** - * Get a list of the roles assigned to this member. - * - * @returns A Promise that resolves with an array of role IDs assigned to this member. - */ - getRoles(): Promise { - return this.client.members.getRoles(this.serverId, this.id); - } - - /** - * Update this member's nickname. - * - * @param nickname - The new nickname for the member. - * @returns A Promise that resolves with the new nickname for the member. - */ - updateNickname(nickname: string): Promise { - return this.client.members.updateNickname(this.serverId, this.id, nickname); - } - - /** - * Reset this member's nickname. - * - * @returns A Promise that resolves once the member's nickname has been reset. - */ - resetNickname(): Promise { - return this.client.members.resetNickname(this.serverId, this.id); - } - - /** - * Award XP to this member. - * - * @param amount - The amount of XP to award to the member. - * @returns A Promise that resolves with the new total amount of XP the member has. - */ - awardXP(amount: number): Promise { - return this.client.members.giveXP(this.serverId, this.id, amount); - } - - /** - * Add role to this member. - * - * @param roleId - The ID of the role to add to the member. - * @returns A Promise that resolves once the role has been added to the member. - */ - addRole(roleId: number): Promise { - return this.client.roles.addRoleToMember(this.serverId, this.id, roleId); - } - - /** - * Remove role from this member. - * - * @param roleId - The ID of the role to remove from the member. - * @returns A Promise that resolves once the role has been removed from the member. - */ - removeRole(roleId: number): Promise { - return this.client.roles.removeRoleFromMember(this.serverId, this.id, roleId); - } - - /** - * Kick this user from the server. - * - * @returns A Promise that resolves with the kicked member or null if the user is not a member of the server. - */ - kick(): Promise { - return this.client.members.kick(this.serverId, this.id); - } - - /** - * Ban this user - * - * @returns A Promise that resolved to the created member ban. - */ - ban(): Promise { - return this.client.bans.ban(this.serverId, this.id); - } + /** The ID of the server this role belongs to */ + readonly serverId: string; + + /** The nickname for this member */ + nickname: string | null = null; + + /** Date this member joined */ + _joinedAt: number | null; + + /** Roles this member has by ID (TODO: role object when Guilded API has one) */ + roleIds: number[] = []; + + /** Whether this member has been kicked */ + kicked: boolean; + + /** Whether this member has been banned */ + banned: boolean; + + /** Whether this member owns the server */ + isOwner: boolean; + + /** Cached social links of this member */ + socialLinks: Collection; + + constructor(client: Client, data: UpgradedServerMemberPayload) { + super(client, data); + this.serverId = data.serverId; + this._joinedAt = parseToStamp(data.joinedAt); + this.kicked = false; + this.banned = false; + this.isOwner = false; + this.socialLinks = new Collection(); + + this._update(data); + } + + get joinedAt(): Date | null { + return this._joinedAt ? new Date(this._joinedAt) : null; + } + + _update( + data: Partial< + ServerMemberPayload & { + kicked: boolean; + banned: boolean; + } + >, + ): this { + if ("nickname" in data) { + this.nickname = data.nickname ?? null; + } + + if ("roleIds" in data && typeof data.roleIds !== "undefined") { + this.roleIds = data.roleIds; + } + + if ("kicked" in data && typeof data.kicked !== "undefined") { + this.kicked = data.kicked; + } + + if ("banned" in data && typeof data.banned !== "undefined") { + this.banned = data.banned; + } + + if ("isOwner" in data && typeof data.isOwner !== "undefined") { + this.isOwner = data.isOwner; + } + + return this; + } + + /** + * Get the user associated with this member. + * + * @returns The user associated with this member or null if the user is not cached. + */ + get user(): User | null { + return this.client.users.cache.get(this.id) ?? null; + } + + /** + * The username of this member. + * + * @returns The username of this member or null if the user is not cached. + */ + get username(): string | null { + return this.user?.name ?? null; + } + + /** + * Either the nickname or the username associated with this member. + * + * @returns The nickname of this member or their username if they have no nickname, or null if the user does not exist. + */ + get displayName(): string | null { + return this.nickname ?? this.username; + } + + /** + * Get a list of the roles assigned to this member. + * + * @returns A Promise that resolves with an array of role IDs assigned to this member. + */ + getRoles(): Promise { + return this.client.members.getRoles(this.serverId, this.id); + } + + /** + * Update this member's nickname. + * + * @param nickname - The new nickname for the member. + * @returns A Promise that resolves with the new nickname for the member. + */ + updateNickname(nickname: string): Promise { + return this.client.members.updateNickname(this.serverId, this.id, nickname); + } + + /** + * Reset this member's nickname. + * + * @returns A Promise that resolves once the member's nickname has been reset. + */ + resetNickname(): Promise { + return this.client.members.resetNickname(this.serverId, this.id); + } + + /** + * Award XP to this member. + * + * @param amount - The amount of XP to award to the member. + * @returns A Promise that resolves with the new total amount of XP the member has. + */ + awardXP(amount: number): Promise { + return this.client.members.giveXP(this.serverId, this.id, amount); + } + + /** + * Add role to this member. + * + * @param roleId - The ID of the role to add to the member. + * @returns A Promise that resolves once the role has been added to the member. + */ + addRole(roleId: number): Promise { + return this.client.roles.addRoleToMember(this.serverId, this.id, roleId); + } + + /** + * Remove role from this member. + * + * @param roleId - The ID of the role to remove from the member. + * @returns A Promise that resolves once the role has been removed from the member. + */ + removeRole(roleId: number): Promise { + return this.client.roles.removeRoleFromMember(this.serverId, this.id, roleId); + } + + /** + * Kick this user from the server. + * + * @returns A Promise that resolves with the kicked member or null if the user is not a member of the server. + */ + kick(): Promise { + return this.client.members.kick(this.serverId, this.id); + } + + /** + * Ban this user + * + * @returns A Promise that resolved to the created member ban. + */ + ban(): Promise { + return this.client.bans.ban(this.serverId, this.id); + } } /** A partial summary representation of a member. Can fetch this member to get full data */ export class PartialMember extends Base { - /** The ID of the server this role belongs to */ - readonly serverId: string; - - /** The user information of this member */ - readonly user: UserSummaryPayload; - - /** Roles this member has by ID (TODO: role object when Guilded API has one) */ - readonly roleIds: number[] = []; - - constructor(client: Client, data: UpgradedServerMemberSummaryPayload) { - super(client, data); - this.serverId = data.serverId; - this.user = data.user; - this.roleIds = data.roleIds; - } - - /** - * Fetch the full member object of this partial member - * - * @returns A promise containing the resolved full member. - */ - fetch(): Promise { - return this.client.members.fetch(this.serverId, this.user.id); - } + /** The ID of the server this role belongs to */ + readonly serverId: string; + + /** The user information of this member */ + readonly user: UserSummaryPayload; + + /** Roles this member has by ID (TODO: role object when Guilded API has one) */ + readonly roleIds: number[] = []; + + constructor(client: Client, data: UpgradedServerMemberSummaryPayload) { + super(client, data); + this.serverId = data.serverId; + this.user = data.user; + this.roleIds = data.roleIds; + } + + /** + * Fetch the full member object of this partial member + * + * @returns A promise containing the resolved full member. + */ + fetch(): Promise { + return this.client.members.fetch(this.serverId, this.user.id); + } } /** * Represents a banned member. */ export class MemberBan extends Base { - /** Id this ban was created in */ - serverId: string; - - /** Date this ban was created */ - _createdAt: number; - - /** The ID of user who banned this person */ - createdById: string; - - /** The reason this user was banned */ - reason: string | null; - - /** Information about the target user */ - target: UserSummaryPayload; - - /** - * Creates a new instance of `MemberBan`. - * - * @param client - The Guilded client instance. - * @param data - The data for this member ban. - */ - constructor(client: Client, data: UpgradedServerMemberBanPayload) { - const transformedBanId = buildMemberKey(data.serverId, data.user.id); - super(client, { ...data, id: transformedBanId }); - - this.serverId = data.serverId; - this._createdAt = parseToStamp(data.createdAt)!; - this.createdById = data.createdBy; - this.target = data.user; - this.reason = data.reason ?? null; - } - - /** - * Gets the creation date of this ban. - * - * @returns The creation date of this ban. - */ - get createdAt(): Date { - return new Date(this._createdAt); - } - - /** - * Gets the user who banned this member. - * - * @returns The user who banned this member, or `null` if the user is not cached. - */ - get author(): User | null { - return this.client.users.cache.get(this.createdById) ?? null; - } - - /** - * Removes this ban. - * - * @returns A Promise that resolves to the unbanned member or `null` if the member is not cached. - */ - unban(): Promise { - return this.client.bans.unban(this.serverId, this.target.id); - } + /** Id this ban was created in */ + serverId: string; + + /** Date this ban was created */ + _createdAt: number; + + /** The ID of user who banned this person */ + createdById: string; + + /** The reason this user was banned */ + reason: string | null; + + /** Information about the target user */ + target: UserSummaryPayload; + + /** + * Creates a new instance of `MemberBan`. + * + * @param client - The Guilded client instance. + * @param data - The data for this member ban. + */ + constructor(client: Client, data: UpgradedServerMemberBanPayload) { + const transformedBanId = buildMemberKey(data.serverId, data.user.id); + super(client, { + ...data, + id: transformedBanId, + }); + + this.serverId = data.serverId; + this._createdAt = parseToStamp(data.createdAt)!; + this.createdById = data.createdBy; + this.target = data.user; + this.reason = data.reason ?? null; + } + + /** + * Gets the creation date of this ban. + * + * @returns The creation date of this ban. + */ + get createdAt(): Date { + return new Date(this._createdAt); + } + + /** + * Gets the user who banned this member. + * + * @returns The user who banned this member, or `null` if the user is not cached. + */ + get author(): User | null { + return this.client.users.cache.get(this.createdById) ?? null; + } + + /** + * Removes this ban. + * + * @returns A Promise that resolves to the unbanned member or `null` if the member is not cached. + */ + unban(): Promise { + return this.client.bans.unban(this.serverId, this.target.id); + } } diff --git a/packages/guilded.js/lib/structures/Message.ts b/packages/guilded.js/lib/structures/Message.ts index 6dc9668c..c61bfa05 100644 --- a/packages/guilded.js/lib/structures/Message.ts +++ b/packages/guilded.js/lib/structures/Message.ts @@ -12,311 +12,320 @@ import type { ThreadChannel } from "./channels/ThreadChannel"; import type { CollectorOptions, CollectorReturnValue } from "./collectors/Collector"; export enum MessageType { - Default, - System, + Default = 0, + System = 1, } export class Message extends Base { - /** The ID of the channel */ - readonly channelId: string; + /** The ID of the channel */ + readonly channelId: string; - /** The ID of the server this message belongs to */ - readonly serverId: string | null; + /** The ID of the server this message belongs to */ + readonly serverId: string | null; - /** The ID of the group this message was posted in */ - readonly groupId: string | null; - - /** The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. */ - readonly type: MessageType; - - /** The content of the message */ - content: string; - - /** The mentions within this message */ - mentions?: MentionsPayload; - - /** The ID of the messages that this is replying to. */ - readonly replyMessageIds: string[] = []; - - /** If set, this message will only be seen by those mentioned or replied to. */ - readonly isPrivate: boolean; - - /** If set, this message did not notify, mention or reply recipients. */ - readonly isSilent: boolean; - - /** The ID of the user who created this message (Note: If this event has createdByBotId or createdByWebhookId present, this field will still be populated, but can be ignored. In these cases, the value of this field will always be Ann6LewA) */ - readonly createdById: string; - - /** Bool value to wether message is a reply or not */ - readonly isReply: boolean; - - /** The ID of the webhook who created this message, if it was created by a webhook */ - readonly createdByWebhookId: string | null; - - /** The timestamp that the message was created at. */ - readonly _createdAt: number; - - /** The timestamp that the message was updated at, if relevant */ - _updatedAt: number | null; - - /** Whether the message has been deleted */ - deleted = false; - - /** When the message was deleted, if it was */ - _deletedAt: number | null = null; - - /** Embeds contained within this message */ - embeds: Embed[] = []; - - constructor(client: Client, data: ChatMessagePayload) { - super(client, data); - this.isReply = Boolean(data.replyMessageIds); - this.channelId = data.channelId; - this.groupId = data.groupId ?? null; - this.content = data.content ?? ""; - this.serverId = data.serverId ?? null; - this.replyMessageIds = data.replyMessageIds ?? []; - this.createdById = data.createdBy; - this.createdByWebhookId = data.createdByWebhookId ?? null; - this._createdAt = parseToStamp(data.createdAt)!; - this._updatedAt = null; - this.isPrivate = data.isPrivate ?? false; - this.isSilent = data.isSilent ?? false; - this.type = data.type === "system" ? MessageType.System : MessageType.Default; - - this._update(data); - } - - /** Update details of this structure */ - _update(data: Partial | { deletedAt: string }): this { - if ("content" in data && typeof data.content !== "undefined") { - this.content = data.content; - } - - if ("mentions" in data) { - this.mentions = data.mentions; - } - - if ("updatedAt" in data) { - this._updatedAt = parseToStamp(data.updatedAt); - } - - if ("deletedAt" in data) { - this.deleted = true; - this._deletedAt = parseToStamp(data.deletedAt); - } - - if ("embeds" in data) { - this.embeds = data.embeds?.map((x) => new Embed(x)) ?? []; - } - - return this; - } - - get createdAt(): Date { - return new Date(this._createdAt); - } - - /** - * Returns the date and time the message was last updated, if relevant. - */ - get updatedAt(): Date | null { - return this._updatedAt ? new Date(this._updatedAt) : null; - } - - /** - * Returns the date and time the message was deleted, if it was. - */ - get deletedAt(): Date | null { - return this._deletedAt ? new Date(this._deletedAt) : null; - } - - /** Returns the url of this message */ - get url(): string { - if (!this.serverId) return ""; - return `https://www.guilded.gg/chat/${this.channelId}?messageId=${this.id}`; - } - - /** - * Returns the author of this message, or null if the author is not cached. - */ - get author(): User | null { - return this.client.users.cache.get(this.createdById) ?? null; - } - - /** - * Returns the ID of the user who sent this message. - */ - get authorId(): string { - return this.createdByWebhookId ?? this.createdById; - } - - /** - * Returns the member of this message, if the message is in a server, or null otherwise or if the member is not cached. - */ - get member(): Member | null { - return this.serverId ? this.client.members.cache.get(buildMemberKey(this.serverId, this.authorId)) ?? null : null; - } - - /** - * Returns the channel that this message belongs to, or null if the channel is not cached. - */ - get channel(): Channel | null { - return this.client.channels.cache.get(this.channelId) ?? null; - } - - get server(): Server | null { - return this.serverId ? this.client.servers.cache.get(this.serverId) ?? null : null; - } - - /** - * Edit message content. - * - * @param newContent - The new content of the message. - * @returns A promise that resolves with the updated message. - */ - async edit(newContent: MessageContent): Promise { - return this.client.messages.update(this.channelId, this.id, newContent); - } - - /** - * Send a message in the same channel as this message. - * - * @param content - The content of the message. - * @example - * let replyObj = { - * content: 'This is text, supports **markdown**.', - * embeds: [{ - * title: 'This is an embed title!', - * description: 'A description may go here' - * }] - * }; - * message.send(replyObj) - */ - send(content: MessageContent): Promise { - return this.client.messages.send(this.channelId, content); - } - - /** - * Send a message that replies to this message. It mentions the user who sent this message. - * - * @param content - The content of the message to send. - * @example - * let replyObj = { - * content: 'This is text, supports **markdown**.', - * embeds: [{ - * title: 'This is an embed title!', - * description: 'A description may go here' - * }] - * }; - * message.reply(replyObj) - */ - reply(content: MessageContent): Promise { - return this.client.messages.send(this.channelId, { - ...resolveContentToData(content), - replyMessageIds: [this.id], - }); - } - - createThread(name: string): Promise { - return this.client.channels.create({ - name, - messageId: this.id, - type: "chat", - }) as Promise; - } - - awaitReactions(options: CollectorOptions): Promise> { - return this.client.reactions.awaitReactions(this.id, options); - } - - /** - * Add a reaction emote. - * - * @param emoteId - The ID of the emote to add. - * @returns A promise that resolves when the emote has been added. - */ - async addReaction(emoteId: number): Promise { - return this.client.rest.router.reactions.channelMessageReactionCreate({ - channelId: this.channelId, - messageId: this.id, - emoteId, - }); - } - - /** - * Deletes either a whole reaction emote from a message or a specific user's if a userId is provided. - * - * @param emoteId - The ID of the emote to delete. - * @returns A promise that resolves when the emote has been deleted. - */ - deleteReaction(emoteId: number, userId?: string): Promise { - return this.client.rest.router.reactions.channelMessageReactionDelete({ - channelId: this.channelId, - messageId: this.id, - emoteId, - userId, - }); - } - - /** - * Delete this message. - * - * @returns A promise that resolves when the message has been deleted. - */ - delete(): Promise { - return this.client.messages.delete(this.channelId, this.id); - } + /** The ID of the group this message was posted in */ + readonly groupId: string | null; + + /** The type of chat message. "system" messages are generated by Guilded, while "default" messages are user or bot-generated. */ + readonly type: MessageType; + + /** The content of the message */ + content: string; + + /** The mentions within this message */ + mentions?: MentionsPayload; + + /** The ID of the messages that this is replying to. */ + readonly replyMessageIds: string[] = []; + + /** If set, this message will only be seen by those mentioned or replied to. */ + readonly isPrivate: boolean; + + /** If set, this message did not notify, mention or reply recipients. */ + readonly isSilent: boolean; + + /** The ID of the user who created this message (Note: If this event has createdByBotId or createdByWebhookId present, this field will still be populated, but can be ignored. In these cases, the value of this field will always be Ann6LewA) */ + readonly createdById: string; + + /** Bool value to wether message is a reply or not */ + readonly isReply: boolean; + + /** The ID of the webhook who created this message, if it was created by a webhook */ + readonly createdByWebhookId: string | null; + + /** The timestamp that the message was created at. */ + readonly _createdAt: number; + + /** The timestamp that the message was updated at, if relevant */ + _updatedAt: number | null; + + /** Whether the message has been deleted */ + deleted = false; + + /** When the message was deleted, if it was */ + _deletedAt: number | null = null; + + /** Embeds contained within this message */ + embeds: Embed[] = []; + + constructor(client: Client, data: ChatMessagePayload) { + super(client, data); + this.isReply = Boolean(data.replyMessageIds); + this.channelId = data.channelId; + this.groupId = data.groupId ?? null; + this.content = data.content ?? ""; + this.serverId = data.serverId ?? null; + this.replyMessageIds = data.replyMessageIds ?? []; + this.createdById = data.createdBy; + this.createdByWebhookId = data.createdByWebhookId ?? null; + this._createdAt = parseToStamp(data.createdAt)!; + this._updatedAt = null; + this.isPrivate = data.isPrivate ?? false; + this.isSilent = data.isSilent ?? false; + this.type = data.type === "system" ? MessageType.System : MessageType.Default; + + this._update(data); + } + + /** Update details of this structure */ + _update( + data: + | Partial + | { + deletedAt: string; + }, + ): this { + if ("content" in data && typeof data.content !== "undefined") { + this.content = data.content; + } + + if ("mentions" in data) { + this.mentions = data.mentions; + } + + if ("updatedAt" in data) { + this._updatedAt = parseToStamp(data.updatedAt); + } + + if ("deletedAt" in data) { + this.deleted = true; + this._deletedAt = parseToStamp(data.deletedAt); + } + + if ("embeds" in data) { + this.embeds = data.embeds?.map((x) => new Embed(x)) ?? []; + } + + return this; + } + + get createdAt(): Date { + return new Date(this._createdAt); + } + + /** + * Returns the date and time the message was last updated, if relevant. + */ + get updatedAt(): Date | null { + return this._updatedAt ? new Date(this._updatedAt) : null; + } + + /** + * Returns the date and time the message was deleted, if it was. + */ + get deletedAt(): Date | null { + return this._deletedAt ? new Date(this._deletedAt) : null; + } + + /** Returns the url of this message */ + get url(): string { + if (!this.serverId) return ""; + return `https://www.guilded.gg/chat/${this.channelId}?messageId=${this.id}`; + } + + /** + * Returns the author of this message, or null if the author is not cached. + */ + get author(): User | null { + return this.client.users.cache.get(this.createdById) ?? null; + } + + /** + * Returns the ID of the user who sent this message. + */ + get authorId(): string { + return this.createdByWebhookId ?? this.createdById; + } + + /** + * Returns the member of this message, if the message is in a server, or null otherwise or if the member is not cached. + */ + get member(): Member | null { + return this.serverId ? this.client.members.cache.get(buildMemberKey(this.serverId, this.authorId)) ?? null : null; + } + + /** + * Returns the channel that this message belongs to, or null if the channel is not cached. + */ + get channel(): Channel | null { + return this.client.channels.cache.get(this.channelId) ?? null; + } + + get server(): Server | null { + return this.serverId ? this.client.servers.cache.get(this.serverId) ?? null : null; + } + + /** + * Edit message content. + * + * @param newContent - The new content of the message. + * @returns A promise that resolves with the updated message. + */ + async edit(newContent: MessageContent): Promise { + return this.client.messages.update(this.channelId, this.id, newContent); + } + + /** + * Send a message in the same channel as this message. + * + * @param content - The content of the message. + * @example + * let replyObj = { + * content: 'This is text, supports **markdown**.', + * embeds: [{ + * title: 'This is an embed title!', + * description: 'A description may go here' + * }] + * }; + * message.send(replyObj) + */ + send(content: MessageContent): Promise { + return this.client.messages.send(this.channelId, content); + } + + /** + * Send a message that replies to this message. It mentions the user who sent this message. + * + * @param content - The content of the message to send. + * @example + * let replyObj = { + * content: 'This is text, supports **markdown**.', + * embeds: [{ + * title: 'This is an embed title!', + * description: 'A description may go here' + * }] + * }; + * message.reply(replyObj) + */ + reply(content: MessageContent): Promise { + return this.client.messages.send(this.channelId, { + ...resolveContentToData(content), + replyMessageIds: [this.id], + }); + } + + createThread(name: string): Promise { + return this.client.channels.create({ + name, + messageId: this.id, + type: "chat", + }) as Promise; + } + + awaitReactions(options: CollectorOptions): Promise> { + return this.client.reactions.awaitReactions(this.id, options); + } + + /** + * Add a reaction emote. + * + * @param emoteId - The ID of the emote to add. + * @returns A promise that resolves when the emote has been added. + */ + async addReaction(emoteId: number): Promise { + return this.client.rest.router.reactions.channelMessageReactionCreate({ + channelId: this.channelId, + messageId: this.id, + emoteId, + }); + } + + /** + * Deletes either a whole reaction emote from a message or a specific user's if a userId is provided. + * + * @param emoteId - The ID of the emote to delete. + * @returns A promise that resolves when the emote has been deleted. + */ + deleteReaction(emoteId: number, userId?: string): Promise { + return this.client.rest.router.reactions.channelMessageReactionDelete({ + channelId: this.channelId, + messageId: this.id, + emoteId, + userId, + }); + } + + /** + * Delete this message. + * + * @returns A promise that resolves when the message has been deleted. + */ + delete(): Promise { + return this.client.messages.delete(this.channelId, this.id); + } } /** * Represents a reaction to a message. */ export class MessageReaction extends Base { - /** - * The ID of the channel where the message was sent. - */ - readonly channelId: string; - - /** - * The ID of the message this reaction belongs to. - */ - readonly messageId: string; - - /** - * The ID of the user who created the reaction. - */ - readonly createdBy: string; - - /** - * The emote associated with this reaction. - */ - readonly emote: EmotePayload; - - /** - * The ID of the server where the reaction was made. - */ - readonly serverId: string; - - /** - * Creates a new instance of the MessageReaction class. - * - * @param client The client that instantiated this object. - * @param data The data representing the reaction. - */ - constructor(client: Client, data: FlattenedReactionData) { - const formedId = buildReactionKey(data.createdBy, data.emote.id); - super(client, { ...data, id: formedId }); - - this.id = formedId; - this.channelId = data.channelId; - this.messageId = data.messageId; - this.createdBy = data.createdBy; - this.emote = data.emote; - this.serverId = data.serverId; - } + /** + * The ID of the channel where the message was sent. + */ + readonly channelId: string; + + /** + * The ID of the message this reaction belongs to. + */ + readonly messageId: string; + + /** + * The ID of the user who created the reaction. + */ + readonly createdBy: string; + + /** + * The emote associated with this reaction. + */ + readonly emote: EmotePayload; + + /** + * The ID of the server where the reaction was made. + */ + readonly serverId: string; + + /** + * Creates a new instance of the MessageReaction class. + * + * @param client The client that instantiated this object. + * @param data The data representing the reaction. + */ + constructor(client: Client, data: FlattenedReactionData) { + const formedId = buildReactionKey(data.createdBy, data.emote.id); + super(client, { + ...data, + id: formedId, + }); + + this.id = formedId; + this.channelId = data.channelId; + this.messageId = data.messageId; + this.createdBy = data.createdBy; + this.emote = data.emote; + this.serverId = data.serverId; + } } type FlattenedReactionData = WSPayload<"ChannelMessageReactionCreated">["reaction"] & { - serverId: string; + serverId: string; }; diff --git a/packages/guilded.js/lib/structures/Role.ts b/packages/guilded.js/lib/structures/Role.ts index 88794336..4ec48dd8 100644 --- a/packages/guilded.js/lib/structures/Role.ts +++ b/packages/guilded.js/lib/structures/Role.ts @@ -7,112 +7,112 @@ import type { Client } from "./Client"; * Represents a Guilded role in a server */ export class Role extends Base<{ id: number; serverId: string }, number> { - /** The ID of the server this role belongs to */ - readonly serverId: string; - - /** The date this role was created */ - _createdAt: number; - - /** The date this role was last updated, if it was */ - _updatedAt: number | null; - - /** The name of this role */ - name: string; - - /** Whether this role is hoisted or not */ - isDisplayedSeparately: boolean; - - /** Whether this role is self assignable by members */ - isSelfAssignable: boolean; - - /** Whether this role is mentionable */ - isMentionable: boolean; - - /** The permissions this role has */ - permissions: string[]; - - /** The colors belonging to this role. If a solid color role, then there will be just one color in this array. Otherwise, the first color is the solid color, and second is a gradient. */ - colors: number[]; - - /** The URL of the role's icon */ - icon: string | null; - - /** The position of this role on the hierarchy */ - position: number; - - /** Whether this is the default role for members */ - isBase: boolean; - - /** The bot user ID this role has been defined for. */ - botUserId: string | null; - - /** - * @param client - The client instance - * @param data - The data for this role - */ - constructor(client: Client, data: RolePayload) { - super(client, data); - this.serverId = data.serverId; - this._createdAt = parseToStamp(data.createdAt)!; - this._updatedAt = null; - this.name = data.name; - this.isDisplayedSeparately = data.isDisplayedSeparately ?? false; - this.isSelfAssignable = data.isSelfAssignable ?? false; - this.isMentionable = data.isMentionable ?? false; - this.permissions = data.permissions; - this.colors = data.colors ?? []; - this.icon = data.icon ?? null; - this.position = data.position; - this.isBase = data.isBase ?? false; - this.botUserId = data.botUserId ?? null; - } - - _update(data: RolePayload): this { - if ("updatedAt" in data) { - this._updatedAt = data.updatedAt ? parseToStamp(data.updatedAt) : null; - } - - return this; - } - - get createdAt(): Date { - return new Date(this._createdAt); - } - - /** - * Returns the date and time the message was last updated, if relevant. - */ - get updatedAt(): Date | null { - return this._updatedAt ? new Date(this._updatedAt) : null; - } - - /** - * Award XP to a role - * - * @param amount - The amount of XP to award to the role - * @returns A Promise that resolves to the new total XP of the role - */ - giveXP(amount: number): Promise { - return this.client.roles.giveXP(this.serverId, this.id, amount); - } - - /** - * Assign role to member - * - * @param memberId - The ID of the member to assign the role to - * @returns A Promise that resolves when the role has been assigned to the member - */ - assignToMember(memberId: string): Promise { - return this.client.roles.addRoleToMember(this.serverId, memberId, this.id); - } - - /** - * Remove role from member - * - * @param memberId - The ID of the member to remove the role from - * @returns A Promise that resolves when the role has been removed from the member - */ - removeFromMember(memberId: string): Promise { - return this.client.roles.removeRoleFromMember(this.serverId, memberId, this.id); - } + /** The ID of the server this role belongs to */ + readonly serverId: string; + + /** The date this role was created */ + _createdAt: number; + + /** The date this role was last updated, if it was */ + _updatedAt: number | null; + + /** The name of this role */ + name: string; + + /** Whether this role is hoisted or not */ + isDisplayedSeparately: boolean; + + /** Whether this role is self assignable by members */ + isSelfAssignable: boolean; + + /** Whether this role is mentionable */ + isMentionable: boolean; + + /** The permissions this role has */ + permissions: string[]; + + /** The colors belonging to this role. If a solid color role, then there will be just one color in this array. Otherwise, the first color is the solid color, and second is a gradient. */ + colors: number[]; + + /** The URL of the role's icon */ + icon: string | null; + + /** The position of this role on the hierarchy */ + position: number; + + /** Whether this is the default role for members */ + isBase: boolean; + + /** The bot user ID this role has been defined for. */ + botUserId: string | null; + + /** + * @param client - The client instance + * @param data - The data for this role + */ + constructor(client: Client, data: RolePayload) { + super(client, data); + this.serverId = data.serverId; + this._createdAt = parseToStamp(data.createdAt)!; + this._updatedAt = null; + this.name = data.name; + this.isDisplayedSeparately = data.isDisplayedSeparately ?? false; + this.isSelfAssignable = data.isSelfAssignable ?? false; + this.isMentionable = data.isMentionable ?? false; + this.permissions = data.permissions; + this.colors = data.colors ?? []; + this.icon = data.icon ?? null; + this.position = data.position; + this.isBase = data.isBase ?? false; + this.botUserId = data.botUserId ?? null; + } + + _update(data: RolePayload): this { + if ("updatedAt" in data) { + this._updatedAt = data.updatedAt ? parseToStamp(data.updatedAt) : null; + } + + return this; + } + + get createdAt(): Date { + return new Date(this._createdAt); + } + + /** + * Returns the date and time the message was last updated, if relevant. + */ + get updatedAt(): Date | null { + return this._updatedAt ? new Date(this._updatedAt) : null; + } + + /** + * Award XP to a role + * + * @param amount - The amount of XP to award to the role + * @returns A Promise that resolves to the new total XP of the role + */ + giveXP(amount: number): Promise { + return this.client.roles.giveXP(this.serverId, this.id, amount); + } + + /** + * Assign role to member + * + * @param memberId - The ID of the member to assign the role to + * @returns A Promise that resolves when the role has been assigned to the member + */ + assignToMember(memberId: string): Promise { + return this.client.roles.addRoleToMember(this.serverId, memberId, this.id); + } + + /** + * Remove role from member + * + * @param memberId - The ID of the member to remove the role from + * @returns A Promise that resolves when the role has been removed from the member + */ + removeFromMember(memberId: string): Promise { + return this.client.roles.removeRoleFromMember(this.serverId, memberId, this.id); + } } diff --git a/packages/guilded.js/lib/structures/Server.ts b/packages/guilded.js/lib/structures/Server.ts index 7ef9d4c7..a7eff85d 100644 --- a/packages/guilded.js/lib/structures/Server.ts +++ b/packages/guilded.js/lib/structures/Server.ts @@ -9,127 +9,127 @@ import type { Channel } from "./channels"; * A class representing a Guilded server. */ export class Server extends Base { - /** The ID of the owner of this server */ - ownerId: string; + /** The ID of the owner of this server */ + ownerId: string; - /** The type of this server */ - type!: ServerType | null; + /** The type of this server */ + type!: ServerType | null; - /** The name of this server */ - name!: string; + /** The name of this server */ + name!: string; - /** The slug of the URL this server is accessible from */ - shortURL!: string; + /** The slug of the URL this server is accessible from */ + shortURL!: string; - /** The description of this server */ - description!: string | null; + /** The description of this server */ + description!: string | null; - /** The icon of this server */ - iconURL!: string | null; + /** The icon of this server */ + iconURL!: string | null; - /** The banner of this server */ - bannerURL!: string | null; + /** The banner of this server */ + bannerURL!: string | null; - /** The timezone this server is in */ - timezone!: string | null; + /** The timezone this server is in */ + timezone!: string | null; - /** Whether this server is verified or not */ - isVerified!: boolean; + /** Whether this server is verified or not */ + isVerified!: boolean; - /** The default channel of this server */ - defaultChannelId!: string; + /** The default channel of this server */ + defaultChannelId!: string; - /** The date this server was created */ - _createdAt!: number; + /** The date this server was created */ + _createdAt!: number; - constructor(client: Client, data: ServerPayload) { - super(client, data); - this.ownerId = data.ownerId; - this._createdAt = parseToStamp(data.createdAt)!; - this._update(data); - } + constructor(client: Client, data: ServerPayload) { + super(client, data); + this.ownerId = data.ownerId; + this._createdAt = parseToStamp(data.createdAt)!; + this._update(data); + } - /** The date when the server was created. */ - get createdAt(): Date { - return new Date(this._createdAt); - } + /** The date when the server was created. */ + get createdAt(): Date { + return new Date(this._createdAt); + } - /** The URL of the server. */ - get url(): string { - return `https://www.guilded.gg/${this.shortURL}`; - } + /** The URL of the server. */ + get url(): string { + return `https://www.guilded.gg/${this.shortURL}`; + } - /** The owner of the server. */ - get owner(): Member | null { - return this.client.members.cache.get(buildMemberKey(this.id, this.ownerId)) ?? null; - } + /** The owner of the server. */ + get owner(): Member | null { + return this.client.members.cache.get(buildMemberKey(this.id, this.ownerId)) ?? null; + } - /** The default channel of the server. */ - get defaultChannel(): Channel | null { - return this.defaultChannelId ? this.client.channels.cache.get(this.defaultChannelId) ?? null : null; - } + /** The default channel of the server. */ + get defaultChannel(): Channel | null { + return this.defaultChannelId ? this.client.channels.cache.get(this.defaultChannelId) ?? null : null; + } - _update(data: Partial): this { - if ("name" in data && typeof data.name !== "undefined") { - this.name = data.name; - } + _update(data: Partial): this { + if ("name" in data && typeof data.name !== "undefined") { + this.name = data.name; + } - if ("type" in data && typeof data.type !== "undefined") { - this.type = ServerTypeMap[data.type] ?? null; - } + if ("type" in data && typeof data.type !== "undefined") { + this.type = ServerTypeMap[data.type] ?? null; + } - if ("url" in data && typeof data.url !== "undefined") { - this.shortURL = data.url ?? null; - } + if ("url" in data && typeof data.url !== "undefined") { + this.shortURL = data.url ?? null; + } - if ("about" in data && typeof data.about !== "undefined") { - this.description = data.about ?? null; - } + if ("about" in data && typeof data.about !== "undefined") { + this.description = data.about ?? null; + } - if ("avatar" in data && typeof data.avatar !== "undefined") { - this.iconURL = data.avatar ?? null; - } + if ("avatar" in data && typeof data.avatar !== "undefined") { + this.iconURL = data.avatar ?? null; + } - if ("bannerURL" in data && typeof data.banner !== "undefined") { - this.bannerURL = data.banner ?? null; - } + if ("bannerURL" in data && typeof data.banner !== "undefined") { + this.bannerURL = data.banner ?? null; + } - if ("timezone" in data && typeof data.timezone !== "undefined") { - this.timezone = data.timezone ?? null; - } + if ("timezone" in data && typeof data.timezone !== "undefined") { + this.timezone = data.timezone ?? null; + } - if ("isVerified" in data && typeof data.isVerified !== "undefined") { - this.isVerified = data.isVerified ?? false; - } + if ("isVerified" in data && typeof data.isVerified !== "undefined") { + this.isVerified = data.isVerified ?? false; + } - if ("defaultChannelId" in data && typeof data.defaultChannelId !== "undefined") { - this.defaultChannelId = data.defaultChannelId ?? null; - } + if ("defaultChannelId" in data && typeof data.defaultChannelId !== "undefined") { + this.defaultChannelId = data.defaultChannelId ?? null; + } - return this; - } + return this; + } } /** The type of a Guilded server. */ export enum ServerType { - Team, - Organization, - Community, - Clan, - Guild, - Friends, - Streaming, - Other, + Team = 0, + Organization = 1, + Community = 2, + Clan = 3, + Guild = 4, + Friends = 5, + Streaming = 6, + Other = 7, } /** A mapping of server types from the API to the client. */ export const ServerTypeMap: Record, ServerType> = { - team: ServerType.Team, - organization: ServerType.Organization, - community: ServerType.Community, - clan: ServerType.Clan, - guild: ServerType.Guild, - friends: ServerType.Friends, - streaming: ServerType.Streaming, - other: ServerType.Other, + team: ServerType.Team, + organization: ServerType.Organization, + community: ServerType.Community, + clan: ServerType.Clan, + guild: ServerType.Guild, + friends: ServerType.Friends, + streaming: ServerType.Streaming, + other: ServerType.Other, }; diff --git a/packages/guilded.js/lib/structures/Subscription.ts b/packages/guilded.js/lib/structures/Subscription.ts index 4dafff82..0d71ef64 100644 --- a/packages/guilded.js/lib/structures/Subscription.ts +++ b/packages/guilded.js/lib/structures/Subscription.ts @@ -12,39 +12,42 @@ export type ServerSubscriptionTierType = "Copper" | "Gold" | "Silver"; * Represents a Guilded SubscriptionTier in a server. */ export class ServerSubscriptionTier extends Base { - /** The ID of the server */ - readonly serverId: string; - - /** The ISO 8601 timestamp that the server subscription tier was created at */ - _createdAt: number; - - /** The type of the server subscription tier. This field is case sensitive!! */ - type: ServerSubscriptionTierType; - - /** The description associated with the server subscription tier (max length 256) */ - description: string | null; - - /** The ID of the role */ - roleId: number | null; - - /** The cost of the tier in cents USD per month (min 200; max 10000) */ - cost: number; - - /** - * @param client The client instance - * @param data The data for this role - */ - constructor(client: Client, data: ServerSubscriptionTierPayload) { - super(client, { id: data.type, ...data }); - this.serverId = data.serverId; - this._createdAt = parseToStamp(data.createdAt)!; - this.description = data.description ?? null; - this.roleId = data.roleId ?? null; - this.cost = data.cost; - this.type = data.type; - } - - get createdAt(): Date { - return new Date(this._createdAt); - } + /** The ID of the server */ + readonly serverId: string; + + /** The ISO 8601 timestamp that the server subscription tier was created at */ + _createdAt: number; + + /** The type of the server subscription tier. This field is case sensitive!! */ + type: ServerSubscriptionTierType; + + /** The description associated with the server subscription tier (max length 256) */ + description: string | null; + + /** The ID of the role */ + roleId: number | null; + + /** The cost of the tier in cents USD per month (min 200; max 10000) */ + cost: number; + + /** + * @param client The client instance + * @param data The data for this role + */ + constructor(client: Client, data: ServerSubscriptionTierPayload) { + super(client, { + id: data.type, + ...data, + }); + this.serverId = data.serverId; + this._createdAt = parseToStamp(data.createdAt)!; + this.description = data.description ?? null; + this.roleId = data.roleId ?? null; + this.cost = data.cost; + this.type = data.type; + } + + get createdAt(): Date { + return new Date(this._createdAt); + } } diff --git a/packages/guilded.js/lib/structures/User.ts b/packages/guilded.js/lib/structures/User.ts index 2ef901bc..1c52023b 100644 --- a/packages/guilded.js/lib/structures/User.ts +++ b/packages/guilded.js/lib/structures/User.ts @@ -4,72 +4,75 @@ import { Base } from "./Base"; import type { Client } from "./Client"; export class User extends Base { - /** The name for this user */ - name: string; + /** The name for this user */ + name: string; - /** The type of this user */ - readonly type: UserType; + /** The type of this user */ + readonly type: UserType; - /** The avatar image associated with this user */ - avatar: string | null = null; + /** The avatar image associated with this user */ + avatar: string | null = null; - /** The banner image associated with this user */ - banner: string | null = null; + /** The banner image associated with this user */ + banner: string | null = null; - /** When this user was created */ - readonly _createdAt: number | null; + /** When this user was created */ + readonly _createdAt: number | null; - constructor(client: Client, data: UserPayload) { - super(client, data); - this.name = data.name; - this._createdAt = parseToStamp(data.createdAt)!; - this.type = data.type === "bot" ? UserType.Bot : UserType.User; + constructor(client: Client, data: UserPayload) { + super(client, data); + this.name = data.name; + this._createdAt = parseToStamp(data.createdAt)!; + this.type = data.type === "bot" ? UserType.Bot : UserType.User; - this._update(data); - } + this._update(data); + } - get createdAt(): Date | null { - return this._createdAt ? new Date(this._createdAt) : null; - } + get createdAt(): Date | null { + return this._createdAt ? new Date(this._createdAt) : null; + } - _update(data: Partial): this { - if ("avatar" in data) { - this.avatar = data.avatar ?? null; - } + _update(data: Partial): this { + if ("avatar" in data) { + this.avatar = data.avatar ?? null; + } - if ("banner" in data) { - this.banner = data.banner ?? null; - } + if ("banner" in data) { + this.banner = data.banner ?? null; + } - return this; - } + return this; + } } export class ClientUser extends User { - // User who has created this bot - readonly createdBy: string; - - // The bot ID (not to be confused with the user ID) of this bot - readonly botId: string; - - constructor( - client: Client, - data: WSPayload<"_WelcomeMessage">["user"] & { - createdBy: string; - botId: string; - }, - ) { - super(client, { ...data, type: "bot" }); - this.createdBy = data.createdBy; - this.botId = data.botId; - } - - fetch(): Promise { - return this.client.users.fetchClient(); - } + // User who has created this bot + readonly createdBy: string; + + // The bot ID (not to be confused with the user ID) of this bot + readonly botId: string; + + constructor( + client: Client, + data: WSPayload<"_WelcomeMessage">["user"] & { + createdBy: string; + botId: string; + }, + ) { + super(client, { + ...data, + type: "bot", + }); + this.createdBy = data.createdBy; + this.botId = data.botId; + } + + fetch(): Promise { + return this.client.users.fetchClient(); + } } export enum UserType { - Bot, - User, + Bot = 0, + User = 1, } diff --git a/packages/guilded.js/lib/structures/Webhook.ts b/packages/guilded.js/lib/structures/Webhook.ts index 8ac8c38c..27b589cb 100644 --- a/packages/guilded.js/lib/structures/Webhook.ts +++ b/packages/guilded.js/lib/structures/Webhook.ts @@ -9,104 +9,104 @@ import type { User } from "./User"; * Object representing received webhook data. This object is NOT to be used to send data to webhooks. That would be WebhookClient */ export class Webhook extends Base { - /** - * The username belonging to this webhook - */ - name!: string; + /** + * The username belonging to this webhook + */ + name!: string; - /** - * The ID of the channel this webhook belongs to - */ - channelID!: string; + /** + * The ID of the channel this webhook belongs to + */ + channelID!: string; - /** - * The ID of the server this webhook belongs to - */ - readonly serverId: string; + /** + * The ID of the server this webhook belongs to + */ + readonly serverId: string; - /** - * The date in which this webhook was created - */ - _createdAt: number; + /** + * The date in which this webhook was created + */ + _createdAt: number; - /** - * The date this webhook was deleted if it was deleted - */ - _deletedAt: number | null = null; + /** + * The date this webhook was deleted if it was deleted + */ + _deletedAt: number | null = null; - /** - * The user who created this webhook - */ - readonly authorID: string; + /** + * The user who created this webhook + */ + readonly authorID: string; - /** - * The token of this webhook - */ - token!: string | null; + /** + * The token of this webhook + */ + token!: string | null; - constructor(client: Client, data: WebhookPayload) { - super(client, data); - this.serverId = data.serverId; - this._createdAt = parseToStamp(data.createdAt)!; - this.authorID = data.createdBy; - this._update(data); - } + constructor(client: Client, data: WebhookPayload) { + super(client, data); + this.serverId = data.serverId; + this._createdAt = parseToStamp(data.createdAt)!; + this.authorID = data.createdBy; + this._update(data); + } - /** - * Returns the creation date of this webhook - * - * @returns The creation date of this webhook - */ - get createdAt(): Date { - return new Date(this._createdAt); - } + /** + * Returns the creation date of this webhook + * + * @returns The creation date of this webhook + */ + get createdAt(): Date { + return new Date(this._createdAt); + } - /** - * Returns the deletion date of this webhook if it was deleted - * - * @returns The deletion date of this webhook if it was deleted, otherwise null - */ - get deletedAt(): Date | null { - return this._deletedAt ? new Date(this._deletedAt) : null; - } + /** + * Returns the deletion date of this webhook if it was deleted + * + * @returns The deletion date of this webhook if it was deleted, otherwise null + */ + get deletedAt(): Date | null { + return this._deletedAt ? new Date(this._deletedAt) : null; + } - /** - * Returns the author of this webhook - * - * @returns The author of this webhook, or null if the author is not cached - */ - get user(): User | null { - return this.client.users.cache.get(this.id) ?? null; - } + /** + * Returns the author of this webhook + * + * @returns The author of this webhook, or null if the author is not cached + */ + get user(): User | null { + return this.client.users.cache.get(this.id) ?? null; + } - /** - * Updates this webhook with new options - * - * @param options The new options for this webhook - * @returns A promise that resolves with the updated webhook - */ - update(options: Parameters[2]): Promise { - return this.client.webhooks.update(this.serverId, this.id, options); - } + /** + * Updates this webhook with new options + * + * @param options The new options for this webhook + * @returns A promise that resolves with the updated webhook + */ + update(options: Parameters[2]): Promise { + return this.client.webhooks.update(this.serverId, this.id, options); + } - /** - * Deletes this webhook - * - * @returns A promise that resolves with this webhook after it has been deleted - */ - async delete(): Promise { - await this.client.webhooks.delete(this.serverId, this.id); - return this; - } + /** + * Deletes this webhook + * + * @returns A promise that resolves with this webhook after it has been deleted + */ + async delete(): Promise { + await this.client.webhooks.delete(this.serverId, this.id); + return this; + } - _update(data: Partial): this { - if ("name" in data && data.name !== undefined) this.name = data.name; - if ("channelId" in data && data.channelId !== undefined) this.channelID = data.channelId; - if ("token" in data && data.token !== undefined) this.token = data.token ?? null; - if ("deletedAt" in data && data.deletedAt !== undefined) { - this._deletedAt = data.deletedAt ? parseToStamp(data.deletedAt) : null; - } + _update(data: Partial): this { + if ("name" in data && data.name !== undefined) this.name = data.name; + if ("channelId" in data && data.channelId !== undefined) this.channelID = data.channelId; + if ("token" in data && data.token !== undefined) this.token = data.token ?? null; + if ("deletedAt" in data && data.deletedAt !== undefined) { + this._deletedAt = data.deletedAt ? parseToStamp(data.deletedAt) : null; + } - return this; - } + return this; + } } diff --git a/packages/guilded.js/lib/structures/channels/Channel.ts b/packages/guilded.js/lib/structures/channels/Channel.ts index 8d7e7e88..6ec7f7e3 100644 --- a/packages/guilded.js/lib/structures/channels/Channel.ts +++ b/packages/guilded.js/lib/structures/channels/Channel.ts @@ -10,220 +10,231 @@ import type { Message } from "../Message"; * Represents a channel in a server on Guilded. */ export class Channel extends Base { - /** - * The type of the channel. - */ - type: ChannelType; - - /** - * The name of the channel. - */ - name!: string; - - /** - * The topic of the channel. - */ - topic!: string | null; - - /** - * The timestamp when the channel was created. - */ - _createdAt: number; - - /** - * The user ID of the user who created the channel. - */ - createdBy: string; - - /** - * The timestamp when the channel was last updated. - */ - _updatedAt!: number | null; - - /** - * The ID of the server that the channel belongs to. - */ - serverId: string; - - /** - * The ID of the parent channel. - */ - parentId!: string | null; - - /** - * The ID of the category that the channel belongs to. - */ - categoryId!: number | null; - - /** - * The ID of the group that the channel belongs to. - */ - groupId: string; - - /** - * Whether the channel is public. - */ - isPublic!: boolean; - - /** - * The user ID of the user who archived the channel. - */ - archivedBy!: string | null; - - /** - * The timestamp when the channel was archived. - */ - _archivedAt!: number | null; - - constructor(client: Client, data: ServerChannelPayload & { deleted?: boolean }) { - super(client, data); - this.serverId = data.serverId; - this.type = channelTypeToEnumMap[data.type]; - this._createdAt = parseToStamp(data.createdAt)!; - this.createdBy = data.createdBy; - this.groupId = data.groupId; - - this._update(data); - } - - /** - * The timestamp when the channel was created as a Date object. - */ - get createdAt(): Date { - return new Date(this._createdAt); - } - - /** - * The timestamp when the channel was archived as a Date object, or null if the channel is not archived. - */ - get archivedAt(): Date | null { - return this._archivedAt ? new Date(this._archivedAt) : null; - } - - /** - * The timestamp when the channel was last updated as a Date object, or null if the channel has not been updated. - */ - get updatedAt(): Date | null { - return this._updatedAt ? new Date(this._updatedAt) : null; - } - - _update(data: Partial): this { - if ("name" in data && typeof data.name !== "undefined") { - this.name = data.name; - } - - if ("topic" in data) { - this.topic = data.topic ?? null; - } - - if ("updatedAt" in data && typeof data.updatedAt !== "undefined") { - this._updatedAt = data.updatedAt ? parseToStamp(data.updatedAt) : null; - } - - if ("parentId" in data && typeof data.updatedAt !== "undefined") { - this.parentId = data.parentId ?? null; - } - - if ("categoryId" in data && typeof data.categoryId !== "undefined") { - this.categoryId = data.categoryId ?? null; - } - - if ("isPublic" in data && typeof data.isPublic !== "undefined") { - this.isPublic = data.isPublic ?? false; - } - - if ("archivedBy" in data && typeof data.archivedBy !== "undefined") { - this.archivedBy = data.archivedBy ?? null; - } - - if ("archivedAt" in data && typeof data.archivedAt !== "undefined") { - this._archivedAt = data.archivedAt ? parseToStamp(data.archivedAt) : null; - } - - return this; - } - - /** - * Fetch from the latest 100 messages in the channel. - * - * @param options - Additional options for the message fetch. - */ - fetchMessages(options?: OptionBody): Promise> { - return this.client.messages.fetchMany(this.id, options ?? {}); - } - - /** - * Fetch details for a specific message in the channel. - * - * @param messageId - The ID of the message to fetch. - */ - fetchMessage(messageId: string): Promise { - return this.client.messages.fetch(this.id, messageId); - } - - /** - * Update the channel with new data. - * - * @param options - The new data for the channel. - */ - update(options: OptionBody): Promise { - return this.client.channels.update(this.id, options); - } - - /** - * Delete the channel. - */ - delete(): Promise { - return this.client.channels.delete(this.id); - } - - /** - * Send a message in the channel. - * - * @param content - The content of the message. - * @example - * let replyObj = { - * content: 'This is text, supports **markdown**.', - * embeds: [{ - * title: 'This is an embed title!', - * description: 'A description may go here' - * }] - * }; - * channel.send(replyObj) - */ - send(content: MessageContent): Promise { - return this.client.messages.send(this.id, content); - } + /** + * The type of the channel. + */ + type: ChannelType; + + /** + * The name of the channel. + */ + name!: string; + + /** + * The topic of the channel. + */ + topic!: string | null; + + /** + * The timestamp when the channel was created. + */ + _createdAt: number; + + /** + * The user ID of the user who created the channel. + */ + createdBy: string; + + /** + * The timestamp when the channel was last updated. + */ + _updatedAt!: number | null; + + /** + * The ID of the server that the channel belongs to. + */ + serverId: string; + + /** + * The ID of the parent channel. + */ + parentId!: string | null; + + /** + * The ID of the category that the channel belongs to. + */ + categoryId!: number | null; + + /** + * The ID of the group that the channel belongs to. + */ + groupId: string; + + /** + * Whether the channel is public. + */ + isPublic!: boolean; + + /** + * The user ID of the user who archived the channel. + */ + archivedBy!: string | null; + + /** + * The timestamp when the channel was archived. + */ + _archivedAt!: number | null; + + constructor( + client: Client, + data: ServerChannelPayload & { + deleted?: boolean; + }, + ) { + super(client, data); + this.serverId = data.serverId; + this.type = channelTypeToEnumMap[data.type]; + this._createdAt = parseToStamp(data.createdAt)!; + this.createdBy = data.createdBy; + this.groupId = data.groupId; + + this._update(data); + } + + /** + * The timestamp when the channel was created as a Date object. + */ + get createdAt(): Date { + return new Date(this._createdAt); + } + + /** + * The timestamp when the channel was archived as a Date object, or null if the channel is not archived. + */ + get archivedAt(): Date | null { + return this._archivedAt ? new Date(this._archivedAt) : null; + } + + /** + * The timestamp when the channel was last updated as a Date object, or null if the channel has not been updated. + */ + get updatedAt(): Date | null { + return this._updatedAt ? new Date(this._updatedAt) : null; + } + + _update( + data: Partial< + ServerChannelPayload & { + deleted?: boolean; + } + >, + ): this { + if ("name" in data && typeof data.name !== "undefined") { + this.name = data.name; + } + + if ("topic" in data) { + this.topic = data.topic ?? null; + } + + if ("updatedAt" in data && typeof data.updatedAt !== "undefined") { + this._updatedAt = data.updatedAt ? parseToStamp(data.updatedAt) : null; + } + + if ("parentId" in data && typeof data.updatedAt !== "undefined") { + this.parentId = data.parentId ?? null; + } + + if ("categoryId" in data && typeof data.categoryId !== "undefined") { + this.categoryId = data.categoryId ?? null; + } + + if ("isPublic" in data && typeof data.isPublic !== "undefined") { + this.isPublic = data.isPublic ?? false; + } + + if ("archivedBy" in data && typeof data.archivedBy !== "undefined") { + this.archivedBy = data.archivedBy ?? null; + } + + if ("archivedAt" in data && typeof data.archivedAt !== "undefined") { + this._archivedAt = data.archivedAt ? parseToStamp(data.archivedAt) : null; + } + + return this; + } + + /** + * Fetch from the latest 100 messages in the channel. + * + * @param options - Additional options for the message fetch. + */ + fetchMessages(options?: OptionBody): Promise> { + return this.client.messages.fetchMany(this.id, options ?? {}); + } + + /** + * Fetch details for a specific message in the channel. + * + * @param messageId - The ID of the message to fetch. + */ + fetchMessage(messageId: string): Promise { + return this.client.messages.fetch(this.id, messageId); + } + + /** + * Update the channel with new data. + * + * @param options - The new data for the channel. + */ + update(options: OptionBody): Promise { + return this.client.channels.update(this.id, options); + } + + /** + * Delete the channel. + */ + delete(): Promise { + return this.client.channels.delete(this.id); + } + + /** + * Send a message in the channel. + * + * @param content - The content of the message. + * @example + * let replyObj = { + * content: 'This is text, supports **markdown**.', + * embeds: [{ + * title: 'This is an embed title!', + * description: 'A description may go here' + * }] + * }; + * channel.send(replyObj) + */ + send(content: MessageContent): Promise { + return this.client.messages.send(this.id, content); + } } /** * Enum for mapping channel types to an int for memory saving. */ export enum ChannelType { - Announcements, - Chat, - Calendar, - Forums, - Media, - Docs, - Voice, - List, - Scheduling, - Stream, + Announcements = 0, + Chat = 1, + Calendar = 2, + Forums = 3, + Media = 4, + Docs = 5, + Voice = 6, + List = 7, + Scheduling = 8, + Stream = 9, } /** * A map of API channel types to channel types. */ export const channelTypeToEnumMap: Record = { - announcements: ChannelType.Announcements, - chat: ChannelType.Chat, - calendar: ChannelType.Calendar, - forums: ChannelType.Forums, - media: ChannelType.Media, - docs: ChannelType.Docs, - voice: ChannelType.Voice, - list: ChannelType.List, - scheduling: ChannelType.Scheduling, - stream: ChannelType.Stream, + announcements: ChannelType.Announcements, + chat: ChannelType.Chat, + calendar: ChannelType.Calendar, + forums: ChannelType.Forums, + media: ChannelType.Media, + docs: ChannelType.Docs, + voice: ChannelType.Voice, + list: ChannelType.List, + scheduling: ChannelType.Scheduling, + stream: ChannelType.Stream, }; diff --git a/packages/guilded.js/lib/structures/channels/ChatChannel.ts b/packages/guilded.js/lib/structures/channels/ChatChannel.ts index 077a33d0..701b362c 100644 --- a/packages/guilded.js/lib/structures/channels/ChatChannel.ts +++ b/packages/guilded.js/lib/structures/channels/ChatChannel.ts @@ -9,13 +9,13 @@ import { Channel } from "./Channel"; * @extends Channel */ export class ChatChannel extends Channel { - /** - * Create a new webhook for this channel. - * - * @param options - The options for creating the webhook. - * @returns A promise that resolves with the created webhook. - */ - createWebhook(options: OptionBody): Promise { - return this.client.webhooks.create(this.serverId, options); - } + /** + * Create a new webhook for this channel. + * + * @param options - The options for creating the webhook. + * @returns A promise that resolves with the created webhook. + */ + createWebhook(options: OptionBody): Promise { + return this.client.webhooks.create(this.serverId, options); + } } diff --git a/packages/guilded.js/lib/structures/channels/DocChannel.ts b/packages/guilded.js/lib/structures/channels/DocChannel.ts index c2f4ad16..60f12223 100644 --- a/packages/guilded.js/lib/structures/channels/DocChannel.ts +++ b/packages/guilded.js/lib/structures/channels/DocChannel.ts @@ -9,58 +9,58 @@ import { Channel } from "./Channel"; * @extends Channel */ export class DocChannel extends Channel { - /** - * The docs in this channel. - */ - readonly docs = new Collection(); + /** + * The docs in this channel. + */ + readonly docs = new Collection(); - /** - * Create a new doc in this channel. - * - * @param options - The options for creating the doc. - * @returns A promise that resolves with the created doc. - */ - createDoc(options: OptionBody): Promise { - return this.client.docs.create(this.id, options); - } + /** + * Create a new doc in this channel. + * + * @param options - The options for creating the doc. + * @returns A promise that resolves with the created doc. + */ + createDoc(options: OptionBody): Promise { + return this.client.docs.create(this.id, options); + } - /** - * Get all the docs from this channel. - * - * @returns A promise that resolves with an array of all docs. - */ - getDocs(): Promise { - return this.client.docs.fetchMany(this.id); - } + /** + * Get all the docs from this channel. + * + * @returns A promise that resolves with an array of all docs. + */ + getDocs(): Promise { + return this.client.docs.fetchMany(this.id); + } - /** - * Get a specific doc from this channel. - * - * @param docId - The ID ofDocPayload the doc to fetch. - * @returns A promise that resolves with the fetched doc. - */ - getDoc(docId: number): Promise { - return this.client.docs.fetch(this.id, docId); - } + /** + * Get a specific doc from this channel. + * + * @param docId - The ID ofDocPayload the doc to fetch. + * @returns A promise that resolves with the fetched doc. + */ + getDoc(docId: number): Promise { + return this.client.docs.fetch(this.id, docId); + } - /** - * Update a specific doc in this channel. - * - * @param docId - The ID of the doc to update. - * @param options - The options for updating the doc. - * @returns A promise that resolves with the updated doc. - */ - updateDoc(docId: number, options: OptionBody): Promise { - return this.client.docs.update(this.id, docId, options); - } + /** + * Update a specific doc in this channel. + * + * @param docId - The ID of the doc to update. + * @param options - The options for updating the doc. + * @returns A promise that resolves with the updated doc. + */ + updateDoc(docId: number, options: OptionBody): Promise { + return this.client.docs.update(this.id, docId, options); + } - /** - * Delete a specific doc from this channel. - * - * @param docId - The ID of the doc to delete. - * @returns A promise that resolves with no data. - */ - deleteDoc(docId: number): Promise { - return this.client.docs.delete(this.id, docId); - } + /** + * Delete a specific doc from this channel. + * + * @param docId - The ID of the doc to delete. + * @returns A promise that resolves with no data. + */ + deleteDoc(docId: number): Promise { + return this.client.docs.delete(this.id, docId); + } } diff --git a/packages/guilded.js/lib/structures/channels/ForumChannel.ts b/packages/guilded.js/lib/structures/channels/ForumChannel.ts index 93235146..aef9fb09 100644 --- a/packages/guilded.js/lib/structures/channels/ForumChannel.ts +++ b/packages/guilded.js/lib/structures/channels/ForumChannel.ts @@ -9,27 +9,30 @@ import { Channel } from "./Channel"; * @extends Channel */ export class ForumChannel extends Channel { - /** The topics in this channel. */ - readonly topics = new Collection(); + /** The topics in this channel. */ + readonly topics = new Collection(); - /** - * Creates a topic in this forum channel. - * - * @param title - The title of the new topic. - * @param content - The content of the new topic. - * @returns A Promise that resolves with the newly created topic payload. - */ - createTopic(title: string, content: string): Promise { - return this.client.topics.create(this.id, { title, content }); - } + /** + * Creates a topic in this forum channel. + * + * @param title - The title of the new topic. + * @param content - The content of the new topic. + * @returns A Promise that resolves with the newly created topic payload. + */ + createTopic(title: string, content: string): Promise { + return this.client.topics.create(this.id, { + title, + content, + }); + } - /** - * Deletes a topic from this forum channel. - * - * @param forumTopicId - The ID of the topic to delete. - * @returns A Promise that resolves when the topic is deleted. - */ - deleteTopic(forumTopicId: number): Promise { - return this.client.topics.delete(this.id, forumTopicId); - } + /** + * Deletes a topic from this forum channel. + * + * @param forumTopicId - The ID of the topic to delete. + * @returns A Promise that resolves when the topic is deleted. + */ + deleteTopic(forumTopicId: number): Promise { + return this.client.topics.delete(this.id, forumTopicId); + } } diff --git a/packages/guilded.js/lib/structures/channels/ListChannel.ts b/packages/guilded.js/lib/structures/channels/ListChannel.ts index 8c33ae6f..07ab4c73 100644 --- a/packages/guilded.js/lib/structures/channels/ListChannel.ts +++ b/packages/guilded.js/lib/structures/channels/ListChannel.ts @@ -8,68 +8,72 @@ import { Channel } from "./Channel"; * @extends Channel */ export class ListChannel extends Channel { - /** - * The list items in this channel. - */ - readonly items = new Collection(); + /** + * The list items in this channel. + */ + readonly items = new Collection(); - /** - * Creates a list item in this channel. - * - * @param message - The message of the new list item. - * @param note - Optional note for the new list item. - * @returns A Promise that resolves with the newly created list item payload. - */ - createItem(message: string, note?: string): Promise { - return this.client.lists.create(this.id, { - message, - note: note ? { content: note } : undefined, - }); - } + /** + * Creates a list item in this channel. + * + * @param message - The message of the new list item. + * @param note - Optional note for the new list item. + * @returns A Promise that resolves with the newly created list item payload. + */ + createItem(message: string, note?: string): Promise { + return this.client.lists.create(this.id, { + message, + note: note + ? { + content: note, + } + : undefined, + }); + } - /** - * Fetches a list item by its ID. - * - * @param itemId - The ID of the list item to fetch. - * @returns A Promise that resolves with the list item payload. - */ - async getItem(itemId: string): Promise { - const data = await this.client.lists.fetch(this.id, itemId); - this.items.set(data.id, data); - return data; - } + /** + * Fetches a list item by its ID. + * + * @param itemId - The ID of the list item to fetch. + * @returns A Promise that resolves with the list item payload. + */ + async getItem(itemId: string): Promise { + const data = await this.client.lists.fetch(this.id, itemId); + this.items.set(data.id, data); + return data; + } - /** - * Fetches all list items in this channel. - * - * @returns A Promise that resolves with an array of list item summary payloads. - */ - async getItems(): Promise { - const data = await this.client.lists.fetchMany(this.id); - for (const item of data) { - this.items.set(item.id, item); - } + /** + * Fetches all list items in this channel. + * + * @returns A Promise that resolves with an array of list item summary payloads. + */ + async getItems(): Promise { + const data = await this.client.lists.fetchMany(this.id); + for (const item of data) { + this.items.set(item.id, item); + } - return data; - } + return data; + } - /** - * Completes a list item. - * - * @param itemId - The ID of the list item to complete. - * @returns A Promise that resolves when the list item is completed. - */ - completeItem(itemId: string): Promise { - return this.client.lists.complete(this.id, itemId); - } + /** + * Completes a list item. + * + * @param itemId - The ID of the list item to complete. + * @returns A Promise that resolves when the list item is completed. + */ + completeItem(itemId: string): Promise { + return this.client.lists.complete(this.id, itemId); + } - /** - * Uncompletes a list item. - * - * @param itemId - The ID of the list item to uncomplete. - * @returns A Promise that resolves when the list item is uncompleted. - */ - uncompleteItem(itemId: string): Promise { - return this.client.lists.uncomplete(this.id, itemId); - } + /** + * Uncompletes a list item. + * + * @param itemId - The ID of the list item to uncomplete. + * @returns A Promise that resolves when the list item is uncompleted. + */ + uncompleteItem(itemId: string): Promise { + return this.client.lists.uncomplete(this.id, itemId); + } } diff --git a/packages/guilded.js/lib/structures/channels/ThreadChannel.ts b/packages/guilded.js/lib/structures/channels/ThreadChannel.ts index 82313348..9198afb3 100644 --- a/packages/guilded.js/lib/structures/channels/ThreadChannel.ts +++ b/packages/guilded.js/lib/structures/channels/ThreadChannel.ts @@ -3,26 +3,26 @@ import type { Client } from "../Client"; import { Channel } from "./Channel"; export class ThreadChannel extends Channel { - /** - * Root channel in the thread hierarchy - */ - rootId: string; + /** + * Root channel in the thread hierarchy + */ + rootId: string; - /** - * Immediate parent channel of this thread - */ - parentId: string; + /** + * Immediate parent channel of this thread + */ + parentId: string; - /** - * Message this thread channel is attached to - */ - messageId: string; + /** + * Message this thread channel is attached to + */ + messageId: string; - constructor(client: Client, data: ServerChannelPayload) { - super(client, data); + constructor(client: Client, data: ServerChannelPayload) { + super(client, data); - this.rootId = data.rootId!; - this.parentId = data.parentId!; - this.messageId = data.messageId!; - } + this.rootId = data.rootId!; + this.parentId = data.parentId!; + this.messageId = data.messageId!; + } } diff --git a/packages/guilded.js/lib/structures/collectors/Collector.ts b/packages/guilded.js/lib/structures/collectors/Collector.ts index b4fe8a9e..ef995a83 100644 --- a/packages/guilded.js/lib/structures/collectors/Collector.ts +++ b/packages/guilded.js/lib/structures/collectors/Collector.ts @@ -10,128 +10,134 @@ import type { Client } from "../Client"; * to have your code wait until further input from a user. */ export abstract class Collector { - /** Collection of successfully collected entries */ - readonly entries = new Collection(); - - /** Whether the collector is actively collecting elements */ - isActive = false; - - /** Method to resolve the promise this collector has when instantiated */ - protected resolve: ((value: CollectorReturnValue) => void) | null = null; - - /** Timeout for max time */ - protected maxTimeout: NodeJS.Timeout | null = null; - - /** Bound function for item receiving */ - protected boundItemReceiver = this.itemReceived.bind(this); - - public emitter = new EventEmitter() as TypedEmitter>; - - constructor(public readonly client: Client, public options: Partial>) { - /** Check if timeLimit is specified */ - if (!options.timeLimit) throw new Error("You must specify a time limit in milliseconds for this collector."); - } - - /** - * Start the collector - * - * @returns A promise that resolves with a `CollectorReturnValue` object - */ - start(): Promise> { - return new Promise((resolve) => { - this.resolve = resolve; - - this.maxTimeout = setTimeout(() => { - this.resolve!({ reason: CollectorEndReasons.TIME, entries: this.entries }); - this._cleanup(); - this.isActive = false; - }, this.options.timeLimit); - - this.hookEvents(); - this.isActive = true; - }); - } - - /** - * Receives an item - * - * @param entry - The item received - * @returns Whether the item passes the filter function or not - */ - async itemReceived(entry: T): Promise { - const elementPassesFilter = (await this.options.filter?.(entry)) ?? true; - if (elementPassesFilter) { - this.entries.set(entry.id, entry); - - if (this.entries.size >= (this.options.max ?? Number.POSITIVE_INFINITY)) { - clearTimeout(this.maxTimeout!); - this.maxTimeout = null; - this.resolve!({ - reason: CollectorEndReasons.MAX, - entries: this.entries, - }); - this._cleanup(); - this.isActive = false; - } - - this.emitter.emit("collect", entry); - return true; - } - - return false; - } - - /** - * Increment the max number of event listeners for the client - * - * @returns The new max number of event listeners for the client - */ - protected incrementMaxEventListeners(): number { - const incrementedAmount = this.client.getMaxListeners() + 1; - this.client.setMaxListeners(incrementedAmount); - return incrementedAmount; - } - - /** - * Decrement the max number of event listeners for the client - * - * @returns The new max number of event listeners for the client - */ - protected decrementMaxEventListeners(): number { - const decrementAmount = this.client.getMaxListeners() - 1; - if (decrementAmount !== 0) { - this.client.setMaxListeners(decrementAmount); - return decrementAmount; - } - - return 0; - } - - /** - * Hook events to the collector - */ - abstract hookEvents(): void; - - /** - * Clean up the collector - */ - abstract _cleanup(): void; + /** Collection of successfully collected entries */ + readonly entries = new Collection(); + + /** Whether the collector is actively collecting elements */ + isActive = false; + + /** Method to resolve the promise this collector has when instantiated */ + protected resolve: ((value: CollectorReturnValue) => void) | null = null; + + /** Timeout for max time */ + protected maxTimeout: NodeJS.Timeout | null = null; + + /** Bound function for item receiving */ + protected boundItemReceiver = this.itemReceived.bind(this); + + public emitter = new EventEmitter() as TypedEmitter>; + + constructor( + public readonly client: Client, + public options: Partial>, + ) { + /** Check if timeLimit is specified */ + if (!options.timeLimit) throw new Error("You must specify a time limit in milliseconds for this collector."); + } + + /** + * Start the collector + * + * @returns A promise that resolves with a `CollectorReturnValue` object + */ + start(): Promise> { + return new Promise((resolve) => { + this.resolve = resolve; + + this.maxTimeout = setTimeout(() => { + this.resolve?.({ + reason: CollectorEndReasons.TIME, + entries: this.entries, + }); + this._cleanup(); + this.isActive = false; + }, this.options.timeLimit); + + this.hookEvents(); + this.isActive = true; + }); + } + + /** + * Receives an item + * + * @param entry - The item received + * @returns Whether the item passes the filter function or not + */ + async itemReceived(entry: T): Promise { + const elementPassesFilter = (await this.options.filter?.(entry)) ?? true; + if (elementPassesFilter) { + this.entries.set(entry.id, entry); + + if (this.entries.size >= (this.options.max ?? Number.POSITIVE_INFINITY)) { + clearTimeout(this.maxTimeout!); + this.maxTimeout = null; + this.resolve?.({ + reason: CollectorEndReasons.MAX, + entries: this.entries, + }); + this._cleanup(); + this.isActive = false; + } + + this.emitter.emit("collect", entry); + return true; + } + + return false; + } + + /** + * Increment the max number of event listeners for the client + * + * @returns The new max number of event listeners for the client + */ + protected incrementMaxEventListeners(): number { + const incrementedAmount = this.client.getMaxListeners() + 1; + this.client.setMaxListeners(incrementedAmount); + return incrementedAmount; + } + + /** + * Decrement the max number of event listeners for the client + * + * @returns The new max number of event listeners for the client + */ + protected decrementMaxEventListeners(): number { + const decrementAmount = this.client.getMaxListeners() - 1; + if (decrementAmount !== 0) { + this.client.setMaxListeners(decrementAmount); + return decrementAmount; + } + + return 0; + } + + /** + * Hook events to the collector + */ + abstract hookEvents(): void; + + /** + * Clean up the collector + */ + abstract _cleanup(): void; } /** * Reasons why a collector has ended */ export enum CollectorEndReasons { - MAX = "MAX_AMOUNT", - TIME = "TIME_EXPIRED", + MAX = "MAX_AMOUNT", + TIME = "TIME_EXPIRED", } /** * The value returned by a collector when it ends */ export type CollectorReturnValue = { - reason: CollectorEndReasons; - entries: Collection; + reason: CollectorEndReasons; + entries: Collection; }; /** @@ -141,15 +147,15 @@ type CollectableStructure = { id: string }; /** options for constructing a collector */ export type CollectorOptions = { - /** a function that determines whether an entry is collected or not */ - filter?(item: T): MaybePromise; - /** the max amount of time this collector run for before exiting (ms) */ - timeLimit: number; - /** the max amount of entries allowed to be collected */ - max?: number; + /** a function that determines whether an entry is collected or not */ + filter?(item: T): MaybePromise; + /** the max amount of time this collector run for before exiting (ms) */ + timeLimit: number; + /** the max amount of entries allowed to be collected */ + max?: number; }; /** events that collectors can emit */ export type CollectorEvents = { - collect(item: T): unknown; + collect(item: T): unknown; }; diff --git a/packages/guilded.js/lib/structures/collectors/MessageCollector.ts b/packages/guilded.js/lib/structures/collectors/MessageCollector.ts index 241cbd57..7734adc7 100644 --- a/packages/guilded.js/lib/structures/collectors/MessageCollector.ts +++ b/packages/guilded.js/lib/structures/collectors/MessageCollector.ts @@ -9,19 +9,19 @@ import { Collector } from "./Collector"; * @extends Collector */ export class MessageCollector extends Collector { - /** - * Binds to the client's message creation event and increments its max listener count by one. - */ - hookEvents(): void { - this.incrementMaxEventListeners(); - this.client.on(constants.clientEvents.MESSAGE_CREATED, this.boundItemReceiver); - } + /** + * Binds to the client's message creation event and increments its max listener count by one. + */ + hookEvents(): void { + this.incrementMaxEventListeners(); + this.client.on(constants.clientEvents.MESSAGE_CREATED, this.boundItemReceiver); + } - /** - * Unbinds from the client's message creation event and decrements its max listener count by one. - */ - _cleanup(): void { - this.decrementMaxEventListeners(); - this.client.removeListener(constants.clientEvents.MESSAGE_CREATED, this.boundItemReceiver); - } + /** + * Unbinds from the client's message creation event and decrements its max listener count by one. + */ + _cleanup(): void { + this.decrementMaxEventListeners(); + this.client.removeListener(constants.clientEvents.MESSAGE_CREATED, this.boundItemReceiver); + } } diff --git a/packages/guilded.js/lib/structures/collectors/ReactionCollector.ts b/packages/guilded.js/lib/structures/collectors/ReactionCollector.ts index 11054618..ec0cf90c 100644 --- a/packages/guilded.js/lib/structures/collectors/ReactionCollector.ts +++ b/packages/guilded.js/lib/structures/collectors/ReactionCollector.ts @@ -7,21 +7,21 @@ import { Collector } from "./Collector"; * A collector that collects reactions on messages */ export class ReactionCollector extends Collector { - /** - * Hooks the necessary events to start collecting reactions - */ - hookEvents(): void { - this.incrementMaxEventListeners(); - this.client.on(constants.clientEvents.MESSAGE_REACTION_CREATED, this.boundItemReceiver); - } + /** + * Hooks the necessary events to start collecting reactions + */ + hookEvents(): void { + this.incrementMaxEventListeners(); + this.client.on(constants.clientEvents.MESSAGE_REACTION_CREATED, this.boundItemReceiver); + } - /** - * Cleans up events and listeners after the collector has stopped collecting - */ - _cleanup(): void { - this.decrementMaxEventListeners(); - this.client.removeListener(constants.clientEvents.MESSAGE_REACTION_CREATED, this.boundItemReceiver); - } + /** + * Cleans up events and listeners after the collector has stopped collecting + */ + _cleanup(): void { + this.decrementMaxEventListeners(); + this.client.removeListener(constants.clientEvents.MESSAGE_REACTION_CREATED, this.boundItemReceiver); + } } /** diff --git a/packages/guilded.js/lib/typings.ts b/packages/guilded.js/lib/typings.ts index 7da6a476..8aad7aea 100644 --- a/packages/guilded.js/lib/typings.ts +++ b/packages/guilded.js/lib/typings.ts @@ -1,14 +1,14 @@ import type { Collection } from "@discordjs/collection"; import type { - ChatService, - DocPayload, - EmbedPayload, - ListItemPayload, - ListItemSummaryPayload, - ServerMemberBanPayload, - ServerMemberPayload, - ServerMemberSummaryPayload, - SocialLinkPayload, + ChatService, + DocPayload, + EmbedPayload, + ListItemPayload, + ListItemSummaryPayload, + ServerMemberBanPayload, + ServerMemberPayload, + ServerMemberSummaryPayload, + SocialLinkPayload, } from "@guildedjs/api"; import type { MemberRemovedEvent, MemberUnbannedEvent, MemberUpdatedEvent, MessageDeletedEvent, MessageReactionDeletedEvent } from "./events"; import type { Channel, Embed, Member, MemberBan, Message, MessageReaction, Webhook } from "./structures"; @@ -17,11 +17,13 @@ import type { ForumTopic } from "./structures/Forum"; import type { Server } from "./structures/Server"; export type BareStructureBaseData = { - id: string; + id: string; }; -export type OptionBody any> = Parameters[0]["requestBody"]; -export type OptionQuery any> = Parameters[0]; +// biome-ignore lint/suspicious/noExplicitAny: Needed +export type OptionBody unknown> = Parameters[0]["requestBody"]; +// biome-ignore lint/suspicious/noExplicitAny: Needed +export type OptionQuery unknown> = Parameters[0]; export type UpgradedServerMemberPayload = IDUpgradePayload>; export type UpgradedServerMemberBanPayload = ServerUpgradePayload; @@ -29,62 +31,73 @@ export type UpgradedServerMemberSummaryPayload = IDUpgradePayload = T & { serverId: string }; export type IDUpgradePayload = T & { id: string }; -export type MessageContent = Embed | OptionBody | string | (Omit, "embeds"> & { embeds?: Embed[] }); +export type MessageContent = + | Embed + | OptionBody + | string + | (Omit, "embeds"> & { + embeds?: Embed[]; + }); export type MaybePromise = Promise | T; export type ClientEvents = { - ready(): unknown; - debug(data: any): unknown; - exit(): unknown; - error(reason: string, err: Error | null): unknown; - calendarEventCreated(calendarEvent: CalendarEvent): unknown; - calendarEventUpdated(calendarEvent: CalendarEvent, oldCalendar: CalendarEvent | null): unknown; - calendarEventDeleted(calendarEvent: CalendarEvent): unknown; - calendarRsvpUpdated(calendarEventRsvp: CalendarEventRsvp, oldCalendarRsvp: CalendarEventRsvp | null): unknown; - calendarRsvpManyUpdated(calendarRsvpsEvent: Collection): unknown; - calendarRsvpDeleted(calendarEventRsvp: CalendarEventRsvp): unknown; - messageCreated(message: Message): unknown; - messageUpdated(message: Message, oldMessage: Message | null): unknown; - messageDeleted(event: MessageDeletedEvent): unknown; - messageReactionCreated(reaction: MessageReaction): unknown; - messageReactionDeleted(event: MessageReactionDeletedEvent): unknown; - channelCreated(channel: Channel): unknown; - channelUpdated(channel: Channel, oldChannel: Channel | null): unknown; - channelDeleted(channel: Channel): unknown; - docCreated(doc: DocPayload): unknown; - docUpdated(newDoc: DocPayload, oldDoc: DocPayload | null): unknown; - docDeleted(doc: DocPayload): unknown; - listItemCreated(item: ListItemPayload): unknown; - listItemUpdated(newItem: ListItemPayload, oldItem: ListItemPayload | ListItemSummaryPayload | null): unknown; - listItemDeleted(item: ListItemPayload): unknown; - listItemCompleted(item: ListItemPayload): unknown; - listItemUncompleted(item: ListItemPayload): unknown; - memberJoined(member: Member): unknown; - memberRemoved(event: MemberRemovedEvent): unknown; - memberUpdated(event: MemberUpdatedEvent): unknown; - memberBanned(ban: MemberBan): unknown; - memberUnbanned(event: MemberUnbannedEvent): unknown; - memberSocialLinkCreated(serverId: string, socialLink: SocialLinkPayload): unknown; - memberSocialLinkUpdated(serverId: string, socialLink: SocialLinkPayload): unknown; - memberSocialLinkDeleted(serverId: string, socialLink: SocialLinkPayload): unknown; - botServerCreated(server: Server, user: string): unknown; - botServerDeleted(server: Server, user: string): unknown; - forumTopicCreated(topic: ForumTopic): unknown; - forumTopicUpdated(topic: ForumTopic, oldTopic: ForumTopic | null): unknown; - forumTopicDeleted(topic: ForumTopic): unknown; - forumTopicPinned(topic: ForumTopic): unknown; - forumTopicUnpinned(topic: ForumTopic): unknown; - forumTopicLocked(topic: ForumTopic): unknown; - forumTopicUnlocked(topic: ForumTopic): unknown; - serverCreated(server: { serverId: string }): unknown; - webhookCreated(webhook: Webhook): unknown; - webhookUpdated(webhook: Webhook, oldWebhook: Webhook | null): unknown; - rolesUpdated( - updatedMembers: { - serverId: string; - members: { userId: string; roleIds: number[] }[]; - }, - oldMembers: Member[], - ): unknown; - unknownGatewayEvent(data: any): unknown; + ready(): unknown; + debug(data: unknown): unknown; + exit(): unknown; + error(reason: string, err: Error | null): unknown; + calendarEventCreated(calendarEvent: CalendarEvent): unknown; + calendarEventUpdated(calendarEvent: CalendarEvent, oldCalendar: CalendarEvent | null): unknown; + calendarEventDeleted(calendarEvent: CalendarEvent): unknown; + calendarRsvpUpdated(calendarEventRsvp: CalendarEventRsvp, oldCalendarRsvp: CalendarEventRsvp | null): unknown; + calendarRsvpManyUpdated(calendarRsvpsEvent: Collection): unknown; + calendarRsvpDeleted(calendarEventRsvp: CalendarEventRsvp): unknown; + messageCreated(message: Message): unknown; + messageUpdated(message: Message, oldMessage: Message | null): unknown; + messageDeleted(event: MessageDeletedEvent): unknown; + messageReactionCreated(reaction: MessageReaction): unknown; + messageReactionDeleted(event: MessageReactionDeletedEvent): unknown; + channelCreated(channel: Channel): unknown; + channelUpdated(channel: Channel, oldChannel: Channel | null): unknown; + channelDeleted(channel: Channel): unknown; + docCreated(doc: DocPayload): unknown; + docUpdated(newDoc: DocPayload, oldDoc: DocPayload | null): unknown; + docDeleted(doc: DocPayload): unknown; + listItemCreated(item: ListItemPayload): unknown; + listItemUpdated(newItem: ListItemPayload, oldItem: ListItemPayload | ListItemSummaryPayload | null): unknown; + listItemDeleted(item: ListItemPayload): unknown; + listItemCompleted(item: ListItemPayload): unknown; + listItemUncompleted(item: ListItemPayload): unknown; + memberJoined(member: Member): unknown; + memberRemoved(event: MemberRemovedEvent): unknown; + memberUpdated(event: MemberUpdatedEvent): unknown; + memberBanned(ban: MemberBan): unknown; + memberUnbanned(event: MemberUnbannedEvent): unknown; + memberSocialLinkCreated(serverId: string, socialLink: SocialLinkPayload): unknown; + memberSocialLinkUpdated(serverId: string, socialLink: SocialLinkPayload): unknown; + memberSocialLinkDeleted(serverId: string, socialLink: SocialLinkPayload): unknown; + botServerCreated(server: Server, user: string): unknown; + botServerDeleted(server: Server, user: string): unknown; + forumTopicCreated(topic: ForumTopic): unknown; + forumTopicUpdated(topic: ForumTopic, oldTopic: ForumTopic | null): unknown; + forumTopicDeleted(topic: ForumTopic): unknown; + forumTopicPinned(topic: ForumTopic): unknown; + forumTopicUnpinned(topic: ForumTopic): unknown; + forumTopicLocked(topic: ForumTopic): unknown; + forumTopicUnlocked(topic: ForumTopic): unknown; + serverCreated(server: { + serverId: string; + }): unknown; + webhookCreated(webhook: Webhook): unknown; + webhookUpdated(webhook: Webhook, oldWebhook: Webhook | null): unknown; + rolesUpdated( + updatedMembers: { + serverId: string; + members: { + userId: string; + roleIds: number[]; + }[]; + }, + oldMembers: Member[], + ): unknown; + unknownGatewayEvent(data: unknown): unknown; }; diff --git a/packages/guilded.js/lib/util.ts b/packages/guilded.js/lib/util.ts index 82601cfe..8e1040de 100644 --- a/packages/guilded.js/lib/util.ts +++ b/packages/guilded.js/lib/util.ts @@ -8,9 +8,9 @@ import type { MessageContent } from "./typings"; * Valid image file extensions */ export enum IMG_EXTENSION { - GIF = "gif", - PNG = "png", - WEBP = "webp", + GIF = "gif", + PNG = "png", + WEBP = "webp", } /** @@ -30,74 +30,74 @@ export type IMG_SIZE = "Large" | "Medium" | "Small"; * @returns A URL string for the asset */ const formAssetURL = (route: string, hash: string, extension: string, width?: number, height?: number, size?: string): string => { - const url = new URL(`https://${DOMAINS.IMAGE_CDN_DOMAIN}/${route}/${hash}-${size}.${extension.toLowerCase()}`); - if (width) url.searchParams.append("w", width.toString()); - if (height) url.searchParams.append("h", height.toString()); - return url.toString(); + const url = new URL(`https://${DOMAINS.IMAGE_CDN_DOMAIN}/${route}/${hash}-${size}.${extension.toLowerCase()}`); + if (width) url.searchParams.append("w", width.toString()); + if (height) url.searchParams.append("h", height.toString()); + return url.toString(); }; /** * Object containing functions to build Guilded asset URLs */ export const ASSET_BUILDER = { - /** - * Function to build a Guilded user avatar URL - * - * @param hash - The hash of the user's avatar - * @param size - The size of the avatar (optional) - * @returns A URL string for the user avatar - */ - AVATAR_URL: (hash: string, size: IMG_SIZE = "Medium"): string => formAssetURL("UserAvatar", hash, IMG_EXTENSION.PNG, undefined, undefined, size), - /** - * Function to build a Guilded chat message image URL - * - * @param hash - The hash of the image - * @param size - The size of the image (optional) - * @param width - The width of the image (optional) - * @param height - The height of the image (optional) - * @returns A URL string for the image in a chat message - */ - IMAGE_IN_CHAT: (hash: string, size = "Full", width?: number, height?: number): string => formAssetURL("ContentMedia", hash, IMG_EXTENSION.WEBP, width, height, size), - /** - * Function to build a Guilded user profile banner URL - * - * @param hash - The hash of the user's banner - * @param size - The size of the banner (optional) - * @param width - The width of the banner (optional) - * @param height - The height of the banner (optional) - * @returns A URL string for the user profile banner - */ - PROFILE_BANNER: (hash: string, size = "Hero", width?: number, height?: number): string => formAssetURL("UserBanner", hash, IMG_EXTENSION.PNG, width, height, size), - /** - * Builds a URL for a server banner asset. - * - * @param hash - The hash of the banner asset. - * @param size - The size of the banner asset. Default value is "Hero". - * @param width - The width of the banner asset. Defaults to undefined. - * @param height - The height of the banner asset. Defaults to undefined. - * @returns The URL of the server banner asset. - */ - SERVER_BANNER: (hash: string, size = "Hero", width?: number, height?: number): string => formAssetURL("TeamBanner", hash, IMG_EXTENSION.PNG, width, height, size), - /** - * Builds a URL for a server emoji asset. - * - * @param hash - The hash of the emoji asset. - * @param size - The size of the emoji asset. Default value is "Full". - * @param extension - The extension of the emoji asset. Default value is "WEBP". - * @param width - The width of the emoji asset. Defaults to undefined. - * @param height - The height of the emoji asset. Defaults to undefined. - * @returns The URL of the server emoji asset. - */ - SERVER_EMOJI: (hash: string, size = "Full", extension: "APNG" | "WEBP" = "WEBP", width?: number, height?: number): string => - formAssetURL("CustomReaction", hash, extension.toLowerCase(), width, height, size), - /** - * Builds a URL for a server icon asset. - * - * @param hash - The hash of the icon asset. - * @param size - The size of the icon asset. Default value is "Medium". - * @returns The URL of the server icon asset. - */ - SERVER_ICON: (hash: string, size: "Large" | "Medium" | "Small" = "Medium"): string => formAssetURL("TeamAvatar", hash, IMG_EXTENSION.PNG, undefined, undefined, size), + /** + * Function to build a Guilded user avatar URL + * + * @param hash - The hash of the user's avatar + * @param size - The size of the avatar (optional) + * @returns A URL string for the user avatar + */ + AVATAR_URL: (hash: string, size: IMG_SIZE = "Medium"): string => formAssetURL("UserAvatar", hash, IMG_EXTENSION.PNG, undefined, undefined, size), + /** + * Function to build a Guilded chat message image URL + * + * @param hash - The hash of the image + * @param size - The size of the image (optional) + * @param width - The width of the image (optional) + * @param height - The height of the image (optional) + * @returns A URL string for the image in a chat message + */ + IMAGE_IN_CHAT: (hash: string, size = "Full", width?: number, height?: number): string => formAssetURL("ContentMedia", hash, IMG_EXTENSION.WEBP, width, height, size), + /** + * Function to build a Guilded user profile banner URL + * + * @param hash - The hash of the user's banner + * @param size - The size of the banner (optional) + * @param width - The width of the banner (optional) + * @param height - The height of the banner (optional) + * @returns A URL string for the user profile banner + */ + PROFILE_BANNER: (hash: string, size = "Hero", width?: number, height?: number): string => formAssetURL("UserBanner", hash, IMG_EXTENSION.PNG, width, height, size), + /** + * Builds a URL for a server banner asset. + * + * @param hash - The hash of the banner asset. + * @param size - The size of the banner asset. Default value is "Hero". + * @param width - The width of the banner asset. Defaults to undefined. + * @param height - The height of the banner asset. Defaults to undefined. + * @returns The URL of the server banner asset. + */ + SERVER_BANNER: (hash: string, size = "Hero", width?: number, height?: number): string => formAssetURL("TeamBanner", hash, IMG_EXTENSION.PNG, width, height, size), + /** + * Builds a URL for a server emoji asset. + * + * @param hash - The hash of the emoji asset. + * @param size - The size of the emoji asset. Default value is "Full". + * @param extension - The extension of the emoji asset. Default value is "WEBP". + * @param width - The width of the emoji asset. Defaults to undefined. + * @param height - The height of the emoji asset. Defaults to undefined. + * @returns The URL of the server emoji asset. + */ + SERVER_EMOJI: (hash: string, size = "Full", extension: "APNG" | "WEBP" = "WEBP", width?: number, height?: number): string => + formAssetURL("CustomReaction", hash, extension.toLowerCase(), width, height, size), + /** + * Builds a URL for a server icon asset. + * + * @param hash - The hash of the icon asset. + * @param size - The size of the icon asset. Default value is "Medium". + * @returns The URL of the server icon asset. + */ + SERVER_ICON: (hash: string, size: "Large" | "Medium" | "Small" = "Medium"): string => formAssetURL("TeamAvatar", hash, IMG_EXTENSION.PNG, undefined, undefined, size), }; /** @@ -108,7 +108,7 @@ export const ASSET_BUILDER = { * @returns The key for the member object. */ export const buildMemberKey = (serverId: string, memberId: string): string => { - return `${serverId}:${memberId}`; + return `${serverId}:${memberId}`; }; /** @@ -120,7 +120,7 @@ export const buildMemberKey = (serverId: string, memberId: string): string => { * @returns The key for the reaction object. */ export const buildMessageReactionKey = (messageId: string, userId: string, emoteId: number): string => { - return `${messageId}:${userId}:${emoteId}`; + return `${messageId}:${userId}:${emoteId}`; }; /** @@ -131,11 +131,11 @@ export const buildMessageReactionKey = (messageId: string, userId: string, emote * @returns The key for the reaction object. */ export const buildReactionKey = (userId: string, emoteId: number): string => { - return `${userId}:${emoteId}`; + return `${userId}:${emoteId}`; }; export const buildCalendarRsvpKey = (calendarEventId: number, userId: string): string => { - return `${calendarEventId}:${userId}`; + return `${calendarEventId}:${userId}`; }; /** @@ -145,13 +145,19 @@ export const buildCalendarRsvpKey = (calendarEventId: number, userId: string): s * @returns REST message data. */ export const resolveContentToData = (content: MessageContent): { content?: string; embeds?: ChatEmbed[] } => { - if (typeof content === "string") return { content }; - if (content instanceof Embed) return { embeds: [content.toJSON()] }; + if (typeof content === "string") + return { + content, + }; + if (content instanceof Embed) + return { + embeds: [content.toJSON()], + }; - return { - ...content, - embeds: content.embeds?.map((x) => (x instanceof Embed ? x.toJSON() : x)), - }; + return { + ...content, + embeds: content.embeds?.map((x) => (x instanceof Embed ? x.toJSON() : x)), + }; }; /** @@ -160,5 +166,5 @@ export const resolveContentToData = (content: MessageContent): { content?: strin * @param date - The date to convert */ export function parseToStamp(date: string | undefined): number | null { - return date ? Date.parse(date) : null; + return date ? Date.parse(date) : null; } diff --git a/packages/guilded.js/package.json b/packages/guilded.js/package.json index 918d2980..ab15ec2b 100644 --- a/packages/guilded.js/package.json +++ b/packages/guilded.js/package.json @@ -7,10 +7,9 @@ "types": "types/index.d.ts", "main": "dist/index.js", "scripts": { - "lint": "eslint --ignore-path ../../.config/.eslintignore --config ../../.config/.eslintrc.js lib", "build": "tsc && gen-esm-wrapper . ./dist/index.mjs", "build:typecheck": "tsc --noEmit", - "prepublishOnly": "rimraf dist/ && rimraf types/ && pnpm run build" + "prepublishOnly": "rimraf dist/ && rimraf types/ && bun run build" }, "devDependencies": { "@types/node": "18.16.12", @@ -72,4 +71,4 @@ "url": "https://github.com/zaida04/guilded.js/issues" }, "gitHead": "eee38a19e0bfa812d7136cc78a6bc99e0b402b0c" -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index 8bf26ace..00000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,7364 +0,0 @@ -lockfileVersion: '6.0' - -settings: - autoInstallPeers: true - excludeLinksFromLockfile: false - -importers: - - .: - devDependencies: - '@changesets/cli': - specifier: ^2.26.1 - version: 2.26.1 - '@types/node': - specifier: 18.16.12 - version: 18.16.12 - dotenv: - specifier: 16.0.3 - version: 16.0.3 - eslint: - specifier: 8.40.0 - version: 8.40.0 - eslint-config-neon: - specifier: 0.1.47 - version: 0.1.47(eslint@8.40.0)(svelte@3.59.2)(typescript@5.0.4) - gen-esm-wrapper: - specifier: 1.1.3 - version: 1.1.3 - husky: - specifier: 7.0.4 - version: 7.0.4 - lint-staged: - specifier: 13.2.2 - version: 13.2.2 - nodemon: - specifier: ^2.0.22 - version: 2.0.22 - pnpm: - specifier: 8.5.1 - version: 8.5.1 - prettier: - specifier: 2.8.8 - version: 2.8.8 - rimraf: - specifier: 5.0.1 - version: 5.0.1 - ts-node: - specifier: 10.9.1 - version: 10.9.1(@types/node@18.16.12)(typescript@5.0.4) - typedoc: - specifier: 0.24.7 - version: 0.24.7(typescript@5.0.4) - typescript: - specifier: 5.0.4 - version: 5.0.4 - - apps/docs: - dependencies: - '@fortawesome/fontawesome-svg-core': - specifier: ^6.4.0 - version: 6.4.0 - '@fortawesome/free-solid-svg-icons': - specifier: ^6.4.0 - version: 6.4.0 - '@fortawesome/react-fontawesome': - specifier: ^0.2.0 - version: 0.2.0(@fortawesome/fontawesome-svg-core@6.4.0)(react@18.2.0) - '@next/font': - specifier: ^13.4.2 - version: 13.4.6 - next: - specifier: 13.4.2 - version: 13.4.2(react-dom@18.2.0)(react@18.2.0) - react: - specifier: 18.2.0 - version: 18.2.0 - react-code-blocks: - specifier: 0.0.9-0 - version: 0.0.9-0(react-dom@18.2.0)(react-is@16.13.1)(react@18.2.0) - react-dom: - specifier: 18.2.0 - version: 18.2.0(react@18.2.0) - devDependencies: - '@types/node': - specifier: 18.16.12 - version: 18.16.12 - '@types/react': - specifier: 18.2.6 - version: 18.2.6 - '@types/react-dom': - specifier: 18.2.4 - version: 18.2.4 - autoprefixer: - specifier: ^10.4.14 - version: 10.4.14(postcss@8.4.24) - postcss: - specifier: ^8.4.23 - version: 8.4.24 - tailwindcss: - specifier: ^3.3.2 - version: 3.3.2(ts-node@10.9.1) - typedoc: - specifier: 0.23.24 - version: 0.23.24(typescript@5.0.4) - typescript: - specifier: 5.0.4 - version: 5.0.4 - - packages/api: - dependencies: - '@types/ws': - specifier: 8.5.4 - version: 8.5.4 - form-data: - specifier: ^4.0.0 - version: 4.0.0 - node-fetch: - specifier: 2.6.11 - version: 2.6.11 - qs: - specifier: ^6.11.2 - version: 6.11.2 - typed-emitter: - specifier: 2.1.0 - version: 2.1.0 - ws: - specifier: 8.13.0 - version: 8.13.0 - devDependencies: - '@types/fs-extra': - specifier: ^11.0.1 - version: 11.0.1 - '@types/node-fetch': - specifier: 2.6.4 - version: 2.6.4 - '@types/qs': - specifier: ^6.9.7 - version: 6.9.7 - fs-extra: - specifier: ^11.1.1 - version: 11.1.1 - openapi-typescript: - specifier: ^6.2.4 - version: 6.2.8 - openapi-typescript-codegen: - specifier: ^0.24.0 - version: 0.24.0 - ts-node: - specifier: 10.9.1 - version: 10.9.1(@types/node@18.16.12)(typescript@5.0.4) - typescript: - specifier: 5.0.4 - version: 5.0.4 - - packages/create-guilded-app: - dependencies: - create-create-app: - specifier: ^7.3.0 - version: 7.3.0 - devDependencies: - '@types/node': - specifier: 18.16.12 - version: 18.16.12 - typescript: - specifier: 5.0.4 - version: 5.0.4 - - packages/gil: - dependencies: - '@discordjs/collection': - specifier: ^1.5.1 - version: 1.5.1 - colorette: - specifier: ^2.0.20 - version: 2.0.20 - guilded.js: - specifier: workspace:* - version: link:../guilded.js - devDependencies: - dotenv: - specifier: ^16.0.3 - version: 16.3.1 - typescript: - specifier: 5.0.4 - version: 5.0.4 - - packages/guilded.js: - dependencies: - '@discordjs/collection': - specifier: ^1.5.1 - version: 1.5.1 - '@guildedjs/api': - specifier: workspace:* - version: link:../api - typed-emitter: - specifier: 2.1.0 - version: 2.1.0 - devDependencies: - '@types/node': - specifier: 18.16.12 - version: 18.16.12 - typescript: - specifier: 5.0.4 - version: 5.0.4 - - services/proxy: - dependencies: - '@guildedjs/api': - specifier: workspace:* - version: link:../../packages/api - dotenv: - specifier: ^16.0.3 - version: 16.3.1 - devDependencies: - '@types/node': - specifier: 18.16.12 - version: 18.16.12 - typescript: - specifier: 5.0.4 - version: 5.0.4 - -packages: - - /@alloc/quick-lru@5.2.0: - resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} - engines: {node: '>=10'} - dev: true - - /@angular-eslint/bundled-angular-compiler@16.0.3: - resolution: {integrity: sha512-8zwY6ustiPXBEF3+jELKVwGk6j2HJn7GHbqAhDFR02YiE27iRMSGTHIAWGs6ZI7F1JgfrIsOHrUgzC1x95K6rg==} - dev: true - - /@angular-eslint/eslint-plugin-template@16.0.3(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-OKTMWOjC7F5tdv7gm2tlmgyr/uVyS1RWJZn4X/6D6p0kOpiDXmajtbYHD5tzbshX2Ep62Nt+rg8+1XGHrU0ScA==} - peerDependencies: - eslint: ^7.20.0 || ^8.0.0 - typescript: '*' - dependencies: - '@angular-eslint/bundled-angular-compiler': 16.0.3 - '@angular-eslint/utils': 16.0.3(eslint@8.40.0)(typescript@5.0.4) - '@typescript-eslint/type-utils': 5.59.7(eslint@8.40.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.59.7(eslint@8.40.0)(typescript@5.0.4) - aria-query: 5.1.3 - axobject-query: 3.1.1 - eslint: 8.40.0 - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@angular-eslint/eslint-plugin@16.0.3(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-1c+dFytcQDOA2wJ8/rtydMV6UYq1BgVfOcBXOr0WJxC9g8Cad9czcUOkW41WGrTp5kICMliV0ypH5eEaCM2WDQ==} - peerDependencies: - eslint: ^7.20.0 || ^8.0.0 - typescript: '*' - dependencies: - '@angular-eslint/utils': 16.0.3(eslint@8.40.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.59.7(eslint@8.40.0)(typescript@5.0.4) - eslint: 8.40.0 - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@angular-eslint/template-parser@16.0.3(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-IAWdwp/S9QC3EMiVxSS0E3ABy9PSidN3PW0Ll2EtM3mzXMYlpZXmxqd+B1xV/xKWzhk1Mp04QX8hHfG6Vq+qaQ==} - peerDependencies: - eslint: ^7.20.0 || ^8.0.0 - typescript: '*' - dependencies: - '@angular-eslint/bundled-angular-compiler': 16.0.3 - eslint: 8.40.0 - eslint-scope: 7.2.0 - typescript: 5.0.4 - dev: true - - /@angular-eslint/utils@16.0.3(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-QsbUVHJLk+fE08/D4y3wOyGk1iX2LVSygw+uzilbaAXfjD5/c0Ei5FbVx2mMYPk+aOl4yrvGQW3dmetMiAR0MQ==} - peerDependencies: - eslint: ^7.20.0 || ^8.0.0 - typescript: '*' - dependencies: - '@angular-eslint/bundled-angular-compiler': 16.0.3 - '@typescript-eslint/utils': 5.59.7(eslint@8.40.0)(typescript@5.0.4) - eslint: 8.40.0 - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@apidevtools/json-schema-ref-parser@9.0.9: - resolution: {integrity: sha512-GBD2Le9w2+lVFoc4vswGI/TjkNIZSVp7+9xPf+X3uidBfWnAeUWmquteSyt0+VCrhNMWj/FTABISQrD3Z/YA+w==} - dependencies: - '@jsdevtools/ono': 7.1.3 - '@types/json-schema': 7.0.12 - call-me-maybe: 1.0.2 - js-yaml: 4.1.0 - dev: true - - /@astrojs/compiler@1.5.1: - resolution: {integrity: sha512-iIGKu/uzB8sJ5VveQf0eHrVPPFEcrvSlp4qShYMOuY2aMmK2RVXQlX9dUjtmBQ+NAokfIOb7fwCutvH+p13l+g==} - dev: true - - /@babel/code-frame@7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/highlight': 7.22.5 - - /@babel/generator@7.22.5: - resolution: {integrity: sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.5 - '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.18 - jsesc: 2.5.2 - - /@babel/helper-annotate-as-pure@7.22.5: - resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.5 - dev: false - - /@babel/helper-environment-visitor@7.22.5: - resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} - engines: {node: '>=6.9.0'} - - /@babel/helper-function-name@7.22.5: - resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.22.5 - '@babel/types': 7.22.5 - - /@babel/helper-hoist-variables@7.22.5: - resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.5 - - /@babel/helper-module-imports@7.22.5: - resolution: {integrity: sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.5 - dev: false - - /@babel/helper-split-export-declaration@7.22.5: - resolution: {integrity: sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.22.5 - - /@babel/helper-string-parser@7.22.5: - resolution: {integrity: sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==} - engines: {node: '>=6.9.0'} - - /@babel/helper-validator-identifier@7.22.5: - resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} - engines: {node: '>=6.9.0'} - - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-validator-identifier': 7.22.5 - chalk: 2.4.2 - js-tokens: 4.0.0 - - /@babel/parser@7.22.5: - resolution: {integrity: sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q==} - engines: {node: '>=6.0.0'} - hasBin: true - dependencies: - '@babel/types': 7.22.5 - - /@babel/runtime@7.22.5: - resolution: {integrity: sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.13.11 - - /@babel/template@7.22.5: - resolution: {integrity: sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.22.5 - '@babel/parser': 7.22.5 - '@babel/types': 7.22.5 - - /@babel/traverse@7.22.5(supports-color@5.5.0): - resolution: {integrity: sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.22.5 - '@babel/generator': 7.22.5 - '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-function-name': 7.22.5 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.5 - '@babel/parser': 7.22.5 - '@babel/types': 7.22.5 - debug: 4.3.4(supports-color@5.5.0) - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - - /@babel/types@7.22.5: - resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/helper-string-parser': 7.22.5 - '@babel/helper-validator-identifier': 7.22.5 - to-fast-properties: 2.0.0 - - /@changesets/apply-release-plan@6.1.3: - resolution: {integrity: sha512-ECDNeoc3nfeAe1jqJb5aFQX7CqzQhD2klXRez2JDb/aVpGUbX673HgKrnrgJRuQR/9f2TtLoYIzrGB9qwD77mg==} - dependencies: - '@babel/runtime': 7.22.5 - '@changesets/config': 2.3.0 - '@changesets/get-version-range-type': 0.3.2 - '@changesets/git': 2.0.0 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - detect-indent: 6.1.0 - fs-extra: 7.0.1 - lodash.startcase: 4.4.0 - outdent: 0.5.0 - prettier: 2.8.8 - resolve-from: 5.0.0 - semver: 5.7.1 - dev: true - - /@changesets/assemble-release-plan@5.2.3: - resolution: {integrity: sha512-g7EVZCmnWz3zMBAdrcKhid4hkHT+Ft1n0mLussFMcB1dE2zCuwcvGoy9ec3yOgPGF4hoMtgHaMIk3T3TBdvU9g==} - dependencies: - '@babel/runtime': 7.22.5 - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.5 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - semver: 5.7.1 - dev: true - - /@changesets/changelog-git@0.1.14: - resolution: {integrity: sha512-+vRfnKtXVWsDDxGctOfzJsPhaCdXRYoe+KyWYoq5X/GqoISREiat0l3L8B0a453B2B4dfHGcZaGyowHbp9BSaA==} - dependencies: - '@changesets/types': 5.2.1 - dev: true - - /@changesets/cli@2.26.1: - resolution: {integrity: sha512-XnTa+b51vt057fyAudvDKGB0Sh72xutQZNAdXkCqPBKO2zvs2yYZx5hFZj1u9cbtpwM6Sxtcr02/FQJfZOzemQ==} - hasBin: true - dependencies: - '@babel/runtime': 7.22.5 - '@changesets/apply-release-plan': 6.1.3 - '@changesets/assemble-release-plan': 5.2.3 - '@changesets/changelog-git': 0.1.14 - '@changesets/config': 2.3.0 - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.5 - '@changesets/get-release-plan': 3.0.16 - '@changesets/git': 2.0.0 - '@changesets/logger': 0.0.5 - '@changesets/pre': 1.0.14 - '@changesets/read': 0.5.9 - '@changesets/types': 5.2.1 - '@changesets/write': 0.2.3 - '@manypkg/get-packages': 1.1.3 - '@types/is-ci': 3.0.0 - '@types/semver': 6.2.3 - ansi-colors: 4.1.3 - chalk: 2.4.2 - enquirer: 2.3.6 - external-editor: 3.1.0 - fs-extra: 7.0.1 - human-id: 1.0.2 - is-ci: 3.0.1 - meow: 6.1.1 - outdent: 0.5.0 - p-limit: 2.3.0 - preferred-pm: 3.0.3 - resolve-from: 5.0.0 - semver: 5.7.1 - spawndamnit: 2.0.0 - term-size: 2.2.1 - tty-table: 4.2.1 - dev: true - - /@changesets/config@2.3.0: - resolution: {integrity: sha512-EgP/px6mhCx8QeaMAvWtRrgyxW08k/Bx2tpGT+M84jEdX37v3VKfh4Cz1BkwrYKuMV2HZKeHOh8sHvja/HcXfQ==} - dependencies: - '@changesets/errors': 0.1.4 - '@changesets/get-dependents-graph': 1.3.5 - '@changesets/logger': 0.0.5 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - micromatch: 4.0.5 - dev: true - - /@changesets/errors@0.1.4: - resolution: {integrity: sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q==} - dependencies: - extendable-error: 0.1.7 - dev: true - - /@changesets/get-dependents-graph@1.3.5: - resolution: {integrity: sha512-w1eEvnWlbVDIY8mWXqWuYE9oKhvIaBhzqzo4ITSJY9hgoqQ3RoBqwlcAzg11qHxv/b8ReDWnMrpjpKrW6m1ZTA==} - dependencies: - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - chalk: 2.4.2 - fs-extra: 7.0.1 - semver: 5.7.1 - dev: true - - /@changesets/get-release-plan@3.0.16: - resolution: {integrity: sha512-OpP9QILpBp1bY2YNIKFzwigKh7Qe9KizRsZomzLe6pK8IUo8onkAAVUD8+JRKSr8R7d4+JRuQrfSSNlEwKyPYg==} - dependencies: - '@babel/runtime': 7.22.5 - '@changesets/assemble-release-plan': 5.2.3 - '@changesets/config': 2.3.0 - '@changesets/pre': 1.0.14 - '@changesets/read': 0.5.9 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - dev: true - - /@changesets/get-version-range-type@0.3.2: - resolution: {integrity: sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg==} - dev: true - - /@changesets/git@2.0.0: - resolution: {integrity: sha512-enUVEWbiqUTxqSnmesyJGWfzd51PY4H7mH9yUw0hPVpZBJ6tQZFMU3F3mT/t9OJ/GjyiM4770i+sehAn6ymx6A==} - dependencies: - '@babel/runtime': 7.22.5 - '@changesets/errors': 0.1.4 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - is-subdir: 1.2.0 - micromatch: 4.0.5 - spawndamnit: 2.0.0 - dev: true - - /@changesets/logger@0.0.5: - resolution: {integrity: sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw==} - dependencies: - chalk: 2.4.2 - dev: true - - /@changesets/parse@0.3.16: - resolution: {integrity: sha512-127JKNd167ayAuBjUggZBkmDS5fIKsthnr9jr6bdnuUljroiERW7FBTDNnNVyJ4l69PzR57pk6mXQdtJyBCJKg==} - dependencies: - '@changesets/types': 5.2.1 - js-yaml: 3.14.1 - dev: true - - /@changesets/pre@1.0.14: - resolution: {integrity: sha512-dTsHmxQWEQekHYHbg+M1mDVYFvegDh9j/kySNuDKdylwfMEevTeDouR7IfHNyVodxZXu17sXoJuf2D0vi55FHQ==} - dependencies: - '@babel/runtime': 7.22.5 - '@changesets/errors': 0.1.4 - '@changesets/types': 5.2.1 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - dev: true - - /@changesets/read@0.5.9: - resolution: {integrity: sha512-T8BJ6JS6j1gfO1HFq50kU3qawYxa4NTbI/ASNVVCBTsKquy2HYwM9r7ZnzkiMe8IEObAJtUVGSrePCOxAK2haQ==} - dependencies: - '@babel/runtime': 7.22.5 - '@changesets/git': 2.0.0 - '@changesets/logger': 0.0.5 - '@changesets/parse': 0.3.16 - '@changesets/types': 5.2.1 - chalk: 2.4.2 - fs-extra: 7.0.1 - p-filter: 2.1.0 - dev: true - - /@changesets/types@4.1.0: - resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} - dev: true - - /@changesets/types@5.2.1: - resolution: {integrity: sha512-myLfHbVOqaq9UtUKqR/nZA/OY7xFjQMdfgfqeZIBK4d0hA6pgxArvdv8M+6NUzzBsjWLOtvApv8YHr4qM+Kpfg==} - dev: true - - /@changesets/write@0.2.3: - resolution: {integrity: sha512-Dbamr7AIMvslKnNYsLFafaVORx4H0pvCA2MHqgtNCySMe1blImEyAEOzDmcgKAkgz4+uwoLz7demIrX+JBr/Xw==} - dependencies: - '@babel/runtime': 7.22.5 - '@changesets/types': 5.2.1 - fs-extra: 7.0.1 - human-id: 1.0.2 - prettier: 2.8.8 - dev: true - - /@cspotcode/source-map-support@0.8.1: - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} - dependencies: - '@jridgewell/trace-mapping': 0.3.9 - dev: true - - /@discordjs/collection@1.5.1: - resolution: {integrity: sha512-aWEc9DCf3TMDe9iaJoOnO2+JVAjeRNuRxPZQA6GVvBf+Z3gqUuWYBy2NWh4+5CLYq5uoc3MOvUQ5H5m8CJBqOA==} - engines: {node: '>=16.9.0'} - dev: false - - /@emotion/is-prop-valid@1.2.1: - resolution: {integrity: sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==} - dependencies: - '@emotion/memoize': 0.8.1 - dev: false - - /@emotion/memoize@0.8.1: - resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} - dev: false - - /@emotion/stylis@0.8.5: - resolution: {integrity: sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==} - dev: false - - /@emotion/unitless@0.7.5: - resolution: {integrity: sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==} - dev: false - - /@es-joy/jsdoccomment@0.38.0: - resolution: {integrity: sha512-TFac4Bnv0ZYNkEeDnOWHQhaS1elWlvOCQxH06iHeu5iffs+hCaLVIZJwF+FqksQi68R4i66Pu+4DfFGvble+Uw==} - engines: {node: '>=16'} - dependencies: - comment-parser: 1.3.1 - esquery: 1.5.0 - jsdoc-type-pratt-parser: 4.0.0 - dev: true - - /@eslint-community/eslint-utils@4.4.0(eslint@8.40.0): - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - dependencies: - eslint: 8.40.0 - eslint-visitor-keys: 3.4.1 - dev: true - - /@eslint-community/regexpp@4.5.1: - resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - dev: true - - /@eslint/eslintrc@2.0.3: - resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - ajv: 6.12.6 - debug: 4.3.4(supports-color@5.5.0) - espree: 9.5.2 - globals: 13.20.0 - ignore: 5.2.4 - import-fresh: 3.3.0 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color - dev: true - - /@eslint/js@8.40.0: - resolution: {integrity: sha512-ElyB54bJIhXQYVKjDSvCkPO1iU1tSAeVQJbllWJq1XQSmmA4dgFk8CbiBGpiOPxleE48vDogxCtmMYku4HSVLA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@fortawesome/fontawesome-common-types@6.4.0: - resolution: {integrity: sha512-HNii132xfomg5QVZw0HwXXpN22s7VBHQBv9CeOu9tfJnhsWQNd2lmTNi8CSrnw5B+5YOmzu1UoPAyxaXsJ6RgQ==} - engines: {node: '>=6'} - requiresBuild: true - dev: false - - /@fortawesome/fontawesome-svg-core@6.4.0: - resolution: {integrity: sha512-Bertv8xOiVELz5raB2FlXDPKt+m94MQ3JgDfsVbrqNpLU9+UE2E18GKjLKw+d3XbeYPqg1pzyQKGsrzbw+pPaw==} - engines: {node: '>=6'} - requiresBuild: true - dependencies: - '@fortawesome/fontawesome-common-types': 6.4.0 - dev: false - - /@fortawesome/free-solid-svg-icons@6.4.0: - resolution: {integrity: sha512-kutPeRGWm8V5dltFP1zGjQOEAzaLZj4StdQhWVZnfGFCvAPVvHh8qk5bRrU4KXnRRRNni5tKQI9PBAdI6MP8nQ==} - engines: {node: '>=6'} - requiresBuild: true - dependencies: - '@fortawesome/fontawesome-common-types': 6.4.0 - dev: false - - /@fortawesome/react-fontawesome@0.2.0(@fortawesome/fontawesome-svg-core@6.4.0)(react@18.2.0): - resolution: {integrity: sha512-uHg75Rb/XORTtVt7OS9WoK8uM276Ufi7gCzshVWkUJbHhh3svsUUeqXerrM96Wm7fRiDzfKRwSoahhMIkGAYHw==} - peerDependencies: - '@fortawesome/fontawesome-svg-core': ~1 || ~6 - react: '>=16.3' - dependencies: - '@fortawesome/fontawesome-svg-core': 6.4.0 - prop-types: 15.8.1 - react: 18.2.0 - dev: false - - /@humanwhocodes/config-array@0.11.10: - resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==} - engines: {node: '>=10.10.0'} - dependencies: - '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.4(supports-color@5.5.0) - minimatch: 3.1.2 - transitivePeerDependencies: - - supports-color - dev: true - - /@humanwhocodes/module-importer@1.0.1: - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} - dev: true - - /@humanwhocodes/object-schema@1.2.1: - resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} - dev: true - - /@isaacs/cliui@8.0.2: - resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} - engines: {node: '>=12'} - dependencies: - string-width: 5.1.2 - string-width-cjs: /string-width@4.2.3 - strip-ansi: 7.1.0 - strip-ansi-cjs: /strip-ansi@6.0.1 - wrap-ansi: 8.1.0 - wrap-ansi-cjs: /wrap-ansi@7.0.0 - dev: true - - /@jridgewell/gen-mapping@0.3.3: - resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.18 - - /@jridgewell/resolve-uri@3.1.0: - resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} - engines: {node: '>=6.0.0'} - - /@jridgewell/resolve-uri@3.1.1: - resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} - engines: {node: '>=6.0.0'} - dev: true - - /@jridgewell/set-array@1.1.2: - resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} - engines: {node: '>=6.0.0'} - - /@jridgewell/sourcemap-codec@1.4.14: - resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} - - /@jridgewell/sourcemap-codec@1.4.15: - resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - - /@jridgewell/trace-mapping@0.3.18: - resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} - dependencies: - '@jridgewell/resolve-uri': 3.1.0 - '@jridgewell/sourcemap-codec': 1.4.14 - - /@jridgewell/trace-mapping@0.3.9: - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} - dependencies: - '@jridgewell/resolve-uri': 3.1.1 - '@jridgewell/sourcemap-codec': 1.4.15 - dev: true - - /@jsdevtools/ono@7.1.3: - resolution: {integrity: sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg==} - dev: true - - /@manypkg/find-root@1.1.0: - resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} - dependencies: - '@babel/runtime': 7.22.5 - '@types/node': 12.20.55 - find-up: 4.1.0 - fs-extra: 8.1.0 - dev: true - - /@manypkg/get-packages@1.1.3: - resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} - dependencies: - '@babel/runtime': 7.22.5 - '@changesets/types': 4.1.0 - '@manypkg/find-root': 1.1.0 - fs-extra: 8.1.0 - globby: 11.1.0 - read-yaml-file: 1.1.0 - dev: true - - /@microsoft/tsdoc-config@0.16.2: - resolution: {integrity: sha512-OGiIzzoBLgWWR0UdRJX98oYO+XKGf7tiK4Zk6tQ/E4IJqGCe7dvkTvgDZV5cFJUzLGDOjeAXrnZoA6QkVySuxw==} - dependencies: - '@microsoft/tsdoc': 0.14.2 - ajv: 6.12.6 - jju: 1.4.0 - resolve: 1.19.0 - dev: true - - /@microsoft/tsdoc@0.14.2: - resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} - dev: true - - /@next/env@13.4.2: - resolution: {integrity: sha512-Wqvo7lDeS0KGwtwg9TT9wKQ8raelmUxt+TQKWvG/xKfcmDXNOtCuaszcfCF8JzlBG1q0VhpI6CKaRMbVPMDWgw==} - dev: false - - /@next/eslint-plugin-next@13.4.6: - resolution: {integrity: sha512-bPigeu0RI7bgy1ucBA2Yqcfg539y0Lzo38P2hIkrRB1GNvFSbYg6RTu8n6tGqPVrH3TTlPTNKLXG01wc+5NuwQ==} - dependencies: - glob: 7.1.7 - dev: true - - /@next/font@13.4.6: - resolution: {integrity: sha512-Pjm6B6f4KWr4kWe7yu2trLtwQPco/wLSOzWeD7bW17Sd209ibrhRwbSggvlAt1FJu8K4ag2xtVg8WfRFbON1mw==} - dev: false - - /@next/swc-darwin-arm64@13.4.2: - resolution: {integrity: sha512-6BBlqGu3ewgJflv9iLCwO1v1hqlecaIH2AotpKfVUEzUxuuDNJQZ2a4KLb4MBl8T9/vca1YuWhSqtbF6ZuUJJw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /@next/swc-darwin-x64@13.4.2: - resolution: {integrity: sha512-iZuYr7ZvGLPjPmfhhMl0ISm+z8EiyLBC1bLyFwGBxkWmPXqdJ60mzuTaDSr5WezDwv0fz32HB7JHmRC6JVHSZg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - requiresBuild: true - dev: false - optional: true - - /@next/swc-linux-arm64-gnu@13.4.2: - resolution: {integrity: sha512-2xVabFtIge6BJTcJrW8YuUnYTuQjh4jEuRuS2mscyNVOj6zUZkom3CQg+egKOoS+zh2rrro66ffSKIS+ztFJTg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /@next/swc-linux-arm64-musl@13.4.2: - resolution: {integrity: sha512-wKRCQ27xCUJx5d6IivfjYGq8oVngqIhlhSAJntgXLt7Uo9sRT/3EppMHqUZRfyuNBTbykEre1s5166z+pvRB5A==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /@next/swc-linux-x64-gnu@13.4.2: - resolution: {integrity: sha512-NpCa+UVhhuNeaFVUP1Bftm0uqtvLWq2JTm7+Ta48+2Uqj2mNXrDIvyn1DY/ZEfmW/1yvGBRaUAv9zkMkMRixQA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /@next/swc-linux-x64-musl@13.4.2: - resolution: {integrity: sha512-ZWVC72x0lW4aj44e3khvBrj2oSYj1bD0jESmyah3zG/3DplEy/FOtYkMzbMjHTdDSheso7zH8GIlW6CDQnKhmQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - requiresBuild: true - dev: false - optional: true - - /@next/swc-win32-arm64-msvc@13.4.2: - resolution: {integrity: sha512-pLT+OWYpzJig5K4VKhLttlIfBcVZfr2+Xbjra0Tjs83NQSkFS+y7xx+YhCwvpEmXYLIvaggj2ONPyjbiigOvHQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - requiresBuild: true - dev: false - optional: true - - /@next/swc-win32-ia32-msvc@13.4.2: - resolution: {integrity: sha512-dhpiksQCyGca4WY0fJyzK3FxMDFoqMb0Cn+uDB+9GYjpU2K5//UGPQlCwiK4JHxuhg8oLMag5Nf3/IPSJNG8jw==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - requiresBuild: true - dev: false - optional: true - - /@next/swc-win32-x64-msvc@13.4.2: - resolution: {integrity: sha512-O7bort1Vld00cu8g0jHZq3cbSTUNMohOEvYqsqE10+yfohhdPHzvzO+ziJRz4Dyyr/fYKREwS7gR4JC0soSOMw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - requiresBuild: true - dev: false - optional: true - - /@nodelib/fs.scandir@2.1.5: - resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - - /@nodelib/fs.stat@2.0.5: - resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} - engines: {node: '>= 8'} - - /@nodelib/fs.walk@1.2.8: - resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} - engines: {node: '>= 8'} - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.15.0 - - /@npmcli/config@6.2.0: - resolution: {integrity: sha512-lPAPNVUvlv6x0uwGiKzuWVUy1WSBaK5P0t9PoQQVIAbc1RaJLkaNxyUQZOrFJ7Y/ShzLw5skzruThhD9Qcju/A==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dependencies: - '@npmcli/map-workspaces': 3.0.4 - ini: 4.1.1 - nopt: 7.2.0 - proc-log: 3.0.0 - read-package-json-fast: 3.0.2 - semver: 7.5.3 - walk-up-path: 3.0.1 - dev: true - - /@npmcli/map-workspaces@3.0.4: - resolution: {integrity: sha512-Z0TbvXkRbacjFFLpVpV0e2mheCh+WzQpcqL+4xp49uNJOxOnIAPZyXtUxZ5Qn3QBTGKA11Exjd9a5411rBrhDg==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dependencies: - '@npmcli/name-from-folder': 2.0.0 - glob: 10.2.7 - minimatch: 9.0.1 - read-package-json-fast: 3.0.2 - dev: true - - /@npmcli/name-from-folder@2.0.0: - resolution: {integrity: sha512-pwK+BfEBZJbKdNYpHHRTNBwBoqrN/iIMO0AiGvYsp3Hoaq0WbgGSWQR6SCldZovoDpY3yje5lkFUe6gsDgJ2vg==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dev: true - - /@pkgjs/parseargs@0.11.0: - resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} - engines: {node: '>=14'} - requiresBuild: true - dev: true - optional: true - - /@pkgr/utils@2.4.1: - resolution: {integrity: sha512-JOqwkgFEyi+OROIyq7l4Jy28h/WwhDnG/cPkXG2Z1iFbubB6jsHW1NDvmyOzTBxHr3yg68YGirmh1JUgMqa+9w==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - dependencies: - cross-spawn: 7.0.3 - fast-glob: 3.2.12 - is-glob: 4.0.3 - open: 9.1.0 - picocolors: 1.0.0 - tslib: 2.5.3 - dev: true - - /@rushstack/eslint-patch@1.3.2: - resolution: {integrity: sha512-V+MvGwaHH03hYhY+k6Ef/xKd6RYlc4q8WBx+2ANmipHJcKuktNcI/NgEsJgdSUF6Lw32njT6OnrRsKYCdgHjYw==} - dev: true - - /@swc/helpers@0.5.1: - resolution: {integrity: sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==} - dependencies: - tslib: 2.5.3 - dev: false - - /@tsconfig/node10@1.0.9: - resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} - dev: true - - /@tsconfig/node12@1.0.11: - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - dev: true - - /@tsconfig/node14@1.0.3: - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - dev: true - - /@tsconfig/node16@1.0.4: - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - dev: true - - /@types/acorn@4.0.6: - resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} - dependencies: - '@types/estree': 1.0.1 - dev: true - - /@types/concat-stream@2.0.0: - resolution: {integrity: sha512-t3YCerNM7NTVjLuICZo5gYAXYoDvpuuTceCcFQWcDQz26kxUR5uIWolxbIR5jRNIXpMqhOpW/b8imCR1LEmuJw==} - dependencies: - '@types/node': 18.16.12 - dev: true - - /@types/debug@4.1.8: - resolution: {integrity: sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==} - dependencies: - '@types/ms': 0.7.31 - dev: true - - /@types/estree-jsx@1.0.0: - resolution: {integrity: sha512-3qvGd0z8F2ENTGr/GG1yViqfiKmRfrXVx5sJyHGFu3z7m5g5utCQtGp/g29JnjflhtQJBv1WDQukHiT58xPcYQ==} - dependencies: - '@types/estree': 1.0.1 - dev: true - - /@types/estree@1.0.1: - resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} - dev: true - - /@types/fs-extra@11.0.1: - resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==} - dependencies: - '@types/jsonfile': 6.1.1 - '@types/node': 20.3.1 - dev: true - - /@types/hast@2.3.4: - resolution: {integrity: sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g==} - dependencies: - '@types/unist': 2.0.6 - dev: true - - /@types/is-ci@3.0.0: - resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} - dependencies: - ci-info: 3.8.0 - dev: true - - /@types/is-empty@1.2.1: - resolution: {integrity: sha512-a3xgqnFTuNJDm1fjsTjHocYJ40Cz3t8utYpi5GNaxzrJC2HSD08ym+whIL7fNqiqBCdM9bcqD1H/tORWAFXoZw==} - dev: true - - /@types/json-schema@7.0.12: - resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} - dev: true - - /@types/jsonfile@6.1.1: - resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} - dependencies: - '@types/node': 18.16.12 - dev: true - - /@types/mdast@3.0.11: - resolution: {integrity: sha512-Y/uImid8aAwrEA24/1tcRZwpxX3pIFTSilcNDKSPn+Y2iDywSEachzRuvgAYYLR3wpGXAsMbv5lvKLDZLeYPAw==} - dependencies: - '@types/unist': 2.0.6 - dev: true - - /@types/minimist@1.2.2: - resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} - dev: true - - /@types/ms@0.7.31: - resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} - dev: true - - /@types/node-fetch@2.6.4: - resolution: {integrity: sha512-1ZX9fcN4Rvkvgv4E6PAY5WXUFWFcRWxZa3EW83UjycOB9ljJCedb2CupIP4RZMEwF/M3eTcCihbBRgwtGbg5Rg==} - dependencies: - '@types/node': 20.3.1 - form-data: 3.0.1 - dev: true - - /@types/node@12.20.55: - resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - dev: true - - /@types/node@18.16.12: - resolution: {integrity: sha512-tIRrjbY9C277MOfP8M3zjMIhtMlUJ6YVqkGgLjz+74jVsdf4/UjC6Hku4+1N0BS0qyC0JAS6tJLUk9H6JUKviQ==} - dev: true - - /@types/node@20.3.1: - resolution: {integrity: sha512-EhcH/wvidPy1WeML3TtYFGR83UzjxeWRen9V402T8aUGYsCHOmfoisV3ZSg03gAFIbLq8TnWOJ0f4cALtnSEUg==} - - /@types/normalize-package-data@2.4.1: - resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} - dev: true - - /@types/prop-types@15.7.5: - resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} - dev: true - - /@types/qs@6.9.7: - resolution: {integrity: sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==} - dev: true - - /@types/react-dom@18.2.4: - resolution: {integrity: sha512-G2mHoTMTL4yoydITgOGwWdWMVd8sNgyEP85xVmMKAPUBwQWm9wBPQUmvbeF4V3WBY1P7mmL4BkjQ0SqUpf1snw==} - dependencies: - '@types/react': 18.2.6 - dev: true - - /@types/react@18.2.6: - resolution: {integrity: sha512-wRZClXn//zxCFW+ye/D2qY65UsYP1Fpex2YXorHc8awoNamkMZSvBxwxdYVInsHOZZd2Ppq8isnSzJL5Mpf8OA==} - dependencies: - '@types/prop-types': 15.7.5 - '@types/scheduler': 0.16.3 - csstype: 3.1.2 - dev: true - - /@types/scheduler@0.16.3: - resolution: {integrity: sha512-5cJ8CB4yAx7BH1oMvdU0Jh9lrEXyPkar6F9G/ERswkCuvP4KQZfZkSjcMbAICCpQTN4OuZn8tz0HiKv9TGZgrQ==} - dev: true - - /@types/semver@6.2.3: - resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} - dev: true - - /@types/semver@7.5.0: - resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} - dev: true - - /@types/supports-color@8.1.1: - resolution: {integrity: sha512-dPWnWsf+kzIG140B8z2w3fr5D03TLWbOAFQl45xUpI3vcizeXriNR5VYkWZ+WTMsUHqZ9Xlt3hrxGNANFyNQfw==} - dev: true - - /@types/unist@2.0.6: - resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==} - dev: true - - /@types/ws@8.5.4: - resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} - dependencies: - '@types/node': 20.3.1 - dev: false - - /@types/yargs-interactive@2.1.3: - resolution: {integrity: sha512-bYB8ah0JPR6/lpHlxUzeHsrb3RK5OW7N8Hnth2nefnr6zQ5KFoDQ6wM5x58dTLEDYrwikFy3EPTf/O0HKLNaIg==} - dependencies: - '@types/yargs': 17.0.24 - dev: false - - /@types/yargs-parser@21.0.0: - resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} - - /@types/yargs@17.0.24: - resolution: {integrity: sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==} - dependencies: - '@types/yargs-parser': 21.0.0 - - /@typescript-eslint/eslint-plugin@5.60.0(@typescript-eslint/parser@5.60.0)(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - '@typescript-eslint/parser': ^5.0.0 - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - '@typescript-eslint/scope-manager': 5.60.0 - '@typescript-eslint/type-utils': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - debug: 4.3.4(supports-color@5.5.0) - eslint: 8.40.0 - grapheme-splitter: 1.0.4 - ignore: 5.2.4 - natural-compare-lite: 1.4.0 - semver: 7.5.2 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/experimental-utils@5.60.0(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-ovid3u7CNBrr0Ct35LUPkNYH4e+z4Kc6dPfSG99oMmH9SfoEoefq09uSnJI4mUb/UM7a/peVM03G+MzLxrD16g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@typescript-eslint/utils': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - eslint: 8.40.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/parser@5.60.0(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-jBONcBsDJ9UoTWrARkRRCgDz6wUggmH5RpQVlt7BimSwaTkTjwypGzKORXbR4/2Hqjk9hgwlon2rVQAjWNpkyQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/scope-manager': 5.60.0 - '@typescript-eslint/types': 5.60.0 - '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.0.4) - debug: 4.3.4(supports-color@5.5.0) - eslint: 8.40.0 - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/scope-manager@5.59.7: - resolution: {integrity: sha512-FL6hkYWK9zBGdxT2wWEd2W8ocXMu3K94i3gvMrjXpx+koFYdYV7KprKfirpgY34vTGzEPPuKoERpP8kD5h7vZQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.59.7 - '@typescript-eslint/visitor-keys': 5.59.7 - dev: true - - /@typescript-eslint/scope-manager@5.60.0: - resolution: {integrity: sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.60.0 - '@typescript-eslint/visitor-keys': 5.60.0 - dev: true - - /@typescript-eslint/type-utils@5.59.7(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 5.59.7(typescript@5.0.4) - '@typescript-eslint/utils': 5.59.7(eslint@8.40.0)(typescript@5.0.4) - debug: 4.3.4(supports-color@5.5.0) - eslint: 8.40.0 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/type-utils@5.60.0(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '*' - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.0.4) - '@typescript-eslint/utils': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - debug: 4.3.4(supports-color@5.5.0) - eslint: 8.40.0 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/types@5.59.7: - resolution: {integrity: sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/types@5.60.0: - resolution: {integrity: sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /@typescript-eslint/typescript-estree@5.59.7(typescript@5.0.4): - resolution: {integrity: sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.59.7 - '@typescript-eslint/visitor-keys': 5.59.7 - debug: 4.3.4(supports-color@5.5.0) - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.3 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/typescript-estree@5.60.0(typescript@5.0.4): - resolution: {integrity: sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - dependencies: - '@typescript-eslint/types': 5.60.0 - '@typescript-eslint/visitor-keys': 5.60.0 - debug: 4.3.4(supports-color@5.5.0) - globby: 11.1.0 - is-glob: 4.0.3 - semver: 7.5.3 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /@typescript-eslint/utils@5.59.7(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.59.7 - '@typescript-eslint/types': 5.59.7 - '@typescript-eslint/typescript-estree': 5.59.7(typescript@5.0.4) - eslint: 8.40.0 - eslint-scope: 5.1.1 - semver: 7.5.3 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/utils@5.60.0(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) - '@types/json-schema': 7.0.12 - '@types/semver': 7.5.0 - '@typescript-eslint/scope-manager': 5.60.0 - '@typescript-eslint/types': 5.60.0 - '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.0.4) - eslint: 8.40.0 - eslint-scope: 5.1.1 - semver: 7.5.3 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /@typescript-eslint/visitor-keys@5.59.7: - resolution: {integrity: sha512-tyN+X2jvMslUszIiYbF0ZleP+RqQsFVpGrKI6e0Eet1w8WmhsAtmzaqm8oM8WJQ1ysLwhnsK/4hYHJjOgJVfQQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.59.7 - eslint-visitor-keys: 3.4.1 - dev: true - - /@typescript-eslint/visitor-keys@5.60.0: - resolution: {integrity: sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - '@typescript-eslint/types': 5.60.0 - eslint-visitor-keys: 3.4.1 - dev: true - - /abbrev@1.1.1: - resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - dev: true - - /abbrev@2.0.0: - resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dev: true - - /abind@1.0.5: - resolution: {integrity: sha512-dbaEZphdPje0ihqSdWg36Sb8S20TuqQomiz2593oIx+enQ9Q4vDZRjIzhnkWltGRKVKqC28kTribkgRLBexWVQ==} - engines: {node: '>=6', npm: '>=3'} - dev: false - - /acorn-jsx@5.3.2(acorn@8.9.0): - resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} - peerDependencies: - acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - acorn: 8.9.0 - dev: true - - /acorn-walk@8.2.0: - resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==} - engines: {node: '>=0.4.0'} - dev: true - - /acorn@8.9.0: - resolution: {integrity: sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==} - engines: {node: '>=0.4.0'} - hasBin: true - dev: true - - /aggregate-error@3.1.0: - resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} - engines: {node: '>=8'} - dependencies: - clean-stack: 2.2.0 - indent-string: 4.0.0 - dev: true - - /ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.1 - dev: true - - /ansi-colors@4.1.3: - resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} - engines: {node: '>=6'} - dev: true - - /ansi-escapes@4.3.2: - resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.21.3 - - /ansi-regex@2.1.1: - resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} - engines: {node: '>=0.10.0'} - dev: false - - /ansi-regex@4.1.1: - resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} - engines: {node: '>=6'} - dev: false - - /ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} - - /ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} - engines: {node: '>=12'} - dev: true - - /ansi-sequence-parser@1.1.0: - resolution: {integrity: sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==} - dev: true - - /ansi-styles@3.2.1: - resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} - engines: {node: '>=4'} - dependencies: - color-convert: 1.9.3 - - /ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} - dependencies: - color-convert: 2.0.1 - - /ansi-styles@6.2.1: - resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} - engines: {node: '>=12'} - dev: true - - /any-promise@1.3.0: - resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} - dev: true - - /anymatch@3.1.3: - resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} - engines: {node: '>= 8'} - dependencies: - normalize-path: 3.0.0 - picomatch: 2.3.1 - dev: true - - /are-docs-informative@0.0.2: - resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} - engines: {node: '>=14'} - dev: true - - /arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: true - - /arg@5.0.2: - resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} - dev: true - - /argparse@1.0.10: - resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} - dependencies: - sprintf-js: 1.0.3 - dev: true - - /argparse@2.0.1: - resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - dev: true - - /argx@3.0.2: - resolution: {integrity: sha512-PUyi1r14HG1AH6raqPEW8+vKNWfvHrmerdBXnf5iz7JOnO1hRaG1cGsH9eay/y8dUIreN7NxSEfK208UCGd0wQ==} - engines: {node: '>=4', npm: '>=2'} - dependencies: - iftype: 3.0.2 - dev: false - - /argx@4.0.4: - resolution: {integrity: sha512-XLWeRTNBJRzQkbMweLIxdtnvpE7iYUBraPwrIJX57FjL4D1RHLMJRM1AyEP6KZHgvjW7TSnxF8MpGic7YdTGOA==} - engines: {node: '>=8', npm: '>=5'} - dependencies: - iftype: 4.0.9 - dev: false - - /aria-query@5.1.3: - resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} - dependencies: - deep-equal: 2.2.1 - dev: true - - /aria-query@5.2.1: - resolution: {integrity: sha512-7uFg4b+lETFgdaJyETnILsXgnnzVnkHcgRbwbPwevm5x/LmUlt3MjczMRe1zg824iBgXZNRPTBftNYyRSKLp2g==} - dependencies: - dequal: 2.0.3 - dev: true - - /array-buffer-byte-length@1.0.0: - resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} - dependencies: - call-bind: 1.0.2 - is-array-buffer: 3.0.2 - dev: true - - /array-includes@3.1.6: - resolution: {integrity: sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - get-intrinsic: 1.2.1 - is-string: 1.0.7 - dev: true - - /array-union@2.1.0: - resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} - engines: {node: '>=8'} - - /array.prototype.flat@1.3.1: - resolution: {integrity: sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - es-shim-unscopables: 1.0.0 - dev: true - - /array.prototype.flatmap@1.3.1: - resolution: {integrity: sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - es-shim-unscopables: 1.0.0 - dev: true - - /array.prototype.tosorted@1.1.1: - resolution: {integrity: sha512-pZYPXPRl2PqWcsUs6LOMn+1f1532nEoPTYowBtqLwAW+W8vSVhkIGnmOX1t/UQjD6YGI0vcD2B1U7ZFGQH9jnQ==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - es-shim-unscopables: 1.0.0 - get-intrinsic: 1.2.1 - dev: true - - /arrayreduce@2.1.0: - resolution: {integrity: sha512-I5MwrsPJ4faMuuPXM8+EgEy83G16i+FqegFhhHX3geDJbyaqPDWNrVjkrRg9SZq5mepEZdNg36SDPOhiKPWTLA==} - engines: {node: '>=4.0.0'} - dev: false - - /arrify@1.0.1: - resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} - engines: {node: '>=0.10.0'} - dev: true - - /askconfig@4.0.4: - resolution: {integrity: sha512-fjB/vmAlUKxGVqcz4mLub3xF8m9rkazhqcXRvrDzeey0iaLhcAg2K8bhJL7pKjE2dFP9qDGv3+yXovYMV9XBJQ==} - engines: {node: '>=8', npm: '>=5'} - dependencies: - argx: 4.0.4 - cli-color: 1.4.0 - objnest: 5.1.1 - dev: false - - /assert@1.5.0: - resolution: {integrity: sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==} - dependencies: - object-assign: 4.1.1 - util: 0.10.3 - dev: true - - /ast-types-flow@0.0.7: - resolution: {integrity: sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==} - dev: true - - /astral-regex@2.0.0: - resolution: {integrity: sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==} - engines: {node: '>=8'} - dev: true - - /astro-eslint-parser@0.13.3: - resolution: {integrity: sha512-n+fb6O40SM6sD36lGwgVIE3zeVQUMdl6ZHaHEjRI4zdaBu658XaAV1YDztF7Iga5kmeOxJYB87mcQ+lUnQs0Nw==} - engines: {node: ^14.18.0 || >=16.0.0} - dependencies: - '@astrojs/compiler': 1.5.1 - '@typescript-eslint/scope-manager': 5.60.0 - '@typescript-eslint/types': 5.60.0 - astrojs-compiler-sync: 0.3.3(@astrojs/compiler@1.5.1) - debug: 4.3.4(supports-color@5.5.0) - eslint-visitor-keys: 3.4.1 - espree: 9.5.2 - semver: 7.5.2 - transitivePeerDependencies: - - supports-color - dev: true - - /astrojs-compiler-sync@0.3.3(@astrojs/compiler@1.5.1): - resolution: {integrity: sha512-LbhchWgsvjvRBb5n5ez8/Q/f9ZKViuox27VxMDOdTUm8MRv9U7phzOiLue5KluqTmC0z1LId4gY2SekvoDrkuw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@astrojs/compiler': '>=0.27.0' - dependencies: - '@astrojs/compiler': 1.5.1 - synckit: 0.8.5 - dev: true - - /async@1.5.2: - resolution: {integrity: sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==} - dev: false - - /asynckit@0.4.0: - resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - - /autoprefixer@10.4.14(postcss@8.4.24): - resolution: {integrity: sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ==} - engines: {node: ^10 || ^12 || >=14} - hasBin: true - peerDependencies: - postcss: ^8.1.0 - dependencies: - browserslist: 4.21.9 - caniuse-lite: 1.0.30001505 - fraction.js: 4.2.0 - normalize-range: 0.1.2 - picocolors: 1.0.0 - postcss: 8.4.24 - postcss-value-parser: 4.2.0 - dev: true - - /available-typed-arrays@1.0.5: - resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} - engines: {node: '>= 0.4'} - dev: true - - /axe-core@4.7.2: - resolution: {integrity: sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g==} - engines: {node: '>=4'} - dev: true - - /axobject-query@3.1.1: - resolution: {integrity: sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==} - dependencies: - deep-equal: 2.2.1 - dev: true - - /axobject-query@3.2.1: - resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} - dependencies: - dequal: 2.0.3 - dev: true - - /babel-plugin-styled-components@2.1.3(styled-components@5.3.11): - resolution: {integrity: sha512-jBioLwBVHpOMU4NsueH/ADcHrjS0Y/WTpt2eGVmmuSFNEv2DF3XhcMncuZlbbjxQ4vzxg+yEr6E6TNjrIQbsJQ==} - peerDependencies: - styled-components: '>= 2' - dependencies: - '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-module-imports': 7.22.5 - babel-plugin-syntax-jsx: 6.18.0 - lodash: 4.17.21 - picomatch: 2.3.1 - styled-components: 5.3.11(react-dom@18.2.0)(react-is@16.13.1)(react@18.2.0) - dev: false - - /babel-plugin-syntax-jsx@6.18.0: - resolution: {integrity: sha512-qrPaCSo9c8RHNRHIotaufGbuOBN8rtdC4QrrFFc43vyWCCz7Kl7GL1PGaXtMGQZUXrkCjNEgxDfmAuAabr/rlw==} - dev: false - - /babel-runtime@6.26.0: - resolution: {integrity: sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==} - dependencies: - core-js: 2.6.12 - regenerator-runtime: 0.11.1 - dev: false - - /bail@2.0.2: - resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} - dev: true - - /balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - dev: true - - /bent@7.3.12: - resolution: {integrity: sha512-T3yrKnVGB63zRuoco/7Ybl7BwwGZR0lceoVG5XmQyMIH9s19SV5m+a8qam4if0zQuAmOQTyPTPmsQBdAorGK3w==} - dependencies: - bytesish: 0.4.4 - caseless: 0.12.0 - is-stream: 2.0.1 - dev: true - - /better-path-resolve@1.0.0: - resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} - engines: {node: '>=4'} - dependencies: - is-windows: 1.0.2 - dev: true - - /big-integer@1.6.51: - resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} - engines: {node: '>=0.6'} - dev: true - - /binary-extensions@2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} - engines: {node: '>=8'} - dev: true - - /boolbase@1.0.0: - resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - dev: true - - /bplist-parser@0.2.0: - resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==} - engines: {node: '>= 5.10.0'} - dependencies: - big-integer: 1.6.51 - dev: true - - /brace-expansion@1.1.11: - resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - dev: true - - /brace-expansion@2.0.1: - resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} - dependencies: - balanced-match: 1.0.2 - dev: true - - /braces@3.0.2: - resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} - engines: {node: '>=8'} - dependencies: - fill-range: 7.0.1 - - /breakword@1.0.6: - resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} - dependencies: - wcwidth: 1.0.1 - dev: true - - /browserslist@4.21.9: - resolution: {integrity: sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==} - engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} - hasBin: true - dependencies: - caniuse-lite: 1.0.30001505 - electron-to-chromium: 1.4.435 - node-releases: 2.0.12 - update-browserslist-db: 1.0.11(browserslist@4.21.9) - dev: true - - /buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - dev: true - - /builtin-modules@3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} - dev: true - - /builtins@5.0.1: - resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} - dependencies: - semver: 7.5.3 - dev: true - - /bundle-name@3.0.0: - resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} - engines: {node: '>=12'} - dependencies: - run-applescript: 5.0.0 - dev: true - - /busboy@1.6.0: - resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} - engines: {node: '>=10.16.0'} - dependencies: - streamsearch: 1.1.0 - - /bytesish@0.4.4: - resolution: {integrity: sha512-i4uu6M4zuMUiyfZN4RU2+i9+peJh//pXhd9x1oSe1LBkZ3LEbCoygu8W0bXTukU1Jme2txKuotpCZRaC3FLxcQ==} - dev: true - - /call-bind@1.0.2: - resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} - dependencies: - function-bind: 1.1.1 - get-intrinsic: 1.2.1 - - /call-me-maybe@1.0.2: - resolution: {integrity: sha512-HpX65o1Hnr9HH25ojC1YGs7HCQLq0GCOibSaWER0eNpgJ/Z1MZv2mTc7+xh6WOPxbRVcmgbv4hGU+uSQ/2xFZQ==} - dev: true - - /callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - dev: true - - /camelcase-css@2.0.1: - resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} - engines: {node: '>= 6'} - dev: true - - /camelcase-keys@6.2.2: - resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} - engines: {node: '>=8'} - dependencies: - camelcase: 5.3.1 - map-obj: 4.3.0 - quick-lru: 4.0.1 - dev: true - - /camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - - /camelcase@6.3.0: - resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} - engines: {node: '>=10'} - dev: true - - /camelize@1.0.1: - resolution: {integrity: sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==} - dev: false - - /caniuse-lite@1.0.30001505: - resolution: {integrity: sha512-jaAOR5zVtxHfL0NjZyflVTtXm3D3J9P15zSJ7HmQF8dSKGA6tqzQq+0ZI3xkjyQj46I4/M0K2GbMpcAFOcbr3A==} - - /caseless@0.12.0: - resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - dev: true - - /ccount@2.0.1: - resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - dev: true - - /chalk@2.4.2: - resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} - engines: {node: '>=4'} - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - - /chalk@4.1.2: - resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - - /chalk@5.2.0: - resolution: {integrity: sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - dev: true - - /character-entities-html4@2.1.0: - resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} - dev: true - - /character-entities-legacy@1.1.4: - resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} - - /character-entities-legacy@3.0.0: - resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} - dev: true - - /character-entities@1.2.4: - resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} - - /character-entities@2.0.2: - resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} - dev: true - - /character-reference-invalid@1.1.4: - resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} - - /character-reference-invalid@2.0.1: - resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} - dev: true - - /chardet@0.7.0: - resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} - - /chokidar@3.5.3: - resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} - engines: {node: '>= 8.10.0'} - dependencies: - anymatch: 3.1.3 - braces: 3.0.2 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.2 - dev: true - - /ci-info@3.8.0: - resolution: {integrity: sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==} - engines: {node: '>=8'} - dev: true - - /clean-regexp@1.0.0: - resolution: {integrity: sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==} - engines: {node: '>=4'} - dependencies: - escape-string-regexp: 1.0.5 - dev: true - - /clean-stack@2.2.0: - resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} - engines: {node: '>=6'} - dev: true - - /cli-color@1.4.0: - resolution: {integrity: sha512-xu6RvQqqrWEo6MPR1eixqGPywhYBHRs653F9jfXB2Hx4jdM/3WxiNE1vppRmxtMIfl16SFYTpYlrnqH/HsK/2w==} - dependencies: - ansi-regex: 2.1.1 - d: 1.0.1 - es5-ext: 0.10.62 - es6-iterator: 2.0.3 - memoizee: 0.4.15 - timers-ext: 0.1.7 - dev: false - - /cli-cursor@3.1.0: - resolution: {integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==} - engines: {node: '>=8'} - dependencies: - restore-cursor: 3.1.0 - - /cli-truncate@2.1.0: - resolution: {integrity: sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==} - engines: {node: '>=8'} - dependencies: - slice-ansi: 3.0.0 - string-width: 4.2.3 - dev: true - - /cli-truncate@3.1.0: - resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - slice-ansi: 5.0.0 - string-width: 5.1.2 - dev: true - - /cli-width@3.0.0: - resolution: {integrity: sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==} - engines: {node: '>= 10'} - dev: false - - /client-only@0.0.1: - resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==} - dev: false - - /clipboard@2.0.11: - resolution: {integrity: sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==} - requiresBuild: true - dependencies: - good-listener: 1.2.2 - select: 1.1.2 - tiny-emitter: 2.1.0 - dev: false - optional: true - - /cliui@5.0.0: - resolution: {integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==} - dependencies: - string-width: 3.1.0 - strip-ansi: 5.2.0 - wrap-ansi: 5.1.0 - dev: false - - /cliui@6.0.0: - resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 6.2.0 - dev: true - - /cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - dev: true - - /clone@1.0.4: - resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} - engines: {node: '>=0.8'} - dev: true - - /co@4.6.0: - resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} - engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} - dev: false - - /color-convert@1.9.3: - resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} - dependencies: - color-name: 1.1.3 - - /color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - dependencies: - color-name: 1.1.4 - - /color-name@1.1.3: - resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - - /color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - - /colorette@2.0.20: - resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} - - /combined-stream@1.0.8: - resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} - engines: {node: '>= 0.8'} - dependencies: - delayed-stream: 1.0.0 - - /comma-separated-tokens@1.0.8: - resolution: {integrity: sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==} - dev: false - - /commander@10.0.1: - resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} - engines: {node: '>=14'} - dev: true - - /commander@4.1.1: - resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} - engines: {node: '>= 6'} - dev: true - - /comment-parser@1.3.1: - resolution: {integrity: sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==} - engines: {node: '>= 12.0.0'} - dev: true - - /common-tags@1.8.2: - resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} - engines: {node: '>=4.0.0'} - dev: true - - /concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - dev: true - - /concat-stream@2.0.0: - resolution: {integrity: sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==} - engines: {'0': node >= 6.0} - dependencies: - buffer-from: 1.1.2 - inherits: 2.0.4 - readable-stream: 3.6.2 - typedarray: 0.0.6 - dev: true - - /core-js@2.6.12: - resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==} - deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. - requiresBuild: true - dev: false - - /create-create-app@7.3.0: - resolution: {integrity: sha512-4BzSuq75JihB3hvFQHu1mqPDLUBcR3u5N9yShG6LSv84O7NjTNc/hE+cgDlSJZzfgr7LRahtI5FwPxLyVi/oPg==} - hasBin: true - dependencies: - '@types/yargs-interactive': 2.1.3 - chalk: 4.1.2 - cross-spawn: 7.0.3 - epicfail: 3.0.0 - execa: 5.1.1 - gitconfig: 2.0.8 - globby: 11.1.0 - handlebars: 4.7.7 - is-utf8: 0.2.1 - license.js: 3.1.2 - slash: 3.0.0 - uuid: 8.3.2 - yargs-interactive: 3.0.1 - transitivePeerDependencies: - - encoding - dev: false - - /create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: true - - /cross-spawn@5.1.0: - resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - dev: true - - /cross-spawn@7.0.3: - resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} - engines: {node: '>= 8'} - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - - /css-color-keywords@1.0.0: - resolution: {integrity: sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==} - engines: {node: '>=4'} - dev: false - - /css-to-react-native@3.2.0: - resolution: {integrity: sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==} - dependencies: - camelize: 1.0.1 - css-color-keywords: 1.0.0 - postcss-value-parser: 4.2.0 - dev: false - - /cssesc@3.0.0: - resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} - engines: {node: '>=4'} - hasBin: true - dev: true - - /csstype@3.1.2: - resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} - dev: true - - /csv-generate@3.4.3: - resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} - dev: true - - /csv-parse@4.16.3: - resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} - dev: true - - /csv-stringify@5.6.5: - resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} - dev: true - - /csv@5.5.3: - resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} - engines: {node: '>= 0.1.90'} - dependencies: - csv-generate: 3.4.3 - csv-parse: 4.16.3 - csv-stringify: 5.6.5 - stream-transform: 2.1.3 - dev: true - - /d@1.0.1: - resolution: {integrity: sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==} - dependencies: - es5-ext: 0.10.62 - type: 1.2.0 - dev: false - - /damerau-levenshtein@1.0.8: - resolution: {integrity: sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==} - dev: true - - /debug@3.2.7(supports-color@5.5.0): - resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.3 - supports-color: 5.5.0 - dev: true - - /debug@4.3.4(supports-color@5.5.0): - resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 2.1.2 - supports-color: 5.5.0 - - /decamelize-keys@1.1.1: - resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} - engines: {node: '>=0.10.0'} - dependencies: - decamelize: 1.2.0 - map-obj: 1.0.1 - dev: true - - /decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - - /decamelize@5.0.1: - resolution: {integrity: sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==} - engines: {node: '>=10'} - dev: true - - /decode-named-character-reference@1.0.2: - resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} - dependencies: - character-entities: 2.0.2 - dev: true - - /deep-equal@2.2.1: - resolution: {integrity: sha512-lKdkdV6EOGoVn65XaOsPdH4rMxTZOnmFyuIkMjM1i5HHCbfjC97dawgTAy0deYNfuqUqW+Q5VrVaQYtUpSd6yQ==} - dependencies: - array-buffer-byte-length: 1.0.0 - call-bind: 1.0.2 - es-get-iterator: 1.1.3 - get-intrinsic: 1.2.1 - is-arguments: 1.1.1 - is-array-buffer: 3.0.2 - is-date-object: 1.0.5 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - isarray: 2.0.5 - object-is: 1.1.5 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.5.0 - side-channel: 1.0.4 - which-boxed-primitive: 1.0.2 - which-collection: 1.0.1 - which-typed-array: 1.1.9 - dev: true - - /deep-is@0.1.4: - resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - dev: true - - /default-browser-id@3.0.0: - resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==} - engines: {node: '>=12'} - dependencies: - bplist-parser: 0.2.0 - untildify: 4.0.0 - dev: true - - /default-browser@4.0.0: - resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==} - engines: {node: '>=14.16'} - dependencies: - bundle-name: 3.0.0 - default-browser-id: 3.0.0 - execa: 7.1.1 - titleize: 3.0.0 - dev: true - - /defaults@1.0.4: - resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} - dependencies: - clone: 1.0.4 - dev: true - - /define-lazy-prop@3.0.0: - resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} - engines: {node: '>=12'} - dev: true - - /define-properties@1.2.0: - resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} - engines: {node: '>= 0.4'} - dependencies: - has-property-descriptors: 1.0.0 - object-keys: 1.1.1 - dev: true - - /delayed-stream@1.0.0: - resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} - engines: {node: '>=0.4.0'} - - /delegate@3.2.0: - resolution: {integrity: sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==} - dev: false - optional: true - - /dequal@2.0.3: - resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} - engines: {node: '>=6'} - dev: true - - /detect-indent@6.1.0: - resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} - engines: {node: '>=8'} - dev: true - - /didyoumean@1.2.2: - resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} - dev: true - - /diff@4.0.2: - resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} - engines: {node: '>=0.3.1'} - dev: true - - /diff@5.1.0: - resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} - engines: {node: '>=0.3.1'} - dev: true - - /dir-glob@3.0.1: - resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} - engines: {node: '>=8'} - dependencies: - path-type: 4.0.0 - - /dlv@1.1.3: - resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==} - dev: true - - /doctrine@2.1.0: - resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} - engines: {node: '>=0.10.0'} - dependencies: - esutils: 2.0.3 - dev: true - - /doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dependencies: - esutils: 2.0.3 - dev: true - - /dotenv@16.0.3: - resolution: {integrity: sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==} - engines: {node: '>=12'} - dev: true - - /dotenv@16.3.1: - resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} - engines: {node: '>=12'} - - /eastasianwidth@0.2.0: - resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - dev: true - - /electron-to-chromium@1.4.435: - resolution: {integrity: sha512-B0CBWVFhvoQCW/XtjRzgrmqcgVWg6RXOEM/dK59+wFV93BFGR6AeNKc4OyhM+T3IhJaOOG8o/V+33Y2mwJWtzw==} - dev: true - - /emoji-regex@7.0.3: - resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} - dev: false - - /emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - - /emoji-regex@9.2.2: - resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} - dev: true - - /enhanced-resolve@5.15.0: - resolution: {integrity: sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==} - engines: {node: '>=10.13.0'} - dependencies: - graceful-fs: 4.2.11 - tapable: 2.2.1 - dev: true - - /enquirer@2.3.6: - resolution: {integrity: sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==} - engines: {node: '>=8.6'} - dependencies: - ansi-colors: 4.1.3 - dev: true - - /envinfo@7.10.0: - resolution: {integrity: sha512-ZtUjZO6l5mwTHvc1L9+1q5p/R3wTopcfqMW8r5t8SJSKqeVI/LtajORwRFEKpEFuekjD0VBjwu1HMxL4UalIRw==} - engines: {node: '>=4'} - hasBin: true - dev: false - - /epicfail@3.0.0: - resolution: {integrity: sha512-zf7vvWZ2tI2+P1674dmcyPWopD/0FC2BrAi0DvDY0uKGmrB66rwpRVlOYKFlGwRO4Q6bpkoCTPhjqvi5hMOavQ==} - dependencies: - chalk: 4.1.2 - envinfo: 7.10.0 - node-fetch: 2.6.11 - pkg-up: 3.1.0 - transitivePeerDependencies: - - encoding - dev: false - - /error-ex@1.3.2: - resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - dependencies: - is-arrayish: 0.2.1 - dev: true - - /es-abstract@1.21.2: - resolution: {integrity: sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==} - engines: {node: '>= 0.4'} - dependencies: - array-buffer-byte-length: 1.0.0 - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - es-set-tostringtag: 2.0.1 - es-to-primitive: 1.2.1 - function.prototype.name: 1.1.5 - get-intrinsic: 1.2.1 - get-symbol-description: 1.0.0 - globalthis: 1.0.3 - gopd: 1.0.1 - has: 1.0.3 - has-property-descriptors: 1.0.0 - has-proto: 1.0.1 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - is-array-buffer: 3.0.2 - is-callable: 1.2.7 - is-negative-zero: 2.0.2 - is-regex: 1.1.4 - is-shared-array-buffer: 1.0.2 - is-string: 1.0.7 - is-typed-array: 1.1.10 - is-weakref: 1.0.2 - object-inspect: 1.12.3 - object-keys: 1.1.1 - object.assign: 4.1.4 - regexp.prototype.flags: 1.5.0 - safe-regex-test: 1.0.0 - string.prototype.trim: 1.2.7 - string.prototype.trimend: 1.0.6 - string.prototype.trimstart: 1.0.6 - typed-array-length: 1.0.4 - unbox-primitive: 1.0.2 - which-typed-array: 1.1.9 - dev: true - - /es-get-iterator@1.1.3: - resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - has-symbols: 1.0.3 - is-arguments: 1.1.1 - is-map: 2.0.2 - is-set: 2.0.2 - is-string: 1.0.7 - isarray: 2.0.5 - stop-iteration-iterator: 1.0.0 - dev: true - - /es-set-tostringtag@2.0.1: - resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.2.1 - has: 1.0.3 - has-tostringtag: 1.0.0 - dev: true - - /es-shim-unscopables@1.0.0: - resolution: {integrity: sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==} - dependencies: - has: 1.0.3 - dev: true - - /es-to-primitive@1.2.1: - resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} - engines: {node: '>= 0.4'} - dependencies: - is-callable: 1.2.7 - is-date-object: 1.0.5 - is-symbol: 1.0.4 - dev: true - - /es5-ext@0.10.62: - resolution: {integrity: sha512-BHLqn0klhEpnOKSrzn/Xsz2UIW8j+cGmo9JLzr8BiUapV8hPL9+FliFqjwr9ngW7jWdnxv6eO+/LqyhJVqgrjA==} - engines: {node: '>=0.10'} - requiresBuild: true - dependencies: - es6-iterator: 2.0.3 - es6-symbol: 3.1.3 - next-tick: 1.1.0 - dev: false - - /es6-iterator@2.0.3: - resolution: {integrity: sha512-zw4SRzoUkd+cl+ZoE15A9o1oQd920Bb0iOJMQkQhl3jNc03YqVjAhG7scf9C5KWRU/R13Orf588uCC6525o02g==} - dependencies: - d: 1.0.1 - es5-ext: 0.10.62 - es6-symbol: 3.1.3 - dev: false - - /es6-symbol@3.1.3: - resolution: {integrity: sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==} - dependencies: - d: 1.0.1 - ext: 1.7.0 - dev: false - - /es6-weak-map@2.0.3: - resolution: {integrity: sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==} - dependencies: - d: 1.0.1 - es5-ext: 0.10.62 - es6-iterator: 2.0.3 - es6-symbol: 3.1.3 - dev: false - - /escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} - engines: {node: '>=6'} - dev: true - - /escape-string-regexp@1.0.5: - resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} - engines: {node: '>=0.8.0'} - - /escape-string-regexp@4.0.0: - resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} - engines: {node: '>=10'} - dev: true - - /eslint-config-neon@0.1.47(eslint@8.40.0)(svelte@3.59.2)(typescript@5.0.4): - resolution: {integrity: sha512-Ya9Q3u8DZufNwMDE3hRJ5+6VkZ+/OmJjyH1BLUotSBBEixiFZsOaouzWJer3edVkUf3VLjoZLUXrTlWvGnb34A==} - engines: {node: '>=16.0.0'} - dependencies: - '@angular-eslint/eslint-plugin': 16.0.3(eslint@8.40.0)(typescript@5.0.4) - '@angular-eslint/eslint-plugin-template': 16.0.3(eslint@8.40.0)(typescript@5.0.4) - '@angular-eslint/template-parser': 16.0.3(eslint@8.40.0)(typescript@5.0.4) - '@next/eslint-plugin-next': 13.4.6 - '@rushstack/eslint-patch': 1.3.2 - '@typescript-eslint/eslint-plugin': 5.60.0(@typescript-eslint/parser@5.60.0)(eslint@8.40.0)(typescript@5.0.4) - '@typescript-eslint/parser': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - astro-eslint-parser: 0.13.3 - eslint-config-prettier: 8.8.0(eslint@8.40.0) - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.60.0)(eslint-plugin-i@2.27.5-4)(eslint@8.40.0) - eslint-plugin-astro: 0.26.2(eslint@8.40.0) - eslint-plugin-cypress: 2.13.3(eslint@8.40.0) - eslint-plugin-import: /eslint-plugin-i@2.27.5-4(@typescript-eslint/parser@5.60.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) - eslint-plugin-jest: 27.2.2(@typescript-eslint/eslint-plugin@5.60.0)(eslint@8.40.0)(typescript@5.0.4) - eslint-plugin-jsdoc: 43.2.0(eslint@8.40.0) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.40.0) - eslint-plugin-lodash: 7.4.0(eslint@8.40.0) - eslint-plugin-mdx: 2.1.0(eslint@8.40.0) - eslint-plugin-n: 15.7.0(eslint@8.40.0) - eslint-plugin-promise: 6.1.1(eslint@8.40.0) - eslint-plugin-react: 7.32.2(eslint@8.40.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.40.0) - eslint-plugin-rxjs: 5.0.3(eslint@8.40.0)(typescript@5.0.4) - eslint-plugin-rxjs-angular: 2.0.1(eslint@8.40.0)(typescript@5.0.4) - eslint-plugin-sonarjs: 0.19.0(eslint@8.40.0) - eslint-plugin-svelte3: 4.0.0(eslint@8.40.0)(svelte@3.59.2) - eslint-plugin-tsdoc: 0.2.17 - eslint-plugin-typescript-sort-keys: 2.3.0(@typescript-eslint/parser@5.60.0)(eslint@8.40.0)(typescript@5.0.4) - eslint-plugin-unicorn: 47.0.0(eslint@8.40.0) - eslint-plugin-vue: 9.15.0(eslint@8.40.0) - vue-eslint-parser: 9.3.1(eslint@8.40.0) - transitivePeerDependencies: - - eslint - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - jest - - supports-color - - svelte - - typescript - dev: true - - /eslint-config-prettier@8.8.0(eslint@8.40.0): - resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - dependencies: - eslint: 8.40.0 - dev: true - - /eslint-etc@5.2.1(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-lFJBSiIURdqQKq9xJhvSJFyPA+VeTh5xvk24e8pxVL7bwLBtGF60C/KRkLTMrvCZ6DA3kbPuYhLWY0TZMlqTsg==} - peerDependencies: - eslint: ^8.0.0 - typescript: '>=4.0.0' - dependencies: - '@typescript-eslint/experimental-utils': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - eslint: 8.40.0 - tsutils: 3.21.0(typescript@5.0.4) - tsutils-etc: 1.4.2(tsutils@3.21.0)(typescript@5.0.4) - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-import-resolver-node@0.3.7: - resolution: {integrity: sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA==} - dependencies: - debug: 3.2.7(supports-color@5.5.0) - is-core-module: 2.12.1 - resolve: 1.22.2 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-import-resolver-typescript@3.5.5(@typescript-eslint/parser@5.60.0)(eslint-plugin-i@2.27.5-4)(eslint@8.40.0): - resolution: {integrity: sha512-TdJqPHs2lW5J9Zpe17DZNQuDnox4xo2o+0tE7Pggain9Rbc19ik8kFtXdxZ250FVx2kF4vlt2RSf4qlUpG7bhw==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '*' - eslint-plugin-import: '*' - dependencies: - debug: 4.3.4(supports-color@5.5.0) - enhanced-resolve: 5.15.0 - eslint: 8.40.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.60.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) - eslint-plugin-import: /eslint-plugin-i@2.27.5-4(@typescript-eslint/parser@5.60.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) - get-tsconfig: 4.6.0 - globby: 13.2.0 - is-core-module: 2.12.1 - is-glob: 4.0.3 - synckit: 0.8.5 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-node - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-mdx@2.1.0(eslint@8.40.0): - resolution: {integrity: sha512-dVLHDcpCFJRXZhxEQx8nKc68KT1qm+9JOeMD+j1/WW2h+oco1j7Qq+CLrX2kP64LI3fF9TUtj7a0AvncHUME6w==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '>=8.0.0' - dependencies: - acorn: 8.9.0 - acorn-jsx: 5.3.2(acorn@8.9.0) - eslint: 8.40.0 - espree: 9.5.2 - estree-util-visit: 1.2.1 - remark-mdx: 2.3.0 - remark-parse: 10.0.2 - remark-stringify: 10.0.3 - synckit: 0.8.5 - tslib: 2.5.3 - unified: 10.1.2 - unified-engine: 10.1.0 - unist-util-visit: 4.1.2 - uvu: 0.5.6 - vfile: 5.3.7 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.60.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0): - resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} - engines: {node: '>=4'} - peerDependencies: - '@typescript-eslint/parser': '*' - eslint: '*' - eslint-import-resolver-node: '*' - eslint-import-resolver-typescript: '*' - eslint-import-resolver-webpack: '*' - peerDependenciesMeta: - '@typescript-eslint/parser': - optional: true - eslint: - optional: true - eslint-import-resolver-node: - optional: true - eslint-import-resolver-typescript: - optional: true - eslint-import-resolver-webpack: - optional: true - dependencies: - '@typescript-eslint/parser': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - debug: 3.2.7(supports-color@5.5.0) - eslint: 8.40.0 - eslint-import-resolver-node: 0.3.7 - eslint-import-resolver-typescript: 3.5.5(@typescript-eslint/parser@5.60.0)(eslint-plugin-i@2.27.5-4)(eslint@8.40.0) - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-astro@0.26.2(eslint@8.40.0): - resolution: {integrity: sha512-unST3JZO+W8Beoxfyu6Gpgbx9KAZJ3QBBT7SLzeB5kUbuSrJ40uzYbdsE4wgkZWyiAHkvjAAvQzDP9vH6Dk2eg==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '>=7.0.0' - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) - '@jridgewell/sourcemap-codec': 1.4.15 - '@typescript-eslint/types': 5.60.0 - astro-eslint-parser: 0.13.3 - eslint: 8.40.0 - postcss: 8.4.24 - postcss-selector-parser: 6.0.13 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-cypress@2.13.3(eslint@8.40.0): - resolution: {integrity: sha512-nAPjZE5WopCsgJwl3vHm5iafpV+ZRO76Z9hMyRygWhmg5ODXDPd+9MaPl7kdJ2azj+sO87H3P1PRnggIrz848g==} - peerDependencies: - eslint: '>= 3.2.1' - dependencies: - eslint: 8.40.0 - globals: 11.12.0 - dev: true - - /eslint-plugin-es@4.1.0(eslint@8.40.0): - resolution: {integrity: sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ==} - engines: {node: '>=8.10.0'} - peerDependencies: - eslint: '>=4.19.1' - dependencies: - eslint: 8.40.0 - eslint-utils: 2.1.0 - regexpp: 3.2.0 - dev: true - - /eslint-plugin-i@2.27.5-4(@typescript-eslint/parser@5.60.0)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0): - resolution: {integrity: sha512-X3Z+dp9nZw7d/y41EDO6JyFw4WVMOT91SFuoJvL0C0/4M1l6NxQ5mLTjXHuYhq0AazW75pAmj25yMk5wPMzjsw==} - engines: {node: '>=12'} - peerDependencies: - eslint: ^7.2.0 || ^8 - dependencies: - debug: 3.2.7(supports-color@5.5.0) - doctrine: 2.1.0 - eslint: 8.40.0 - eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.60.0)(eslint-import-resolver-node@0.3.7)(eslint-import-resolver-typescript@3.5.5)(eslint@8.40.0) - get-tsconfig: 4.6.0 - is-glob: 4.0.3 - minimatch: 3.1.2 - resolve: 1.22.3 - semver: 7.5.3 - transitivePeerDependencies: - - '@typescript-eslint/parser' - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - dev: true - - /eslint-plugin-jest@27.2.2(@typescript-eslint/eslint-plugin@5.60.0)(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-euzbp06F934Z7UDl5ZUaRPLAc9MKjh0rMPERrHT7UhlCEwgb25kBj37TvMgWeHZVkR5I9CayswrpoaqZU1RImw==} - engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} - peerDependencies: - '@typescript-eslint/eslint-plugin': ^5.0.0 - eslint: ^7.0.0 || ^8.0.0 - jest: '*' - peerDependenciesMeta: - '@typescript-eslint/eslint-plugin': - optional: true - jest: - optional: true - dependencies: - '@typescript-eslint/eslint-plugin': 5.60.0(@typescript-eslint/parser@5.60.0)(eslint@8.40.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - eslint: 8.40.0 - transitivePeerDependencies: - - supports-color - - typescript - dev: true - - /eslint-plugin-jsdoc@43.2.0(eslint@8.40.0): - resolution: {integrity: sha512-Hst7XUfqh28UmPD52oTXmjaRN3d0KrmOZdgtp4h9/VHUJD3Evoo82ZGXi1TtRDWgWhvqDIRI63O49H0eH7NrZQ==} - engines: {node: '>=16'} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - dependencies: - '@es-joy/jsdoccomment': 0.38.0 - are-docs-informative: 0.0.2 - comment-parser: 1.3.1 - debug: 4.3.4(supports-color@5.5.0) - escape-string-regexp: 4.0.0 - eslint: 8.40.0 - esquery: 1.5.0 - semver: 7.5.2 - spdx-expression-parse: 3.0.1 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.40.0): - resolution: {integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==} - engines: {node: '>=4.0'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - '@babel/runtime': 7.22.5 - aria-query: 5.2.1 - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - ast-types-flow: 0.0.7 - axe-core: 4.7.2 - axobject-query: 3.2.1 - damerau-levenshtein: 1.0.8 - emoji-regex: 9.2.2 - eslint: 8.40.0 - has: 1.0.3 - jsx-ast-utils: 3.3.3 - language-tags: 1.0.5 - minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - semver: 6.3.0 - dev: true - - /eslint-plugin-lodash@7.4.0(eslint@8.40.0): - resolution: {integrity: sha512-Tl83UwVXqe1OVeBRKUeWcfg6/pCW1GTRObbdnbEJgYwjxp5Q92MEWQaH9+dmzbRt6kvYU1Mp893E79nJiCSM8A==} - engines: {node: '>=10'} - peerDependencies: - eslint: '>=2' - dependencies: - eslint: 8.40.0 - lodash: 4.17.21 - dev: true - - /eslint-plugin-markdown@3.0.0(eslint@8.40.0): - resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - eslint: 8.40.0 - mdast-util-from-markdown: 0.8.5 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-mdx@2.1.0(eslint@8.40.0): - resolution: {integrity: sha512-Q8P1JXv+OrD+xhWT95ZyV30MMdnqJ1voKtXfxWrJJ2XihJRI15gPmXbIWY9t8CjA8C//isfzNOmnVY9e3GTL0g==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - peerDependencies: - eslint: '>=8.0.0' - dependencies: - eslint: 8.40.0 - eslint-mdx: 2.1.0(eslint@8.40.0) - eslint-plugin-markdown: 3.0.0(eslint@8.40.0) - remark-mdx: 2.3.0 - remark-parse: 10.0.2 - remark-stringify: 10.0.3 - tslib: 2.5.3 - unified: 10.1.2 - vfile: 5.3.7 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-n@15.7.0(eslint@8.40.0): - resolution: {integrity: sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==} - engines: {node: '>=12.22.0'} - peerDependencies: - eslint: '>=7.0.0' - dependencies: - builtins: 5.0.1 - eslint: 8.40.0 - eslint-plugin-es: 4.1.0(eslint@8.40.0) - eslint-utils: 3.0.0(eslint@8.40.0) - ignore: 5.2.4 - is-core-module: 2.12.1 - minimatch: 3.1.2 - resolve: 1.22.2 - semver: 7.5.2 - dev: true - - /eslint-plugin-promise@6.1.1(eslint@8.40.0): - resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 - dependencies: - eslint: 8.40.0 - dev: true - - /eslint-plugin-react-hooks@4.6.0(eslint@8.40.0): - resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} - engines: {node: '>=10'} - peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 - dependencies: - eslint: 8.40.0 - dev: true - - /eslint-plugin-react@7.32.2(eslint@8.40.0): - resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} - engines: {node: '>=4'} - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - dependencies: - array-includes: 3.1.6 - array.prototype.flatmap: 1.3.1 - array.prototype.tosorted: 1.1.1 - doctrine: 2.1.0 - eslint: 8.40.0 - estraverse: 5.3.0 - jsx-ast-utils: 3.3.3 - minimatch: 3.1.2 - object.entries: 1.1.6 - object.fromentries: 2.0.6 - object.hasown: 1.1.2 - object.values: 1.1.6 - prop-types: 15.8.1 - resolve: 2.0.0-next.4 - semver: 6.3.0 - string.prototype.matchall: 4.0.8 - dev: true - - /eslint-plugin-rxjs-angular@2.0.1(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-HJ/JHhjDJKyFUmM8o7rS91WNkNv7W7Z/okR5X3hqG7tKVMLOJi4T63Aa74ECuCdowmdfW75p2RrW4R8WeoZIKQ==} - peerDependencies: - eslint: ^8.0.0 - typescript: '>=4.0.0' - dependencies: - '@typescript-eslint/experimental-utils': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - common-tags: 1.8.2 - eslint: 8.40.0 - eslint-etc: 5.2.1(eslint@8.40.0)(typescript@5.0.4) - requireindex: 1.2.0 - tslib: 2.5.3 - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-rxjs@5.0.3(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-fcVkqLmYLRfRp+ShafjpUKuaZ+cw/sXAvM5dfSxiEr7M28QZ/NY7vaOr09FB4rSaZsQyLBnNPh5SL+4EgKjh8Q==} - peerDependencies: - eslint: ^8.0.0 - typescript: '>=4.0.0' - dependencies: - '@typescript-eslint/experimental-utils': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - common-tags: 1.8.2 - decamelize: 5.0.1 - eslint: 8.40.0 - eslint-etc: 5.2.1(eslint@8.40.0)(typescript@5.0.4) - requireindex: 1.2.0 - rxjs-report-usage: 1.0.6 - tslib: 2.5.3 - tsutils: 3.21.0(typescript@5.0.4) - tsutils-etc: 1.4.2(tsutils@3.21.0)(typescript@5.0.4) - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-sonarjs@0.19.0(eslint@8.40.0): - resolution: {integrity: sha512-6+s5oNk5TFtVlbRxqZN7FIGmjdPCYQKaTzFPmqieCmsU1kBYDzndTeQav0xtQNwZJWu5awWfTGe8Srq9xFOGnw==} - engines: {node: '>=14'} - peerDependencies: - eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 - dependencies: - eslint: 8.40.0 - dev: true - - /eslint-plugin-svelte3@4.0.0(eslint@8.40.0)(svelte@3.59.2): - resolution: {integrity: sha512-OIx9lgaNzD02+MDFNLw0GEUbuovNcglg+wnd/UY0fbZmlQSz7GlQiQ1f+yX0XvC07XPcDOnFcichqI3xCwp71g==} - peerDependencies: - eslint: '>=8.0.0' - svelte: ^3.2.0 - dependencies: - eslint: 8.40.0 - svelte: 3.59.2 - dev: true - - /eslint-plugin-tsdoc@0.2.17: - resolution: {integrity: sha512-xRmVi7Zx44lOBuYqG8vzTXuL6IdGOeF9nHX17bjJ8+VE6fsxpdGem0/SBTmAwgYMKYB1WBkqRJVQ+n8GK041pA==} - dependencies: - '@microsoft/tsdoc': 0.14.2 - '@microsoft/tsdoc-config': 0.16.2 - dev: true - - /eslint-plugin-typescript-sort-keys@2.3.0(@typescript-eslint/parser@5.60.0)(eslint@8.40.0)(typescript@5.0.4): - resolution: {integrity: sha512-3LAcYulo5gNYiPWee+TksITfvWeBuBjGgcSLTacPESFVKEoy8laOQuZvJlSCwTBHT2SCGIxr3bJ56zuux+3MCQ==} - engines: {node: 12 || >= 13.9} - peerDependencies: - '@typescript-eslint/parser': ^1 || ^2 || ^3 || ^4 || ^5 - eslint: ^5 || ^6 || ^7 || ^8 - typescript: ^3 || ^4 || ^5 - dependencies: - '@typescript-eslint/experimental-utils': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - '@typescript-eslint/parser': 5.60.0(eslint@8.40.0)(typescript@5.0.4) - eslint: 8.40.0 - json-schema: 0.4.0 - natural-compare-lite: 1.4.0 - typescript: 5.0.4 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-plugin-unicorn@47.0.0(eslint@8.40.0): - resolution: {integrity: sha512-ivB3bKk7fDIeWOUmmMm9o3Ax9zbMz1Bsza/R2qm46ufw4T6VBFBaJIR1uN3pCKSmSXm8/9Nri8V+iUut1NhQGA==} - engines: {node: '>=16'} - peerDependencies: - eslint: '>=8.38.0' - dependencies: - '@babel/helper-validator-identifier': 7.22.5 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) - ci-info: 3.8.0 - clean-regexp: 1.0.0 - eslint: 8.40.0 - esquery: 1.5.0 - indent-string: 4.0.0 - is-builtin-module: 3.2.1 - jsesc: 3.0.2 - lodash: 4.17.21 - pluralize: 8.0.0 - read-pkg-up: 7.0.1 - regexp-tree: 0.1.27 - regjsparser: 0.10.0 - safe-regex: 2.1.1 - semver: 7.5.2 - strip-indent: 3.0.0 - dev: true - - /eslint-plugin-vue@9.15.0(eslint@8.40.0): - resolution: {integrity: sha512-XYzpK6e2REli100+6iCeBA69v6Sm0D/yK2FZP+fCeNt0yH/m82qZQq+ztseyV0JsKdhFysuSEzeE1yCmSC92BA==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) - eslint: 8.40.0 - natural-compare: 1.4.0 - nth-check: 2.1.1 - postcss-selector-parser: 6.0.13 - semver: 7.5.2 - vue-eslint-parser: 9.3.1(eslint@8.40.0) - xml-name-validator: 4.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /eslint-scope@5.1.1: - resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} - engines: {node: '>=8.0.0'} - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: true - - /eslint-scope@7.2.0: - resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 - dev: true - - /eslint-utils@2.1.0: - resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} - engines: {node: '>=6'} - dependencies: - eslint-visitor-keys: 1.3.0 - dev: true - - /eslint-utils@3.0.0(eslint@8.40.0): - resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} - engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} - peerDependencies: - eslint: '>=5' - dependencies: - eslint: 8.40.0 - eslint-visitor-keys: 2.1.0 - dev: true - - /eslint-visitor-keys@1.3.0: - resolution: {integrity: sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==} - engines: {node: '>=4'} - dev: true - - /eslint-visitor-keys@2.1.0: - resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==} - engines: {node: '>=10'} - dev: true - - /eslint-visitor-keys@3.4.1: - resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dev: true - - /eslint@8.40.0: - resolution: {integrity: sha512-bvR+TsP9EHL3TqNtj9sCNJVAFK3fBN8Q7g5waghxyRsPLIMwL73XSKnZFK0hk/O2ANC+iAoq6PWMQ+IfBAJIiQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - hasBin: true - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.40.0) - '@eslint-community/regexpp': 4.5.1 - '@eslint/eslintrc': 2.0.3 - '@eslint/js': 8.40.0 - '@humanwhocodes/config-array': 0.11.10 - '@humanwhocodes/module-importer': 1.0.1 - '@nodelib/fs.walk': 1.2.8 - ajv: 6.12.6 - chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.4(supports-color@5.5.0) - doctrine: 3.0.0 - escape-string-regexp: 4.0.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 - espree: 9.5.2 - esquery: 1.5.0 - esutils: 2.0.3 - fast-deep-equal: 3.1.3 - file-entry-cache: 6.0.1 - find-up: 5.0.0 - glob-parent: 6.0.2 - globals: 13.20.0 - grapheme-splitter: 1.0.4 - ignore: 5.2.4 - import-fresh: 3.3.0 - imurmurhash: 0.1.4 - is-glob: 4.0.3 - is-path-inside: 3.0.3 - js-sdsl: 4.4.1 - js-yaml: 4.1.0 - json-stable-stringify-without-jsonify: 1.0.1 - levn: 0.4.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 - natural-compare: 1.4.0 - optionator: 0.9.1 - strip-ansi: 6.0.1 - strip-json-comments: 3.1.1 - text-table: 0.2.0 - transitivePeerDependencies: - - supports-color - dev: true - - /espree@9.5.2: - resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - dependencies: - acorn: 8.9.0 - acorn-jsx: 5.3.2(acorn@8.9.0) - eslint-visitor-keys: 3.4.1 - dev: true - - /esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - dev: true - - /esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} - engines: {node: '>=0.10'} - dependencies: - estraverse: 5.3.0 - dev: true - - /esrecurse@4.3.0: - resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} - engines: {node: '>=4.0'} - dependencies: - estraverse: 5.3.0 - dev: true - - /estraverse@4.3.0: - resolution: {integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==} - engines: {node: '>=4.0'} - dev: true - - /estraverse@5.3.0: - resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} - engines: {node: '>=4.0'} - dev: true - - /estree-util-is-identifier-name@2.1.0: - resolution: {integrity: sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ==} - dev: true - - /estree-util-visit@1.2.1: - resolution: {integrity: sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw==} - dependencies: - '@types/estree-jsx': 1.0.0 - '@types/unist': 2.0.6 - dev: true - - /esutils@2.0.3: - resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} - engines: {node: '>=0.10.0'} - dev: true - - /event-emitter@0.3.5: - resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} - dependencies: - d: 1.0.1 - es5-ext: 0.10.62 - dev: false - - /execa@5.1.1: - resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} - engines: {node: '>=10'} - dependencies: - cross-spawn: 7.0.3 - get-stream: 6.0.1 - human-signals: 2.1.0 - is-stream: 2.0.1 - merge-stream: 2.0.0 - npm-run-path: 4.0.1 - onetime: 5.1.2 - signal-exit: 3.0.7 - strip-final-newline: 2.0.0 - - /execa@7.1.1: - resolution: {integrity: sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==} - engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} - dependencies: - cross-spawn: 7.0.3 - get-stream: 6.0.1 - human-signals: 4.3.1 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.1.0 - onetime: 6.0.0 - signal-exit: 3.0.7 - strip-final-newline: 3.0.0 - dev: true - - /execcli@5.0.6: - resolution: {integrity: sha512-du+uy/Ew2P90PKjSHI89u/XuqVaBDzvaJ6ePn40JaOy7owFQNsYDbd5AoR5A559HEAb1i5HO22rJxtgVonf5Bg==} - engines: {node: '>=8', npm: '>=4'} - dependencies: - argx: 4.0.4 - arrayreduce: 2.1.0 - findout: 3.0.2 - hasbin: 1.2.3 - stringcase: 4.3.1 - dev: false - - /ext@1.7.0: - resolution: {integrity: sha512-6hxeJYaL110a9b5TEJSj0gojyHQAmA2ch5Os+ySCiA1QGdS697XWY1pzsrSjqA9LDEEgdB/KypIlR59RcLuHYw==} - dependencies: - type: 2.7.2 - dev: false - - /extend@3.0.2: - resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - - /extendable-error@0.1.7: - resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} - dev: true - - /external-editor@3.1.0: - resolution: {integrity: sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==} - engines: {node: '>=4'} - dependencies: - chardet: 0.7.0 - iconv-lite: 0.4.24 - tmp: 0.0.33 - - /fast-deep-equal@3.1.3: - resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - dev: true - - /fast-glob@3.2.12: - resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} - engines: {node: '>=8.6.0'} - dependencies: - '@nodelib/fs.stat': 2.0.5 - '@nodelib/fs.walk': 1.2.8 - glob-parent: 5.1.2 - merge2: 1.4.1 - micromatch: 4.0.5 - - /fast-json-stable-stringify@2.1.0: - resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} - dev: true - - /fast-levenshtein@2.0.6: - resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - dev: true - - /fastq@1.15.0: - resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} - dependencies: - reusify: 1.0.4 - - /fault@1.0.4: - resolution: {integrity: sha512-CJ0HCB5tL5fYTEA7ToAq5+kTwd++Borf1/bifxd9iT70QcXr4MRrO3Llf8Ifs70q+SJcGHFtnIE/Nw6giCtECA==} - dependencies: - format: 0.2.2 - dev: false - - /fault@2.0.1: - resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} - dependencies: - format: 0.2.2 - dev: true - - /figures@3.2.0: - resolution: {integrity: sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==} - engines: {node: '>=8'} - dependencies: - escape-string-regexp: 1.0.5 - dev: false - - /file-entry-cache@6.0.1: - resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - flat-cache: 3.0.4 - dev: true - - /fill-range@7.0.1: - resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} - engines: {node: '>=8'} - dependencies: - to-regex-range: 5.0.1 - - /find-up@3.0.0: - resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} - engines: {node: '>=6'} - dependencies: - locate-path: 3.0.0 - dev: false - - /find-up@4.1.0: - resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} - engines: {node: '>=8'} - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - dev: true - - /find-up@5.0.0: - resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} - engines: {node: '>=10'} - dependencies: - locate-path: 6.0.0 - path-exists: 4.0.0 - dev: true - - /find-yarn-workspace-root2@1.2.16: - resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} - dependencies: - micromatch: 4.0.5 - pkg-dir: 4.2.0 - dev: true - - /findout@3.0.2: - resolution: {integrity: sha512-eatRX+s8jm8ml/S9Y5NBBjR4W8i7IeEmyddB3Lidak/nPZNfDxGzLEIaMKgeNj5/LHA1i0dC4Gwsb13H1bx+AA==} - engines: {node: '>=7.6', npm: '>=4'} - dev: false - - /flat-cache@3.0.4: - resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - flatted: 3.2.7 - rimraf: 3.0.2 - dev: true - - /flatted@3.2.7: - resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} - dev: true - - /for-each@0.3.3: - resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - dependencies: - is-callable: 1.2.7 - dev: true - - /foreground-child@3.1.1: - resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} - engines: {node: '>=14'} - dependencies: - cross-spawn: 7.0.3 - signal-exit: 4.0.2 - dev: true - - /form-data@3.0.1: - resolution: {integrity: sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==} - engines: {node: '>= 6'} - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - dev: true - - /form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} - engines: {node: '>= 6'} - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - dev: false - - /format@0.2.2: - resolution: {integrity: sha512-wzsgA6WOq+09wrU1tsJ09udeR/YZRaeArL9e1wPbFg3GG2yDnC2ldKpxs4xunpFF9DgqCqOIra3bc1HWrJ37Ww==} - engines: {node: '>=0.4.x'} - - /fraction.js@4.2.0: - resolution: {integrity: sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==} - dev: true - - /fs-extra@11.1.1: - resolution: {integrity: sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==} - engines: {node: '>=14.14'} - dependencies: - graceful-fs: 4.2.11 - jsonfile: 6.1.0 - universalify: 2.0.0 - dev: true - - /fs-extra@7.0.1: - resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} - engines: {node: '>=6 <7 || >=8'} - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - dev: true - - /fs-extra@8.1.0: - resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} - engines: {node: '>=6 <7 || >=8'} - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - dev: true - - /fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - dev: true - - /fsevents@2.3.2: - resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} - engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} - os: [darwin] - requiresBuild: true - dev: true - optional: true - - /function-bind@1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - - /function.prototype.name@1.1.5: - resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - functions-have-names: 1.2.3 - dev: true - - /functions-have-names@1.2.3: - resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - dev: true - - /gen-esm-wrapper@1.1.3: - resolution: {integrity: sha512-LNHZ+QpaCW/0VhABIbXn45V+P8kFvjjwuue9hbV23eOjuFVz6c0FE3z1XpLX9pSjLW7UmtCkXo5F9vhZWVs8oQ==} - hasBin: true - dependencies: - is-valid-identifier: 2.0.2 - dev: true - - /get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - - /get-intrinsic@1.2.1: - resolution: {integrity: sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==} - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-proto: 1.0.1 - has-symbols: 1.0.3 - - /get-stream@6.0.1: - resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} - engines: {node: '>=10'} - - /get-symbol-description@1.0.0: - resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - dev: true - - /get-tsconfig@4.6.0: - resolution: {integrity: sha512-lgbo68hHTQnFddybKbbs/RDRJnJT5YyGy2kQzVwbq+g67X73i+5MVTval34QxGkOe9X5Ujf1UYpCaphLyltjEg==} - dependencies: - resolve-pkg-maps: 1.0.0 - dev: true - - /gitconfig@2.0.8: - resolution: {integrity: sha512-qOB1QswIHFNKAOPN0pEu7U1iyajLBv3Tz5X630UlkAtKM904I4dO7XIjH84wmR2SUVAgaVR99UC9U4ABJujAJQ==} - engines: {node: '>=6', npm: '>=3'} - dependencies: - argx: 3.0.2 - arrayreduce: 2.1.0 - askconfig: 4.0.4 - co: 4.6.0 - execcli: 5.0.6 - lodash.get: 4.4.2 - objnest: 5.1.1 - dev: false - - /glob-parent@5.1.2: - resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} - engines: {node: '>= 6'} - dependencies: - is-glob: 4.0.3 - - /glob-parent@6.0.2: - resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} - engines: {node: '>=10.13.0'} - dependencies: - is-glob: 4.0.3 - dev: true - - /glob@10.2.7: - resolution: {integrity: sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA==} - engines: {node: '>=16 || 14 >=14.17'} - hasBin: true - dependencies: - foreground-child: 3.1.1 - jackspeak: 2.2.1 - minimatch: 9.0.1 - minipass: 6.0.2 - path-scurry: 1.9.2 - dev: true - - /glob@7.1.6: - resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /glob@7.1.7: - resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - - /glob@8.1.0: - resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} - engines: {node: '>=12'} - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 5.1.6 - once: 1.4.0 - dev: true - - /globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - - /globals@13.20.0: - resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} - engines: {node: '>=8'} - dependencies: - type-fest: 0.20.2 - dev: true - - /globalthis@1.0.3: - resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} - engines: {node: '>= 0.4'} - dependencies: - define-properties: 1.2.0 - dev: true - - /globby@11.1.0: - resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} - engines: {node: '>=10'} - dependencies: - array-union: 2.1.0 - dir-glob: 3.0.1 - fast-glob: 3.2.12 - ignore: 5.2.4 - merge2: 1.4.1 - slash: 3.0.0 - - /globby@13.2.0: - resolution: {integrity: sha512-jWsQfayf13NvqKUIL3Ta+CIqMnvlaIDFveWE/dpOZ9+3AMEJozsxDvKA02zync9UuvOM8rOXzsD5GqKP4OnWPQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - dir-glob: 3.0.1 - fast-glob: 3.2.12 - ignore: 5.2.4 - merge2: 1.4.1 - slash: 4.0.0 - dev: true - - /good-listener@1.2.2: - resolution: {integrity: sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==} - dependencies: - delegate: 3.2.0 - dev: false - optional: true - - /gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} - dependencies: - get-intrinsic: 1.2.1 - dev: true - - /graceful-fs@4.2.11: - resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - dev: true - - /grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - dev: true - - /handlebars@4.7.7: - resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} - engines: {node: '>=0.4.7'} - hasBin: true - dependencies: - minimist: 1.2.8 - neo-async: 2.6.2 - source-map: 0.6.1 - wordwrap: 1.0.0 - optionalDependencies: - uglify-js: 3.17.4 - - /hard-rejection@2.1.0: - resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} - engines: {node: '>=6'} - dev: true - - /has-bigints@1.0.2: - resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} - dev: true - - /has-flag@3.0.0: - resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} - engines: {node: '>=4'} - - /has-flag@4.0.0: - resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} - engines: {node: '>=8'} - - /has-property-descriptors@1.0.0: - resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} - dependencies: - get-intrinsic: 1.2.1 - dev: true - - /has-proto@1.0.1: - resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} - engines: {node: '>= 0.4'} - - /has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - - /has-tostringtag@1.0.0: - resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.3 - dev: true - - /has@1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} - dependencies: - function-bind: 1.1.1 - - /hasbin@1.2.3: - resolution: {integrity: sha512-CCd8e/w2w28G8DyZvKgiHnQJ/5XXDz6qiUHnthvtag/6T5acUeN5lqq+HMoBqcmgWueWDhiCplrw0Kb1zDACRg==} - engines: {node: '>=0.10'} - dependencies: - async: 1.5.2 - dev: false - - /hast-util-parse-selector@2.2.5: - resolution: {integrity: sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==} - dev: false - - /hastscript@5.1.2: - resolution: {integrity: sha512-WlztFuK+Lrvi3EggsqOkQ52rKbxkXL3RwB6t5lwoa8QLMemoWfBuL43eDrwOamJyR7uKQKdmKYaBH1NZBiIRrQ==} - dependencies: - comma-separated-tokens: 1.0.8 - hast-util-parse-selector: 2.2.5 - property-information: 5.6.0 - space-separated-tokens: 1.1.5 - dev: false - - /highlight.js@9.15.10: - resolution: {integrity: sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw==} - deprecated: Version no longer supported. Upgrade to @latest - dev: false - - /hoist-non-react-statics@3.3.2: - resolution: {integrity: sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==} - dependencies: - react-is: 16.13.1 - dev: false - - /hosted-git-info@2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} - dev: true - - /human-id@1.0.2: - resolution: {integrity: sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw==} - dev: true - - /human-signals@2.1.0: - resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} - engines: {node: '>=10.17.0'} - - /human-signals@4.3.1: - resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} - engines: {node: '>=14.18.0'} - dev: true - - /husky@7.0.4: - resolution: {integrity: sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==} - engines: {node: '>=12'} - hasBin: true - dev: true - - /iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - dependencies: - safer-buffer: 2.1.2 - - /iftype@3.0.2: - resolution: {integrity: sha512-vA/NSyCG3E7XXWC1hmbEDj8WvsduSzLblmj4m2Idywx8YC6CKqGTYzrnoxbMrC+qBcHz85P7uwBwYEY2rX1jvQ==} - engines: {node: '>=4', npm: '>=2'} - dependencies: - babel-runtime: 6.26.0 - dev: false - - /iftype@4.0.9: - resolution: {integrity: sha512-01Klo+04dkDzY193D1GVfOdQzmpqaYFJTAlZKRztkT/BOaU7sSnvxGimSln+7DMqLUP4tpDTNFgxqVPLYZVypA==} - engines: {node: '>=8', npm: '>=5'} - dev: false - - /ignore-by-default@1.0.1: - resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} - dev: true - - /ignore@5.2.4: - resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} - engines: {node: '>= 4'} - - /import-fresh@3.3.0: - resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==} - engines: {node: '>=6'} - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - dev: true - - /import-meta-resolve@2.2.2: - resolution: {integrity: sha512-f8KcQ1D80V7RnqVm+/lirO9zkOxjGxhaTC1IPrBGd3MEfNgmNG67tSUO9gTi2F3Blr2Az6g1vocaxzkVnWl9MA==} - dev: true - - /imurmurhash@0.1.4: - resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} - engines: {node: '>=0.8.19'} - dev: true - - /indent-string@4.0.0: - resolution: {integrity: sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==} - engines: {node: '>=8'} - dev: true - - /inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - - /inherits@2.0.1: - resolution: {integrity: sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==} - dev: true - - /inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true - - /ini@4.1.1: - resolution: {integrity: sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dev: true - - /inquirer@7.3.3: - resolution: {integrity: sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==} - engines: {node: '>=8.0.0'} - dependencies: - ansi-escapes: 4.3.2 - chalk: 4.1.2 - cli-cursor: 3.1.0 - cli-width: 3.0.0 - external-editor: 3.1.0 - figures: 3.2.0 - lodash: 4.17.21 - mute-stream: 0.0.8 - run-async: 2.4.1 - rxjs: 6.6.7 - string-width: 4.2.3 - strip-ansi: 6.0.1 - through: 2.3.8 - dev: false - - /internal-slot@1.0.5: - resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.2.1 - has: 1.0.3 - side-channel: 1.0.4 - dev: true - - /is-alphabetical@1.0.4: - resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} - - /is-alphabetical@2.0.1: - resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} - dev: true - - /is-alphanumerical@1.0.4: - resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} - dependencies: - is-alphabetical: 1.0.4 - is-decimal: 1.0.4 - - /is-alphanumerical@2.0.1: - resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} - dependencies: - is-alphabetical: 2.0.1 - is-decimal: 2.0.1 - dev: true - - /is-arguments@1.1.1: - resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-array-buffer@3.0.2: - resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - is-typed-array: 1.1.10 - dev: true - - /is-arrayish@0.2.1: - resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} - dev: true - - /is-bigint@1.0.4: - resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} - dependencies: - has-bigints: 1.0.2 - dev: true - - /is-binary-path@2.1.0: - resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} - engines: {node: '>=8'} - dependencies: - binary-extensions: 2.2.0 - dev: true - - /is-boolean-object@1.1.2: - resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-buffer@2.0.5: - resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} - engines: {node: '>=4'} - dev: true - - /is-builtin-module@3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} - engines: {node: '>=6'} - dependencies: - builtin-modules: 3.3.0 - dev: true - - /is-callable@1.2.7: - resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} - engines: {node: '>= 0.4'} - dev: true - - /is-ci@3.0.1: - resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} - hasBin: true - dependencies: - ci-info: 3.8.0 - dev: true - - /is-core-module@2.12.1: - resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} - dependencies: - has: 1.0.3 - dev: true - - /is-date-object@1.0.5: - resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - - /is-decimal@1.0.4: - resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} - - /is-decimal@2.0.1: - resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} - dev: true - - /is-docker@2.2.1: - resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} - engines: {node: '>=8'} - hasBin: true - dev: true - - /is-docker@3.0.0: - resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - hasBin: true - dev: true - - /is-empty@1.2.0: - resolution: {integrity: sha512-F2FnH/otLNJv0J6wc73A5Xo7oHLNnqplYqZhUu01tD54DIPvxIRSTSLkrUB/M0nHO4vo1O9PDfN4KoTxCzLh/w==} - dev: true - - /is-extglob@2.1.1: - resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} - engines: {node: '>=0.10.0'} - - /is-fullwidth-code-point@2.0.0: - resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} - engines: {node: '>=4'} - dev: false - - /is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - - /is-fullwidth-code-point@4.0.0: - resolution: {integrity: sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==} - engines: {node: '>=12'} - dev: true - - /is-glob@4.0.3: - resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} - engines: {node: '>=0.10.0'} - dependencies: - is-extglob: 2.1.1 - - /is-hexadecimal@1.0.4: - resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} - - /is-hexadecimal@2.0.1: - resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} - dev: true - - /is-inside-container@1.0.0: - resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} - engines: {node: '>=14.16'} - hasBin: true - dependencies: - is-docker: 3.0.0 - dev: true - - /is-map@2.0.2: - resolution: {integrity: sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==} - dev: true - - /is-negative-zero@2.0.2: - resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} - engines: {node: '>= 0.4'} - dev: true - - /is-number-object@1.0.7: - resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - - /is-number@7.0.0: - resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} - engines: {node: '>=0.12.0'} - - /is-path-inside@3.0.3: - resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} - engines: {node: '>=8'} - dev: true - - /is-plain-obj@1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} - dev: true - - /is-plain-obj@4.1.0: - resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} - engines: {node: '>=12'} - dev: true - - /is-promise@2.2.2: - resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} - dev: false - - /is-regex@1.1.4: - resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - has-tostringtag: 1.0.0 - dev: true - - /is-set@2.0.2: - resolution: {integrity: sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==} - dev: true - - /is-shared-array-buffer@1.0.2: - resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} - dependencies: - call-bind: 1.0.2 - dev: true - - /is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} - - /is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - - /is-string@1.0.7: - resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} - engines: {node: '>= 0.4'} - dependencies: - has-tostringtag: 1.0.0 - dev: true - - /is-subdir@1.2.0: - resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} - engines: {node: '>=4'} - dependencies: - better-path-resolve: 1.0.0 - dev: true - - /is-symbol@1.0.4: - resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} - engines: {node: '>= 0.4'} - dependencies: - has-symbols: 1.0.3 - dev: true - - /is-typed-array@1.1.10: - resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 - dev: true - - /is-utf8@0.2.1: - resolution: {integrity: sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==} - dev: false - - /is-valid-identifier@2.0.2: - resolution: {integrity: sha512-mpS5EGqXOwzXtKAg6I44jIAqeBfntFLxpAth1rrKbxtKyI6LPktyDYpHBI+tHlduhhX/SF26mFXmxQu995QVqg==} - dependencies: - assert: 1.5.0 - dev: true - - /is-weakmap@2.0.1: - resolution: {integrity: sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==} - dev: true - - /is-weakref@1.0.2: - resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} - dependencies: - call-bind: 1.0.2 - dev: true - - /is-weakset@2.0.2: - resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - dev: true - - /is-windows@1.0.2: - resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} - engines: {node: '>=0.10.0'} - dev: true - - /is-wsl@2.2.0: - resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} - engines: {node: '>=8'} - dependencies: - is-docker: 2.2.1 - dev: true - - /isarray@2.0.5: - resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} - dev: true - - /isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - - /jackspeak@2.2.1: - resolution: {integrity: sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==} - engines: {node: '>=14'} - dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - dev: true - - /jiti@1.18.2: - resolution: {integrity: sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==} - hasBin: true - dev: true - - /jju@1.4.0: - resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} - dev: true - - /js-sdsl@4.4.1: - resolution: {integrity: sha512-6Gsx8R0RucyePbWqPssR8DyfuXmLBooYN5cZFZKjHGnQuaf7pEzhtpceagJxVu4LqhYY5EYA7nko3FmeHZ1KbA==} - dev: true - - /js-tokens@4.0.0: - resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - - /js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} - hasBin: true - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - dev: true - - /js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true - dependencies: - argparse: 2.0.1 - dev: true - - /jsdoc-type-pratt-parser@4.0.0: - resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} - engines: {node: '>=12.0.0'} - dev: true - - /jsesc@0.5.0: - resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} - hasBin: true - dev: true - - /jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} - hasBin: true - - /jsesc@3.0.2: - resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} - engines: {node: '>=6'} - hasBin: true - dev: true - - /json-parse-even-better-errors@2.3.1: - resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} - dev: true - - /json-parse-even-better-errors@3.0.0: - resolution: {integrity: sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dev: true - - /json-schema-ref-parser@9.0.9: - resolution: {integrity: sha512-qcP2lmGy+JUoQJ4DOQeLaZDqH9qSkeGCK3suKWxJXS82dg728Mn3j97azDMaOUmJAN4uCq91LdPx4K7E8F1a7Q==} - engines: {node: '>=10'} - deprecated: Please switch to @apidevtools/json-schema-ref-parser - dependencies: - '@apidevtools/json-schema-ref-parser': 9.0.9 - dev: true - - /json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} - dev: true - - /json-schema@0.4.0: - resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} - dev: true - - /json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} - dev: true - - /jsonc-parser@3.2.0: - resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - dev: true - - /jsonfile@4.0.0: - resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - optionalDependencies: - graceful-fs: 4.2.11 - dev: true - - /jsonfile@6.1.0: - resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} - dependencies: - universalify: 2.0.0 - optionalDependencies: - graceful-fs: 4.2.11 - dev: true - - /jsx-ast-utils@3.3.3: - resolution: {integrity: sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==} - engines: {node: '>=4.0'} - dependencies: - array-includes: 3.1.6 - object.assign: 4.1.4 - dev: true - - /kind-of@6.0.3: - resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} - engines: {node: '>=0.10.0'} - dev: true - - /kleur@3.0.3: - resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} - engines: {node: '>=6'} - dev: true - - /kleur@4.1.5: - resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} - engines: {node: '>=6'} - dev: true - - /language-subtag-registry@0.3.22: - resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==} - dev: true - - /language-tags@1.0.5: - resolution: {integrity: sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==} - dependencies: - language-subtag-registry: 0.3.22 - dev: true - - /levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.2.1 - type-check: 0.4.0 - dev: true - - /license.js@3.1.2: - resolution: {integrity: sha512-anbqciJ9HfQVMRicsegiZOJ6nrP93ly24alImDOO7KndNLs3Um861fSEpXpWqGPMOv7PfZTJZL1p4cPq+Au4BQ==} - engines: {node: '>=8.0.0'} - dependencies: - pify: 3.0.0 - dev: false - - /lilconfig@2.1.0: - resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} - engines: {node: '>=10'} - dev: true - - /lines-and-columns@1.2.4: - resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - dev: true - - /lines-and-columns@2.0.3: - resolution: {integrity: sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: true - - /lint-staged@13.2.2: - resolution: {integrity: sha512-71gSwXKy649VrSU09s10uAT0rWCcY3aewhMaHyl2N84oBk4Xs9HgxvUp3AYu+bNsK4NrOYYxvSgg7FyGJ+jGcA==} - engines: {node: ^14.13.1 || >=16.0.0} - hasBin: true - dependencies: - chalk: 5.2.0 - cli-truncate: 3.1.0 - commander: 10.0.1 - debug: 4.3.4(supports-color@5.5.0) - execa: 7.1.1 - lilconfig: 2.1.0 - listr2: 5.0.8 - micromatch: 4.0.5 - normalize-path: 3.0.0 - object-inspect: 1.12.3 - pidtree: 0.6.0 - string-argv: 0.3.2 - yaml: 2.3.1 - transitivePeerDependencies: - - enquirer - - supports-color - dev: true - - /listr2@5.0.8: - resolution: {integrity: sha512-mC73LitKHj9w6v30nLNGPetZIlfpUniNSsxxrbaPcWOjDb92SHPzJPi/t+v1YC/lxKz/AJ9egOjww0qUuFxBpA==} - engines: {node: ^14.13.1 || >=16.0.0} - peerDependencies: - enquirer: '>= 2.3.0 < 3' - peerDependenciesMeta: - enquirer: - optional: true - dependencies: - cli-truncate: 2.1.0 - colorette: 2.0.20 - log-update: 4.0.0 - p-map: 4.0.0 - rfdc: 1.3.0 - rxjs: 7.8.1 - through: 2.3.8 - wrap-ansi: 7.0.0 - dev: true - - /load-plugin@5.1.0: - resolution: {integrity: sha512-Lg1CZa1CFj2CbNaxijTL6PCbzd4qGTlZov+iH2p5Xwy/ApcZJh+i6jMN2cYePouTfjJfrNu3nXFdEw8LvbjPFQ==} - dependencies: - '@npmcli/config': 6.2.0 - import-meta-resolve: 2.2.2 - dev: true - - /load-yaml-file@0.2.0: - resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} - engines: {node: '>=6'} - dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 - dev: true - - /locate-path@3.0.0: - resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} - engines: {node: '>=6'} - dependencies: - p-locate: 3.0.0 - path-exists: 3.0.0 - dev: false - - /locate-path@5.0.0: - resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} - engines: {node: '>=8'} - dependencies: - p-locate: 4.1.0 - dev: true - - /locate-path@6.0.0: - resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} - engines: {node: '>=10'} - dependencies: - p-locate: 5.0.0 - dev: true - - /lodash.get@4.4.2: - resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} - dev: false - - /lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} - dev: true - - /lodash.startcase@4.4.0: - resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - dev: true - - /lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - - /log-update@4.0.0: - resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} - engines: {node: '>=10'} - dependencies: - ansi-escapes: 4.3.2 - cli-cursor: 3.1.0 - slice-ansi: 4.0.0 - wrap-ansi: 6.2.0 - dev: true - - /longest-streak@3.1.0: - resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} - dev: true - - /loose-envify@1.4.0: - resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} - hasBin: true - dependencies: - js-tokens: 4.0.0 - - /lowlight@1.12.1: - resolution: {integrity: sha512-OqaVxMGIESnawn+TU/QMV5BJLbUghUfjDWPAtFqDYDmDtr4FnB+op8xM+pR7nKlauHNUHXGt0VgWatFB8voS5w==} - dependencies: - fault: 1.0.4 - highlight.js: 9.15.10 - dev: false - - /lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - dev: true - - /lru-cache@6.0.0: - resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} - engines: {node: '>=10'} - dependencies: - yallist: 4.0.0 - dev: true - - /lru-cache@9.1.2: - resolution: {integrity: sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==} - engines: {node: 14 || >=16.14} - dev: true - - /lru-queue@0.1.0: - resolution: {integrity: sha512-BpdYkt9EvGl8OfWHDQPISVpcl5xZthb+XPsbELj5AQXxIC8IriDZIQYjBJPEm5rS420sjZ0TLEzRcq5KdBhYrQ==} - dependencies: - es5-ext: 0.10.62 - dev: false - - /lunr@2.3.9: - resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} - dev: true - - /make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true - - /map-obj@1.0.1: - resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} - engines: {node: '>=0.10.0'} - dev: true - - /map-obj@4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} - dev: true - - /marked@4.3.0: - resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} - engines: {node: '>= 12'} - hasBin: true - dev: true - - /mdast-util-from-markdown@0.8.5: - resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} - dependencies: - '@types/mdast': 3.0.11 - mdast-util-to-string: 2.0.0 - micromark: 2.11.4 - parse-entities: 2.0.0 - unist-util-stringify-position: 2.0.3 - transitivePeerDependencies: - - supports-color - dev: true - - /mdast-util-from-markdown@1.3.1: - resolution: {integrity: sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==} - dependencies: - '@types/mdast': 3.0.11 - '@types/unist': 2.0.6 - decode-named-character-reference: 1.0.2 - mdast-util-to-string: 3.2.0 - micromark: 3.2.0 - micromark-util-decode-numeric-character-reference: 1.1.0 - micromark-util-decode-string: 1.1.0 - micromark-util-normalize-identifier: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - unist-util-stringify-position: 3.0.3 - uvu: 0.5.6 - transitivePeerDependencies: - - supports-color - dev: true - - /mdast-util-mdx-expression@1.3.2: - resolution: {integrity: sha512-xIPmR5ReJDu/DHH1OoIT1HkuybIfRGYRywC+gJtI7qHjCJp/M9jrmBEJW22O8lskDWm562BX2W8TiAwRTb0rKA==} - dependencies: - '@types/estree-jsx': 1.0.0 - '@types/hast': 2.3.4 - '@types/mdast': 3.0.11 - mdast-util-from-markdown: 1.3.1 - mdast-util-to-markdown: 1.5.0 - transitivePeerDependencies: - - supports-color - dev: true - - /mdast-util-mdx-jsx@2.1.4: - resolution: {integrity: sha512-DtMn9CmVhVzZx3f+optVDF8yFgQVt7FghCRNdlIaS3X5Bnym3hZwPbg/XW86vdpKjlc1PVj26SpnLGeJBXD3JA==} - dependencies: - '@types/estree-jsx': 1.0.0 - '@types/hast': 2.3.4 - '@types/mdast': 3.0.11 - '@types/unist': 2.0.6 - ccount: 2.0.1 - mdast-util-from-markdown: 1.3.1 - mdast-util-to-markdown: 1.5.0 - parse-entities: 4.0.1 - stringify-entities: 4.0.3 - unist-util-remove-position: 4.0.2 - unist-util-stringify-position: 3.0.3 - vfile-message: 3.1.4 - transitivePeerDependencies: - - supports-color - dev: true - - /mdast-util-mdx@2.0.1: - resolution: {integrity: sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw==} - dependencies: - mdast-util-from-markdown: 1.3.1 - mdast-util-mdx-expression: 1.3.2 - mdast-util-mdx-jsx: 2.1.4 - mdast-util-mdxjs-esm: 1.3.1 - mdast-util-to-markdown: 1.5.0 - transitivePeerDependencies: - - supports-color - dev: true - - /mdast-util-mdxjs-esm@1.3.1: - resolution: {integrity: sha512-SXqglS0HrEvSdUEfoXFtcg7DRl7S2cwOXc7jkuusG472Mmjag34DUDeOJUZtl+BVnyeO1frIgVpHlNRWc2gk/w==} - dependencies: - '@types/estree-jsx': 1.0.0 - '@types/hast': 2.3.4 - '@types/mdast': 3.0.11 - mdast-util-from-markdown: 1.3.1 - mdast-util-to-markdown: 1.5.0 - transitivePeerDependencies: - - supports-color - dev: true - - /mdast-util-phrasing@3.0.1: - resolution: {integrity: sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==} - dependencies: - '@types/mdast': 3.0.11 - unist-util-is: 5.2.1 - dev: true - - /mdast-util-to-markdown@1.5.0: - resolution: {integrity: sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==} - dependencies: - '@types/mdast': 3.0.11 - '@types/unist': 2.0.6 - longest-streak: 3.1.0 - mdast-util-phrasing: 3.0.1 - mdast-util-to-string: 3.2.0 - micromark-util-decode-string: 1.1.0 - unist-util-visit: 4.1.2 - zwitch: 2.0.4 - dev: true - - /mdast-util-to-string@2.0.0: - resolution: {integrity: sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==} - dev: true - - /mdast-util-to-string@3.2.0: - resolution: {integrity: sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==} - dependencies: - '@types/mdast': 3.0.11 - dev: true - - /memoizee@0.4.15: - resolution: {integrity: sha512-UBWmJpLZd5STPm7PMUlOw/TSy972M+z8gcyQ5veOnSDRREz/0bmpyTfKt3/51DhEBqCZQn1udM/5flcSPYhkdQ==} - dependencies: - d: 1.0.1 - es5-ext: 0.10.62 - es6-weak-map: 2.0.3 - event-emitter: 0.3.5 - is-promise: 2.2.2 - lru-queue: 0.1.0 - next-tick: 1.1.0 - timers-ext: 0.1.7 - dev: false - - /meow@6.1.1: - resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} - engines: {node: '>=8'} - dependencies: - '@types/minimist': 1.2.2 - camelcase-keys: 6.2.2 - decamelize-keys: 1.1.1 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 2.5.0 - read-pkg-up: 7.0.1 - redent: 3.0.0 - trim-newlines: 3.0.1 - type-fest: 0.13.1 - yargs-parser: 18.1.3 - dev: true - - /merge-stream@2.0.0: - resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} - - /merge2@1.4.1: - resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} - engines: {node: '>= 8'} - - /micromark-core-commonmark@1.1.0: - resolution: {integrity: sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==} - dependencies: - decode-named-character-reference: 1.0.2 - micromark-factory-destination: 1.1.0 - micromark-factory-label: 1.1.0 - micromark-factory-space: 1.1.0 - micromark-factory-title: 1.1.0 - micromark-factory-whitespace: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-chunked: 1.1.0 - micromark-util-classify-character: 1.1.0 - micromark-util-html-tag-name: 1.2.0 - micromark-util-normalize-identifier: 1.1.0 - micromark-util-resolve-all: 1.1.0 - micromark-util-subtokenize: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - dev: true - - /micromark-extension-mdx-expression@1.0.8: - resolution: {integrity: sha512-zZpeQtc5wfWKdzDsHRBY003H2Smg+PUi2REhqgIhdzAa5xonhP03FcXxqFSerFiNUr5AWmHpaNPQTBVOS4lrXw==} - dependencies: - '@types/estree': 1.0.1 - micromark-factory-mdx-expression: 1.0.9 - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-events-to-acorn: 1.2.3 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - dev: true - - /micromark-extension-mdx-jsx@1.0.5: - resolution: {integrity: sha512-gPH+9ZdmDflbu19Xkb8+gheqEDqkSpdCEubQyxuz/Hn8DOXiXvrXeikOoBA71+e8Pfi0/UYmU3wW3H58kr7akA==} - dependencies: - '@types/acorn': 4.0.6 - '@types/estree': 1.0.1 - estree-util-is-identifier-name: 2.1.0 - micromark-factory-mdx-expression: 1.0.9 - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - vfile-message: 3.1.4 - dev: true - - /micromark-extension-mdx-md@1.0.1: - resolution: {integrity: sha512-7MSuj2S7xjOQXAjjkbjBsHkMtb+mDGVW6uI2dBL9snOBCbZmoNgDAeZ0nSn9j3T42UE/g2xVNMn18PJxZvkBEA==} - dependencies: - micromark-util-types: 1.1.0 - dev: true - - /micromark-extension-mdxjs-esm@1.0.5: - resolution: {integrity: sha512-xNRBw4aoURcyz/S69B19WnZAkWJMxHMT5hE36GtDAyhoyn/8TuAeqjFJQlwk+MKQsUD7b3l7kFX+vlfVWgcX1w==} - dependencies: - '@types/estree': 1.0.1 - micromark-core-commonmark: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-events-to-acorn: 1.2.3 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - unist-util-position-from-estree: 1.1.2 - uvu: 0.5.6 - vfile-message: 3.1.4 - dev: true - - /micromark-extension-mdxjs@1.0.1: - resolution: {integrity: sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q==} - dependencies: - acorn: 8.9.0 - acorn-jsx: 5.3.2(acorn@8.9.0) - micromark-extension-mdx-expression: 1.0.8 - micromark-extension-mdx-jsx: 1.0.5 - micromark-extension-mdx-md: 1.0.1 - micromark-extension-mdxjs-esm: 1.0.5 - micromark-util-combine-extensions: 1.1.0 - micromark-util-types: 1.1.0 - dev: true - - /micromark-factory-destination@1.1.0: - resolution: {integrity: sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==} - dependencies: - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - dev: true - - /micromark-factory-label@1.1.0: - resolution: {integrity: sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==} - dependencies: - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - dev: true - - /micromark-factory-mdx-expression@1.0.9: - resolution: {integrity: sha512-jGIWzSmNfdnkJq05c7b0+Wv0Kfz3NJ3N4cBjnbO4zjXIlxJr+f8lk+5ZmwFvqdAbUy2q6B5rCY//g0QAAaXDWA==} - dependencies: - '@types/estree': 1.0.1 - micromark-util-character: 1.2.0 - micromark-util-events-to-acorn: 1.2.3 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - unist-util-position-from-estree: 1.1.2 - uvu: 0.5.6 - vfile-message: 3.1.4 - dev: true - - /micromark-factory-space@1.1.0: - resolution: {integrity: sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==} - dependencies: - micromark-util-character: 1.2.0 - micromark-util-types: 1.1.0 - dev: true - - /micromark-factory-title@1.1.0: - resolution: {integrity: sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==} - dependencies: - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - dev: true - - /micromark-factory-whitespace@1.1.0: - resolution: {integrity: sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==} - dependencies: - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - dev: true - - /micromark-util-character@1.2.0: - resolution: {integrity: sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==} - dependencies: - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - dev: true - - /micromark-util-chunked@1.1.0: - resolution: {integrity: sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==} - dependencies: - micromark-util-symbol: 1.1.0 - dev: true - - /micromark-util-classify-character@1.1.0: - resolution: {integrity: sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==} - dependencies: - micromark-util-character: 1.2.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - dev: true - - /micromark-util-combine-extensions@1.1.0: - resolution: {integrity: sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==} - dependencies: - micromark-util-chunked: 1.1.0 - micromark-util-types: 1.1.0 - dev: true - - /micromark-util-decode-numeric-character-reference@1.1.0: - resolution: {integrity: sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==} - dependencies: - micromark-util-symbol: 1.1.0 - dev: true - - /micromark-util-decode-string@1.1.0: - resolution: {integrity: sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==} - dependencies: - decode-named-character-reference: 1.0.2 - micromark-util-character: 1.2.0 - micromark-util-decode-numeric-character-reference: 1.1.0 - micromark-util-symbol: 1.1.0 - dev: true - - /micromark-util-encode@1.1.0: - resolution: {integrity: sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==} - dev: true - - /micromark-util-events-to-acorn@1.2.3: - resolution: {integrity: sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w==} - dependencies: - '@types/acorn': 4.0.6 - '@types/estree': 1.0.1 - '@types/unist': 2.0.6 - estree-util-visit: 1.2.1 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - vfile-message: 3.1.4 - dev: true - - /micromark-util-html-tag-name@1.2.0: - resolution: {integrity: sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==} - dev: true - - /micromark-util-normalize-identifier@1.1.0: - resolution: {integrity: sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==} - dependencies: - micromark-util-symbol: 1.1.0 - dev: true - - /micromark-util-resolve-all@1.1.0: - resolution: {integrity: sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==} - dependencies: - micromark-util-types: 1.1.0 - dev: true - - /micromark-util-sanitize-uri@1.2.0: - resolution: {integrity: sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==} - dependencies: - micromark-util-character: 1.2.0 - micromark-util-encode: 1.1.0 - micromark-util-symbol: 1.1.0 - dev: true - - /micromark-util-subtokenize@1.1.0: - resolution: {integrity: sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==} - dependencies: - micromark-util-chunked: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - dev: true - - /micromark-util-symbol@1.1.0: - resolution: {integrity: sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==} - dev: true - - /micromark-util-types@1.1.0: - resolution: {integrity: sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==} - dev: true - - /micromark@2.11.4: - resolution: {integrity: sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==} - dependencies: - debug: 4.3.4(supports-color@5.5.0) - parse-entities: 2.0.0 - transitivePeerDependencies: - - supports-color - dev: true - - /micromark@3.2.0: - resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} - dependencies: - '@types/debug': 4.1.8 - debug: 4.3.4(supports-color@5.5.0) - decode-named-character-reference: 1.0.2 - micromark-core-commonmark: 1.1.0 - micromark-factory-space: 1.1.0 - micromark-util-character: 1.2.0 - micromark-util-chunked: 1.1.0 - micromark-util-combine-extensions: 1.1.0 - micromark-util-decode-numeric-character-reference: 1.1.0 - micromark-util-encode: 1.1.0 - micromark-util-normalize-identifier: 1.1.0 - micromark-util-resolve-all: 1.1.0 - micromark-util-sanitize-uri: 1.2.0 - micromark-util-subtokenize: 1.1.0 - micromark-util-symbol: 1.1.0 - micromark-util-types: 1.1.0 - uvu: 0.5.6 - transitivePeerDependencies: - - supports-color - dev: true - - /micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} - dependencies: - braces: 3.0.2 - picomatch: 2.3.1 - - /mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} - - /mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} - dependencies: - mime-db: 1.52.0 - - /mimic-fn@2.1.0: - resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} - engines: {node: '>=6'} - - /mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - dev: true - - /min-indent@1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} - dev: true - - /minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} - dependencies: - brace-expansion: 1.1.11 - dev: true - - /minimatch@5.1.6: - resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} - engines: {node: '>=10'} - dependencies: - brace-expansion: 2.0.1 - dev: true - - /minimatch@9.0.1: - resolution: {integrity: sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - brace-expansion: 2.0.1 - dev: true - - /minimist-options@4.1.0: - resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} - engines: {node: '>= 6'} - dependencies: - arrify: 1.0.1 - is-plain-obj: 1.1.0 - kind-of: 6.0.3 - dev: true - - /minimist@1.2.8: - resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - - /minipass@6.0.2: - resolution: {integrity: sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==} - engines: {node: '>=16 || 14 >=14.17'} - dev: true - - /mixme@0.5.9: - resolution: {integrity: sha512-VC5fg6ySUscaWUpI4gxCBTQMH2RdUpNrk+MsbpCYtIvf9SBJdiUey4qE7BXviJsJR4nDQxCZ+3yaYNW3guz/Pw==} - engines: {node: '>= 8.0.0'} - dev: true - - /mri@1.2.0: - resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} - engines: {node: '>=4'} - dev: true - - /ms@2.1.2: - resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - - /ms@2.1.3: - resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - dev: true - - /mute-stream@0.0.8: - resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} - dev: false - - /mz@2.7.0: - resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - dependencies: - any-promise: 1.3.0 - object-assign: 4.1.1 - thenify-all: 1.6.0 - dev: true - - /nanoid@3.3.6: - resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} - engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} - hasBin: true - - /natural-compare-lite@1.4.0: - resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} - dev: true - - /natural-compare@1.4.0: - resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - dev: true - - /neo-async@2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} - - /next-tick@1.1.0: - resolution: {integrity: sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ==} - dev: false - - /next@13.4.2(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-aNFqLs3a3nTGvLWlO9SUhCuMUHVPSFQC0+tDNGAsDXqx+WJDFSbvc233gOJ5H19SBc7nw36A9LwQepOJ2u/8Kg==} - engines: {node: '>=16.8.0'} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - fibers: '>= 3.1.0' - node-sass: ^6.0.0 || ^7.0.0 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - fibers: - optional: true - node-sass: - optional: true - sass: - optional: true - dependencies: - '@next/env': 13.4.2 - '@swc/helpers': 0.5.1 - busboy: 1.6.0 - caniuse-lite: 1.0.30001505 - postcss: 8.4.14 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(react@18.2.0) - zod: 3.21.4 - optionalDependencies: - '@next/swc-darwin-arm64': 13.4.2 - '@next/swc-darwin-x64': 13.4.2 - '@next/swc-linux-arm64-gnu': 13.4.2 - '@next/swc-linux-arm64-musl': 13.4.2 - '@next/swc-linux-x64-gnu': 13.4.2 - '@next/swc-linux-x64-musl': 13.4.2 - '@next/swc-win32-arm64-msvc': 13.4.2 - '@next/swc-win32-ia32-msvc': 13.4.2 - '@next/swc-win32-x64-msvc': 13.4.2 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - dev: false - - /node-fetch@2.6.11: - resolution: {integrity: sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==} - engines: {node: 4.x || >=6.0.0} - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - dependencies: - whatwg-url: 5.0.0 - dev: false - - /node-releases@2.0.12: - resolution: {integrity: sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==} - dev: true - - /nodemon@2.0.22: - resolution: {integrity: sha512-B8YqaKMmyuCO7BowF1Z1/mkPqLk6cs/l63Ojtd6otKjMx47Dq1utxfRxcavH1I7VSaL8n5BUaoutadnsX3AAVQ==} - engines: {node: '>=8.10.0'} - hasBin: true - dependencies: - chokidar: 3.5.3 - debug: 3.2.7(supports-color@5.5.0) - ignore-by-default: 1.0.1 - minimatch: 3.1.2 - pstree.remy: 1.1.8 - semver: 5.7.1 - simple-update-notifier: 1.1.0 - supports-color: 5.5.0 - touch: 3.1.0 - undefsafe: 2.0.5 - dev: true - - /nopt@1.0.10: - resolution: {integrity: sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==} - hasBin: true - dependencies: - abbrev: 1.1.1 - dev: true - - /nopt@7.2.0: - resolution: {integrity: sha512-CVDtwCdhYIvnAzFoJ6NJ6dX3oga9/HyciQDnG1vQDjSLMeKLJ4A93ZqYKDrgYSr1FBY5/hMYC+2VCi24pgpkGA==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - hasBin: true - dependencies: - abbrev: 2.0.0 - dev: true - - /normalize-package-data@2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} - dependencies: - hosted-git-info: 2.8.9 - resolve: 1.22.2 - semver: 5.7.1 - validate-npm-package-license: 3.0.4 - dev: true - - /normalize-path@3.0.0: - resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} - engines: {node: '>=0.10.0'} - dev: true - - /normalize-range@0.1.2: - resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} - engines: {node: '>=0.10.0'} - dev: true - - /npm-normalize-package-bin@3.0.1: - resolution: {integrity: sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dev: true - - /npm-run-path@4.0.1: - resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} - engines: {node: '>=8'} - dependencies: - path-key: 3.1.1 - - /npm-run-path@5.1.0: - resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - path-key: 4.0.0 - dev: true - - /nth-check@2.1.1: - resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - dependencies: - boolbase: 1.0.0 - dev: true - - /object-assign@4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} - - /object-hash@3.0.0: - resolution: {integrity: sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==} - engines: {node: '>= 6'} - dev: true - - /object-inspect@1.12.3: - resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} - - /object-is@1.1.5: - resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - dev: true - - /object-keys@1.1.1: - resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} - engines: {node: '>= 0.4'} - dev: true - - /object.assign@4.1.4: - resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - has-symbols: 1.0.3 - object-keys: 1.1.1 - dev: true - - /object.entries@1.1.6: - resolution: {integrity: sha512-leTPzo4Zvg3pmbQ3rDK69Rl8GQvIqMWubrkxONG9/ojtFE2rD9fjMKfSI5BxW3osRH1m6VdzmqK8oAY9aT4x5w==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - dev: true - - /object.fromentries@2.0.6: - resolution: {integrity: sha512-VciD13dswC4j1Xt5394WR4MzmAQmlgN72phd/riNp9vtD7tp4QQWJ0R4wvclXcafgcYK8veHRed2W6XeGBvcfg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - dev: true - - /object.hasown@1.1.2: - resolution: {integrity: sha512-B5UIT3J1W+WuWIU55h0mjlwaqxiE5vYENJXIXZ4VFe05pNYrkKuK0U/6aFcb0pKywYJh7IhfoqUfKVmrJJHZHw==} - dependencies: - define-properties: 1.2.0 - es-abstract: 1.21.2 - dev: true - - /object.values@1.1.6: - resolution: {integrity: sha512-FVVTkD1vENCsAcwNs9k6jea2uHC/X0+JcjG8YA60FN5CMaJmG95wT9jek/xX9nornqGRrBkKtzuAu2wuHpKqvw==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - dev: true - - /objnest@5.1.1: - resolution: {integrity: sha512-C4fjNlHhUQbHiiFpgzvZse3/WUHq356Da3P8NZazg9JpPHFiQP2Y9lmYvpLU06midap0YpNz/MuA8GGSL8G0YQ==} - engines: {node: '>=8', npm: '>=5'} - dependencies: - '@babel/runtime': 7.22.5 - abind: 1.0.5 - extend: 3.0.2 - dev: false - - /once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} - dependencies: - wrappy: 1.0.2 - dev: true - - /onetime@5.1.2: - resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} - engines: {node: '>=6'} - dependencies: - mimic-fn: 2.1.0 - - /onetime@6.0.0: - resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} - engines: {node: '>=12'} - dependencies: - mimic-fn: 4.0.0 - dev: true - - /open@9.1.0: - resolution: {integrity: sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==} - engines: {node: '>=14.16'} - dependencies: - default-browser: 4.0.0 - define-lazy-prop: 3.0.0 - is-inside-container: 1.0.0 - is-wsl: 2.2.0 - dev: true - - /openapi-typescript-codegen@0.24.0: - resolution: {integrity: sha512-rSt8t1XbMWhv6Db7GUI24NNli7FU5kzHLxcE8BpzgGWRdWyWt9IB2YoLyPahxNrVA7yOaVgnXPkrcTDRMQtJYg==} - hasBin: true - dependencies: - camelcase: 6.3.0 - commander: 10.0.1 - fs-extra: 11.1.1 - handlebars: 4.7.7 - json-schema-ref-parser: 9.0.9 - dev: true - - /openapi-typescript@6.2.8: - resolution: {integrity: sha512-yA+y5MHiu6cjmtsGfNLavzVuvGCKzjL3H+exgHDPK6bnp6ZVFibtAiafenNSRDWL0x+7Sw/VPv5SbaqiPLW46w==} - hasBin: true - dependencies: - ansi-colors: 4.1.3 - fast-glob: 3.2.12 - js-yaml: 4.1.0 - supports-color: 9.3.1 - undici: 5.22.1 - yargs-parser: 21.1.1 - dev: true - - /optionator@0.9.1: - resolution: {integrity: sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==} - engines: {node: '>= 0.8.0'} - dependencies: - deep-is: 0.1.4 - fast-levenshtein: 2.0.6 - levn: 0.4.1 - prelude-ls: 1.2.1 - type-check: 0.4.0 - word-wrap: 1.2.3 - dev: true - - /os-tmpdir@1.0.2: - resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} - engines: {node: '>=0.10.0'} - - /outdent@0.5.0: - resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} - dev: true - - /p-filter@2.1.0: - resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} - engines: {node: '>=8'} - dependencies: - p-map: 2.1.0 - dev: true - - /p-limit@2.3.0: - resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} - engines: {node: '>=6'} - dependencies: - p-try: 2.2.0 - - /p-limit@3.1.0: - resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} - engines: {node: '>=10'} - dependencies: - yocto-queue: 0.1.0 - dev: true - - /p-locate@3.0.0: - resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} - engines: {node: '>=6'} - dependencies: - p-limit: 2.3.0 - dev: false - - /p-locate@4.1.0: - resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} - engines: {node: '>=8'} - dependencies: - p-limit: 2.3.0 - dev: true - - /p-locate@5.0.0: - resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} - engines: {node: '>=10'} - dependencies: - p-limit: 3.1.0 - dev: true - - /p-map@2.1.0: - resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} - engines: {node: '>=6'} - dev: true - - /p-map@4.0.0: - resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} - engines: {node: '>=10'} - dependencies: - aggregate-error: 3.1.0 - dev: true - - /p-try@2.2.0: - resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} - engines: {node: '>=6'} - - /parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} - engines: {node: '>=6'} - dependencies: - callsites: 3.1.0 - dev: true - - /parse-entities@1.2.2: - resolution: {integrity: sha512-NzfpbxW/NPrzZ/yYSoQxyqUZMZXIdCfE0OIN4ESsnptHJECoUk3FZktxNuzQf4tjt5UEopnxpYJbvYuxIFDdsg==} - dependencies: - character-entities: 1.2.4 - character-entities-legacy: 1.1.4 - character-reference-invalid: 1.1.4 - is-alphanumerical: 1.0.4 - is-decimal: 1.0.4 - is-hexadecimal: 1.0.4 - dev: false - - /parse-entities@2.0.0: - resolution: {integrity: sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==} - dependencies: - character-entities: 1.2.4 - character-entities-legacy: 1.1.4 - character-reference-invalid: 1.1.4 - is-alphanumerical: 1.0.4 - is-decimal: 1.0.4 - is-hexadecimal: 1.0.4 - dev: true - - /parse-entities@4.0.1: - resolution: {integrity: sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==} - dependencies: - '@types/unist': 2.0.6 - character-entities: 2.0.2 - character-entities-legacy: 3.0.0 - character-reference-invalid: 2.0.1 - decode-named-character-reference: 1.0.2 - is-alphanumerical: 2.0.1 - is-decimal: 2.0.1 - is-hexadecimal: 2.0.1 - dev: true - - /parse-json@5.2.0: - resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} - engines: {node: '>=8'} - dependencies: - '@babel/code-frame': 7.22.5 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 1.2.4 - dev: true - - /parse-json@6.0.2: - resolution: {integrity: sha512-SA5aMiaIjXkAiBrW/yPgLgQAQg42f7K3ACO+2l/zOvtQBwX58DMUsFJXelW2fx3yMBmWOVkR6j1MGsdSbCA4UA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - '@babel/code-frame': 7.22.5 - error-ex: 1.3.2 - json-parse-even-better-errors: 2.3.1 - lines-and-columns: 2.0.3 - dev: true - - /path-exists@3.0.0: - resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} - engines: {node: '>=4'} - dev: false - - /path-exists@4.0.0: - resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} - engines: {node: '>=8'} - dev: true - - /path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - dev: true - - /path-key@3.1.1: - resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} - engines: {node: '>=8'} - - /path-key@4.0.0: - resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} - engines: {node: '>=12'} - dev: true - - /path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true - - /path-scurry@1.9.2: - resolution: {integrity: sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg==} - engines: {node: '>=16 || 14 >=14.17'} - dependencies: - lru-cache: 9.1.2 - minipass: 6.0.2 - dev: true - - /path-type@4.0.0: - resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} - engines: {node: '>=8'} - - /picocolors@1.0.0: - resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - - /pidtree@0.6.0: - resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} - engines: {node: '>=0.10'} - hasBin: true - dev: true - - /pify@2.3.0: - resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==} - engines: {node: '>=0.10.0'} - dev: true - - /pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - dev: false - - /pify@4.0.1: - resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} - engines: {node: '>=6'} - dev: true - - /pirates@4.0.6: - resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} - engines: {node: '>= 6'} - dev: true - - /pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} - dependencies: - find-up: 4.1.0 - dev: true - - /pkg-up@3.1.0: - resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} - engines: {node: '>=8'} - dependencies: - find-up: 3.0.0 - dev: false - - /pluralize@8.0.0: - resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} - engines: {node: '>=4'} - dev: true - - /pnpm@8.5.1: - resolution: {integrity: sha512-W6elL7Nww0a/MCICkzpkbxW6f99TQuX4DuJoDjWp39X08PKDkEpg4cgj3d6EtgYADcdQWl/eM8NdlLJVE3RgpA==} - engines: {node: '>=16.14'} - hasBin: true - dev: true - - /postcss-import@15.1.0(postcss@8.4.24): - resolution: {integrity: sha512-hpr+J05B2FVYUAXHeK1YyI267J/dDDhMU6B6civm8hSY1jYJnBXxzKDKDswzJmtLHryrjhnDjqqp/49t8FALew==} - engines: {node: '>=14.0.0'} - peerDependencies: - postcss: ^8.0.0 - dependencies: - postcss: 8.4.24 - postcss-value-parser: 4.2.0 - read-cache: 1.0.0 - resolve: 1.22.2 - dev: true - - /postcss-js@4.0.1(postcss@8.4.24): - resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} - engines: {node: ^12 || ^14 || >= 16} - peerDependencies: - postcss: ^8.4.21 - dependencies: - camelcase-css: 2.0.1 - postcss: 8.4.24 - dev: true - - /postcss-load-config@4.0.1(postcss@8.4.24)(ts-node@10.9.1): - resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} - engines: {node: '>= 14'} - peerDependencies: - postcss: '>=8.0.9' - ts-node: '>=9.0.0' - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - dependencies: - lilconfig: 2.1.0 - postcss: 8.4.24 - ts-node: 10.9.1(@types/node@18.16.12)(typescript@5.0.4) - yaml: 2.3.1 - dev: true - - /postcss-nested@6.0.1(postcss@8.4.24): - resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} - engines: {node: '>=12.0'} - peerDependencies: - postcss: ^8.2.14 - dependencies: - postcss: 8.4.24 - postcss-selector-parser: 6.0.13 - dev: true - - /postcss-selector-parser@6.0.13: - resolution: {integrity: sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==} - engines: {node: '>=4'} - dependencies: - cssesc: 3.0.0 - util-deprecate: 1.0.2 - dev: true - - /postcss-value-parser@4.2.0: - resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - - /postcss@8.4.14: - resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.6 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: false - - /postcss@8.4.24: - resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==} - engines: {node: ^10 || ^12 || >=14} - dependencies: - nanoid: 3.3.6 - picocolors: 1.0.0 - source-map-js: 1.0.2 - dev: true - - /preferred-pm@3.0.3: - resolution: {integrity: sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==} - engines: {node: '>=10'} - dependencies: - find-up: 5.0.0 - find-yarn-workspace-root2: 1.2.16 - path-exists: 4.0.0 - which-pm: 2.0.0 - dev: true - - /prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} - engines: {node: '>= 0.8.0'} - dev: true - - /prettier@2.8.8: - resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} - engines: {node: '>=10.13.0'} - hasBin: true - dev: true - - /prismjs@1.17.1: - resolution: {integrity: sha512-PrEDJAFdUGbOP6xK/UsfkC5ghJsPJviKgnQOoxaDbBjwc8op68Quupwt1DeAFoG8GImPhiKXAvvsH7wDSLsu1Q==} - optionalDependencies: - clipboard: 2.0.11 - dev: false - - /prismjs@1.29.0: - resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} - engines: {node: '>=6'} - dev: false - - /proc-log@3.0.0: - resolution: {integrity: sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dev: true - - /prompts@2.4.2: - resolution: {integrity: sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==} - engines: {node: '>= 6'} - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - dev: true - - /prop-types@15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - - /property-information@5.6.0: - resolution: {integrity: sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA==} - dependencies: - xtend: 4.0.2 - dev: false - - /pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - dev: true - - /pstree.remy@1.1.8: - resolution: {integrity: sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==} - dev: true - - /punycode@2.3.0: - resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} - engines: {node: '>=6'} - dev: true - - /qs@6.11.2: - resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} - engines: {node: '>=0.6'} - dependencies: - side-channel: 1.0.4 - dev: false - - /queue-microtask@1.2.3: - resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - - /quick-lru@4.0.1: - resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} - engines: {node: '>=8'} - dev: true - - /react-code-blocks@0.0.9-0(react-dom@18.2.0)(react-is@16.13.1)(react@18.2.0): - resolution: {integrity: sha512-jdYJVZwGtsr6WIUaqILy5fkF1acf57YV5s0V3+w5o9v3omYnqBeO6EuZi1Vf2x1hahkYGEedsp46+ofdkYlqyw==} - engines: {node: '>=12'} - peerDependencies: - react: '>=16' - dependencies: - '@babel/runtime': 7.22.5 - react: 18.2.0 - react-syntax-highlighter: 12.2.1(react@18.2.0) - styled-components: 5.3.11(react-dom@18.2.0)(react-is@16.13.1)(react@18.2.0) - tslib: 2.5.3 - transitivePeerDependencies: - - react-dom - - react-is - dev: false - - /react-dom@18.2.0(react@18.2.0): - resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} - peerDependencies: - react: ^18.2.0 - dependencies: - loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.0 - dev: false - - /react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - - /react-syntax-highlighter@12.2.1(react@18.2.0): - resolution: {integrity: sha512-CTsp0ZWijwKRYFg9xhkWD4DSpQqE4vb2NKVMdPAkomnILSmsNBHE0n5GuI5zB+PU3ySVvXvdt9jo+ViD9XibCA==} - peerDependencies: - react: '>= 0.14.0' - dependencies: - '@babel/runtime': 7.22.5 - highlight.js: 9.15.10 - lowlight: 1.12.1 - prismjs: 1.29.0 - react: 18.2.0 - refractor: 2.10.1 - dev: false - - /react@18.2.0: - resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} - engines: {node: '>=0.10.0'} - dependencies: - loose-envify: 1.4.0 - dev: false - - /read-cache@1.0.0: - resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} - dependencies: - pify: 2.3.0 - dev: true - - /read-package-json-fast@3.0.2: - resolution: {integrity: sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw==} - engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - dependencies: - json-parse-even-better-errors: 3.0.0 - npm-normalize-package-bin: 3.0.1 - dev: true - - /read-pkg-up@7.0.1: - resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} - engines: {node: '>=8'} - dependencies: - find-up: 4.1.0 - read-pkg: 5.2.0 - type-fest: 0.8.1 - dev: true - - /read-pkg@5.2.0: - resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} - engines: {node: '>=8'} - dependencies: - '@types/normalize-package-data': 2.4.1 - normalize-package-data: 2.5.0 - parse-json: 5.2.0 - type-fest: 0.6.0 - dev: true - - /read-yaml-file@1.1.0: - resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} - engines: {node: '>=6'} - dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 - dev: true - - /readable-stream@3.6.2: - resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} - engines: {node: '>= 6'} - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - dev: true - - /readdirp@3.6.0: - resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} - engines: {node: '>=8.10.0'} - dependencies: - picomatch: 2.3.1 - dev: true - - /redent@3.0.0: - resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} - engines: {node: '>=8'} - dependencies: - indent-string: 4.0.0 - strip-indent: 3.0.0 - dev: true - - /refractor@2.10.1: - resolution: {integrity: sha512-Xh9o7hQiQlDbxo5/XkOX6H+x/q8rmlmZKr97Ie1Q8ZM32IRRd3B/UxuA/yXDW79DBSXGWxm2yRTbcTVmAciJRw==} - dependencies: - hastscript: 5.1.2 - parse-entities: 1.2.2 - prismjs: 1.17.1 - dev: false - - /regenerator-runtime@0.11.1: - resolution: {integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==} - dev: false - - /regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} - - /regexp-tree@0.1.27: - resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} - hasBin: true - dev: true - - /regexp.prototype.flags@1.5.0: - resolution: {integrity: sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - functions-have-names: 1.2.3 - dev: true - - /regexpp@3.2.0: - resolution: {integrity: sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==} - engines: {node: '>=8'} - dev: true - - /regjsparser@0.10.0: - resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} - hasBin: true - dependencies: - jsesc: 0.5.0 - dev: true - - /remark-mdx@2.3.0: - resolution: {integrity: sha512-g53hMkpM0I98MU266IzDFMrTD980gNF3BJnkyFcmN+dD873mQeD5rdMO3Y2X+x8umQfbSE0PcoEDl7ledSA+2g==} - dependencies: - mdast-util-mdx: 2.0.1 - micromark-extension-mdxjs: 1.0.1 - transitivePeerDependencies: - - supports-color - dev: true - - /remark-parse@10.0.2: - resolution: {integrity: sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==} - dependencies: - '@types/mdast': 3.0.11 - mdast-util-from-markdown: 1.3.1 - unified: 10.1.2 - transitivePeerDependencies: - - supports-color - dev: true - - /remark-stringify@10.0.3: - resolution: {integrity: sha512-koyOzCMYoUHudypbj4XpnAKFbkddRMYZHwghnxd7ue5210WzGw6kOBwauJTRUMq16jsovXx8dYNvSSWP89kZ3A==} - dependencies: - '@types/mdast': 3.0.11 - mdast-util-to-markdown: 1.5.0 - unified: 10.1.2 - dev: true - - /require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - - /require-main-filename@2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - - /requireindex@1.2.0: - resolution: {integrity: sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==} - engines: {node: '>=0.10.5'} - dev: true - - /resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} - dev: true - - /resolve-from@5.0.0: - resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} - engines: {node: '>=8'} - dev: true - - /resolve-pkg-maps@1.0.0: - resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} - dev: true - - /resolve@1.19.0: - resolution: {integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==} - dependencies: - is-core-module: 2.12.1 - path-parse: 1.0.7 - dev: true - - /resolve@1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} - hasBin: true - dependencies: - is-core-module: 2.12.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /resolve@1.22.3: - resolution: {integrity: sha512-P8ur/gp/AmbEzjr729bZnLjXK5Z+4P0zhIJgBgzqRih7hL7BOukHGtSTA3ACMY467GRFz3duQsi0bDZdR7DKdw==} - hasBin: true - dependencies: - is-core-module: 2.12.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /resolve@2.0.0-next.4: - resolution: {integrity: sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ==} - hasBin: true - dependencies: - is-core-module: 2.12.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 - dev: true - - /restore-cursor@3.1.0: - resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} - engines: {node: '>=8'} - dependencies: - onetime: 5.1.2 - signal-exit: 3.0.7 - - /reusify@1.0.4: - resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} - engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - - /rfdc@1.3.0: - resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} - dev: true - - /rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - hasBin: true - dependencies: - glob: 7.2.3 - dev: true - - /rimraf@5.0.1: - resolution: {integrity: sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==} - engines: {node: '>=14'} - hasBin: true - dependencies: - glob: 10.2.7 - dev: true - - /run-applescript@5.0.0: - resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} - engines: {node: '>=12'} - dependencies: - execa: 5.1.1 - dev: true - - /run-async@2.4.1: - resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} - engines: {node: '>=0.12.0'} - dev: false - - /run-parallel@1.2.0: - resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - dependencies: - queue-microtask: 1.2.3 - - /rxjs-report-usage@1.0.6: - resolution: {integrity: sha512-omv1DIv5z1kV+zDAEjaDjWSkx8w5TbFp5NZoPwUipwzYVcor/4So9ZU3bUyQ1c8lxY5Q0Es/ztWW7PGjY7to0Q==} - hasBin: true - dependencies: - '@babel/parser': 7.22.5 - '@babel/traverse': 7.22.5(supports-color@5.5.0) - '@babel/types': 7.22.5 - bent: 7.3.12 - chalk: 4.1.2 - glob: 7.2.3 - prompts: 2.4.2 - transitivePeerDependencies: - - supports-color - dev: true - - /rxjs@6.6.7: - resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} - engines: {npm: '>=2.0.0'} - dependencies: - tslib: 1.14.1 - dev: false - - /rxjs@7.8.1: - resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - dependencies: - tslib: 2.5.3 - - /sade@1.8.1: - resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} - engines: {node: '>=6'} - dependencies: - mri: 1.2.0 - dev: true - - /safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - dev: true - - /safe-regex-test@1.0.0: - resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - is-regex: 1.1.4 - dev: true - - /safe-regex@2.1.1: - resolution: {integrity: sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==} - dependencies: - regexp-tree: 0.1.27 - dev: true - - /safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - - /scheduler@0.23.0: - resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} - dependencies: - loose-envify: 1.4.0 - dev: false - - /select@1.1.2: - resolution: {integrity: sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==} - dev: false - optional: true - - /semver@5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} - hasBin: true - dev: true - - /semver@6.3.0: - resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} - hasBin: true - dev: true - - /semver@7.0.0: - resolution: {integrity: sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==} - hasBin: true - dev: true - - /semver@7.5.2: - resolution: {integrity: sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: true - - /semver@7.5.3: - resolution: {integrity: sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - dev: true - - /set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - - /shallowequal@1.1.0: - resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} - dev: false - - /shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - dependencies: - shebang-regex: 1.0.0 - dev: true - - /shebang-command@2.0.0: - resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} - engines: {node: '>=8'} - dependencies: - shebang-regex: 3.0.0 - - /shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - dev: true - - /shebang-regex@3.0.0: - resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} - engines: {node: '>=8'} - - /shiki@0.12.1: - resolution: {integrity: sha512-aieaV1m349rZINEBkjxh2QbBvFFQOlgqYTNtCal82hHj4dDZ76oMlQIX+C7ryerBTDiga3e5NfH6smjdJ02BbQ==} - dependencies: - jsonc-parser: 3.2.0 - vscode-oniguruma: 1.7.0 - vscode-textmate: 8.0.0 - dev: true - - /shiki@0.14.2: - resolution: {integrity: sha512-ltSZlSLOuSY0M0Y75KA+ieRaZ0Trf5Wl3gutE7jzLuIcWxLp5i/uEnLoQWNvgKXQ5OMpGkJnVMRLAuzjc0LJ2A==} - dependencies: - ansi-sequence-parser: 1.1.0 - jsonc-parser: 3.2.0 - vscode-oniguruma: 1.7.0 - vscode-textmate: 8.0.0 - dev: true - - /side-channel@1.0.4: - resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} - dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.1 - object-inspect: 1.12.3 - - /signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - - /signal-exit@4.0.2: - resolution: {integrity: sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==} - engines: {node: '>=14'} - dev: true - - /simple-update-notifier@1.1.0: - resolution: {integrity: sha512-VpsrsJSUcJEseSbMHkrsrAVSdvVS5I96Qo1QAQ4FxQ9wXFcB+pjj7FB7/us9+GcgfW4ziHtYMc1J0PLczb55mg==} - engines: {node: '>=8.10.0'} - dependencies: - semver: 7.0.0 - dev: true - - /sisteransi@1.0.5: - resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} - dev: true - - /slash@3.0.0: - resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} - engines: {node: '>=8'} - - /slash@4.0.0: - resolution: {integrity: sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==} - engines: {node: '>=12'} - dev: true - - /slice-ansi@3.0.0: - resolution: {integrity: sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==} - engines: {node: '>=8'} - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - dev: true - - /slice-ansi@4.0.0: - resolution: {integrity: sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - astral-regex: 2.0.0 - is-fullwidth-code-point: 3.0.0 - dev: true - - /slice-ansi@5.0.0: - resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} - engines: {node: '>=12'} - dependencies: - ansi-styles: 6.2.1 - is-fullwidth-code-point: 4.0.0 - dev: true - - /smartwrap@2.0.2: - resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} - engines: {node: '>=6'} - hasBin: true - dependencies: - array.prototype.flat: 1.3.1 - breakword: 1.0.6 - grapheme-splitter: 1.0.4 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - yargs: 15.4.1 - dev: true - - /source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} - engines: {node: '>=0.10.0'} - - /source-map@0.6.1: - resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} - engines: {node: '>=0.10.0'} - - /space-separated-tokens@1.1.5: - resolution: {integrity: sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==} - dev: false - - /spawndamnit@2.0.0: - resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} - dependencies: - cross-spawn: 5.1.0 - signal-exit: 3.0.7 - dev: true - - /spdx-correct@3.2.0: - resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} - dependencies: - spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.13 - dev: true - - /spdx-exceptions@2.3.0: - resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} - dev: true - - /spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - dependencies: - spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.13 - dev: true - - /spdx-license-ids@3.0.13: - resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} - dev: true - - /sprintf-js@1.0.3: - resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} - dev: true - - /stop-iteration-iterator@1.0.0: - resolution: {integrity: sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==} - engines: {node: '>= 0.4'} - dependencies: - internal-slot: 1.0.5 - dev: true - - /stream-transform@2.1.3: - resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} - dependencies: - mixme: 0.5.9 - dev: true - - /streamsearch@1.1.0: - resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} - engines: {node: '>=10.0.0'} - - /string-argv@0.3.2: - resolution: {integrity: sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==} - engines: {node: '>=0.6.19'} - dev: true - - /string-width@3.1.0: - resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==} - engines: {node: '>=6'} - dependencies: - emoji-regex: 7.0.3 - is-fullwidth-code-point: 2.0.0 - strip-ansi: 5.2.0 - dev: false - - /string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 - - /string-width@5.1.2: - resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} - engines: {node: '>=12'} - dependencies: - eastasianwidth: 0.2.0 - emoji-regex: 9.2.2 - strip-ansi: 7.1.0 - dev: true - - /string.prototype.matchall@4.0.8: - resolution: {integrity: sha512-6zOCOcJ+RJAQshcTvXPHoxoQGONa3e/Lqx90wUA+wEzX78sg5Bo+1tQo4N0pohS0erG9qtCqJDjNCQBjeWVxyg==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - get-intrinsic: 1.2.1 - has-symbols: 1.0.3 - internal-slot: 1.0.5 - regexp.prototype.flags: 1.5.0 - side-channel: 1.0.4 - dev: true - - /string.prototype.trim@1.2.7: - resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} - engines: {node: '>= 0.4'} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - dev: true - - /string.prototype.trimend@1.0.6: - resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - dev: true - - /string.prototype.trimstart@1.0.6: - resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} - dependencies: - call-bind: 1.0.2 - define-properties: 1.2.0 - es-abstract: 1.21.2 - dev: true - - /string_decoder@1.3.0: - resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} - dependencies: - safe-buffer: 5.2.1 - dev: true - - /stringcase@4.3.1: - resolution: {integrity: sha512-Ov7McNX1sFaEX9NWijD1hIOVDDhKdnFzN9tvoa1N8xgrclouhsO4kBPVrTPhjO/zP5mn1Ww03uZ2SThNMXS7zg==} - engines: {node: '>=8', npm: '>=5'} - dev: false - - /stringify-entities@4.0.3: - resolution: {integrity: sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==} - dependencies: - character-entities-html4: 2.1.0 - character-entities-legacy: 3.0.0 - dev: true - - /strip-ansi@5.2.0: - resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} - engines: {node: '>=6'} - dependencies: - ansi-regex: 4.1.1 - dev: false - - /strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} - dependencies: - ansi-regex: 5.0.1 - - /strip-ansi@7.1.0: - resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} - engines: {node: '>=12'} - dependencies: - ansi-regex: 6.0.1 - dev: true - - /strip-bom@3.0.0: - resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} - engines: {node: '>=4'} - dev: true - - /strip-final-newline@2.0.0: - resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} - engines: {node: '>=6'} - - /strip-final-newline@3.0.0: - resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} - engines: {node: '>=12'} - dev: true - - /strip-indent@3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - dependencies: - min-indent: 1.0.1 - dev: true - - /strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} - engines: {node: '>=8'} - dev: true - - /styled-components@5.3.11(react-dom@18.2.0)(react-is@16.13.1)(react@18.2.0): - resolution: {integrity: sha512-uuzIIfnVkagcVHv9nE0VPlHPSCmXIUGKfJ42LNjxCCTDTL5sgnJ8Z7GZBq0EnLYGln77tPpEpExt2+qa+cZqSw==} - engines: {node: '>=10'} - peerDependencies: - react: '>= 16.8.0' - react-dom: '>= 16.8.0' - react-is: '>= 16.8.0' - dependencies: - '@babel/helper-module-imports': 7.22.5 - '@babel/traverse': 7.22.5(supports-color@5.5.0) - '@emotion/is-prop-valid': 1.2.1 - '@emotion/stylis': 0.8.5 - '@emotion/unitless': 0.7.5 - babel-plugin-styled-components: 2.1.3(styled-components@5.3.11) - css-to-react-native: 3.2.0 - hoist-non-react-statics: 3.3.2 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - react-is: 16.13.1 - shallowequal: 1.1.0 - supports-color: 5.5.0 - dev: false - - /styled-jsx@5.1.1(react@18.2.0): - resolution: {integrity: sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==} - engines: {node: '>= 12.0.0'} - peerDependencies: - '@babel/core': '*' - babel-plugin-macros: '*' - react: '>= 16.8.0 || 17.x.x || ^18.0.0-0' - peerDependenciesMeta: - '@babel/core': - optional: true - babel-plugin-macros: - optional: true - dependencies: - client-only: 0.0.1 - react: 18.2.0 - dev: false - - /sucrase@3.32.0: - resolution: {integrity: sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==} - engines: {node: '>=8'} - hasBin: true - dependencies: - '@jridgewell/gen-mapping': 0.3.3 - commander: 4.1.1 - glob: 7.1.6 - lines-and-columns: 1.2.4 - mz: 2.7.0 - pirates: 4.0.6 - ts-interface-checker: 0.1.13 - dev: true - - /supports-color@5.5.0: - resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} - engines: {node: '>=4'} - dependencies: - has-flag: 3.0.0 - - /supports-color@7.2.0: - resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} - engines: {node: '>=8'} - dependencies: - has-flag: 4.0.0 - - /supports-color@9.3.1: - resolution: {integrity: sha512-knBY82pjmnIzK3NifMo3RxEIRD9E0kIzV4BKcyTZ9+9kWgLMxd4PrsTSMoFQUabgRBbF8KOLRDCyKgNV+iK44Q==} - engines: {node: '>=12'} - dev: true - - /supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} - dev: true - - /svelte@3.59.2: - resolution: {integrity: sha512-vzSyuGr3eEoAtT/A6bmajosJZIUWySzY2CzB3w2pgPvnkUjGqlDnsNnA0PMO+mMAhuyMul6C2uuZzY6ELSkzyA==} - engines: {node: '>= 8'} - dev: true - - /synckit@0.8.5: - resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} - engines: {node: ^14.18.0 || >=16.0.0} - dependencies: - '@pkgr/utils': 2.4.1 - tslib: 2.5.3 - dev: true - - /tailwindcss@3.3.2(ts-node@10.9.1): - resolution: {integrity: sha512-9jPkMiIBXvPc2KywkraqsUfbfj+dHDb+JPWtSJa9MLFdrPyazI7q6WX2sUrm7R9eVR7qqv3Pas7EvQFzxKnI6w==} - engines: {node: '>=14.0.0'} - hasBin: true - dependencies: - '@alloc/quick-lru': 5.2.0 - arg: 5.0.2 - chokidar: 3.5.3 - didyoumean: 1.2.2 - dlv: 1.1.3 - fast-glob: 3.2.12 - glob-parent: 6.0.2 - is-glob: 4.0.3 - jiti: 1.18.2 - lilconfig: 2.1.0 - micromatch: 4.0.5 - normalize-path: 3.0.0 - object-hash: 3.0.0 - picocolors: 1.0.0 - postcss: 8.4.24 - postcss-import: 15.1.0(postcss@8.4.24) - postcss-js: 4.0.1(postcss@8.4.24) - postcss-load-config: 4.0.1(postcss@8.4.24)(ts-node@10.9.1) - postcss-nested: 6.0.1(postcss@8.4.24) - postcss-selector-parser: 6.0.13 - postcss-value-parser: 4.2.0 - resolve: 1.22.2 - sucrase: 3.32.0 - transitivePeerDependencies: - - ts-node - dev: true - - /tapable@2.2.1: - resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} - engines: {node: '>=6'} - dev: true - - /term-size@2.2.1: - resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} - engines: {node: '>=8'} - dev: true - - /text-table@0.2.0: - resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} - dev: true - - /thenify-all@1.6.0: - resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} - engines: {node: '>=0.8'} - dependencies: - thenify: 3.3.1 - dev: true - - /thenify@3.3.1: - resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - dependencies: - any-promise: 1.3.0 - dev: true - - /through@2.3.8: - resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - - /timers-ext@0.1.7: - resolution: {integrity: sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==} - dependencies: - es5-ext: 0.10.62 - next-tick: 1.1.0 - dev: false - - /tiny-emitter@2.1.0: - resolution: {integrity: sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==} - dev: false - optional: true - - /titleize@3.0.0: - resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} - engines: {node: '>=12'} - dev: true - - /tmp@0.0.33: - resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} - engines: {node: '>=0.6.0'} - dependencies: - os-tmpdir: 1.0.2 - - /to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - - /to-regex-range@5.0.1: - resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} - engines: {node: '>=8.0'} - dependencies: - is-number: 7.0.0 - - /to-vfile@7.2.4: - resolution: {integrity: sha512-2eQ+rJ2qGbyw3senPI0qjuM7aut8IYXK6AEoOWb+fJx/mQYzviTckm1wDjq91QYHAPBTYzmdJXxMFA6Mk14mdw==} - dependencies: - is-buffer: 2.0.5 - vfile: 5.3.7 - dev: true - - /touch@3.1.0: - resolution: {integrity: sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==} - hasBin: true - dependencies: - nopt: 1.0.10 - dev: true - - /tr46@0.0.3: - resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: false - - /trim-newlines@3.0.1: - resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} - engines: {node: '>=8'} - dev: true - - /trough@2.1.0: - resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} - dev: true - - /ts-interface-checker@0.1.13: - resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} - dev: true - - /ts-node@10.9.1(@types/node@18.16.12)(typescript@5.0.4): - resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 18.16.12 - acorn: 8.9.0 - acorn-walk: 8.2.0 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 - typescript: 5.0.4 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - dev: true - - /tslib@1.14.1: - resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - - /tslib@2.5.3: - resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} - - /tsutils-etc@1.4.2(tsutils@3.21.0)(typescript@5.0.4): - resolution: {integrity: sha512-2Dn5SxTDOu6YWDNKcx1xu2YUy6PUeKrWZB/x2cQ8vY2+iz3JRembKn/iZ0JLT1ZudGNwQQvtFX9AwvRHbXuPUg==} - hasBin: true - peerDependencies: - tsutils: ^3.0.0 - typescript: '>=4.0.0' - dependencies: - '@types/yargs': 17.0.24 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 - yargs: 17.7.2 - dev: true - - /tsutils@3.21.0(typescript@5.0.4): - resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} - engines: {node: '>= 6'} - peerDependencies: - typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' - dependencies: - tslib: 1.14.1 - typescript: 5.0.4 - dev: true - - /tty-table@4.2.1: - resolution: {integrity: sha512-xz0uKo+KakCQ+Dxj1D/tKn2FSyreSYWzdkL/BYhgN6oMW808g8QRMuh1atAV9fjTPbWBjfbkKQpI/5rEcnAc7g==} - engines: {node: '>=8.0.0'} - hasBin: true - dependencies: - chalk: 4.1.2 - csv: 5.5.3 - kleur: 4.1.5 - smartwrap: 2.0.2 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - yargs: 17.7.2 - dev: true - - /type-check@0.4.0: - resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} - engines: {node: '>= 0.8.0'} - dependencies: - prelude-ls: 1.2.1 - dev: true - - /type-fest@0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} - dev: true - - /type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - dev: true - - /type-fest@0.21.3: - resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} - engines: {node: '>=10'} - - /type-fest@0.6.0: - resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} - engines: {node: '>=8'} - dev: true - - /type-fest@0.8.1: - resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} - engines: {node: '>=8'} - dev: true - - /type@1.2.0: - resolution: {integrity: sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==} - dev: false - - /type@2.7.2: - resolution: {integrity: sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==} - dev: false - - /typed-array-length@1.0.4: - resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} - dependencies: - call-bind: 1.0.2 - for-each: 0.3.3 - is-typed-array: 1.1.10 - dev: true - - /typed-emitter@2.1.0: - resolution: {integrity: sha512-g/KzbYKbH5C2vPkaXGu8DJlHrGKHLsM25Zg9WuC9pMGfuvT+X25tZQWo5fK1BjBm8+UrVE9LDCvaY0CQk+fXDA==} - optionalDependencies: - rxjs: 7.8.1 - dev: false - - /typedarray@0.0.6: - resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - dev: true - - /typedoc@0.23.24(typescript@5.0.4): - resolution: {integrity: sha512-bfmy8lNQh+WrPYcJbtjQ6JEEsVl/ce1ZIXyXhyW+a1vFrjO39t6J8sL/d6FfAGrJTc7McCXgk9AanYBSNvLdIA==} - engines: {node: '>= 14.14'} - hasBin: true - peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x - dependencies: - lunr: 2.3.9 - marked: 4.3.0 - minimatch: 5.1.6 - shiki: 0.12.1 - typescript: 5.0.4 - dev: true - - /typedoc@0.24.7(typescript@5.0.4): - resolution: {integrity: sha512-zzfKDFIZADA+XRIp2rMzLe9xZ6pt12yQOhCr7cD7/PBTjhPmMyMvGrkZ2lPNJitg3Hj1SeiYFNzCsSDrlpxpKw==} - engines: {node: '>= 14.14'} - hasBin: true - peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x - dependencies: - lunr: 2.3.9 - marked: 4.3.0 - minimatch: 9.0.1 - shiki: 0.14.2 - typescript: 5.0.4 - dev: true - - /typescript@5.0.4: - resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} - engines: {node: '>=12.20'} - hasBin: true - dev: true - - /uglify-js@3.17.4: - resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==} - engines: {node: '>=0.8.0'} - hasBin: true - requiresBuild: true - optional: true - - /unbox-primitive@1.0.2: - resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - dependencies: - call-bind: 1.0.2 - has-bigints: 1.0.2 - has-symbols: 1.0.3 - which-boxed-primitive: 1.0.2 - dev: true - - /undefsafe@2.0.5: - resolution: {integrity: sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==} - dev: true - - /undici@5.22.1: - resolution: {integrity: sha512-Ji2IJhFXZY0x/0tVBXeQwgPlLWw13GVzpsWPQ3rV50IFMMof2I55PZZxtm4P6iNq+L5znYN9nSTAq0ZyE6lSJw==} - engines: {node: '>=14.0'} - dependencies: - busboy: 1.6.0 - dev: true - - /unified-engine@10.1.0: - resolution: {integrity: sha512-5+JDIs4hqKfHnJcVCxTid1yBoI/++FfF/1PFdSMpaftZZZY+qg2JFruRbf7PaIwa9KgLotXQV3gSjtY0IdcFGQ==} - dependencies: - '@types/concat-stream': 2.0.0 - '@types/debug': 4.1.8 - '@types/is-empty': 1.2.1 - '@types/node': 18.16.12 - '@types/unist': 2.0.6 - concat-stream: 2.0.0 - debug: 4.3.4(supports-color@5.5.0) - fault: 2.0.1 - glob: 8.1.0 - ignore: 5.2.4 - is-buffer: 2.0.5 - is-empty: 1.2.0 - is-plain-obj: 4.1.0 - load-plugin: 5.1.0 - parse-json: 6.0.2 - to-vfile: 7.2.4 - trough: 2.1.0 - unist-util-inspect: 7.0.2 - vfile-message: 3.1.4 - vfile-reporter: 7.0.5 - vfile-statistics: 2.0.1 - yaml: 2.3.1 - transitivePeerDependencies: - - supports-color - dev: true - - /unified@10.1.2: - resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} - dependencies: - '@types/unist': 2.0.6 - bail: 2.0.2 - extend: 3.0.2 - is-buffer: 2.0.5 - is-plain-obj: 4.1.0 - trough: 2.1.0 - vfile: 5.3.7 - dev: true - - /unist-util-inspect@7.0.2: - resolution: {integrity: sha512-Op0XnmHUl6C2zo/yJCwhXQSm/SmW22eDZdWP2qdf4WpGrgO1ZxFodq+5zFyeRGasFjJotAnLgfuD1jkcKqiH1Q==} - dependencies: - '@types/unist': 2.0.6 - dev: true - - /unist-util-is@5.2.1: - resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==} - dependencies: - '@types/unist': 2.0.6 - dev: true - - /unist-util-position-from-estree@1.1.2: - resolution: {integrity: sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww==} - dependencies: - '@types/unist': 2.0.6 - dev: true - - /unist-util-remove-position@4.0.2: - resolution: {integrity: sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==} - dependencies: - '@types/unist': 2.0.6 - unist-util-visit: 4.1.2 - dev: true - - /unist-util-stringify-position@2.0.3: - resolution: {integrity: sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==} - dependencies: - '@types/unist': 2.0.6 - dev: true - - /unist-util-stringify-position@3.0.3: - resolution: {integrity: sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==} - dependencies: - '@types/unist': 2.0.6 - dev: true - - /unist-util-visit-parents@5.1.3: - resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} - dependencies: - '@types/unist': 2.0.6 - unist-util-is: 5.2.1 - dev: true - - /unist-util-visit@4.1.2: - resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} - dependencies: - '@types/unist': 2.0.6 - unist-util-is: 5.2.1 - unist-util-visit-parents: 5.1.3 - dev: true - - /universalify@0.1.2: - resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} - engines: {node: '>= 4.0.0'} - dev: true - - /universalify@2.0.0: - resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} - engines: {node: '>= 10.0.0'} - dev: true - - /untildify@4.0.0: - resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} - engines: {node: '>=8'} - dev: true - - /update-browserslist-db@1.0.11(browserslist@4.21.9): - resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} - hasBin: true - peerDependencies: - browserslist: '>= 4.21.0' - dependencies: - browserslist: 4.21.9 - escalade: 3.1.1 - picocolors: 1.0.0 - dev: true - - /uri-js@4.4.1: - resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - dependencies: - punycode: 2.3.0 - dev: true - - /util-deprecate@1.0.2: - resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - dev: true - - /util@0.10.3: - resolution: {integrity: sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==} - dependencies: - inherits: 2.0.1 - dev: true - - /uuid@8.3.2: - resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} - hasBin: true - dev: false - - /uvu@0.5.6: - resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} - engines: {node: '>=8'} - hasBin: true - dependencies: - dequal: 2.0.3 - diff: 5.1.0 - kleur: 4.1.5 - sade: 1.8.1 - dev: true - - /v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - dev: true - - /validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - dependencies: - spdx-correct: 3.2.0 - spdx-expression-parse: 3.0.1 - dev: true - - /vfile-message@3.1.4: - resolution: {integrity: sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==} - dependencies: - '@types/unist': 2.0.6 - unist-util-stringify-position: 3.0.3 - dev: true - - /vfile-reporter@7.0.5: - resolution: {integrity: sha512-NdWWXkv6gcd7AZMvDomlQbK3MqFWL1RlGzMn++/O2TI+68+nqxCPTvLugdOtfSzXmjh+xUyhp07HhlrbJjT+mw==} - dependencies: - '@types/supports-color': 8.1.1 - string-width: 5.1.2 - supports-color: 9.3.1 - unist-util-stringify-position: 3.0.3 - vfile: 5.3.7 - vfile-message: 3.1.4 - vfile-sort: 3.0.1 - vfile-statistics: 2.0.1 - dev: true - - /vfile-sort@3.0.1: - resolution: {integrity: sha512-1os1733XY6y0D5x0ugqSeaVJm9lYgj0j5qdcZQFyxlZOSy1jYarL77lLyb5gK4Wqr1d5OxmuyflSO3zKyFnTFw==} - dependencies: - vfile: 5.3.7 - vfile-message: 3.1.4 - dev: true - - /vfile-statistics@2.0.1: - resolution: {integrity: sha512-W6dkECZmP32EG/l+dp2jCLdYzmnDBIw6jwiLZSER81oR5AHRcVqL+k3Z+pfH1R73le6ayDkJRMk0sutj1bMVeg==} - dependencies: - vfile: 5.3.7 - vfile-message: 3.1.4 - dev: true - - /vfile@5.3.7: - resolution: {integrity: sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==} - dependencies: - '@types/unist': 2.0.6 - is-buffer: 2.0.5 - unist-util-stringify-position: 3.0.3 - vfile-message: 3.1.4 - dev: true - - /vscode-oniguruma@1.7.0: - resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} - dev: true - - /vscode-textmate@8.0.0: - resolution: {integrity: sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==} - dev: true - - /vue-eslint-parser@9.3.1(eslint@8.40.0): - resolution: {integrity: sha512-Clr85iD2XFZ3lJ52/ppmUDG/spxQu6+MAeHXjjyI4I1NUYZ9xmenQp4N0oaHJhrA8OOxltCVxMRfANGa70vU0g==} - engines: {node: ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: '>=6.0.0' - dependencies: - debug: 4.3.4(supports-color@5.5.0) - eslint: 8.40.0 - eslint-scope: 7.2.0 - eslint-visitor-keys: 3.4.1 - espree: 9.5.2 - esquery: 1.5.0 - lodash: 4.17.21 - semver: 7.5.2 - transitivePeerDependencies: - - supports-color - dev: true - - /walk-up-path@3.0.1: - resolution: {integrity: sha512-9YlCL/ynK3CTlrSRrDxZvUauLzAswPCrsaCgilqFevUYpeEW0/3ScEjaa3kbW/T0ghhkEr7mv+fpjqn1Y1YuTA==} - dev: true - - /wcwidth@1.0.1: - resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==} - dependencies: - defaults: 1.0.4 - dev: true - - /webidl-conversions@3.0.1: - resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: false - - /whatwg-url@5.0.0: - resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - dependencies: - tr46: 0.0.3 - webidl-conversions: 3.0.1 - dev: false - - /which-boxed-primitive@1.0.2: - resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} - dependencies: - is-bigint: 1.0.4 - is-boolean-object: 1.1.2 - is-number-object: 1.0.7 - is-string: 1.0.7 - is-symbol: 1.0.4 - dev: true - - /which-collection@1.0.1: - resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} - dependencies: - is-map: 2.0.2 - is-set: 2.0.2 - is-weakmap: 2.0.1 - is-weakset: 2.0.2 - dev: true - - /which-module@2.0.1: - resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} - - /which-pm@2.0.0: - resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} - engines: {node: '>=8.15'} - dependencies: - load-yaml-file: 0.2.0 - path-exists: 4.0.0 - dev: true - - /which-typed-array@1.1.9: - resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} - engines: {node: '>= 0.4'} - dependencies: - available-typed-arrays: 1.0.5 - call-bind: 1.0.2 - for-each: 0.3.3 - gopd: 1.0.1 - has-tostringtag: 1.0.0 - is-typed-array: 1.1.10 - dev: true - - /which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - - /which@2.0.2: - resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} - engines: {node: '>= 8'} - hasBin: true - dependencies: - isexe: 2.0.0 - - /word-wrap@1.2.3: - resolution: {integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==} - engines: {node: '>=0.10.0'} - dev: true - - /wordwrap@1.0.0: - resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} - - /wrap-ansi@5.1.0: - resolution: {integrity: sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==} - engines: {node: '>=6'} - dependencies: - ansi-styles: 3.2.1 - string-width: 3.1.0 - strip-ansi: 5.2.0 - dev: false - - /wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - - /wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 - dev: true - - /wrap-ansi@8.1.0: - resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} - engines: {node: '>=12'} - dependencies: - ansi-styles: 6.2.1 - string-width: 5.1.2 - strip-ansi: 7.1.0 - dev: true - - /wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - dev: true - - /ws@8.13.0: - resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: false - - /xml-name-validator@4.0.0: - resolution: {integrity: sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==} - engines: {node: '>=12'} - dev: true - - /xtend@4.0.2: - resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} - engines: {node: '>=0.4'} - dev: false - - /y18n@4.0.3: - resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - - /y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - dev: true - - /yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - dev: true - - /yallist@4.0.0: - resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - dev: true - - /yaml@2.3.1: - resolution: {integrity: sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==} - engines: {node: '>= 14'} - dev: true - - /yargs-interactive@3.0.1: - resolution: {integrity: sha512-Jnp88uiuz+ZRpM10Lwvs0nRetWPog+6lcgQrhwKsyEanAe3wgTlaPPzcYlZWp53aOMTzOcR5wEpEsFOMOPmLlw==} - engines: {node: '>=8', npm: '>=6'} - dependencies: - inquirer: 7.3.3 - yargs: 14.2.3 - dev: false - - /yargs-parser@15.0.3: - resolution: {integrity: sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==} - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - dev: false - - /yargs-parser@18.1.3: - resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} - engines: {node: '>=6'} - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 - dev: true - - /yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - dev: true - - /yargs@14.2.3: - resolution: {integrity: sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==} - dependencies: - cliui: 5.0.0 - decamelize: 1.2.0 - find-up: 3.0.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 - string-width: 3.1.0 - which-module: 2.0.1 - y18n: 4.0.3 - yargs-parser: 15.0.3 - dev: false - - /yargs@15.4.1: - resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} - engines: {node: '>=8'} - dependencies: - cliui: 6.0.0 - decamelize: 1.2.0 - find-up: 4.1.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 - string-width: 4.2.3 - which-module: 2.0.1 - y18n: 4.0.3 - yargs-parser: 18.1.3 - dev: true - - /yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} - dependencies: - cliui: 8.0.1 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - dev: true - - /yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - dev: true - - /yocto-queue@0.1.0: - resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} - engines: {node: '>=10'} - dev: true - - /zod@3.21.4: - resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} - dev: false - - /zwitch@2.0.4: - resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - dev: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml deleted file mode 100644 index 9ed67691..00000000 --- a/pnpm-workspace.yaml +++ /dev/null @@ -1,5 +0,0 @@ -packages: - - "packages/**" - - "services/**" - - "apps/**" - - "!packages/create-guilded-app/templates/**" diff --git a/services/proxy/package.json b/services/proxy/package.json index abd94b77..5e062b12 100644 --- a/services/proxy/package.json +++ b/services/proxy/package.json @@ -7,7 +7,6 @@ "main": "./dist/index.js", "private": true, "scripts": { - "lint": "eslint --ignore-path ../../.config/.eslintignore --config ../../.config/.eslintrc.js src", "build": "tsc", "docker:build": "docker build -t guildedjs/proxy-service:latest -f ./Dockerfile ../../", "docker:start": "docker run --env-file=.env -p 3456:3456 guildedjs/proxy-service", @@ -59,4 +58,4 @@ "bugs": { "url": "https://github.com/zaida04/guilded.js/issues" } -} +} \ No newline at end of file diff --git a/services/proxy/src/index.ts b/services/proxy/src/index.ts index fe71843d..9c2fd179 100644 --- a/services/proxy/src/index.ts +++ b/services/proxy/src/index.ts @@ -7,62 +7,78 @@ import { config } from "dotenv"; if (process.env.NODE_ENV !== "production") config(); for (const envVar of ["GUILDED_TOKEN"]) { - if (!process.env[envVar]) throw new Error(`Missing environment variable ${envVar}`); + if (!process.env[envVar]) throw new Error(`Missing environment variable ${envVar}`); } const rest = new RestManager({ - maxRatelimitRetryLimit: 0, - token: process.env.GUILDED_TOKEN!, + maxRatelimitRetryLimit: 0, + token: process.env.GUILDED_TOKEN!, }); const server = createServer((req, res) => { - res.setHeader("Content-Type", "application/json"); - if (!req.url || !req.method) { - res.statusCode = 400; - return res.end( - JSON.stringify({ - error: { message: "You must supply a valid path and method." }, - }), - ); - } + res.setHeader("Content-Type", "application/json"); + if (!req.url || !req.method) { + res.statusCode = 400; + return res.end( + JSON.stringify({ + error: { + message: "You must supply a valid path and method.", + }, + }), + ); + } - console.log(`${req.method} ${req.url}`); + console.log(`${req.method} ${req.url}`); - const body: Uint8Array[] = []; - req.on("data", (chunk) => { - body.push(chunk); - }).on("end", async () => { - try { - const [request, requestBody] = await rest.make( - { - path: req.url!, - method: req.method! as HTTPMethods, - body: body.length ? Buffer.concat(body).toString() : undefined, - }, - true, - 0, - { - returnAsText: true, - bodyIsJSON: false, - }, - ); - const resBodyParsed = await requestBody; + const body: Uint8Array[] = []; + req + .on("data", (chunk) => { + body.push(chunk); + }) + .on("end", async () => { + try { + const [request, requestBody] = await rest.make( + { + path: req.url!, + method: req.method! as HTTPMethods, + body: body.length ? Buffer.concat(body).toString() : undefined, + }, + true, + 0, + { + returnAsText: true, + bodyIsJSON: false, + }, + ); + const resBodyParsed = await requestBody; - res.statusCode = request.status; - res.end(resBodyParsed); - } catch (error) { - if (error instanceof GuildedAPIError) { - res.statusCode = Number(error.response.status); - return res.end(JSON.stringify({ error: { message: error.message } })); - } + res.statusCode = request.status; + res.end(resBodyParsed); + } catch (error) { + if (error instanceof GuildedAPIError) { + res.statusCode = Number(error.response.status); + return res.end( + JSON.stringify({ + error: { + message: error.message, + }, + }), + ); + } - res.statusCode = 500; - console.log(error); - return res.end(JSON.stringify({ error: { message: "Internal server error." } })); - } - }); + res.statusCode = 500; + console.log(error); + return res.end( + JSON.stringify({ + error: { + message: "Internal server error.", + }, + }), + ); + } + }); }); const port = process.env.PORT ? Number(process.env.PORT) : 3_456; server.listen(port, () => { - console.log(`Proxy server started on ${port}`); + console.log(`Proxy server started on ${port}`); }); diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json deleted file mode 100644 index 4444ca40..00000000 --- a/tsconfig.eslint.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig.json", - "extends": "./tsconfig.json", - "include": ["packages", "apps", "services", "scripts", "examples"] -} diff --git a/turbo.json b/turbo.json new file mode 100644 index 00000000..d5ab0f1f --- /dev/null +++ b/turbo.json @@ -0,0 +1,49 @@ +{ + "$schema": "https://turbo.build/schema.json", + "pipeline": { + "build:typecheck": { + "dependsOn": [ + "^build:typecheck" + ], + "outputs": [ + "dist" + ], + "inputs": [ + "lib/**/*.{ts,tsx}", + "src/**/*.{ts,tsx}" + ] + }, + "build": { + "dependsOn": [ + "^build" + ], + "outputs": [ + "dist" + ], + "inputs": [ + "lib/**/*.{ts,tsx}", + "src/**/*.{ts,tsx}" + ] + }, + "check": { + "dependsOn": [ + "^check" + ], + "inputs": [ + "**/*.{ts,tsx}" + ] + }, + "check:fix": { + "dependsOn": [ + "^check:fix" + ], + "cache": false + }, + "prepublishOnly": { + "dependsOn": [ + "^prepublishOnly" + ], + "cache": false + } + } +} \ No newline at end of file